@fluentui/react-menu 9.5.3 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. package/CHANGELOG.json +139 -1
  2. package/CHANGELOG.md +37 -2
  3. package/dist/index.d.ts +9 -19
  4. package/lib/components/Menu/Menu.js +0 -1
  5. package/lib/components/Menu/Menu.js.map +1 -1
  6. package/lib/components/Menu/renderMenu.js +0 -1
  7. package/lib/components/Menu/renderMenu.js.map +1 -1
  8. package/lib/components/Menu/useMenu.js +16 -34
  9. package/lib/components/Menu/useMenu.js.map +1 -1
  10. package/lib/components/Menu/useMenuContextValues.js +2 -2
  11. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  12. package/lib/components/MenuDivider/MenuDivider.js +0 -1
  13. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  14. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  15. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  16. package/lib/components/MenuDivider/useMenuDivider.js +0 -1
  17. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  18. package/lib/components/MenuDivider/useMenuDividerStyles.js +10 -12
  19. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  20. package/lib/components/MenuGroup/MenuGroup.js +0 -1
  21. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  22. package/lib/components/MenuGroup/renderMenuGroup.js +2 -2
  23. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  24. package/lib/components/MenuGroup/useMenuGroup.js +0 -1
  25. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  26. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  27. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  28. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  29. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  30. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  31. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  32. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +0 -1
  33. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  34. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -12
  35. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  36. package/lib/components/MenuItem/MenuItem.js +0 -1
  37. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  38. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  39. package/lib/components/MenuItem/renderMenuItem.js +12 -7
  40. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  41. package/lib/components/MenuItem/useCharacterSearch.js +0 -5
  42. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  43. package/lib/components/MenuItem/useMenuItem.js +34 -47
  44. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  45. package/lib/components/MenuItem/useMenuItemStyles.js +108 -117
  46. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  47. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  48. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  49. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -6
  50. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  51. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -4
  52. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  53. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -5
  54. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  55. package/lib/components/MenuItemRadio/MenuItemRadio.js +0 -1
  56. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  57. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +10 -6
  58. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  59. package/lib/components/MenuItemRadio/useMenuItemRadio.js +3 -4
  60. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  61. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -5
  62. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  63. package/lib/components/MenuList/MenuList.js +0 -1
  64. package/lib/components/MenuList/MenuList.js.map +1 -1
  65. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  66. package/lib/components/MenuList/renderMenuList.js +2 -2
  67. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  68. package/lib/components/MenuList/useMenuList.js +13 -29
  69. package/lib/components/MenuList/useMenuList.js.map +1 -1
  70. package/lib/components/MenuList/useMenuListContextValues.js +2 -2
  71. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  72. package/lib/components/MenuList/useMenuListStyles.js +6 -9
  73. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  74. package/lib/components/MenuPopover/MenuPopover.js +0 -1
  75. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  76. package/lib/components/MenuPopover/renderMenuPopover.js +4 -5
  77. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  78. package/lib/components/MenuPopover/useMenuPopover.js +6 -13
  79. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  80. package/lib/components/MenuPopover/useMenuPopoverStyles.js +32 -35
  81. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  82. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +0 -1
  83. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  84. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
  85. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  86. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +0 -6
  87. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  88. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -15
  89. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  90. package/lib/components/MenuTrigger/MenuTrigger.js +2 -3
  91. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  92. package/lib/components/MenuTrigger/renderMenuTrigger.js +0 -1
  93. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  94. package/lib/components/MenuTrigger/useMenuTrigger.js +4 -24
  95. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  96. package/lib/contexts/menuContext.js.map +1 -1
  97. package/lib/contexts/menuGroupContext.js +0 -1
  98. package/lib/contexts/menuGroupContext.js.map +1 -1
  99. package/lib/contexts/menuListContext.js.map +1 -1
  100. package/lib/contexts/menuTriggerContext.js +0 -2
  101. package/lib/contexts/menuTriggerContext.js.map +1 -1
  102. package/lib/index.js.map +1 -1
  103. package/lib/selectable/useCheckmarkStyles.js +7 -11
  104. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  105. package/lib/utils/useIsSubmenu.js +0 -1
  106. package/lib/utils/useIsSubmenu.js.map +1 -1
  107. package/lib/utils/useOnMenuEnter.js +4 -11
  108. package/lib/utils/useOnMenuEnter.js.map +1 -1
  109. package/lib-amd/components/MenuItem/MenuItem.types.js.map +1 -1
  110. package/lib-amd/components/MenuItem/useMenuItem.js +26 -30
  111. package/lib-amd/components/MenuItem/useMenuItem.js.map +1 -1
  112. package/lib-amd/components/MenuList/MenuList.types.js.map +1 -1
  113. package/lib-amd/components/MenuList/useMenuList.js +5 -4
  114. package/lib-amd/components/MenuList/useMenuList.js.map +1 -1
  115. package/lib-commonjs/Menu.js +0 -2
  116. package/lib-commonjs/Menu.js.map +1 -1
  117. package/lib-commonjs/MenuDivider.js +0 -2
  118. package/lib-commonjs/MenuDivider.js.map +1 -1
  119. package/lib-commonjs/MenuGroup.js +0 -2
  120. package/lib-commonjs/MenuGroup.js.map +1 -1
  121. package/lib-commonjs/MenuGroupHeader.js +0 -2
  122. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  123. package/lib-commonjs/MenuItem.js +0 -2
  124. package/lib-commonjs/MenuItem.js.map +1 -1
  125. package/lib-commonjs/MenuItemCheckbox.js +0 -2
  126. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  127. package/lib-commonjs/MenuItemRadio.js +0 -2
  128. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  129. package/lib-commonjs/MenuList.js +0 -2
  130. package/lib-commonjs/MenuList.js.map +1 -1
  131. package/lib-commonjs/MenuPopover.js +0 -2
  132. package/lib-commonjs/MenuPopover.js.map +1 -1
  133. package/lib-commonjs/MenuSplitGroup.js +0 -2
  134. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  135. package/lib-commonjs/MenuTrigger.js +0 -2
  136. package/lib-commonjs/MenuTrigger.js.map +1 -1
  137. package/lib-commonjs/components/Menu/Menu.js +0 -6
  138. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  139. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  140. package/lib-commonjs/components/Menu/index.js +0 -6
  141. package/lib-commonjs/components/Menu/index.js.map +1 -1
  142. package/lib-commonjs/components/Menu/renderMenu.js +0 -5
  143. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  144. package/lib-commonjs/components/Menu/useMenu.js +16 -46
  145. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  146. package/lib-commonjs/components/Menu/useMenuContextValues.js +2 -4
  147. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  148. package/lib-commonjs/components/MenuDivider/MenuDivider.js +0 -6
  149. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  150. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  151. package/lib-commonjs/components/MenuDivider/index.js +0 -6
  152. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  153. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -6
  154. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  155. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +0 -4
  156. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  157. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +10 -16
  158. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  159. package/lib-commonjs/components/MenuGroup/MenuGroup.js +0 -7
  160. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  161. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  162. package/lib-commonjs/components/MenuGroup/index.js +0 -7
  163. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  164. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -7
  165. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  166. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +0 -4
  167. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  168. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +0 -3
  169. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  170. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +0 -4
  171. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  172. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +0 -6
  173. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  174. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroupHeader/index.js +0 -6
  176. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -6
  178. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +0 -5
  180. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -16
  182. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  183. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -6
  184. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  185. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  186. package/lib-commonjs/components/MenuItem/index.js +0 -6
  187. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  188. package/lib-commonjs/components/MenuItem/renderMenuItem.js +12 -11
  189. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  190. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +0 -8
  191. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  192. package/lib-commonjs/components/MenuItem/useMenuItem.js +33 -58
  193. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  194. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +108 -124
  195. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  196. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -6
  197. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  198. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  199. package/lib-commonjs/components/MenuItemCheckbox/index.js +0 -6
  200. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  201. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -10
  202. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  203. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -11
  204. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  205. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -11
  206. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  207. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +0 -6
  208. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  209. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  210. package/lib-commonjs/components/MenuItemRadio/index.js +0 -6
  211. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  212. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +10 -10
  213. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  214. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +3 -11
  215. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  216. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -11
  217. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  218. package/lib-commonjs/components/MenuList/MenuList.js +0 -7
  219. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  220. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  221. package/lib-commonjs/components/MenuList/index.js +0 -7
  222. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  223. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -7
  224. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  225. package/lib-commonjs/components/MenuList/useMenuList.js +13 -37
  226. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  227. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +2 -4
  228. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  229. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -12
  230. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  231. package/lib-commonjs/components/MenuPopover/MenuPopover.js +0 -6
  232. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  233. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  234. package/lib-commonjs/components/MenuPopover/index.js +0 -6
  235. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  236. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -10
  237. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  238. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +6 -22
  239. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  240. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +32 -39
  241. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  242. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +0 -6
  243. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  244. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  245. package/lib-commonjs/components/MenuSplitGroup/index.js +0 -6
  246. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  247. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -6
  248. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  249. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +0 -13
  250. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  251. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -20
  252. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  253. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +2 -7
  254. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  255. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  256. package/lib-commonjs/components/MenuTrigger/index.js +0 -5
  257. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  258. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +0 -5
  259. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  260. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +4 -34
  261. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  262. package/lib-commonjs/components/index.js +0 -3
  263. package/lib-commonjs/components/index.js.map +1 -1
  264. package/lib-commonjs/contexts/menuContext.js +0 -4
  265. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  266. package/lib-commonjs/contexts/menuGroupContext.js +0 -5
  267. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  268. package/lib-commonjs/contexts/menuListContext.js +0 -4
  269. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  270. package/lib-commonjs/contexts/menuTriggerContext.js +0 -6
  271. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  272. package/lib-commonjs/index.js +0 -32
  273. package/lib-commonjs/index.js.map +1 -1
  274. package/lib-commonjs/selectable/index.js +0 -3
  275. package/lib-commonjs/selectable/index.js.map +1 -1
  276. package/lib-commonjs/selectable/types.js.map +1 -1
  277. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -13
  278. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  279. package/lib-commonjs/utils/index.js +0 -2
  280. package/lib-commonjs/utils/index.js.map +1 -1
  281. package/lib-commonjs/utils/useIsSubmenu.js +0 -6
  282. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  283. package/lib-commonjs/utils/useOnMenuEnter.js +4 -17
  284. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  285. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuDivider/renderMenuDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAmB,KAAnB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;;AAIA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAmBE,KAAK,CAAC;EAE9D,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderMenuDivider_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuDivider/renderMenuDivider.tsx"],"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"]}
