@fluentui/react-menu 0.0.0-nightly0e0cf06c3420211029.1 → 0.0.0-nightly3082edf34720220208.1

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 (407) hide show
  1. package/CHANGELOG.json +360 -26
  2. package/CHANGELOG.md +81 -20
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +139 -70
  5. package/lib/MenuSplitGroup.d.ts +1 -0
  6. package/lib/MenuSplitGroup.js +2 -0
  7. package/lib/MenuSplitGroup.js.map +1 -0
  8. package/lib/components/Menu/Menu.js +7 -7
  9. package/lib/components/Menu/Menu.js.map +1 -1
  10. package/lib/components/Menu/renderMenu.d.ts +1 -1
  11. package/lib/components/Menu/renderMenu.js +1 -1
  12. package/lib/components/Menu/renderMenu.js.map +1 -1
  13. package/lib/components/Menu/useMenu.d.ts +2 -2
  14. package/lib/components/Menu/useMenu.js +119 -128
  15. package/lib/components/Menu/useMenu.js.map +1 -1
  16. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  17. package/lib/components/Menu/useMenuContextValues.js +35 -33
  18. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  19. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  20. package/lib/components/MenuDivider/MenuDivider.js +8 -8
  21. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  22. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  23. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  24. package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
  25. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  26. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  27. package/lib/components/MenuDivider/useMenuDivider.js +9 -7
  28. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  30. package/lib/components/MenuDivider/useMenuDividerStyles.js +7 -5
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.js +10 -8
  34. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  35. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  36. package/lib/components/MenuGroup/index.d.ts +1 -0
  37. package/lib/components/MenuGroup/index.js +1 -0
  38. package/lib/components/MenuGroup/index.js.map +1 -1
  39. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  40. package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
  41. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  42. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  43. package/lib/components/MenuGroup/useMenuGroup.js +10 -7
  44. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  45. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  46. package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
  47. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  48. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  49. package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
  50. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  51. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  52. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
  53. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  54. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  55. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  56. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +7 -7
  57. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  58. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  59. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
  60. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  61. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  62. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +7 -5
  63. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  64. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  65. package/lib/components/MenuItem/MenuItem.js +8 -10
  66. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  67. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  68. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  69. package/lib/components/MenuItem/renderMenuItem.js +12 -8
  70. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  71. package/lib/components/MenuItem/useCharacterSearch.js +7 -7
  72. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  73. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  74. package/lib/components/MenuItem/useMenuItem.js +35 -45
  75. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  76. package/lib/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  77. package/lib/components/MenuItem/useMenuItemStyles.js +31 -27
  78. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  79. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  80. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
  81. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  82. package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
  83. package/lib/components/MenuItemCheckbox/index.js +1 -0
  84. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  85. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  86. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
  87. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  88. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  89. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
  90. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  91. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  92. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +8 -5
  93. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  94. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  95. package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
  96. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  97. package/lib/components/MenuItemRadio/index.d.ts +1 -0
  98. package/lib/components/MenuItemRadio/index.js +1 -0
  99. package/lib/components/MenuItemRadio/index.js.map +1 -1
  100. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  101. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
  102. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  103. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  104. package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
  105. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  106. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  107. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +8 -5
  108. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  109. package/lib/components/MenuList/MenuList.d.ts +1 -1
  110. package/lib/components/MenuList/MenuList.js +10 -10
  111. package/lib/components/MenuList/MenuList.js.map +1 -1
  112. package/lib/components/MenuList/MenuList.types.d.ts +12 -10
  113. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  114. package/lib/components/MenuList/renderMenuList.js +7 -7
  115. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  116. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  117. package/lib/components/MenuList/useMenuList.js +70 -87
  118. package/lib/components/MenuList/useMenuList.js.map +1 -1
  119. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  120. package/lib/components/MenuList/useMenuListContextValues.js +19 -17
  121. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  122. package/lib/components/MenuList/useMenuListStyles.d.ts +2 -1
  123. package/lib/components/MenuList/useMenuListStyles.js +9 -7
  124. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  125. package/lib/components/MenuPopover/MenuPopover.js +7 -7
  126. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  127. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  128. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  129. package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
  130. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  131. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  132. package/lib/components/MenuPopover/useMenuPopover.js +35 -41
  133. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  134. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  135. package/lib/components/MenuPopover/useMenuPopoverStyles.js +13 -8
  136. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  137. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  138. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  139. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  140. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  141. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  142. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  143. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  144. package/lib/components/MenuSplitGroup/index.js +6 -0
  145. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  146. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  147. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  148. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  149. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  150. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  151. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  152. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  153. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  154. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  155. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  156. package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
  157. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  158. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  159. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  160. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  161. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  162. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  163. package/lib/components/MenuTrigger/useMenuTrigger.js +166 -5
  164. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  165. package/lib/contexts/menuContext.d.ts +1 -1
  166. package/lib/contexts/menuContext.js +5 -11
  167. package/lib/contexts/menuContext.js.map +1 -1
  168. package/lib/contexts/menuGroupContext.d.ts +1 -1
  169. package/lib/contexts/menuGroupContext.js +3 -5
  170. package/lib/contexts/menuGroupContext.js.map +1 -1
  171. package/lib/contexts/menuListContext.d.ts +1 -1
  172. package/lib/contexts/menuListContext.js +7 -17
  173. package/lib/contexts/menuListContext.js.map +1 -1
  174. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  175. package/lib/contexts/menuTriggerContext.js +3 -5
  176. package/lib/contexts/menuTriggerContext.js.map +1 -1
  177. package/lib/index.d.ts +11 -10
  178. package/lib/index.js +11 -10
  179. package/lib/index.js.map +1 -1
  180. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  181. package/lib/selectable/useCheckmarkStyles.js +4 -4
  182. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  183. package/lib/utils/useIsSubmenu.js +3 -5
  184. package/lib/utils/useIsSubmenu.js.map +1 -1
  185. package/lib/utils/useOnMenuEnter.js +16 -14
  186. package/lib/utils/useOnMenuEnter.js.map +1 -1
  187. package/lib-commonjs/Menu.js +1 -1
  188. package/lib-commonjs/MenuDivider.js +1 -1
  189. package/lib-commonjs/MenuGroup.js +1 -1
  190. package/lib-commonjs/MenuGroupHeader.js +1 -1
  191. package/lib-commonjs/MenuItem.js +1 -1
  192. package/lib-commonjs/MenuItemCheckbox.js +1 -1
  193. package/lib-commonjs/MenuItemRadio.js +1 -1
  194. package/lib-commonjs/MenuList.js +1 -1
  195. package/lib-commonjs/MenuPopover.js +1 -1
  196. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  197. package/lib-commonjs/MenuSplitGroup.js +10 -0
  198. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  199. package/lib-commonjs/MenuTrigger.js +1 -1
  200. package/lib-commonjs/components/Menu/Menu.js +7 -7
  201. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  202. package/lib-commonjs/components/Menu/index.js +1 -1
  203. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  204. package/lib-commonjs/components/Menu/renderMenu.js +5 -5
  205. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  206. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  207. package/lib-commonjs/components/Menu/useMenu.js +130 -141
  208. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  209. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  210. package/lib-commonjs/components/Menu/useMenuContextValues.js +37 -35
  211. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  212. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  213. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -9
  214. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  215. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  216. package/lib-commonjs/components/MenuDivider/index.js +1 -1
  217. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  218. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +11 -12
  219. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  220. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  221. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +12 -11
  222. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  223. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  224. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +11 -7
  225. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  226. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  227. package/lib-commonjs/components/MenuGroup/MenuGroup.js +12 -9
  228. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  229. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  230. package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
  231. package/lib-commonjs/components/MenuGroup/index.js +3 -1
  232. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  233. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  234. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +12 -13
  235. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  236. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  237. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +13 -11
  238. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  239. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  240. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +11 -11
  241. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  242. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  243. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
  244. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  245. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  246. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -9
  247. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  248. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  249. package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
  250. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  251. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +11 -12
  252. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  253. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  254. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +16 -12
  255. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  256. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  257. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +11 -7
  258. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  259. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  260. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -12
  261. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  262. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  263. package/lib-commonjs/components/MenuItem/index.js +1 -1
  264. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  265. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -14
  266. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  267. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
  268. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  269. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  270. package/lib-commonjs/components/MenuItem/useMenuItem.js +42 -53
  271. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  272. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  273. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +40 -33
  274. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  276. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -9
  277. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  278. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
  279. package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
  280. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  282. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -14
  283. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  284. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  285. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +19 -21
  286. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  287. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  288. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +12 -7
  289. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  290. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  291. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -9
  292. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  293. package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
  294. package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
  295. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  296. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  297. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -14
  298. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  299. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  300. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +19 -20
  301. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  302. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  303. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +12 -7
  304. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  305. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  306. package/lib-commonjs/components/MenuList/MenuList.js +11 -11
  307. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  308. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +12 -10
  309. package/lib-commonjs/components/MenuList/index.js +1 -1
  310. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  311. package/lib-commonjs/components/MenuList/renderMenuList.js +12 -13
  312. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  313. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  314. package/lib-commonjs/components/MenuList/useMenuList.js +77 -95
  315. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  316. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  317. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +21 -19
  318. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  319. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +2 -1
  320. package/lib-commonjs/components/MenuList/useMenuListStyles.js +12 -9
  321. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  322. package/lib-commonjs/components/MenuPopover/MenuPopover.js +8 -8
  323. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  324. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  325. package/lib-commonjs/components/MenuPopover/index.js +1 -1
  326. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  327. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +14 -13
  328. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  329. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  330. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +43 -50
  331. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  332. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  333. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +17 -10
  334. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  335. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  336. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  337. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  338. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  339. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  340. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  341. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  342. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  343. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  344. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  345. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  346. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  347. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  348. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  349. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  350. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  351. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  352. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  353. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  354. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -5
  355. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  356. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  357. package/lib-commonjs/components/MenuTrigger/index.js +1 -1
  358. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  359. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -5
  360. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  361. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  362. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +174 -7
  363. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  364. package/lib-commonjs/components/index.js +1 -1
  365. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  366. package/lib-commonjs/contexts/menuContext.js +6 -12
  367. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  368. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  369. package/lib-commonjs/contexts/menuGroupContext.js +5 -7
  370. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  371. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  372. package/lib-commonjs/contexts/menuListContext.js +8 -18
  373. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  374. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  375. package/lib-commonjs/contexts/menuTriggerContext.js +5 -7
  376. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  377. package/lib-commonjs/index.d.ts +11 -10
  378. package/lib-commonjs/index.js +17 -15
  379. package/lib-commonjs/index.js.map +1 -1
  380. package/lib-commonjs/selectable/index.js +1 -1
  381. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  382. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -7
  383. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  384. package/lib-commonjs/utils/index.js +1 -1
  385. package/lib-commonjs/utils/useIsSubmenu.js +5 -7
  386. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  387. package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
  388. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  389. package/package.json +15 -17
  390. package/lib/common/isConformant.d.ts +0 -4
  391. package/lib/common/isConformant.js +0 -12
  392. package/lib/common/isConformant.js.map +0 -1
  393. package/lib/common/mockUseMenuContext.d.ts +0 -7
  394. package/lib/common/mockUseMenuContext.js +0 -36
  395. package/lib/common/mockUseMenuContext.js.map +0 -1
  396. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  397. package/lib/components/MenuTrigger/useTriggerElement.js +0 -179
  398. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  399. package/lib-commonjs/common/isConformant.d.ts +0 -4
  400. package/lib-commonjs/common/isConformant.js +0 -23
  401. package/lib-commonjs/common/isConformant.js.map +0 -1
  402. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  403. package/lib-commonjs/common/mockUseMenuContext.js +0 -47
  404. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  405. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  406. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
  407. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
