@fluentui/react-menu 0.0.0-nightly5ab766c40f20220114.1 → 0.0.0-nightly6a6e258c4020220125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/CHANGELOG.json +56 -26
  2. package/CHANGELOG.md +19 -16
  3. package/dist/react-menu.d.ts +56 -54
  4. package/lib/components/Menu/Menu.js +6 -6
  5. package/lib/components/Menu/Menu.js.map +1 -1
  6. package/lib/components/Menu/renderMenu.d.ts +1 -1
  7. package/lib/components/Menu/renderMenu.js +1 -1
  8. package/lib/components/Menu/renderMenu.js.map +1 -1
  9. package/lib/components/Menu/useMenu.d.ts +2 -2
  10. package/lib/components/Menu/useMenu.js +4 -4
  11. package/lib/components/Menu/useMenu.js.map +1 -1
  12. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  13. package/lib/components/Menu/useMenuContextValues.js +1 -1
  14. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  15. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  16. package/lib/components/MenuDivider/MenuDivider.js +7 -7
  17. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  18. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  19. package/lib/components/MenuDivider/renderMenuDivider.js +1 -1
  20. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  21. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  22. package/lib/components/MenuDivider/useMenuDivider.js +1 -1
  23. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  24. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  25. package/lib/components/MenuDivider/useMenuDividerStyles.js +1 -1
  26. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  27. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  28. package/lib/components/MenuGroup/MenuGroup.js +9 -9
  29. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  30. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  31. package/lib/components/MenuGroup/renderMenuGroup.js +1 -1
  32. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  34. package/lib/components/MenuGroup/useMenuGroup.js +1 -1
  35. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  36. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  37. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  38. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupStyles.js +1 -1
  41. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  43. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
  44. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  45. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  46. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -1
  47. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  49. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +3 -3
  50. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  51. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  52. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -1
  53. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  54. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  55. package/lib/components/MenuItem/MenuItem.js +7 -7
  56. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  57. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  58. package/lib/components/MenuItem/renderMenuItem.js +1 -1
  59. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  60. package/lib/components/MenuItem/useCharacterSearch.js +2 -2
  61. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  62. package/lib/components/MenuItem/useMenuItem.d.ts +1 -1
  63. package/lib/components/MenuItem/useMenuItem.js +9 -9
  64. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  65. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  66. package/lib/components/MenuItem/useMenuItemStyles.js +3 -3
  67. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  68. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  69. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  70. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  71. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  72. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -1
  73. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  74. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  75. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  76. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  77. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  78. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +5 -5
  79. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  80. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  81. package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
  82. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  83. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  84. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -1
  85. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  86. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  87. package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  88. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  89. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  90. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +5 -5
  91. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  92. package/lib/components/MenuList/MenuList.d.ts +1 -1
  93. package/lib/components/MenuList/MenuList.js +9 -9
  94. package/lib/components/MenuList/MenuList.js.map +1 -1
  95. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  96. package/lib/components/MenuList/renderMenuList.js +1 -1
  97. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  98. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  99. package/lib/components/MenuList/useMenuList.js +8 -8
  100. package/lib/components/MenuList/useMenuList.js.map +1 -1
  101. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  102. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  103. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  104. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
  105. package/lib/components/MenuList/useMenuListStyles.js +1 -1
  106. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  107. package/lib/components/MenuPopover/MenuPopover.js +6 -6
  108. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  109. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  110. package/lib/components/MenuPopover/renderMenuPopover.js +1 -1
  111. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  112. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  113. package/lib/components/MenuPopover/useMenuPopover.js +8 -8
  114. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  115. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  116. package/lib/components/MenuPopover/useMenuPopoverStyles.js +1 -1
  117. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  118. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +6 -6
  119. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  120. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  121. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -1
  122. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  123. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +3 -3
  124. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +3 -3
  125. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  126. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  127. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +1 -1
  128. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  129. package/lib/components/MenuTrigger/MenuTrigger.d.ts +1 -1
  130. package/lib/components/MenuTrigger/MenuTrigger.js +7 -6
  131. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  132. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +4 -2
  133. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  134. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  135. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  136. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
  137. package/lib/components/MenuTrigger/useMenuTrigger.js +177 -5
  138. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  139. package/lib/contexts/menuContext.d.ts +1 -1
  140. package/lib/contexts/menuContext.js +1 -1
  141. package/lib/contexts/menuContext.js.map +1 -1
  142. package/lib/contexts/menuGroupContext.d.ts +1 -1
  143. package/lib/contexts/menuGroupContext.js +1 -1
  144. package/lib/contexts/menuGroupContext.js.map +1 -1
  145. package/lib/contexts/menuListContext.d.ts +1 -1
  146. package/lib/contexts/menuListContext.js +1 -1
  147. package/lib/contexts/menuListContext.js.map +1 -1
  148. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  149. package/lib/contexts/menuTriggerContext.js +1 -1
  150. package/lib/contexts/menuTriggerContext.js.map +1 -1
  151. package/lib/selectable/useCheckmarkStyles.d.ts +1 -1
  152. package/lib/selectable/useCheckmarkStyles.js +1 -1
  153. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  154. package/lib/utils/useIsSubmenu.js +2 -2
  155. package/lib/utils/useIsSubmenu.js.map +1 -1
  156. package/lib-commonjs/components/Menu/Menu.js +3 -3
  157. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  158. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  159. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  160. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  161. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  162. package/lib-commonjs/components/Menu/useMenu.js +5 -5
  163. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  164. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  165. package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
  166. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  167. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  168. package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
  169. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  170. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  171. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +3 -3
  172. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  173. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  174. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +3 -3
  175. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  176. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  177. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +3 -3
  178. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  180. package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
  181. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  182. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  183. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +3 -3
  184. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  185. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  186. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +3 -3
  187. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  188. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  189. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
  190. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  191. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  192. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +3 -3
  193. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  194. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  195. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
  196. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  197. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  198. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -3
  199. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  200. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  201. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +4 -4
  202. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  203. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  204. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -3
  205. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  206. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  207. package/lib-commonjs/components/MenuItem/MenuItem.js +4 -4
  208. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  209. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  210. package/lib-commonjs/components/MenuItem/renderMenuItem.js +3 -3
  211. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  212. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
  213. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  214. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +1 -1
  215. package/lib-commonjs/components/MenuItem/useMenuItem.js +8 -8
  216. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  217. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  218. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +4 -4
  219. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  220. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  221. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  222. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  223. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  224. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +3 -3
  225. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  226. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  227. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  228. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  229. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  230. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +5 -5
  231. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  232. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  233. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
  234. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  236. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +3 -3
  237. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  238. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  239. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  240. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  241. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  242. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +5 -5
  243. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  244. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  245. package/lib-commonjs/components/MenuList/MenuList.js +5 -5
  246. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  247. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  248. package/lib-commonjs/components/MenuList/renderMenuList.js +3 -3
  249. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  250. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  251. package/lib-commonjs/components/MenuList/useMenuList.js +9 -9
  252. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  253. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  254. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
  255. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  256. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
  257. package/lib-commonjs/components/MenuList/useMenuListStyles.js +3 -3
  258. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  259. package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
  260. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  261. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  262. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +3 -3
  263. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  264. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  265. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +9 -9
  266. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  267. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  268. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +3 -3
  269. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  270. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -3
  271. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  272. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  273. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +3 -3
  274. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  275. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +3 -3
  276. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +5 -5
  277. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  278. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  279. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +3 -3
  280. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  281. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +1 -1
  282. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -6
  283. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  284. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +4 -2
  285. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  286. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
  287. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  288. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
  289. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +186 -7
  290. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  291. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  292. package/lib-commonjs/contexts/menuContext.js +3 -3
  293. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  294. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  295. package/lib-commonjs/contexts/menuGroupContext.js +3 -3
  296. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  297. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  298. package/lib-commonjs/contexts/menuListContext.js +3 -3
  299. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  300. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  301. package/lib-commonjs/contexts/menuTriggerContext.js +3 -3
  302. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  303. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +1 -1
  304. package/lib-commonjs/selectable/useCheckmarkStyles.js +3 -3
  305. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  306. package/lib-commonjs/utils/useIsSubmenu.js +1 -1
  307. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  308. package/package.json +14 -14
  309. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  310. package/lib/components/MenuTrigger/useTriggerElement.js +0 -166
  311. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  312. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  313. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -181
  314. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1,26 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import { ArrowLeft, Tab, ArrowRight, Escape } from '@fluentui/keyboard-keys';