@@ -2,7 +2,6 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
2
2
  /**
3
3
  * Given user props, returns state and render function for a MenuDivider.
4
4
  */
5
-
6
5
  export const useMenuDivider_unstable = (props, ref) => {
7
6
  return {
8
7
  components: {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuDivider/useMenuDivider.ts"],"names":[],"mappings":"AAAA,SAAS,qBAAT,QAAsC,2BAAtC;AAIA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;EAChH,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,IAAI,EAAE,cAD2B;MAEjC,eAAe,IAFkB;MAGjC,GAAG,KAH8B;MAIjC;IAJiC,CAAR;EAJtB,CAAP;AAWD,CAZM","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/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,qBAAqB,QAAQ,2BAA2B;AAIjE;;;AAGA,OAAO,MAAMC,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;EAChH,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEL,qBAAqB,CAAC,KAAK,EAAE;MACjCM,IAAI,EAAE,cAAc;MACpB,aAAa,EAAE,IAAI;MACnB,GAAGJ,KAAK;MACRC;KACD;GACF;AACH,CAAC","names":["getNativeElementProps","useMenuDivider_unstable","props","ref","components","root","role"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuDivider/useMenuDivider.ts"],"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"]}
@@ -3,22 +3,20 @@ import { tokens } from '@fluentui/react-theme';
3
3
  export const menuDividerClassNames = {
4
4
  root: 'fui-MenuDivider'
5
5
  };
