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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. package/CHANGELOG.json +360 -26
  2. package/CHANGELOG.md +81 -20
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +139 -70
  5. package/lib/MenuSplitGroup.d.ts +1 -0
  6. package/lib/MenuSplitGroup.js +2 -0
  7. package/lib/MenuSplitGroup.js.map +1 -0
  8. package/lib/components/Menu/Menu.js +7 -7
  9. package/lib/components/Menu/Menu.js.map +1 -1
  10. package/lib/components/Menu/renderMenu.d.ts +1 -1
  11. package/lib/components/Menu/renderMenu.js +1 -1
  12. package/lib/components/Menu/renderMenu.js.map +1 -1
  13. package/lib/components/Menu/useMenu.d.ts +2 -2
  14. package/lib/components/Menu/useMenu.js +119 -128
  15. package/lib/components/Menu/useMenu.js.map +1 -1
  16. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  17. package/lib/components/Menu/useMenuContextValues.js +35 -33
  18. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  19. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  20. package/lib/components/MenuDivider/MenuDivider.js +8 -8
  21. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  22. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  23. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  24. package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
  25. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  26. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  27. package/lib/components/MenuDivider/useMenuDivider.js +9 -7
  28. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  30. package/lib/components/MenuDivider/useMenuDividerStyles.js +7 -5
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.js +10 -8
  34. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  35. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  36. package/lib/components/MenuGroup/index.d.ts +1 -0
  37. package/lib/components/MenuGroup/index.js +1 -0
  38. package/lib/components/MenuGroup/index.js.map +1 -1
  39. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  40. package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
  41. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  42. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  43. package/lib/components/MenuGroup/useMenuGroup.js +10 -7
  44. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  45. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  46. package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
  47. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  48. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  49. package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
  50. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  51. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  52. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
  53. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  54. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  55. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  56. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +7 -7
  57. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  58. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  59. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
  60. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  61. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  62. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +7 -5
  63. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  64. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  65. package/lib/components/MenuItem/MenuItem.js +8 -10
  66. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  67. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  68. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  69. package/lib/components/MenuItem/renderMenuItem.js +12 -8
  70. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  71. package/lib/components/MenuItem/useCharacterSearch.js +7 -7
  72. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  73. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  74. package/lib/components/MenuItem/useMenuItem.js +35 -45
  75. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  76. package/lib/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  77. package/lib/components/MenuItem/useMenuItemStyles.js +31 -27
  78. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  79. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  80. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
  81. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  82. package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
  83. package/lib/components/MenuItemCheckbox/index.js +1 -0
  84. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  85. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  86. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
  87. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  88. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  89. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
  90. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  91. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  92. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +8 -5
  93. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  94. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  95. package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
  96. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  97. package/lib/components/MenuItemRadio/index.d.ts +1 -0
  98. package/lib/components/MenuItemRadio/index.js +1 -0
  99. package/lib/components/MenuItemRadio/index.js.map +1 -1
  100. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  101. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
  102. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  103. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  104. package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
  105. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  106. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  107. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +8 -5
  108. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  109. package/lib/components/MenuList/MenuList.d.ts +1 -1
  110. package/lib/components/MenuList/MenuList.js +10 -10
  111. package/lib/components/MenuList/MenuList.js.map +1 -1
  112. package/lib/components/MenuList/MenuList.types.d.ts +12 -10
  113. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  114. package/lib/components/MenuList/renderMenuList.js +7 -7
  115. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  116. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  117. package/lib/components/MenuList/useMenuList.js +70 -87
  118. package/lib/components/MenuList/useMenuList.js.map +1 -1
  119. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  120. package/lib/components/MenuList/useMenuListContextValues.js +19 -17
  121. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  122. package/lib/components/MenuList/useMenuListStyles.d.ts +2 -1
  123. package/lib/components/MenuList/useMenuListStyles.js +9 -7
  124. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  125. package/lib/components/MenuPopover/MenuPopover.js +7 -7
  126. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  127. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  128. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  129. package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
  130. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  131. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  132. package/lib/components/MenuPopover/useMenuPopover.js +35 -41
  133. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  134. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  135. package/lib/components/MenuPopover/useMenuPopoverStyles.js +13 -8
  136. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  137. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  138. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  139. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  140. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  141. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  142. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  143. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  144. package/lib/components/MenuSplitGroup/index.js +6 -0
  145. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  146. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  147. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  148. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  149. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  150. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  151. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  152. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  153. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  154. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  155. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  156. package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
  157. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  158. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  159. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  160. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  161. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  162. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  163. package/lib/components/MenuTrigger/useMenuTrigger.js +166 -5
  164. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  165. package/lib/contexts/menuContext.d.ts +1 -1
  166. package/lib/contexts/menuContext.js +5 -11
  167. package/lib/contexts/menuContext.js.map +1 -1
  168. package/lib/contexts/menuGroupContext.d.ts +1 -1
  169. package/lib/contexts/menuGroupContext.js +3 -5
  170. package/lib/contexts/menuGroupContext.js.map +1 -1
  171. package/lib/contexts/menuListContext.d.ts +1 -1
  172. package/lib/contexts/menuListContext.js +7 -17
  173. package/lib/contexts/menuListContext.js.map +1 -1
  174. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  175. package/lib/contexts/menuTriggerContext.js +3 -5
  176. package/lib/contexts/menuTriggerContext.js.map +1 -1
  177. package/lib/index.d.ts +11 -10
  178. package/lib/index.js +11 -10
  179. package/lib/index.js.map +1 -1
  180. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  181. package/lib/selectable/useCheckmarkStyles.js +4 -4
  182. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  183. package/lib/utils/useIsSubmenu.js +3 -5
  184. package/lib/utils/useIsSubmenu.js.map +1 -1
  185. package/lib/utils/useOnMenuEnter.js +16 -14
  186. package/lib/utils/useOnMenuEnter.js.map +1 -1
  187. package/lib-commonjs/Menu.js +1 -1
  188. package/lib-commonjs/MenuDivider.js +1 -1
  189. package/lib-commonjs/MenuGroup.js +1 -1
  190. package/lib-commonjs/MenuGroupHeader.js +1 -1
  191. package/lib-commonjs/MenuItem.js +1 -1
  192. package/lib-commonjs/MenuItemCheckbox.js +1 -1
  193. package/lib-commonjs/MenuItemRadio.js +1 -1
  194. package/lib-commonjs/MenuList.js +1 -1
  195. package/lib-commonjs/MenuPopover.js +1 -1
  196. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  197. package/lib-commonjs/MenuSplitGroup.js +10 -0
  198. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  199. package/lib-commonjs/MenuTrigger.js +1 -1
  200. package/lib-commonjs/components/Menu/Menu.js +7 -7
  201. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  202. package/lib-commonjs/components/Menu/index.js +1 -1
  203. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  204. package/lib-commonjs/components/Menu/renderMenu.js +5 -5
  205. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  206. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  207. package/lib-commonjs/components/Menu/useMenu.js +130 -141
  208. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  209. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  210. package/lib-commonjs/components/Menu/useMenuContextValues.js +37 -35
  211. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  212. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  213. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -9
  214. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  215. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  216. package/lib-commonjs/components/MenuDivider/index.js +1 -1
  217. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  218. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +11 -12
  219. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  220. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  221. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +12 -11
  222. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  223. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  224. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +11 -7
  225. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  226. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  227. package/lib-commonjs/components/MenuGroup/MenuGroup.js +12 -9
  228. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  229. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  230. package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
  231. package/lib-commonjs/components/MenuGroup/index.js +3 -1
  232. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  233. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  234. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +12 -13
  235. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  236. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  237. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +13 -11
  238. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  239. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  240. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +11 -11
  241. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  242. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  243. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
  244. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  245. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  246. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -9
  247. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  248. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  249. package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
  250. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  251. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +11 -12
  252. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  253. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  254. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +16 -12
  255. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  256. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  257. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +11 -7
  258. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  259. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  260. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -12
  261. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  262. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  263. package/lib-commonjs/components/MenuItem/index.js +1 -1
  264. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  265. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -14
  266. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  267. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
  268. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  269. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  270. package/lib-commonjs/components/MenuItem/useMenuItem.js +42 -53
  271. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  272. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  273. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +40 -33
  274. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  276. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -9
  277. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  278. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
  279. package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
  280. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  282. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -14
  283. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  284. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  285. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +19 -21
  286. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  287. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  288. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +12 -7
  289. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  290. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  291. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -9
  292. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  293. package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
  294. package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
  295. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  296. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  297. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -14
  298. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  299. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  300. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +19 -20
  301. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  302. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  303. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +12 -7
  304. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  305. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  306. package/lib-commonjs/components/MenuList/MenuList.js +11 -11
  307. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  308. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +12 -10
  309. package/lib-commonjs/components/MenuList/index.js +1 -1
  310. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  311. package/lib-commonjs/components/MenuList/renderMenuList.js +12 -13
  312. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  313. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  314. package/lib-commonjs/components/MenuList/useMenuList.js +77 -95
  315. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  316. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  317. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +21 -19
  318. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  319. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +2 -1
  320. package/lib-commonjs/components/MenuList/useMenuListStyles.js +12 -9
  321. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  322. package/lib-commonjs/components/MenuPopover/MenuPopover.js +8 -8
  323. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  324. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  325. package/lib-commonjs/components/MenuPopover/index.js +1 -1
  326. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  327. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +14 -13
  328. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  329. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  330. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +43 -50
  331. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  332. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  333. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +17 -10
  334. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  335. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  336. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  337. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  338. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  339. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  340. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  341. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  342. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  343. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  344. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  345. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  346. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  347. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  348. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  349. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  350. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  351. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  352. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  353. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  354. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -5
  355. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  356. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  357. package/lib-commonjs/components/MenuTrigger/index.js +1 -1
  358. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  359. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -5
  360. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  361. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  362. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +174 -7
  363. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  364. package/lib-commonjs/components/index.js +1 -1
  365. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  366. package/lib-commonjs/contexts/menuContext.js +6 -12
  367. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  368. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  369. package/lib-commonjs/contexts/menuGroupContext.js +5 -7
  370. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  371. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  372. package/lib-commonjs/contexts/menuListContext.js +8 -18
  373. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  374. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  375. package/lib-commonjs/contexts/menuTriggerContext.js +5 -7
  376. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  377. package/lib-commonjs/index.d.ts +11 -10
  378. package/lib-commonjs/index.js +17 -15
  379. package/lib-commonjs/index.js.map +1 -1
  380. package/lib-commonjs/selectable/index.js +1 -1
  381. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  382. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -7
  383. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  384. package/lib-commonjs/utils/index.js +1 -1
  385. package/lib-commonjs/utils/useIsSubmenu.js +5 -7
  386. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  387. package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
  388. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  389. package/package.json +15 -17
  390. package/lib/common/isConformant.d.ts +0 -4
  391. package/lib/common/isConformant.js +0 -12
  392. package/lib/common/isConformant.js.map +0 -1
  393. package/lib/common/mockUseMenuContext.d.ts +0 -7
  394. package/lib/common/mockUseMenuContext.js +0 -36
  395. package/lib/common/mockUseMenuContext.js.map +0 -1
  396. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  397. package/lib/components/MenuTrigger/useTriggerElement.js +0 -179
  398. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  399. package/lib-commonjs/common/isConformant.d.ts +0 -4
  400. package/lib-commonjs/common/isConformant.js +0 -23
  401. package/lib-commonjs/common/isConformant.js.map +0 -1
  402. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  403. package/lib-commonjs/common/mockUseMenuContext.js +0 -47
  404. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  405. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  406. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
  407. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderMenuSplitGroup_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Render the final JSX of MenuSplitGroup