3
3
  import { getNativeElementProps, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
4
- import { useMenuContext } from '../../contexts/menuContext';
4
+ import { useMenuContext_unstable } from '../../contexts/menuContext';
5
5
  import { dispatchMenuEnterEvent } from '../../utils/index';
6
6
  import { useFluent } from '@fluentui/react-shared-contexts';
7
7
  import { useIsSubmenu } from '../../utils/useIsSubmenu';
8
8
  /**
9
9
  * Create the state required to render MenuPopover.
10
10
  *
11
- * The returned state can be modified with hooks such as useMenuPopoverStyles,
12
- * before being passed to renderMenuPopover.
11
+ * The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,
12
+ * before being passed to renderMenuPopover_unstable.
13
13
  *
14
14
  * @param props - props from this instance of MenuPopover
15
15
  * @param ref - reference to root HTMLElement of MenuPopover
16
16
  */
17
17
 
18
- export const useMenuPopover = (props, ref) => {
18
+ export const useMenuPopover_unstable = (props, ref) => {
19
19
  var _a;
20
20
 
21
- const popoverRef = useMenuContext(context => context.menuPopoverRef);
22
- const setOpen = useMenuContext(context => context.setOpen);
23
- const openOnHover = useMenuContext(context => context.openOnHover);
21
+ const popoverRef = useMenuContext_unstable(context => context.menuPopoverRef);
22
+ const setOpen = useMenuContext_unstable(context => context.setOpen);
23
+ const openOnHover = useMenuContext_unstable(context => context.openOnHover);
24
24
  const isSubmenu = useIsSubmenu();
25
25
  const canDispatchCustomEventRef = React.useRef(true);
26
26
  const throttleDispatchTimerRef = React.useRef(0);
@@ -49,7 +49,7 @@ export const useMenuPopover = (props, ref) => {
49
49
  React.useEffect(() => {
50
50
  () => clearTimeout(throttleDispatchTimerRef.current);
51
51
  }, []);
52
- const inline = (_a = useMenuContext(context => context.inline)) !== null && _a !== void 0 ? _a : false;
52
+ const inline = (_a = useMenuContext_unstable(context => context.inline)) !== null && _a !== void 0 ? _a : false;
53
53
  const rootProps = getNativeElementProps('div', {
54
54
  role: 'presentation',
55
55
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,EAAoB,GAApB,EAAyB,UAAzB,EAAqC,MAArC,QAAmD,yBAAnD;AACA,SAAS,qBAAT,EAAgC,gBAAhC,EAAkD,aAAlD,QAAuE,2BAAvE;AAEA,SAAS,cAAT,QAA+B,4BAA/B;AACA,SAAS,sBAAT,QAAuC,mBAAvC;AACA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,YAAT,QAA6B,0BAA7B;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,cAAc,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;AACvG,QAAM,UAAU,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,cAApB,CAAj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;AACV,MAAA,IAAI,EAAE;AADI,KAFP;AAKL,IAAA,IAAI,EAAE;AALD,GAAP;AAOD,CA9EM","sourceRoot":""}
@@ -3,4 +3,4 @@ export declare const menuPopoverClassName = "fui-MenuPopover";
3
3
  /**
4
4
  * Apply styling to the Menu slots based on the state
5
5
  */
6
- export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopoverState;
6
+ export declare const useMenuPopoverStyles_unstable: (state: MenuPopoverState) => MenuPopoverState;
@@ -38,7 +38,7 @@ const useStyles = /*#__PURE__*/__styles({
38
38
  */
39
39
 
40
40
 
41
- export const useMenuPopoverStyles = state => {
41
+ export const useMenuPopoverStyles_unstable = state => {
42
42
  const styles = useStyles();
43
43
  state.root.className = mergeClasses(menuPopoverClassName, styles.root, state.root.className);
44
44
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useMenuSplitGroup } from './useMenuSplitGroup';
3
- import { renderMenuSplitGroup } from './renderMenuSplitGroup';
4
- import { useMenuSplitGroupStyles } from './useMenuSplitGroupStyles';
2
+ import { useMenuSplitGroup_unstable } from './useMenuSplitGroup';
3
+ import { renderMenuSplitGroup_unstable } from './renderMenuSplitGroup';
4
+ import { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles';
5
5
  /**
6
6
  * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
7
7
  */
8
8
 
9
9
  export const MenuSplitGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useMenuSplitGroup(props, ref);
11
- useMenuSplitGroupStyles(state);
12
- return renderMenuSplitGroup(state);
10
+ const state = useMenuSplitGroup_unstable(props, ref);
11
+ useMenuSplitGroupStyles_unstable(state);
12
+ return renderMenuSplitGroup_unstable(state);
13
13
  });
14
14
  MenuSplitGroup.displayName = 'MenuSplitGroup';
15
15
  //# sourceMappingURL=MenuSplitGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,uBAAT,QAAwC,2BAAxC;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AAEA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AACA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALuE,CAAjE;AAOP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;AAEA,EAAA,gCAAgC,CAAC,KAAD,CAAhC;AACA,SAAO,6BAA6B,CAAC,KAAD,CAApC;AACD,CALuE,CAAjE;AAOP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourceRoot":""}
@@ -2,4 +2,4 @@ import type { MenuSplitGroupState } from './MenuSplitGroup.types';
2
2
  /**
3
3
  * Render the final JSX of MenuSplitGroup
4
4
  */
5
- export declare const renderMenuSplitGroup: (state: MenuSplitGroupState) => JSX.Element;
5
+ export declare const renderMenuSplitGroup_unstable: (state: MenuSplitGroupState) => JSX.Element;
@@ -4,7 +4,7 @@ import { getSlots } from '@fluentui/react-utilities';
4
4
  * Render the final JSX of MenuSplitGroup
5
5
  */
6
6
 
7
- export const renderMenuSplitGroup = state => {
7
+ export const renderMenuSplitGroup_unstable = state => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA+B;AACjE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAsB,KAAtB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA+B;AAC1E,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAsB,KAAtB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourceRoot":""}
@@ -3,10 +3,10 @@ import type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.
3
3
  /**
4
4
  * Create the state required to render MenuSplitGroup.
5
5
  *
6
- * The returned state can be modified with hooks such as useMenuSplitGroupStyles,
7
- * before being passed to renderMenuSplitGroup.
6
+ * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
7
+ * before being passed to renderMenuSplitGroup_unstable.
8
8
  *
9
9
  * @param props - props from this instance of MenuSplitGroup
10
10
  * @param ref - reference to root HTMLElement of MenuSplitGroup
11
11
  */
12
- export declare const useMenuSplitGroup: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
12
+ export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
@@ -6,14 +6,14 @@ import { ArrowRight, ArrowLeft } from '@fluentui/keyboard-keys';
6
6
  /**
7
7
  * Create the state required to render MenuSplitGroup.
8
8
  *
9
- * The returned state can be modified with hooks such as useMenuSplitGroupStyles,
10
- * before being passed to renderMenuSplitGroup.
9
+ * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
10
+ * before being passed to renderMenuSplitGroup_unstable.
11
11
  *
12
12
  * @param props - props from this instance of MenuSplitGroup
13
13
  * @param ref - reference to root HTMLElement of MenuSplitGroup
14
14
  */
15
15
 
16
- export const useMenuSplitGroup = (props, ref) => {
16
+ export const useMenuSplitGroup_unstable = (props, ref) => {
17
17
  const innerRef = React.useRef();
18
18
  const {
19
19
  dir,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,aAAhC,EAA+C,aAA/C,QAAoE,2BAApE;AACA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SAAS,SAAT,QAA0B,iCAA1B;AAEA,SAAS,UAAT,EAAqB,SAArB,QAAsC,yBAAtC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAA6B,GAA7B,KAA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;AAJtB,GAAP;AAWD,CA/CM","sourceRoot":""}
@@ -3,4 +3,4 @@ export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
3
3
  /**
4
4
  * Apply styling to the MenuSplitGroup slots based on the state
5
5
  */
6
- export declare const useMenuSplitGroupStyles: (state: MenuSplitGroupState) => MenuSplitGroupState;
6
+ export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
@@ -27,7 +27,7 @@ const useStyles = /*#__PURE__*/__styles({
27
27
  */
28
28
 
29
29
 
30
- export const useMenuSplitGroupStyles = state => {
30
+ export const useMenuSplitGroupStyles_unstable = state => {
31
31
  const styles = useStyles();
32
32
  state.root.className = mergeClasses(menuSplitGroupClassName, styles.root, state.root.className);
33
33
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,uBAAuB,GAAG,oBAAhC;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAoD;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,uBAAD,EAA0B,MAAM,CAAC,IAAjC,EAAuC,KAAK,CAAC,IAAN,CAAW,SAAlD,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,uBAAuB,GAAG,oBAAhC;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACH,OAAO,MAAM,gCAAgC,GAAI,KAAD,IAAoD;AAClG,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,uBAAD,EAA0B,MAAM,CAAC,IAAjC,EAAuC,KAAK,CAAC,IAAN,CAAW,SAAlD,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
@@ -4,4 +4,4 @@ import type { MenuTriggerProps } from './MenuTrigger.types';
4
4
  * Wraps a trigger element as an only child
5
5
  * and adds the necessary event handling to open a popup menu
6
6
  */
7
- export declare const MenuTrigger: React.FC<MenuTriggerProps>;
7
+ export declare const MenuTrigger: React.ForwardRefExoticComponent<MenuTriggerProps & React.RefAttributes<HTMLElement>>;
@@ -1,13 +1,14 @@
1
- import { useMenuTrigger } from './useMenuTrigger';
2
- import { renderMenuTrigger } from './renderMenuTrigger';
1
+ import * as React from 'react';
2
+ import { useMenuTrigger_unstable } from './useMenuTrigger';
3
+ import { renderMenuTrigger_unstable } from './renderMenuTrigger';
3
4
  /**
4
5
  * Wraps a trigger element as an only child
5
6
  * and adds the necessary event handling to open a popup menu
6
7
  */
7
8
 
8
- export const MenuTrigger = props => {
9
- const state = useMenuTrigger(props);
10
- return renderMenuTrigger(state);
11
- };
9
+ export const MenuTrigger = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useMenuTrigger_unstable(props, ref);
11
+ return renderMenuTrigger_unstable(state);
12
+ });
12
13
  MenuTrigger.displayName = 'MenuTrigger';
13
14
  //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":"AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AAGA;;;AAGG;;AACH,OAAO,MAAM,WAAW,GAA+B,KAAK,IAAG;AAC7D,QAAM,KAAK,GAAG,cAAc,CAAC,KAAD,CAA5B;AAEA,SAAO,iBAAiB,CAAC,KAAD,CAAxB;AACD,CAJM;AAMP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAGA;;;AAGG;;AACH,OAAO,MAAM,WAAW,gBAAG,KAAK,CAAC,UAAN,CAAgD,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxF,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AAEA,SAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CAJ0B,CAApB;AAMP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourceRoot":""}
@@ -10,8 +10,10 @@ export declare type MenuTriggerProps = {
10
10
  /**
11
11
  * Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
12
12
  */
13
- export declare type MenuTriggerChildProps = Required<Pick<React.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
13
+ export declare type MenuTriggerChildProps = Required<Pick<React.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
14
14
  ref?: React.Ref<never>;
15
15
  'aria-expanded': boolean | undefined;
16
16
  };
17
- export declare type MenuTriggerState = MenuTriggerProps;
17
+ export declare type MenuTriggerState = {
18
+ children: React.ReactNode;
19
+ };
@@ -4,4 +4,4 @@ import type { MenuTriggerState } from './MenuTrigger.types';
4
4
  *
5
5
  * Only renders children
6
6
  */
7
- export declare const renderMenuTrigger: (state: MenuTriggerState) => JSX.Element;
7
+ export declare const renderMenuTrigger_unstable: (state: MenuTriggerState) => JSX.Element;
@@ -6,7 +6,7 @@ import { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext';
6
6
  * Only renders children
7
7
  */
8
8
 
9
- export const renderMenuTrigger = state => {
9
+ export const renderMenuTrigger_unstable = state => {
10
10
  return /*#__PURE__*/React.createElement(MenuTriggerContextProvider, {
11
11
  value: true
12
12
  }, state.children);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,mCAA3C;AAGA;;;;AAIG;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAA4B;AAC3D,sBAAO,KAAA,CAAA,aAAA,CAAC,0BAAD,EAA2B;AAAC,IAAA,KAAK,EAAE;AAAR,GAA3B,EAA0C,KAAK,CAAC,QAAhD,CAAP;AACD,CAFM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,mCAA3C;AAGA;;;;AAIG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,sBAAO,KAAA,CAAA,aAAA,CAAC,0BAAD,EAA2B;AAAC,IAAA,KAAK,EAAE;AAAR,GAA3B,EAA0C,KAAK,CAAC,QAAhD,CAAP;AACD,CAFM","sourceRoot":""}
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import type { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';
2
3
  /**
3
4
  * Create the state required to render MenuTrigger.
@@ -5,4 +6,4 @@ import type { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';
5
6
  *
6
7
  * @param props - props from this instance of MenuTrigger
7
8
  */
8
- export declare const useMenuTrigger: (props: MenuTriggerProps) => MenuTriggerState;
9
+ export declare const useMenuTrigger_unstable: (props: MenuTriggerProps, ref: React.Ref<HTMLElement>) => MenuTriggerState;
@@ -1,4 +1,11 @@
1
- import { useTriggerElement } from './useTriggerElement';
1
+ import * as React from 'react';
2
+ import { useMenuContext_unstable } from '../../contexts/menuContext';
3
+ import { useIsSubmenu } from '../../utils/useIsSubmenu';
4
+ import { useFocusFinders } from '@fluentui/react-tabster';
5
+ import { useFluent } from '@fluentui/react-shared-contexts';
6
+ import { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';
7
+ import { onlyChild, useMergedRefs, useTriggerElement } from '@fluentui/react-utilities';
8
+ import { shouldPreventDefaultOnKeyDown } from '@fluentui/react-utilities';
2
9
  /**
3
10
  * Create the state required to render MenuTrigger.
4
11
  * Clones the only child component and adds necessary event handling behaviours to open a popup menu
@@ -6,10 +13,175 @@ import { useTriggerElement } from './useTriggerElement';
6
13
  * @param props - props from this instance of MenuTrigger
7
14
  */
8
15
 
9
- export const useMenuTrigger = props => {
10
- const state = { ...props
11
- }; // TODO just move the contents of this hook here
16
+ export const useMenuTrigger_unstable = (props, ref) => {
17
+ var _a;
12
18
 
13
- return useTriggerElement(state);
19
+ const {
20
+ children,
21
+ ...rest
22
+ } = props;
23
+ const triggerRef = useMenuContext_unstable(context => context.triggerRef);
24
+ const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);
25
+ const setOpen = useMenuContext_unstable(context => context.setOpen);
26
+ const open = useMenuContext_unstable(context => context.open);
27
+ const triggerId = useMenuContext_unstable(context => context.triggerId);
28
+ const openOnHover = useMenuContext_unstable(context => context.openOnHover);
29
+ const openOnContext = useMenuContext_unstable(context => context.openOnContext);
30
+ const isSubmenu = useIsSubmenu();
31
+ const {
32
+ findFirstFocusable
33
+ } = useFocusFinders();
34
+ const focusFirst = React.useCallback(() => {
35
+ const firstFocusable = findFirstFocusable(menuPopoverRef.current);
36
+ firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
37
+ }, [findFirstFocusable, menuPopoverRef]);
38
+ const openedWithKeyboardRef = React.useRef(false);
39
+ const hasMouseMoved = React.useRef(false);
40
+ const {
41
+ dir
42
+ } = useFluent();
43
+ const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;
44
+ const child = /*#__PURE__*/React.isValidElement(children) ? onlyChild(children) : undefined;
45
+
46
+ const onContextMenu = e => {
47
+ if (isTargetDisabled(e)) {
48
+ return;
49
+ }
50
+
51
+ if (openOnContext) {
52
+ e.preventDefault();
53
+ setOpen(e, {
54
+ open: true,
55
+ keyboard: false
56
+ });
57
+ }
58
+ };
59
+
60
+ const onClick = e => {
61
+ if (isTargetDisabled(e)) {
62
+ return;
63
+ }
64
+
65
+ if (!openOnContext) {
66
+ setOpen(e, {
67
+ open: !open,
68
+ keyboard: openedWithKeyboardRef.current
69
+ });
70
+ openedWithKeyboardRef.current = false;
71
+ }
72
+ };
73
+
74
+ const onKeyDown = e => {
75
+ var _a;
76
+
77
+ if (isTargetDisabled(e)) {
78
+ return;
79
+ }
80
+
81
+ if (shouldPreventDefaultOnKeyDown(e)) {
82
+ e.preventDefault();
83
+ openedWithKeyboardRef.current = true;
84
+ (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
85
+ }
86
+
87
+ const key = e.key;
88
+
89
+ if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === ArrowDown)) {
90
+ setOpen(e, {
91
+ open: true,
92
+ keyboard: true
93
+ });
94
+ }
95
+
96
+ if (key === Escape && !isSubmenu) {
97
+ setOpen(e, {
98
+ open: false,
99
+ keyboard: true
100
+ });
101
+ } // if menu is already open, can't rely on effects to focus
102
+
103
+
104
+ if (open && key === OpenArrowKey && isSubmenu) {
105
+ focusFirst();
106
+ }
107
+ };
108
+
109
+ const onMouseEnter = e => {
110
+ if (isTargetDisabled(e)) {
111
+ return;
112
+ }
113
+
114
+ if (openOnHover && hasMouseMoved.current) {
115
+ setOpen(e, {
116
+ open: true,
117
+ keyboard: false
118
+ });
119
+ }
120
+ }; // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
121
+ // First time open the mouse using mousemove and then continue with mouseenter
122
+ // Only use once to determine that the user is using the mouse since it is an expensive event to handle
123
+
124
+
125
+ const onMouseMove = e => {
126
+ if (isTargetDisabled(e)) {
127
+ return;
128
+ }
129
+
130
+ if (openOnHover && !hasMouseMoved.current) {
131
+ setOpen(e, {
132
+ open: true,
133
+ keyboard: false
134
+ });
135
+ hasMouseMoved.current = true;
136
+ }
137
+ };
138
+
139
+ const onMouseLeave = e => {
140
+ if (isTargetDisabled(e)) {
141
+ return;
142
+ }
143
+
144
+ if (openOnHover) {
145
+ setOpen(e, {
146
+ open: false,
147
+ keyboard: false
148
+ });
149
+ }
150
+ };
151
+
152
+ const overrideProps = {
153
+ 'aria-haspopup': 'menu',
154
+ 'aria-expanded': open,
155
+ id: ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.id) || triggerId,
156
+ onClick,
157
+ onMouseEnter,
158
+ onMouseLeave,
159
+ onKeyDown,
160
+ onContextMenu,
161
+ onMouseMove
162
+ };
163
+
164
+ if (!open && !isSubmenu) {
165
+ overrideProps['aria-expanded'] = undefined;
166
+ }
167
+
168
+ return {
169
+ children: useTriggerElement({
170
+ children,
171
+ ref: useMergedRefs(triggerRef, ref),
172
+ outerProps: rest,
173
+ overrideProps
174
+ })
175
+ };
176
+ };
177
+
178
+ const isTargetDisabled = e => {
179
+ const isDisabled = el => el.hasAttribute('disabled') || el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true';
180
+
181
+ if (e.target instanceof HTMLElement && isDisabled(e.target)) {
182
+ return true;
183
+ }
184
+
185
+ return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);
14
186
  };
15
187
  //# sourceMappingURL=useMenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":"AAAA,SAAS,iBAAT,QAAkC,qBAAlC;AAGA;;;;;AAKG;;AACH,OAAO,MAAM,cAAc,GAAI,KAAD,IAA8C;AAC1E,QAAM,KAAK,GAAG,EAAE,GAAG;AAAL,GAAd,CAD0E,CAG1E;;AACA,SAAO,iBAAiB,CAAC,KAAD,CAAxB;AACD,CALM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,uBAAT,QAAwC,4BAAxC;AACA,SAAS,YAAT,QAA6B,0BAA7B;AACA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,UAAT,EAAqB,SAArB,EAAgC,MAAhC,EAAwC,SAAxC,QAAyD,yBAAzD;AACA,SAAS,SAAT,EAAoB,aAApB,EAAmC,iBAAnC,QAA4D,2BAA5D;AACA,SAAS,6BAAT,QAA8C,2BAA9C;AAEA;;;;;AAKG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;AAChH,QAAM;AAAE,IAAA,QAAF;AAAY,OAAG;AAAf,MAAwB,KAA9B;AAEA,QAAM,UAAU,GAAG,uBAAuB,CAAC,OAAO,IAAI,OAAO,CAAC,UAApB,CAA1C;AACA,QAAM,cAAc,GAAG,uBAAuB,CAAC,OAAO,IAAI,OAAO,CAAC,cAApB,CAA9C;AACA,QAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO,I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KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,EAAd,KAAoB,SAHmB;AAI3C,IAAA,OAJ2C;AAK3C,IAAA,YAL2C;AAM3C,IAAA,YAN2C;AAO3C,IAAA,SAP2C;AAQ3C,IAAA,aAR2C;AAS3C,IAAA;AAT2C,GAA7C;;AAYA,MAAI,CAAC,IAAD,IAAS,CAAC,SAAd,EAAyB;AACvB,IAAA,aAAa,CAAC,eAAD,CAAb,GAAiC,SAAjC;AACD;;AAED,SAAO;AACL,IAAA,QAAQ,EAAE,iBAAiB,CAAC;AAC1B,MAAA,QAD0B;AAE1B,MAAA,GAAG,EAAE,aAAa,CAAC,UAAD,EAAa,GAAb,CAFQ;AAG1B,MAAA,UAAU,EAAE,IAHc;AAI1B,MAAA;AAJ0B,KAAD;AADtB,GAAP;AAQD,CAnIM;;AAqIP,MAAM,gBAAgB,GAAI,CAAD,IAAoC;AAC3D,QAAM,UAAU,GAAI,EAAD,IACjB,EAAE,CAAC,YAAH,CAAgB,UAAhB,KAAgC,EAAE,CAAC,YAAH,CAAgB,eAAhB,KAAoC,EAAE,CAAC,YAAH,CAAgB,eAAhB,MAAqC,MAD3G;;AAEA,MAAI,CAAC,CAAC,MAAF,YAAoB,WAApB,IAAmC,UAAU,CAAC,CAAC,CAAC,MAAH,CAAjD,EAA6D;AAC3D,WAAO,IAAP;AACD;;AAED,SAAO,CAAC,CAAC,aAAF,YAA2B,WAA3B,IAA0C,UAAU,CAAC,CAAC,CAAC,aAAH,CAA3D;AACD,CARD","sourceRoot":""}
@@ -13,4 +13,4 @@ export declare type MenuContextValue = MenuListProps & Pick<MenuState, 'openOnHo
13
13
  triggerId: string;
14
14
  };
15
15
  export declare const MenuProvider: React.Provider<MenuContextValue> & React.FC<React.ProviderProps<MenuContextValue>>;
16
- export declare const useMenuContext: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
16
+ export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
@@ -19,5 +19,5 @@ export const MenuContext = /*#__PURE__*/createContext({
19
19
  hasCheckmarks: false
20
20
  });
21
21
  export const MenuProvider = MenuContext.Provider;
22
- export const useMenuContext = selector => useContextSelector(MenuContext, selector);
22
+ export const useMenuContext_unstable = selector => useContextSelector(MenuContext, selector);
23
23
  //# sourceMappingURL=menuContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuContext.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAKA,OAAO,MAAM,WAAW,gBAA8B,aAAa,CAAmB;AACpF,EAAA,IAAI,EAAE,KAD8E;AAEpF,EAAA,OAAO,EAAE,MAAM,KAFqE;AAGpF,EAAA,aAAa,EAAE,EAHqE;AAIpF,EAAA,oBAAoB,EAAE,MAAM,IAJwD;AAKpF,EAAA,oBAAoB,EAAE,EAL8D;AAMpF,EAAA,SAAS,EAAE,KANyE;AAOpF,EAAA,UAAU,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GAPuE;AAQpF,EAAA,cAAc,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GARmE;AASpF,EAAA,SAAS,EAAE,EATyE;AAUpF,EAAA,aAAa,EAAE,KAVqE;AAWpF,EAAA,WAAW,EAAE,KAXuE;AAYpF,EAAA,QAAQ,EAAE,KAZ0E;AAapF,EAAA,aAAa,EAAE;AAbqE,CAAnB,CAA5D;AAwCP,OAAO,MAAM,YAAY,GAAG,WAAW,CAAC,QAAjC;AAEP,OAAO,MAAM,cAAc,GAAO,QAAJ,IAC5B,kBAAkB,CAAC,WAAD,EAAc,QAAd,CADb","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/contexts/menuContext.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAKA,OAAO,MAAM,WAAW,gBAA8B,aAAa,CAAmB;AACpF,EAAA,IAAI,EAAE,KAD8E;AAEpF,EAAA,OAAO,EAAE,MAAM,KAFqE;AAGpF,EAAA,aAAa,EAAE,EAHqE;AAIpF,EAAA,oBAAoB,EAAE,MAAM,IAJwD;AAKpF,EAAA,oBAAoB,EAAE,EAL8D;AAMpF,EAAA,SAAS,EAAE,KANyE;AAOpF,EAAA,UAAU,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GAPuE;AAQpF,EAAA,cAAc,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GARmE;AASpF,EAAA,SAAS,EAAE,EATyE;AAUpF,EAAA,aAAa,EAAE,KAVqE;AAWpF,EAAA,WAAW,EAAE,KAXuE;AAYpF,EAAA,QAAQ,EAAE,KAZ0E;AAapF,EAAA,aAAa,EAAE;AAbqE,CAAnB,CAA5D;AAwCP,OAAO,MAAM,YAAY,GAAG,WAAW,CAAC,QAAjC;AAEP,OAAO,MAAM,uBAAuB,GAAO,QAAJ,IACrC,kBAAkB,CAAC,WAAD,EAAc,QAAd,CADb","sourceRoot":""}
@@ -10,4 +10,4 @@ export declare type MenuGroupContextValue = {
10
10
  headerId: string;
11
11
  };
12
12
  export declare const MenuGroupContextProvider: React.Provider<MenuGroupContextValue>;
13
- export declare const useMenuGroupContext: () => MenuGroupContextValue;
13
+ export declare const useMenuGroupContext_unstable: () => MenuGroupContextValue;
@@ -3,5 +3,5 @@ const MenuGroupContext = /*#__PURE__*/React.createContext({
3
3
  headerId: ''
4
4
  });
5
5
  export const MenuGroupContextProvider = MenuGroupContext.Provider;
6
- export const useMenuGroupContext = () => React.useContext(MenuGroupContext);
6
+ export const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext);
7
7
  //# sourceMappingURL=menuGroupContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuGroupContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaA,OAAO,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,QAAlD;AACP,OAAO,MAAM,mBAAmB,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAAlC","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/contexts/menuGroupContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaA,OAAO,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,QAAlD;AACP,OAAO,MAAM,4BAA4B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAA3C","sourceRoot":""}
@@ -12,4 +12,4 @@ export declare type MenuListContextValue = Pick<MenuListProps, 'checkedValues' |
12
12
  selectRadio?: SelectableHandler;
13
13
  };
14
14
  export declare const MenuListProvider: React.Provider<MenuListContextValue> & React.FC<React.ProviderProps<MenuListContextValue>>;
15
- export declare const useMenuListContext: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
15
+ export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
@@ -9,5 +9,5 @@ export const MenuListContext = /*#__PURE__*/createContext({
9
9
  hasCheckmarks: false
10
10
  });
11
11
  export const MenuListProvider = MenuListContext.Provider;
12
- export const useMenuListContext = selector => useContextSelector(MenuListContext, selector);
12
+ export const useMenuListContext_unstable = selector => useContextSelector(MenuListContext, selector);
13
13
  //# sourceMappingURL=menuListContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuListContext.tsx"],"names":[],"mappings":"AACA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAKA,OAAO,MAAM,eAAe,gBAAkC,aAAa,CAAuB;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,MAAM,IAFoE;AAGhG,EAAA,wBAAwB,EAAE,MAAM,IAHgE;AAIhG,EAAA,cAAc,EAAE,MAAM,IAJ0E;AAKhG,EAAA,WAAW,EAAE,MAAM,IAL6E;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAAvB,CAApE;AAsBP,OAAO,MAAM,gBAAgB,GAAG,eAAe,CAAC,QAAzC;AAEP,OAAO,MAAM,kBAAkB,GAAQ,QAAL,IAChC,kBAAkB,CAAC,eAAD,EAAkB,QAAlB,CADb","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/contexts/menuListContext.tsx"],"names":[],"mappings":"AACA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAKA,OAAO,MAAM,eAAe,gBAAkC,aAAa,CAAuB;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,MAAM,IAFoE;AAGhG,EAAA,wBAAwB,EAAE,MAAM,IAHgE;AAIhG,EAAA,cAAc,EAAE,MAAM,IAJ0E;AAKhG,EAAA,WAAW,EAAE,MAAM,IAL6E;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAAvB,CAApE;AAsBP,OAAO,MAAM,gBAAgB,GAAG,eAAe,CAAC,QAAzC;AAEP,OAAO,MAAM,2BAA2B,GAAQ,QAAL,IACzC,kBAAkB,CAAC,eAAD,EAAkB,QAAlB,CADb","sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  export declare const MenuTriggerContextProvider: React.Provider<boolean>;
3
- export declare const useMenuTriggerContext: () => boolean;
3
+ export declare const useMenuTriggerContext_unstable: () => boolean;
@@ -5,5 +5,5 @@ import * as React from 'react';
5
5
 
6
6
  const MenuTriggerContext = /*#__PURE__*/React.createContext(false);
7
7
  export const MenuTriggerContextProvider = MenuTriggerContext.Provider;
8
- export const useMenuTriggerContext = () => React.useContext(MenuTriggerContext);
8
+ export const useMenuTriggerContext_unstable = () => React.useContext(MenuTriggerContext);
9
9
  //# sourceMappingURL=menuTriggerContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuTriggerContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA;;AAEG;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAA6B,KAA7B,CAA3B;AAEA,OAAO,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,QAAtD;AACP,OAAO,MAAM,qBAAqB,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,kBAAjB,CAApC","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/contexts/menuTriggerContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA;;AAEG;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAA6B,KAA7B,CAA3B;AAEA,OAAO,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,QAAtD;AACP,OAAO,MAAM,8BAA8B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,kBAAjB,CAA7C","sourceRoot":""}
@@ -5,4 +5,4 @@ import type { MenuItemSlots } from '../components/MenuItem/MenuItem.types';
5
5
  *
6
6
  * @param state - should contain a `checkmark` slot
7
7
  */
8
- export declare const useCheckmarkStyles: (state: MenuItemSelectableState & Pick<MenuItemSlots, 'checkmark'>) => void;
8
+ export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemSlots, 'checkmark'>) => void;
@@ -19,7 +19,7 @@ const useStyles = /*#__PURE__*/__styles({
19
19
  */
20
20
 
21
21
 
22
- export const useCheckmarkStyles = state => {
22
+ export const useCheckmarkStyles_unstable = state => {
23
23
  const styles = useStyles();
24
24
 
25
25
  if (state.checkmark) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;AAIA,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAsE;AACtG,QAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,YAAY,CACtC,MAAM,CAAC,IAD+B,EAEtC,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFc,EAGtC,KAAK,CAAC,SAAN,CAAgB,SAHsB,CAAxC;AAKD;AACF,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;AAIA,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAAsE;AAC/G,QAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,YAAY,CACtC,MAAM,CAAC,IAD+B,EAEtC,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFc,EAGtC,KAAK,CAAC,SAAN,CAAgB,SAHsB,CAAxC;AAKD;AACF,CATM","sourceRoot":""}