@fluentui/react-menu 9.7.3 → 9.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +139 -1
  3. package/CHANGELOG.md +38 -2
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuDivider.js.map +1 -1
  6. package/lib/MenuGroup.js.map +1 -1
  7. package/lib/MenuGroupHeader.js.map +1 -1
  8. package/lib/MenuItem.js.map +1 -1
  9. package/lib/MenuItemCheckbox.js.map +1 -1
  10. package/lib/MenuItemRadio.js.map +1 -1
  11. package/lib/MenuList.js.map +1 -1
  12. package/lib/MenuPopover.js.map +1 -1
  13. package/lib/MenuSplitGroup.js.map +1 -1
  14. package/lib/MenuTrigger.js.map +1 -1
  15. package/lib/components/Menu/Menu.js +1 -0
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js +1 -1
  18. package/lib/components/Menu/Menu.types.js.map +1 -1
  19. package/lib/components/Menu/index.js.map +1 -1
  20. package/lib/components/Menu/renderMenu.js.map +1 -1
  21. package/lib/components/Menu/useMenu.js +9 -8
  22. package/lib/components/Menu/useMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  24. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  25. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  26. package/lib/components/MenuDivider/index.js.map +1 -1
  27. package/lib/components/MenuDivider/renderMenuDivider.js +1 -3
  28. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDivider.js +1 -0
  30. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  34. package/lib/components/MenuGroup/index.js.map +1 -1
  35. package/lib/components/MenuGroup/renderMenuGroup.js +1 -3
  36. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  37. package/lib/components/MenuGroup/useMenuGroup.js +1 -0
  38. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  41. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  43. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  44. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
  45. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  46. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -0
  47. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  49. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  50. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  51. package/lib/components/MenuItem/index.js.map +1 -1
  52. package/lib/components/MenuItem/renderMenuItem.js +1 -13
  53. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  54. package/lib/components/MenuItem/useCharacterSearch.js +3 -2
  55. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  56. package/lib/components/MenuItem/useMenuItem.js +7 -7
  57. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  58. package/lib/components/MenuItem/useMenuItemStyles.js +15 -2
  59. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  60. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  61. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  62. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  63. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -11
  64. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  65. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  66. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  67. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  68. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  69. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  70. package/lib/components/MenuItemRadio/index.js.map +1 -1
  71. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -11
  72. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  73. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  74. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  75. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  76. package/lib/components/MenuList/MenuList.js.map +1 -1
  77. package/lib/components/MenuList/MenuList.types.js +1 -1
  78. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  79. package/lib/components/MenuList/index.js.map +1 -1
  80. package/lib/components/MenuList/renderMenuList.js +1 -3
  81. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  82. package/lib/components/MenuList/useMenuList.js +6 -5
  83. package/lib/components/MenuList/useMenuList.js.map +1 -1
  84. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  85. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  86. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  87. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  88. package/lib/components/MenuPopover/index.js.map +1 -1
  89. package/lib/components/MenuPopover/renderMenuPopover.js +2 -6
  90. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  91. package/lib/components/MenuPopover/useMenuPopover.js +4 -4
  92. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  93. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  94. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  95. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  96. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  97. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
  98. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  99. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -2
  100. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  101. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  102. package/lib/components/MenuTrigger/MenuTrigger.js +1 -0
  103. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  104. package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
  105. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  106. package/lib/components/MenuTrigger/index.js.map +1 -1
  107. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  108. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  109. package/lib/components/index.js.map +1 -1
  110. package/lib/contexts/menuContext.js +1 -0
  111. package/lib/contexts/menuContext.js.map +1 -1
  112. package/lib/contexts/menuGroupContext.js +2 -4
  113. package/lib/contexts/menuGroupContext.js.map +1 -1
  114. package/lib/contexts/menuListContext.js +1 -0
  115. package/lib/contexts/menuListContext.js.map +1 -1
  116. package/lib/contexts/menuTriggerContext.js +2 -4
  117. package/lib/contexts/menuTriggerContext.js.map +1 -1
  118. package/lib/index.js.map +1 -1
  119. package/lib/selectable/index.js.map +1 -1
  120. package/lib/selectable/types.js +1 -1
  121. package/lib/selectable/types.js.map +1 -1
  122. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  123. package/lib/utils/index.js.map +1 -1
  124. package/lib/utils/useIsSubmenu.js.map +1 -1
  125. package/lib/utils/useOnMenuEnter.js +2 -2
  126. package/lib/utils/useOnMenuEnter.js.map +1 -1
  127. package/lib-commonjs/Menu.js +5 -4
  128. package/lib-commonjs/Menu.js.map +1 -1
  129. package/lib-commonjs/MenuDivider.js +5 -4
  130. package/lib-commonjs/MenuDivider.js.map +1 -1
  131. package/lib-commonjs/MenuGroup.js +5 -4
  132. package/lib-commonjs/MenuGroup.js.map +1 -1
  133. package/lib-commonjs/MenuGroupHeader.js +5 -4
  134. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  135. package/lib-commonjs/MenuItem.js +5 -4
  136. package/lib-commonjs/MenuItem.js.map +1 -1
  137. package/lib-commonjs/MenuItemCheckbox.js +5 -4
  138. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  139. package/lib-commonjs/MenuItemRadio.js +5 -4
  140. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  141. package/lib-commonjs/MenuList.js +5 -4
  142. package/lib-commonjs/MenuList.js.map +1 -1
  143. package/lib-commonjs/MenuPopover.js +5 -4
  144. package/lib-commonjs/MenuPopover.js.map +1 -1
  145. package/lib-commonjs/MenuSplitGroup.js +5 -4
  146. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  147. package/lib-commonjs/MenuTrigger.js +5 -4
  148. package/lib-commonjs/MenuTrigger.js.map +1 -1
  149. package/lib-commonjs/components/Menu/Menu.js +16 -15
  150. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  151. package/lib-commonjs/components/Menu/Menu.types.js +5 -2
  152. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  153. package/lib-commonjs/components/Menu/index.js +9 -8
  154. package/lib-commonjs/components/Menu/index.js.map +1 -1
  155. package/lib-commonjs/components/Menu/renderMenu.js +14 -14
  156. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  157. package/lib-commonjs/components/Menu/useMenu.js +258 -256
  158. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  159. package/lib-commonjs/components/Menu/useMenuContextValues.js +29 -43
  160. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  161. package/lib-commonjs/components/MenuDivider/MenuDivider.js +19 -20
  162. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  163. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +3 -2
  164. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  165. package/lib-commonjs/components/MenuDivider/index.js +9 -8
  166. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +13 -19
  168. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  169. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +22 -21
  170. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  171. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +47 -25
  172. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  173. package/lib-commonjs/components/MenuGroup/MenuGroup.js +21 -22
  174. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +3 -2
  176. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroup/index.js +10 -9
  178. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +16 -22
  180. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +23 -22
  182. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  183. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +18 -15
  184. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  185. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +19 -11
  186. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  187. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +19 -20
  188. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  189. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +3 -2
  190. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  191. package/lib-commonjs/components/MenuGroupHeader/index.js +9 -8
  192. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  193. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +13 -19
  194. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  195. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +22 -23
  196. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  197. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +47 -25
  198. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  199. package/lib-commonjs/components/MenuItem/MenuItem.js +19 -20
  200. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  201. package/lib-commonjs/components/MenuItem/MenuItem.types.js +3 -2
  202. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  203. package/lib-commonjs/components/MenuItem/index.js +9 -8
  204. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  205. package/lib-commonjs/components/MenuItem/renderMenuItem.js +13 -28
  206. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  207. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +24 -22
  208. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  209. package/lib-commonjs/components/MenuItem/useMenuItem.js +97 -104
  210. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  211. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +318 -137
  212. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  213. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +19 -20
  214. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  215. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -2
  216. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  217. package/lib-commonjs/components/MenuItemCheckbox/index.js +9 -8
  218. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  219. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +13 -24
  220. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  221. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +44 -45
  222. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  223. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +38 -30
  224. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  225. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +19 -20
  226. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  227. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +3 -2
  228. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  229. package/lib-commonjs/components/MenuItemRadio/index.js +9 -8
  230. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  231. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +13 -27
  232. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  233. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +42 -45
  234. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +38 -30
  236. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  237. package/lib-commonjs/components/MenuList/MenuList.js +21 -22
  238. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  239. package/lib-commonjs/components/MenuList/MenuList.types.js +5 -2
  240. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  241. package/lib-commonjs/components/MenuList/index.js +10 -9
  242. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  243. package/lib-commonjs/components/MenuList/renderMenuList.js +16 -21
  244. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  245. package/lib-commonjs/components/MenuList/useMenuList.js +143 -137
  246. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  247. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +20 -25
  248. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  249. package/lib-commonjs/components/MenuList/useMenuListStyles.js +33 -23
  250. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  251. package/lib-commonjs/components/MenuPopover/MenuPopover.js +19 -20
  252. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  253. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -2
  254. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  255. package/lib-commonjs/components/MenuPopover/index.js +9 -8
  256. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  257. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +19 -26
  258. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  259. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +102 -110
  260. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  261. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +121 -50
  262. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  263. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +19 -20
  264. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  265. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -2
  266. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  267. package/lib-commonjs/components/MenuSplitGroup/index.js +9 -8
  268. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  269. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +13 -18
  270. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  271. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +58 -64
  272. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  273. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +61 -32
  274. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +15 -15
  276. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  277. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +5 -2
  278. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  279. package/lib-commonjs/components/MenuTrigger/index.js +8 -7
  280. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +14 -16
  282. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  283. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +163 -170
  284. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  285. package/lib-commonjs/components/index.js +6 -5
  286. package/lib-commonjs/components/index.js.map +1 -1
  287. package/lib-commonjs/contexts/menuContext.js +38 -27
  288. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  289. package/lib-commonjs/contexts/menuGroupContext.js +19 -12
  290. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  291. package/lib-commonjs/contexts/menuListContext.js +25 -14
  292. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  293. package/lib-commonjs/contexts/menuTriggerContext.js +18 -12
  294. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  295. package/lib-commonjs/index.js +91 -399
  296. package/lib-commonjs/index.js.map +1 -1
  297. package/lib-commonjs/selectable/index.js +6 -5
  298. package/lib-commonjs/selectable/index.js.map +1 -1
  299. package/lib-commonjs/selectable/types.js +5 -2
  300. package/lib-commonjs/selectable/types.js.map +1 -1
  301. package/lib-commonjs/selectable/useCheckmarkStyles.js +28 -26
  302. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  303. package/lib-commonjs/utils/index.js +5 -4
  304. package/lib-commonjs/utils/index.js.map +1 -1
  305. package/lib-commonjs/utils/useIsSubmenu.js +13 -19
  306. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  307. package/lib-commonjs/utils/useOnMenuEnter.js +57 -68
  308. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  309. package/package.json +15 -14
  310. package/lib-amd/Menu.js +0 -6
  311. package/lib-amd/Menu.js.map +0 -1
  312. package/lib-amd/MenuDivider.js +0 -6
  313. package/lib-amd/MenuDivider.js.map +0 -1
  314. package/lib-amd/MenuGroup.js +0 -6
  315. package/lib-amd/MenuGroup.js.map +0 -1
  316. package/lib-amd/MenuGroupHeader.js +0 -6
  317. package/lib-amd/MenuGroupHeader.js.map +0 -1
  318. package/lib-amd/MenuItem.js +0 -6
  319. package/lib-amd/MenuItem.js.map +0 -1
  320. package/lib-amd/MenuItemCheckbox.js +0 -6
  321. package/lib-amd/MenuItemCheckbox.js.map +0 -1
  322. package/lib-amd/MenuItemRadio.js +0 -6
  323. package/lib-amd/MenuItemRadio.js.map +0 -1
  324. package/lib-amd/MenuList.js +0 -6
  325. package/lib-amd/MenuList.js.map +0 -1
  326. package/lib-amd/MenuPopover.js +0 -6
  327. package/lib-amd/MenuPopover.js.map +0 -1
  328. package/lib-amd/MenuSplitGroup.js +0 -6
  329. package/lib-amd/MenuSplitGroup.js.map +0 -1
  330. package/lib-amd/MenuTrigger.js +0 -6
  331. package/lib-amd/MenuTrigger.js.map +0 -1
  332. package/lib-amd/components/Menu/Menu.js +0 -16
  333. package/lib-amd/components/Menu/Menu.js.map +0 -1
  334. package/lib-amd/components/Menu/Menu.types.js +0 -5
  335. package/lib-amd/components/Menu/Menu.types.js.map +0 -1
  336. package/lib-amd/components/Menu/index.js +0 -10
  337. package/lib-amd/components/Menu/index.js.map +0 -1
  338. package/lib-amd/components/Menu/renderMenu.js +0 -15
  339. package/lib-amd/components/Menu/renderMenu.js.map +0 -1
  340. package/lib-amd/components/Menu/useMenu.js +0 -224
  341. package/lib-amd/components/Menu/useMenu.js.map +0 -1
  342. package/lib-amd/components/Menu/useMenuContextValues.js +0 -29
  343. package/lib-amd/components/Menu/useMenuContextValues.js.map +0 -1
  344. package/lib-amd/components/MenuDivider/MenuDivider.js +0 -17
  345. package/lib-amd/components/MenuDivider/MenuDivider.js.map +0 -1
  346. package/lib-amd/components/MenuDivider/MenuDivider.types.js +0 -5
  347. package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +0 -1
  348. package/lib-amd/components/MenuDivider/index.js +0 -10
  349. package/lib-amd/components/MenuDivider/index.js.map +0 -1
  350. package/lib-amd/components/MenuDivider/renderMenuDivider.js +0 -15
  351. package/lib-amd/components/MenuDivider/renderMenuDivider.js.map +0 -1
  352. package/lib-amd/components/MenuDivider/useMenuDivider.js +0 -18
  353. package/lib-amd/components/MenuDivider/useMenuDivider.js.map +0 -1
  354. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js +0 -18
  355. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
  356. package/lib-amd/components/MenuGroup/MenuGroup.js +0 -18
  357. package/lib-amd/components/MenuGroup/MenuGroup.js.map +0 -1
  358. package/lib-amd/components/MenuGroup/MenuGroup.types.js +0 -5
  359. package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +0 -1
  360. package/lib-amd/components/MenuGroup/index.js +0 -11
  361. package/lib-amd/components/MenuGroup/index.js.map +0 -1
  362. package/lib-amd/components/MenuGroup/renderMenuGroup.js +0 -16
  363. package/lib-amd/components/MenuGroup/renderMenuGroup.js.map +0 -1
  364. package/lib-amd/components/MenuGroup/useMenuGroup.js +0 -20
  365. package/lib-amd/components/MenuGroup/useMenuGroup.js.map +0 -1
  366. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js +0 -12
  367. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js.map +0 -1
  368. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js +0 -14
  369. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
  370. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -17
  371. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +0 -1
  372. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -5
  373. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +0 -1
  374. package/lib-amd/components/MenuGroupHeader/index.js +0 -10
  375. package/lib-amd/components/MenuGroupHeader/index.js.map +0 -1
  376. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js +0 -15
  377. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js.map +0 -1
  378. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js +0 -19
  379. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js.map +0 -1
  380. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -27
  381. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
  382. package/lib-amd/components/MenuItem/MenuItem.js +0 -17
  383. package/lib-amd/components/MenuItem/MenuItem.js.map +0 -1
  384. package/lib-amd/components/MenuItem/MenuItem.types.js +0 -5
  385. package/lib-amd/components/MenuItem/MenuItem.types.js.map +0 -1
  386. package/lib-amd/components/MenuItem/index.js +0 -10
  387. package/lib-amd/components/MenuItem/index.js.map +0 -1
  388. package/lib-amd/components/MenuItem/renderMenuItem.js +0 -19
  389. package/lib-amd/components/MenuItem/renderMenuItem.js.map +0 -1
  390. package/lib-amd/components/MenuItem/useCharacterSearch.js +0 -22
  391. package/lib-amd/components/MenuItem/useCharacterSearch.js.map +0 -1
  392. package/lib-amd/components/MenuItem/useMenuItem.js +0 -75
  393. package/lib-amd/components/MenuItem/useMenuItem.js.map +0 -1
  394. package/lib-amd/components/MenuItem/useMenuItemStyles.js +0 -109
  395. package/lib-amd/components/MenuItem/useMenuItemStyles.js.map +0 -1
  396. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -17
  397. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +0 -1
  398. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -5
  399. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +0 -1
  400. package/lib-amd/components/MenuItemCheckbox/index.js +0 -10
  401. package/lib-amd/components/MenuItemCheckbox/index.js.map +0 -1
  402. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js +0 -16
  403. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +0 -1
  404. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js +0 -26
  405. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +0 -1
  406. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -31
  407. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
  408. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -17
  409. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +0 -1
  410. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js +0 -5
  411. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +0 -1
  412. package/lib-amd/components/MenuItemRadio/index.js +0 -10
  413. package/lib-amd/components/MenuItemRadio/index.js.map +0 -1
  414. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js +0 -19
  415. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js.map +0 -1
  416. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js +0 -27
  417. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js.map +0 -1
  418. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -31
  419. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
  420. package/lib-amd/components/MenuList/MenuList.js +0 -18
  421. package/lib-amd/components/MenuList/MenuList.js.map +0 -1
  422. package/lib-amd/components/MenuList/MenuList.types.js +0 -5
  423. package/lib-amd/components/MenuList/MenuList.types.js.map +0 -1
  424. package/lib-amd/components/MenuList/index.js +0 -11
  425. package/lib-amd/components/MenuList/index.js.map +0 -1
  426. package/lib-amd/components/MenuList/renderMenuList.js +0 -15
  427. package/lib-amd/components/MenuList/renderMenuList.js.map +0 -1
  428. package/lib-amd/components/MenuList/useMenuList.js +0 -125
  429. package/lib-amd/components/MenuList/useMenuList.js.map +0 -1
  430. package/lib-amd/components/MenuList/useMenuListContextValues.js +0 -20
  431. package/lib-amd/components/MenuList/useMenuListContextValues.js.map +0 -1
  432. package/lib-amd/components/MenuList/useMenuListStyles.js +0 -21
  433. package/lib-amd/components/MenuList/useMenuListStyles.js.map +0 -1
  434. package/lib-amd/components/MenuPopover/MenuPopover.js +0 -17
  435. package/lib-amd/components/MenuPopover/MenuPopover.js.map +0 -1
  436. package/lib-amd/components/MenuPopover/MenuPopover.types.js +0 -5
  437. package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +0 -1
  438. package/lib-amd/components/MenuPopover/index.js +0 -10
  439. package/lib-amd/components/MenuPopover/index.js.map +0 -1
  440. package/lib-amd/components/MenuPopover/renderMenuPopover.js +0 -18
  441. package/lib-amd/components/MenuPopover/renderMenuPopover.js.map +0 -1
  442. package/lib-amd/components/MenuPopover/useMenuPopover.js +0 -83
  443. package/lib-amd/components/MenuPopover/useMenuPopover.js.map +0 -1
  444. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -21
  445. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
  446. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js +0 -17
  447. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js.map +0 -1
  448. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -5
  449. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js.map +0 -1
  450. package/lib-amd/components/MenuSplitGroup/index.js +0 -10
  451. package/lib-amd/components/MenuSplitGroup/index.js.map +0 -1
  452. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js +0 -14
  453. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js.map +0 -1
  454. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js +0 -47
  455. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js.map +0 -1
  456. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js +0 -43
  457. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
  458. package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -18
  459. package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +0 -1
  460. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js +0 -5
  461. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +0 -1
  462. package/lib-amd/components/MenuTrigger/index.js +0 -9
  463. package/lib-amd/components/MenuTrigger/index.js.map +0 -1
  464. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -15
  465. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +0 -1
  466. package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -112
  467. package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +0 -1
  468. package/lib-amd/components/index.js +0 -7
  469. package/lib-amd/components/index.js.map +0 -1
  470. package/lib-amd/contexts/menuContext.js +0 -32
  471. package/lib-amd/contexts/menuContext.js.map +0 -1
  472. package/lib-amd/contexts/menuGroupContext.js +0 -13
  473. package/lib-amd/contexts/menuGroupContext.js.map +0 -1
  474. package/lib-amd/contexts/menuListContext.js +0 -23
  475. package/lib-amd/contexts/menuListContext.js.map +0 -1
  476. package/lib-amd/contexts/menuTriggerContext.js +0 -14
  477. package/lib-amd/contexts/menuTriggerContext.js.map +0 -1
  478. package/lib-amd/index.js +0 -69
  479. package/lib-amd/index.js.map +0 -1
  480. package/lib-amd/selectable/index.js +0 -7
  481. package/lib-amd/selectable/index.js.map +0 -1
  482. package/lib-amd/selectable/types.js +0 -5
  483. package/lib-amd/selectable/types.js.map +0 -1
  484. package/lib-amd/selectable/useCheckmarkStyles.js +0 -28
  485. package/lib-amd/selectable/useCheckmarkStyles.js.map +0 -1
  486. package/lib-amd/utils/index.js +0 -6
  487. package/lib-amd/utils/index.js.map +0 -1
  488. package/lib-amd/utils/useIsSubmenu.js +0 -20
  489. package/lib-amd/utils/useIsSubmenu.js.map +0 -1
  490. package/lib-amd/utils/useOnMenuEnter.js +0 -59
  491. package/lib-amd/utils/useOnMenuEnter.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["react_1","require","useStyles","__styles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","useCheckmarkStyles_unstable","state","styles","checkmark","className","mergeClasses","checked","exports"],"sources":["../src/packages/react-components/react-menu/src/selectable/useCheckmarkStyles.ts"],"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"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAIA,MAAMC,SAAS,gBAAGF,OAAA,CAAAG,QAAU;EAAAC,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,WAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EAS1B;AAEF;;;;;AAKO,MAAMC,2BAA2B,GAAIC,KAAiE,IAAI;EAC/G,MAAMC,MAAM,GAAGV,SAAS,EAAE;EAC1B,IAAIS,KAAK,CAACE,SAAS,EAAE;IACnBF,KAAK,CAACE,SAAS,CAACC,SAAS,GAAGd,OAAA,CAAAe,YAAY,CACtCH,MAAM,CAACR,IAAI,EACXO,KAAK,CAACK,OAAO,IAAIJ,MAAM,CAACJ,WAAW,EACnCG,KAAK,CAACE,SAAS,CAACC,SAAS,CAC1B;;AAEL,CAAC;AATYG,OAAA,CAAAP,2BAA2B,GAAAA,2BAAA"}