13
+ */
14
+
15
+
16
+ const renderMenuSplitGroup_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state);
21
+ return React.createElement(slots.root, { ...slotProps.root
22
+ });
23
+ };
24
+
25
+ exports.renderMenuSplitGroup_unstable = renderMenuSplitGroup_unstable;
26
+ //# sourceMappingURL=renderMenuSplitGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B;AAC1E,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;AAEA,SAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourceRoot":""}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.types';
3
+ /**
4
+ * Create the state required to render MenuSplitGroup.
5
+ *
6
+ * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
7
+ * before being passed to renderMenuSplitGroup_unstable.
8
+ *
9
+ * @param props - props from this instance of MenuSplitGroup
10
+ * @param ref - reference to root HTMLElement of MenuSplitGroup
11
+ */
12
+ export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMenuSplitGroup_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
+
14
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
15
+
16
+ const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
17
+ /**
18
+ * Create the state required to render MenuSplitGroup.
19
+ *
20
+ * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
21
+ * before being passed to renderMenuSplitGroup_unstable.
22
+ *
23
+ * @param props - props from this instance of MenuSplitGroup
24
+ * @param ref - reference to root HTMLElement of MenuSplitGroup
25
+ */
26
+
27
+
28
+ const useMenuSplitGroup_unstable = (props, ref) => {
29
+ const innerRef = React.useRef();
30
+ const {
31
+ dir,
32
+ targetDocument
33
+ } = react_shared_contexts_1.useFluent();
34
+ const nextArrowKey = react_utilities_1.getRTLSafeKey(keyboard_keys_1.ArrowRight, dir);
35
+ const prevArrowKey = react_utilities_1.getRTLSafeKey(keyboard_keys_1.ArrowLeft, dir);
36
+ const {
37
+ findNextFocusable,
38
+ findPrevFocusable
39
+ } = react_tabster_1.useFocusFinders();
40
+ const onKeyDown = React.useCallback(e => {
41
+ var _a;
42
+
43
+ const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
44
+
45
+ if (!activeElement) {
46
+ return;
47
+ }
48
+
49
+ if (!((_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.contains(activeElement))) {
50
+ return;
51
+ }
52
+
53
+ if (e.key === nextArrowKey) {
54
+ const next = findNextFocusable(activeElement, {
55
+ container: innerRef.current
56
+ });
57
+ next === null || next === void 0 ? void 0 : next.focus();
58
+ }
59
+
60
+ if (e.key === prevArrowKey) {
61
+ const prev = findPrevFocusable(activeElement, {
62
+ container: innerRef.current
63
+ });
64
+ prev === null || prev === void 0 ? void 0 : prev.focus();
65
+ }
66
+ }, [findNextFocusable, findPrevFocusable, targetDocument, nextArrowKey, prevArrowKey]);
67
+ return {
68
+ components: {
69
+ root: 'div'
70
+ },
71
+ root: react_utilities_1.getNativeElementProps('div', {
72
+ role: 'group',
73
+ ref: react_utilities_1.useMergedRefs(ref, innerRef),
74
+ onKeyDown,
75
+ ...props
76
+ })
77
+ };
78
+ };
79
+
80
+ exports.useMenuSplitGroup_unstable = useMenuSplitGroup_unstable;
81
+ //# sourceMappingURL=useMenuSplitGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAA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AAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,KAAN,EAAA;AACD;;AAED,QAAI,CAAC,CAAC,GAAF,KAAU,YAAd,EAA4B;AAC1B,YAAM,IAAI,GAAG,iBAAiB,CAAC,aAAD,EAA+B;AAAE,QAAA,SAAS,EAAE,QAAQ,CAAC;AAAtB,OAA/B,CAA9B;AACA,MAAA,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,KAAN,EAAA;AACD;AACF,GApBe,EAqBhB,CAAC,iBAAD,EAAoB,iBAApB,EAAuC,cAAvC,EAAuD,YAAvD,EAAqE,YAArE,CArBgB,CAAlB;AAwBA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,IAAI,EAAE,OAD2B;AAEjC,MAAA,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,QAAnB,CAF4B;AAGjC,MAAA,SAHiC;AAIjC,SAAG;AAJ8B,KAA7B;AAJD,GAAP;AAWD,CA/CM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourceRoot":""}
@@ -0,0 +1,6 @@
1
+ import type { MenuSplitGroupState } from './MenuSplitGroup.types';
2
+ export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
3
+ /**
4
+ * Apply styling to the MenuSplitGroup slots based on the state
5
+ */
6
+ export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMenuSplitGroupStyles_unstable = exports.menuSplitGroupClassName = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles");
13
+
14
+ exports.menuSplitGroupClassName = 'fui-MenuSplitGroup';
15
+ /**
16
+ * Styles for the root slot
17
+ */
18
+
19
+ const useStyles = /*#__PURE__*/react_1.__styles({
20
+ "root": {
21
+ "mc9l5x": "f22iagw",
22
+ "u7v6m2": "f168awwq",
23
+ "Bo1wru1": ["f1om2jlk", "fcyhg04"],
24
+ "Bhkyaub": ["fgqgg70", "fqo1hry"],
25
+ "J9ixe0": ["fh1zedf", "f1auaj6e"],
26
+ "rj29m3": ["fokbbcd", "f1xlvh9o"],
27
+ "lispf9": "f1et5qag",
28
+ "B9hwub1": "f13ngu1f",
29
+ "dvf9w6": "f1db9j62",
30
+ "Hjn5ok": "f92z21p"
31
+ }
32
+ }, {
33
+ "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f168awwq>.fui-MenuItem:nth-child(1){width:100%;}", ".f1om2jlk>.fui-MenuItem:nth-child(2){border-top-left-radius:0;}", ".fcyhg04>.fui-MenuItem:nth-child(2){border-top-right-radius:0;}", ".fgqgg70>.fui-MenuItem:nth-child(2){border-bottom-left-radius:0;}", ".fqo1hry>.fui-MenuItem:nth-child(2){border-bottom-right-radius:0;}", ".fh1zedf>.fui-MenuItem:nth-child(2){padding-left:0;}", ".f1auaj6e>.fui-MenuItem:nth-child(2){padding-right:0;}", ".fokbbcd>.fui-MenuItem:nth-child(2){margin-left:auto;}", ".f1xlvh9o>.fui-MenuItem:nth-child(2){margin-right:auto;}", ".f1et5qag>.fui-MenuItem:nth-child(2):before{content:\"\";}", ".f13ngu1f>.fui-MenuItem:nth-child(2):before{width:var(--strokeWidthThin);}", ".f1db9j62>.fui-MenuItem:nth-child(2):before{height:24px;}", ".f92z21p>.fui-MenuItem:nth-child(2):before{background-color:var(--colorNeutralStroke1);}"]
34
+ });
35
+ /**
36
+ * Apply styling to the MenuSplitGroup slots based on the state
37
+ */
38
+
39
+
40
+ const useMenuSplitGroupStyles_unstable = state => {
41
+ const styles = useStyles();
42
+ state.root.className = react_1.mergeClasses(exports.menuSplitGroupClassName, styles.root, state.root.className);
43
+ return state;
44
+ };
45
+
46
+ exports.useMenuSplitGroupStyles_unstable = useMenuSplitGroupStyles_unstable;
47
+ //# sourceMappingURL=useMenuSplitGroupStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAGa,OAAA,CAAA,uBAAA,GAA0B,oBAA1B;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACI,MAAM,gCAAgC,GAAI,KAAD,IAAoD;AAClG,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,uBAAb,EAAsC,MAAM,CAAC,IAA7C,EAAmD,KAAK,CAAC,IAAN,CAAW,SAA9D,CAAvB;AACA,SAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourceRoot":""}
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import type { MenuTriggerProps } from './MenuTrigger.types';
3
+ import type { FluentTriggerComponent } from '@fluentui/react-utilities';
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
- export declare const MenuTrigger: React.FC<MenuTriggerProps>;
8
+ export declare const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent;
@@ -5,20 +5,21 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.MenuTrigger = void 0;
7
7
 
