@fluentui/react-menu 9.5.2 → 9.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. package/CHANGELOG.json +111 -1
  2. package/CHANGELOG.md +31 -2
  3. package/lib/components/Menu/Menu.js +0 -1
  4. package/lib/components/Menu/Menu.js.map +1 -1
  5. package/lib/components/Menu/renderMenu.js +0 -1
  6. package/lib/components/Menu/renderMenu.js.map +1 -1
  7. package/lib/components/Menu/useMenu.js +16 -34
  8. package/lib/components/Menu/useMenu.js.map +1 -1
  9. package/lib/components/Menu/useMenuContextValues.js +2 -2
  10. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  11. package/lib/components/MenuDivider/MenuDivider.js +0 -1
  12. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  13. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  14. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  15. package/lib/components/MenuDivider/useMenuDivider.js +0 -1
  16. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  17. package/lib/components/MenuDivider/useMenuDividerStyles.js +10 -12
  18. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  19. package/lib/components/MenuGroup/MenuGroup.js +0 -1
  20. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  21. package/lib/components/MenuGroup/renderMenuGroup.js +2 -2
  22. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  23. package/lib/components/MenuGroup/useMenuGroup.js +0 -1
  24. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  25. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  26. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  27. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  28. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  29. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  30. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  31. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +0 -1
  32. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  33. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -12
  34. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  35. package/lib/components/MenuItem/MenuItem.js +0 -1
  36. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  37. package/lib/components/MenuItem/renderMenuItem.js +12 -7
  38. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  39. package/lib/components/MenuItem/useCharacterSearch.js +0 -5
  40. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  41. package/lib/components/MenuItem/useMenuItem.js +0 -6
  42. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  43. package/lib/components/MenuItem/useMenuItemStyles.js +108 -117
  44. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  45. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  46. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  47. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -6
  48. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  49. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -4
  50. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  51. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -5
  52. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  53. package/lib/components/MenuItemRadio/MenuItemRadio.js +0 -1
  54. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  55. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +10 -6
  56. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  57. package/lib/components/MenuItemRadio/useMenuItemRadio.js +3 -4
  58. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  59. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -5
  60. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  61. package/lib/components/MenuList/MenuList.js +0 -1
  62. package/lib/components/MenuList/MenuList.js.map +1 -1
  63. package/lib/components/MenuList/renderMenuList.js +2 -2
  64. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  65. package/lib/components/MenuList/useMenuList.js +10 -27
  66. package/lib/components/MenuList/useMenuList.js.map +1 -1
  67. package/lib/components/MenuList/useMenuListContextValues.js +2 -2
  68. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  69. package/lib/components/MenuList/useMenuListStyles.js +6 -9
  70. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  71. package/lib/components/MenuPopover/MenuPopover.js +0 -1
  72. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  73. package/lib/components/MenuPopover/renderMenuPopover.js +4 -5
  74. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  75. package/lib/components/MenuPopover/useMenuPopover.js +6 -13
  76. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  77. package/lib/components/MenuPopover/useMenuPopoverStyles.js +32 -35
  78. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  79. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +0 -1
  80. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  81. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
  82. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  83. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +0 -6
  84. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  85. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -15
  86. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  87. package/lib/components/MenuTrigger/MenuTrigger.js +2 -3
  88. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  89. package/lib/components/MenuTrigger/renderMenuTrigger.js +0 -1
  90. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  91. package/lib/components/MenuTrigger/useMenuTrigger.js +4 -24
  92. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  93. package/lib/contexts/menuContext.js.map +1 -1
  94. package/lib/contexts/menuGroupContext.js +0 -1
  95. package/lib/contexts/menuGroupContext.js.map +1 -1
  96. package/lib/contexts/menuListContext.js.map +1 -1
  97. package/lib/contexts/menuTriggerContext.js +0 -2
  98. package/lib/contexts/menuTriggerContext.js.map +1 -1
  99. package/lib/index.js.map +1 -1
  100. package/lib/selectable/useCheckmarkStyles.js +7 -11
  101. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  102. package/lib/utils/useIsSubmenu.js +0 -1
  103. package/lib/utils/useIsSubmenu.js.map +1 -1
  104. package/lib/utils/useOnMenuEnter.js +4 -11
  105. package/lib/utils/useOnMenuEnter.js.map +1 -1
  106. package/lib-commonjs/Menu.js +0 -2
  107. package/lib-commonjs/Menu.js.map +1 -1
  108. package/lib-commonjs/MenuDivider.js +0 -2
  109. package/lib-commonjs/MenuDivider.js.map +1 -1
  110. package/lib-commonjs/MenuGroup.js +0 -2
  111. package/lib-commonjs/MenuGroup.js.map +1 -1
  112. package/lib-commonjs/MenuGroupHeader.js +0 -2
  113. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  114. package/lib-commonjs/MenuItem.js +0 -2
  115. package/lib-commonjs/MenuItem.js.map +1 -1
  116. package/lib-commonjs/MenuItemCheckbox.js +0 -2
  117. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  118. package/lib-commonjs/MenuItemRadio.js +0 -2
  119. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  120. package/lib-commonjs/MenuList.js +0 -2
  121. package/lib-commonjs/MenuList.js.map +1 -1
  122. package/lib-commonjs/MenuPopover.js +0 -2
  123. package/lib-commonjs/MenuPopover.js.map +1 -1
  124. package/lib-commonjs/MenuSplitGroup.js +0 -2
  125. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  126. package/lib-commonjs/MenuTrigger.js +0 -2
  127. package/lib-commonjs/MenuTrigger.js.map +1 -1
  128. package/lib-commonjs/components/Menu/Menu.js +0 -6
  129. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  130. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  131. package/lib-commonjs/components/Menu/index.js +0 -6
  132. package/lib-commonjs/components/Menu/index.js.map +1 -1
  133. package/lib-commonjs/components/Menu/renderMenu.js +0 -5
  134. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  135. package/lib-commonjs/components/Menu/useMenu.js +16 -46
  136. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  137. package/lib-commonjs/components/Menu/useMenuContextValues.js +2 -4
  138. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  139. package/lib-commonjs/components/MenuDivider/MenuDivider.js +0 -6
  140. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  141. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  142. package/lib-commonjs/components/MenuDivider/index.js +0 -6
  143. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  144. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -6
  145. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  146. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +0 -4
  147. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  148. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +10 -16
  149. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  150. package/lib-commonjs/components/MenuGroup/MenuGroup.js +0 -7
  151. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  152. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  153. package/lib-commonjs/components/MenuGroup/index.js +0 -7
  154. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  155. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -7
  156. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  157. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +0 -4
  158. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  159. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +0 -3
  160. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  161. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +0 -4
  162. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  163. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +0 -6
  164. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  165. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  166. package/lib-commonjs/components/MenuGroupHeader/index.js +0 -6
  167. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  168. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -6
  169. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  170. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +0 -5
  171. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  172. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -16
  173. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  174. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -6
  175. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  176. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  177. package/lib-commonjs/components/MenuItem/index.js +0 -6
  178. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  179. package/lib-commonjs/components/MenuItem/renderMenuItem.js +12 -11
  180. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  181. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +0 -8
  182. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  183. package/lib-commonjs/components/MenuItem/useMenuItem.js +0 -18
  184. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  185. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +108 -124
  186. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  187. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -6
  188. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  189. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  190. package/lib-commonjs/components/MenuItemCheckbox/index.js +0 -6
  191. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  192. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -10
  193. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  194. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -11
  195. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  196. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -11
  197. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  198. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +0 -6
  199. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  200. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  201. package/lib-commonjs/components/MenuItemRadio/index.js +0 -6
  202. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  203. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +10 -10
  204. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  205. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +3 -11
  206. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  207. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -11
  208. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  209. package/lib-commonjs/components/MenuList/MenuList.js +0 -7
  210. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  211. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  212. package/lib-commonjs/components/MenuList/index.js +0 -7
  213. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  214. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -7
  215. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  216. package/lib-commonjs/components/MenuList/useMenuList.js +10 -35
  217. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  218. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +2 -4
  219. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  220. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -12
  221. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  222. package/lib-commonjs/components/MenuPopover/MenuPopover.js +0 -6
  223. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  224. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  225. package/lib-commonjs/components/MenuPopover/index.js +0 -6
  226. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  227. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -10
  228. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  229. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +6 -22
  230. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  231. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +32 -39
  232. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  233. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +0 -6
  234. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  235. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  236. package/lib-commonjs/components/MenuSplitGroup/index.js +0 -6
  237. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  238. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -6
  239. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  240. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +0 -13
  241. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  242. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -20
  243. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  244. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +2 -7
  245. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  246. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  247. package/lib-commonjs/components/MenuTrigger/index.js +0 -5
  248. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  249. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +0 -5
  250. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  251. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +4 -34
  252. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  253. package/lib-commonjs/components/index.js +0 -3
  254. package/lib-commonjs/components/index.js.map +1 -1
  255. package/lib-commonjs/contexts/menuContext.js +0 -4
  256. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  257. package/lib-commonjs/contexts/menuGroupContext.js +0 -5
  258. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  259. package/lib-commonjs/contexts/menuListContext.js +0 -4
  260. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  261. package/lib-commonjs/contexts/menuTriggerContext.js +0 -6
  262. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  263. package/lib-commonjs/index.js +0 -32
  264. package/lib-commonjs/index.js.map +1 -1
  265. package/lib-commonjs/selectable/index.js +0 -3
  266. package/lib-commonjs/selectable/index.js.map +1 -1
  267. package/lib-commonjs/selectable/types.js.map +1 -1
  268. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -13
  269. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  270. package/lib-commonjs/utils/index.js +0 -2
  271. package/lib-commonjs/utils/index.js.map +1 -1
  272. package/lib-commonjs/utils/useIsSubmenu.js +0 -6
  273. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  274. package/lib-commonjs/utils/useOnMenuEnter.js +4 -17
  275. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  276. package/package.json +12 -12
