@fluentui/react-menu 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (480) hide show
  1. package/CHANGELOG.json +578 -27
  2. package/CHANGELOG.md +132 -18
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +143 -72
  5. package/lib/Menu.js.map +1 -1
  6. package/lib/MenuDivider.js.map +1 -1
  7. package/lib/MenuGroup.js.map +1 -1
  8. package/lib/MenuGroupHeader.js.map +1 -1
  9. package/lib/MenuItem.js.map +1 -1
  10. package/lib/MenuItemCheckbox.js.map +1 -1
  11. package/lib/MenuItemRadio.js.map +1 -1
  12. package/lib/MenuList.js.map +1 -1
  13. package/lib/MenuPopover.js.map +1 -1
  14. package/lib/MenuSplitGroup.d.ts +1 -0
  15. package/lib/MenuSplitGroup.js +2 -0
  16. package/lib/MenuSplitGroup.js.map +1 -0
  17. package/lib/MenuTrigger.js.map +1 -1
  18. package/lib/components/Menu/Menu.js +7 -7
  19. package/lib/components/Menu/Menu.js.map +1 -1
  20. package/lib/components/Menu/Menu.types.d.ts +3 -2
  21. package/lib/components/Menu/Menu.types.js.map +1 -1
  22. package/lib/components/Menu/index.js.map +1 -1
  23. package/lib/components/Menu/renderMenu.d.ts +1 -1
  24. package/lib/components/Menu/renderMenu.js +1 -1
  25. package/lib/components/Menu/renderMenu.js.map +1 -1
  26. package/lib/components/Menu/useMenu.d.ts +2 -2
  27. package/lib/components/Menu/useMenu.js +119 -128
  28. package/lib/components/Menu/useMenu.js.map +1 -1
  29. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  30. package/lib/components/Menu/useMenuContextValues.js +35 -33
  31. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  32. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  33. package/lib/components/MenuDivider/MenuDivider.js +8 -8
  34. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  35. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  36. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  37. package/lib/components/MenuDivider/index.js.map +1 -1
  38. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  39. package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
  40. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  41. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  42. package/lib/components/MenuDivider/useMenuDivider.js +9 -7
  43. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  44. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  45. package/lib/components/MenuDivider/useMenuDividerStyles.js +7 -5
  46. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  47. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  48. package/lib/components/MenuGroup/MenuGroup.js +10 -8
  49. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  50. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  51. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  52. package/lib/components/MenuGroup/index.d.ts +1 -0
  53. package/lib/components/MenuGroup/index.js +1 -0
  54. package/lib/components/MenuGroup/index.js.map +1 -1
  55. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  56. package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
  57. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  58. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  59. package/lib/components/MenuGroup/useMenuGroup.js +10 -7
  60. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  61. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  62. package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
  63. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  64. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  65. package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
  66. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  67. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  68. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
  69. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  70. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  71. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  72. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  73. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  74. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +7 -7
  75. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  76. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  77. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
  78. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  79. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  80. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +7 -5
  81. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  82. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  83. package/lib/components/MenuItem/MenuItem.js +8 -10
  84. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  85. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  86. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  87. package/lib/components/MenuItem/index.js.map +1 -1
  88. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  89. package/lib/components/MenuItem/renderMenuItem.js +12 -8
  90. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  91. package/lib/components/MenuItem/useCharacterSearch.js +7 -7
  92. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  93. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  94. package/lib/components/MenuItem/useMenuItem.js +37 -44
  95. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  96. package/lib/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  97. package/lib/components/MenuItem/useMenuItemStyles.js +31 -27
  98. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  99. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  100. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
  101. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  102. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  103. package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
  104. package/lib/components/MenuItemCheckbox/index.js +1 -0
  105. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  106. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  107. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
  108. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  109. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  110. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
  111. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  112. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  113. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +8 -5
  114. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  115. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  116. package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
  117. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  118. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  119. package/lib/components/MenuItemRadio/index.d.ts +1 -0
  120. package/lib/components/MenuItemRadio/index.js +1 -0
  121. package/lib/components/MenuItemRadio/index.js.map +1 -1
  122. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  123. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
  124. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  125. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  126. package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
  127. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  128. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  129. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +8 -5
  130. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  131. package/lib/components/MenuList/MenuList.d.ts +1 -1
  132. package/lib/components/MenuList/MenuList.js +10 -10
  133. package/lib/components/MenuList/MenuList.js.map +1 -1
  134. package/lib/components/MenuList/MenuList.types.d.ts +12 -10
  135. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  136. package/lib/components/MenuList/index.d.ts +1 -1
  137. package/lib/components/MenuList/index.js +0 -1
  138. package/lib/components/MenuList/index.js.map +1 -1
  139. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  140. package/lib/components/MenuList/renderMenuList.js +7 -7
  141. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  142. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  143. package/lib/components/MenuList/useMenuList.js +70 -87
  144. package/lib/components/MenuList/useMenuList.js.map +1 -1
  145. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  146. package/lib/components/MenuList/useMenuListContextValues.js +19 -17
  147. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  148. package/lib/components/MenuList/useMenuListStyles.d.ts +2 -1
  149. package/lib/components/MenuList/useMenuListStyles.js +9 -7
  150. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  151. package/lib/components/MenuPopover/MenuPopover.js +7 -7
  152. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  153. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  154. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  155. package/lib/components/MenuPopover/index.js.map +1 -1
  156. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  157. package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
  158. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  159. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  160. package/lib/components/MenuPopover/useMenuPopover.js +35 -41
  161. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  162. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  163. package/lib/components/MenuPopover/useMenuPopoverStyles.js +13 -8
  164. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  165. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  166. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  167. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  168. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  169. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  170. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  171. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  172. package/lib/components/MenuSplitGroup/index.js +6 -0
  173. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  174. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  175. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  176. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  177. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  178. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  179. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  180. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  181. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  182. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  183. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  184. package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
  185. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  186. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  187. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  188. package/lib/components/MenuTrigger/index.js.map +1 -1
  189. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  190. package/lib/components/MenuTrigger/renderMenuTrigger.js +2 -2
  191. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  192. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  193. package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
  194. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  195. package/lib/components/index.js.map +1 -1
  196. package/lib/contexts/menuContext.d.ts +1 -1
  197. package/lib/contexts/menuContext.js +5 -11
  198. package/lib/contexts/menuContext.js.map +1 -1
  199. package/lib/contexts/menuGroupContext.d.ts +1 -1
  200. package/lib/contexts/menuGroupContext.js +3 -5
  201. package/lib/contexts/menuGroupContext.js.map +1 -1
  202. package/lib/contexts/menuListContext.d.ts +1 -1
  203. package/lib/contexts/menuListContext.js +7 -17
  204. package/lib/contexts/menuListContext.js.map +1 -1
  205. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  206. package/lib/contexts/menuTriggerContext.js +4 -6
  207. package/lib/contexts/menuTriggerContext.js.map +1 -1
  208. package/lib/index.d.ts +11 -10
  209. package/lib/index.js +11 -10
  210. package/lib/index.js.map +1 -1
  211. package/lib/selectable/index.js.map +1 -1
  212. package/lib/selectable/types.js.map +1 -1
  213. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  214. package/lib/selectable/useCheckmarkStyles.js +4 -4
  215. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  216. package/lib/utils/index.js.map +1 -1
  217. package/lib/utils/useIsSubmenu.js +3 -5
  218. package/lib/utils/useIsSubmenu.js.map +1 -1
  219. package/lib/utils/useOnMenuEnter.js +16 -14
  220. package/lib/utils/useOnMenuEnter.js.map +1 -1
  221. package/lib-commonjs/Menu.js +1 -1
  222. package/lib-commonjs/Menu.js.map +1 -1
  223. package/lib-commonjs/MenuDivider.js +1 -1
  224. package/lib-commonjs/MenuDivider.js.map +1 -1
  225. package/lib-commonjs/MenuGroup.js +1 -1
  226. package/lib-commonjs/MenuGroup.js.map +1 -1
  227. package/lib-commonjs/MenuGroupHeader.js +1 -1
  228. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  229. package/lib-commonjs/MenuItem.js +1 -1
  230. package/lib-commonjs/MenuItem.js.map +1 -1
  231. package/lib-commonjs/MenuItemCheckbox.js +1 -1
  232. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  233. package/lib-commonjs/MenuItemRadio.js +1 -1
  234. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/MenuList.js +1 -1
  236. package/lib-commonjs/MenuList.js.map +1 -1
  237. package/lib-commonjs/MenuPopover.js +1 -1
  238. package/lib-commonjs/MenuPopover.js.map +1 -1
  239. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  240. package/lib-commonjs/MenuSplitGroup.js +10 -0
  241. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  242. package/lib-commonjs/MenuTrigger.js +1 -1
  243. package/lib-commonjs/MenuTrigger.js.map +1 -1
  244. package/lib-commonjs/components/Menu/Menu.js +7 -7
  245. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  246. package/lib-commonjs/components/Menu/Menu.types.d.ts +3 -2
  247. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  248. package/lib-commonjs/components/Menu/index.js +1 -1
  249. package/lib-commonjs/components/Menu/index.js.map +1 -1
  250. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  251. package/lib-commonjs/components/Menu/renderMenu.js +5 -5
  252. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  253. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  254. package/lib-commonjs/components/Menu/useMenu.js +130 -141
  255. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  256. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  257. package/lib-commonjs/components/Menu/useMenuContextValues.js +37 -35
  258. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  259. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  260. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -9
  261. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  262. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  263. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  264. package/lib-commonjs/components/MenuDivider/index.js +1 -1
  265. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  266. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  267. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +11 -12
  268. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  269. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  270. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +12 -11
  271. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  272. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  273. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +11 -7
  274. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  276. package/lib-commonjs/components/MenuGroup/MenuGroup.js +12 -9
  277. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  278. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  279. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  280. package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
  281. package/lib-commonjs/components/MenuGroup/index.js +3 -1
  282. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  283. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  284. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +12 -13
  285. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  286. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  287. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +13 -11
  288. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  289. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  290. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +11 -11
  291. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  292. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  293. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
  294. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  295. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  296. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -9
  297. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  298. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  299. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  300. package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
  301. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  302. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  303. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +11 -12
  304. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  305. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  306. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +16 -12
  307. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  308. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  309. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +11 -7
  310. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  311. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  312. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -12
  313. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  314. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  315. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  316. package/lib-commonjs/components/MenuItem/index.js +1 -1
  317. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  318. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  319. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -14
  320. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  321. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
  322. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  323. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  324. package/lib-commonjs/components/MenuItem/useMenuItem.js +45 -53
  325. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  326. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  327. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +40 -33
  328. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  329. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  330. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -9
  331. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  332. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  333. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
  334. package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
  335. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  336. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  337. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -14
  338. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  339. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  340. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +19 -21
  341. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  342. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  343. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +12 -7
  344. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  345. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  346. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -9
  347. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  348. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  349. package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
  350. package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
  351. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  352. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  353. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -14
  354. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  355. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  356. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +19 -20
  357. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  358. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  359. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +12 -7
  360. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  361. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  362. package/lib-commonjs/components/MenuList/MenuList.js +11 -11
  363. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  364. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +12 -10
  365. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  366. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  367. package/lib-commonjs/components/MenuList/index.js +1 -3
  368. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  369. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  370. package/lib-commonjs/components/MenuList/renderMenuList.js +12 -13
  371. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  372. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  373. package/lib-commonjs/components/MenuList/useMenuList.js +77 -95
  374. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  375. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  376. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +21 -19
  377. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  378. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +2 -1
  379. package/lib-commonjs/components/MenuList/useMenuListStyles.js +12 -9
  380. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  381. package/lib-commonjs/components/MenuPopover/MenuPopover.js +8 -8
  382. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  383. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  384. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  385. package/lib-commonjs/components/MenuPopover/index.js +1 -1
  386. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  387. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  388. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +14 -13
  389. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  390. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  391. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +43 -50
  392. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  393. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  394. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +17 -10
  395. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  396. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  397. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  398. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  399. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  400. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  401. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  402. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  403. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  404. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  405. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  406. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  407. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  408. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  409. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  410. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  411. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  412. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  413. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  414. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  415. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -5
  416. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  417. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  418. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  419. package/lib-commonjs/components/MenuTrigger/index.js +1 -1
  420. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  421. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  422. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +6 -6
  423. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  424. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  425. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +175 -7
  426. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  427. package/lib-commonjs/components/index.js +1 -1
  428. package/lib-commonjs/components/index.js.map +1 -1
  429. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  430. package/lib-commonjs/contexts/menuContext.js +6 -12
  431. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  432. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  433. package/lib-commonjs/contexts/menuGroupContext.js +5 -7
  434. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  435. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  436. package/lib-commonjs/contexts/menuListContext.js +8 -18
  437. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  438. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  439. package/lib-commonjs/contexts/menuTriggerContext.js +6 -8
  440. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  441. package/lib-commonjs/index.d.ts +11 -10
  442. package/lib-commonjs/index.js +17 -15
  443. package/lib-commonjs/index.js.map +1 -1
  444. package/lib-commonjs/selectable/index.js +1 -1
  445. package/lib-commonjs/selectable/index.js.map +1 -1
  446. package/lib-commonjs/selectable/types.js.map +1 -1
  447. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  448. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -7
  449. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  450. package/lib-commonjs/utils/index.js +1 -1
  451. package/lib-commonjs/utils/index.js.map +1 -1
  452. package/lib-commonjs/utils/useIsSubmenu.js +5 -7
  453. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  454. package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
  455. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  456. package/package.json +16 -17
  457. package/lib/common/isConformant.d.ts +0 -4
  458. package/lib/common/isConformant.js +0 -12
  459. package/lib/common/isConformant.js.map +0 -1
  460. package/lib/common/mockUseMenuContext.d.ts +0 -7
  461. package/lib/common/mockUseMenuContext.js +0 -36
  462. package/lib/common/mockUseMenuContext.js.map +0 -1
  463. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  464. package/lib/components/MenuTrigger/useTriggerElement.js +0 -179
  465. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  466. package/lib/utils/DefaultIcons.d.ts +0 -7
  467. package/lib/utils/DefaultIcons.js +0 -88
  468. package/lib/utils/DefaultIcons.js.map +0 -1
  469. package/lib-commonjs/common/isConformant.d.ts +0 -4
  470. package/lib-commonjs/common/isConformant.js +0 -23
  471. package/lib-commonjs/common/isConformant.js.map +0 -1
  472. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  473. package/lib-commonjs/common/mockUseMenuContext.js +0 -47
  474. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  475. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  476. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
  477. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
  478. package/lib-commonjs/utils/DefaultIcons.d.ts +0 -7
  479. package/lib-commonjs/utils/DefaultIcons.js +0 -100
  480. package/lib-commonjs/utils/DefaultIcons.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;;;AAKG;;;AACI,IAAM,cAAc,GAAG,UAAC,KAAD,EAAwB;AACpD,MAAM,KAAK,GAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAX,CADoD,CAGpD;;;AACA,SAAO,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;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AAwB,CAAA,EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,WAAtC,EAAmD,WAAnD;AAXwD,KAA7D;AAFL,GAAP;AAgBD,CA3HM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB;;AA6Hb,MAAM,gBAAgB,GAAI,CAAD,IAAoC;AAC3D,QAAM,UAAU,GAAI,EAAD,IACjB,EAAE,CAAC,YAAH,CAAgB,UAAhB,KAAgC,EAAE,CAAC,YAAH,CAAgB,eAAhB,KAAoC,EAAE,CAAC,YAAH,CAAgB,eAAhB,MAAqC,MAD3G;;AAEA,MAAI,CAAC,CAAC,MAAF,YAAoB,WAApB,IAAmC,UAAU,CAAC,CAAC,CAAC,MAAH,CAAjD,EAA6D;AAC3D,WAAO,IAAP;AACD;;AAED,SAAO,CAAC,CAAC,aAAF,YAA2B,WAA3B,IAA0C,UAAU,CAAC,CAAC,CAAC,aAAH,CAA3D;AACD,CARD","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n useMergedEventCallbacks,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { shouldPreventDefaultOnKeyDown } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */\nexport const useMenuTrigger_unstable = (props: MenuTriggerProps): MenuTriggerState => {\n const { children } = props;\n\n const triggerRef = useMenuContext_unstable(context => context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const open = useMenuContext_unstable(context => context.open);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const openOnHover = useMenuContext_unstable(context => context.openOnHover);\n const openOnContext = useMenuContext_unstable(context => context.openOnContext);\n\n const isSubmenu = useIsSubmenu();\n\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, menuPopoverRef]);\n\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n\n const child = React.isValidElement(children) ? getTriggerChild(children) : undefined;\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (!openOnContext) {\n setOpen(e, { open: !open, keyboard: openedWithKeyboardRef.current });\n openedWithKeyboardRef.current = false;\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (shouldPreventDefaultOnKeyDown(e)) {\n e.preventDefault();\n openedWithKeyboardRef.current = true;\n (e.target as HTMLElement)?.click();\n }\n\n const key = e.key;\n\n if (!openOnContext && ((isSubmenu && key === OpenArrowKey) || (!isSubmenu && key === ArrowDown))) {\n setOpen(e, { open: true, keyboard: true });\n }\n\n if (key === Escape && !isSubmenu) {\n setOpen(e, { open: false, keyboard: true });\n }\n\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n hasMouseMoved.current = true;\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover) {\n setOpen(e, { open: false, keyboard: false });\n }\n };\n\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren<MenuTriggerChildProps>(children, {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n id: triggerId,\n ...child?.props,\n ref: useMergedRefs(triggerRef, child?.ref),\n onClick: useMergedEventCallbacks(child?.props?.onClick, onClick),\n onMouseEnter: useMergedEventCallbacks(child?.props?.onMouseEnter, onMouseEnter),\n onMouseLeave: useMergedEventCallbacks(child?.props?.onMouseLeave, onMouseLeave),\n onKeyDown: useMergedEventCallbacks(child?.props?.onKeyDown, onKeyDown),\n onContextMenu: useMergedEventCallbacks(child?.props?.onContextMenu, onContextMenu),\n onMouseMove: useMergedEventCallbacks(child?.props?.onMouseMove, onMouseMove),\n }),\n };\n};\n\nconst isTargetDisabled = (e: React.SyntheticEvent | Event) => {\n const isDisabled = (el: HTMLElement) =>\n el.hasAttribute('disabled') || (el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true');\n if (e.target instanceof HTMLElement && isDisabled(e.target)) {\n return true;\n }\n\n return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);\n};\n"],"sourceRoot":"../src/"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./MenuItem/index"), exports);
10
10
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuItem/index';\nexport * from './MenuList/index';\n"],"sourceRoot":"../src/"}
@@ -13,4 +13,4 @@ export declare type MenuContextValue = MenuListProps & Pick<MenuState, 'openOnHo
13
13
  triggerId: string;
14
14
  };
15
15
  export declare const MenuProvider: React.Provider<MenuContextValue> & React.FC<React.ProviderProps<MenuContextValue>>;
16
- export declare const useMenuContext: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
16
+ export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
@@ -3,19 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuContext = exports.MenuProvider = exports.MenuContext = void 0;
6
+ exports.useMenuContext_unstable = exports.MenuProvider = exports.MenuContext = void 0;
7
7
 
8
- var react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
9
 
10
10
  exports.MenuContext = /*#__PURE__*/react_context_selector_1.createContext({
11
11
  open: false,
12
- setOpen: function () {
13
- return false;
14
- },
12
+ setOpen: () => false,
15
13
  checkedValues: {},
16
- onCheckedValueChange: function () {
17
- return null;
18
- },
14
+ onCheckedValueChange: () => null,
19
15
  defaultCheckedValues: {},
20
16
  isSubmenu: false,
21
17
  triggerRef: {
@@ -32,9 +28,7 @@ exports.MenuContext = /*#__PURE__*/react_context_selector_1.createContext({
32
28
  });
33
29
  exports.MenuProvider = exports.MenuContext.Provider;
34
30
 
35
- var useMenuContext = function (selector) {
36
- return react_context_selector_1.useContextSelector(exports.MenuContext, selector);
37
- };
31
+ const useMenuContext_unstable = selector => react_context_selector_1.useContextSelector(exports.MenuContext, selector);
38
32
 
39
- exports.useMenuContext = useMenuContext;
33
+ exports.useMenuContext_unstable = useMenuContext_unstable;
40
34
  //# sourceMappingURL=menuContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuContext.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,WAAA,gBAAyC,wBAAA,CAAA,aAAA,CAAgC;AACpF,EAAA,IAAI,EAAE,KAD8E;AAEpF,EAAA,OAAO,EAAE,YAAA;AAAM,WAAA,KAAA;AAAK,GAFgE;AAGpF,EAAA,aAAa,EAAE,EAHqE;AAIpF,EAAA,oBAAoB,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAJoD;AAKpF,EAAA,oBAAoB,EAAE,EAL8D;AAMpF,EAAA,SAAS,EAAE,KANyE;AAOpF,EAAA,UAAU,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GAPuE;AAQpF,EAAA,cAAc,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GARmE;AASpF,EAAA,SAAS,EAAE,EATyE;AAUpF,EAAA,aAAa,EAAE,KAVqE;AAWpF,EAAA,WAAW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sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { MenuListProps } from '../components/index';\nimport type { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue>({\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n defaultCheckedValues: {},\n isSubmenu: false,\n triggerRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n});\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = MenuListProps &\n Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n > & {\n open: boolean;\n triggerId: string;\n };\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, selector);\n"],"sourceRoot":"../src/"}
@@ -10,4 +10,4 @@ export declare type MenuGroupContextValue = {
10
10
  headerId: string;
11
11
  };
12
12
  export declare const MenuGroupContextProvider: React.Provider<MenuGroupContextValue>;
13
- export declare const useMenuGroupContext: () => MenuGroupContextValue;
13
+ export declare const useMenuGroupContext_unstable: () => MenuGroupContextValue;
@@ -3,18 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuGroupContext = exports.MenuGroupContextProvider = void 0;
6
+ exports.useMenuGroupContext_unstable = exports.MenuGroupContextProvider = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var MenuGroupContext = /*#__PURE__*/React.createContext({
10
+ const MenuGroupContext = /*#__PURE__*/React.createContext({
11
11
  headerId: ''
12
12
  });
13
13
  exports.MenuGroupContextProvider = MenuGroupContext.Provider;
14
14
 
15
- var useMenuGroupContext = function () {
16
- return React.useContext(MenuGroupContext);
17
- };
15
+ const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext);
18
16
 
19
- exports.useMenuGroupContext = useMenuGroupContext;
17
+ exports.useMenuGroupContext_unstable = useMenuGroupContext_unstable;
20
18
  //# sourceMappingURL=menuGroupContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,IAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,IAAM,mBAAmB,GAAG,YAAA;AAAM,SAAA,KAAK,CAAC,UAAN,CAAA,gBAAA,CAAA;AAAkC,CAApE;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourceRoot":""}
1
+ {"version":3,"sources":["contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,MAAM,4BAA4B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAA3C;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue>({ headerId: '' });\n\n/**\n * Context used to guarantee correct aria-relationship between header\n * and group information\n */\nexport type MenuGroupContextValue = {\n /**\n * Element id applied to the `MenuGroupHeader` component\n */\n headerId: string;\n};\n\nexport const MenuGroupContextProvider = MenuGroupContext.Provider;\nexport const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext);\n"],"sourceRoot":"../src/"}
@@ -12,4 +12,4 @@ export declare type MenuListContextValue = Pick<MenuListProps, 'checkedValues' |
12
12
  selectRadio?: SelectableHandler;
13
13
  };
14
14
  export declare const MenuListProvider: React.Provider<MenuListContextValue> & React.FC<React.ProviderProps<MenuListContextValue>>;
15
- export declare const useMenuListContext: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
15
+ export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
@@ -3,32 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuListContext = exports.MenuListProvider = exports.MenuListContext = void 0;
6
+ exports.useMenuListContext_unstable = exports.MenuListProvider = exports.MenuListContext = void 0;
7
7
 
8
- var react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
9
 
10
10
  exports.MenuListContext = /*#__PURE__*/react_context_selector_1.createContext({
11
11
  checkedValues: {},
12
- onCheckedValueChange: function () {
13
- return null;
14
- },
15
- setFocusByFirstCharacter: function () {
16
- return null;
17
- },
18
- toggleCheckbox: function () {
19
- return null;
20
- },
21
- selectRadio: function () {
22
- return null;
23
- },
12
+ onCheckedValueChange: () => null,
13
+ setFocusByFirstCharacter: () => null,
14
+ toggleCheckbox: () => null,
15
+ selectRadio: () => null,
24
16
  hasIcons: false,
25
17
  hasCheckmarks: false
26
18
  });
27
19
  exports.MenuListProvider = exports.MenuListContext.Provider;
28
20
 
29
- var useMenuListContext = function (selector) {
30
- return react_context_selector_1.useContextSelector(exports.MenuListContext, selector);
31
- };
21
+ const useMenuListContext_unstable = selector => react_context_selector_1.useContextSelector(exports.MenuListContext, selector);
32
22
 
33
- exports.useMenuListContext = useMenuListContext;
23
+ exports.useMenuListContext_unstable = useMenuListContext_unstable;
34
24
  //# sourceMappingURL=menuListContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,gBAAiD,wBAAA,CAAA,aAAA,CAAoC;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAFgE;AAGhG,EAAA,wBAAwB,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAH4D;AAIhG,EAAA,cAAc,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAJsE;AAKhG,EAAA,WAAW,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GALyE;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAApC,CAAjD;AAsBA,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,eAAA,CAAgB,QAAnC;;AAEN,IAAM,kBAAkB,GAAG,UAAK,QAAL,EAAuD;AACvF,SAAA,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,eAAnB,EAAoC,QAApC,CAAA;AAA6C,CADxC;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
1
+ {"version":3,"sources":["contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,gBAAiD,wBAAA,CAAA,aAAA,CAAoC;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,MAAM,IAFoE;AAGhG,EAAA,wBAAwB,EAAE,MAAM,IAHgE;AAIhG,EAAA,cAAc,EAAE,MAAM,IAJ0E;AAKhG,EAAA,WAAW,EAAE,MAAM,IAL6E;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAApC,CAAjD;AAsBA,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,eAAA,CAAgB,QAAnC;;AAEN,MAAM,2BAA2B,GAAQ,QAAL,IACzC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,eAAnB,EAAoC,QAApC,CADK;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { SelectableHandler } from '../selectable/index';\nimport type { MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue>({\n checkedValues: {},\n onCheckedValueChange: () => null,\n setFocusByFirstCharacter: () => null,\n toggleCheckbox: () => null,\n selectRadio: () => null,\n hasIcons: false,\n hasCheckmarks: false,\n});\n\n/**\n * Context shared between MenuList and its children components\n */\nexport type MenuListContextValue = Pick<\n MenuListProps,\n 'checkedValues' | 'onCheckedValueChange' | 'hasIcons' | 'hasCheckmarks'\n> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, selector);\n"],"sourceRoot":"../src/"}
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  export declare const MenuTriggerContextProvider: React.Provider<boolean>;
3
- export declare const useMenuTriggerContext: () => boolean;
3
+ export declare const useMenuTriggerContext_unstable: () => boolean;
@@ -3,20 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuTriggerContext = exports.MenuTriggerContextProvider = void 0;
6
+ exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
  /**
10
- * Context used communicate with child that it is a trigger for a menu
10
+ * Context used communicate with a child menu item that it is a trigger for a submenu
11
11
  */
12
12
 
13
13
 
14
- var MenuTriggerContext = /*#__PURE__*/React.createContext(false);
14
+ const MenuTriggerContext = /*#__PURE__*/React.createContext(false);
15
15
  exports.MenuTriggerContextProvider = MenuTriggerContext.Provider;
16
16
 
17
- var useMenuTriggerContext = function () {
18
- return React.useContext(MenuTriggerContext);
19
- };
17
+ const useMenuTriggerContext_unstable = () => React.useContext(MenuTriggerContext);
20
18
 
21
- exports.useMenuTriggerContext = useMenuTriggerContext;
19
+ exports.useMenuTriggerContext_unstable = useMenuTriggerContext_unstable;
22
20
  //# sourceMappingURL=menuTriggerContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAEA;;AAEG;;;AACH,IAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAA6B,KAA7B,CAA3B;AAEa,OAAA,CAAA,0BAAA,GAA6B,kBAAkB,CAAC,QAAhD;;AACN,IAAM,qBAAqB,GAAG,YAAA;AAAM,SAAA,KAAK,CAAC,UAAN,CAAA,kBAAA,CAAA;AAAoC,CAAxE;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
1
+ {"version":3,"sources":["contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAEA;;AAEG;;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAA6B,KAA7B,CAA3B;AAEa,OAAA,CAAA,0BAAA,GAA6B,kBAAkB,CAAC,QAAhD;;AACN,MAAM,8BAA8B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,kBAAjB,CAA7C;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\n\n/**\n * Context used communicate with a child menu item that it is a trigger for a submenu\n */\nconst MenuTriggerContext = React.createContext<boolean>(false);\n\nexport const MenuTriggerContextProvider = MenuTriggerContext.Provider;\nexport const useMenuTriggerContext_unstable = () => React.useContext(MenuTriggerContext);\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,16 @@
1
- export * from './MenuItem';
2
- export * from './MenuList';
3
- export * from './MenuItemCheckbox';
4
- export * from './MenuItemRadio';
5
- export * from './MenuDivider';
6
- export * from './MenuGroupHeader';
7
- export * from './MenuGroup';
8
- export * from './selectable/index';
9
- export * from './MenuTrigger';
10
- export * from './Menu';
11
1
  export * from './contexts/menuContext';
12
2
  export * from './contexts/menuTriggerContext';
13
3
  export * from './contexts/menuGroupContext';
14
4
  export * from './contexts/menuListContext';
5
+ export * from './Menu';
6
+ export * from './MenuDivider';
7
+ export * from './MenuGroup';
8
+ export * from './MenuGroupHeader';
9
+ export * from './MenuItem';
10
+ export * from './MenuItemCheckbox';
11
+ export * from './MenuItemRadio';
12
+ export * from './MenuList';
15
13
  export * from './MenuPopover';
14
+ export * from './MenuSplitGroup';
15
+ export * from './MenuTrigger';
16
+ export * from './selectable/index';
@@ -4,35 +4,37 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
- tslib_1.__exportStar(require("./MenuItem"), exports);
9
+ tslib_1.__exportStar(require("./contexts/menuContext"), exports);
10
10
 
11
- tslib_1.__exportStar(require("./MenuList"), exports);
11
+ tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
12
12
 
13
- tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
13
+ tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
14
14
 
15
- tslib_1.__exportStar(require("./MenuItemRadio"), exports);
15
+ tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
16
16
 
17
- tslib_1.__exportStar(require("./MenuDivider"), exports);
17
+ tslib_1.__exportStar(require("./Menu"), exports);
18
18
 
19
- tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
19
+ tslib_1.__exportStar(require("./MenuDivider"), exports);
20
20
 
21
21
  tslib_1.__exportStar(require("./MenuGroup"), exports);
22
22
 
23
- tslib_1.__exportStar(require("./selectable/index"), exports);
23
+ tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
24
24
 
25
- tslib_1.__exportStar(require("./MenuTrigger"), exports);
25
+ tslib_1.__exportStar(require("./MenuItem"), exports);
26
26
 
27
- tslib_1.__exportStar(require("./Menu"), exports);
27
+ tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
28
28
 
29
- tslib_1.__exportStar(require("./contexts/menuContext"), exports);
29
+ tslib_1.__exportStar(require("./MenuItemRadio"), exports);
30
30
 
31
- tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
31
+ tslib_1.__exportStar(require("./MenuList"), exports);
32
32
 
33
- tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
33
+ tslib_1.__exportStar(require("./MenuPopover"), exports);
34
34
 
35
- tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
35
+ tslib_1.__exportStar(require("./MenuSplitGroup"), exports);
36
36
 
37
- tslib_1.__exportStar(require("./MenuPopover"), exports);
37
+ tslib_1.__exportStar(require("./MenuTrigger"), exports);
38
+
39
+ tslib_1.__exportStar(require("./selectable/index"), exports);
38
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;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OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './contexts/menuContext';\nexport * from './contexts/menuTriggerContext';\nexport * from './contexts/menuGroupContext';\nexport * from './contexts/menuListContext';\n\nexport * from './Menu';\nexport * from './MenuDivider';\nexport * from './MenuGroup';\nexport * from './MenuGroupHeader';\nexport * from './MenuItem';\nexport * from './MenuItemCheckbox';\nexport * from './MenuItemRadio';\nexport * from './MenuList';\nexport * from './MenuPopover';\nexport * from './MenuSplitGroup';\nexport * from './MenuTrigger';\n\nexport * from './selectable/index';\n"],"sourceRoot":"../src/"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./useCheckmarkStyles"), exports);
10
10
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/selectable/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["selectable/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './useCheckmarkStyles';\nexport * from './types';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1,8 +1,8 @@
1
1
  import type { MenuItemSelectableState } from './types';
2
- import type { MenuItemSlots } from '../components/MenuItem/MenuItem.types';
2
+ import type { MenuItemState } from '../components/MenuItem/MenuItem.types';
3
3
  /**
4
4
  * Applies styles to a checkmark slot for selectable menu items
5
5
  *
6
6
  * @param state - should contain a `checkmark` slot
7
7
  */
8
- export declare const useCheckmarkStyles: (state: MenuItemSelectableState & Pick<MenuItemSlots, 'checkmark'>) => void;
8
+ export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => void;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useCheckmarkStyles = void 0;
6
+ exports.useCheckmarkStyles_unstable = void 0;
7
7
 
8
- var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
- var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
10
+ const useStyles = /*#__PURE__*/react_1.__styles({
11
11
  "root": {
12
12
  "a9b677": "fjw5fx7",
13
13
  "Bqenvij": "fd461yt",
@@ -26,13 +26,13 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
26
26
  */
27
27
 
28
28
 
29
- var useCheckmarkStyles = function (state) {
30
- var styles = useStyles();
29
+ const useCheckmarkStyles_unstable = state => {
30
+ const styles = useStyles();
31
31
 
32
32
  if (state.checkmark) {
33
- state.checkmark.className = react_make_styles_1.mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
33
+ state.checkmark.className = react_1.mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
34
34
  }
35
35
  };
36
36
 
37
- exports.useCheckmarkStyles = useCheckmarkStyles;
37
+ exports.useCheckmarkStyles_unstable = useCheckmarkStyles_unstable;
38
38
  //# sourceMappingURL=useCheckmarkStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAIA,IAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACI,IAAM,kBAAkB,GAAG,UAAC,KAAD,EAAkE;AAClG,MAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,mBAAA,CAAA,YAAA,CAC1B,MAAM,CAAC,IADmB,EAE1B,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFE,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;AAKD;AACF,CATM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
1
+ {"version":3,"sources":["selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAAsE;AAC/G,QAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,OAAA,CAAA,YAAA,CAC1B,MAAM,CAAC,IADmB,EAE1B,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFE,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;AAKD;AACF,CATM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuItemSelectableState } from './types';\nimport type { MenuItemState } from '../components/MenuItem/MenuItem.types';\n\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden',\n },\n rootChecked: {\n visibility: 'visible',\n },\n});\n\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */\nexport const useCheckmarkStyles_unstable = (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(\n styles.root,\n state.checked && styles.rootChecked,\n state.checkmark.className,\n );\n }\n};\n"],"sourceRoot":"../src/"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./useOnMenuEnter"), exports);
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './useOnMenuEnter';\n"],"sourceRoot":"../src/"}
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useIsSubmenu = void 0;
7
7
 
8
- var react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
9
 
10
- var menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
10
+ const menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
11
11
 
12
- var menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
12
+ const menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
13
13
  /**
14
14
  * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
15
15
  * or whether it is a part of a `MenuList`
@@ -21,10 +21,8 @@ var menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
21
21
 
22
22
 
23
23
  function useIsSubmenu() {
24
- var menuContextValue = menuContext_1.useMenuContext(function (context) {
25
- return context.isSubmenu;
26
- });
27
- var hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
24
+ const menuContextValue = menuContext_1.useMenuContext_unstable(context => context.isSubmenu);
25
+ const hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
28
26
  return menuContextValue || hasMenuListContext;
29
27
  }
30
28
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;AAOG;;;AACH,SAAgB,YAAhB,GAA4B;AAC1B,MAAM,gBAAgB,GAAG,aAAA,CAAA,cAAA,CAAe,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,SAAA;AAAiB,GAA3C,CAAzB;AACA,MAAM,kBAAkB,GAAG,wBAAA,CAAA,mBAAA,CAAoB,iBAAA,CAAA,eAApB,CAA3B;AAEA,SAAO,gBAAgB,IAAI,kBAA3B;AACD;;AALD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
1
+ {"version":3,"sources":["utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;AAOG;;;AACH,SAAgB,YAAhB,GAA4B;AAC1B,QAAM,gBAAgB,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,SAA3C,CAAzB;AACA,QAAM,kBAAkB,GAAG,wBAAA,CAAA,mBAAA,CAAoB,iBAAA,CAAA,eAApB,CAA3B;AAEA,SAAO,gBAAgB,IAAI,kBAA3B;AACD;;AALD,OAAA,CAAA,YAAA,GAAA,YAAA","sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\n\n/**\n * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true\n * or whether it is a part of a `MenuList`\n *\n * A simple hook to check box contexts easily\n *\n * @returns whether the component is part of a submenu\n */\nexport function useIsSubmenu() {\n const menuContextValue = useMenuContext_unstable(context => context.isSubmenu);\n const hasMenuListContext = useHasParentContext(MenuListContext);\n\n return menuContextValue || hasMenuListContext;\n}\n"],"sourceRoot":"../src/"}
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.dispatchMenuEnterEvent = exports.useOnMenuMouseEnter = exports.MENU_ENTER_EVENT = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
11
 
12
- var react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
12
+ const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
13
13
  /**
14
14
  * Name of the custom event
15
15
  */
@@ -28,27 +28,29 @@ exports.MENU_ENTER_EVENT = 'fuimenuenter';
28
28
  * Each nested menu can use the listener to check if the event is from a child or parent menu
29
29
  */
30
30
 
31
- var useOnMenuMouseEnter = function (options) {
32
- var refs = options.refs,
33
- callback = options.callback,
34
- element = options.element,
35
- disabled = options.disabled; // Keep mouse event here because this is essentially a custom 'mouseenter' event
31
+ const useOnMenuMouseEnter = options => {
32
+ const {
33
+ refs,
34
+ callback,
35
+ element,
36
+ disabled
37
+ } = options; // Keep mouse event here because this is essentially a custom 'mouseenter' event
36
38
 
37
- var listener = react_utilities_1.useEventCallback(function (ev) {
39
+ const listener = react_utilities_1.useEventCallback(ev => {
38
40
  var _a;
39
41
 
40
- var popoverRef = refs[0];
41
- var someMenuPopover = ev.target; // someMenu is a child -> will always be contained because of vParents
42
+ const popoverRef = refs[0];
43
+ const someMenuPopover = ev.target; // someMenu is a child -> will always be contained because of vParents
42
44
  // someMenu is a parent -> will always not be contained because no vParent
43
45
  // someMenu is the current popover -> it will contain itself
44
46
 
45
- var isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
47
+ const isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
46
48
 
47
49
  if (isOutsidePopover && !disabled) {
48
50
  callback(ev);
49
51
  }
50
52
  });
51
- React.useEffect(function () {
53
+ React.useEffect(() => {
52
54
  // eslint-disable-next-line eqeqeq
53
55
  if (element == null) {
54
56
  return;
@@ -58,7 +60,7 @@ var useOnMenuMouseEnter = function (options) {
58
60
  element.addEventListener(exports.MENU_ENTER_EVENT, listener);
59
61
  }
60
62
 
61
- return function () {
63
+ return () => {
62
64
  element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
63
65
  };
64
66
  }, [listener, element, disabled]);
@@ -71,11 +73,11 @@ exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
71
73
  * @param nativeEvent the native mouse event this is mapped to
72
74
  */
73
75
 
74
- var dispatchMenuEnterEvent = function (el, nativeEvent) {
76
+ const dispatchMenuEnterEvent = (el, nativeEvent) => {
75
77
  el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, {
76
78
  bubbles: true,
77
79
  detail: {
78
- nativeEvent: nativeEvent
80
+ nativeEvent
79
81
  }
80
82
  }));
81
83
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,GAAmB,cAAnB;AAEb;;;;;;;;;;AAUG;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;AACnB;AACA,QAAI,OAAO,IAAI,IAAf,EAAqB;AACnB;AACD;;AAUD,QAAI,CAAC,QAAL,EAAe;AACb,MAAA,OAAO,CAAC,gBAAR,CAAyB,OAAA,CAAA,gBAAzB,EAA2C,QAA3C;AACD;;AAED,WAAO,MAAK;AACV,MAAA,OAAO,CAAC,mBAAR,CAA4B,OAAA,CAAA,gBAA5B,EAA8C,QAA9C;AACD,KAFD;AAGD,GArBD,EAqBG,CAAC,QAAD,EAAW,OAAX,EAAoB,QAApB,CArBH;AAsBD,CAvCM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB;AAyCb;;;;AAIG;;AACI,MAAM,sBAAsB,GAAG,CAAC,EAAD,EAAkB,WAAlB,KAA6C;AACjF,EAAA,EAAE,CAAC,aAAH,CAAiB,IAAI,WAAJ,CAAgB,OAAA,CAAA,gBAAhB,EAAkC;AAAE,IAAA,OAAO,EAAE,IAAX;AAAiB,IAAA,MAAM,EAAE;AAAE,MAAA;AAAF;AAAzB,GAAlC,CAAjB;AACD,CAFM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { elementContains } from '@fluentui/react-portal';\nimport type { UseOnClickOrScrollOutsideOptions } from '@fluentui/react-utilities';\n\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\n\n/**\n * This hook works similarly to @see {useOnClickOutside}\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */\nexport const useOnMenuMouseEnter = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled } = options;\n\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev: MouseEvent) => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target as HTMLElement;\n\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains(popoverRef.current ?? null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n\n /**\n * Because `addEventListener` type override falls back to 2nd definition (evt name is unknown string literal)\n * evt is being typed as a base class of MouseEvent -> `Event`.\n * This type is used to override `listener` calls to make TS happy\n */\n\n type ListenerOverride = (evt: Event) => void;\n\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n }\n\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n };\n }, [listener, element, disabled]);\n};\n\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el element for the event target\n * @param nativeEvent the native mouse event this is mapped to\n */\nexport const dispatchMenuEnterEvent = (el: HTMLElement, nativeEvent: MouseEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent } }));\n};\n"],"sourceRoot":"../src/"}