@fluentui/react-menu 0.0.0-nightlyca6ef2bc8e20220105.1 → 0.0.0-nightlyd45ba4664620220211.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. package/CHANGELOG.json +204 -33
  2. package/CHANGELOG.md +47 -16
  3. package/dist/react-menu.d.ts +73 -80
  4. package/lib/components/Menu/Menu.js +6 -6
  5. package/lib/components/Menu/Menu.js.map +1 -1
  6. package/lib/components/Menu/Menu.types.d.ts +1 -1
  7. package/lib/components/Menu/renderMenu.d.ts +1 -1
  8. package/lib/components/Menu/renderMenu.js +1 -1
  9. package/lib/components/Menu/renderMenu.js.map +1 -1
  10. package/lib/components/Menu/useMenu.d.ts +2 -2
  11. package/lib/components/Menu/useMenu.js +6 -5
  12. package/lib/components/Menu/useMenu.js.map +1 -1
  13. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  14. package/lib/components/Menu/useMenuContextValues.js +1 -1
  15. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  16. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  17. package/lib/components/MenuDivider/MenuDivider.js +7 -7
  18. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  19. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  20. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  21. package/lib/components/MenuDivider/renderMenuDivider.js +1 -1
  22. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  23. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  24. package/lib/components/MenuDivider/useMenuDivider.js +4 -1
  25. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  26. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  27. package/lib/components/MenuDivider/useMenuDividerStyles.js +3 -2
  28. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  29. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  30. package/lib/components/MenuGroup/MenuGroup.js +9 -9
  31. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  33. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  34. package/lib/components/MenuGroup/renderMenuGroup.js +1 -1
  35. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  36. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  37. package/lib/components/MenuGroup/useMenuGroup.js +4 -1
  38. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  41. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  42. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  43. package/lib/components/MenuGroup/useMenuGroupStyles.js +2 -2
  44. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  45. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  46. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
  47. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  49. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  50. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -1
  51. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  52. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  53. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +6 -3
  54. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  55. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  56. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -2
  57. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  58. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  59. package/lib/components/MenuItem/MenuItem.js +7 -7
  60. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  61. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  62. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  63. package/lib/components/MenuItem/renderMenuItem.js +7 -8
  64. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  65. package/lib/components/MenuItem/useCharacterSearch.js +2 -2
  66. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  67. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  68. package/lib/components/MenuItem/useMenuItem.js +10 -15
  69. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  70. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  71. package/lib/components/MenuItem/useMenuItemStyles.js +12 -7
  72. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  73. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  74. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  75. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  76. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  77. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -7
  78. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  79. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  80. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  81. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  82. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  83. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +6 -6
  84. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  85. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  86. package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
  87. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  88. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  89. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -7
  90. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  91. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  92. package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  93. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  94. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  95. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +6 -6
  96. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  97. package/lib/components/MenuList/MenuList.d.ts +1 -1
  98. package/lib/components/MenuList/MenuList.js +9 -9
  99. package/lib/components/MenuList/MenuList.js.map +1 -1
  100. package/lib/components/MenuList/MenuList.types.d.ts +4 -4
  101. package/lib/components/MenuList/index.d.ts +1 -1
  102. package/lib/components/MenuList/index.js +0 -1
  103. package/lib/components/MenuList/index.js.map +1 -1
  104. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  105. package/lib/components/MenuList/renderMenuList.js +1 -1
  106. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  107. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  108. package/lib/components/MenuList/useMenuList.js +11 -8
  109. package/lib/components/MenuList/useMenuList.js.map +1 -1
  110. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  111. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  112. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  113. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
  114. package/lib/components/MenuList/useMenuListStyles.js +2 -2
  115. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  116. package/lib/components/MenuPopover/MenuPopover.js +6 -6
  117. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  118. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  119. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  120. package/lib/components/MenuPopover/renderMenuPopover.js +1 -1
  121. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  122. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  123. package/lib/components/MenuPopover/useMenuPopover.js +11 -8
  124. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  125. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  126. package/lib/components/MenuPopover/useMenuPopoverStyles.js +3 -2
  127. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  128. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +6 -6
  129. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  130. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
  131. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  132. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -3
  133. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  134. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
  135. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +3 -8
  136. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  137. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  138. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +3 -2
  139. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  140. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  141. package/lib/components/MenuTrigger/MenuTrigger.js +5 -4
  142. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  143. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
  144. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  145. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  146. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  147. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  148. package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
  149. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  150. package/lib/contexts/menuContext.d.ts +1 -1
  151. package/lib/contexts/menuContext.js +1 -1
  152. package/lib/contexts/menuContext.js.map +1 -1
  153. package/lib/contexts/menuGroupContext.d.ts +1 -1
  154. package/lib/contexts/menuGroupContext.js +1 -1
  155. package/lib/contexts/menuGroupContext.js.map +1 -1
  156. package/lib/contexts/menuListContext.d.ts +1 -1
  157. package/lib/contexts/menuListContext.js +1 -1
  158. package/lib/contexts/menuListContext.js.map +1 -1
  159. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  160. package/lib/contexts/menuTriggerContext.js +1 -1
  161. package/lib/contexts/menuTriggerContext.js.map +1 -1
  162. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  163. package/lib/selectable/useCheckmarkStyles.js +2 -2
  164. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  165. package/lib/utils/useIsSubmenu.js +2 -2
  166. package/lib/utils/useIsSubmenu.js.map +1 -1
  167. package/lib-commonjs/components/Menu/Menu.js +3 -3
  168. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  169. package/lib-commonjs/components/Menu/Menu.types.d.ts +1 -1
  170. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  171. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  172. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  173. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  174. package/lib-commonjs/components/Menu/useMenu.js +7 -6
  175. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  176. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  177. package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
  178. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  179. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  180. package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
  181. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  182. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  183. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  184. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +3 -3
  185. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  186. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  187. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +6 -3
  188. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  189. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  190. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
  191. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  192. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  193. package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
  194. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  195. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  196. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  197. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +3 -3
  198. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  199. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  200. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +6 -3
  201. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  202. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  203. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
  204. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  205. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  206. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -5
  207. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  208. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  209. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
  210. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  211. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  212. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  213. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -3
  214. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  215. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  216. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +7 -4
  217. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  218. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  219. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
  220. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  221. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  222. package/lib-commonjs/components/MenuItem/MenuItem.js +4 -4
  223. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  224. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  225. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  226. package/lib-commonjs/components/MenuItem/renderMenuItem.js +9 -11
  227. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  228. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
  229. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  230. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  231. package/lib-commonjs/components/MenuItem/useMenuItem.js +10 -15
  232. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  233. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  234. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +20 -14
  235. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  236. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  237. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  238. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  239. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  240. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +8 -10
  241. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  242. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  243. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  244. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  245. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  246. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +7 -7
  247. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  248. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  249. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
  250. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  251. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  252. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +8 -10
  253. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  254. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  255. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  256. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  257. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  258. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +7 -7
  259. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  260. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  261. package/lib-commonjs/components/MenuList/MenuList.js +5 -5
  262. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  263. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +4 -4
  264. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  265. package/lib-commonjs/components/MenuList/index.js +0 -2
  266. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  267. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  268. package/lib-commonjs/components/MenuList/renderMenuList.js +3 -3
  269. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  270. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  271. package/lib-commonjs/components/MenuList/useMenuList.js +12 -9
  272. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  273. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  274. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
  275. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  276. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
  277. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -6
  278. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  279. package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
  280. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  281. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  282. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  283. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +3 -3
  284. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  285. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  286. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +12 -9
  287. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  288. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  289. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +8 -6
  290. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  291. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -3
  292. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  293. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
  294. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  295. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +4 -6
  296. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  297. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
  298. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +6 -11
  299. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  300. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  301. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +8 -6
  302. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  303. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  304. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +3 -2
  305. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  306. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
  307. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  308. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
  309. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  310. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  311. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +176 -7
  312. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  313. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  314. package/lib-commonjs/contexts/menuContext.js +3 -3
  315. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  316. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  317. package/lib-commonjs/contexts/menuGroupContext.js +3 -3
  318. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  319. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  320. package/lib-commonjs/contexts/menuListContext.js +3 -3
  321. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  322. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  323. package/lib-commonjs/contexts/menuTriggerContext.js +3 -3
  324. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  325. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  326. package/lib-commonjs/selectable/useCheckmarkStyles.js +6 -6
  327. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  328. package/lib-commonjs/utils/useIsSubmenu.js +1 -1
  329. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  330. package/package.json +13 -15
  331. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  332. package/lib/components/MenuTrigger/useTriggerElement.js +0 -166
  333. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  334. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  335. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -181
  336. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -21,7 +21,7 @@ const menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
