@fluentui/react-menu 9.24.0 → 9.25.0

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.
Files changed (264) hide show
  1. package/CHANGELOG.md +45 -2
  2. package/dist/index.d.ts +130 -8
  3. package/lib/Menu.js +1 -1
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuItemLink.js +1 -1
  6. package/lib/MenuItemLink.js.map +1 -1
  7. package/lib/MenuItemRadio.js +1 -1
  8. package/lib/MenuItemRadio.js.map +1 -1
  9. package/lib/MenuList.js +1 -1
  10. package/lib/MenuList.js.map +1 -1
  11. package/lib/MenuPopover.js +1 -1
  12. package/lib/MenuPopover.js.map +1 -1
  13. package/lib/MenuTrigger.js +1 -1
  14. package/lib/MenuTrigger.js.map +1 -1
  15. package/lib/components/Menu/Menu.js +0 -1
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js +3 -1
  18. package/lib/components/Menu/Menu.types.js.map +1 -1
  19. package/lib/components/Menu/index.js +1 -1
  20. package/lib/components/Menu/index.js.map +1 -1
  21. package/lib/components/Menu/useMenu.js +24 -12
  22. package/lib/components/Menu/useMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenuContextValues.js +21 -3
  24. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  25. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  26. package/lib/components/MenuDivider/useMenuDivider.js +0 -1
  27. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  28. package/lib/components/MenuDivider/useMenuDividerStyles.styles.js +1 -0
  29. package/lib/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  30. package/lib/components/MenuDivider/useMenuDividerStyles.styles.raw.js +1 -0
  31. package/lib/components/MenuDivider/useMenuDividerStyles.styles.raw.js.map +1 -1
  32. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/useMenuGroup.js +0 -1
  34. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  35. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  36. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +0 -1
  37. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  38. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +1 -0
  39. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  40. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.js +1 -0
  41. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.js.map +1 -1
  42. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  43. package/lib/components/MenuItem/index.js +2 -1
  44. package/lib/components/MenuItem/index.js.map +1 -1
  45. package/lib/components/MenuItem/useCharacterSearch.js +1 -1
  46. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  47. package/lib/components/MenuItem/useMenuItem.js +1 -145
  48. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  49. package/lib/components/MenuItem/useMenuItemBase.js +147 -0
  50. package/lib/components/MenuItem/useMenuItemBase.js.map +1 -0
  51. package/lib/components/MenuItem/useMenuItemStyles.styles.js +27 -6
  52. package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  53. package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js +28 -1
  54. package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js.map +1 -1
  55. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +1 -3
  56. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  57. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +6 -0
  58. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  59. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.js +6 -0
  60. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.js.map +1 -1
  61. package/lib/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
  62. package/lib/components/MenuItemLink/index.js +1 -1
  63. package/lib/components/MenuItemLink/index.js.map +1 -1
  64. package/lib/components/MenuItemLink/useMenuItemLink.js +30 -1
  65. package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  66. package/lib/components/MenuItemLink/useMenuItemLinkStyles.styles.js +5 -0
  67. package/lib/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
  68. package/lib/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.js +5 -0
  69. package/lib/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.js.map +1 -1
  70. package/lib/components/MenuItemRadio/useMenuItemRadio.js +1 -3
  71. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  72. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +6 -0
  73. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  74. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.js +6 -0
  75. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.js.map +1 -1
  76. package/lib/components/MenuItemSwitch/MenuItemSwitch.types.js.map +1 -1
  77. package/lib/components/MenuItemSwitch/useMenuItemSwitch.js +0 -1
  78. package/lib/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -1
  79. package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js +7 -0
  80. package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js.map +1 -1
  81. package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js +7 -0
  82. package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js.map +1 -1
  83. package/lib/components/MenuList/MenuList.types.js +3 -1
  84. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  85. package/lib/components/MenuList/index.js +1 -1
  86. package/lib/components/MenuList/index.js.map +1 -1
  87. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  88. package/lib/components/MenuList/useMenuList.js +115 -65
  89. package/lib/components/MenuList/useMenuList.js.map +1 -1
  90. package/lib/components/MenuList/useMenuListContextValues.js +11 -3
  91. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  92. package/lib/components/MenuList/useMenuListStyles.styles.js +1 -0
  93. package/lib/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  94. package/lib/components/MenuList/useMenuListStyles.styles.raw.js +1 -0
  95. package/lib/components/MenuList/useMenuListStyles.styles.raw.js.map +1 -1
  96. package/lib/components/MenuPopover/MenuPopover.types.js +3 -1
  97. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  98. package/lib/components/MenuPopover/index.js +1 -1
  99. package/lib/components/MenuPopover/index.js.map +1 -1
  100. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  101. package/lib/components/MenuPopover/useMenuPopover.js +27 -7
  102. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  103. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js +1 -0
  104. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  105. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.raw.js +1 -0
  106. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.raw.js.map +1 -1
  107. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  108. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -1
  109. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  110. package/lib/components/MenuSplitGroup/useMenuSplitGroupContextValues.js.map +1 -1
  111. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +1 -0
  112. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  113. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.js +1 -0
  114. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.js.map +1 -1
  115. package/lib/components/MenuTrigger/MenuTrigger.js +0 -1
  116. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  117. package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
  118. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  119. package/lib/components/MenuTrigger/index.js +1 -1
  120. package/lib/components/MenuTrigger/index.js.map +1 -1
  121. package/lib/components/MenuTrigger/useMenuTrigger.js +39 -12
  122. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  123. package/lib/contexts/menuContext.js +0 -1
  124. package/lib/contexts/menuContext.js.map +1 -1
  125. package/lib/contexts/menuListContext.js +0 -1
  126. package/lib/contexts/menuListContext.js.map +1 -1
  127. package/lib/index.js +9 -14
  128. package/lib/index.js.map +1 -1
  129. package/lib/selectable/types.js +3 -1
  130. package/lib/selectable/types.js.map +1 -1
  131. package/lib/selectable/useCheckmarkStyles.styles.js +1 -0
  132. package/lib/selectable/useCheckmarkStyles.styles.js.map +1 -1
  133. package/lib/selectable/useCheckmarkStyles.styles.raw.js +1 -0
  134. package/lib/selectable/useCheckmarkStyles.styles.raw.js.map +1 -1
  135. package/lib-commonjs/Menu.js +3 -0
  136. package/lib-commonjs/Menu.js.map +1 -1
  137. package/lib-commonjs/MenuItemLink.js +3 -0
  138. package/lib-commonjs/MenuItemLink.js.map +1 -1
  139. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  140. package/lib-commonjs/MenuList.js +3 -0
  141. package/lib-commonjs/MenuList.js.map +1 -1
  142. package/lib-commonjs/MenuPopover.js +3 -0
  143. package/lib-commonjs/MenuPopover.js.map +1 -1
  144. package/lib-commonjs/MenuTrigger.js +3 -0
  145. package/lib-commonjs/MenuTrigger.js.map +1 -1
  146. package/lib-commonjs/components/Menu/Menu.js +0 -2
  147. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  148. package/lib-commonjs/components/Menu/Menu.types.js +3 -3
  149. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  150. package/lib-commonjs/components/Menu/index.js +3 -0
  151. package/lib-commonjs/components/Menu/index.js.map +1 -1
  152. package/lib-commonjs/components/Menu/useMenu.js +30 -15
  153. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  154. package/lib-commonjs/components/Menu/useMenuContextValues.js +22 -3
  155. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  156. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  157. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +0 -2
  158. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  159. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +1 -0
  160. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  161. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.raw.js +1 -0
  162. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.raw.js.map +1 -1
  163. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  164. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +0 -2
  165. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  166. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  167. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +0 -2
  168. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  169. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +1 -0
  170. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  171. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.js +1 -0
  172. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.js.map +1 -1
  173. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  174. package/lib-commonjs/components/MenuItem/index.js +2 -1
  175. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  176. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -2
  177. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  178. package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -152
  179. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  180. package/lib-commonjs/components/MenuItem/useMenuItemBase.js +155 -0
  181. package/lib-commonjs/components/MenuItem/useMenuItemBase.js.map +1 -0
  182. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +51 -16
  183. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  184. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.js +28 -1
  185. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.js.map +1 -1
  186. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -2
  187. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  188. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +6 -0
  189. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  190. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.js +6 -0
  191. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.js.map +1 -1
  192. package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
  193. package/lib-commonjs/components/MenuItemLink/index.js +3 -0
  194. package/lib-commonjs/components/MenuItemLink/index.js.map +1 -1
  195. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js +35 -5
  196. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  197. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js +5 -0
  198. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
  199. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.js +5 -0
  200. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.js.map +1 -1
  201. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +2 -2
  202. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  203. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +6 -0
  204. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  205. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.js +6 -0
  206. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.js.map +1 -1
  207. package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.types.js.map +1 -1
  208. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -1
  209. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js +7 -0
  210. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js.map +1 -1
  211. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js +7 -0
  212. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js.map +1 -1
  213. package/lib-commonjs/components/MenuList/MenuList.types.js +3 -3
  214. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  215. package/lib-commonjs/components/MenuList/index.js +3 -0
  216. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  217. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  218. package/lib-commonjs/components/MenuList/useMenuList.js +108 -67
  219. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  220. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +12 -3
  221. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  222. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +1 -0
  223. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  224. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.raw.js +1 -0
  225. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.raw.js.map +1 -1
  226. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -3
  227. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  228. package/lib-commonjs/components/MenuPopover/index.js +3 -0
  229. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  230. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  231. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +26 -7
  232. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  233. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +1 -0
  234. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  235. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.raw.js +1 -0
  236. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.raw.js.map +1 -1
  237. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  238. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  239. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupContextValues.js.map +1 -1
  240. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +1 -0
  241. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  242. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.js +1 -0
  243. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.js.map +1 -1
  244. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +0 -2
  245. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  246. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +0 -2
  247. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  248. package/lib-commonjs/components/MenuTrigger/index.js +3 -0
  249. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  250. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +32 -14
  251. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  252. package/lib-commonjs/contexts/menuContext.js +0 -2
  253. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  254. package/lib-commonjs/contexts/menuListContext.js +0 -2
  255. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  256. package/lib-commonjs/index.js +27 -5
  257. package/lib-commonjs/index.js.map +1 -1
  258. package/lib-commonjs/selectable/types.js +3 -3
  259. package/lib-commonjs/selectable/types.js.map +1 -1
  260. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js +1 -0
  261. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
  262. package/lib-commonjs/selectable/useCheckmarkStyles.styles.raw.js +1 -0
  263. package/lib-commonjs/selectable/useCheckmarkStyles.styles.raw.js.map +1 -1
  264. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,12 +1,55 @@