1
+ {"version":3,"sources":["../../lib/selectable/useCheckmarkStyles.js"],"sourcesContent":["import { mergeClasses, __styles } from '@griffel/react';\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n a9b677: \"fjw5fx7\",\n Bqenvij: \"fd461yt\",\n Bcdw1i0: \"fd7fpy0\"\n },\n rootChecked: {\n Bcdw1i0: \"f1022m68\"\n }\n}, {\n d: [\".fjw5fx7{width:16px;}\", \".fd461yt{height:16px;}\", \".fd7fpy0{visibility:hidden;}\", \".f1022m68{visibility:visible;}\"]\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 => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);\n }\n};\n//# sourceMappingURL=useCheckmarkStyles.js.map"],"names":["useCheckmarkStyles_unstable","useStyles","__styles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","state","styles","checkmark","className","mergeClasses","checked"],"mappings":";;;;+BAkBaA;;aAAAA;;uBAlB0B;AACvC,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;IACAC,aAAa;QACXD,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAyB;QAA0B;QAAgC;KAAiC;AAC1H;AAMO,MAAMR,8BAA8BS,CAAAA,QAAS;IAClD,MAAMC,SAAST;IACf,IAAIQ,MAAME,SAAS,EAAE;QACnBF,MAAME,SAAS,CAACC,SAAS,GAAGC,IAAAA,mBAAY,EAACH,OAAOP,IAAI,EAAEM,MAAMK,OAAO,IAAIJ,OAAOH,WAAW,EAAEE,MAAME,SAAS,CAACC,SAAS;IACtH,CAAC;AACH,GACA,8CAA8C"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./useOnMenuEnter"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./useOnMenuEnter"), exports);
7
+ //# sourceMappingURL=index.js.map
8
+
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-menu/src/utils/index.ts"],"sourcesContent":["export * from './useOnMenuEnter';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './useOnMenuEnter';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
@@ -1,24 +1,18 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useIsSubmenu", {
6
+ enumerable: true,
7
+ get: ()=>useIsSubmenu
5
8
  });