21
21
 
22
22
 
23
23
  function useIsSubmenu() {
24
- const menuContextValue = menuContext_1.useMenuContext(context => context.isSubmenu);
24
+ const menuContextValue = menuContext_1.useMenuContext_unstable(context => context.isSubmenu);
25
25
  const hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
26
26
  return menuContextValue || hasMenuListContext;
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/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,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,SAAlC,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","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/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","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "0.0.0-nightlyca6ef2bc8e20220105.1",
3
+ "version": "0.0.0-nightlyd45ba4664620220211.1",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,16 +22,14 @@
22
22
  "just": "just-scripts",
23
23
  "lint": "just-scripts lint",
24
24
  "start": "yarn storybook",
25
- "storybook": "start-storybook",
26
- "test": "jest",
25
+ "storybook": "node ../../scripts/storybook/runner",
26
+ "test": "jest --passWithNoTests",
27
27
  "type-check": "tsc -b tsconfig.json"
28
28
  },
29
29
  "devDependencies": {
30
- "@fluentui/babel-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
31
30
  "@fluentui/eslint-plugin": "*",
32
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
33
31
  "@fluentui/react-conformance": "*",
34
- "@fluentui/react-conformance-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
32
+ "@fluentui/react-conformance-griffel": "0.0.0-nightlyd45ba4664620220211.1",
35
33
  "@fluentui/scripts": "^1.0.0",
36
34
  "@types/enzyme": "3.10.3",
37
35
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -45,15 +43,15 @@
45
43
  "react-test-renderer": "^16.3.0"
46
44
  },
