@fluentui/react-menu 0.0.0-nightlyfc5cfdc52420220215.1 → 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (411) hide show
  1. package/CHANGELOG.json +816 -22
  2. package/CHANGELOG.md +345 -139
  3. package/dist/{react-menu.d.ts → index.d.ts} +138 -121
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/Menu.js.map +1 -1
  6. package/lib/MenuDivider.js.map +1 -1
  7. package/lib/MenuGroup.js.map +1 -1
  8. package/lib/MenuGroupHeader.js.map +1 -1
  9. package/lib/MenuItem.js.map +1 -1
  10. package/lib/MenuItemCheckbox.js.map +1 -1
  11. package/lib/MenuItemRadio.js.map +1 -1
  12. package/lib/MenuList.js.map +1 -1
  13. package/lib/MenuPopover.js.map +1 -1
  14. package/lib/MenuSplitGroup.js.map +1 -1
  15. package/lib/MenuTrigger.js.map +1 -1
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js.map +1 -1
  18. package/lib/components/Menu/index.js.map +1 -1
  19. package/lib/components/Menu/renderMenu.js.map +1 -1
  20. package/lib/components/Menu/useMenu.js +21 -7
  21. package/lib/components/Menu/useMenu.js.map +1 -1
  22. package/lib/components/Menu/useMenuContextValues.js +20 -20
  23. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  24. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  25. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  26. package/lib/components/MenuDivider/index.js.map +1 -1
  27. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  28. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDividerStyles.js +8 -5
  30. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  31. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  33. package/lib/components/MenuGroup/index.js.map +1 -1
  34. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  35. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  36. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  37. package/lib/components/MenuGroup/useMenuGroupStyles.js +4 -2
  38. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  39. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  40. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  41. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  43. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  44. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +4 -2
  45. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  46. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  47. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  48. package/lib/components/MenuItem/index.js.map +1 -1
  49. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  50. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  51. package/lib/components/MenuItem/useMenuItem.js +8 -3
  52. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  53. package/lib/components/MenuItem/useMenuItemStyles.js +62 -28
  54. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  55. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  56. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  57. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  58. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  59. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  60. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +25 -2
  61. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  62. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  63. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  64. package/lib/components/MenuItemRadio/index.js.map +1 -1
  65. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  66. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  67. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +25 -2
  68. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  69. package/lib/components/MenuList/MenuList.js.map +1 -1
  70. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  71. package/lib/components/MenuList/index.js +1 -0
  72. package/lib/components/MenuList/index.js.map +1 -1
  73. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  74. package/lib/components/MenuList/useMenuList.js +2 -2
  75. package/lib/components/MenuList/useMenuList.js.map +1 -1
  76. package/lib/components/MenuList/useMenuListContextValues.js +8 -8
  77. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  78. package/lib/components/MenuList/useMenuListStyles.js +4 -2
  79. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  80. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  81. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  82. package/lib/components/MenuPopover/index.js.map +1 -1
  83. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  84. package/lib/components/MenuPopover/useMenuPopover.js +1 -1
  85. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  86. package/lib/components/MenuPopover/useMenuPopoverStyles.js +4 -2
  87. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  88. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  89. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  90. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  91. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  92. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
  93. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  94. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +10 -8
  95. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  96. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  97. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  98. package/lib/components/MenuTrigger/index.js.map +1 -1
  99. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  100. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  101. package/lib/components/MenuTrigger/useMenuTrigger.js +2 -1
  102. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  103. package/lib/components/index.js.map +1 -1
  104. package/lib/contexts/menuContext.js.map +1 -1
  105. package/lib/contexts/menuGroupContext.js.map +1 -1
  106. package/lib/contexts/menuListContext.js.map +1 -1
  107. package/lib/contexts/menuTriggerContext.js +1 -1
  108. package/lib/contexts/menuTriggerContext.js.map +1 -1
  109. package/lib/index.js +16 -16
  110. package/lib/index.js.map +1 -1
  111. package/lib/selectable/index.js.map +1 -1
  112. package/lib/selectable/types.js.map +1 -1
  113. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  114. package/lib/utils/index.js.map +1 -1
  115. package/lib/utils/useIsSubmenu.js.map +1 -1
  116. package/lib/utils/useOnMenuEnter.js.map +1 -1
  117. package/lib-commonjs/Menu.js.map +1 -1
  118. package/lib-commonjs/MenuDivider.js.map +1 -1
  119. package/lib-commonjs/MenuGroup.js.map +1 -1
  120. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  121. package/lib-commonjs/MenuItem.js.map +1 -1
  122. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  123. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  124. package/lib-commonjs/MenuList.js.map +1 -1
  125. package/lib-commonjs/MenuPopover.js.map +1 -1
  126. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  127. package/lib-commonjs/MenuTrigger.js.map +1 -1
  128. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  129. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  130. package/lib-commonjs/components/Menu/index.js.map +1 -1
  131. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  132. package/lib-commonjs/components/Menu/useMenu.js +19 -5
  133. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  134. package/lib-commonjs/components/Menu/useMenuContextValues.js +20 -20
  135. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  136. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  137. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  138. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  139. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  140. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  141. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +9 -6
  142. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  143. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  144. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  145. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  146. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  147. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  148. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  149. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -3
  150. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  151. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  152. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  153. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  154. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  155. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  156. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +5 -3
  157. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  158. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  159. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  160. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  161. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  162. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  163. package/lib-commonjs/components/MenuItem/useMenuItem.js +9 -4
  164. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  165. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +64 -29
  166. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  167. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  168. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  169. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  170. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  171. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  172. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +26 -3
  173. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  174. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  175. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  176. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  177. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  178. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  179. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +26 -3
  180. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  181. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  182. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  183. package/lib-commonjs/components/MenuList/index.js +2 -0
  184. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  185. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  186. package/lib-commonjs/components/MenuList/useMenuList.js +2 -2
  187. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  188. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +8 -8
  189. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  190. package/lib-commonjs/components/MenuList/useMenuListStyles.js +5 -3
  191. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  192. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  193. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  194. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  195. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  196. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +1 -1
  197. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  198. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +5 -3
  199. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  200. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  201. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  202. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  203. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  204. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
  205. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  206. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +10 -8
  207. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  208. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  209. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  210. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  211. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +1 -1
  212. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  213. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +2 -1
  214. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  215. package/lib-commonjs/components/index.js.map +1 -1
  216. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  217. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  218. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  219. package/lib-commonjs/contexts/menuTriggerContext.js +1 -1
  220. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  221. package/lib-commonjs/index.js +411 -17
  222. package/lib-commonjs/index.js.map +1 -1
  223. package/lib-commonjs/selectable/index.js.map +1 -1
  224. package/lib-commonjs/selectable/types.js.map +1 -1
  225. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  226. package/lib-commonjs/utils/index.js.map +1 -1
  227. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  228. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  229. package/package.json +28 -30
  230. package/lib/Menu.d.ts +0 -1
  231. package/lib/MenuDivider.d.ts +0 -1
  232. package/lib/MenuGroup.d.ts +0 -1
  233. package/lib/MenuGroupHeader.d.ts +0 -1
  234. package/lib/MenuItem.d.ts +0 -1
  235. package/lib/MenuItemCheckbox.d.ts +0 -1
  236. package/lib/MenuItemRadio.d.ts +0 -1
  237. package/lib/MenuList.d.ts +0 -1
  238. package/lib/MenuPopover.d.ts +0 -1
  239. package/lib/MenuSplitGroup.d.ts +0 -1
  240. package/lib/MenuTrigger.d.ts +0 -1
  241. package/lib/components/Menu/Menu.d.ts +0 -6
  242. package/lib/components/Menu/Menu.types.d.ts +0 -113
  243. package/lib/components/Menu/index.d.ts +0 -5
  244. package/lib/components/Menu/renderMenu.d.ts +0 -5
  245. package/lib/components/Menu/useMenu.d.ts +0 -10
  246. package/lib/components/Menu/useMenuContextValues.d.ts +0 -2
  247. package/lib/components/MenuDivider/MenuDivider.d.ts +0 -6
  248. package/lib/components/MenuDivider/MenuDivider.types.d.ts +0 -6
  249. package/lib/components/MenuDivider/index.d.ts +0 -5
  250. package/lib/components/MenuDivider/renderMenuDivider.d.ts +0 -6
  251. package/lib/components/MenuDivider/useMenuDivider.d.ts +0 -6
  252. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +0 -3
  253. package/lib/components/MenuGroup/MenuGroup.d.ts +0 -6
  254. package/lib/components/MenuGroup/MenuGroup.types.d.ts +0 -15
  255. package/lib/components/MenuGroup/index.d.ts +0 -6
  256. package/lib/components/MenuGroup/renderMenuGroup.d.ts +0 -6
  257. package/lib/components/MenuGroup/useMenuGroup.d.ts +0 -6
  258. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
  259. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +0 -3
  260. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
  261. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
  262. package/lib/components/MenuGroupHeader/index.d.ts +0 -5
  263. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
  264. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
  265. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -3
  266. package/lib/components/MenuItem/MenuItem.d.ts +0 -6
  267. package/lib/components/MenuItem/MenuItem.types.d.ts +0 -43
  268. package/lib/components/MenuItem/index.d.ts +0 -5
  269. package/lib/components/MenuItem/renderMenuItem.d.ts +0 -5
  270. package/lib/components/MenuItem/useCharacterSearch.d.ts +0 -3
  271. package/lib/components/MenuItem/useMenuItem.d.ts +0 -6
  272. package/lib/components/MenuItem/useMenuItemStyles.d.ts +0 -4
  273. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
  274. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
  275. package/lib/components/MenuItemCheckbox/index.d.ts +0 -5
  276. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
  277. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
  278. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -3
  279. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
  280. package/lib/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
  281. package/lib/components/MenuItemRadio/index.d.ts +0 -5
  282. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
  283. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
  284. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -3
  285. package/lib/components/MenuList/MenuList.d.ts +0 -6
  286. package/lib/components/MenuList/MenuList.types.d.ts +0 -55
  287. package/lib/components/MenuList/index.d.ts +0 -6
  288. package/lib/components/MenuList/renderMenuList.d.ts +0 -5
  289. package/lib/components/MenuList/useMenuList.d.ts +0 -6
  290. package/lib/components/MenuList/useMenuListContextValues.d.ts +0 -2
  291. package/lib/components/MenuList/useMenuListStyles.d.ts +0 -6
  292. package/lib/components/MenuPopover/MenuPopover.d.ts +0 -6
  293. package/lib/components/MenuPopover/MenuPopover.types.d.ts +0 -18
  294. package/lib/components/MenuPopover/index.d.ts +0 -5
  295. package/lib/components/MenuPopover/renderMenuPopover.d.ts +0 -5
  296. package/lib/components/MenuPopover/useMenuPopover.d.ts +0 -12
  297. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -6
  298. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
  299. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
  300. package/lib/components/MenuSplitGroup/index.d.ts +0 -5
  301. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
  302. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
  303. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -6
  304. package/lib/components/MenuTrigger/MenuTrigger.d.ts +0 -8
  305. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +0 -19
  306. package/lib/components/MenuTrigger/index.d.ts +0 -4
  307. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
  308. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
  309. package/lib/components/index.d.ts +0 -2
  310. package/lib/contexts/menuContext.d.ts +0 -16
  311. package/lib/contexts/menuGroupContext.d.ts +0 -13
  312. package/lib/contexts/menuListContext.d.ts +0 -15
  313. package/lib/contexts/menuTriggerContext.d.ts +0 -3
  314. package/lib/index.d.ts +0 -16
  315. package/lib/selectable/index.d.ts +0 -2
  316. package/lib/selectable/types.d.ts +0 -34
  317. package/lib/selectable/useCheckmarkStyles.d.ts +0 -8
  318. package/lib/utils/index.d.ts +0 -1
  319. package/lib/utils/useIsSubmenu.d.ts +0 -9
  320. package/lib/utils/useOnMenuEnter.d.ts +0 -23
  321. package/lib-commonjs/Menu.d.ts +0 -1
  322. package/lib-commonjs/MenuDivider.d.ts +0 -1
  323. package/lib-commonjs/MenuGroup.d.ts +0 -1
  324. package/lib-commonjs/MenuGroupHeader.d.ts +0 -1
  325. package/lib-commonjs/MenuItem.d.ts +0 -1
  326. package/lib-commonjs/MenuItemCheckbox.d.ts +0 -1
  327. package/lib-commonjs/MenuItemRadio.d.ts +0 -1
  328. package/lib-commonjs/MenuList.d.ts +0 -1
  329. package/lib-commonjs/MenuPopover.d.ts +0 -1
  330. package/lib-commonjs/MenuSplitGroup.d.ts +0 -1
  331. package/lib-commonjs/MenuTrigger.d.ts +0 -1
  332. package/lib-commonjs/components/Menu/Menu.d.ts +0 -6
  333. package/lib-commonjs/components/Menu/Menu.types.d.ts +0 -113
  334. package/lib-commonjs/components/Menu/index.d.ts +0 -5
  335. package/lib-commonjs/components/Menu/renderMenu.d.ts +0 -5
  336. package/lib-commonjs/components/Menu/useMenu.d.ts +0 -10
  337. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +0 -2
  338. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +0 -6
  339. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +0 -6
  340. package/lib-commonjs/components/MenuDivider/index.d.ts +0 -5
  341. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +0 -6
  342. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +0 -6
  343. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +0 -3
  344. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +0 -6
  345. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +0 -15
  346. package/lib-commonjs/components/MenuGroup/index.d.ts +0 -6
  347. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +0 -6
  348. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +0 -6
  349. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
  350. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +0 -3
  351. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
  352. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
  353. package/lib-commonjs/components/MenuGroupHeader/index.d.ts +0 -5
  354. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
  355. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
  356. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -3
  357. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +0 -6
  358. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +0 -43
  359. package/lib-commonjs/components/MenuItem/index.d.ts +0 -5
  360. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +0 -5
  361. package/lib-commonjs/components/MenuItem/useCharacterSearch.d.ts +0 -3
  362. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +0 -6
  363. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +0 -4
  364. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
  365. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
  366. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +0 -5
  367. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
  368. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
  369. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -3
  370. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
  371. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
  372. package/lib-commonjs/components/MenuItemRadio/index.d.ts +0 -5
  373. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
  374. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
  375. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -3
  376. package/lib-commonjs/components/MenuList/MenuList.d.ts +0 -6
  377. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +0 -55
  378. package/lib-commonjs/components/MenuList/index.d.ts +0 -6
  379. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +0 -5
  380. package/lib-commonjs/components/MenuList/useMenuList.d.ts +0 -6
  381. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +0 -2
  382. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +0 -6
  383. package/lib-commonjs/components/MenuPopover/MenuPopover.d.ts +0 -6
  384. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +0 -18
  385. package/lib-commonjs/components/MenuPopover/index.d.ts +0 -5
  386. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +0 -5
  387. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +0 -12
  388. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -6
  389. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
  390. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
  391. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +0 -5
  392. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
  393. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
  394. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -6
  395. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +0 -8
  396. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +0 -19
  397. package/lib-commonjs/components/MenuTrigger/index.d.ts +0 -4
  398. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
  399. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
  400. package/lib-commonjs/components/index.d.ts +0 -2
  401. package/lib-commonjs/contexts/menuContext.d.ts +0 -16
  402. package/lib-commonjs/contexts/menuGroupContext.d.ts +0 -13
  403. package/lib-commonjs/contexts/menuListContext.d.ts +0 -15
  404. package/lib-commonjs/contexts/menuTriggerContext.d.ts +0 -3
  405. package/lib-commonjs/index.d.ts +0 -16
  406. package/lib-commonjs/selectable/index.d.ts +0 -2
  407. package/lib-commonjs/selectable/types.d.ts +0 -34
  408. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +0 -8
  409. package/lib-commonjs/utils/index.d.ts +0 -1
  410. package/lib-commonjs/utils/useIsSubmenu.d.ts +0 -9
  411. package/lib-commonjs/utils/useOnMenuEnter.d.ts +0 -23