6
- exports.useIsSubmenu = void 0;
7
- const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
- const menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
9
- const menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
10
- /**
11
- * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
12
- * or whether it is a part of a `MenuList`
13
- *
14
- * A simple hook to check box contexts easily
15
- *
16
- * @returns whether the component is part of a submenu
17
- */
9
+ const _reactContextSelector = require("@fluentui/react-context-selector");
10
+ const _menuContext = require("../contexts/menuContext");
11
+ const _menuListContext = require("../contexts/menuListContext");
18
12
  function useIsSubmenu() {
19
- const menuContextValue = menuContext_1.useMenuContext_unstable(context => context.isSubmenu);
20
- const hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
21
- return menuContextValue || hasMenuListContext;
22
- }
23
- exports.useIsSubmenu = useIsSubmenu;
13
+ const menuContextValue = (0, _menuContext.useMenuContext_unstable)((context)=>context.isSubmenu);
14
+ const hasMenuListContext = (0, _reactContextSelector.useHasParentContext)(_menuListContext.MenuListContext);
15
+ return menuContextValue || hasMenuListContext;
16
+ } //# sourceMappingURL=useIsSubmenu.js.map
17
+
24
18
  //# sourceMappingURL=useIsSubmenu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_context_selector_1","require","menuContext_1","menuListContext_1","useIsSubmenu","menuContextValue","useMenuContext_unstable","context","isSubmenu","hasMenuListContext","useHasParentContext","MenuListContext","exports"],"sources":["../src/packages/react-components/react-menu/src/utils/useIsSubmenu.ts"],"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"],"mappings":";;;;;;AAAA,MAAAA,wBAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,iBAAA,gBAAAF,OAAA;AAEA;;;;;;;;AAQA,SAAgBG,YAAYA,CAAA;EAC1B,MAAMC,gBAAgB,GAAGH,aAAA,CAAAI,uBAAuB,CAACC,OAAO,IAAIA,OAAO,CAACC,SAAS,CAAC;EAC9E,MAAMC,kBAAkB,GAAGT,wBAAA,CAAAU,mBAAmB,CAACP,iBAAA,CAAAQ,eAAe,CAAC;EAE/D,OAAON,gBAAgB,IAAII,kBAAkB;AAC/C;AALAG,OAAA,CAAAR,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"sources":["../../lib/utils/useIsSubmenu.js"],"sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\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 return menuContextValue || hasMenuListContext;\n}\n//# sourceMappingURL=useIsSubmenu.js.map"],"names":["useIsSubmenu","menuContextValue","useMenuContext_unstable","context","isSubmenu","hasMenuListContext","useHasParentContext","MenuListContext"],"mappings":";;;;+BAWgBA;;aAAAA;;sCAXoB;6BACI;iCACR;AASzB,SAASA,eAAe;IAC7B,MAAMC,mBAAmBC,IAAAA,oCAAuB,EAACC,CAAAA,UAAWA,QAAQC,SAAS;IAC7E,MAAMC,qBAAqBC,IAAAA,yCAAmB,EAACC,gCAAe;IAC9D,OAAON,oBAAoBI;AAC7B,EACA,wCAAwC"}