47
45
  "dependencies": {
48
- "@fluentui/keyboard-keys": "0.0.0-nightlyca6ef2bc8e20220105.1",
49
- "@fluentui/react-context-selector": "0.0.0-nightlyca6ef2bc8e20220105.1",
50
- "@fluentui/react-icons": "^2.0.154-beta.5",
51
- "@fluentui/react-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
52
- "@fluentui/react-portal": "0.0.0-nightlyca6ef2bc8e20220105.1",
53
- "@fluentui/react-positioning": "0.0.0-nightlyca6ef2bc8e20220105.1",
54
- "@fluentui/react-shared-contexts": "0.0.0-nightlyca6ef2bc8e20220105.1",
55
- "@fluentui/react-tabster": "0.0.0-nightlyca6ef2bc8e20220105.1",
56
- "@fluentui/react-utilities": "0.0.0-nightlyca6ef2bc8e20220105.1",
46
+ "@fluentui/keyboard-keys": "0.0.0-nightlyd45ba4664620220211.1",
47
+ "@fluentui/react-context-selector": "0.0.0-nightlyd45ba4664620220211.1",
48
+ "@fluentui/react-icons": "^2.0.159-beta.10",
49
+ "@griffel/react": "1.0.0",
50
+ "@fluentui/react-portal": "0.0.0-nightlyd45ba4664620220211.1",
51
+ "@fluentui/react-positioning": "0.0.0-nightlyd45ba4664620220211.1",
52
+ "@fluentui/react-shared-contexts": "0.0.0-nightlyd45ba4664620220211.1",
53
+ "@fluentui/react-tabster": "0.0.0-nightlyd45ba4664620220211.1",
54
+ "@fluentui/react-utilities": "0.0.0-nightlyd45ba4664620220211.1",
57
55
  "tslib": "^2.1.0"
58
56
  },