8
- var useMenuTrigger_1 = /*#__PURE__*/require("./useMenuTrigger");
8
+ const useMenuTrigger_1 = /*#__PURE__*/require("./useMenuTrigger");
9
9
 
10
- var renderMenuTrigger_1 = /*#__PURE__*/require("./renderMenuTrigger");
10
+ const renderMenuTrigger_1 = /*#__PURE__*/require("./renderMenuTrigger");
11
11
  /**
12
12
  * Wraps a trigger element as an only child
13
13
  * and adds the necessary event handling to open a popup menu
14
14
  */
15
15
 
16
16
 
17
- var MenuTrigger = function (props) {
18
- var state = useMenuTrigger_1.useMenuTrigger(props);
19
- return renderMenuTrigger_1.renderMenuTrigger(state);
17
+ const MenuTrigger = props => {
18
+ const state = useMenuTrigger_1.useMenuTrigger_unstable(props);
19
+ return renderMenuTrigger_1.renderMenuTrigger_unstable(state);
20
20
  };
21
21
 
22
22
  exports.MenuTrigger = MenuTrigger;
23
23
  exports.MenuTrigger.displayName = 'MenuTrigger';
24
+ exports.MenuTrigger.isFluentTriggerComponent = true;
24
25
  //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;AAGG;;;AACI,IAAM,WAAW,GAA+B,UAAA,KAAA,EAAK;AAC1D,MAAM,KAAK,GAAG,gBAAA,CAAA,cAAA,CAAe,KAAf,CAAd;AAEA,SAAO,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAAwD,KAAK,IAAG;AACtF,QAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;AAEA,SAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B;AACA,OAAA,CAAA,WAAA,CAAY,wBAAZ,GAAuC,IAAvC","sourceRoot":""}
@@ -5,12 +5,15 @@ export declare type MenuTriggerProps = {
5
5
  */
6
6
  children: (React.ReactElement & {
7
7
  ref?: React.Ref<unknown>;
8
- }) | ((props: MenuTriggerChildProps) => React.ReactNode);
8
+ }) | ((props: MenuTriggerChildProps) => React.ReactElement | null);
9
9
  };
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' | 'aria-expanded' | '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
+ 'aria-expanded': boolean | undefined;
16
+ };
17
+ export declare type MenuTriggerState = {
18
+ children: React.ReactElement | null;
15
19
  };