package/Spec.md CHANGED
@@ -619,7 +619,7 @@ const menu = (
619
619
 
620
620
  ```html
621
621
  <!-- expected DOM output -->
622
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
622
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
623
623
  <div role="menu" aria-labelledby="trigger">
624
624
  <div role="menuitem" tabindex="0">Option 1</div>
625
625
  <div role="menuitem" tabindex="-1">Option 2</div>
@@ -644,7 +644,7 @@ const menu = (
644
644
 
645
645
  ```html
646
646
  <!-- expected DOM output -->
647
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
647
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
648
648
  <div role="menu" aria-labelledby="trigger">
649
649
  <div role="menuitem" tabindex="0">
650
650
  <span role="presentation"><svg>FileIcon</svg></span>
@@ -682,7 +682,7 @@ const menu = (
682
682
 
683
683
  ```html
684
684
  <!-- expected DOM output -->
685
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
685
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
686
686
  <div role="menu" aria-labelledby="trigger">
687
687
  <div role="menuitem" tabindex="0">Option 1</div>
688
688
  <div role="separator" aria-hidden="true"></div>
@@ -719,7 +719,7 @@ const menu = (
719
719
 
720
720
  ```html
721
721
  <!-- expected DOM output -->
722
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
722
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
723
723
  <div role="menu" aria-labelledby="trigger">
724
724
  <div role="menuitem" tabindex="0">Option 1</div>
725
725
  <div role="separator" aria-hidden="true"></div>
@@ -758,10 +758,10 @@ const menu = (
758
758
 
759
759
  ```html
760
760
  <!-- expected DOM output -->
761
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
761
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
762
762
  <div role="menu" aria-labelledby="trigger">
763
763
  <div role="menuitem" tabindex="0">Option 1</div>
764
- <div role="menuitem" tabindex="-1" aria-haspopup="true" aria-expanded="false" id="submenu-trigger">Open submenu</div>
764
+ <div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
765
765
  </div>
766
766
 
767
767
  <!-- expected DOM output for submenu -->
@@ -843,7 +843,7 @@ const menuSelectableSections = (
843
843
  ```
844
844
 
845
845
  ```html
846
- <button aria-haspopup="true" aria-expanded="true" id="trigger">Open menu</button>
846
+ <button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
847
847
 
848
848
  <!-- expected DOM output for basic checkbox -->
849
849
  <div role="menu" aria-labelledby="trigger">
@@ -882,9 +882,12 @@ const menuSplitbutton= (
882
882
  <MenuList>
883
883
  <MenuItem>Option 1</MenuItem>
884
884
  <Menu>
885
- <MenuTrigger>
886
- <MenuItemSplit></MenuItemSplit>
887
- </MenuTrigger>
885
+ <MenuSplitGroup>
886
+ <MenuItem>Main action</MenuItem>
887
+ <MenuTrigger>
888
+ <MenuItem />
889
+ </MenuTrigger>
890
+ </MenuSplitGroup>
888
891
  <MenuItem>Option 1</MenuItem>
889
892
  <MenuItem>Option 2</MenuItem>
890
893
  <MenuItem>Option 3</MenuItem>
@@ -897,7 +900,7 @@ const menuSplitbutton= (
897
900
  ```html
898
901
  <div role="menu" aria-labelledby="trigger">
899
902
  <div role="menuitem" tabindex="0">Option 1</div>
900
- <div role="menuitem" tabindex="-1" aria-haspopup="true" aria-expanded="false" id="submenu-trigger">Open submenu</div>
903
+ <div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
901
904
  </div>
902
905
 
903
906
  <!-- expected DOM output -->
@@ -905,7 +908,7 @@ const menuSplitbutton= (
905
908
  <div role="menuitem" tabindex="0">Option 1</div>
906
909
  <div role="group">
907
910
  <div role="menuitem" tabindex="-1">content slot</div>
908
- <div role="menuitem" tabindex="-1" aria-haspopup="true" aria-expanded="false" id="submenu-trgger">
911
+ <div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trgger">
909
912
  <svg>indicator icon</svg>
910
913
  </div>
911
914
  </div>
@@ -958,11 +961,13 @@ Below is a set of diagrams that tries to illustrates all the interactions menus
958
961
 
959
962
  All of the above Mouse events seen previously should apply to the part of the split button that is intended to open a submenu.
960
963
 
961
- Once the submenu is open, the same behavior as in the [previous section](#submenu-trigger/navigation) applies with the exception of returning focus to the splitbutton, which is shown in the images below.
962
-
963
- ![Using up/down arrow key](./etc/images/splitbutton-up-down.jpg)
964
+ > TODO convert these diagrams to excalidraw or smth that is text format
965
+ > TODO add extra descriptions to diagrams
964
966
 
965
- ![Using left/right arrow key](./etc/images/splitbutton-left-right.jpg)
967
+ <img src="./etc/images/menu-interactions/Slide19.PNG" width="700" />
968
+ <img src="./etc/images/menu-interactions/Slide20.PNG" width="700" />
969
+ <img src="./etc/images/menu-interactions/Slide21.PNG" width="700" />
970
+ <img src="./etc/images/menu-interactions/Slide22.PNG" width="700" />
966
971
 
967
972
  ### MenuItem selection
968
973
 
@@ -2,10 +2,11 @@ import { ComponentProps } from '@fluentui/react-utilities';
2
2
  import { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { Context } from '@fluentui/react-context-selector';
4
4
  import type { ContextSelector } from '@fluentui/react-context-selector';
5
+ import type { FluentTriggerComponent } from '@fluentui/react-utilities';
5
6
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
6
- import { IntrinsicShorthandProps } from '@fluentui/react-utilities';
7
7
  import { PositioningShorthand } from '@fluentui/react-positioning';
8
8
  import * as React_2 from 'react';
9
+ import type { Slot } from '@fluentui/react-utilities';
9
10
  import { usePopperMouseTarget } from '@fluentui/react-positioning';
10
11
 
11
12
  /**
@@ -13,6 +14,15 @@ import { usePopperMouseTarget } from '@fluentui/react-positioning';
13
14
  */
14
15
  export declare const Menu: React_2.FC<MenuProps>;
15
16
 
17
+ export declare type MenuCheckedValueChangeData = {
18
+ /** The name of the value */
19
+ name: string;
20
+ /** The items for this value that are checked */
21
+ checkedItems: string[];
22
+ };
23
+
24
+ export declare type MenuCheckedValueChangeEvent = React_2.MouseEvent | React_2.KeyboardEvent;
25
+
16
26
  declare type MenuCommons = MenuListCommons & {
17
27
  /**
18
28
  * Whether the popup is open
@@ -64,23 +74,27 @@ export declare type MenuContextValues = {
64
74
  };
65
75
 
66
76
  /**
67
- * Define a styled MenuDivider, using the `useMenuDivider` hook.
77
+ * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
68
78
  */
69
79
  export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
70
80
 
81
+ export declare const menuDividerClassName = "fui-MenuDivider";
82
+
71
83
  export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
72
84
 
73
85
  export declare type MenuDividerSlots = {
74
- root: IntrinsicShorthandProps<'div'>;
86
+ root: Slot<'div'>;
75
87
  };
76
88
 
77
89
  export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
78
90
 
79
91
  /**
80
- * Define a styled MenuGroup, using the `useMenuGroup` hook.
92
+ * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
81
93
  */
82
94
  export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
83
95
 
96
+ export declare const menuGroupClassName = "fui-MenuGroup";
97
+
84
98
  export declare const MenuGroupContextProvider: React_2.Provider<MenuGroupContextValue>;
85
99
 
86
100
  /**
@@ -99,14 +113,16 @@ export declare type MenuGroupContextValues = {
99
113
  };
100
114
 
101
115
  /**
102
- * Define a styled MenuGroupHeader, using the `useMenuGroupHeader` hook.
116
+ * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
103
117
  */
104
118
  export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
105
119
 
120
+ export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
121
+
106
122
  export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
107
123
 
108
124
  export declare type MenuGroupHeaderSlots = {
109
- root: IntrinsicShorthandProps<'div'>;
125
+ root: Slot<'div'>;
110
126
  };
111
127
 
112
128
  export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
@@ -114,7 +130,7 @@ export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
114
130
  export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
115
131
 
116
132
  export declare type MenuGroupSlots = {
117
- root: IntrinsicShorthandProps<'div'>;
133
+ root: Slot<'div'>;
118
134
  };
119
135
 
120
136
  export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
@@ -125,19 +141,23 @@ export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
125
141
  };
126
142
 
127
143
  /**
128
- * Define a styled MenuItem, using the `useMenuItem` and `useMenuItemStyles` hook.
144
+ * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
129
145
  */
130
146
  export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
131
147
 
132
148
  /**
133
- * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox` hook.
149
+ * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
134
150
  */
135
151
  export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
136
152
 
153
+ export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
154
+
137
155
  export declare type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;
138
156
 
139
157
  export declare type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;
140
158
 
159
+ export declare const menuItemClassName = "fui-MenuItem";
160
+
141
161
  declare type MenuItemCommons = {
142
162
  /**
143
163
  * If the menu item is a trigger for a submenu
@@ -156,10 +176,12 @@ declare type MenuItemCommons = {
156
176
  export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & MenuItemCommons;
157
177
 
158
178
  /**
159
- * Define a styled MenuItemRadio, using the `useMenuItemRadio` hook.
179
+ * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
160
180
  */
161
181
  export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
162
182
 
183
+ export declare const menuItemRadioClassName = "fui-MenuItemRadio";
184
+
163
185
  export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
164
186
 
165
187
  export declare type MenuItemRadioState = MenuItemState & MenuItemSelectableState;
@@ -199,43 +221,40 @@ export declare type MenuItemSelectableState = MenuItemSelectableProps & {
199
221
  };
200
222
 
201
223
  export declare type MenuItemSlots = {
202
- root: IntrinsicShorthandProps<'div'>;
224
+ root: Slot<'div'>;
203
225
  /**
204
226
  * Icon slot rendered before children content
205
227
  */
206
- icon?: IntrinsicShorthandProps<'span'>;
228
+ icon?: Slot<'span'>;
207
229
  /**
208
230
  * A helper slot for alignment when a menu item is used with selectable menuitems
209
231
  * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components
210
232
  */
211
- checkmark?: IntrinsicShorthandProps<'span'>;
233
+ checkmark?: Slot<'span'>;
212
234
  /**
213
235
  * Icon slot that shows the indicator for a submenu
214
236
  */
215
- submenuIndicator?: IntrinsicShorthandProps<'span'>;
237
+ submenuIndicator?: Slot<'span'>;
216
238
  /**
217
239
  * Component children are placed in this slot
218
240
  * Avoid using the `children` property in this slot in favour of Component children whenever possible
219
241
  */
220
- content: IntrinsicShorthandProps<'span'>;
242
+ content?: Slot<'span'>;
221
243
  /**
222
244
  * Secondary content rendered opposite the primary content (e.g Shortcut text)
223
245
  */
224
- secondaryContent?: IntrinsicShorthandProps<'span'>;
246
+ secondaryContent?: Slot<'span'>;
225
247
  };
226
248
 
227
- /**
228
- * Consts listing which props are shorthand props.
229
- */
230
- export declare const menuItemSlots: Array<keyof MenuItemSlots>;
231
-
232
249
  export declare type MenuItemState = ComponentState<MenuItemSlots> & MenuItemCommons;
233
250
 
234
251
  /**
235
- * Define a styled MenuList, using the `useMenuList` hook.
252
+ * Define a styled MenuList, using the `useMenuList_unstable` hook.
236
253
  */
237
254
  export declare const MenuList: ForwardRefComponent<MenuListProps>;
238
255
 
256
+ export declare const menuListClassName = "fui-MenuList";
257
+
239
258
  export declare type MenuListCommons = {
240
259
  /**
241
260
  * Callback when checked items change for value with a name
@@ -243,12 +262,7 @@ export declare type MenuListCommons = {
243
262
  * @param event - React's original SyntheticEvent
244
263
  * @param data - A data object with relevant information
245
264
  */
246
- onCheckedValueChange?: (e: React_2.MouseEvent | React_2.KeyboardEvent, data: {
247
- /** The name of the value */
248
- name: string;
249
- /** The items for this value that are checked */
250
- checkedItems: string[];
251
- }) => void;
265
+ onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
252
266
  /**
253
267
  * Map of all checked values
254
268
  */
@@ -287,7 +301,7 @@ export declare type MenuListProps = ComponentProps<MenuListSlots> & Partial<Menu
287
301
  export declare const MenuListProvider: React_2.Provider<MenuListContextValue> & React_2.FC<React_2.ProviderProps<MenuListContextValue>>;
288
302
 
289
303
  export declare type MenuListSlots = {
290
- root: IntrinsicShorthandProps<'div'>;
304
+ root: Slot<'div'>;
291
305
  };
292
306
 
293
307
  export declare type MenuListState = ComponentState<MenuListSlots> & MenuListCommons & {
@@ -327,13 +341,15 @@ export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.MouseEven
327
341
  */
328
342
  export declare const MenuPopover: ForwardRefComponent<MenuPopoverProps>;
329
343
 
344
+ export declare const menuPopoverClassName = "fui-MenuPopover";
345
+
330
346
  /**
331
347
  * MenuPopover Props
332
348
  */
333
349
  export declare type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;
334
350
 
335
351
  export declare type MenuPopoverSlots = {
336
- root: IntrinsicShorthandProps<'div'>;
352
+ root: Slot<'div'>;
337
353
  };
338
354
 
339
355
  /**
@@ -366,6 +382,29 @@ export declare const MenuProvider: React_2.Provider<MenuContextValue> & React_2.
366
382
 
367
383
  export declare type MenuSlots = {};
368
384
 
385
+ /**
386
+ * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
387
+ */
388
+ export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
389
+
390
+ export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
391
+
392
+ export declare type MenuSplitGroupCommons = {};
393
+
394
+ /**
395
+ * MenuSplitGroup Props
396
+ */
397
+ export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots> & MenuSplitGroupCommons;
398
+
399
+ export declare type MenuSplitGroupSlots = {
400
+ root: Slot<'div'>;
401
+ };
402
+
403
+ /**
404
+ * State used in rendering MenuSplitGroup
405
+ */
406
+ export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots> & MenuSplitGroupCommons;
407
+
369
408
  export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
370
409
  /**
371
410
  * Callback to open/close the popup
@@ -409,13 +448,14 @@ export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
409
448
  * Wraps a trigger element as an only child
410
449
  * and adds the necessary event handling to open a popup menu
411
450
  */
412
- export declare const MenuTrigger: React_2.FC<MenuTriggerProps>;
451
+ export declare const MenuTrigger: React_2.FC<MenuTriggerProps> & FluentTriggerComponent;
413
452
 
414
453
  /**
415
454
  * Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
416
455
  */
417
- export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'aria-expanded' | 'id'>> & {
456
+ export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
418
457
  ref?: React_2.Ref<never>;
458
+ 'aria-expanded': boolean | undefined;
419
459
  };
420
460
 
421
461
  export declare const MenuTriggerContextProvider: React_2.Provider<boolean>;
@@ -426,64 +466,71 @@ export declare type MenuTriggerProps = {
426
466
  */
427
467
  children: (React_2.ReactElement & {
428
468
  ref?: React_2.Ref<unknown>;
429
- }) | ((props: MenuTriggerChildProps) => React_2.ReactNode);
469
+ }) | ((props: MenuTriggerChildProps) => React_2.ReactElement | null);
430
470
  };
431
471
 
432
- export declare type MenuTriggerState = MenuTriggerProps;
472
+ export declare type MenuTriggerState = {
473
+ children: React_2.ReactElement | null;
474
+ };
433
475
 
434
476
  /**
435
477
  * Render the final JSX of Menu
436
478
  */
437
- export declare const renderMenu: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
479
+ export declare const renderMenu_unstable: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
438
480
 
439
481
  /**
440
482
  * Redefine the render function to add slots. Reuse the menudivider structure but add
441
483
  * slots to children.
442
484
  */
443
- export declare const renderMenuDivider: (state: MenuDividerState) => JSX.Element;
485
+ export declare const renderMenuDivider_unstable: (state: MenuDividerState) => JSX.Element;
444
486
 
445
487
  /**
446
488
  * Redefine the render function to add slots. Reuse the menugroup structure but add
447
489
  * slots to children.
448
490
  */
449
- export declare const renderMenuGroup: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
491
+ export declare const renderMenuGroup_unstable: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
450
492
 
451
493
  /**
452
494
  * Redefine the render function to add slots. Reuse the menugroupheader structure but add
453
495
  * slots to children.
454
496
  */
455
- export declare const renderMenuGroupHeader: (state: MenuGroupHeaderState) => JSX.Element;
497
+ export declare const renderMenuGroupHeader_unstable: (state: MenuGroupHeaderState) => JSX.Element;
456
498
 
457
499
  /**
458
500
  * Function that renders the final JSX of the component
459
501
  */
460
- export declare const renderMenuItem: (state: MenuItemState) => JSX.Element;
502
+ export declare const renderMenuItem_unstable: (state: MenuItemState) => JSX.Element;
461
503
 
462
504
  /** Function that renders the final JSX of the component */
463
- export declare const renderMenuItemCheckbox: (state: MenuItemCheckboxState) => JSX.Element;
505
+ export declare const renderMenuItemCheckbox_unstable: (state: MenuItemCheckboxState) => JSX.Element;
464
506
 
465
507
  /**
466
508
  * Redefine the render function to add slots. Reuse the menuitemradio structure but add
467
509
  * slots to children.
468
510
  */
469
- export declare const renderMenuItemRadio: (state: MenuItemRadioState) => JSX.Element;
511
+ export declare const renderMenuItemRadio_unstable: (state: MenuItemRadioState) => JSX.Element;
470
512
 
471
513
  /**
472
514
  * Function that renders the final JSX of the component
473
515
  */
474
- export declare const renderMenuList: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
516
+ export declare const renderMenuList_unstable: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
475
517
 
476
518
  /**
477
519
  * Render the final JSX of MenuPopover
478
520
  */
479
- export declare const renderMenuPopover: (state: MenuPopoverState) => JSX.Element;
521
+ export declare const renderMenuPopover_unstable: (state: MenuPopoverState) => JSX.Element;
522
+
523
+ /**
524
+ * Render the final JSX of MenuSplitGroup
525
+ */
526
+ export declare const renderMenuSplitGroup_unstable: (state: MenuSplitGroupState) => JSX.Element;
480
527
 
481
528
  /**
482
529
  * Render the final JSX of MenuTrigger
483
530
  *
484
531
  * Only renders children
485
532
  */
486
- export declare const renderMenuTrigger: (state: MenuTriggerState) => JSX.Element;
533
+ export declare const renderMenuTrigger_unstable: (state: MenuTriggerState) => JSX.Element;
487
534
 
488
535
  export declare type SelectableHandler = (e: React_2.MouseEvent | React_2.KeyboardEvent, name: string, value: string, checked: boolean) => void;
489
536
 
@@ -494,90 +541,112 @@ export declare type UninitializedMenuListState = Omit<MenuListState, 'setFocusBy
494
541
  *
495
542
  * @param state - should contain a `checkmark` slot
496
543
  */
497
- export declare const useCheckmarkStyles: (state: MenuItemSelectableState & Pick<MenuItemSlots, 'checkmark'>) => void;
544
+ export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => void;
498
545
 
499
546
  /**
500
547
  * Create the state required to render Menu.
501
548
  *
502
549
  * The returned state can be modified with hooks such as useMenuStyles,
503
- * before being passed to renderMenu.
550
+ * before being passed to renderMenu_unstable.
504
551
  *
505
552
  * @param props - props from this instance of Menu
506
553
  */
507
- export declare const useMenu: (props: MenuProps) => MenuState;
554
+ export declare const useMenu_unstable: (props: MenuProps) => MenuState;
508
555
 
509
- export declare const useMenuContext: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
556
+ export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
510
557
 
511
- export declare function useMenuContextValues(state: MenuState): MenuContextValues;
558
+ export declare function useMenuContextValues_unstable(state: MenuState): MenuContextValues;
512
559
 
513
560
  /**
514
561
  * Given user props, returns state and render function for a MenuDivider.
515
562
  */
516
- export declare const useMenuDivider: (props: MenuDividerProps, ref: React_2.Ref<HTMLElement>) => MenuDividerState;
563
+ export declare const useMenuDivider_unstable: (props: MenuDividerProps, ref: React_2.Ref<HTMLElement>) => MenuDividerState;
517
564
 
518
- export declare const useMenuDividerStyles: (state: MenuDividerState) => ComponentState<MenuDividerSlots>;
565
+ export declare const useMenuDividerStyles_unstable: (state: MenuDividerState) => MenuDividerState;
519
566
 
520
567
  /**
521
568
  * Given user props, returns state and render function for a MenuGroup.
522
569
  */
523
- export declare function useMenuGroup(props: MenuGroupProps, ref: React_2.Ref<HTMLElement>): MenuGroupState;
570
+ export declare function useMenuGroup_unstable(props: MenuGroupProps, ref: React_2.Ref<HTMLElement>): MenuGroupState;
524
571
 
525
- export declare const useMenuGroupContext: () => MenuGroupContextValue;
572
+ export declare const useMenuGroupContext_unstable: () => MenuGroupContextValue;
526
573
 
527
- export declare function useMenuGroupContextValues(state: MenuGroupState): MenuGroupContextValues;
574
+ export declare function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues;
528
575
 
529
576
  /**
530
577
  * Given user props, returns state and render function for a MenuGroupHeader.
531
578
  */
532
- export declare function useMenuGroupHeader(props: MenuGroupHeaderProps, ref: React_2.Ref<HTMLElement>): MenuGroupHeaderState;
579
+ export declare function useMenuGroupHeader_unstable(props: MenuGroupHeaderProps, ref: React_2.Ref<HTMLElement>): MenuGroupHeaderState;
533
580
 
534
- export declare const useMenuGroupHeaderStyles: (state: MenuGroupHeaderState) => ComponentState<MenuGroupHeaderSlots>;
581
+ export declare const useMenuGroupHeaderStyles_unstable: (state: MenuGroupHeaderState) => MenuGroupHeaderState;
582
+
583
+ export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => MenuGroupState;
535
584
 
536
585
  /**
537
586
  * Returns the props and state required to render the component
538
587
  */
539
- export declare const useMenuItem: (props: MenuItemProps, ref: React_2.Ref<HTMLElement>) => MenuItemState;
588
+ export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React_2.Ref<HTMLElement>) => MenuItemState;
540
589
 
541
590
  /** Returns the props and state required to render the component */
542
- export declare const useMenuItemCheckbox: (props: MenuItemCheckboxProps, ref: React_2.Ref<HTMLElement>) => MenuItemCheckboxState;
591
+ export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React_2.Ref<HTMLElement>) => MenuItemCheckboxState;
592
+
593
+ export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => void;
543
594
 
544
595
  /**
545
596
  * Given user props, returns state and render function for a MenuItemRadio.
546
597
  */
547
- export declare const useMenuItemRadio: (props: MenuItemRadioProps, ref: React_2.Ref<HTMLElement>) => MenuItemRadioState;
598
+ export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React_2.Ref<HTMLElement>) => MenuItemRadioState;
599
+
600
+ export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => void;
548
601
 
549
602
  /** Applies style classnames to slots */
550
- export declare const useMenuItemStyles: (state: MenuItemState) => void;
603
+ export declare const useMenuItemStyles_unstable: (state: MenuItemState) => void;
551
604
 
552
605
  /**
553
606
  * Returns the props and state required to render the component
554
607
  */
555
- export declare const useMenuList: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
608
+ export declare const useMenuList_unstable: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
556
609
 
557
- export declare const useMenuListContext: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
610
+ export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
558
611
 
559
- export declare function useMenuListContextValues(state: MenuListState): MenuListContextValues;
612
+ export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
560
613
 
561
614
  /**
562
615
  * Apply styling to the Menu slots based on the state
563
616
  */
564
- export declare const useMenuListStyles: (state: MenuListState) => MenuListState;
617
+ export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuListState;
565
618
 
566
619
  /**
567
620
  * Create the state required to render MenuPopover.
568
621
  *
569
- * The returned state can be modified with hooks such as useMenuPopoverStyles,
570
- * before being passed to renderMenuPopover.
622
+ * The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,
623
+ * before being passed to renderMenuPopover_unstable.
571
624
  *
572
625
  * @param props - props from this instance of MenuPopover
573
626
  * @param ref - reference to root HTMLElement of MenuPopover
574
627
  */
575
- export declare const useMenuPopover: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
628
+ export declare const useMenuPopover_unstable: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
576
629
 
577
630
  /**
578
631
  * Apply styling to the Menu slots based on the state
579
632
  */
580
- export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopoverState;
633
+ export declare const useMenuPopoverStyles_unstable: (state: MenuPopoverState) => MenuPopoverState;
634
+
635
+ /**
636
+ * Create the state required to render MenuSplitGroup.
637
+ *
638
+ * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
639
+ * before being passed to renderMenuSplitGroup_unstable.
640
+ *
641
+ * @param props - props from this instance of MenuSplitGroup
642
+ * @param ref - reference to root HTMLElement of MenuSplitGroup
643
+ */
644
+ export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React_2.Ref<HTMLElement>) => MenuSplitGroupState;
645
+
646
+ /**
647
+ * Apply styling to the MenuSplitGroup slots based on the state
648
+ */
649
+ export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
581
650
 
582
651
  /**
583
652
  * Create the state required to render MenuTrigger.
@@ -585,8 +654,8 @@ export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopo
585
654
  *
586
655
  * @param props - props from this instance of MenuTrigger
587
656
  */
588
- export declare const useMenuTrigger: (props: MenuTriggerProps) => MenuTriggerState;
657
+ export declare const useMenuTrigger_unstable: (props: MenuTriggerProps) => MenuTriggerState;
589
658
 
590
- export declare const useMenuTriggerContext: () => boolean;
659
+ export declare const useMenuTriggerContext_unstable: () => boolean;
591
660
 
592
661
  export { }
@@ -0,0 +1 @@
1
+ export * from './components/MenuSplitGroup/index';
@@ -0,0 +1,2 @@
1
+ export * from './components/MenuSplitGroup/index';
2
+ //# sourceMappingURL=MenuSplitGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuSplitGroup.js","sourceRoot":"","sources":["../src/MenuSplitGroup.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
@@ -1,14 +1,14 @@
1
- import { useMenu } from './useMenu';
2
- import { useMenuContextValues } from './useMenuContextValues';
3
- import { renderMenu } from './renderMenu';
1
+ import { useMenu_unstable } from './useMenu';
2
+ import { useMenuContextValues_unstable } from './useMenuContextValues';
3
+ import { renderMenu_unstable } from './renderMenu';
4
4
  /**
5
5
  * Wrapper component that manages state for a popup MenuList and a MenuTrigger
6
6
  */
7
7
 
8
- export var Menu = function (props) {
9
- var state = useMenu(props);
10
- var contextValues = useMenuContextValues(state);
11
- return renderMenu(state, contextValues);
8
+ export const Menu = props => {
9
+ const state = useMenu_unstable(props);
10
+ const contextValues = useMenuContextValues_unstable(state);
11
+ return renderMenu_unstable(state, contextValues);
12
12
  };
13
13
  Menu.displayName = 'Menu';
14
14
  //# sourceMappingURL=Menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,OAAT,QAAwB,WAAxB;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,UAAT,QAA2B,cAA3B;AAGA;;AAEG;;AACH,OAAO,IAAM,IAAI,GAAwB,UAAA,KAAA,EAAK;AAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAD,CAArB;AACA,MAAM,aAAa,GAAG,oBAAoB,CAAC,KAAD,CAA1C;AAEA,SAAO,UAAU,CAAC,KAAD,EAAQ,aAAR,CAAjB;AACD,CALM;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,mBAAT,QAAoC,cAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,IAAI,GAAwB,KAAK,IAAG;AAC/C,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,CAA9B;AACA,QAAM,aAAa,GAAG,6BAA6B,CAAC,KAAD,CAAnD;AAEA,SAAO,mBAAmB,CAAC,KAAD,EAAQ,aAAR,CAA1B;AACD,CALM;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
@@ -2,4 +2,4 @@ import type { MenuContextValues, MenuState } from './Menu.types';
2
2
  /**
3
3
  * Render the final JSX of Menu
4
4
  */
5
- export declare const renderMenu: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
5
+ export declare const renderMenu_unstable: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
@@ -4,7 +4,7 @@ import { MenuProvider } from '../../contexts/menuContext';
4
4
  * Render the final JSX of Menu
5
5
  */
6
6
 
7
- export var renderMenu = function (state, contextValues) {
7
+ export const renderMenu_unstable = (state, contextValues) => {
8
8
  return /*#__PURE__*/React.createElement(MenuProvider, {
9
9
  value: contextValues.menu
10
10
  }, state.menuTrigger, state.open && state.menuPopover);