6
-
7
6
  const useStyles = /*#__PURE__*/__styles({
8
- "root": {
9
- "B6of3ja": "fvjh0tl",
10
- "t21cq0": ["f1rnx978", "f1q7jvqi"],
11
- "jrapky": "fd1gkq",
12
- "Frg6f3": ["f1q7jvqi", "f1rnx978"],
13
- "a9b677": "f14z66ap",
14
- "Bn0qgzm": "f1vxd6vx",
15
- "oivjwe": "fg706s2",
16
- "B9xav0g": "frpde29"
7
+ root: {
8
+ B6of3ja: "fvjh0tl",
9
+ t21cq0: ["f1rnx978", "f1q7jvqi"],
10
+ jrapky: "fd1gkq",
11
+ Frg6f3: ["f1q7jvqi", "f1rnx978"],
12
+ a9b677: "f14z66ap",
13
+ Bn0qgzm: "f1vxd6vx",
14
+ oivjwe: "fg706s2",
15
+ B9xav0g: "frpde29"
17
16
  }
18
17
  }, {
19
- "d": [".fvjh0tl{margin-top:4px;}", ".f1rnx978{margin-right:-5px;}", ".f1q7jvqi{margin-left:-5px;}", ".fd1gkq{margin-bottom:4px;}", ".f14z66ap{width:auto;}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}"]
18
+ d: [".fvjh0tl{margin-top:4px;}", ".f1rnx978{margin-right:-5px;}", ".f1q7jvqi{margin-left:-5px;}", ".fd1gkq{margin-bottom:4px;}", ".f14z66ap{width:auto;}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}"]
20
19
  });
21
-
22
20
  export const useMenuDividerStyles_unstable = state => {
23
21
  const styles = useStyles();
24
22
  state.root.className = mergeClasses(menuDividerClassNames.root, styles.root, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,qBAAqB,GAAqC;EACrE,IAAI,EAAE;AAD+D,CAAhE;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAQA,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA4B;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,qBAAqB,CAAC,IAAvB,EAA6B,MAAM,CAAC,IAApC,EAA0C,KAAK,CAAC,IAAN,CAAW,SAArD,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","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(tokens.strokeWidthThin, '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
+ {"version":3,"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,kBAAoB,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAMhB;AAEF,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAI;EACvE,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGR,YAAY,CAACE,qBAAqB,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAElG,OAAOF,KAAK;AACd,CAAC","names":["shorthands","mergeClasses","tokens","menuDividerClassNames","root","useStyles","useMenuDividerStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuDivider/useMenuDividerStyles.ts"],"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(tokens.strokeWidthThin, '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"]}
@@ -6,7 +6,6 @@ import { useMenuGroupStyles_unstable } from './useMenuGroupStyles';
6
6
  /**
7
7
  * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
8
8
  */
9
-
10
9
  export const MenuGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
11
10
  const state = useMenuGroup_unstable(props, ref);
12
11
  const contextValues = useMenuGroupContextValues_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,kCAAT,QAAmD,6BAAnD;AAGA,SAAS,2BAAT,QAA4C,sBAA5C;AAEA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EACA,MAAM,aAAa,GAAG,kCAAkC,CAAC,KAAD,CAAxD;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EAEA,OAAO,wBAAwB,CAAC,KAAD,EAAQ,aAAR,CAA/B;AACD,CAP6D,CAAvD;AASP,SAAS,CAAC,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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,kCAAkC,QAAQ,6BAA6B;AAGhF,SAASC,2BAA2B,QAAQ,sBAAsB;AAElE;;;AAGA,OAAO,MAAMC,SAAS,gBAAwCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5F,MAAMC,KAAK,GAAGR,qBAAqB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAC/C,MAAME,aAAa,GAAGP,kCAAkC,CAACM,KAAK,CAAC;EAE/DL,2BAA2B,CAACK,KAAK,CAAC;EAElC,OAAOP,wBAAwB,CAACO,KAAK,EAAEC,aAAa,CAAC;AACvD,CAAC,CAAC;AAEFL,SAAS,CAACM,WAAW,GAAG,WAAW","names":["React","useMenuGroup_unstable","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","MenuGroup","forwardRef","props","ref","state","contextValues","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroup/MenuGroup.tsx"],"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"]}
@@ -5,7 +5,6 @@ import { MenuGroupContextProvider } from '../../contexts/menuGroupContext';
5
5
  * Redefine the render function to add slots. Reuse the menugroup structure but add
6
6
  * slots to children.
7
7
  */
8
-
9
8
  export const renderMenuGroup_unstable = (state, contextValues) => {
10
9
  const {
11
10
  slots,
@@ -13,7 +12,8 @@ export const renderMenuGroup_unstable = (state, contextValues) => {
13
12
  } = getSlots(state);
14
13
  return /*#__PURE__*/React.createElement(MenuGroupContextProvider, {
15
14
  value: contextValues.menuGroup
16
- }, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
15
+ }, /*#__PURE__*/React.createElement(slots.root, {
16
+ ...slotProps.root
17
17
  }));
18
18
  };
19
19
  //# sourceMappingURL=renderMenuGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/renderMenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,wBAAT,QAAyC,iCAAzC;AAEA;;;AAGG;;AACH,OAAO,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAAwB,aAAxB,KAAiE;EACvG,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,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","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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,wBAAwB,QAAQ,iCAAiC;AAE1E;;;;AAIA,OAAO,MAAMC,wBAAwB,GAAG,CAACC,KAAqB,EAAEC,aAAqC,KAAI;EACvG,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAAiBG,KAAK,CAAC;EAE5D,oBACEJ,oBAACE,wBAAwB;IAACM,KAAK,EAAEH,aAAa,CAACI;EAAS,gBACtDT,oBAACM,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI,CACT;AAE/B,CAAC","names":["React","getSlots","MenuGroupContextProvider","renderMenuGroup_unstable","state","contextValues","slots","slotProps","value","menuGroup","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroup/renderMenuGroup.tsx"],"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"]}
@@ -2,7 +2,6 @@ import { getNativeElementProps, useId } from '@fluentui/react-utilities';
2
2
  /**
3
3
  * Given user props, returns state and render function for a MenuGroup.
4
4
  */
5
-
6
5
  export function useMenuGroup_unstable(props, ref) {
7
6
  const headerId = useId('menu-group');
8
7
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,KAAhC,QAA6C,2BAA7C;AAGA;;AAEG;;AACH,OAAM,SAAU,qBAAV,CAAgC,KAAhC,EAAuD,GAAvD,EAAkF;EACtF,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAD,CAAtB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GADiC;MAEjC,mBAAmB,QAFc;MAGjC,IAAI,EAAE,OAH2B;MAIjC,GAAG;IAJ8B,CAAR,CAJtB;IAUL;EAVK,CAAP;AAYD","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,\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,KAAK,QAAQ,2BAA2B;AAGxE;;;AAGA,OAAM,SAAUC,qBAAqB,CAACC,KAAqB,EAAEC,GAA2B;EACtF,MAAMC,QAAQ,GAAGJ,KAAK,CAAC,YAAY,CAAC;EAEpC,OAAO;IACLK,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEP,qBAAqB,CAAC,KAAK,EAAE;MACjCI,GAAG;MACH,iBAAiB,EAAEC,QAAQ;MAC3BG,IAAI,EAAE,OAAO;MACb,GAAGL;KACJ,CAAC;IACFE;GACD;AACH","names":["getNativeElementProps","useId","useMenuGroup_unstable","props","ref","headerId","components","root","role"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroup.ts"],"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,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,kCAAV,CAA6C,KAA7C,EAAkE;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","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/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAM,SAAUC,kCAAkC,CAACC,KAAqB;EACtE,MAAM;IAAEC;EAAQ,CAAE,GAAGD,KAAK;EAC1B,MAAME,SAAS,GAAGJ,KAAK,CAACK,OAAO,CAAC,OAAO;IAAEF;EAAQ,CAAE,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEjE,OAAO;IAAEC;EAAS,CAAE;AACtB","names":["React","useMenuGroupContextValues_unstable","state","headerId","menuGroup","useMemo"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupContextValues.ts"],"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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":"AACA,SAAS,YAAT,QAA6B,gBAA7B;AAGA,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAmB,CAAC,IAArB,EAA2B,KAAK,CAAC,IAAN,CAAW,SAAtC,CAAnC;EAEA,OAAO,KAAP;AACD,CAJM","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
+ {"version":3,"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,OAAO,MAAMC,mBAAmB,GAAmC;EACjEC,IAAI,EAAE;CACP;AAED,OAAO,MAAMC,2BAA2B,GAAIC,KAAqB,IAAoB;EACnFA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGL,YAAY,CAACC,mBAAmB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAEnF,OAAOD,KAAK;AACd,CAAC","names":["mergeClasses","menuGroupClassNames","root","useMenuGroupStyles_unstable","state","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupStyles.ts"],"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"]}
@@ -5,7 +5,6 @@ import { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';
5
5
  /**
6
6
  * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
7
7
  */
8
-
9
8
  export const MenuGroupHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useMenuGroupHeader_unstable(props, ref);
11
10
  useMenuGroupHeaderStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,2BAA2B,CAAC,KAAD,EAAQ,GAAR,CAAzC;EACA,iCAAiC,CAAC,KAAD,CAAjC;EAEA,OAAO,8BAA8B,CAAC,KAAD,CAArC;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,8BAA8B,QAAQ,yBAAyB;AAIxE;;;AAGA,OAAO,MAAMC,eAAe,gBAA8CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxG,MAAMC,KAAK,GAAGP,2BAA2B,CAACK,KAAK,EAAEC,GAAG,CAAC;EACrDL,iCAAiC,CAACM,KAAK,CAAC;EAExC,OAAOL,8BAA8B,CAACK,KAAK,CAAC;AAC9C,CAAC,CAAC;AAEFJ,eAAe,CAACK,WAAW,GAAG,iBAAiB","names":["React","useMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","renderMenuGroupHeader_unstable","MenuGroupHeader","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"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"]}
@@ -4,13 +4,13 @@ import { getSlots } from '@fluentui/react-utilities';
4
4
  * Redefine the render function to add slots. Reuse the menugroupheader structure but add
5
5
  * slots to children.
6
6
  */
7
-
8
7
  export const renderMenuGroupHeader_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
11
  } = getSlots(state);
13
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
12
+ return /*#__PURE__*/React.createElement(slots.root, {
13
+ ...slotProps.root
14
14
  });
15
15
  };
