@fluentui/react-menu 9.13.3 → 9.13.4
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/CHANGELOG.md +19 -2
- package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
- package/lib/components/MenuItemLink/MenuItemLink.types.js +1 -3
- package/lib/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.types.js +1 -3
- package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +1 -3
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.js +1 -3
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +1 -3
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +1 -3
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib-commonjs/index.js +123 -123
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js +3 -3
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,29 @@
|
|
1
1
|
# Change Log - @fluentui/react-menu
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 18 Mar 2024 19:44:52 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.13.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.13.4)
|
8
|
+
|
9
|
+
Mon, 18 Mar 2024 19:44:52 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.13.3..@fluentui/react-menu_v9.13.4)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- Bump @fluentui/react-aria to v9.10.2 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
15
|
+
- Bump @fluentui/react-context-selector to v9.1.56 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
16
|
+
- Bump @fluentui/react-portal to v9.4.18 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
17
|
+
- Bump @fluentui/react-positioning to v9.14.2 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
18
|
+
- Bump @fluentui/react-shared-contexts to v9.15.2 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
19
|
+
- Bump @fluentui/react-tabster to v9.19.5 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
20
|
+
- Bump @fluentui/react-theme to v9.1.19 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
21
|
+
- Bump @fluentui/react-utilities to v9.18.5 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
22
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.34 ([PR #30803](https://github.com/microsoft/fluentui/pull/30803) by beachball)
|
23
|
+
|
7
24
|
## [9.13.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.13.3)
|
8
25
|
|
9
|
-
Fri, 15 Mar 2024 21:
|
26
|
+
Fri, 15 Mar 2024 21:43:49 GMT
|
10
27
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.13.2..@fluentui/react-menu_v9.13.3)
|
11
28
|
|
12
29
|
### Patches
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuDivider.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuDividerSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuDividerProps = ComponentProps<MenuDividerSlots>;\n\nexport type MenuDividerState = ComponentState<MenuDividerSlots>;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuDivider.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuDividerSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuDividerProps = ComponentProps<MenuDividerSlots>;\n\nexport type MenuDividerState = ComponentState<MenuDividerSlots>;\n"],"names":[],"mappings":"AAAA,WAQgE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuGroupContextValue } from '../../contexts/menuGroupContext';\n\nexport type MenuGroupSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupProps = ComponentProps<MenuGroupSlots>;\n\nexport type MenuGroupState = ComponentState<MenuGroupSlots> & {\n /**\n * id applied to the DOM element of `MenuGroupHeader`\n */\n headerId: string;\n};\n\nexport type MenuGroupContextValues = {\n menuGroup: MenuGroupContextValue;\n};\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuGroupContextValue } from '../../contexts/menuGroupContext';\n\nexport type MenuGroupSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupProps = ComponentProps<MenuGroupSlots>;\n\nexport type MenuGroupState = ComponentState<MenuGroupSlots> & {\n /**\n * id applied to the DOM element of `MenuGroupHeader`\n */\n headerId: string;\n};\n\nexport type MenuGroupContextValues = {\n menuGroup: MenuGroupContextValue;\n};\n"],"names":[],"mappings":"AAAA,WAkBE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuGroupHeader.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuGroupHeaderSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;\n\nexport type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuGroupHeader.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuGroupHeaderSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;\n\nexport type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;\n"],"names":[],"mappings":"AAAA,WAQwE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuItemSlots = {\n root: Slot<'div'>;\n\n /**\n * Icon slot rendered before children content\n */\n icon?: Slot<'span'>;\n\n /**\n * A helper slot for alignment when a menu item is used with selectable menuitems\n * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components\n */\n checkmark?: Slot<'span'>;\n\n /**\n * Icon slot that shows the indicator for a submenu\n */\n submenuIndicator?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<'span'>;\n\n /**\n * Secondary content rendered opposite the primary content (e.g Shortcut text)\n */\n secondaryContent?: Slot<'span'>;\n};\n\nexport type MenuItemProps = Omit<ComponentProps<Partial<MenuItemSlots>>, 'content'> &\n Pick<Partial<MenuItemSlots>, 'content'> & {\n /**\n * If the menu item is a trigger for a submenu\n *\n * @default false\n */\n hasSubmenu?: boolean;\n\n /**\n * Clicking on the menu item will not dismiss an open menu\n *\n * @default false\n */\n persistOnClick?: boolean;\n\n disabled?: boolean;\n /**\n * @deprecated this property does nothing.\n * disabled focusable is by default by simply using `disabled` property\n */\n disabledFocusable?: boolean;\n };\n\nexport type MenuItemState = ComponentState<MenuItemSlots> &\n Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>>;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuItemSlots = {\n root: Slot<'div'>;\n\n /**\n * Icon slot rendered before children content\n */\n icon?: Slot<'span'>;\n\n /**\n * A helper slot for alignment when a menu item is used with selectable menuitems\n * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components\n */\n checkmark?: Slot<'span'>;\n\n /**\n * Icon slot that shows the indicator for a submenu\n */\n submenuIndicator?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<'span'>;\n\n /**\n * Secondary content rendered opposite the primary content (e.g Shortcut text)\n */\n secondaryContent?: Slot<'span'>;\n};\n\nexport type MenuItemProps = Omit<ComponentProps<Partial<MenuItemSlots>>, 'content'> &\n Pick<Partial<MenuItemSlots>, 'content'> & {\n /**\n * If the menu item is a trigger for a submenu\n *\n * @default false\n */\n hasSubmenu?: boolean;\n\n /**\n * Clicking on the menu item will not dismiss an open menu\n *\n * @default false\n */\n persistOnClick?: boolean;\n\n disabled?: boolean;\n /**\n * @deprecated this property does nothing.\n * disabled focusable is by default by simply using `disabled` property\n */\n disabledFocusable?: boolean;\n };\n\nexport type MenuItemState = ComponentState<MenuItemSlots> &\n Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>>;\n"],"names":[],"mappings":"AAAA,WA0D8E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItemCheckbox.types.ts"],"sourcesContent":["import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';\nimport type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;\n\nexport type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuItemCheckbox.types.ts"],"sourcesContent":["import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';\nimport type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;\n\nexport type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;\n"],"names":[],"mappings":"AAAA,WAK4E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItemLink.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { MenuItemProps, MenuItemSlots } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemLinkSlots = {\n root: Slot<'a'>;\n} & Pick<MenuItemSlots, 'icon' | 'content' | 'secondaryContent' | 'checkmark'>;\n\n/**\n * MenuItemLink Props\n */\nexport type MenuItemLinkProps = ComponentProps<MenuItemLinkSlots> & Pick<MenuItemProps, 'disabled'> & { href: string };\n\n/**\n * State used in rendering MenuItemLink\n */\nexport type MenuItemLinkState = ComponentState<MenuItemLinkSlots>;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuItemLink.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { MenuItemProps, MenuItemSlots } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemLinkSlots = {\n root: Slot<'a'>;\n} & Pick<MenuItemSlots, 'icon' | 'content' | 'secondaryContent' | 'checkmark'>;\n\n/**\n * MenuItemLink Props\n */\nexport type MenuItemLinkProps = ComponentProps<MenuItemLinkSlots> & Pick<MenuItemProps, 'disabled'> & { href: string };\n\n/**\n * State used in rendering MenuItemLink\n */\nexport type MenuItemLinkState = ComponentState<MenuItemLinkSlots>;\n"],"names":[],"mappings":"AAAA,WAekE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItemRadio.types.ts"],"sourcesContent":["import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';\nimport type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;\n\nexport type MenuItemRadioState = MenuItemState & MenuItemSelectableState;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuItemRadio.types.ts"],"sourcesContent":["import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';\nimport type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;\n\nexport type MenuItemRadioState = MenuItemState & MenuItemSelectableState;\n"],"names":[],"mappings":"AAAA,WAKyE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuPopover.types.ts"],"sourcesContent":["import type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuPopoverSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuPopover Props\n */\nexport type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;\n\n/**\n * State used in rendering MenuPopover\n */\nexport type MenuPopoverState = ComponentState<MenuPopoverSlots> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline: boolean;\n };\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuPopover.types.ts"],"sourcesContent":["import type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuPopoverSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuPopover Props\n */\nexport type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;\n\n/**\n * State used in rendering MenuPopover\n */\nexport type MenuPopoverState = ComponentState<MenuPopoverSlots> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline: boolean;\n };\n"],"names":[],"mappings":"AAAA,WAsBI"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuSplitGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuSplitGroupSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuSplitGroup Props\n */\nexport type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots>;\n\n/**\n * State used in rendering MenuSplitGroup\n */\nexport type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots>;\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["MenuSplitGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuSplitGroupSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuSplitGroup Props\n */\nexport type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots>;\n\n/**\n * State used in rendering MenuSplitGroup\n */\nexport type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots>;\n"],"names":[],"mappings":"AAAA,WAcsE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/lib-commonjs/index.js
CHANGED
@@ -9,158 +9,113 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
|
13
|
-
return
|
12
|
+
MenuProvider: function() {
|
13
|
+
return _menuContext.MenuProvider;
|
14
14
|
},
|
15
|
-
|
16
|
-
return
|
15
|
+
useMenuContext_unstable: function() {
|
16
|
+
return _menuContext.useMenuContext_unstable;
|
17
17
|
},
|
18
|
-
|
19
|
-
return
|
18
|
+
MenuTriggerContextProvider: function() {
|
19
|
+
return _menuTriggerContext.MenuTriggerContextProvider;
|
20
20
|
},
|
21
|
-
|
22
|
-
return
|
21
|
+
useMenuTriggerContext_unstable: function() {
|
22
|
+
return _menuTriggerContext.useMenuTriggerContext_unstable;
|
23
23
|
},
|
24
24
|
MenuGroupContextProvider: function() {
|
25
25
|
return _menuGroupContext.MenuGroupContextProvider;
|
26
26
|
},
|
27
|
-
|
28
|
-
return
|
29
|
-
},
|
30
|
-
MenuItem: function() {
|
31
|
-
return _MenuItem.MenuItem;
|
32
|
-
},
|
33
|
-
MenuItemCheckbox: function() {
|
34
|
-
return _MenuItemCheckbox.MenuItemCheckbox;
|
35
|
-
},
|
36
|
-
MenuItemLink: function() {
|
37
|
-
return _MenuItemLink.MenuItemLink;
|
38
|
-
},
|
39
|
-
MenuItemRadio: function() {
|
40
|
-
return _MenuItemRadio.MenuItemRadio;
|
41
|
-
},
|
42
|
-
MenuList: function() {
|
43
|
-
return _MenuList.MenuList;
|
27
|
+
useMenuGroupContext_unstable: function() {
|
28
|
+
return _menuGroupContext.useMenuGroupContext_unstable;
|
44
29
|
},
|
45
30
|
MenuListProvider: function() {
|
46
31
|
return _menuListContext.MenuListProvider;
|
47
32
|
},
|
48
|
-
|
49
|
-
return
|
33
|
+
useMenuListContext_unstable: function() {
|
34
|
+
return _menuListContext.useMenuListContext_unstable;
|
50
35
|
},
|
51
|
-
|
52
|
-
return
|
36
|
+
Menu: function() {
|
37
|
+
return _Menu.Menu;
|
53
38
|
},
|
54
|
-
|
55
|
-
return
|
39
|
+
renderMenu_unstable: function() {
|
40
|
+
return _Menu.renderMenu_unstable;
|
56
41
|
},
|
57
|
-
|
58
|
-
return
|
42
|
+
useMenuContextValues_unstable: function() {
|
43
|
+
return _Menu.useMenuContextValues_unstable;
|
59
44
|
},
|
60
|
-
|
61
|
-
return
|
45
|
+
useMenu_unstable: function() {
|
46
|
+
return _Menu.useMenu_unstable;
|
62
47
|
},
|
63
|
-
|
64
|
-
return
|
48
|
+
MenuDivider: function() {
|
49
|
+
return _MenuDivider.MenuDivider;
|
65
50
|
},
|
66
51
|
menuDividerClassNames: function() {
|
67
52
|
return _MenuDivider.menuDividerClassNames;
|
68
53
|
},
|
69
|
-
|
70
|
-
return
|
54
|
+
renderMenuDivider_unstable: function() {
|
55
|
+
return _MenuDivider.renderMenuDivider_unstable;
|
71
56
|
},
|
72
|
-
|
73
|
-
return
|
57
|
+
useMenuDividerStyles_unstable: function() {
|
58
|
+
return _MenuDivider.useMenuDividerStyles_unstable;
|
74
59
|
},
|
75
|
-
|
76
|
-
return
|
60
|
+
useMenuDivider_unstable: function() {
|
61
|
+
return _MenuDivider.useMenuDivider_unstable;
|
77
62
|
},
|
78
|
-
|
79
|
-
return
|
63
|
+
MenuGroup: function() {
|
64
|
+
return _MenuGroup.MenuGroup;
|
80
65
|
},
|
81
|
-
|
82
|
-
return
|
66
|
+
menuGroupClassNames: function() {
|
67
|
+
return _MenuGroup.menuGroupClassNames;
|
83
68
|
},
|
84
|
-
|
85
|
-
return
|
69
|
+
renderMenuGroup_unstable: function() {
|
70
|
+
return _MenuGroup.renderMenuGroup_unstable;
|
86
71
|
},
|
87
|
-
|
88
|
-
return
|
72
|
+
useMenuGroupContextValues_unstable: function() {
|
73
|
+
return _MenuGroup.useMenuGroupContextValues_unstable;
|
89
74
|
},
|
90
|
-
|
91
|
-
return
|
75
|
+
useMenuGroupStyles_unstable: function() {
|
76
|
+
return _MenuGroup.useMenuGroupStyles_unstable;
|
92
77
|
},
|
93
|
-
|
94
|
-
return
|
78
|
+
useMenuGroup_unstable: function() {
|
79
|
+
return _MenuGroup.useMenuGroup_unstable;
|
95
80
|
},
|
96
|
-
|
97
|
-
return
|
81
|
+
MenuGroupHeader: function() {
|
82
|
+
return _MenuGroupHeader.MenuGroupHeader;
|
83
|
+
},
|
84
|
+
menuGroupHeaderClassNames: function() {
|
85
|
+
return _MenuGroupHeader.menuGroupHeaderClassNames;
|
98
86
|
},
|
99
87
|
renderMenuGroupHeader_unstable: function() {
|
100
88
|
return _MenuGroupHeader.renderMenuGroupHeader_unstable;
|
101
89
|
},
|
102
|
-
|
103
|
-
return
|
90
|
+
useMenuGroupHeaderStyles_unstable: function() {
|
91
|
+
return _MenuGroupHeader.useMenuGroupHeaderStyles_unstable;
|
104
92
|
},
|
105
|
-
|
106
|
-
return
|
93
|
+
useMenuGroupHeader_unstable: function() {
|
94
|
+
return _MenuGroupHeader.useMenuGroupHeader_unstable;
|
107
95
|
},
|
108
|
-
|
109
|
-
return
|
96
|
+
MenuItem: function() {
|
97
|
+
return _MenuItem.MenuItem;
|
110
98
|
},
|
111
|
-
|
112
|
-
return
|
99
|
+
menuItemClassNames: function() {
|
100
|
+
return _MenuItem.menuItemClassNames;
|
113
101
|
},
|
114
102
|
renderMenuItem_unstable: function() {
|
115
103
|
return _MenuItem.renderMenuItem_unstable;
|
116
104
|
},
|
117
|
-
|
118
|
-
return
|
119
|
-
},
|
120
|
-
renderMenuPopover_unstable: function() {
|
121
|
-
return _MenuPopover.renderMenuPopover_unstable;
|
122
|
-
},
|
123
|
-
renderMenuSplitGroup_unstable: function() {
|
124
|
-
return _MenuSplitGroup.renderMenuSplitGroup_unstable;
|
125
|
-
},
|
126
|
-
renderMenuTrigger_unstable: function() {
|
127
|
-
return _MenuTrigger.renderMenuTrigger_unstable;
|
128
|
-
},
|
129
|
-
renderMenu_unstable: function() {
|
130
|
-
return _Menu.renderMenu_unstable;
|
131
|
-
},
|
132
|
-
useCheckmarkStyles_unstable: function() {
|
133
|
-
return _index.useCheckmarkStyles_unstable;
|
134
|
-
},
|
135
|
-
useMenuContextValues_unstable: function() {
|
136
|
-
return _Menu.useMenuContextValues_unstable;
|
137
|
-
},
|
138
|
-
useMenuContext_unstable: function() {
|
139
|
-
return _menuContext.useMenuContext_unstable;
|
140
|
-
},
|
141
|
-
useMenuDividerStyles_unstable: function() {
|
142
|
-
return _MenuDivider.useMenuDividerStyles_unstable;
|
143
|
-
},
|
144
|
-
useMenuDivider_unstable: function() {
|
145
|
-
return _MenuDivider.useMenuDivider_unstable;
|
146
|
-
},
|
147
|
-
useMenuGroupContextValues_unstable: function() {
|
148
|
-
return _MenuGroup.useMenuGroupContextValues_unstable;
|
149
|
-
},
|
150
|
-
useMenuGroupContext_unstable: function() {
|
151
|
-
return _menuGroupContext.useMenuGroupContext_unstable;
|
105
|
+
useMenuItemStyles_unstable: function() {
|
106
|
+
return _MenuItem.useMenuItemStyles_unstable;
|
152
107
|
},
|
153
|
-
|
154
|
-
return
|
108
|
+
useMenuItem_unstable: function() {
|
109
|
+
return _MenuItem.useMenuItem_unstable;
|
155
110
|
},
|
156
|
-
|
157
|
-
return
|
111
|
+
MenuItemCheckbox: function() {
|
112
|
+
return _MenuItemCheckbox.MenuItemCheckbox;
|
158
113
|
},
|
159
|
-
|
160
|
-
return
|
114
|
+
menuItemCheckboxClassNames: function() {
|
115
|
+
return _MenuItemCheckbox.menuItemCheckboxClassNames;
|
161
116
|
},
|
162
|
-
|
163
|
-
return
|
117
|
+
renderMenuItemCheckbox_unstable: function() {
|
118
|
+
return _MenuItemCheckbox.renderMenuItemCheckbox_unstable;
|
164
119
|
},
|
165
120
|
useMenuItemCheckboxStyles_unstable: function() {
|
166
121
|
return _MenuItemCheckbox.useMenuItemCheckboxStyles_unstable;
|
@@ -168,11 +123,14 @@ _export(exports, {
|
|
168
123
|
useMenuItemCheckbox_unstable: function() {
|
169
124
|
return _MenuItemCheckbox.useMenuItemCheckbox_unstable;
|
170
125
|
},
|
171
|
-
|
172
|
-
return
|
126
|
+
MenuItemRadio: function() {
|
127
|
+
return _MenuItemRadio.MenuItemRadio;
|
173
128
|
},
|
174
|
-
|
175
|
-
return
|
129
|
+
menuItemRadioClassNames: function() {
|
130
|
+
return _MenuItemRadio.menuItemRadioClassNames;
|
131
|
+
},
|
132
|
+
renderMenuItemRadio_unstable: function() {
|
133
|
+
return _MenuItemRadio.renderMenuItemRadio_unstable;
|
176
134
|
},
|
177
135
|
useMenuItemRadioStyles_unstable: function() {
|
178
136
|
return _MenuItemRadio.useMenuItemRadioStyles_unstable;
|
@@ -180,44 +138,86 @@ _export(exports, {
|
|
180
138
|
useMenuItemRadio_unstable: function() {
|
181
139
|
return _MenuItemRadio.useMenuItemRadio_unstable;
|
182
140
|
},
|
183
|
-
|
184
|
-
return
|
141
|
+
MenuList: function() {
|
142
|
+
return _MenuList.MenuList;
|
185
143
|
},
|
186
|
-
|
187
|
-
return
|
144
|
+
menuListClassNames: function() {
|
145
|
+
return _MenuList.menuListClassNames;
|
146
|
+
},
|
147
|
+
renderMenuList_unstable: function() {
|
148
|
+
return _MenuList.renderMenuList_unstable;
|
188
149
|
},
|
189
150
|
useMenuListContextValues_unstable: function() {
|
190
151
|
return _MenuList.useMenuListContextValues_unstable;
|
191
152
|
},
|
192
|
-
useMenuListContext_unstable: function() {
|
193
|
-
return _menuListContext.useMenuListContext_unstable;
|
194
|
-
},
|
195
153
|
useMenuListStyles_unstable: function() {
|
196
154
|
return _MenuList.useMenuListStyles_unstable;
|
197
155
|
},
|
198
156
|
useMenuList_unstable: function() {
|
199
157
|
return _MenuList.useMenuList_unstable;
|
200
158
|
},
|
159
|
+
MenuPopover: function() {
|
160
|
+
return _MenuPopover.MenuPopover;
|
161
|
+
},
|
162
|
+
menuPopoverClassNames: function() {
|
163
|
+
return _MenuPopover.menuPopoverClassNames;
|
164
|
+
},
|
165
|
+
renderMenuPopover_unstable: function() {
|
166
|
+
return _MenuPopover.renderMenuPopover_unstable;
|
167
|
+
},
|
201
168
|
useMenuPopoverStyles_unstable: function() {
|
202
169
|
return _MenuPopover.useMenuPopoverStyles_unstable;
|
203
170
|
},
|
204
171
|
useMenuPopover_unstable: function() {
|
205
172
|
return _MenuPopover.useMenuPopover_unstable;
|
206
173
|
},
|
174
|
+
MenuSplitGroup: function() {
|
175
|
+
return _MenuSplitGroup.MenuSplitGroup;
|
176
|
+
},
|
177
|
+
menuSplitGroupClassNames: function() {
|
178
|
+
return _MenuSplitGroup.menuSplitGroupClassNames;
|
179
|
+
},
|
180
|
+
renderMenuSplitGroup_unstable: function() {
|
181
|
+
return _MenuSplitGroup.renderMenuSplitGroup_unstable;
|
182
|
+
},
|
207
183
|
useMenuSplitGroupStyles_unstable: function() {
|
208
184
|
return _MenuSplitGroup.useMenuSplitGroupStyles_unstable;
|
209
185
|
},
|
210
186
|
useMenuSplitGroup_unstable: function() {
|
211
187
|
return _MenuSplitGroup.useMenuSplitGroup_unstable;
|
212
188
|
},
|
213
|
-
|
214
|
-
return
|
189
|
+
MenuTrigger: function() {
|
190
|
+
return _MenuTrigger.MenuTrigger;
|
191
|
+
},
|
192
|
+
renderMenuTrigger_unstable: function() {
|
193
|
+
return _MenuTrigger.renderMenuTrigger_unstable;
|
215
194
|
},
|
216
195
|
useMenuTrigger_unstable: function() {
|
217
196
|
return _MenuTrigger.useMenuTrigger_unstable;
|
218
197
|
},
|
219
|
-
|
220
|
-
return
|
198
|
+
useCheckmarkStyles_unstable: function() {
|
199
|
+
return _index.useCheckmarkStyles_unstable;
|
200
|
+
},
|
201
|
+
MenuItemLink: function() {
|
202
|
+
return _MenuItemLink.MenuItemLink;
|
203
|
+
},
|
204
|
+
menuItemLinkClassNames: function() {
|
205
|
+
return _MenuItemLink.menuItemLinkClassNames;
|
206
|
+
},
|
207
|
+
renderMenuItemLink_unstable: function() {
|
208
|
+
return _MenuItemLink.renderMenuItemLink_unstable;
|
209
|
+
},
|
210
|
+
useMenuItemLinkStyles_unstable: function() {
|
211
|
+
return _MenuItemLink.useMenuItemLinkStyles_unstable;
|
212
|
+
},
|
213
|
+
useMenuItemLink_unstable: function() {
|
214
|
+
return _MenuItemLink.useMenuItemLink_unstable;
|
215
|
+
},
|
216
|
+
MENU_ENTER_EVENT: function() {
|
217
|
+
return _utils.MENU_ENTER_EVENT;
|
218
|
+
},
|
219
|
+
dispatchMenuEnterEvent: function() {
|
220
|
+
return _utils.dispatchMenuEnterEvent;
|
221
221
|
},
|
222
222
|
useOnMenuMouseEnter: function() {
|
223
223
|
return _utils.useOnMenuMouseEnter;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { MenuProvider, useMenuContext_unstable } from './contexts/menuContext';\nexport { MenuTriggerContextProvider, useMenuTriggerContext_unstable } from './contexts/menuTriggerContext';\nexport { MenuGroupContextProvider, useMenuGroupContext_unstable } from './contexts/menuGroupContext';\nexport { MenuListProvider, useMenuListContext_unstable } from './contexts/menuListContext';\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './Menu';\nexport { MenuDivider, menuDividerClassNames, renderMenuDivider_unstable, useMenuDividerStyles_unstable, useMenuDivider_unstable } from './MenuDivider';\nexport { MenuGroup, menuGroupClassNames, renderMenuGroup_unstable, useMenuGroupContextValues_unstable, useMenuGroupStyles_unstable, useMenuGroup_unstable } from './MenuGroup';\nexport { MenuGroupHeader, menuGroupHeaderClassNames, renderMenuGroupHeader_unstable, useMenuGroupHeaderStyles_unstable, useMenuGroupHeader_unstable } from './MenuGroupHeader';\nexport { MenuItem, menuItemClassNames, renderMenuItem_unstable, useMenuItemStyles_unstable, useMenuItem_unstable } from './MenuItem';\nexport { MenuItemCheckbox, menuItemCheckboxClassNames, renderMenuItemCheckbox_unstable, useMenuItemCheckboxStyles_unstable, useMenuItemCheckbox_unstable } from './MenuItemCheckbox';\nexport { MenuItemRadio, menuItemRadioClassNames, renderMenuItemRadio_unstable, useMenuItemRadioStyles_unstable, useMenuItemRadio_unstable } from './MenuItemRadio';\nexport { MenuList, menuListClassNames, renderMenuList_unstable, useMenuListContextValues_unstable, useMenuListStyles_unstable, useMenuList_unstable } from './MenuList';\nexport { MenuPopover, menuPopoverClassNames, renderMenuPopover_unstable, useMenuPopoverStyles_unstable, useMenuPopover_unstable } from './MenuPopover';\nexport { MenuSplitGroup, menuSplitGroupClassNames, renderMenuSplitGroup_unstable, useMenuSplitGroupStyles_unstable, useMenuSplitGroup_unstable } from './MenuSplitGroup';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';\nexport { useCheckmarkStyles_unstable } from './selectable/index';\nexport { MenuItemLink, menuItemLinkClassNames, renderMenuItemLink_unstable, useMenuItemLinkStyles_unstable, useMenuItemLink_unstable } from './MenuItemLink';\nexport { MENU_ENTER_EVENT, dispatchMenuEnterEvent, useOnMenuMouseEnter } from './utils';\n"],"names":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { MenuProvider, useMenuContext_unstable } from './contexts/menuContext';\nexport { MenuTriggerContextProvider, useMenuTriggerContext_unstable } from './contexts/menuTriggerContext';\nexport { MenuGroupContextProvider, useMenuGroupContext_unstable } from './contexts/menuGroupContext';\nexport { MenuListProvider, useMenuListContext_unstable } from './contexts/menuListContext';\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './Menu';\nexport { MenuDivider, menuDividerClassNames, renderMenuDivider_unstable, useMenuDividerStyles_unstable, useMenuDivider_unstable } from './MenuDivider';\nexport { MenuGroup, menuGroupClassNames, renderMenuGroup_unstable, useMenuGroupContextValues_unstable, useMenuGroupStyles_unstable, useMenuGroup_unstable } from './MenuGroup';\nexport { MenuGroupHeader, menuGroupHeaderClassNames, renderMenuGroupHeader_unstable, useMenuGroupHeaderStyles_unstable, useMenuGroupHeader_unstable } from './MenuGroupHeader';\nexport { MenuItem, menuItemClassNames, renderMenuItem_unstable, useMenuItemStyles_unstable, useMenuItem_unstable } from './MenuItem';\nexport { MenuItemCheckbox, menuItemCheckboxClassNames, renderMenuItemCheckbox_unstable, useMenuItemCheckboxStyles_unstable, useMenuItemCheckbox_unstable } from './MenuItemCheckbox';\nexport { MenuItemRadio, menuItemRadioClassNames, renderMenuItemRadio_unstable, useMenuItemRadioStyles_unstable, useMenuItemRadio_unstable } from './MenuItemRadio';\nexport { MenuList, menuListClassNames, renderMenuList_unstable, useMenuListContextValues_unstable, useMenuListStyles_unstable, useMenuList_unstable } from './MenuList';\nexport { MenuPopover, menuPopoverClassNames, renderMenuPopover_unstable, useMenuPopoverStyles_unstable, useMenuPopover_unstable } from './MenuPopover';\nexport { MenuSplitGroup, menuSplitGroupClassNames, renderMenuSplitGroup_unstable, useMenuSplitGroupStyles_unstable, useMenuSplitGroup_unstable } from './MenuSplitGroup';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';\nexport { useCheckmarkStyles_unstable } from './selectable/index';\nexport { MenuItemLink, menuItemLinkClassNames, renderMenuItemLink_unstable, useMenuItemLinkStyles_unstable, useMenuItemLink_unstable } from './MenuItemLink';\nexport { MENU_ENTER_EVENT, dispatchMenuEnterEvent, useOnMenuMouseEnter } from './utils';\n"],"names":["MenuProvider","useMenuContext_unstable","MenuTriggerContextProvider","useMenuTriggerContext_unstable","MenuGroupContextProvider","useMenuGroupContext_unstable","MenuListProvider","useMenuListContext_unstable","Menu","renderMenu_unstable","useMenuContextValues_unstable","useMenu_unstable","MenuDivider","menuDividerClassNames","renderMenuDivider_unstable","useMenuDividerStyles_unstable","useMenuDivider_unstable","MenuGroup","menuGroupClassNames","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useMenuGroup_unstable","MenuGroupHeader","menuGroupHeaderClassNames","renderMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","useMenuGroupHeader_unstable","MenuItem","menuItemClassNames","renderMenuItem_unstable","useMenuItemStyles_unstable","useMenuItem_unstable","MenuItemCheckbox","menuItemCheckboxClassNames","renderMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useMenuItemCheckbox_unstable","MenuItemRadio","menuItemRadioClassNames","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable","MenuList","menuListClassNames","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useMenuList_unstable","MenuPopover","menuPopoverClassNames","renderMenuPopover_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable","MenuSplitGroup","menuSplitGroupClassNames","renderMenuSplitGroup_unstable","useMenuSplitGroupStyles_unstable","useMenuSplitGroup_unstable","MenuTrigger","renderMenuTrigger_unstable","useMenuTrigger_unstable","useCheckmarkStyles_unstable","MenuItemLink","menuItemLinkClassNames","renderMenuItemLink_unstable","useMenuItemLinkStyles_unstable","useMenuItemLink_unstable","MENU_ENTER_EVENT","dispatchMenuEnterEvent","useOnMenuMouseEnter"],"mappings":"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"}
|
@@ -12,11 +12,11 @@ _export(exports, {
|
|
12
12
|
MENU_ENTER_EVENT: function() {
|
13
13
|
return MENU_ENTER_EVENT;
|
14
14
|
},
|
15
|
-
dispatchMenuEnterEvent: function() {
|
16
|
-
return dispatchMenuEnterEvent;
|
17
|
-
},
|
18
15
|
useOnMenuMouseEnter: function() {
|
19
16
|
return useOnMenuMouseEnter;
|
17
|
+
},
|
18
|
+
dispatchMenuEnterEvent: function() {
|
19
|
+
return dispatchMenuEnterEvent;
|
20
20
|
}
|
21
21
|
});
|
22
22
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useOnMenuEnter.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, elementContains } from '@fluentui/react-utilities';\n/**\n * Name of the custom event\n */ export const MENU_ENTER_EVENT = 'fuimenuenter';\n/**\n * This hook works similarly to @see useOnClickOutside\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */ export const useOnMenuMouseEnter = (options)=>{\n const { refs, callback, element, disabled } = options;\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev)=>{\n const popoverRef = refs[0];\n const someMenuPopover = ev.target;\n var _popoverRef_current;\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(()=>{\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener);\n }\n return ()=>{\n element.removeEventListener(MENU_ENTER_EVENT, listener);\n };\n }, [\n listener,\n element,\n disabled\n ]);\n};\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el - element for the event target\n * @param nativeEvent - the native mouse event this is mapped to\n */ export const dispatchMenuEnterEvent = (el, nativeEvent)=>{\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {\n bubbles: true,\n detail: {\n nativeEvent\n }\n }));\n};\n"],"names":["MENU_ENTER_EVENT","
|
1
|
+
{"version":3,"sources":["useOnMenuEnter.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, elementContains } from '@fluentui/react-utilities';\n/**\n * Name of the custom event\n */ export const MENU_ENTER_EVENT = 'fuimenuenter';\n/**\n * This hook works similarly to @see useOnClickOutside\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */ export const useOnMenuMouseEnter = (options)=>{\n const { refs, callback, element, disabled } = options;\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev)=>{\n const popoverRef = refs[0];\n const someMenuPopover = ev.target;\n var _popoverRef_current;\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(()=>{\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener);\n }\n return ()=>{\n element.removeEventListener(MENU_ENTER_EVENT, listener);\n };\n }, [\n listener,\n element,\n disabled\n ]);\n};\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el - element for the event target\n * @param nativeEvent - the native mouse event this is mapped to\n */ export const dispatchMenuEnterEvent = (el, nativeEvent)=>{\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {\n bubbles: true,\n detail: {\n nativeEvent\n }\n }));\n};\n"],"names":["MENU_ENTER_EVENT","useOnMenuMouseEnter","dispatchMenuEnterEvent","options","refs","callback","element","disabled","listener","useEventCallback","ev","popoverRef","someMenuPopover","target","_popoverRef_current","isOutsidePopover","elementContains","current","React","useEffect","addEventListener","removeEventListener","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"mappings":";;;;;;;;;;;IAIiBA,gBAAgB;eAAhBA;;IAWAC,mBAAmB;eAAnBA;;IAoCAC,sBAAsB;eAAtBA;;;;iEAnDM;gCAC2B;AAGvC,MAAMF,mBAAmB;AAWzB,MAAMC,sBAAsB,CAACE;IACpC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;IAC9C,gFAAgF;IAChF,MAAMK,WAAWC,IAAAA,gCAAgB,EAAC,CAACC;QAC/B,MAAMC,aAAaP,IAAI,CAAC,EAAE;QAC1B,MAAMQ,kBAAkBF,GAAGG,MAAM;QACjC,IAAIC;QACJ,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,MAAMC,mBAAmB,CAACC,IAAAA,+BAAe,EAAC,AAACF,CAAAA,sBAAsBH,WAAWM,OAAO,AAAD,MAAO,QAAQH,wBAAwB,KAAK,IAAIA,sBAAsB,MAAMF;QAC9J,IAAIG,oBAAoB,CAACR,UAAU;YAC/BF,SAASK;QACb;IACJ;IACAQ,OAAMC,SAAS,CAAC;QACZ,kCAAkC;QAClC,IAAIb,WAAW,MAAM;YACjB;QACJ;QACA,IAAI,CAACC,UAAU;YACXD,QAAQc,gBAAgB,CAACpB,kBAAkBQ;QAC/C;QACA,OAAO;YACHF,QAAQe,mBAAmB,CAACrB,kBAAkBQ;QAClD;IACJ,GAAG;QACCA;QACAF;QACAC;KACH;AACL;AAKW,MAAML,yBAAyB,CAACoB,IAAIC;IAC3CD,GAAGE,aAAa,CAAC,IAAIC,YAAYzB,kBAAkB;QAC/C0B,SAAS;QACTC,QAAQ;YACJJ;QACJ;IACJ;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.13.
|
3
|
+
"version": "9.13.4",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -37,16 +37,16 @@
|
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"@fluentui/keyboard-keys": "^9.0.7",
|
40
|
-
"@fluentui/react-aria": "^9.10.
|
41
|
-
"@fluentui/react-context-selector": "^9.1.
|
40
|
+
"@fluentui/react-aria": "^9.10.2",
|
41
|
+
"@fluentui/react-context-selector": "^9.1.56",
|
42
42
|
"@fluentui/react-icons": "^2.0.224",
|
43
|
-
"@fluentui/react-portal": "^9.4.
|
44
|
-
"@fluentui/react-positioning": "^9.14.
|
45
|
-
"@fluentui/react-shared-contexts": "^9.15.
|
46
|
-
"@fluentui/react-tabster": "^9.19.
|
47
|
-
"@fluentui/react-theme": "^9.1.
|
48
|
-
"@fluentui/react-utilities": "^9.18.
|
49
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
43
|
+
"@fluentui/react-portal": "^9.4.18",
|
44
|
+
"@fluentui/react-positioning": "^9.14.2",
|
45
|
+
"@fluentui/react-shared-contexts": "^9.15.2",
|
46
|
+
"@fluentui/react-tabster": "^9.19.5",
|
47
|
+
"@fluentui/react-theme": "^9.1.19",
|
48
|
+
"@fluentui/react-utilities": "^9.18.5",
|
49
|
+
"@fluentui/react-jsx-runtime": "^9.0.34",
|
50
50
|
"@griffel/react": "^1.5.14",
|
51
51
|
"@swc/helpers": "^0.5.1"
|
52
52
|
},
|