@@ -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"]}
@@ -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"]}
@@ -13,7 +13,6 @@ const ChevronLeftIcon = /*#__PURE__*/bundleIcon(ChevronLeftFilled, ChevronLeftRe
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);
@@ -58,22 +57,18 @@ export const useMenuItem_unstable = (props, ref) => {
58
57
  ref: useMergedRefs(ref, innerRef),
59
58
  onKeyDown: useEventCallback(event => {
60
59
  var _a;
61
-
62
60
  (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
63
-
64
61
  if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {
65
62
  dismissedWithKeyboardRef.current = true;
66
63
  }
67
64
  }),
68
65
  onMouseEnter: useEventCallback(event => {
69
66
  var _a, _b;
70
-
71
67
  (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
72
68
  (_b = props.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(props, event);
73
69
  }),
74
70
  onClick: useEventCallback(event => {
75
71
  var _a;
76
-
77
72
  if (!hasSubmenu && !persistOnClick) {
78
73
  setOpen(event, {
79
74
  open: false,
@@ -84,7 +79,6 @@ export const useMenuItem_unstable = (props, ref) => {
84
79
  });
85
80
  dismissedWithKeyboardRef.current = false;
86
81
  }
87
-
88
82
  (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
89
83
  })
90
84
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport { useEventCallback, resolveShorthand, useMergedRefs, getNativeElementProps } 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';\nimport type { ARIAButtonElement, ARIAButtonElementIntersection, ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\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<ARIAButtonElement<'div'>>): MenuItemState => {\n const isSubmenuTrigger = useMenuTriggerContext_unstable();\n const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);\n const {\n as = 'div',\n disabled,\n disabledFocusable,\n hasSubmenu = isSubmenuTrigger,\n persistOnClick = persistOnClickContext,\n } = props;\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\n const { dir } = useFluent();\n const innerRef = React.useRef<ARIAButtonElementIntersection<'div'>>(null);\n const dismissedWithKeyboardRef = React.useRef(false);\n\n const isDisabled = Boolean(disabled || disabledFocusable);\n\n const state: MenuItemState = {\n hasSubmenu,\n disabled: isDisabled,\n persistOnClick,\n components: {\n root: 'div',\n icon: 'span',\n checkmark: 'span',\n submenuIndicator: 'span',\n content: 'span',\n secondaryContent: 'span',\n },\n isNativeButton: as === 'button',\n root: getNativeElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'div'>>(\n { disabled: false, disabledFocusable: isDisabled, as },\n {\n required: true,\n defaultProps: {\n role: 'menuitem',\n ...props,\n ref: useMergedRefs(ref, innerRef) as React.Ref<ARIAButtonElementIntersection<'div'>>,\n onKeyDown: useEventCallback(event => {\n props.onKeyDown?.(event);\n if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {\n dismissedWithKeyboardRef.current = true;\n }\n }),\n onMouseEnter: useEventCallback(event => {\n innerRef.current?.focus();\n\n props.onMouseEnter?.(event);\n }),\n onClick: useEventCallback(event => {\n if (!hasSubmenu && !persistOnClick) {\n setOpen(event, {\n open: false,\n keyboard: dismissedWithKeyboardRef.current,\n bubble: true,\n type: 'menuItemClick',\n event,\n });\n dismissedWithKeyboardRef.current = false;\n }\n\n props.onClick?.(event);\n }),\n },\n },\n ),\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 useCharacterSearch(state, innerRef);\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"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","names":["React","useEventCallback","resolveShorthand","useMergedRefs","getNativeElementProps","useFluent_unstable","useFluent","useCharacterSearch","useMenuTriggerContext_unstable","ChevronRightFilled","ChevronRightRegular","ChevronLeftFilled","ChevronLeftRegular","bundleIcon","useMenuListContext_unstable","useMenuContext_unstable","useARIAButtonShorthand","Enter","Space","ChevronRightIcon","ChevronLeftIcon","useMenuItem_unstable","props","ref","isSubmenuTrigger","persistOnClickContext","context","persistOnItemClick","as","disabled","disabledFocusable","hasSubmenu","persistOnClick","hasIcons","hasCheckmarks","setOpen","dir","innerRef","useRef","dismissedWithKeyboardRef","isDisabled","Boolean","state","components","root","icon","checkmark","submenuIndicator","content","secondaryContent","isNativeButton","required","defaultProps","role","onKeyDown","event","isDefaultPrevented","key","current","onMouseEnter","focus","onClick","open","keyboard","bubble","type","children"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/useMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, resolveShorthand, useMergedRefs, getNativeElementProps } 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';\nimport type { ARIAButtonElement, ARIAButtonElementIntersection, ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\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<ARIAButtonElement<'div'>>): MenuItemState => {\n const isSubmenuTrigger = useMenuTriggerContext_unstable();\n const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);\n const {\n as = 'div',\n disabled,\n disabledFocusable,\n hasSubmenu = isSubmenuTrigger,\n persistOnClick = persistOnClickContext,\n } = props;\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\n const { dir } = useFluent();\n const innerRef = React.useRef<ARIAButtonElementIntersection<'div'>>(null);\n const dismissedWithKeyboardRef = React.useRef(false);\n\n const isDisabled = Boolean(disabled || disabledFocusable);\n\n const state: MenuItemState = {\n hasSubmenu,\n disabled: isDisabled,\n persistOnClick,\n components: {\n root: 'div',\n icon: 'span',\n checkmark: 'span',\n submenuIndicator: 'span',\n content: 'span',\n secondaryContent: 'span',\n },\n isNativeButton: as === 'button',\n root: getNativeElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'div'>>(\n { disabled: false, disabledFocusable: isDisabled, as },\n {\n required: true,\n defaultProps: {\n role: 'menuitem',\n ...props,\n ref: useMergedRefs(ref, innerRef) as React.Ref<ARIAButtonElementIntersection<'div'>>,\n onKeyDown: useEventCallback(event => {\n props.onKeyDown?.(event);\n if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {\n dismissedWithKeyboardRef.current = true;\n }\n }),\n onMouseEnter: useEventCallback(event => {\n innerRef.current?.focus();\n\n props.onMouseEnter?.(event);\n }),\n onClick: useEventCallback(event => {\n if (!hasSubmenu && !persistOnClick) {\n setOpen(event, {\n open: false,\n keyboard: dismissedWithKeyboardRef.current,\n bubble: true,\n type: 'menuItemClick',\n event,\n });\n dismissedWithKeyboardRef.current = false;\n }\n\n props.onClick?.(event);\n }),\n },\n },\n ),\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 useCharacterSearch(state, innerRef);\n return state;\n};\n"]}