16
16
  //# sourceMappingURL=renderMenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAuB,KAAvB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;;AAIA,OAAO,MAAMC,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAuBE,KAAK,CAAC;EAElE,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderMenuGroupHeader_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"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"]}
@@ -3,7 +3,6 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Given user props, returns state and render function for a MenuGroupHeader.
5
5
  */
6
-
7
6
  export function useMenuGroupHeader_unstable(props, ref) {
8
7
  const {
9
8
  headerId: id
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":"AACA,SAAS,4BAAT,QAA6C,iCAA7C;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAM,SAAU,2BAAV,CACJ,KADI,EAEJ,GAFI,EAEuB;EAE3B,MAAM;IAAE,QAAQ,EAAE;EAAZ,IAAmB,4BAA4B,EAArD;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GADiC;MAEjC,EAFiC;MAGjC,GAAG;IAH8B,CAAR;EAJtB,CAAP;AAUD","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/"}
1
+ {"version":3,"mappings":"AACA,SAASA,4BAA4B,QAAQ,iCAAiC;AAC9E,SAASC,qBAAqB,QAAQ,2BAA2B;AAGjE;;;AAGA,OAAM,SAAUC,2BAA2B,CACzCC,KAA2B,EAC3BC,GAA2B;EAE3B,MAAM;IAAEC,QAAQ,EAAEC;EAAE,CAAE,GAAGN,4BAA4B,EAAE;EAEvD,OAAO;IACLO,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEP,qBAAqB,CAAC,KAAK,EAAE;MACjCG,GAAG;MACHE,EAAE;MACF,GAAGH;KACJ;GACF;AACH","names":["useMenuGroupContext_unstable","getNativeElementProps","useMenuGroupHeader_unstable","props","ref","headerId","id","components","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"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"]}
@@ -3,22 +3,20 @@ import { tokens } from '@fluentui/react-theme';
3
3
  export const menuGroupHeaderClassNames = {
4
4
  root: 'fui-MenuGroupHeader'
5
5
  };
6
-
7
6
  const useStyles = /*#__PURE__*/__styles({
8
- "root": {
9
- "Be2twd7": "fy9rknc",
10
- "sj55zd": "f11d4kpn",
11
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
12
- "z189sj": ["f11qrl6u", "fjlbh76"],
13
- "Bhrd7zp": "fl43uef",
14
- "Bqenvij": "f1d2rq10",
15
- "mc9l5x": "f22iagw",
16
- "Bt984gj": "f122n59"
7
+ root: {
8
+ Be2twd7: "fy9rknc",
9
+ sj55zd: "f11d4kpn",
10
+ uwmqm3: ["fjlbh76", "f11qrl6u"],
11
+ z189sj: ["f11qrl6u", "fjlbh76"],
12
+ Bhrd7zp: "fl43uef",
13
+ Bqenvij: "f1d2rq10",
14
+ mc9l5x: "f22iagw",
15
+ Bt984gj: "f122n59"
17
16
  }
18
17
  }, {
19
- "d": [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
18
+ d: [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
20
19
  });
21
-
22
20
  export const useMenuGroupHeaderStyles_unstable = state => {
23
21
  const styles = useStyles();
24
22
  state.root.className = mergeClasses(menuGroupHeaderClassNames.root, styles.root, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,yBAAyB,GAAyC;EAC7E,IAAI,EAAE;AADuE,CAAxE;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;EAC/E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAyB,CAAC,IAA3B,EAAiC,MAAM,CAAC,IAAxC,EAA8C,KAAK,CAAC,IAAN,CAAW,SAAzD,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","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
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,kBAAoB,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAWhB;AAEF,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAAI;EAC/E,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGR,YAAY,CAACE,yBAAyB,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAEtG,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","tokens","menuGroupHeaderClassNames","root","useStyles","useMenuGroupHeaderStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"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"]}
@@ -5,7 +5,6 @@ import { useMenuItemStyles_unstable } from './useMenuItemStyles';
5
5
  /**
6
6
  * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
7
7
  */
8
-
9
8
  export const MenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useMenuItem_unstable(props, ref);
11
10
  useMenuItemStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAD,EAAQ,GAAR,CAAlC;EAEA,0BAA0B,CAAC,KAAD,CAA1B;EACA,OAAO,uBAAuB,CAAC,KAAD,CAA9B;AACD,CAL2D,CAArD;AAOP,QAAQ,CAAC,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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAIhE;;;AAGA,OAAO,MAAMC,QAAQ,gBAAuCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGP,oBAAoB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE9CJ,0BAA0B,CAACK,KAAK,CAAC;EACjC,OAAON,uBAAuB,CAACM,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFJ,QAAQ,CAACK,WAAW,GAAG,UAAU","names":["React","useMenuItem_unstable","renderMenuItem_unstable","useMenuItemStyles_unstable","MenuItem","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/MenuItem.tsx"],"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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/MenuItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuItemSlots = {\n root: Slot<ARIAButtonSlotProps<'div'>>;\n\n /**\n * Icon slot rendered before children content\n */\n icon?: Slot<'span'>;\n\n /**\n * A helper slot for alignment when a menu item is used with selectable menuitems\n * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components\n */\n checkmark?: Slot<'span'>;\n\n /**\n * Icon slot that shows the indicator for a submenu\n */\n submenuIndicator?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<'span'>;\n\n /**\n * Secondary content rendered opposite the primary content (e.g Shortcut text)\n */\n secondaryContent?: Slot<'span'>;\n};\n\nexport type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & {\n /**\n * If the menu item is a trigger for a submenu\n *\n * @default false\n */\n hasSubmenu?: boolean;\n\n /**\n * Clicking on the menu item will not dismiss an open menu\n *\n * @default false\n */\n persistOnClick?: boolean;\n};\n\nexport type MenuItemState = ComponentState<MenuItemSlots> &\n Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>> & {\n isNativeButton: boolean;\n };\n"]}
1
+ {"version":3,"file":"MenuItem.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/MenuItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuItemSlots = {\n root: Slot<'div', 'button'>;\n\n /**\n * Icon slot rendered before children content\n */\n icon?: Slot<'span'>;\n\n /**\n * A helper slot for alignment when a menu item is used with selectable menuitems\n * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components\n */\n checkmark?: Slot<'span'>;\n\n /**\n * Icon slot that shows the indicator for a submenu\n */\n submenuIndicator?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<'span'>;\n\n /**\n * Secondary content rendered opposite the primary content (e.g Shortcut text)\n */\n secondaryContent?: Slot<'span'>;\n};\n\nexport type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & {\n /**\n * If the menu item is a trigger for a submenu\n *\n * @default false\n */\n hasSubmenu?: boolean;\n\n /**\n * Clicking on the menu item will not dismiss an open menu\n *\n * @default false\n */\n persistOnClick?: boolean;\n\n disabled?: boolean;\n /**\n * @deprecated this property does nothing.\n * disabled focusable is by default by simply using `disabled` property\n */\n disabledFocusable?: boolean;\n};\n\nexport type MenuItemState = ComponentState<MenuItemSlots> &\n Required<Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>> & {\n isNativeButton: boolean;\n };\n"]}
@@ -3,18 +3,23 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Function that renders the final JSX of the component
5
5
  */
6
-
7
6
  export const renderMenuItem_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- }, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
14
- }), slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
15
- }), slots.content && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
16
- }), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
17
- }), slots.submenuIndicator && /*#__PURE__*/React.createElement(slots.submenuIndicator, { ...slotProps.submenuIndicator
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ }, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, {
14
+ ...slotProps.checkmark
15
+ }), slots.icon && /*#__PURE__*/React.createElement(slots.icon, {
16
+ ...slotProps.icon
17
+ }), slots.content && /*#__PURE__*/React.createElement(slots.content, {
18
+ ...slotProps.content
19
+ }), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, {
20
+ ...slotProps.secondaryContent
21
+ }), slots.submenuIndicator && /*#__PURE__*/React.createElement(slots.submenuIndicator, {
22
+ ...slotProps.submenuIndicator
18
23
  }));