@@ -1,73 +1,62 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.dispatchMenuEnterEvent = exports.useOnMenuMouseEnter = exports.MENU_ENTER_EVENT = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
10
- /**
11
- * Name of the custom event
12
- */
13
- exports.MENU_ENTER_EVENT = 'fuimenuenter';
14
- /**
15
- * This hook works similarly to @see {useOnClickOutside}
16
- *
17
- * Problem: Trying to behave the same as system menus:
18
- * When the mouse leaves a stack of nested menus the stack should not dismiss.
19
- * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.
20
- *
21
- * We don't use the native mouseenter event because it would trigger too many times in the document
22
- * Instead, dispatch custom DOM event from the menu so that it can bubble
23
- * Each nested menu can use the listener to check if the event is from a child or parent menu
24
- */
25
- const useOnMenuMouseEnter = options => {
26
- const {
27
- refs,
28
- callback,
29
- element,
30
- disabled
31
- } = options;
32
- // Keep mouse event here because this is essentially a custom 'mouseenter' event
33
- const listener = react_utilities_1.useEventCallback(ev => {
34
- var _a;
35
- const popoverRef = refs[0];
36
- const someMenuPopover = ev.target;
37
- // someMenu is a child -> will always be contained because of vParents
38
- // someMenu is a parent -> will always not be contained because no vParent
39
- // someMenu is the current popover -> it will contain itself
40
- const isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
41
- if (isOutsidePopover && !disabled) {
42
- callback(ev);
43
- }
44
- });
45
- React.useEffect(() => {
46
- // eslint-disable-next-line eqeqeq
47
- if (element == null) {
48
- return;
49
- }
50
- if (!disabled) {
51
- element.addEventListener(exports.MENU_ENTER_EVENT, listener);
52
- }
53
- return () => {
54
- element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
55
- };
56
- }, [listener, element, disabled]);
57
- };
58
- exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
59
- /**
60
- * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`
61
- * @param el element for the event target
62
- * @param nativeEvent the native mouse event this is mapped to
63
- */
64
- const dispatchMenuEnterEvent = (el, nativeEvent) => {
65
- el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, {
66
- bubbles: true,
67
- detail: {
68
- nativeEvent
69
- }
70
- }));
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ MENU_ENTER_EVENT: ()=>MENU_ENTER_EVENT,
13
+ useOnMenuMouseEnter: ()=>useOnMenuMouseEnter,
14
+ dispatchMenuEnterEvent: ()=>dispatchMenuEnterEvent
15
+ });
16
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
17
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
18
+ const _reactUtilities = require("@fluentui/react-utilities");
19
+ const _reactPortal = require("@fluentui/react-portal");
20
+ const MENU_ENTER_EVENT = 'fuimenuenter';
21
+ const useOnMenuMouseEnter = (options)=>{
22
+ const { refs , callback , element , disabled } = options;
23
+ // Keep mouse event here because this is essentially a custom 'mouseenter' event
24
+ const listener = (0, _reactUtilities.useEventCallback)((ev)=>{
25
+ const popoverRef = refs[0];
26
+ const someMenuPopover = ev.target;
27
+ var _popoverRef_current;
28
+ // someMenu is a child -> will always be contained because of vParents
29
+ // someMenu is a parent -> will always not be contained because no vParent
30
+ // someMenu is the current popover -> it will contain itself
31
+ const isOutsidePopover = !(0, _reactPortal.elementContains)((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);
32
+ if (isOutsidePopover && !disabled) {
33
+ callback(ev);
34
+ }
35
+ });
36
+ _react.useEffect(()=>{
37
+ // eslint-disable-next-line eqeqeq
38
+ if (element == null) {
39
+ return;
40
+ }
41
+ if (!disabled) {
42
+ element.addEventListener(MENU_ENTER_EVENT, listener);
43
+ }
44
+ return ()=>{
45
+ element.removeEventListener(MENU_ENTER_EVENT, listener);
46
+ };
47
+ }, [
48
+ listener,
49
+ element,
50
+ disabled
51
+ ]);
71
52
  };
72
- exports.dispatchMenuEnterEvent = dispatchMenuEnterEvent;
53
+ const dispatchMenuEnterEvent = (el, nativeEvent)=>{
54
+ el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {
55
+ bubbles: true,
56
+ detail: {
57
+ nativeEvent
58
+ }
59
+ }));
60
+ }; //# sourceMappingURL=useOnMenuEnter.js.map
61
+
73
62
  //# sourceMappingURL=useOnMenuEnter.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","react_portal_1","exports","MENU_ENTER_EVENT","useOnMenuMouseEnter","options","refs","callback","element","disabled","listener","useEventCallback","ev","popoverRef","someMenuPopover","target","isOutsidePopover","elementContains","_a","current","useEffect","addEventListener","removeEventListener","dispatchMenuEnterEvent","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"sources":["../src/packages/react-components/react-menu/src/utils/useOnMenuEnter.ts"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,cAAA,gBAAAF,OAAA;AAGA;;;AAGaG,OAAA,CAAAC,gBAAgB,GAAG,cAAc;AAE9C;;;;;;;;;;;AAWO,MAAMC,mBAAmB,GAAIC,OAAyC,IAAI;EAC/E,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,OAAO;IAAEC;EAAQ,CAAE,GAAGJ,OAAO;EAErD;EACA,MAAMK,QAAQ,GAAGV,iBAAA,CAAAW,gBAAgB,CAAEC,EAAc,IAAI;;IACnD,MAAMC,UAAU,GAAGP,IAAI,CAAC,CAAC,CAAC;IAC1B,MAAMQ,eAAe,GAAGF,EAAE,CAACG,MAAqB;IAEhD;IACA;IACA;IACA,MAAMC,gBAAgB,GAAG,CAACf,cAAA,CAAAgB,eAAe,CAAC,CAAAC,EAAA,GAAAL,UAAU,CAACM,OAAO,cAAAD,EAAA,cAAAA,EAAA,GAAI,IAAI,EAAEJ,eAAe,CAAC;IACtF,IAAIE,gBAAgB,IAAI,CAACP,QAAQ,EAAE;MACjCF,QAAQ,CAACK,EAAE,CAAC;;EAEhB,CAAC,CAAC;EAEFd,KAAK,CAACsB,SAAS,CAAC,MAAK;IACnB;IACA,IAAIZ,OAAO,IAAI,IAAI,EAAE;MACnB;;IAWF,IAAI,CAACC,QAAQ,EAAE;MACbD,OAAO,CAACa,gBAAgB,CAACnB,OAAA,CAAAC,gBAAgB,EAAEO,QAA4B,CAAC;;IAG1E,OAAO,MAAK;MACVF,OAAO,CAACc,mBAAmB,CAACpB,OAAA,CAAAC,gBAAgB,EAAEO,QAA4B,CAAC;IAC7E,CAAC;EACH,CAAC,EAAE,CAACA,QAAQ,EAAEF,OAAO,EAAEC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAvCYP,OAAA,CAAAE,mBAAmB,GAAAA,mBAAA;AAyChC;;;;;AAKO,MAAMmB,sBAAsB,GAAGA,CAACC,EAAe,EAAEC,WAAuB,KAAI;EACjFD,EAAE,CAACE,aAAa,CAAC,IAAIC,WAAW,CAACzB,OAAA,CAAAC,gBAAgB,EAAE;IAAEyB,OAAO,EAAE,IAAI;IAAEC,MAAM,EAAE;MAAEJ;IAAW;EAAE,CAAE,CAAC,CAAC;AACjG,CAAC;AAFYvB,OAAA,CAAAqB,sBAAsB,GAAAA,sBAAA"}