1
1
  # Change Log - @fluentui/react-menu
2
2
 
3
- This log was last generated on Wed, 01 Apr 2026 15:50:21 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 26 May 2026 09:33:42 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.25.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.25.0)
8
+
9
+ Tue, 26 May 2026 09:33:42 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.24.1..@fluentui/react-menu_v9.25.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: expose react-menu base hooks ([PR #36087](https://github.com/microsoft/fluentui/pull/36087) by vgenaev@gmail.com)
15
+ - Bump @fluentui/react-aria to v9.17.12 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.2.17 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
17
+ - Bump @fluentui/react-motion to v9.16.0 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
18
+ - Bump @fluentui/react-motion-components-preview to v0.15.5 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
19
+ - Bump @fluentui/react-portal to v9.8.13 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
20
+ - Bump @fluentui/react-positioning to v9.22.2 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
21
+ - Bump @fluentui/react-tabster to v9.26.15 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
22
+ - Bump @fluentui/react-utilities to v9.26.4 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
23
+ - Bump @fluentui/react-jsx-runtime to v9.4.3 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
24
+
25
+ ### Patches
26
+
27
+ - fix(Menu): Menu item with expanded submenu should be highlighted ([PR #36098](https://github.com/microsoft/fluentui/pull/36098) by jukapsia@microsoft.com)
28
+ - fix: update useMenuTriggerBase hook signature ([PR #36237](https://github.com/microsoft/fluentui/pull/36237) by dmytrokirpa@microsoft.com)
29
+ - feat: add headless Menu components ([PR #36110](https://github.com/microsoft/fluentui/pull/36110) by vgenaev@gmail.com)
30
+ - chore: extract useMenuItemBase_unstable into a separate module ([PR #36234](https://github.com/microsoft/fluentui/pull/36234) by viktorgenaev@microsoft.com)
31
+
32
+ ## [9.24.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.24.1)
33
+
34
+ Thu, 23 Apr 2026 14:21:02 GMT
35
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.24.0..@fluentui/react-menu_v9.24.1)
36
+
37
+ ### Patches
38
+
39
+ - perf: memoize context values in use*ContextValues hooks ([PR #36008](https://github.com/microsoft/fluentui/pull/36008) by olfedias@microsoft.com)
40
+ - Bump @fluentui/react-aria to v9.17.11 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
41
+ - Bump @fluentui/react-context-selector to v9.2.16 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
42
+ - Bump @fluentui/react-motion to v9.15.0 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
43
+ - Bump @fluentui/react-motion-components-preview to v0.15.4 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
44
+ - Bump @fluentui/react-portal to v9.8.12 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
45
+ - Bump @fluentui/react-positioning to v9.22.1 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
46
+ - Bump @fluentui/react-tabster to v9.26.14 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
47
+ - Bump @fluentui/react-utilities to v9.26.3 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
48
+ - Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
49
+
7
50
  ## [9.24.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.24.0)
8
51
 
9
- Wed, 01 Apr 2026 15:50:21 GMT
52
+ Wed, 01 Apr 2026 15:52:41 GMT
10
53
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.23.1..@fluentui/react-menu_v9.24.0)
11
54
 
12
55
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ARIAButtonElement } from '@fluentui/react-aria';
2
- import { ARIAButtonResultProps } from '@fluentui/react-aria';
3
- import { ARIAButtonType } from '@fluentui/react-aria';
1
+ import type { ARIAButtonElement } from '@fluentui/react-aria';
2
+ import type { ARIAButtonResultProps } from '@fluentui/react-aria';
3
+ import type { ARIAButtonType } from '@fluentui/react-aria';
4
4
  import type { ComponentProps } from '@fluentui/react-utilities';
5
5
  import type { ComponentState } from '@fluentui/react-utilities';
6
6
  import type { ContextSelector } from '@fluentui/react-context-selector';
@@ -8,10 +8,10 @@ import type { ForwardRefComponent } from '@fluentui/react-utilities';
8
8
  import type { JSXElement } from '@fluentui/react-utilities';
9
9
  import type { PortalProps } from '@fluentui/react-portal';
10
10
  import type { PositioningShorthand } from '@fluentui/react-positioning';
11
- import { PositioningVirtualElement } from '@fluentui/react-positioning';
11
+ import type { PositioningVirtualElement } from '@fluentui/react-positioning';
12
12
  import type { PresenceMotionSlotProps } from '@fluentui/react-motion';
13
13
  import * as React_2 from 'react';
14
- import { SetVirtualMouseTarget } from '@fluentui/react-positioning';
14
+ import type { SetVirtualMouseTarget } from '@fluentui/react-positioning';
15
15
  import type { Slot } from '@fluentui/react-utilities';
16
16
  import { SlotClassNames } from '@fluentui/react-utilities';
17
17
  import type { TriggerProps } from '@fluentui/react-utilities';
@@ -38,6 +38,10 @@ export declare const Menu: React_2.FC<MenuProps>;
38
38
  */
39
39
  export declare const MENU_ENTER_EVENT = "fuimenuenter";
40
40
 
41
+ export declare type MenuBaseProps = Omit<MenuProps, 'surfaceMotion'>;
42
+
43
+ export declare type MenuBaseState = Omit<MenuState, 'surfaceMotion' | 'components'>;
44
+
41
45
  export declare type MenuCheckedValueChangeData = {
42
46
  /** The items for this value that are checked */
43
47
  checkedItems: string[];
@@ -201,6 +205,16 @@ export declare type MenuItemProps = Omit<ComponentProps<Partial<MenuItemSlots>>,
201
205
  */
202
206
  export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
203
207
 
208
+ /**
209
+ * Since MenuItemRadio has no design props, MenuItemRadioBaseProps equals MenuItemRadioProps
210
+ */
211
+ export declare type MenuItemRadioBaseProps = MenuItemRadioProps;
212
+
213
+ /**
214
+ * Since MenuItemRadio has no design props, MenuItemRadioBaseState equals MenuItemRadioState
215
+ */
216
+ export declare type MenuItemRadioBaseState = MenuItemRadioState;
217
+
204
218
  export declare const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
205
219
 
206
220
  export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
@@ -263,7 +277,9 @@ export declare type MenuItemSlots = {
263
277
  subText?: Slot<'span'>;
264
278
  };
265
279
 
266
- export declare type MenuItemState = ComponentState<MenuItemSlots> & Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>>;
280
+ export declare type MenuItemState = ComponentState<MenuItemSlots> & Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>> & {
281
+ submenuOpen: boolean;
282
+ };
267
283
 
268
284
  export declare const MenuItemSwitch: ForwardRefComponent<MenuItemSwitchProps>;
269
285
 
@@ -644,6 +660,15 @@ export declare type MenuState = ComponentState<InternalMenuSlots> & Required<Pic
644
660
  */
645
661
  export declare const MenuTrigger: React_2.FC<MenuTriggerProps>;
646
662
 
663
+ export declare type MenuTriggerBaseProps = MenuTriggerProps & {
664
+ /**
665
+ * Optional callback to focus the first focusable element in the menu popover
666
+ * when an arrow key is pressed on an open submenu trigger.
667
+ * If omitted, the keyboard handler is a no-op.
668
+ */
669
+ focusFirst?: () => void;
670
+ };
671
+
647
672
  /**
648
673
  * Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
649
674
  */
@@ -771,6 +796,18 @@ export declare const useMenu_unstable: (props: MenuProps & {
771
796
  };
772
797
  }) => MenuState;
773
798
 
799
+ /**
800
+ * Base hook for Menu component, produces state required to render the component.
801
+ * It doesn't set any design-related slots specific to Menu such as `surfaceMotion`.
802
+ *
803
+ * @param props - props from this instance of Menu
804
+ */
805
+ export declare const useMenuBase_unstable: (props: MenuBaseProps & {
806
+ safeZone?: boolean | {
807
+ timeout?: number;
808
+ };
809
+ }) => MenuBaseState;
810
+
774
811
  export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
775
812
 
776
813
  export declare function useMenuContextValues_unstable(state: MenuState): MenuContextValues;
@@ -805,9 +842,20 @@ export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => Men
805
842
  */
806
843
  export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemState;
807
844
 
845
+ /**
846
+ * Base hook for MenuItem component, produces state required to render the component.
847
+ * It doesn't set any design-related props specific to MenuItem such as submenu indicator icon.
848
+ */
849
+ export declare const useMenuItemBase_unstable: (props: MenuItemProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemState;
850
+
808
851
  /** Returns the props and state required to render the component */
809
852
  export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemCheckboxState;
810
853
 
854
+ /**
855
+ * Base hook for MenuItemCheckbox component, produces state required to render the component
856
+ */
857
+ export declare const useMenuItemCheckboxBase_unstable: (props: MenuItemCheckboxProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemCheckboxState;
858
+
811
859
  export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => MenuItemCheckboxState;
812
860
 
813
861
  /**
@@ -821,6 +869,15 @@ export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckbo
821
869
  */
822
870
  export declare const useMenuItemLink_unstable: (props: MenuItemLinkProps, ref: React_2.Ref<HTMLAnchorElement>) => MenuItemLinkState;
823
871
 
872
+ /**
873
+ * Base hook for MenuItemLink, mirrors `useMenuItemLink_unstable` but composes with
874
+ * `useMenuItemBase_unstable`.
875
+ *
876
+ * @param props - props from this instance of MenuItemLink
877
+ * @param ref - reference to root HTMLElement of MenuItemLink
878
+ */
879
+ export declare const useMenuItemLinkBase_unstable: (props: MenuItemLinkProps, ref: React_2.Ref<HTMLAnchorElement>) => MenuItemLinkState;
880
+
824
881
  /**
825
882
  * Apply styling to the MenuItemLink slots based on the state
826
883
  */
@@ -831,6 +888,12 @@ export declare const useMenuItemLinkStyles_unstable: (state: MenuItemLinkState)
831
888
  */
832
889
  export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemRadioState;
833
890
 
891
+ /**
892
+ * Base hook for MenuItemRadio component, produces state required to render the component.
893
+ * It doesn't set any design-related props specific to MenuItemRadio.
894
+ */
895
+ export declare const useMenuItemRadioBase_unstable: (props: MenuItemRadioBaseProps, ref: React_2.Ref<ARIAButtonElement<"div">>) => MenuItemRadioBaseState;
896
+
834
897
  export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => void;
835
898
 
836
899
  /** Applies style classnames to slots */
@@ -847,16 +910,45 @@ export declare const useMenuItemStyles_unstable: (state: MenuItemState) => MenuI
847
910
  */
848
911
  export declare const useMenuItemSwitch_unstable: (props: MenuItemSwitchProps, ref: React_2.Ref<HTMLDivElement>) => MenuItemSwitchState;
849
912
 
913
+ /**
914
+ * Base hook for MenuItemSwitch component, produces state required to render the component.
915
+ * It doesn't set any design-related props specific to MenuItemSwitch.
916
+ *
917
+ * @param props - props from this instance of MenuItemSwitch
918
+ * @param ref - reference to root HTMLDivElement of MenuItemSwitch
919
+ */
920
+ export declare const useMenuItemSwitchBase_unstable: (props: MenuItemSwitchProps, ref: React_2.Ref<HTMLDivElement>) => MenuItemSwitchState;
921
+
850
922
  /**
851
923
  * Apply styling to the MenuItemSwitch slots based on the state
852
924
  */
853
925
  export declare const useMenuItemSwitchStyles_unstable: (state: MenuItemSwitchState) => MenuItemSwitchState;
854
926
 
855
927
  /**
856
- * Returns the props and state required to render the component
928
+ * Returns the props and state required to render the component.
929
+ *
930
+ * Composes with `useMenuListBase_unstable` and adds Tabster-driven keyboard
931
+ * navigation: circular arrow-key focus, a `TabsterMoveFocusEvent` listener
932
+ * that lets `useMenuPopover_unstable` handle Tab key presses, a focus-aware
933
+ * `setFocusByFirstCharacter`, and the `hasIcons` / `hasCheckmarks` slot
934
+ * alignment hints sourced from the parent `MenuContext`.
857
935
  */
858
936
  export declare const useMenuList_unstable: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
859
937
 
938
+ /**
939
+ * Base hook for MenuList component, produces state required to render the component.
940
+ *
941
+ * Does not invoke any Tabster APIs internally: arrow-key navigation and the
942
+ * focus-aware `setFocusByFirstCharacter` are added by the wrapper
943
+ * `useMenuList_unstable`. The base's `setFocusByFirstCharacter` walks the DOM
944
+ * via `querySelectorAll` and does not filter by Tabster's focusability rules,
945
+ * so consumers integrating their own focus management should layer that on top.
946
+ *
947
+ * @param props - props from this instance of MenuList
948
+ * @param ref - reference to root HTMLElement of MenuList
949
+ */
950
+ export declare const useMenuListBase_unstable: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
951
+
860
952
  export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
861
953
 
862
954
  export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
@@ -877,6 +969,18 @@ export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuL
877
969
  */
878
970
  export declare const useMenuPopover_unstable: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
879
971
 
972
+ /**
973
+ * Base hook for MenuPopover, produces state required to render the component.
974
+ *
975
+ * Does not invoke `@fluentui/react-tabster` focus-restoration or
976
+ * `@fluentui/react-motion` ref-forwarding APIs internally; the wrapper
977
+ * `useMenuPopover_unstable` layers those on top.
978
+ *
979
+ * @param props - props from this instance of MenuPopover
980
+ * @param ref - reference to root HTMLElement of MenuPopover
981
+ */
982
+ export declare const useMenuPopoverBase_unstable: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
983
+
880
984
  /**
881
985
  * Apply styling to the Menu slots based on the state
882
986
  */
@@ -900,12 +1004,30 @@ export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupSta
900
1004
 
901
1005
  /**
902
1006
  * Create the state required to render MenuTrigger.
903
- * Clones the only child component and adds necessary event handling behaviours to open a popup menu
1007
+ * Clones the only child component and adds necessary event handling behaviours to open a popup menu.
1008
+ *
1009
+ * Composes with `useMenuTriggerBase_unstable` and supplies Tabster's `findFirstFocusable`
1010
+ * as the `focusFirst` callback so that submenu-trigger keyboard navigation honours
1011
+ * Tabster movers, focus traps, and other Tabster-managed state.
904
1012
  *
905
1013
  * @param props - props from this instance of MenuTrigger
906
1014
  */
907
1015
  export declare const useMenuTrigger_unstable: (props: MenuTriggerProps) => MenuTriggerState;
908
1016
 
1017
+ /**
1018
+ * Base hook for MenuTrigger component, produces state required to render the component.
1019
+ *
1020
+ * Headless: this hook does not import from `@fluentui/react-tabster` and does not
1021
+ * perform any focus discovery on its own. The submenu-already-open arrow-key path
1022
+ * delegates to the optional `options.focusFirst` callback, which lets consumers wire
1023
+ * up whichever focus-finding strategy fits their environment (Tabster, a native DOM
1024
+ * query, a virtual focus manager, etc.). When `focusFirst` is not provided that path
1025
+ * becomes a no-op.
1026
+ *
1027
+ * @public
1028
+ */
1029
+ export declare const useMenuTriggerBase_unstable: (props: MenuTriggerBaseProps) => MenuTriggerState;
1030
+
909
1031
  export declare const useMenuTriggerContext_unstable: () => boolean;
910
1032
 
911
1033
  /**
package/lib/Menu.js CHANGED
@@ -1 +1 @@
1
- export { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './components/Menu/index';
1
+ export { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenuBase_unstable, useMenu_unstable } from './components/Menu/index';
package/lib/Menu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Menu.ts"],"sourcesContent":["export type {\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './components/Menu/index';\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './components/Menu/index';\n"],"names":["Menu","renderMenu_unstable","useMenuContextValues_unstable","useMenu_unstable"],"mappings":"AAUA,SAASA,IAAI,EAAEC,mBAAmB,EAAEC,6BAA6B,EAAEC,gBAAgB,QAAQ,0BAA0B"}
1
+ {"version":3,"sources":["../src/Menu.ts"],"sourcesContent":["export type {\n MenuBaseProps,\n MenuBaseState,\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './components/Menu/index';\nexport {\n Menu,\n renderMenu_unstable,\n useMenuContextValues_unstable,\n useMenuBase_unstable,\n useMenu_unstable,\n} from './components/Menu/index';\n"],"names":["Menu","renderMenu_unstable","useMenuContextValues_unstable","useMenuBase_unstable","useMenu_unstable"],"mappings":"AAYA,SACEA,IAAI,EACJC,mBAAmB,EACnBC,6BAA6B,EAC7BC,oBAAoB,EACpBC,gBAAgB,QACX,0BAA0B"}
@@ -1 +1 @@
1
- export { MenuItemLink, menuItemLinkClassNames, renderMenuItemLink_unstable, useMenuItemLinkStyles_unstable, useMenuItemLink_unstable } from './components/MenuItemLink/index';
1
+ export { MenuItemLink, menuItemLinkClassNames, renderMenuItemLink_unstable, useMenuItemLinkBase_unstable, useMenuItemLinkStyles_unstable, useMenuItemLink_unstable } from './components/MenuItemLink/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuItemLink.ts"],"sourcesContent":["export type { MenuItemLinkProps, MenuItemLinkSlots, MenuItemLinkState } from './components/MenuItemLink/index';\nexport {\n MenuItemLink,\n menuItemLinkClassNames,\n renderMenuItemLink_unstable,\n useMenuItemLinkStyles_unstable,\n useMenuItemLink_unstable,\n} from './components/MenuItemLink/index';\n"],"names":["MenuItemLink","menuItemLinkClassNames","renderMenuItemLink_unstable","useMenuItemLinkStyles_unstable","useMenuItemLink_unstable"],"mappings":"AACA,SACEA,YAAY,EACZC,sBAAsB,EACtBC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,QACnB,kCAAkC"}
1
+ {"version":3,"sources":["../src/MenuItemLink.ts"],"sourcesContent":["export type { MenuItemLinkProps, MenuItemLinkSlots, MenuItemLinkState } from './components/MenuItemLink/index';\nexport {\n MenuItemLink,\n menuItemLinkClassNames,\n renderMenuItemLink_unstable,\n useMenuItemLinkBase_unstable,\n useMenuItemLinkStyles_unstable,\n useMenuItemLink_unstable,\n} from './components/MenuItemLink/index';\n"],"names":["MenuItemLink","menuItemLinkClassNames","renderMenuItemLink_unstable","useMenuItemLinkBase_unstable","useMenuItemLinkStyles_unstable","useMenuItemLink_unstable"],"mappings":"AACA,SACEA,YAAY,EACZC,sBAAsB,EACtBC,2BAA2B,EAC3BC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,wBAAwB,QACnB,kCAAkC"}
@@ -1 +1 @@
1
- export { MenuItemRadio, menuItemRadioClassNames, renderMenuItemRadio_unstable, useMenuItemRadioStyles_unstable, useMenuItemRadio_unstable, useMenuItemRadioBase_unstable } from './components/MenuItemRadio/index';
1
+ export { MenuItemRadio, menuItemRadioClassNames, renderMenuItemRadio_unstable, useMenuItemRadioBase_unstable, useMenuItemRadioStyles_unstable, useMenuItemRadio_unstable } from './components/MenuItemRadio/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuItemRadio.ts"],"sourcesContent":["export type { MenuItemRadioProps, MenuItemRadioState } from './components/MenuItemRadio/index';\nexport {\n MenuItemRadio,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n useMenuItemRadioBase_unstable,\n} from './components/MenuItemRadio/index';\n"],"names":["MenuItemRadio","menuItemRadioClassNames","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable","useMenuItemRadioBase_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,EACzBC,6BAA6B,QACxB,mCAAmC"}
1
+ {"version":3,"sources":["../src/MenuItemRadio.ts"],"sourcesContent":["export type {\n MenuItemRadioBaseProps,\n MenuItemRadioBaseState,\n MenuItemRadioProps,\n MenuItemRadioState,\n} from './components/MenuItemRadio/index';\nexport {\n MenuItemRadio,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioBase_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n} from './components/MenuItemRadio/index';\n"],"names":["MenuItemRadio","menuItemRadioClassNames","renderMenuItemRadio_unstable","useMenuItemRadioBase_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable"],"mappings":"AAMA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,yBAAyB,QACpB,mCAAmC"}
package/lib/MenuList.js CHANGED
@@ -1 +1 @@
1
- export { MenuList, menuListClassNames, renderMenuList_unstable, useMenuListContextValues_unstable, useMenuListStyles_unstable, useMenuList_unstable } from './components/MenuList/index';
1
+ export { MenuList, menuListClassNames, renderMenuList_unstable, useMenuListBase_unstable, useMenuListContextValues_unstable, useMenuListStyles_unstable, useMenuList_unstable } from './components/MenuList/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuList.ts"],"sourcesContent":["export type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UninitializedMenuListState,\n} from './components/MenuList/index';\nexport {\n MenuList,\n menuListClassNames,\n renderMenuList_unstable,\n useMenuListContextValues_unstable,\n useMenuListStyles_unstable,\n useMenuList_unstable,\n} from './components/MenuList/index';\n"],"names":["MenuList","menuListClassNames","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useMenuList_unstable"],"mappings":"AAUA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
1
+ {"version":3,"sources":["../src/MenuList.ts"],"sourcesContent":["export type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UninitializedMenuListState,\n} from './components/MenuList/index';\nexport {\n MenuList,\n menuListClassNames,\n renderMenuList_unstable,\n useMenuListBase_unstable,\n useMenuListContextValues_unstable,\n useMenuListStyles_unstable,\n useMenuList_unstable,\n} from './components/MenuList/index';\n"],"names":["MenuList","menuListClassNames","renderMenuList_unstable","useMenuListBase_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useMenuList_unstable"],"mappings":"AAUA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,wBAAwB,EACxBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
@@ -1 +1 @@
1
- export { MenuPopover, menuPopoverClassNames, renderMenuPopover_unstable, useMenuPopoverStyles_unstable, useMenuPopover_unstable } from './components/MenuPopover/index';
1
+ export { MenuPopover, menuPopoverClassNames, renderMenuPopover_unstable, useMenuPopoverBase_unstable, useMenuPopoverStyles_unstable, useMenuPopover_unstable } from './components/MenuPopover/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuPopover.ts"],"sourcesContent":["export type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './components/MenuPopover/index';\nexport {\n MenuPopover,\n menuPopoverClassNames,\n renderMenuPopover_unstable,\n useMenuPopoverStyles_unstable,\n useMenuPopover_unstable,\n} from './components/MenuPopover/index';\n"],"names":["MenuPopover","menuPopoverClassNames","renderMenuPopover_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable"],"mappings":"AACA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,iCAAiC"}
1
+ {"version":3,"sources":["../src/MenuPopover.ts"],"sourcesContent":["export type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './components/MenuPopover/index';\nexport {\n MenuPopover,\n menuPopoverClassNames,\n renderMenuPopover_unstable,\n useMenuPopoverBase_unstable,\n useMenuPopoverStyles_unstable,\n useMenuPopover_unstable,\n} from './components/MenuPopover/index';\n"],"names":["MenuPopover","menuPopoverClassNames","renderMenuPopover_unstable","useMenuPopoverBase_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable"],"mappings":"AACA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,uBAAuB,QAClB,iCAAiC"}
@@ -1 +1 @@
1
- export { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './components/MenuTrigger/index';
1
+ export { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable, useMenuTriggerBase_unstable } from './components/MenuTrigger/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuTrigger.ts"],"sourcesContent":["export type { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './components/MenuTrigger/index';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './components/MenuTrigger/index';\n"],"names":["MenuTrigger","renderMenuTrigger_unstable","useMenuTrigger_unstable"],"mappings":"AACA,SAASA,WAAW,EAAEC,0BAA0B,EAAEC,uBAAuB,QAAQ,iCAAiC"}
1
+ {"version":3,"sources":["../src/MenuTrigger.ts"],"sourcesContent":["export type {\n MenuTriggerChildProps,\n MenuTriggerBaseProps,\n MenuTriggerProps,\n MenuTriggerState,\n} from './components/MenuTrigger/index';\nexport {\n MenuTrigger,\n renderMenuTrigger_unstable,\n useMenuTrigger_unstable,\n useMenuTriggerBase_unstable,\n} from './components/MenuTrigger/index';\n"],"names":["MenuTrigger","renderMenuTrigger_unstable","useMenuTrigger_unstable","useMenuTriggerBase_unstable"],"mappings":"AAMA,SACEA,WAAW,EACXC,0BAA0B,EAC1BC,uBAAuB,EACvBC,2BAA2B,QACtB,iCAAiC"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { useMenu_unstable } from './useMenu';
4
3
  import { useMenuContextValues_unstable } from './useMenuContextValues';
5
4
  import { renderMenu_unstable } from './renderMenu';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Menu/Menu.tsx"],"sourcesContent":["'use client';\n\nimport * 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"],"names":["React","useMenu_unstable","useMenuContextValues_unstable","renderMenu_unstable","Menu","props","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,mBAAmB,QAAQ,eAAe;AAGnD;;CAEC,GACD,OAAO,MAAMC,OAA4BC,CAAAA;IACvC,MAAMC,QAAQL,iBAAiBI;IAC/B,MAAME,gBAAgBL,8BAA8BI;IAEpD,OAAOH,oBAAoBG,OAAOC;AACpC,EAAE;AAEFH,KAAKI,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/Menu/Menu.tsx"],"sourcesContent":["'use client';\n\nimport type * 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"],"names":["useMenu_unstable","useMenuContextValues_unstable","renderMenu_unstable","Menu","props","state","contextValues","displayName"],"mappings":"AAAA;AAGA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,mBAAmB,QAAQ,eAAe;AAGnD;;CAEC,GACD,OAAO,MAAMC,OAA4BC,CAAAA;IACvC,MAAMC,QAAQL,iBAAiBI;IAC/B,MAAME,gBAAgBL,8BAA8BI;IAEpD,OAAOH,oBAAoBG,OAAOC;AACpC,EAAE;AAEFH,KAAKI,WAAW,GAAG"}
@@ -1 +1,3 @@
1
- import * as React from 'react';
1
+ /**
2
+ * Data attached to open/close events
3
+ */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Menu/Menu.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport { PositioningVirtualElement, SetVirtualMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, JSXElement, Slot } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {\n /**\n * Slot for the surface motion animation.\n * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n */\n surfaceMotion: Slot<PresenceMotionSlotProps>;\n};\n\nexport type InternalMenuSlots = {\n surfaceMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<Partial<MenuSlots>> &\n Pick<PortalProps, 'mountNode'> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including `MenuTrigger` and `MenuPopover`.\n * Alternatively can only contain `MenuPopover` if using a custom `target`.\n */\n children: [JSXElement, JSXElement] | JSXElement;\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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: 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<InternalMenuSlots> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'mountNode'\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n menuPopoverRef: React.MutableRefObject<HTMLElement | null>;\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: MenuOpenEvent, data: MenuOpenChangeData & { ignoreHoverDelay?: boolean }) => 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n triggerRef: React.MutableRefObject<HTMLElement | null>;\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 * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n /**\n * Default values to be checked on mount\n @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * An optional safe zone area to be rendered around the menu\n */\n safeZone?: React.ReactElement | null;\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 MenuOpenEvent = MenuOpenChangeData['event'];\n/**\n * @deprecated use MenuOpenEvent instead\n */\nexport type MenuOpenEvents = MenuOpenEvent;\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 | {\n type: 'menuTriggerContextMenu';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuSafeZoneMouseEnter';\n event: React.MouseEvent;\n }\n | {\n type: 'menuSafeZoneTimeout';\n event: Event;\n }\n | {\n type: 'menuTriggerMouseLeave';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseMove';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'menuItemClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'clickOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'scrollOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'menuMouseEnter';\n event: MouseEvent | TouchEvent;\n }\n);\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/Menu/Menu.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { PositioningVirtualElement, SetVirtualMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, JSXElement, Slot } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {\n /**\n * Slot for the surface motion animation.\n * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n */\n surfaceMotion: Slot<PresenceMotionSlotProps>;\n};\n\nexport type InternalMenuSlots = {\n surfaceMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<Partial<MenuSlots>> &\n Pick<PortalProps, 'mountNode'> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including `MenuTrigger` and `MenuPopover`.\n * Alternatively can only contain `MenuPopover` if using a custom `target`.\n */\n children: [JSXElement, JSXElement] | JSXElement;\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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: 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<InternalMenuSlots> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'mountNode'\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n menuPopoverRef: React.MutableRefObject<HTMLElement | null>;\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: MenuOpenEvent, data: MenuOpenChangeData & { ignoreHoverDelay?: boolean }) => 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n triggerRef: React.MutableRefObject<HTMLElement | null>;\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 * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n /**\n * Default values to be checked on mount\n @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * An optional safe zone area to be rendered around the menu\n */\n safeZone?: React.ReactElement | null;\n };\n\nexport type MenuBaseProps = Omit<MenuProps, 'surfaceMotion'>;\n\nexport type MenuBaseState = Omit<MenuState, 'surfaceMotion' | 'components'>;\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 MenuOpenEvent = MenuOpenChangeData['event'];\n/**\n * @deprecated use MenuOpenEvent instead\n */\nexport type MenuOpenEvents = MenuOpenEvent;\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 | {\n type: 'menuTriggerContextMenu';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuSafeZoneMouseEnter';\n event: React.MouseEvent;\n }\n | {\n type: 'menuSafeZoneTimeout';\n event: Event;\n }\n | {\n type: 'menuTriggerMouseLeave';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseMove';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'menuItemClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'clickOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'scrollOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'menuMouseEnter';\n event: MouseEvent | TouchEvent;\n }\n);\n"],"names":[],"mappings":"AA8MA;;CAEC,GACD,WAqEE"}
@@ -1,4 +1,4 @@
1
1
  export { Menu } from './Menu';
2
2
  export { renderMenu_unstable } from './renderMenu';
3
- export { useMenu_unstable } from './useMenu';
3
+ export { useMenu_unstable, useMenuBase_unstable } from './useMenu';
4
4
  export { useMenuContextValues_unstable } from './useMenuContextValues';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Menu/index.ts"],"sourcesContent":["export { Menu } from './Menu';\nexport type {\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './Menu.types';\nexport { renderMenu_unstable } from './renderMenu';\nexport { useMenu_unstable } from './useMenu';\nexport { useMenuContextValues_unstable } from './useMenuContextValues';\n"],"names":["Menu","renderMenu_unstable","useMenu_unstable","useMenuContextValues_unstable"],"mappings":"AAAA,SAASA,IAAI,QAAQ,SAAS;AAW9B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,6BAA6B,QAAQ,yBAAyB"}
1
+ {"version":3,"sources":["../src/components/Menu/index.ts"],"sourcesContent":["export { Menu } from './Menu';\nexport type {\n MenuBaseProps,\n MenuBaseState,\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './Menu.types';\nexport { renderMenu_unstable } from './renderMenu';\nexport { useMenu_unstable, useMenuBase_unstable } from './useMenu';\nexport { useMenuContextValues_unstable } from './useMenuContextValues';\n"],"names":["Menu","renderMenu_unstable","useMenu_unstable","useMenuBase_unstable","useMenuContextValues_unstable"],"mappings":"AAAA,SAASA,IAAI,QAAQ,SAAS;AAa9B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,YAAY;AACnE,SAASC,6BAA6B,QAAQ,yBAAyB"}
@@ -27,6 +27,29 @@ const submenuFallbackPositions = [
27
27
  *
28
28
  * @param props - props from this instance of Menu
29
29
  */ export const useMenu_unstable = (props)=>{
30
+ const { surfaceMotion, ...baseProps } = props;
31
+ const baseState = useMenuBase_unstable(baseProps);
32
+ return {
33
+ ...baseState,
34
+ components: {
35
+ surfaceMotion: MenuSurfaceMotion
36
+ },
37
+ surfaceMotion: presenceMotionSlot(surfaceMotion, {
38
+ elementType: MenuSurfaceMotion,
39
+ defaultProps: {
40
+ visible: baseState.open,
41
+ appear: true,
42
+ unmountOnExit: true
43
+ }
44
+ })
45
+ };
46
+ };
47
+ /**
48
+ * Base hook for Menu component, produces state required to render the component.
49
+ * It doesn't set any design-related slots specific to Menu such as `surfaceMotion`.
50
+ *
51
+ * @param props - props from this instance of Menu
52
+ */ export const useMenuBase_unstable = (props)=>{
30
53
  const isSubmenu = useIsSubmenu();
31
54
  const { hoverDelay = 500, inline = false, hasCheckmarks = false, hasIcons = false, closeOnScroll = false, openOnContext = false, persistOnItemClick = false, openOnHover = isSubmenu, defaultCheckedValues, mountNode = null, safeZone } = props;
32
55
  const { targetDocument } = useFluent();
@@ -147,24 +170,13 @@ const submenuFallbackPositions = [
147
170
  mountNode,
148
171
  triggerRef,
149
172
  menuPopoverRef,
150
- components: {
151
- surfaceMotion: MenuSurfaceMotion
152
- },
153
173
  openOnContext,
154
174
  open,
155
175
  setOpen,
156
176
  checkedValues,
157
177
  onCheckedValueChange,
158
178
  persistOnItemClick,
159
- safeZone: safeZoneHandle.elementToRender,
160
- surfaceMotion: presenceMotionSlot(props.surfaceMotion, {
161
- elementType: MenuSurfaceMotion,
162
- defaultProps: {
163
- visible: open,
164
- appear: true,
165
- unmountOnExit: true
166
- }
167
- })
179
+ safeZone: safeZoneHandle.elementToRender
168
180
  };
169
181
  };
170
182
  /**