19
24
  };
20
25
  //# sourceMappingURL=renderMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;EAC9D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAgB,KAAhB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,SAAN,iBAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,iBAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,CAJ7B,EAKG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,CAL7B,CADF;AASD,CAZM","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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,uBAAuB,GAAIC,KAAoB,IAAI;EAC9D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAgBE,KAAK,CAAC;EAE3D,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BF,KAAK,CAACG,SAAS,iBAAIP,oBAACI,KAAK,CAACG,SAAS;IAAA,GAAKF,SAAS,CAACE;EAAS,EAAI,EAC/DH,KAAK,CAACI,IAAI,iBAAIR,oBAACI,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI,EAChDJ,KAAK,CAACK,OAAO,iBAAIT,oBAACI,KAAK,CAACK,OAAO;IAAA,GAAKJ,SAAS,CAACI;EAAO,EAAI,EACzDL,KAAK,CAACM,gBAAgB,iBAAIV,oBAACI,KAAK,CAACM,gBAAgB;IAAA,GAAKL,SAAS,CAACK;EAAgB,EAAI,EACpFN,KAAK,CAACO,gBAAgB,iBAAIX,oBAACI,KAAK,CAACO,gBAAgB;IAAA,GAAKN,SAAS,CAACM;EAAgB,EAAI,CAC1E;AAEjB,CAAC","names":["React","getSlots","renderMenuItem_unstable","state","slots","slotProps","root","checkmark","icon","content","secondaryContent","submenuIndicator"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/renderMenuItem.tsx"],"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"]}