@@ -33,10 +33,12 @@ const useIsSubmenu_1 = /*#__PURE__*/require("../../utils/useIsSubmenu");
33
33
 
34
34
 
35
35
  const useMenu_unstable = props => {
36
+ var _a;
37
+
36
38
  const triggerId = react_utilities_1.useId('menu');
37
39
  const isSubmenu = useIsSubmenu_1.useIsSubmenu();
38
- const [contextTarget, setContextTarget] = react_positioning_1.usePopperMouseTarget();
39
- const popperState = {
40
+ const [contextTarget, setContextTarget] = react_positioning_1.usePositioningMouseTarget();
41
+ const positioningState = {
40
42
  position: isSubmenu ? 'after' : 'below',
41
43
  align: isSubmenu ? 'top' : 'start',
42
44
  target: props.openOnContext ? contextTarget : undefined,
@@ -69,7 +71,7 @@ const useMenu_unstable = props => {
69
71
  const {
70
72
  targetRef: triggerRef,
71
73
  containerRef: menuPopoverRef
72
- } = react_positioning_1.usePopper(popperState);
74
+ } = react_positioning_1.usePositioning(positioningState);
73
75
  const initialState = {
74
76
  hoverDelay: 500,
75
77
  triggerId,
@@ -78,6 +80,7 @@ const useMenu_unstable = props => {
78
80
  contextTarget,
79
81
  setContextTarget,
80
82
  ...props,
83
+ closeOnScroll: (_a = props.closeOnScroll) !== null && _a !== void 0 ? _a : false,
81
84
  menuTrigger,
82
85
  menuPopover,
83
86
  triggerRef,
@@ -135,7 +138,7 @@ const useMenuSelectableState = state => {
135
138
  const useMenuOpenState = state => {
136
139
  const {
137
140
  targetDocument
138
- } = react_shared_contexts_1.useFluent();
141
+ } = react_shared_contexts_1.useFluent_unstable();
139
142
  const parentSetOpen = menuContext_1.useMenuContext_unstable(context => context.setOpen);
140
143
  const onOpenChange = react_utilities_1.useEventCallback((e, data) => {
141
144
  var _a;
@@ -205,10 +208,21 @@ const useMenuOpenState = state => {
205
208
  contains: react_portal_1.elementContains,
206
209
  disabled: !open,
207
210
  element: targetDocument,
208
- refs: [state.menuPopoverRef, state.triggerRef],
211
+ refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),
209
212
  callback: e => setOpen(e, {
210
213
  open: false
211
214
  })
215
+ }); // only close on scroll for context, or when closeOnScroll is specified
216
+
217
+ const closeOnScroll = state.openOnContext || state.closeOnScroll;
218
+ react_utilities_1.useOnScrollOutside({
219
+ contains: react_portal_1.elementContains,
220
+ element: targetDocument,
221
+ callback: ev => setOpen(ev, {
222
+ open: false
223
+ }),
224
+ refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),
225
+ disabled: !open || !closeOnScroll
212
226
  });
213
227
  index_1.useOnMenuMouseEnter({
214
228
  element: targetDocument,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Menu/useMenu.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAGA;;;;;;;AAOG;;;AACI,MAAM,gBAAgB,GAAI,KAAD,IAAgC;AAC9D,QAAM,SAA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ACnB,IAAI,IAAJ,EAAU;MACR,UAAU;IACX;EACF,CAJD,EAIG,CAAC,IAAD,EAAO,UAAP,CAJH;EAMA,KAAK,CAAC,SAAN,CAAgB,MAAK;;;IACnB,IAAI,IAAJ,EAAU;MACR,UAAU;IACX;;IAED,IAAI,uBAAuB,CAAC,OAAxB,IAAmC,CAAC,IAAxC,EAA8C;MAC5C,IAAI,kBAAkB,CAAC,OAAnB,IAA8B,CAAC,KAAK,CAAC,SAAzC,EAAoD;QAClD,eAAe,CAAC,OAAhB,GAA0B,sBAAsB,EAAhD,GAAqD,qBAAqB,EAA1E;MACD,CAFD,MAEO;QACL,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,OAAjB,MAAwB,IAAxB,IAAwB,EAAA,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAwB,EAAA,CAAE,KAAF,EAAxB;MACD;IACF;;IAED,uBAAuB,CAAC,OAAxB,GAAkC,KAAlC;IACA,kBAAkB,CAAC,OAAnB,GAA6B,KAA7B;IACA,eAAe,CAAC,OAAhB,GAA0B,KAA1B;EACD,CAhBD,EAgBG,CAAC,KAAK,CAAC,UAAP,EAAmB,KAAK,CAAC,SAAzB,EAAoC,IAApC,EAA0C,UAA1C,EAAsD,qBAAtD,EAA6E,sBAA7E,CAhBH;EAkBA,OAAO,CAAC,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,KAAT,EAAgB,OAAhB,CAAP;AACD,CA/JD","sourcesContent":["import * as React from 'react';\nimport { usePositioningMouseTarget, usePositioning, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport {\n useControllableState,\n useId,\n useOnClickOutside,\n useEventCallback,\n useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuState } from './Menu.types';\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = (props: MenuProps): MenuState => {\n const triggerId = useId('menu');\n const isSubmenu = useIsSubmenu();\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n\n const positioningState = {\n position: isSubmenu ? ('after' as const) : ('below' as const),\n align: isSubmenu ? ('top' as const) : ('start' as const),\n target: props.openOnContext ? contextTarget : undefined,\n ...resolvePositioningShorthand(props.positioning),\n };\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at least one child');\n }\n\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n\n let menuTrigger: React.ReactElement | undefined = undefined;\n let menuPopover: React.ReactElement | undefined = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePositioning(positioningState);\n\n const initialState = {\n hoverDelay: 500,\n triggerId,\n isSubmenu: !!isSubmenu,\n openOnHover: !!isSubmenu,\n contextTarget,\n setContextTarget,\n ...props,\n closeOnScroll: props.closeOnScroll ?? false,\n menuTrigger,\n menuPopover,\n triggerRef,\n menuPopoverRef,\n components: {},\n } as const;\n\n // TODO Better way to narrow types ?\n\n const [open, setOpen] = useMenuOpenState(initialState);\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState(initialState);\n\n return {\n ...initialState,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n state: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: state.checkedValues,\n defaultState: state.defaultCheckedValues,\n initialState: {},\n });\n const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n if (onCheckedValueChangeOriginal) {\n onCheckedValueChangeOriginal(e, { name, checkedItems });\n }\n\n setCheckedValues(s => {\n return s ? { ...s, [name]: checkedItems } : { [name]: checkedItems };\n });\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<\n MenuState,\n | 'isSubmenu'\n | 'menuPopoverRef'\n | 'onOpenChange'\n | 'setContextTarget'\n | 'triggerRef'\n | 'openOnContext'\n | 'closeOnScroll'\n > &\n Pick<MenuProps, 'open' | 'defaultOpen'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\n const onOpenChange: MenuState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const shouldHandleKeyboardRef = React.useRef(false);\n const shouldHandleTabRef = React.useRef(false);\n const pressedShiftRef = React.useRef(false);\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.keyboard) {\n shouldHandleKeyboardRef.current = true;\n shouldHandleTabRef.current = (e as React.KeyboardEvent).key === 'Tab';\n pressedShiftRef.current = (e as React.KeyboardEvent).shiftKey;\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n callback: e => setOpen(e, { open: false }),\n });\n\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = state.openOnContext || state.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: ev => setOpen(ev, { open: false }),\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n disabled: !open || !closeOnScroll,\n });\n\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: e => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(e, { open: false });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable, findNextFocusable, findPrevFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n const focusAfterMenuTrigger = React.useCallback(() => {\n const nextFocusable = findNextFocusable(state.triggerRef.current);\n nextFocusable?.focus();\n }, [findNextFocusable, state.triggerRef]);\n\n const focusBeforeMenuTrigger = React.useCallback(() => {\n const prevFocusable = findPrevFocusable(state.triggerRef.current);\n prevFocusable?.focus();\n }, [findPrevFocusable, state.triggerRef]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n }, [open, focusFirst]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n\n if (shouldHandleKeyboardRef.current && !open) {\n if (shouldHandleTabRef.current && !state.isSubmenu) {\n pressedShiftRef.current ? focusBeforeMenuTrigger() : focusAfterMenuTrigger();\n } else {\n state.triggerRef.current?.focus();\n }\n }\n\n shouldHandleKeyboardRef.current = false;\n shouldHandleTabRef.current = false;\n pressedShiftRef.current = false;\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, focusAfterMenuTrigger, focusBeforeMenuTrigger]);\n\n return [open ?? false, setOpen] as const;\n};\n"],"sourceRoot":"../src/"}
@@ -7,39 +7,39 @@ exports.useMenuContextValues_unstable = void 0;
7
7
 
8
8
  function useMenuContextValues_unstable(state) {
9
9
  const {
10
- open,
11
- setOpen,
12
- onCheckedValueChange,
13
10
  checkedValues,
14
11
  defaultCheckedValues,
15
- openOnHover,
16
- openOnContext,
17
- triggerRef,
18
- triggerId,
19
- menuPopoverRef,
20
- isSubmenu,
21
12
  hasCheckmarks,
22
13
  hasIcons,
14
+ inline,
15
+ isSubmenu,
16
+ menuPopoverRef,
17
+ onCheckedValueChange,
18
+ open,
19
+ openOnContext,
20
+ openOnHover,
23
21
  persistOnItemClick,
24
- inline
22
+ setOpen,
23
+ triggerId,
24
+ triggerRef
25
25
  } = state; // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
26
26
 
27
27
  const menu = {
28
- open,
29
- setOpen,
30
- onCheckedValueChange,
31
28
  checkedValues,
32
29
  defaultCheckedValues,
33
- triggerRef,
34
- openOnHover,
35
- openOnContext,
36
- triggerId,
37
- menuPopoverRef,
38
- isSubmenu,
39
30
  hasCheckmarks,
40
31
  hasIcons,
32
+ inline,
33
+ isSubmenu,
34
+ menuPopoverRef,
35
+ onCheckedValueChange,
36
+ open,
37
+ openOnContext,
38
+ openOnHover,
41
39
  persistOnItemClick,
42
- inline
40
+ setOpen,
41
+ triggerId,
42
+ triggerRef
43
43
  };
44
44
  return {
45
45
  menu
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Menu/useMenuContextValues.ts"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,6BAAhB,CAA8C,KAA9C,EAA8D;AAC5D,QAAM;AACJ,IAAA,IADI;AAEJ,IAAA,OAFI;AAGJ,IAAA,oBAHI;AAIJ,IAAA,aAJI;AAKJ,IAAA,oBALI;AAMJ,IAAA,WANI;AAOJ,IAAA,aAPI;AAQJ,IAAA,UARI;AASJ,IAAA,SATI;AAUJ,IAAA,cAVI;AAWJ,IAAA,SAXI;AAYJ,IAAA,aAZI;AAaJ,IAAA,QAbI;AAcJ,IAAA,kBAdI;AAeJ,IAAA;AAfI,MAgBF,KAhBJ,CAD4D,CAmB5D;;AACA,QAAM,IAAI,GAAG;AACX,IAAA,IADW;AAEX,IAAA,OAFW;AAGX,IAAA,oBAHW;AAIX,IAAA,aAJW;AAKX,IAAA,oBALW;AAMX,IAAA,UANW;AAOX,IAAA,WAPW;AAQX,IAAA,aARW;AASX,IAAA,SATW;AAUX,IAAA,cAVW;AAWX,IAAA,SAXW;AAYX,IAAA,aAZW;AAaX,IAAA,QAbW;AAcX,IAAA,kBAdW;AAeX,IAAA;AAfW,GAAb;AAkBA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD;;AAvCD,OAAA,CAAA,6BAAA,GAAA,6BAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/Menu/useMenuContextValues.ts"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,6BAAhB,CAA8C,KAA9C,EAA8D;EAC5D,MAAM;IACJ,aADI;IAEJ,oBAFI;IAGJ,aAHI;IAIJ,QAJI;IAKJ,MALI;IAMJ,SANI;IAOJ,cAPI;IAQJ,oBARI;IASJ,IATI;IAUJ,aAVI;IAWJ,WAXI;IAYJ,kBAZI;IAaJ,OAbI;IAcJ,SAdI;IAeJ;EAfI,IAgBF,KAhBJ,CAD4D,CAmB5D;;EACA,MAAM,IAAI,GAAG;IACX,aADW;IAEX,oBAFW;IAGX,aAHW;IAIX,QAJW;IAKX,MALW;IAMX,SANW;IAOX,cAPW;IAQX,oBARW;IASX,IATW;IAUX,aAVW;IAWX,WAXW;IAYX,kBAZW;IAaX,OAbW;IAcX,SAdW;IAeX;EAfW,CAAb;EAkBA,OAAO;IAAE;EAAF,CAAP;AACD;;AAvCD,OAAA,CAAA,6BAAA,GAAA,6BAAA","sourcesContent":["import type { MenuContextValues, MenuState } from './Menu.types';\n\nexport function useMenuContextValues_unstable(state: MenuState): MenuContextValues {\n const {\n checkedValues,\n defaultCheckedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menu = {\n checkedValues,\n defaultCheckedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n };\n\n return { menu };\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,WAAA,gBAAqD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,EAA+B,GAA/B,CAAd;AACA,EAAA,sBAAA,CAAA,6BAAA,CAA8B,KAA9B;AAEA,SAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CALiE,CAArD;AAOb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,WAAA,gBAAqD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,EAA+B,GAA/B,CAAd;EACA,sBAAA,CAAA,6BAAA,CAA8B,KAA9B;EAEA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CALiE,CAArD;AAOb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.\n */\nexport const MenuDivider: ForwardRefComponent<MenuDividerProps> = React.forwardRef((props, ref) => {\n const state = useMenuDivider_unstable(props, ref);\n useMenuDividerStyles_unstable(state);\n\n return renderMenuDivider_unstable(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuDivider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuDivider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuDivider.types';\nexport * from './MenuDivider';\nexport * from './renderMenuDivider';\nexport * from './useMenuDivider';\nexport * from './useMenuDividerStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuDivider/renderMenuDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA2B,KAA3B,CAA7B;AAEA,SAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuDivider/renderMenuDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA2B,KAA3B,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menudivider structure but add\n * slots to children.\n */\nexport const renderMenuDivider_unstable = (state: MenuDividerState) => {\n const { slots, slotProps } = getSlots<MenuDividerSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuDivider/useMenuDivider.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;AAChH,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,cAD2B;AAEjC,qBAAe,IAFkB;AAGjC,SAAG,KAH8B;AAIjC,MAAA;AAJiC,KAA7B;AAJD,GAAP;AAWD,CAZM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuDivider/useMenuDivider.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;EAChH,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,IAAI,EAAE,cAD2B;MAEjC,eAAe,IAFkB;MAGjC,GAAG,KAH8B;MAIjC;IAJiC,CAA7B;EAJD,CAAP;AAWD,CAZM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { getNativeElementProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Given user props, returns state and render function for a MenuDivider.\n */\nexport const useMenuDivider_unstable = (props: MenuDividerProps, ref: React.Ref<HTMLElement>): MenuDividerState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n role: 'presentation',\n 'aria-hidden': true,\n ...props,\n ref,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -3,31 +3,34 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuDividerStyles_unstable = exports.menuDividerClassName = void 0;
6
+ exports.useMenuDividerStyles_unstable = exports.menuDividerClassNames = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
11
 
12
- exports.menuDividerClassName = 'fui-MenuDivider';
12
+ exports.menuDividerClassNames = {
13
+ root: 'fui-MenuDivider'
14
+ };
13
15
 
14
16
  const useStyles = /*#__PURE__*/react_1.__styles({
15
17
  "root": {
16
- "Bqenvij": "f1mpe4l3",
17
18
  "B6of3ja": "fvjh0tl",
18
19
  "t21cq0": ["f1rnx978", "f1q7jvqi"],
19
20
  "jrapky": "fd1gkq",
20
21
  "Frg6f3": ["f1q7jvqi", "f1rnx978"],
21
22
  "a9b677": "f14z66ap",
22
- "De3pzq": "fn4h89p"
23
+ "Bn0qgzm": "f1f09k3d",
24
+ "oivjwe": "fg706s2",
25
+ "B9xav0g": "frpde29"
23
26
  }
24
27
  }, {
25
- "d": [".f1mpe4l3{height:1px;}", ".fvjh0tl{margin-top:4px;}", ".f1rnx978{margin-right:-5px;}", ".f1q7jvqi{margin-left:-5px;}", ".fd1gkq{margin-bottom:4px;}", ".f14z66ap{width:auto;}", ".fn4h89p{background-color:var(--colorNeutralStroke2);}"]
28
+ "d": [".fvjh0tl{margin-top:4px;}", ".f1rnx978{margin-right:-5px;}", ".f1q7jvqi{margin-left:-5px;}", ".fd1gkq{margin-bottom:4px;}", ".f14z66ap{width:auto;}", ".f1f09k3d{border-bottom-width:1px;}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}"]
26
29
  });
27
30
 
28
31
  const useMenuDividerStyles_unstable = state => {
29
32
  const styles = useStyles();
30
- state.root.className = react_1.mergeClasses(exports.menuDividerClassName, styles.root, state.root.className);
33
+ state.root.className = react_1.mergeClasses(exports.menuDividerClassNames.root, styles.root, state.root.className);
31
34
  return state;
32
35
  };
33
36
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;;AAEb,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AASO,MAAM,6BAA6B,GAAI,KAAD,IAA4B;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;AAEA,SAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAQO,MAAM,6BAA6B,GAAI,KAAD,IAA4B;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,qBAAA,CAAsB,IAAnC,EAAyC,MAAM,CAAC,IAAhD,EAAsD,KAAK,CAAC,IAAN,CAAW,SAAjE,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuDividerClassNames: SlotClassNames<MenuDividerSlots> = {\n root: 'fui-MenuDivider',\n};\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.margin('4px', '-5px', '4px', '-5px'),\n width: 'auto',\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStroke2),\n },\n});\n\nexport const useMenuDividerStyles_unstable = (state: MenuDividerState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuDividerClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gB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,EAAgC,aAAhC,CAAP;AACD,CAP6D,CAAjD;AASb,OAAA,CAAA,SAAA,CAAU,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.\n */\nexport const MenuGroup: ForwardRefComponent<MenuGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroup_unstable(props, ref);\n const contextValues = useMenuGroupContextValues_unstable(state);\n\n useMenuGroupStyles_unstable(state);\n\n return renderMenuGroup_unstable(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroup/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuGroup.types';\nexport * from './MenuGroup';\nexport * from './renderMenuGroup';\nexport * from './useMenuGroup';\nexport * from './useMenuGroupContextValues';\nexport * from './useMenuGroupStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/renderMenuGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAEA;;;AAGG;;;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAAwB,aAAxB,KAAiE;AACvG,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,kBAAA,CAAA,wBAAD,EAAyB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAzB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroup/renderMenuGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAEA;;;AAGG;;;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAAwB,aAAxB,KAAiE;EACvG,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,kBAAA,CAAA,wBAAD,EAAyB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAzB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupContextValues, MenuGroupSlots, MenuGroupState } from './MenuGroup.types';\nimport { MenuGroupContextProvider } from '../../contexts/menuGroupContext';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroup structure but add\n * slots to children.\n */\nexport const renderMenuGroup_unstable = (state: MenuGroupState, contextValues: MenuGroupContextValues) => {\n const { slots, slotProps } = getSlots<MenuGroupSlots>(state);\n\n return (\n <MenuGroupContextProvider value={contextValues.menuGroup}>\n <slots.root {...slotProps.root} />\n </MenuGroupContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,KAAtC,EAA6D,GAA7D,EAAwF;AACtF,QAAM,QAAQ,GAAG,iBAAA,CAAA,KAAA,CAAM,YAAN,CAAjB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,yBAAmB,QAFc;AAGjC,MAAA,IAAI,EAAE,OAH2B;AAIjC,SAAG;AAJ8B,KAA7B,CAJD;AAUL,IAAA,QAAQ,EAAE;AAVL,GAAP;AAYD;;AAfD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,KAAtC,EAA6D,GAA7D,EAAwF;EACtF,MAAM,QAAQ,GAAG,iBAAA,CAAA,KAAA,CAAM,YAAN,CAAjB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,mBAAmB,QAFc;MAGjC,IAAI,EAAE,OAH2B;MAIjC,GAAG;IAJ8B,CAA7B,CAJD;IAUL,QAAQ,EAAE;EAVL,CAAP;AAYD;;AAfD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId } from '@fluentui/react-utilities';\nimport { MenuGroupProps, MenuGroupState } from './MenuGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroup.\n */\nexport function useMenuGroup_unstable(props: MenuGroupProps, ref: React.Ref<HTMLElement>): MenuGroupState {\n const headerId = useId('menu-group');\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n 'aria-labelledby': headerId,\n role: 'group',\n ...props,\n }),\n headerId: headerId,\n };\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,kCAAhB,CAAmD,KAAnD,EAAwE;AACtE,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AACA,QAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;AAAE,IAAA;AAAF,GAAP,CAAd,EAAoC,CAAC,QAAD,CAApC,CAAlB;AAEA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD;;AALD,OAAA,CAAA,kCAAA,GAAA,kCAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,kCAAhB,CAAmD,KAAnD,EAAwE;EACtE,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;IAAE;EAAF,CAAP,CAAd,EAAoC,CAAC,QAAD,CAApC,CAAlB;EAEA,OAAO;IAAE;EAAF,CAAP;AACD;;AALD,OAAA,CAAA,kCAAA,GAAA,kCAAA","sourcesContent":["import * as React from 'react';\nimport type { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';\n\nexport function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues {\n const { headerId } = state;\n const menuGroup = React.useMemo(() => ({ headerId }), [headerId]);\n\n return { menuGroup };\n}\n"],"sourceRoot":"../src/"}
@@ -3,14 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuGroupStyles_unstable = exports.menuGroupClassName = void 0;
6
+ exports.useMenuGroupStyles_unstable = exports.menuGroupClassNames = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
- exports.menuGroupClassName = 'fui-MenuGroup';
10
+ exports.menuGroupClassNames = {
11
+ root: 'fui-MenuGroup'
12
+ };
11
13
 
12
14
  const useMenuGroupStyles_unstable = state => {
13
- state.root.className = react_1.mergeClasses(exports.menuGroupClassName, state.root.className);
15
+ state.root.className = react_1.mergeClasses(exports.menuGroupClassNames.root, state.root.className);
14
16
  return state;
15
17
  };
16
18
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,kBAAA,GAAqB,eAArB;;AAEN,MAAM,2BAA2B,GAAI,KAAD,IAA0C;AACnF,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,kBAAb,EAAiC,KAAK,CAAC,IAAN,CAAW,SAA5C,CAAvB;AAEA,SAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,mBAAA,GAAsD;EACjE,IAAI,EAAE;AAD2D,CAAtD;;AAIN,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,mBAAA,CAAoB,IAAjC,EAAuC,KAAK,CAAC,IAAN,CAAW,SAAlD,CAAvB;EAEA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses } from '@griffel/react';\nimport type { MenuGroupSlots, MenuGroupState } from './MenuGroup.types';\n\nexport const menuGroupClassNames: SlotClassNames<MenuGroupSlots> = {\n root: 'fui-MenuGroup',\n};\n\nexport const useMenuGroupStyles_unstable = (state: MenuGroupState): MenuGroupState => {\n state.root.className = mergeClasses(menuGroupClassNames.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxG,QAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;AACA,EAAA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;AAEA,SAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,WAAhB,GAA8B,iBAA9B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;EACA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;EAEA,OAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport type { MenuGroupHeaderProps } from './MenuGroupHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.\n */\nexport const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroupHeader_unstable(props, ref);\n useMenuGroupHeaderStyles_unstable(state);\n\n return renderMenuGroupHeader_unstable(state);\n});\n\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroupHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgC;AAC5E,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA+B,KAA/B,CAA7B;AAEA,SAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA+B,KAA/B,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroupheader structure but add\n * slots to children.\n */\nexport const renderMenuGroupHeader_unstable = (state: MenuGroupHeaderState) => {\n const { slots, slotProps } = getSlots<MenuGroupHeaderSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,2BAAhB,CACE,KADF,EAEE,GAFF,EAE6B;AAE3B,QAAM;AAAE,IAAA,QAAQ,EAAE;AAAZ,MAAmB,kBAAA,CAAA,4BAAA,EAAzB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,MAAA,EAFiC;AAGjC,SAAG;AAH8B,KAA7B;AAJD,GAAP;AAUD;;AAhBD,OAAA,CAAA,2BAAA,GAAA,2BAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,2BAAhB,CACE,KADF,EAEE,GAFF,EAE6B;EAE3B,MAAM;IAAE,QAAQ,EAAE;EAAZ,IAAmB,kBAAA,CAAA,4BAAA,EAAzB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,EAFiC;MAGjC,GAAG;IAH8B,CAA7B;EAJD,CAAP;AAUD;;AAhBD,OAAA,CAAA,2BAAA,GAAA,2BAAA","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderProps, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroupHeader.\n */\nexport function useMenuGroupHeader_unstable(\n props: MenuGroupHeaderProps,\n ref: React.Ref<HTMLElement>,\n): MenuGroupHeaderState {\n const { headerId: id } = useMenuGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n id,\n ...props,\n }),\n };\n}\n"],"sourceRoot":"../src/"}
@@ -3,13 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuGroupHeaderStyles_unstable = exports.menuGroupHeaderClassName = void 0;
6
+ exports.useMenuGroupHeaderStyles_unstable = exports.menuGroupHeaderClassNames = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
11
 
12
- exports.menuGroupHeaderClassName = 'fui-MenuGroupHeader';
12
+ exports.menuGroupHeaderClassNames = {
13
+ root: 'fui-MenuGroupHeader'
14
+ };
13
15
 
14
16
  const useStyles = /*#__PURE__*/react_1.__styles({
15
17
  "root": {
@@ -28,7 +30,7 @@ const useStyles = /*#__PURE__*/react_1.__styles({
28
30
 
29
31
  const useMenuGroupHeaderStyles_unstable = state => {
30
32
  const styles = useStyles();
31
- state.root.className = react_1.mergeClasses(exports.menuGroupHeaderClassName, styles.root, state.root.className);
33
+ state.root.className = react_1.mergeClasses(exports.menuGroupHeaderClassNames.root, styles.root, state.root.className);
32
34
  return state;
33
35
  };
34
36
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,wBAAA,GAA2B,qBAA3B;;AAEb,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;AAC/E,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,wBAAb,EAAuC,MAAM,CAAC,IAA9C,EAAoD,KAAK,CAAC,IAAN,CAAW,SAA/D,CAAvB;AAEA,SAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE;AADuE,CAAlE;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAaO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;EAC/E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,IAAvC,EAA6C,MAAM,CAAC,IAApD,EAA0D,KAAK,CAAC,IAAN,CAAW,SAArE,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuGroupHeaderClassNames: SlotClassNames<MenuGroupHeaderSlots> = {\n root: 'fui-MenuGroupHeader',\n};\n\nconst useStyles = makeStyles({\n root: {\n fontSize: tokens.fontSizeBase200,\n color: tokens.colorNeutralForeground3,\n paddingLeft: '12px',\n paddingRight: '12px',\n fontWeight: tokens.fontWeightSemibold,\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nexport const useMenuGroupHeaderStyles_unstable = (state: MenuGroupHeaderState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuGroupHeaderClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,QAAA,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1F,QAAM,KAAK,GAAG,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,GAA5B,CAAd;AAEA,EAAA,mBAAA,CAAA,0BAAA,CAA2B,KAA3B;AACA,SAAO,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAP;AACD,CAL2D,CAA/C;AAOb,OAAA,CAAA,QAAA,CAAS,WAAT,GAAuB,UAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItem/MenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,QAAA,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,GAA5B,CAAd;EAEA,mBAAA,CAAA,0BAAA,CAA2B,KAA3B;EACA,OAAO,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAP;AACD,CAL2D,CAA/C;AAOb,OAAA,CAAA,QAAA,CAAS,WAAT,GAAuB,UAAvB","sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles';\nimport type { MenuItemProps } from './MenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.\n */\nexport const MenuItem: ForwardRefComponent<MenuItemProps> = React.forwardRef((props, ref) => {\n const state = useMenuItem_unstable(props, ref);\n\n useMenuItemStyles_unstable(state);\n return renderMenuItem_unstable(state);\n});\n\nMenuItem.displayName = 'MenuItem';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItem/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuItem';\nexport * from './MenuItem.types';\nexport * from './renderMenuItem';\nexport * from './useMenuItem';\nexport * from './useMenuItemStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,SAAN,IAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,IAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,EAKG,KAAK,CAAC,gBAAN,IAA0B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AAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuItem_unstable = (state: MenuItemState) => {\n const { slots, slotProps } = getSlots<MenuItemSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.checkmark && <slots.checkmark {...slotProps.checkmark} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.content && <slots.content {...slotProps.content} />}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n {slots.submenuIndicator && <slots.submenuIndicator {...slotProps.submenuIndicator} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;;AAGO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;AAC5F,QAAM,wBAAwB,GAAG,iBAAA,CAAA,2BAAA,CAA4B,OAAO,IAAI,OAAO,CAAC,wBAA/C,CAAjC;AAEA,QAAM;AAAE,IAAA,SAAS,EAAE;AAAb,MAA+B,KAAK,CAAC,IAA3C;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,CAAC,IAAG;;;AACzB,QAAI,aAAJ,EAAmB;AACjB,MAAA,aAAa,CAAC,CAAD,CAAb;AACD;;AAED,QAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;AACrB;AACD;;AAED,QAAI,GAAG,CAAC,OAAR,EAAiB;AACf,MAAA,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;AACD;AACF,GAZD;;AAcA,SAAO,KAAP;AACD,CAnBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;;AAGO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;EAC5F,MAAM,wBAAwB,GAAG,iBAAA,CAAA,2BAAA,CAA4B,OAAO,IAAI,OAAO,CAAC,wBAA/C,CAAjC;EAEA,MAAM;IAAE,SAAS,EAAE;EAAb,IAA+B,KAAK,CAAC,IAA3C;;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,CAAC,IAAG;;;IACzB,IAAI,aAAJ,EAAmB;MACjB,aAAa,CAAC,CAAD,CAAb;IACD;;IAED,IAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;MACrB;IACD;;IAED,IAAI,GAAG,CAAC,OAAR,EAAiB;MACf,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;IACD;EACF,CAZD;;EAcA,OAAO,KAAP;AACD,CAnBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourcesContent":["import * as React from 'react';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport type { MenuItemState } from '../../components/index';\n\nexport const useCharacterSearch = (state: MenuItemState, ref: React.RefObject<HTMLElement>) => {\n const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);\n\n const { onKeyDown: onKeyDownBase } = state.root;\n state.root.onKeyDown = e => {\n if (onKeyDownBase) {\n onKeyDownBase(e);\n }\n\n if (e.key?.length > 1) {\n return;\n }\n\n if (ref.current) {\n setFocusByFirstCharacter?.(e, ref.current);\n }\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -20,21 +20,26 @@ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
20
20
  const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
21
21
 
22
22
  const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
23
+
24
+ const ChevronRightIcon = /*#__PURE__*/react_icons_1.bundleIcon(react_icons_1.ChevronRightFilled, react_icons_1.ChevronRightRegular);
25
+ const ChevronLeftIcon = /*#__PURE__*/react_icons_1.bundleIcon(react_icons_1.ChevronLeftFilled, react_icons_1.ChevronLeftRegular);
23
26
  /**
24
27
  * Returns the props and state required to render the component
25
28
  */
26
29
 
27
-
28
30
  const useMenuItem_unstable = (props, ref) => {
29
- const hasSubmenu = menuTriggerContext_1.useMenuTriggerContext_unstable() || props.hasSubmenu;
31
+ var _a;
32
+
30
33
  const hasIcons = menuListContext_1.useMenuListContext_unstable(context => context.hasIcons);
31
34
  const hasCheckmarks = menuListContext_1.useMenuListContext_unstable(context => context.hasCheckmarks);
32
35
  const setOpen = menuContext_1.useMenuContext_unstable(context => context.setOpen);
33
36
  const persistOnClickContext = menuContext_1.useMenuContext_unstable(context => context.persistOnItemClick);
34
37
  const dismissedWithKeyboardRef = React.useRef(false);
38
+ const isSubmenuTrigger = menuTriggerContext_1.useMenuTriggerContext_unstable();
39
+ const hasSubmenu = (_a = props.hasSubmenu) !== null && _a !== void 0 ? _a : isSubmenuTrigger;
35
40
  const {
36
41
  dir
37
- } = react_shared_contexts_1.useFluent();
42
+ } = react_shared_contexts_1.useFluent_unstable();
38
43
  const innerRef = React.useRef(null);
39
44
  const state = {
40
45
  hasSubmenu,
@@ -63,7 +68,7 @@ const useMenuItem_unstable = (props, ref) => {
63
68
  submenuIndicator: react_utilities_1.resolveShorthand(props.submenuIndicator, {
64
69
  required: hasSubmenu,
65
70
  defaultProps: {
66
- children: dir === 'ltr' ? React.createElement(react_icons_1.ChevronRightRegular, null) : React.createElement(react_icons_1.ChevronLeftRegular, null)
71
+ children: dir === 'ltr' ? React.createElement(ChevronRightIcon, null) : React.createElement(ChevronLeftIcon, null)
67
72
  }
68
73
  }),
69
74
  content: react_utilities_1.resolveShorthand(props.content, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;AACvG,QAAM,UAAU,GAAG,oBAAA,CAAA,8BAAA,MAAoC,KAAK,CAAC,UAA7D;AACA,QAAM,QAAQ,GAAG,iBAAA,CAAA,2BAAA,CAA4B,OAAO,IAAI,OAAO,CAAC,QAA/C,CAAjB;AACA,QAAM,aAAa,GAAG,iBAAA,CAAA,2BAAA,CAA4B,OAAO,IAAI,OAAO,CAAC,aAA/C,CAAtB;AACA,QAAM,OAAO,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,OAA3C,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AAG,qBAApB,CAPuB,CAQvB;;IACA,IAAI,KAAK,CAAC,cAAN,KAAyB,SAAzB,IAAsC,qBAAqB,KAAK,KAAK,CAAC,cAA1E,EAA0F;MACxF,aAAa,GAAG,KAAK,CAAC,cAAtB;IACD;;IAED,IAAI,CAAC,UAAD,IAAe,CAAC,aAApB,EAAmC;MACjC,OAAO,CAAC,CAAD,EAAI;QAAE,IAAI,EAAE,KAAR;QAAe,QAAQ,EAAE,wBAAwB,CAAC,OAAlD;QAA2D,MAAM,EAAE;MAAnE,CAAJ,CAAP;MACA,wBAAwB,CAAC,OAAzB,GAAmC,KAAnC;IACD;;IAED,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;EACD,CAnBD;;EAqBA,MAAM;IAAE,YAAY,EAAE;EAAhB,IAAyC,KAAK,CAAC,IAArD;EACA,KAAK,CAAC,IAAN,CAAW,YAAX,GAA0B,iBAAA,CAAA,gBAAA,CAAiB,CAAC,IAAG;;;IAC7C,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAT,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,KAAA,CAAhB,GAAgB,EAAA,CAAE,KAAF,EAAhB;IAEA,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;EACD,CAJyB,CAA1B;EAMA,oBAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,QAA1B;EACA,OAAO,KAAP;AACD,CA7FM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport {\n useEventCallback,\n shouldPreventDefaultOnKeyDown,\n resolveShorthand,\n useMergedRefs,\n getNativeElementProps,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useCharacterSearch } from './useCharacterSearch';\nimport { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContext';\nimport {\n ChevronRightFilled,\n ChevronRightRegular,\n ChevronLeftFilled,\n ChevronLeftRegular,\n bundleIcon,\n} from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport type { MenuItemProps, MenuItemState } from './MenuItem.types';\n\nconst ChevronRightIcon = bundleIcon(ChevronRightFilled, ChevronRightRegular);\nconst ChevronLeftIcon = bundleIcon(ChevronLeftFilled, ChevronLeftRegular);\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useMenuItem_unstable = (props: MenuItemProps, ref: React.Ref<HTMLElement>): MenuItemState => {\n const hasIcons = useMenuListContext_unstable(context => context.hasIcons);\n const hasCheckmarks = useMenuListContext_unstable(context => context.hasCheckmarks);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);\n const dismissedWithKeyboardRef = React.useRef(false);\n\n const isSubmenuTrigger = useMenuTriggerContext_unstable();\n const hasSubmenu = props.hasSubmenu ?? isSubmenuTrigger;\n\n const { dir } = useFluent();\n const innerRef = React.useRef<HTMLElement>(null);\n\n const state: MenuItemState = {\n hasSubmenu,\n ...props,\n components: {\n root: 'div',\n icon: 'span',\n checkmark: 'span',\n submenuIndicator: 'span',\n content: 'span',\n secondaryContent: 'span',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'menuitem',\n tabIndex: 0,\n 'aria-disabled': props.disabled,\n ...props,\n }),\n icon: resolveShorthand(props.icon, { required: hasIcons }),\n checkmark: resolveShorthand(props.checkmark, { required: hasCheckmarks }),\n submenuIndicator: resolveShorthand(props.submenuIndicator, {\n required: hasSubmenu,\n defaultProps: {\n children: dir === 'ltr' ? <ChevronRightIcon /> : <ChevronLeftIcon />,\n },\n }),\n content: resolveShorthand(props.content, {\n required: !!props.children,\n defaultProps: { children: props.children },\n }),\n secondaryContent: resolveShorthand(props.secondaryContent),\n };\n\n const { onClick: onClickOriginal, onKeyDown: onKeyDownOriginal } = state.root;\n state.root.onKeyDown = e => {\n if (shouldPreventDefaultOnKeyDown(e)) {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n dismissedWithKeyboardRef.current = true;\n e.preventDefault();\n (e.target as HTMLElement)?.click();\n }\n\n onKeyDownOriginal?.(e);\n };\n\n state.root.onClick = e => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n let shouldPersist = persistOnClickContext;\n // prop wins over context;\n if (state.persistOnClick !== undefined && persistOnClickContext !== state.persistOnClick) {\n shouldPersist = state.persistOnClick;\n }\n\n if (!hasSubmenu && !shouldPersist) {\n setOpen(e, { open: false, keyboard: dismissedWithKeyboardRef.current, bubble: true });\n dismissedWithKeyboardRef.current = false;\n }\n\n onClickOriginal?.(e);\n };\n\n const { onMouseEnter: onMouseEnterOriginal } = state.root;\n state.root.onMouseEnter = useEventCallback(e => {\n innerRef.current?.focus();\n\n onMouseEnterOriginal?.(e);\n });\n\n useCharacterSearch(state, innerRef);\n return state;\n};\n"],"sourceRoot":"../src/"}