1
+ {"version":3,"sources":["../../lib/utils/useOnMenuEnter.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { elementContains } from '@fluentui/react-portal';\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\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 => {\n const {\n refs,\n callback,\n element,\n disabled\n } = options;\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback(ev => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target;\n var _popoverRef_current;\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 = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener);\n }\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener);\n };\n }, [listener, element, disabled]);\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, nativeEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {\n bubbles: true,\n detail: {\n nativeEvent\n }\n }));\n};\n//# sourceMappingURL=useOnMenuEnter.js.map"],"names":["MENU_ENTER_EVENT","useOnMenuMouseEnter","dispatchMenuEnterEvent","options","refs","callback","element","disabled","listener","useEventCallback","ev","popoverRef","someMenuPopover","target","_popoverRef_current","isOutsidePopover","elementContains","current","React","useEffect","addEventListener","removeEventListener","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"mappings":";;;;;;;;;;;IAMaA,gBAAgB,MAAhBA;IAYAC,mBAAmB,MAAnBA;IAsCAC,sBAAsB,MAAtBA;;;6DAxDU;gCACU;6BACD;AAIzB,MAAMF,mBAAmB;AAYzB,MAAMC,sBAAsBE,CAAAA,UAAW;IAC5C,MAAM,EACJC,KAAI,EACJC,SAAQ,EACRC,QAAO,EACPC,SAAQ,EACT,GAAGJ;IACJ,gFAAgF;IAChF,MAAMK,WAAWC,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;QACtC,MAAMC,aAAaP,IAAI,CAAC,EAAE;QAC1B,MAAMQ,kBAAkBF,GAAGG,MAAM;QACjC,IAAIC;QACJ,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,MAAMC,mBAAmB,CAACC,IAAAA,4BAAe,EAAC,AAACF,CAAAA,sBAAsBH,WAAWM,OAAO,AAAD,MAAO,IAAI,IAAIH,wBAAwB,KAAK,IAAIA,sBAAsB,IAAI,EAAEF;QAC9J,IAAIG,oBAAoB,CAACR,UAAU;YACjCF,SAASK;QACX,CAAC;IACH;IACAQ,OAAMC,SAAS,CAAC,IAAM;QACpB,kCAAkC;QAClC,IAAIb,WAAW,IAAI,EAAE;YACnB;QACF,CAAC;QACD,IAAI,CAACC,UAAU;YACbD,QAAQc,gBAAgB,CAACpB,kBAAkBQ;QAC7C,CAAC;QACD,OAAO,IAAM;YACXF,QAAQe,mBAAmB,CAACrB,kBAAkBQ;QAChD;IACF,GAAG;QAACA;QAAUF;QAASC;KAAS;AAClC;AAMO,MAAML,yBAAyB,CAACoB,IAAIC,cAAgB;IACzDD,GAAGE,aAAa,CAAC,IAAIC,YAAYzB,kBAAkB;QACjD0B,SAAS,IAAI;QACbC,QAAQ;YACNJ;QACF;IACF;AACF,GACA,0CAA0C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "9.7.3",
3
+ "version": "9.7.5",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -24,29 +24,29 @@
24
24
  "storybook": "start-storybook",
25
25
  "test": "jest --passWithNoTests",
26
26
  "type-check": "tsc -b tsconfig.json",
27
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
27
+ "generate-api": "just-scripts generate-api"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.20",
33
33
  "@fluentui/scripts-api-extractor": "*",
34
34
  "@fluentui/scripts-cypress": "*",
35
35
  "@fluentui/scripts-tasks": "*"
36
36
  },
37
37
  "dependencies": {
38
- "@fluentui/react-aria": "^9.3.13",
39
- "@fluentui/keyboard-keys": "^9.0.1",
40
- "@fluentui/react-context-selector": "^9.1.13",
41
- "@fluentui/react-icons": "^2.0.175",
42
- "@fluentui/react-portal": "^9.2.0",
43
- "@fluentui/react-positioning": "^9.5.4",
44
- "@fluentui/react-shared-contexts": "^9.3.1",
45
- "@fluentui/react-tabster": "^9.5.7",
46
- "@fluentui/react-theme": "^9.1.6",
47
- "@fluentui/react-utilities": "^9.7.0",
38
+ "@fluentui/keyboard-keys": "^9.0.2",
39
+ "@fluentui/react-aria": "^9.3.15",
40
+ "@fluentui/react-context-selector": "^9.1.15",
41
+ "@fluentui/react-icons": "^2.0.196",
42
+ "@fluentui/react-portal": "^9.2.2",
43
+ "@fluentui/react-positioning": "^9.5.6",
44
+ "@fluentui/react-shared-contexts": "^9.3.2",
45
+ "@fluentui/react-tabster": "^9.6.1",
46
+ "@fluentui/react-theme": "^9.1.7",
47
+ "@fluentui/react-utilities": "^9.7.2",
48
48
  "@griffel/react": "^1.5.2",
49
- "tslib": "^2.1.0"
49
+ "@swc/helpers": "^0.4.14"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@types/react": ">=16.8.0 <19.0.0",
@@ -64,6 +64,7 @@
64
64
  "exports": {
65
65
  ".": {
66
66
  "types": "./dist/index.d.ts",
67
+ "node": "./lib-commonjs/index.js",
67
68
  "import": "./lib/index.js",
68
69
  "require": "./lib-commonjs/index.js"
69
70
  },
package/lib-amd/Menu.js DELETED
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/Menu/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=Menu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/Menu.ts"],"names":[],"mappings":";;;IAAA,uCAAwC","sourcesContent":["export * from './components/Menu/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuDivider/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuDivider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuDivider.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuDivider.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuDivider/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuGroup/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuGroup.ts"],"names":[],"mappings":";;;IAAA,uCAA6C","sourcesContent":["export * from './components/MenuGroup/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuGroupHeader/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuGroupHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuGroupHeader.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuGroupHeader.ts"],"names":[],"mappings":";;;IAAA,uCAAmD","sourcesContent":["export * from './components/MenuGroupHeader/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuItem/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItem.ts"],"names":[],"mappings":";;;IAAA,uCAA4C","sourcesContent":["export * from './components/MenuItem/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuItemCheckbox/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuItemCheckbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItemCheckbox.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItemCheckbox.ts"],"names":[],"mappings":";;;IAAA,uCAAoD","sourcesContent":["export * from './components/MenuItemCheckbox/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuItemRadio/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuItemRadio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItemRadio.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItemRadio.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/MenuItemRadio/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuList/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuList.ts"],"names":[],"mappings":";;;IAAA,uCAA4C","sourcesContent":["export * from './components/MenuList/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuPopover/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuPopover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuPopover.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuPopover.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuPopover/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuSplitGroup/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuSplitGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuSplitGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuSplitGroup.ts"],"names":[],"mappings":";;;IAAA,uCAAkD","sourcesContent":["export * from './components/MenuSplitGroup/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/MenuTrigger/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuTrigger.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuTrigger.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuTrigger/index';\n"]}
@@ -1,16 +0,0 @@
1
- define(["require", "exports", "./useMenu", "./useMenuContextValues", "./renderMenu"], function (require, exports, useMenu_1, useMenuContextValues_1, renderMenu_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Menu = void 0;
5
- /**
6
- * Wrapper component that manages state for a popup MenuList and a MenuTrigger
7
- */
8
- var Menu = function (props) {
9
- var state = useMenu_1.useMenu_unstable(props);
10
- var contextValues = useMenuContextValues_1.useMenuContextValues_unstable(state);
11
- return renderMenu_1.renderMenu_unstable(state, contextValues);
12
- };
13
- exports.Menu = Menu;
14
- exports.Menu.displayName = 'Menu';
15
- });
16
- //# sourceMappingURL=Menu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/Menu.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACI,IAAM,IAAI,GAAwB,UAAA,KAAK;QAC5C,IAAM,KAAK,GAAG,0BAAgB,CAAC,KAAK,CAAC,CAAC;QACtC,IAAM,aAAa,GAAG,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE3D,OAAO,gCAAmB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACnD,CAAC,CAAC;IALW,QAAA,IAAI,QAKf;IAEF,YAAI,CAAC,WAAW,GAAG,MAAM,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenu_unstable } from './useMenu';\nimport { useMenuContextValues_unstable } from './useMenuContextValues';\nimport { renderMenu_unstable } from './renderMenu';\nimport type { MenuProps } from './Menu.types';\n\n/**\n * Wrapper component that manages state for a popup MenuList and a MenuTrigger\n */\nexport const Menu: React.FC<MenuProps> = props => {\n const state = useMenu_unstable(props);\n const contextValues = useMenuContextValues_unstable(state);\n\n return renderMenu_unstable(state, contextValues);\n};\n\nMenu.displayName = 'Menu';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=Menu.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { PositioningVirtualElement, SetVirtualMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<MenuSlots> &\n Pick<PortalProps, 'mountNode'> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Opens the menu on hover\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n *\n * @default false\n */\n persistOnItemClick?: boolean;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n };\n\nexport type MenuState = ComponentState<MenuSlots> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'mountNode'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n | 'open'\n | 'openOnHover'\n | 'closeOnScroll'\n | 'hoverDelay'\n | 'openOnContext'\n | 'persistOnItemClick'\n >\n > & {\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget?: PositioningVirtualElement;\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n /**\n * Default values to be checked on mount\n @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n };\n\nexport type MenuContextValues = {\n menu: MenuContextValue;\n};\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvent = MenuOpenChangeData['event'];\n/**\n * @deprecated use MenuOpenEvent instead\n */\nexport type MenuOpenEvents = MenuOpenEvent;\n\n/**\n * Data attached to open/close events\n */\nexport type MenuOpenChangeData = {\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n /**\n * Indicates whether the change of state was a keyboard interaction\n * @deprecated\n * This should not be used, since `Enter`, `Space` and click should be interpreted as the same thing as a click\n */\n keyboard?: boolean;\n open: boolean;\n} & (\n | {\n type: 'menuTriggerContextMenu';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseLeave';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseMove';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'menuItemClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'clickOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'scrollOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'menuMouseEnter';\n event: MouseEvent | TouchEvent;\n }\n);\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./Menu", "./Menu.types", "./renderMenu", "./useMenu", "./useMenuContextValues"], function (require, exports, tslib_1, Menu_1, Menu_types_1, renderMenu_1, useMenu_1, useMenuContextValues_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(Menu_1, exports);
5
- tslib_1.__exportStar(Menu_types_1, exports);
6
- tslib_1.__exportStar(renderMenu_1, exports);
7
- tslib_1.__exportStar(useMenu_1, exports);
8
- tslib_1.__exportStar(useMenuContextValues_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/index.ts"],"names":[],"mappings":";;;IAAA,sCAAuB;IACvB,4CAA6B;IAC7B,4CAA6B;IAC7B,yCAA0B;IAC1B,sDAAuC","sourcesContent":["export * from './Menu';\nexport * from './Menu.types';\nexport * from './renderMenu';\nexport * from './useMenu';\nexport * from './useMenuContextValues';\n"]}
@@ -1,15 +0,0 @@
1
- define(["require", "exports", "react", "../../contexts/menuContext"], function (require, exports, React, menuContext_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderMenu_unstable = void 0;
5
- /**
6
- * Render the final JSX of Menu
7
- */
8
- var renderMenu_unstable = function (state, contextValues) {
9
- return (React.createElement(menuContext_1.MenuProvider, { value: contextValues.menu },
10
- state.menuTrigger,
11
- state.open && state.menuPopover));
12
- };
13
- exports.renderMenu_unstable = renderMenu_unstable;
14
- });
15
- //# sourceMappingURL=renderMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderMenu.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/renderMenu.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,mBAAmB,GAAG,UAAC,KAAgB,EAAE,aAAgC;QACpF,OAAO,CACL,oBAAC,0BAAY,IAAC,KAAK,EAAE,aAAa,CAAC,IAAI;YACpC,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,WAAW,CACnB,CAChB,CAAC;IACJ,CAAC,CAAC;IAPW,QAAA,mBAAmB,uBAO9B","sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n */\nexport const renderMenu_unstable = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"]}