@@ -4,21 +4,16 @@ export const useCharacterSearch = (state, ref) => {
4
4
  const {
5
5
  onKeyDown: originalOnKeyDown
6
6
  } = state.root;
7
-
8
7
  state.root.onKeyDown = e => {
9
8
  var _a;
10
-
11
9
  originalOnKeyDown === null || originalOnKeyDown === void 0 ? void 0 : originalOnKeyDown(e);
12
-
13
10
  if (((_a = e.key) === null || _a === void 0 ? void 0 : _a.length) > 1) {
14
11
  return;
15
12
  }
16
-
17
13
  if (ref.current) {
18
14
  setFocusByFirstCharacter === null || setFocusByFirstCharacter === void 0 ? void 0 : setFocusByFirstCharacter(e, ref.current);
19
15
  }
20
16
  };
21
-
22
17
  return state;
23
18
  };
24
19
  //# sourceMappingURL=useCharacterSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":"AACA,SAAS,2BAAT,QAA4C,gCAA5C;AAIA,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;EAC5F,MAAM,wBAAwB,GAAG,2BAA2B,CAAC,OAAO,IAAI,OAAO,CAAC,wBAApB,CAA5D;EAEA,MAAM;IAAE,SAAS,EAAE;EAAb,IAAmC,KAAK,CAAC,IAA/C;;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAwB,CAAD,IAA0D;;;IAC/E,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAG,CAAH,CAAjB;;IAEA,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,CAVD;;EAYA,OAAO,KAAP;AACD,CAlBM","sourcesContent":["import * as React from 'react';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport type { MenuItemState } from '../../components/index';\nimport type { ARIAButtonElementIntersection } from '@fluentui/react-aria';\n\nexport const useCharacterSearch = (state: MenuItemState, ref: React.RefObject<HTMLElement>) => {\n const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);\n\n const { onKeyDown: originalOnKeyDown } = state.root;\n\n state.root.onKeyDown = (e: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n originalOnKeyDown?.(e);\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/"}
