@fluentui/react-menu 9.3.1 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,101 @@
2
2
  "name": "@fluentui/react-menu",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 20 Oct 2022 08:35:13 GMT",
5
+ "date": "Wed, 02 Nov 2022 11:54:55 GMT",
6
+ "tag": "@fluentui/react-menu_v9.4.0",
7
+ "version": "9.4.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-menu",
13
+ "commit": "c619ba066f11a8654e95375314824ba6b81b003e",
14
+ "comment": "chore: Update Griffel to latest version"
15
+ }
16
+ ],
17
+ "none": [
18
+ {
19
+ "author": "bernardo.sunderhus@gmail.com",
20
+ "package": "@fluentui/react-menu",
21
+ "commit": "f3bef94c75214f94749e760a4ab270e3b5a9b8d4",
22
+ "comment": "chore: adds disableButtonEnhancement on triggers"
23
+ }
24
+ ],
25
+ "minor": [
26
+ {
27
+ "author": "bernardo.sunderhus@gmail.com",
28
+ "package": "@fluentui/react-menu",
29
+ "commit": "1700a730052f17fa38992292a1dff9ece73e528e",
30
+ "comment": "removes exposing of internal type FluentTriggerComponent"
31
+ },
32
+ {
33
+ "author": "beachball",
34
+ "package": "@fluentui/react-menu",
35
+ "comment": "Bump @fluentui/react-aria to v9.3.0",
36
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
37
+ },
38
+ {
39
+ "author": "beachball",
40
+ "package": "@fluentui/react-menu",
41
+ "comment": "Bump @fluentui/react-context-selector to v9.1.0",
42
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
43
+ },
44
+ {
45
+ "author": "beachball",
46
+ "package": "@fluentui/react-menu",
47
+ "comment": "Bump @fluentui/react-portal to v9.0.9",
48
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
49
+ },
50
+ {
51
+ "author": "beachball",
52
+ "package": "@fluentui/react-menu",
53
+ "comment": "Bump @fluentui/react-positioning to v9.3.0",
54
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
55
+ },
56
+ {
57
+ "author": "beachball",
58
+ "package": "@fluentui/react-menu",
59
+ "comment": "Bump @fluentui/react-shared-contexts to v9.1.0",
60
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
61
+ },
62
+ {
63
+ "author": "beachball",
64
+ "package": "@fluentui/react-menu",
65
+ "comment": "Bump @fluentui/react-tabster to v9.2.1",
66
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
67
+ },
68
+ {
69
+ "author": "beachball",
70
+ "package": "@fluentui/react-menu",
71
+ "comment": "Bump @fluentui/react-utilities to v9.2.0",
72
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
73
+ },
74
+ {
75
+ "author": "beachball",
76
+ "package": "@fluentui/react-menu",
77
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.17",
78
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ {
84
+ "date": "Tue, 25 Oct 2022 00:35:33 GMT",
85
+ "tag": "@fluentui/react-menu_v9.3.1",
86
+ "version": "9.3.1",
87
+ "comments": {
88
+ "none": [
89
+ {
90
+ "author": "miroslav.stastny@microsoft.com",
91
+ "package": "@fluentui/react-menu",
92
+ "commit": "6ced976a8d0e6a0e2e207da8fe0eb810e2bd19bc",
93
+ "comment": "Update package readme"
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ "date": "Thu, 20 Oct 2022 08:39:37 GMT",
6
100
  "tag": "@fluentui/react-menu_v9.3.1",
7
101
  "version": "9.3.1",
8
102
  "comments": {
@@ -35,55 +129,55 @@
35
129
  "author": "beachball",
36
130
  "package": "@fluentui/react-menu",
37
131
  "comment": "Bump @fluentui/react-aria to v9.2.3",
38
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
132
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
39
133
  },
40
134
  {
41
135
  "author": "beachball",
42
136
  "package": "@fluentui/react-menu",
43
137
  "comment": "Bump @fluentui/react-context-selector to v9.0.5",
44
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
138
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
45
139
  },
46
140
  {
47
141
  "author": "beachball",
48
142
  "package": "@fluentui/react-menu",
49
143
  "comment": "Bump @fluentui/react-portal to v9.0.8",
50
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
144
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
51
145
  },
52
146
  {
53
147
  "author": "beachball",
54
148
  "package": "@fluentui/react-menu",
55
149
  "comment": "Bump @fluentui/react-positioning to v9.2.2",
56
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
150
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
57
151
  },
58
152
  {
59
153
  "author": "beachball",
60
154
  "package": "@fluentui/react-menu",
61
155
  "comment": "Bump @fluentui/react-shared-contexts to v9.0.2",
62
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
156
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
63
157
  },
64
158
  {
65
159
  "author": "beachball",
66
160
  "package": "@fluentui/react-menu",
67
161
  "comment": "Bump @fluentui/react-tabster to v9.2.0",
68
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
162
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
69
163
  },
70
164
  {
71
165
  "author": "beachball",
72
166
  "package": "@fluentui/react-menu",
73
167
  "comment": "Bump @fluentui/react-theme to v9.1.1",
74
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
168
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
75
169
  },
76
170
  {
77
171
  "author": "beachball",
78
172
  "package": "@fluentui/react-menu",
79
173
  "comment": "Bump @fluentui/react-utilities to v9.1.2",
80
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
174
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
81
175
  },
82
176
  {
83
177
  "author": "beachball",
84
178
  "package": "@fluentui/react-menu",
85
179
  "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.16",
86
- "commit": "be27026d83b8a019bcb945d0f42635ae76c00385"
180
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
87
181
  }
88
182
  ]
89
183
  }
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @fluentui/react-menu
2
2
 
3
- This log was last generated on Thu, 20 Oct 2022 08:35:13 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 02 Nov 2022 11:54:55 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.4.0)
8
+
9
+ Wed, 02 Nov 2022 11:54:55 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.3.1..@fluentui/react-menu_v9.4.0)
11
+
12
+ ### Minor changes
13
+
14
+ - removes exposing of internal type FluentTriggerComponent ([PR #25410](https://github.com/microsoft/fluentui/pull/25410) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-aria to v9.3.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.1.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
17
+ - Bump @fluentui/react-portal to v9.0.9 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
18
+ - Bump @fluentui/react-positioning to v9.3.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
19
+ - Bump @fluentui/react-shared-contexts to v9.1.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
20
+ - Bump @fluentui/react-tabster to v9.2.1 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
21
+ - Bump @fluentui/react-utilities to v9.2.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
22
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.17 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
23
+
24
+ ### Patches
25
+
26
+ - chore: Update Griffel to latest version ([PR #25412](https://github.com/microsoft/fluentui/pull/25412) by olfedias@microsoft.com)
27
+
7
28
  ## [9.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.3.1)
8
29
 
9
- Thu, 20 Oct 2022 08:35:13 GMT
30
+ Thu, 20 Oct 2022 08:39:37 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.3.0..@fluentui/react-menu_v9.3.1)
11
32
 
12
33
  ### Patches
@@ -15,15 +36,15 @@ Thu, 20 Oct 2022 08:35:13 GMT
15
36
  - chore: Bump peer deps to support React 18 ([PR #24972](https://github.com/microsoft/fluentui/pull/24972) by mgodbolt@microsoft.com)
16
37
  - chore: Migrate to new package structure ([PR #25015](https://github.com/microsoft/fluentui/pull/25015) by tristan.watanabe@gmail.com)
17
38
  - chore: Update Griffel to latest version ([PR #25212](https://github.com/microsoft/fluentui/pull/25212) by olfedias@microsoft.com)
18
- - Bump @fluentui/react-aria to v9.2.3 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
19
- - Bump @fluentui/react-context-selector to v9.0.5 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
20
- - Bump @fluentui/react-portal to v9.0.8 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
21
- - Bump @fluentui/react-positioning to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
22
- - Bump @fluentui/react-shared-contexts to v9.0.2 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
23
- - Bump @fluentui/react-tabster to v9.2.0 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
24
- - Bump @fluentui/react-theme to v9.1.1 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
25
- - Bump @fluentui/react-utilities to v9.1.2 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
26
- - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.16 ([commit](https://github.com/microsoft/fluentui/commit/be27026d83b8a019bcb945d0f42635ae76c00385) by beachball)
39
+ - Bump @fluentui/react-aria to v9.2.3 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
40
+ - Bump @fluentui/react-context-selector to v9.0.5 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
41
+ - Bump @fluentui/react-portal to v9.0.8 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
42
+ - Bump @fluentui/react-positioning to v9.2.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
43
+ - Bump @fluentui/react-shared-contexts to v9.0.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
44
+ - Bump @fluentui/react-tabster to v9.2.0 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
45
+ - Bump @fluentui/react-theme to v9.1.1 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
46
+ - Bump @fluentui/react-utilities to v9.1.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
47
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.16 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
27
48
 
28
49
  ## [9.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.3.0)
29
50
 
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
1
  # @fluentui/react-menu
2
2
 
3
- **React Menu components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
4
-
5
- These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
3
+ **React Menu components for [Fluent UI React](https://react.fluentui.dev)**
package/dist/index.d.ts CHANGED
@@ -7,14 +7,14 @@ import { ARIAButtonType } from '@fluentui/react-aria';
7
7
  import type { ComponentProps } from '@fluentui/react-utilities';
8
8
  import type { ComponentState } from '@fluentui/react-utilities';
9
9
  import type { ContextSelector } from '@fluentui/react-context-selector';
10
- import type { FluentTriggerComponent } from '@fluentui/react-utilities';
11
10
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
12
11
  import type { PositioningShorthand } from '@fluentui/react-positioning';
12
+ import { PositioningVirtualElement } from '@fluentui/react-positioning';
13
13
  import * as React_2 from 'react';
14
+ import { SetVirtualMouseTarget } from '@fluentui/react-positioning';
14
15
  import type { Slot } from '@fluentui/react-utilities';
15
16
  import type { SlotClassNames } from '@fluentui/react-utilities';
16
17
  import type { TriggerProps } from '@fluentui/react-utilities';
17
- import { usePositioningMouseTarget } from '@fluentui/react-positioning';
18
18
 
19
19
  /**
20
20
  * Wrapper component that manages state for a popup MenuList and a MenuTrigger
@@ -420,7 +420,7 @@ export declare type MenuState = ComponentState<MenuSlots> & Pick<MenuProps, 'onO
420
420
  /**
421
421
  * Anchors the popper to the mouse click for context events
422
422
  */
423
- contextTarget: ReturnType<typeof usePositioningMouseTarget>[0];
423
+ contextTarget?: PositioningVirtualElement;
424
424
  /**
425
425
  * Whether this menu is a submenu
426
426
  */
@@ -440,7 +440,7 @@ export declare type MenuState = ComponentState<MenuSlots> & Pick<MenuProps, 'onO
440
440
  /**
441
441
  * A callback to set the target of the popper to the mouse click for context events
442
442
  */
443
- setContextTarget: ReturnType<typeof usePositioningMouseTarget>[1];
443
+ setContextTarget: SetVirtualMouseTarget;
444
444
  /**
445
445
  * Callback to open/close the popup
446
446
  */
@@ -459,7 +459,7 @@ export declare type MenuState = ComponentState<MenuSlots> & Pick<MenuProps, 'onO
459
459
  * Wraps a trigger element as an only child
460
460
  * and adds the necessary event handling to open a popup menu
461
461
  */
462
- export declare const MenuTrigger: React_2.FC<MenuTriggerProps> & FluentTriggerComponent;
462
+ export declare const MenuTrigger: React_2.FC<MenuTriggerProps>;
463
463
 
464
464
  /**
465
465
  * Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { usePositioningMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<MenuSlots> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n\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 * @default false\n */\n inline?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Opens the menu on hover\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n *\n * @default false\n */\n persistOnItemClick?: boolean;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n };\n\nexport type MenuState = ComponentState<MenuSlots> &\n Pick<MenuProps, 'onOpenChange' | 'defaultCheckedValues'> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n | 'open'\n | 'openOnHover'\n | 'closeOnScroll'\n | 'hoverDelay'\n | 'openOnContext'\n | 'persistOnItemClick'\n >\n > & {\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: ReturnType<typeof usePositioningMouseTarget>[0];\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: ReturnType<typeof usePositioningMouseTarget>[1];\n\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type MenuOpenChangeData = {\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n /**\n * Indicates whether the change of state was a keyboard interaction\n * @deprecated\n * This should not be used, since `Enter`, `Space` and click should be interpreted as the same thing as a click\n */\n keyboard?: boolean;\n open: boolean;\n};\n\nexport type MenuContextValues = {\n menu: MenuContextValue;\n};\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"]}
1
+ {"version":3,"file":"Menu.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { PositioningVirtualElement, SetVirtualMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<MenuSlots> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n\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 * @default false\n */\n inline?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Opens the menu on hover\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n *\n * @default false\n */\n persistOnItemClick?: boolean;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n };\n\nexport type MenuState = ComponentState<MenuSlots> &\n Pick<MenuProps, 'onOpenChange' | 'defaultCheckedValues'> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n | 'open'\n | 'openOnHover'\n | 'closeOnScroll'\n | 'hoverDelay'\n | 'openOnContext'\n | 'persistOnItemClick'\n >\n > & {\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget?: PositioningVirtualElement;\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type MenuOpenChangeData = {\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n /**\n * Indicates whether the change of state was a keyboard interaction\n * @deprecated\n * This should not be used, since `Enter`, `Space` and click should be interpreted as the same thing as a click\n */\n keyboard?: boolean;\n open: boolean;\n};\n\nexport type MenuContextValues = {\n menu: MenuContextValue;\n};\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"]}
@@ -9,6 +9,7 @@ export const MenuTrigger = props => {
9
9
  const state = useMenuTrigger_unstable(props);
10
10
  return renderMenuTrigger_unstable(state);
11
11
  };
12
- MenuTrigger.displayName = 'MenuTrigger';
12
+ MenuTrigger.displayName = 'MenuTrigger'; // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
13
+
13
14
  MenuTrigger.isFluentTriggerComponent = true;
14
15
  //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":"AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;;AAGG;;AACH,OAAO,MAAM,WAAW,GAAwD,KAAK,IAAG;EACtF,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,CAArC;EAEA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CAJM;AAMP,WAAW,CAAC,WAAZ,GAA0B,aAA1B;AACA,WAAW,CAAC,wBAAZ,GAAuC,IAAvC","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\nMenuTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":"AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;;AAGG;;AACH,OAAO,MAAM,WAAW,GAA+B,KAAK,IAAG;EAC7D,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,CAArC;EAEA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CAJM;AAMP,WAAW,CAAC,WAAZ,GAA0B,aAA1B,C,CACA;;AACC,WAAsC,CAAC,wBAAvC,GAAkE,IAAlE","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
@@ -20,6 +20,7 @@ const MenuTrigger = props => {
20
20
  };
21
21
 
22
22
  exports.MenuTrigger = MenuTrigger;
23
- exports.MenuTrigger.displayName = 'MenuTrigger';
23
+ exports.MenuTrigger.displayName = 'MenuTrigger'; // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
24
+
24
25
  exports.MenuTrigger.isFluentTriggerComponent = true;
25
26
  //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAAwD,KAAK,IAAG;EACtF,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;EAEA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B;AACA,OAAA,CAAA,WAAA,CAAY,wBAAZ,GAAuC,IAAvC","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\nMenuTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAA+B,KAAK,IAAG;EAC7D,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;EAEA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B,C,CACA;;AACC,OAAA,CAAA,WAAA,CAAuC,wBAAvC,GAAkE,IAAlE","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "9.3.1",
3
+ "version": "9.4.0",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,21 +29,21 @@
29
29
  "devDependencies": {
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.16",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.17",
33
33
  "@fluentui/scripts": "^1.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-aria": "^9.2.3",
36
+ "@fluentui/react-aria": "^9.3.0",
37
37
  "@fluentui/keyboard-keys": "^9.0.0",
38
- "@fluentui/react-context-selector": "^9.0.5",
38
+ "@fluentui/react-context-selector": "^9.1.0",
39
39
  "@fluentui/react-icons": "^2.0.175",
40
- "@fluentui/react-portal": "^9.0.8",
41
- "@fluentui/react-positioning": "^9.2.2",
42
- "@fluentui/react-shared-contexts": "^9.0.2",
43
- "@fluentui/react-tabster": "^9.2.0",
40
+ "@fluentui/react-portal": "^9.0.9",
41
+ "@fluentui/react-positioning": "^9.3.0",
42
+ "@fluentui/react-shared-contexts": "^9.1.0",
43
+ "@fluentui/react-tabster": "^9.2.1",
44
44
  "@fluentui/react-theme": "^9.1.1",
45
- "@fluentui/react-utilities": "^9.1.2",
46
- "@griffel/react": "^1.4.1",
45
+ "@fluentui/react-utilities": "^9.2.0",
46
+ "@griffel/react": "^1.4.2",
47
47
  "tslib": "^2.1.0"
48
48
  },
49
49
  "peerDependencies": {