16
- export declare type MenuTriggerState = MenuTriggerProps;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./MenuTrigger"), exports);
10
10
 
@@ -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;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderMenuTrigger = void 0;
6
+ exports.renderMenuTrigger_unstable = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var menuTriggerContext_1 = /*#__PURE__*/require("../../contexts/menuTriggerContext");
10
+ const menuTriggerContext_1 = /*#__PURE__*/require("../../contexts/menuTriggerContext");
11
11
  /**
12
12
  * Render the final JSX of MenuTrigger
13
13
  *
@@ -15,11 +15,11 @@ var menuTriggerContext_1 = /*#__PURE__*/require("../../contexts/menuTriggerConte
15
15
  */
16
16
 
17
17
 
18
- var renderMenuTrigger = function (state) {
18
+ const renderMenuTrigger_unstable = state => {
19
19
  return React.createElement(menuTriggerContext_1.MenuTriggerContextProvider, {
20
20
  value: true
21
21
  }, state.children);
22
22
  };
23
23
 
24
- exports.renderMenuTrigger = renderMenuTrigger;
24
+ exports.renderMenuTrigger_unstable = renderMenuTrigger_unstable;
25
25
  //# sourceMappingURL=renderMenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;;;AAIG;;;AACI,IAAM,iBAAiB,GAAG,UAAC,KAAD,EAAwB;AACvD,SAAO,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;AAAC,IAAA,KAAK,EAAE;AAAR,GAA3B,EAA0C,KAAK,CAAC,QAAhD,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,SAAO,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;AAAC,IAAA,KAAK,EAAE;AAAR,GAA3B,EAA0C,KAAK,CAAC,QAAhD,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourceRoot":""}
@@ -1,8 +1,8 @@
1
- import type { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';
1
+ import { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';
2
2
  /**
3
3
  * Create the state required to render MenuTrigger.
4
4
  * Clones the only child component and adds necessary event handling behaviours to open a popup menu
5
5
  *
6
6
  * @param props - props from this instance of MenuTrigger
7
7
  */
8
- export declare const useMenuTrigger: (props: MenuTriggerProps) => MenuTriggerState;
8
+ export declare const useMenuTrigger_unstable: (props: MenuTriggerProps) => MenuTriggerState;
@@ -3,11 +3,23 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuTrigger = void 0;
6
+ exports.useMenuTrigger_unstable = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var useTriggerElement_1 = /*#__PURE__*/require("./useTriggerElement");
10
+ const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
11
+
12
+ const useIsSubmenu_1 = /*#__PURE__*/require("../../utils/useIsSubmenu");
13
+
14
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
+
16
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
17
+
18
+ const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
19
+
20
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
21
+
22
+ const react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
11
23
  /**
12
24
  * Create the state required to render MenuTrigger.
13
25
  * Clones the only child component and adds necessary event handling behaviours to open a popup menu
@@ -16,12 +28,167 @@ var useTriggerElement_1 = /*#__PURE__*/require("./useTriggerElement");
16
28
  */
17
29
 
18
30
 
19
- var useMenuTrigger = function (props) {
20
- var state = tslib_1.__assign({}, props); // TODO just move the contents of this hook here
31
+ const useMenuTrigger_unstable = props => {
32
+ var _a, _b, _c, _d, _e, _f;
33
+
34
+ const {
35
+ children
36
+ } = props;
37
+ const triggerRef = menuContext_1.useMenuContext_unstable(context => context.triggerRef);
38
+ const menuPopoverRef = menuContext_1.useMenuContext_unstable(context => context.menuPopoverRef);
39
+ const setOpen = menuContext_1.useMenuContext_unstable(context => context.setOpen);
40
+ const open = menuContext_1.useMenuContext_unstable(context => context.open);
41
+ const triggerId = menuContext_1.useMenuContext_unstable(context => context.triggerId);
42
+ const openOnHover = menuContext_1.useMenuContext_unstable(context => context.openOnHover);
43
+ const openOnContext = menuContext_1.useMenuContext_unstable(context => context.openOnContext);
44
+ const isSubmenu = useIsSubmenu_1.useIsSubmenu();
45
+ const {
46
+ findFirstFocusable
47
+ } = react_tabster_1.useFocusFinders();
48
+ const focusFirst = React.useCallback(() => {
49
+ const firstFocusable = findFirstFocusable(menuPopoverRef.current);
50
+ firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
51
+ }, [findFirstFocusable, menuPopoverRef]);
52
+ const openedWithKeyboardRef = React.useRef(false);
53
+ const hasMouseMoved = React.useRef(false);
54
+ const {
55
+ dir
56
+ } = react_shared_contexts_1.useFluent();
57
+ const OpenArrowKey = dir === 'ltr' ? keyboard_keys_1.ArrowRight : keyboard_keys_1.ArrowLeft;
58
+ const child = React.isValidElement(children) ? react_utilities_1.getTriggerChild(children) : undefined;
59
+
60
+ const onContextMenu = e => {
61
+ if (isTargetDisabled(e)) {
62
+ return;
63
+ }
64
+
65
+ if (openOnContext) {
66
+ e.preventDefault();
67
+ setOpen(e, {
68
+ open: true,
69
+ keyboard: false
70
+ });
71
+ }
72
+ };
73
+
74
+ const onClick = e => {
75
+ if (isTargetDisabled(e)) {
76
+ return;
77
+ }
78
+
79
+ if (!openOnContext) {
80
+ setOpen(e, {
81
+ open: !open,
82
+ keyboard: openedWithKeyboardRef.current
83
+ });
84
+ openedWithKeyboardRef.current = false;
85
+ }
86
+ };
87
+
88
+ const onKeyDown = e => {
89
+ var _a;
90
+
91
+ if (isTargetDisabled(e)) {
92
+ return;
93
+ }
94
+
95
+ if (react_utilities_2.shouldPreventDefaultOnKeyDown(e)) {
96
+ e.preventDefault();
97
+ openedWithKeyboardRef.current = true;
98
+ (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
99
+ }
100
+
101
+ const key = e.key;
21
102
 
103
+ if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === keyboard_keys_1.ArrowDown)) {
104
+ setOpen(e, {
105
+ open: true,
106
+ keyboard: true
107
+ });
108
+ }
22
109
 
23
- return useTriggerElement_1.useTriggerElement(state);
110
+ if (key === keyboard_keys_1.Escape && !isSubmenu) {
111
+ setOpen(e, {
112
+ open: false,
113
+ keyboard: true
114
+ });
115
+ } // if menu is already open, can't rely on effects to focus
116
+
117
+
118
+ if (open && key === OpenArrowKey && isSubmenu) {
119
+ focusFirst();
120
+ }
121
+ };
122
+
123
+ const onMouseEnter = e => {
124
+ if (isTargetDisabled(e)) {
125
+ return;
126
+ }
127
+
128
+ if (openOnHover && hasMouseMoved.current) {
129
+ setOpen(e, {
130
+ open: true,
131
+ keyboard: false
132
+ });
133
+ }
134
+ }; // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
135
+ // First time open the mouse using mousemove and then continue with mouseenter
136
+ // Only use once to determine that the user is using the mouse since it is an expensive event to handle
137
+
138
+
139
+ const onMouseMove = e => {
140
+ if (isTargetDisabled(e)) {
141
+ return;
142
+ }
143
+
144
+ if (openOnHover && !hasMouseMoved.current) {
145
+ setOpen(e, {
146
+ open: true,
147
+ keyboard: false
148
+ });
149
+ hasMouseMoved.current = true;
150
+ }
151
+ };
152
+
153
+ const onMouseLeave = e => {
154
+ if (isTargetDisabled(e)) {
155
+ return;
156
+ }
157
+
158
+ if (openOnHover) {
159
+ setOpen(e, {
160
+ open: false,
161
+ keyboard: false
162
+ });
163
+ }
164
+ };
165
+
166
+ return {
167
+ children: react_utilities_1.applyTriggerPropsToChildren(children, {
168
+ 'aria-haspopup': 'menu',
169
+ 'aria-expanded': !open && !isSubmenu ? undefined : open,
170
+ id: triggerId,
171
+ ...(child === null || child === void 0 ? void 0 : child.props),
172
+ ref: react_utilities_1.useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref),
173
+ onClick: react_utilities_1.useMergedEventCallbacks((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onClick, onClick),
174
+ onMouseEnter: react_utilities_1.useMergedEventCallbacks((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onMouseEnter, onMouseEnter),
175
+ onMouseLeave: react_utilities_1.useMergedEventCallbacks((_c = child === null || child === void 0 ? void 0 : child.props) === null || _c === void 0 ? void 0 : _c.onMouseLeave, onMouseLeave),
176
+ onKeyDown: react_utilities_1.useMergedEventCallbacks((_d = child === null || child === void 0 ? void 0 : child.props) === null || _d === void 0 ? void 0 : _d.onKeyDown, onKeyDown),
177
+ onContextMenu: react_utilities_1.useMergedEventCallbacks((_e = child === null || child === void 0 ? void 0 : child.props) === null || _e === void 0 ? void 0 : _e.onContextMenu, onContextMenu),
178
+ onMouseMove: react_utilities_1.useMergedEventCallbacks((_f = child === null || child === void 0 ? void 0 : child.props) === null || _f === void 0 ? void 0 : _f.onMouseMove, onMouseMove)
179
+ })
180
+ };
24
181
  };
25
182
 
26
- exports.useMenuTrigger = useMenuTrigger;
183
+ exports.useMenuTrigger_unstable = useMenuTrigger_unstable;
184
+
185
+ const isTargetDisabled = e => {
186
+ const isDisabled = el => el.hasAttribute('disabled') || el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true';
187
+
188
+ if (e.target instanceof HTMLElement && isDisabled(e.target)) {
189
+ return true;
190
+ }
191
+
192
+ return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);
193
+ };
27
194
  //# sourceMappingURL=useMenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;;;AAKG;;;AACI,IAAM,cAAc,GAAG,UAAC,KAAD,EAAwB;AACpD,MAAM,KAAK,GAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAX,CADoD,CAGpD;;;AACA,SAAO,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CA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EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,WAAtC,EAAmD,WAAnD;AAXwD,KAA7D;AADL,GAAP;AAeD,CA1HM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB;;AA4Hb,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":""}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./MenuItem/index"), exports);
10
10
 
@@ -13,4 +13,4 @@ export declare type MenuContextValue = MenuListProps & Pick<MenuState, 'openOnHo
13
13
  triggerId: string;
14
14
  };
15
15
  export declare const MenuProvider: React.Provider<MenuContextValue> & React.FC<React.ProviderProps<MenuContextValue>>;
16
- export declare const useMenuContext: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
16
+ export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
@@ -3,19 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuContext = exports.MenuProvider = exports.MenuContext = void 0;
6
+ exports.useMenuContext_unstable = exports.MenuProvider = exports.MenuContext = void 0;
7
7
 
8
- var react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
9
 
10
10
  exports.MenuContext = /*#__PURE__*/react_context_selector_1.createContext({
11
11
  open: false,
12
- setOpen: function () {
13
- return false;
14
- },
12
+ setOpen: () => false,
15
13
  checkedValues: {},
16
- onCheckedValueChange: function () {
17
- return null;
18
- },
14
+ onCheckedValueChange: () => null,
19
15
  defaultCheckedValues: {},
20
16
  isSubmenu: false,
21
17
  triggerRef: {
@@ -32,9 +28,7 @@ exports.MenuContext = /*#__PURE__*/react_context_selector_1.createContext({
32
28
  });
33
29
  exports.MenuProvider = exports.MenuContext.Provider;
34
30
 
35
- var useMenuContext = function (selector) {
36
- return react_context_selector_1.useContextSelector(exports.MenuContext, selector);
37
- };
31
+ const useMenuContext_unstable = selector => react_context_selector_1.useContextSelector(exports.MenuContext, selector);
38
32
 
39
- exports.useMenuContext = useMenuContext;
33
+ exports.useMenuContext_unstable = useMenuContext_unstable;
40
34
  //# sourceMappingURL=menuContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuContext.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,WAAA,gBAAyC,wBAAA,CAAA,aAAA,CAAgC;AACpF,EAAA,IAAI,EAAE,KAD8E;AAEpF,EAAA,OAAO,EAAE,YAAA;AAAM,WAAA,KAAA;AAAK,GAFgE;AAGpF,EAAA,aAAa,EAAE,EAHqE;AAIpF,EAAA,oBAAoB,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAJoD;AAKpF,EAAA,oBAAoB,EAAE,EAL8D;AAMpF,EAAA,SAAS,EAAE,KANyE;A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CA,OAAA,CAAA,YAAA,GAAe,OAAA,CAAA,WAAA,CAAY,QAA3B;;AAEN,MAAM,uBAAuB,GAAO,QAAJ,IACrC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,WAAnB,EAAgC,QAAhC,CADK;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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,18 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuGroupContext = exports.MenuGroupContextProvider = void 0;
6
+ exports.useMenuGroupContext_unstable = exports.MenuGroupContextProvider = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var MenuGroupContext = /*#__PURE__*/React.createContext({
10
+ const MenuGroupContext = /*#__PURE__*/React.createContext({
11
11
  headerId: ''
12
12
  });
13
13
  exports.MenuGroupContextProvider = MenuGroupContext.Provider;
14
14
 
15
- var useMenuGroupContext = function () {
16
- return React.useContext(MenuGroupContext);
17
- };
15
+ const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext);
18
16
 
19
- exports.useMenuGroupContext = useMenuGroupContext;
17
+ exports.useMenuGroupContext_unstable = useMenuGroupContext_unstable;
20
18
  //# sourceMappingURL=menuGroupContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,IAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,IAAM,mBAAmB,GAAG,YAAA;AAAM,SAAA,KAAK,CAAC,UAAN,CAAA,gBAAA,CAAA;AAAkC,CAApE;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourceRoot":""}
1
+ {"version":3,"sources":["../../src/contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,MAAM,4BAA4B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAA3C;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourceRoot":""}