1
+ {"version":3,"mappings":"AACA,SAASA,2BAA2B,QAAQ,gCAAgC;AAI5E,OAAO,MAAMC,kBAAkB,GAAG,CAACC,KAAoB,EAAEC,GAAiC,KAAI;EAC5F,MAAMC,wBAAwB,GAAGJ,2BAA2B,CAACK,OAAO,IAAIA,OAAO,CAACD,wBAAwB,CAAC;EAEzG,MAAM;IAAEE,SAAS,EAAEC;EAAiB,CAAE,GAAGL,KAAK,CAACM,IAAI;EAEnDN,KAAK,CAACM,IAAI,CAACF,SAAS,GAAIG,CAAqD,IAAI;;IAC/EF,iBAAiB,aAAjBA,iBAAiB,uBAAjBA,iBAAiB,CAAGE,CAAC,CAAC;IAEtB,IAAI,QAAC,CAACC,GAAG,0CAAEC,MAAM,IAAG,CAAC,EAAE;MACrB;;IAGF,IAAIR,GAAG,CAACS,OAAO,EAAE;MACfR,wBAAwB,aAAxBA,wBAAwB,uBAAxBA,wBAAwB,CAAGK,CAAC,EAAEN,GAAG,CAACS,OAAO,CAAC;;EAE9C,CAAC;EAED,OAAOV,KAAK;AACd,CAAC","names":["useMenuListContext_unstable","useCharacterSearch","state","ref","setFocusByFirstCharacter","context","onKeyDown","originalOnKeyDown","root","e","key","length","current"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/useCharacterSearch.ts"],"sourcesContent":["import * as React from 'react';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport type { MenuItemState } from '../../components/index';\nimport type { ARIAButtonElementIntersection } from '@fluentui/react-aria';\n\nexport const useCharacterSearch = (state: MenuItemState, ref: React.RefObject<HTMLElement>) => {\n const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);\n\n const { onKeyDown: originalOnKeyDown } = state.root;\n\n state.root.onKeyDown = (e: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n originalOnKeyDown?.(e);\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"]}
@@ -6,21 +6,19 @@ import { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContex
6
6
  import { ChevronRightFilled, ChevronRightRegular, ChevronLeftFilled, ChevronLeftRegular, bundleIcon } from '@fluentui/react-icons';
7
7
  import { useMenuListContext_unstable } from '../../contexts/menuListContext';
8
8
  import { useMenuContext_unstable } from '../../contexts/menuContext';
9
- import { useARIAButtonShorthand } from '@fluentui/react-aria';
9
+ import { useARIAButtonProps } from '@fluentui/react-aria';
10
10
  import { Enter, Space } from '@fluentui/keyboard-keys';
11
11
  const ChevronRightIcon = /*#__PURE__*/bundleIcon(ChevronRightFilled, ChevronRightRegular);
12
12
  const ChevronLeftIcon = /*#__PURE__*/bundleIcon(ChevronLeftFilled, ChevronLeftRegular);
13
13
  /**
14
14
  * Returns the props and state required to render the component
15
15
  */
16
-
17
16
  export const useMenuItem_unstable = (props, ref) => {
18
17
  const isSubmenuTrigger = useMenuTriggerContext_unstable();
19
18
  const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);
20
19
  const {
21
20
  as = 'div',
22
- disabled,
23
- disabledFocusable,
21
+ disabled = false,
24
22
  hasSubmenu = isSubmenuTrigger,
25
23
  persistOnClick = persistOnClickContext
26
24
  } = props;
@@ -32,10 +30,9 @@ export const useMenuItem_unstable = (props, ref) => {
32
30
  } = useFluent();
33
31
  const innerRef = React.useRef(null);
34
32
  const dismissedWithKeyboardRef = React.useRef(false);
35
- const isDisabled = Boolean(disabled || disabledFocusable);
36
33
  const state = {
37
34
  hasSubmenu,
38
- disabled: isDisabled,
35
+ disabled,
39
36
  persistOnClick,
40
37
  components: {
41
38
  root: 'div',
@@ -46,48 +43,38 @@ export const useMenuItem_unstable = (props, ref) => {
46
43
  secondaryContent: 'span'
47
44
  },
48
45
  isNativeButton: as === 'button',
49
- root: getNativeElementProps(as, useARIAButtonShorthand({
46
+ root: getNativeElementProps(as, useARIAButtonProps(as, {
47
+ role: 'menuitem',
48
+ ...props,
50
49
  disabled: false,
51
- disabledFocusable: isDisabled,
52
- as
53
- }, {
54
- required: true,
55
- defaultProps: {
56
- role: 'menuitem',
57
- ...props,
58
- ref: useMergedRefs(ref, innerRef),
59
- onKeyDown: useEventCallback(event => {
60
- var _a;
61
-
62
- (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
63
-
64
- if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {
65
- dismissedWithKeyboardRef.current = true;
66
- }
67
- }),
68
- onMouseEnter: useEventCallback(event => {
69
- var _a, _b;
70
-
71
- (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
72
- (_b = props.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(props, event);
73
- }),
74
- onClick: useEventCallback(event => {
75
- var _a;
76
-
77
- if (!hasSubmenu && !persistOnClick) {
78
- setOpen(event, {
79
- open: false,
80
- keyboard: dismissedWithKeyboardRef.current,
81
- bubble: true,
82
- type: 'menuItemClick',
83
- event
84
- });
85
- dismissedWithKeyboardRef.current = false;
86
- }
87
-
88
- (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
89
- })
90
- }
50
+ disabledFocusable: disabled,
51
+ ref: useMergedRefs(ref, innerRef),
52
+ onKeyDown: useEventCallback(event => {
53
+ var _a;
54
+ (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
55
+ if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {
56
+ dismissedWithKeyboardRef.current = true;
57
+ }
58
+ }),
59
+ onMouseEnter: useEventCallback(event => {
60
+ var _a, _b;
61
+ (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
62
+ (_b = props.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(props, event);
63
+ }),
64
+ onClick: useEventCallback(event => {
65
+ var _a;
66
+ if (!hasSubmenu && !persistOnClick) {
67
+ setOpen(event, {
68
+ open: false,
69
+ keyboard: dismissedWithKeyboardRef.current,
70
+ bubble: true,
71
+ type: 'menuItemClick',
72
+ event
73
+ });
74
+ dismissedWithKeyboardRef.current = false;
75
+ }
76
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
77
+ })
91
78
  })),
92
79
  icon: resolveShorthand(props.icon, {
93
80
  required: hasIcons