59
57
  "peerDependencies": {
@@ -1,5 +0,0 @@
1
- import type { MenuTriggerState } from './MenuTrigger.types';
2
- /**
3
- * Adds the necessary props to the trigger element
4
- */
5
- export declare const useTriggerElement: (state: MenuTriggerState) => MenuTriggerState;
@@ -1,166 +0,0 @@
1
- import * as React from 'react';
2
- import { ArrowRight, ArrowDown, ArrowLeft, Escape } from '@fluentui/keyboard-keys';
3
- import { applyTriggerPropsToChildren, onlyChild, shouldPreventDefaultOnKeyDown, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
4
- import { useFocusFinders } from '@fluentui/react-tabster';
5
- import { useMenuContext } from '../../contexts/menuContext';
6
- import { useFluent } from '@fluentui/react-shared-contexts';
7
- import { useIsSubmenu } from '../../utils/useIsSubmenu';
8
-
9
- const noop = () => null;
10
- /**
11
- * Adds the necessary props to the trigger element
12
- */
13
-
14
-
15
- export const useTriggerElement = state => {
16
- var _a, _b;
17
-
18
- const triggerRef = useMenuContext(context => context.triggerRef);
19
- const menuPopoverRef = useMenuContext(context => context.menuPopoverRef);
20
- const setOpen = useMenuContext(context => context.setOpen);
21
- const open = useMenuContext(context => context.open);
22
- const triggerId = useMenuContext(context => context.triggerId);
23
- const openOnHover = useMenuContext(context => context.openOnHover);
24
- const openOnContext = useMenuContext(context => context.openOnContext);
25
- const isSubmenu = useIsSubmenu();
26
- const {
27
- findFirstFocusable
28
- } = useFocusFinders();
29
- const focusFirst = React.useCallback(() => {
30
- const firstFocusable = findFirstFocusable(menuPopoverRef.current);
31
- firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
32
- }, [findFirstFocusable, menuPopoverRef]);
33
- const openedWithKeyboardRef = React.useRef(false);
34
- const hasMouseMoved = React.useRef(false);
35
- const {
36
- dir
37
- } = useFluent();
38
- const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;
39
- const child = /*#__PURE__*/React.isValidElement(state.children) ? onlyChild(state.children) : undefined;
40
- const onContextMenu = useEventCallback(e => {
41
- var _a, _b;
42
-
43
- if (openOnContext) {
44
- e.preventDefault();
45
- setOpen(e, {
46
- open: true,
47
- keyboard: false
48
- });
49
- }
50
-
51
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onContextMenu) === null || _b === void 0 ? void 0 : _b.call(_a, e);
52
- });
53
- const onClick = useEventCallback(e => {
54
- var _a, _b;
55
-
56
- if (!openOnContext) {
57
- setOpen(e, {
58
- open: !open,
59
- keyboard: openedWithKeyboardRef.current
60
- });
61
- openedWithKeyboardRef.current = false;
62
- }
63
-
64
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
65
- });
66
- const onKeyDown = useEventCallback(e => {
67
- var _a, _b, _c;
68
-
69
- if (shouldPreventDefaultOnKeyDown(e)) {
70
- e.preventDefault();
71
- openedWithKeyboardRef.current = true;
72
- (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
73
- }
74
-
75
- const key = e.key;
76
-
77
- if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === ArrowDown)) {
78
- setOpen(e, {
79
- open: true,
80
- keyboard: true
81
- });
82
- }
83
-
84
- if (key === Escape && !isSubmenu) {
85
- setOpen(e, {
86
- open: false,
87
- keyboard: true
88
- });
89
- } // if menu is already open, can't rely on effects to focus
90
-
91
-
92
- if (open && key === OpenArrowKey && isSubmenu) {
93
- focusFirst();
94
- }
95
-
96
- (_c = (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, e);
97
- });
98
- const onMouseEnter = useEventCallback(e => {
99
- var _a, _b;
100
-
101
- if (openOnHover && hasMouseMoved.current) {
102
- setOpen(e, {
103
- open: true,
104
- keyboard: false
105
- });
106
- }
107
-
108
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(_a, e);
109
- }); // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
110
- // First time open the mouse using mousemove and then continue with mouseenter
111
- // Only use once to determine that the user is using the mouse since it is an expensive event to handle
112
-
113
- const onMouseMove = useEventCallback(e => {
114
- if (openOnHover && !hasMouseMoved.current) {
115
- setOpen(e, {
116
- open: true,
117
- keyboard: false
118
- });
119
- hasMouseMoved.current = true;
120
- }
121
- });
122
- const onMouseLeave = useEventCallback(e => {
123
- var _a, _b;
124
-
125
- if (openOnHover) {
126
- setOpen(e, {
127
- open: false,
128
- keyboard: false
129
- });
130
- }
131
-
132
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseLeave) === null || _b === void 0 ? void 0 : _b.call(_a, e);
133
- });
134
- const disabled = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.disabled;
135
- const triggerProps = {
136
- 'aria-haspopup': 'menu',
137
- 'aria-expanded': open,
138
- id: ((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id) || triggerId,
139
- ...(!disabled ? {
140
- onClick,
141
- onMouseEnter,
142
- onMouseLeave,
143
- onContextMenu,
144
- onKeyDown,
145
- onMouseMove
146
- } : // Spread disabled event handlers to implement contract and avoid specific disabled logic in handlers
147
- {
148
- onClick: noop,
149
- onMouseEnter: noop,
150
- onMouseLeave: noop,
151
- onContextMenu: noop,
152
- onKeyDown: noop,
153
- onMouseMove: noop
154
- })
155
- };
156
-
157
- if (!open && !isSubmenu) {
158
- triggerProps['aria-expanded'] = undefined;
159
- }
160
-
161
- state.children = applyTriggerPropsToChildren(state.children, { ...triggerProps,
162
- ref: useMergedRefs(typeof state.children !== 'function' && state.children.ref || null, triggerRef)
163
- });
164
- return state;
165
- };
166
- //# sourceMappingURL=useTriggerElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useTriggerElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,UAAT,EAAqB,SAArB,EAAgC,SAAhC,EAA2C,MAA3C,QAAyD,yBAAzD;AACA,SACE,2BADF,EAEE,SAFF,EAGE,6BAHF,EAIE,gBAJF,EAKE,aALF,QAMO,2BANP;AAOA,SAAS,eAAT,QAAgC,yBAAhC;AACA,S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AJjB;AAKE,MAAA,SAAS,EAAE,IALb;AAME,MAAA,WAAW,EAAE;AANf,KAVJ;AAL0C,GAA5C;;AAyBA,MAAI,CAAC,IAAD,IAAS,CAAC,SAAd,EAAyB;AACvB,IAAA,YAAY,CAAC,eAAD,CAAZ,GAAgC,SAAhC;AACD;;AAED,EAAA,KAAK,CAAC,QAAN,GAAiB,2BAA2B,CAAC,KAAK,CAAC,QAAP,EAAiB,EAC3D,GAAG,YADwD;AAE3D,IAAA,GAAG,EAAE,aAAa,CAAE,OAAO,KAAK,CAAC,QAAb,KAA0B,UAA1B,IAAwC,KAAK,CAAC,QAAN,CAAe,GAAxD,IAAgE,IAAjE,EAAuE,UAAvE;AAFyC,GAAjB,CAA5C;AAKA,SAAO,KAAP;AACD,CAhIM","sourceRoot":""}
@@ -1,5 +0,0 @@
1
- import type { MenuTriggerState } from './MenuTrigger.types';
2
- /**
3
- * Adds the necessary props to the trigger element
4
- */
5
- export declare const useTriggerElement: (state: MenuTriggerState) => MenuTriggerState;
@@ -1,181 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useTriggerElement = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
-
10
- const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
11
-
12
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
-
14
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
-
16
- const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
17
-
18
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
19
-
20
- const useIsSubmenu_1 = /*#__PURE__*/require("../../utils/useIsSubmenu");
21
-
22
- const noop = () => null;
23
- /**
24
- * Adds the necessary props to the trigger element
25
- */
26
-
27
-
28
- const useTriggerElement = state => {
29
- var _a, _b;
30
-
31
- const triggerRef = menuContext_1.useMenuContext(context => context.triggerRef);
32
- const menuPopoverRef = menuContext_1.useMenuContext(context => context.menuPopoverRef);
33
- const setOpen = menuContext_1.useMenuContext(context => context.setOpen);
34
- const open = menuContext_1.useMenuContext(context => context.open);
35
- const triggerId = menuContext_1.useMenuContext(context => context.triggerId);
36
- const openOnHover = menuContext_1.useMenuContext(context => context.openOnHover);
37
- const openOnContext = menuContext_1.useMenuContext(context => context.openOnContext);
38
- const isSubmenu = useIsSubmenu_1.useIsSubmenu();
39
- const {
40
- findFirstFocusable
41
- } = react_tabster_1.useFocusFinders();
42
- const focusFirst = React.useCallback(() => {
43
- const firstFocusable = findFirstFocusable(menuPopoverRef.current);
44
- firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
45
- }, [findFirstFocusable, menuPopoverRef]);
46
- const openedWithKeyboardRef = React.useRef(false);
47
- const hasMouseMoved = React.useRef(false);
48
- const {
49
- dir
50
- } = react_shared_contexts_1.useFluent();
51
- const OpenArrowKey = dir === 'ltr' ? keyboard_keys_1.ArrowRight : keyboard_keys_1.ArrowLeft;
52
- const child = React.isValidElement(state.children) ? react_utilities_1.onlyChild(state.children) : undefined;
53
- const onContextMenu = react_utilities_1.useEventCallback(e => {
54
- var _a, _b;
55
-
56
- if (openOnContext) {
57
- e.preventDefault();
58
- setOpen(e, {
59
- open: true,
60
- keyboard: false
61
- });
62
- }
63
-
64
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onContextMenu) === null || _b === void 0 ? void 0 : _b.call(_a, e);
65
- });
66
- const onClick = react_utilities_1.useEventCallback(e => {
67
- var _a, _b;
68
-
69
- if (!openOnContext) {
70
- setOpen(e, {
71
- open: !open,
72
- keyboard: openedWithKeyboardRef.current
73
- });
74
- openedWithKeyboardRef.current = false;
75
- }
76
-
77
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
78
- });
79
- const onKeyDown = react_utilities_1.useEventCallback(e => {
80
- var _a, _b, _c;
81
-
82
- if (react_utilities_1.shouldPreventDefaultOnKeyDown(e)) {
83
- e.preventDefault();
84
- openedWithKeyboardRef.current = true;
85
- (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
86
- }
87
-
88
- const key = e.key;
89
-
90
- if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === keyboard_keys_1.ArrowDown)) {
91
- setOpen(e, {
92
- open: true,
93
- keyboard: true
94
- });
95
- }
96
-
97
- if (key === keyboard_keys_1.Escape && !isSubmenu) {
98
- setOpen(e, {
99
- open: false,
100
- keyboard: true
101
- });
102
- } // if menu is already open, can't rely on effects to focus
103
-
104
-
105
- if (open && key === OpenArrowKey && isSubmenu) {
106
- focusFirst();
107
- }
108
-
109
- (_c = (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, e);
110
- });
111
- const onMouseEnter = react_utilities_1.useEventCallback(e => {
112
- var _a, _b;
113
-
114
- if (openOnHover && hasMouseMoved.current) {
115
- setOpen(e, {
116
- open: true,
117
- keyboard: false
118
- });
119
- }
120
-
121
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(_a, e);
122
- }); // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
123
- // First time open the mouse using mousemove and then continue with mouseenter
124
- // Only use once to determine that the user is using the mouse since it is an expensive event to handle
125
-
126
- const onMouseMove = react_utilities_1.useEventCallback(e => {
127
- if (openOnHover && !hasMouseMoved.current) {
128
- setOpen(e, {
129
- open: true,
130
- keyboard: false
131
- });
132
- hasMouseMoved.current = true;
133
- }
134
- });
135
- const onMouseLeave = react_utilities_1.useEventCallback(e => {
136
- var _a, _b;
137
-
138
- if (openOnHover) {
139
- setOpen(e, {
140
- open: false,
141
- keyboard: false
142
- });
143
- }
144
-
145
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseLeave) === null || _b === void 0 ? void 0 : _b.call(_a, e);
146
- });
147
- const disabled = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.disabled;
148
- const triggerProps = {
149
- 'aria-haspopup': 'menu',
150
- 'aria-expanded': open,
151
- id: ((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id) || triggerId,
152
- ...(!disabled ? {
153
- onClick,
154
- onMouseEnter,
155
- onMouseLeave,
156
- onContextMenu,
157
- onKeyDown,
158
- onMouseMove
159
- } : // Spread disabled event handlers to implement contract and avoid specific disabled logic in handlers
160
- {
161
- onClick: noop,
162
- onMouseEnter: noop,
163
- onMouseLeave: noop,
164
- onContextMenu: noop,
165
- onKeyDown: noop,
166
- onMouseMove: noop
167
- })
168
- };
169
-
170
- if (!open && !isSubmenu) {
171
- triggerProps['aria-expanded'] = undefined;
172
- }
173
-
174
- state.children = react_utilities_1.applyTriggerPropsToChildren(state.children, { ...triggerProps,
175
- ref: react_utilities_1.useMergedRefs(typeof state.children !== 'function' && state.children.ref || null, triggerRef)
176
- });
177
- return state;
178
- };
179
-
180
- exports.useTriggerElement = useTriggerElement;
181
- //# sourceMappingURL=useTriggerElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useTriggerElement.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,cAAA,gB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