@fluentui/react-menu 9.5.3 → 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 +72 -1
  2. package/CHANGELOG.md +18 -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 +10 -10
@@ -4,18 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderMenuGroup_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const menuGroupContext_1 = /*#__PURE__*/require("../../contexts/menuGroupContext");
13
10
  /**
14
11
  * Redefine the render function to add slots. Reuse the menugroup structure but add
15
12
  * slots to children.
16
13
  */
17
-
18
-
19
14
  const renderMenuGroup_unstable = (state, contextValues) => {
20
15
  const {
21
16
  slots,
@@ -23,9 +18,9 @@ const renderMenuGroup_unstable = (state, contextValues) => {
23
18
  } = react_utilities_1.getSlots(state);
24
19
  return React.createElement(menuGroupContext_1.MenuGroupContextProvider, {
25
20
  value: contextValues.menuGroup
26
- }, React.createElement(slots.root, { ...slotProps.root
21
+ }, React.createElement(slots.root, {
22
+ ...slotProps.root
27
23
  }));
28
24
  };
29
-
30
25
  exports.renderMenuGroup_unstable = renderMenuGroup_unstable;
31
26
  //# sourceMappingURL=renderMenuGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/renderMenuGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAEA;;;AAGG;;;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAAwB,aAAxB,KAAiE;EACvG,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,kBAAA,CAAA,wBAAD,EAAyB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAzB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupContextValues, MenuGroupSlots, MenuGroupState } from './MenuGroup.types';\nimport { MenuGroupContextProvider } from '../../contexts/menuGroupContext';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroup structure but add\n * slots to children.\n */\nexport const renderMenuGroup_unstable = (state: MenuGroupState, contextValues: MenuGroupContextValues) => {\n const { slots, slotProps } = getSlots<MenuGroupSlots>(state);\n\n return (\n <MenuGroupContextProvider value={contextValues.menuGroup}>\n <slots.root {...slotProps.root} />\n </MenuGroupContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAEA;;;;AAIO,MAAMA,wBAAwB,GAAG,CAACC,KAAqB,EAAEC,aAAqC,KAAI;EACvG,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAiBJ,KAAK,CAAC;EAE5D,OACEK,oBAACC,2CAAwB;IAACC,KAAK,EAAEN,aAAa,CAACO;EAAS,GACtDH,oBAACH,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CACT;AAE/B,CAAC;AARYC,gCAAwB","names":["renderMenuGroup_unstable","state","contextValues","slots","slotProps","react_utilities_1","React","menuGroupContext_1","value","menuGroup","root","exports"],"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"]}
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuGroup_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
8
  /**
10
9
  * Given user props, returns state and render function for a MenuGroup.
11
10
  */
12
-
13
-
14
11
  function useMenuGroup_unstable(props, ref) {
15
12
  const headerId = react_utilities_1.useId('menu-group');
16
13
  return {
@@ -26,6 +23,5 @@ function useMenuGroup_unstable(props, ref) {
26
23
  headerId
27
24
  };
28
25
  }
29
-
30
26
  exports.useMenuGroup_unstable = useMenuGroup_unstable;
31
27
  //# sourceMappingURL=useMenuGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,KAAtC,EAA6D,GAA7D,EAAwF;EACtF,MAAM,QAAQ,GAAG,iBAAA,CAAA,KAAA,CAAM,YAAN,CAAjB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,mBAAmB,QAFc;MAGjC,IAAI,EAAE,OAH2B;MAIjC,GAAG;IAJ8B,CAA7B,CAJD;IAUL;EAVK,CAAP;AAYD;;AAfD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId } from '@fluentui/react-utilities';\nimport { MenuGroupProps, MenuGroupState } from './MenuGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroup.\n */\nexport function useMenuGroup_unstable(props: MenuGroupProps, ref: React.Ref<HTMLElement>): MenuGroupState {\n const headerId = useId('menu-group');\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n 'aria-labelledby': headerId,\n role: 'group',\n ...props,\n }),\n headerId,\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAGA;;;AAGA,SAAgBA,qBAAqB,CAACC,KAAqB,EAAEC,GAA2B;EACtF,MAAMC,QAAQ,GAAGC,uBAAK,CAAC,YAAY,CAAC;EAEpC,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEF,uCAAqB,CAAC,KAAK,EAAE;MACjCF,GAAG;MACH,iBAAiB,EAAEC,QAAQ;MAC3BI,IAAI,EAAE,OAAO;MACb,GAAGN;KACJ,CAAC;IACFE;GACD;AACH;AAfAK","names":["useMenuGroup_unstable","props","ref","headerId","react_utilities_1","components","root","role","exports"],"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"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuGroupContextValues_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  function useMenuGroupContextValues_unstable(state) {
11
9
  const {
12
10
  headerId
@@ -18,6 +16,5 @@ function useMenuGroupContextValues_unstable(state) {
18
16
  menuGroup
19
17
  };
20
18
  }
21
-
22
19
  exports.useMenuGroupContextValues_unstable = useMenuGroupContextValues_unstable;
23
20
  //# sourceMappingURL=useMenuGroupContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,kCAAhB,CAAmD,KAAnD,EAAwE;EACtE,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;IAAE;EAAF,CAAP,CAAd,EAAoC,CAAC,QAAD,CAApC,CAAlB;EAEA,OAAO;IAAE;EAAF,CAAP;AACD;;AALD,OAAA,CAAA,kCAAA,GAAA,kCAAA","sourcesContent":["import * as React from 'react';\nimport type { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';\n\nexport function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues {\n const { headerId } = state;\n const menuGroup = React.useMemo(() => ({ headerId }), [headerId]);\n\n return { menuGroup };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAGA,SAAgBA,kCAAkC,CAACC,KAAqB;EACtE,MAAM;IAAEC;EAAQ,CAAE,GAAGD,KAAK;EAC1B,MAAME,SAAS,GAAGC,KAAK,CAACC,OAAO,CAAC,OAAO;IAAEH;EAAQ,CAAE,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEjE,OAAO;IAAEC;EAAS,CAAE;AACtB;AALAG","names":["useMenuGroupContextValues_unstable","state","headerId","menuGroup","React","useMemo","exports"],"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"]}
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuGroupStyles_unstable = exports.menuGroupClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  exports.menuGroupClassNames = {
11
9
  root: 'fui-MenuGroup'
12
10
  };
13
-
14
11
  const useMenuGroupStyles_unstable = state => {
15
12
  state.root.className = react_1.mergeClasses(exports.menuGroupClassNames.root, state.root.className);
16
13
  return state;
17
14
  };
18
-
19
15
  exports.useMenuGroupStyles_unstable = useMenuGroupStyles_unstable;
20
16
  //# sourceMappingURL=useMenuGroupStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,mBAAA,GAAsD;EACjE,IAAI,EAAE;AAD2D,CAAtD;;AAIN,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,mBAAA,CAAoB,IAAjC,EAAuC,KAAK,CAAC,IAAN,CAAW,SAAlD,CAAvB;EAEA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses } from '@griffel/react';\nimport type { MenuGroupSlots, MenuGroupState } from './MenuGroup.types';\n\nexport const menuGroupClassNames: SlotClassNames<MenuGroupSlots> = {\n root: 'fui-MenuGroup',\n};\n\nexport const useMenuGroupStyles_unstable = (state: MenuGroupState): MenuGroupState => {\n state.root.className = mergeClasses(menuGroupClassNames.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAGaA,2BAAmB,GAAmC;EACjEC,IAAI,EAAE;CACP;AAEM,MAAMC,2BAA2B,GAAIC,KAAqB,IAAoB;EACnFA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGC,oBAAY,CAACL,2BAAmB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAEnF,OAAOD,KAAK;AACd,CAAC;AAJYH,mCAA2B","names":["exports","root","useMenuGroupStyles_unstable","state","className","react_1"],"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"]}
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MenuGroupHeader = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useMenuGroupHeader_1 = /*#__PURE__*/require("./useMenuGroupHeader");
11
-
12
9
  const useMenuGroupHeaderStyles_1 = /*#__PURE__*/require("./useMenuGroupHeaderStyles");
13
-
14
10
  const renderMenuGroupHeader_1 = /*#__PURE__*/require("./renderMenuGroupHeader");
15
11
  /**
16
12
  * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
17
13
  */
18
-
19
-
20
14
  exports.MenuGroupHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useMenuGroupHeader_1.useMenuGroupHeader_unstable(props, ref);
22
16
  useMenuGroupHeaderStyles_1.useMenuGroupHeaderStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;EACA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;EAEA,OAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport type { MenuGroupHeaderProps } from './MenuGroupHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.\n */\nexport const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroupHeader_unstable(props, ref);\n useMenuGroupHeaderStyles_unstable(state);\n\n return renderMenuGroupHeader_unstable(state);\n});\n\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,uBAAe,gBAA8CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxG,MAAMC,KAAK,GAAGC,gDAA2B,CAACH,KAAK,EAAEC,GAAG,CAAC;EACrDG,4DAAiC,CAACF,KAAK,CAAC;EAExC,OAAOG,sDAA8B,CAACH,KAAK,CAAC;AAC9C,CAAC,CAAC;AAEFL,uBAAe,CAACS,WAAW,GAAG,iBAAiB","names":["exports","React","forwardRef","props","ref","state","useMenuGroupHeader_1","useMenuGroupHeaderStyles_1","renderMenuGroupHeader_1","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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,16 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./MenuGroupHeader.types"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderMenuGroupHeader"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useMenuGroupHeader"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useMenuGroupHeaderStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/index.ts"],"sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles';\n"]}
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderMenuGroupHeader_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Redefine the render function to add slots. Reuse the menugroupheader structure but add
13
11
  * slots to children.
14
12
  */
15
-
16
-
17
13
  const renderMenuGroupHeader_unstable = state => {
18
14
  const {
19
15
  slots,
20
16
  slotProps
21
17
  } = react_utilities_1.getSlots(state);
22
- return React.createElement(slots.root, { ...slotProps.root
18
+ return React.createElement(slots.root, {
19
+ ...slotProps.root
23
20
  });
24
21
  };
25
-
26
22
  exports.renderMenuGroupHeader_unstable = renderMenuGroupHeader_unstable;
27
23
  //# sourceMappingURL=renderMenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA+B,KAA/B,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroupheader structure but add\n * slots to children.\n */\nexport const renderMenuGroupHeader_unstable = (state: MenuGroupHeaderState) => {\n const { slots, slotProps } = getSlots<MenuGroupHeaderSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;;AAIO,MAAMA,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAuBH,KAAK,CAAC;EAElE,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,sCAA8B","names":["renderMenuGroupHeader_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"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"]}
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuGroupHeader_unstable = void 0;
7
-
8
7
  const menuGroupContext_1 = /*#__PURE__*/require("../../contexts/menuGroupContext");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Given user props, returns state and render function for a MenuGroupHeader.
13
11
  */
14
-
15
-
16
12
  function useMenuGroupHeader_unstable(props, ref) {
17
13
  const {
18
14
  headerId: id
@@ -28,6 +24,5 @@ function useMenuGroupHeader_unstable(props, ref) {
28
24
  })
29
25
  };
30
26
  }
31
-
32
27
  exports.useMenuGroupHeader_unstable = useMenuGroupHeader_unstable;
33
28
  //# sourceMappingURL=useMenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,2BAAhB,CACE,KADF,EAEE,GAFF,EAE6B;EAE3B,MAAM;IAAE,QAAQ,EAAE;EAAZ,IAAmB,kBAAA,CAAA,4BAAA,EAAzB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,EAFiC;MAGjC,GAAG;IAH8B,CAA7B;EAJD,CAAP;AAUD;;AAhBD,OAAA,CAAA,2BAAA,GAAA,2BAAA","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderProps, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroupHeader.\n */\nexport function useMenuGroupHeader_unstable(\n props: MenuGroupHeaderProps,\n ref: React.Ref<HTMLElement>,\n): MenuGroupHeaderState {\n const { headerId: id } = useMenuGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n id,\n ...props,\n }),\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AAGA;;;AAGA,SAAgBA,2BAA2B,CACzCC,KAA2B,EAC3BC,GAA2B;EAE3B,MAAM;IAAEC,QAAQ,EAAEC;EAAE,CAAE,GAAGC,+CAA4B,EAAE;EAEvD,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEC,uCAAqB,CAAC,KAAK,EAAE;MACjCN,GAAG;MACHE,EAAE;MACF,GAAGH;KACJ;GACF;AACH;AAhBAQ","names":["useMenuGroupHeader_unstable","props","ref","headerId","id","menuGroupContext_1","components","root","react_utilities_1","exports"],"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"]}
@@ -4,35 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuGroupHeaderStyles_unstable = exports.menuGroupHeaderClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
-
12
9
  exports.menuGroupHeaderClassNames = {
13
10
  root: 'fui-MenuGroupHeader'
14
11
  };
15
-
16
12
  const useStyles = /*#__PURE__*/react_1.__styles({
17
- "root": {
18
- "Be2twd7": "fy9rknc",
19
- "sj55zd": "f11d4kpn",
20
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
21
- "z189sj": ["f11qrl6u", "fjlbh76"],
22
- "Bhrd7zp": "fl43uef",
23
- "Bqenvij": "f1d2rq10",
24
- "mc9l5x": "f22iagw",
25
- "Bt984gj": "f122n59"
13
+ root: {
14
+ Be2twd7: "fy9rknc",
15
+ sj55zd: "f11d4kpn",
16
+ uwmqm3: ["fjlbh76", "f11qrl6u"],
17
+ z189sj: ["f11qrl6u", "fjlbh76"],
18
+ Bhrd7zp: "fl43uef",
19
+ Bqenvij: "f1d2rq10",
20
+ mc9l5x: "f22iagw",
21
+ Bt984gj: "f122n59"
26
22
  }
27
23
  }, {
28
- "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;}"]
24
+ 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;}"]
29
25
  });
30
-
31
26
  const useMenuGroupHeaderStyles_unstable = state => {
32
27
  const styles = useStyles();
33
28
  state.root.className = react_1.mergeClasses(exports.menuGroupHeaderClassNames.root, styles.root, state.root.className);
34
29
  return state;
35
30
  };
36
-
37
31
  exports.useMenuGroupHeaderStyles_unstable = useMenuGroupHeaderStyles_unstable;
38
32
  //# sourceMappingURL=useMenuGroupHeaderStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE;AADuE,CAAlE;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAaO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;EAC/E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,IAAvC,EAA6C,MAAM,CAAC,IAApD,EAA0D,KAAK,CAAC,IAAN,CAAW,SAArE,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuGroupHeaderClassNames: SlotClassNames<MenuGroupHeaderSlots> = {\n root: 'fui-MenuGroupHeader',\n};\n\nconst useStyles = makeStyles({\n root: {\n fontSize: tokens.fontSizeBase200,\n color: tokens.colorNeutralForeground3,\n paddingLeft: '12px',\n paddingRight: '12px',\n fontWeight: tokens.fontWeightSemibold,\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nexport const useMenuGroupHeaderStyles_unstable = (state: MenuGroupHeaderState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuGroupHeaderClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAIaA,iCAAyB,GAAyC;EAC7EC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAW1B;AAEK,MAAMC,iCAAiC,GAAIC,KAA2B,IAAI;EAC/E,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CAACH,iCAAyB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAEtG,OAAOF,KAAK;AACd,CAAC;AALYL,yCAAiC","names":["exports","root","useStyles","react_1","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"]}
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MenuItem = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useMenuItem_1 = /*#__PURE__*/require("./useMenuItem");
11
-
12
9
  const renderMenuItem_1 = /*#__PURE__*/require("./renderMenuItem");
13
-
14
10
  const useMenuItemStyles_1 = /*#__PURE__*/require("./useMenuItemStyles");
15
11
  /**
16
12
  * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
17
13
  */
18
-
19
-
20
14
  exports.MenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useMenuItem_1.useMenuItem_unstable(props, ref);
22
16
  useMenuItemStyles_1.useMenuItemStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,QAAA,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,GAA5B,CAAd;EAEA,mBAAA,CAAA,0BAAA,CAA2B,KAA3B;EACA,OAAO,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAP;AACD,CAL2D,CAA/C;AAOb,OAAA,CAAA,QAAA,CAAS,WAAT,GAAuB,UAAvB","sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles';\nimport type { MenuItemProps } from './MenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.\n */\nexport const MenuItem: ForwardRefComponent<MenuItemProps> = React.forwardRef((props, ref) => {\n const state = useMenuItem_unstable(props, ref);\n\n useMenuItemStyles_unstable(state);\n return renderMenuItem_unstable(state);\n});\n\nMenuItem.displayName = 'MenuItem';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,gBAAQ,gBAAuCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGC,kCAAoB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE9CG,8CAA0B,CAACF,KAAK,CAAC;EACjC,OAAOG,wCAAuB,CAACH,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFL,gBAAQ,CAACS,WAAW,GAAG,UAAU","names":["exports","React","forwardRef","props","ref","state","useMenuItem_1","useMenuItemStyles_1","renderMenuItem_1","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,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,16 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./MenuItem"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./MenuItem.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderMenuItem"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useMenuItem"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useMenuItemStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuItem';\nexport * from './MenuItem.types';\nexport * from './renderMenuItem';\nexport * from './useMenuItem';\nexport * from './useMenuItemStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuItem/index.ts"],"sourcesContent":["export * from './MenuItem';\nexport * from './MenuItem.types';\nexport * from './renderMenuItem';\nexport * from './useMenuItem';\nexport * from './useMenuItemStyles';\n"]}
@@ -4,28 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderMenuItem_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Function that renders the final JSX of the component
13
11
  */
14
-
15
-
16
12
  const renderMenuItem_unstable = state => {
17
13
  const {
18
14
  slots,
19
15
  slotProps
20
16
  } = react_utilities_1.getSlots(state);
21
- return React.createElement(slots.root, { ...slotProps.root
22
- }, slots.checkmark && React.createElement(slots.checkmark, { ...slotProps.checkmark
23
- }), slots.icon && React.createElement(slots.icon, { ...slotProps.icon
24
- }), slots.content && React.createElement(slots.content, { ...slotProps.content
25
- }), slots.secondaryContent && React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
26
- }), slots.submenuIndicator && React.createElement(slots.submenuIndicator, { ...slotProps.submenuIndicator
17
+ return React.createElement(slots.root, {
18
+ ...slotProps.root
19
+ }, slots.checkmark && React.createElement(slots.checkmark, {
20
+ ...slotProps.checkmark
21
+ }), slots.icon && React.createElement(slots.icon, {
22
+ ...slotProps.icon
23
+ }), slots.content && React.createElement(slots.content, {
24
+ ...slotProps.content
25
+ }), slots.secondaryContent && React.createElement(slots.secondaryContent, {
26
+ ...slotProps.secondaryContent
27
+ }), slots.submenuIndicator && React.createElement(slots.submenuIndicator, {
28
+ ...slotProps.submenuIndicator
27
29
  }));
28
30
  };
29
-
30
31
  exports.renderMenuItem_unstable = renderMenuItem_unstable;
31
32
  //# sourceMappingURL=renderMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAyB;EAC9D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,SAAN,IAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,IAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,CAJ7B,EAKG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,CAL7B,CADF;AASD,CAZM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuItem_unstable = (state: MenuItemState) => {\n const { slots, slotProps } = getSlots<MenuItemSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.checkmark && <slots.checkmark {...slotProps.checkmark} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.content && <slots.content {...slotProps.content} />}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n {slots.submenuIndicator && <slots.submenuIndicator {...slotProps.submenuIndicator} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,uBAAuB,GAAIC,KAAoB,IAAI;EAC9D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAgBH,KAAK,CAAC;EAE3D,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BJ,KAAK,CAACK,SAAS,IAAIF,oBAACH,KAAK,CAACK,SAAS;IAAA,GAAKJ,SAAS,CAACI;EAAS,EAAI,EAC/DL,KAAK,CAACM,IAAI,IAAIH,oBAACH,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,EAChDN,KAAK,CAACO,OAAO,IAAIJ,oBAACH,KAAK,CAACO,OAAO;IAAA,GAAKN,SAAS,CAACM;EAAO,EAAI,EACzDP,KAAK,CAACQ,gBAAgB,IAAIL,oBAACH,KAAK,CAACQ,gBAAgB;IAAA,GAAKP,SAAS,CAACO;EAAgB,EAAI,EACpFR,KAAK,CAACS,gBAAgB,IAAIN,oBAACH,KAAK,CAACS,gBAAgB;IAAA,GAAKR,SAAS,CAACQ;EAAgB,EAAI,CAC1E;AAEjB,CAAC;AAZYC,+BAAuB","names":["renderMenuItem_unstable","state","slots","slotProps","react_utilities_1","React","root","checkmark","icon","content","secondaryContent","submenuIndicator","exports"],"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,31 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useCharacterSearch = void 0;
7
-
8
7
  const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
9
-
10
8
  const useCharacterSearch = (state, ref) => {
11
9
  const setFocusByFirstCharacter = menuListContext_1.useMenuListContext_unstable(context => context.setFocusByFirstCharacter);
12
10
  const {
13
11
  onKeyDown: originalOnKeyDown
14
12
  } = state.root;
15
-
16
13
  state.root.onKeyDown = e => {
17
14
  var _a;
18
-
19
15
  originalOnKeyDown === null || originalOnKeyDown === void 0 ? void 0 : originalOnKeyDown(e);
20
-
21
16
  if (((_a = e.key) === null || _a === void 0 ? void 0 : _a.length) > 1) {
22
17
  return;
23
18
  }
24
-
25
19
  if (ref.current) {
26
20
  setFocusByFirstCharacter === null || setFocusByFirstCharacter === void 0 ? void 0 : setFocusByFirstCharacter(e, ref.current);
27
21
  }
28
22
  };
29
-
30
23
  return state;
31
24
  };
32
-
33
25
  exports.useCharacterSearch = useCharacterSearch;
34
26
  //# sourceMappingURL=useCharacterSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;;AAIO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;EAC5F,MAAM,wBAAwB,GAAG,iBAAA,CAAA,2BAAA,CAA4B,OAAO,IAAI,OAAO,CAAC,wBAA/C,CAAjC;EAEA,MAAM;IAAE,SAAS,EAAE;EAAb,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;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","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;AAIO,MAAMA,kBAAkB,GAAG,CAACC,KAAoB,EAAEC,GAAiC,KAAI;EAC5F,MAAMC,wBAAwB,GAAGC,6CAA2B,CAACC,OAAO,IAAIA,OAAO,CAACF,wBAAwB,CAAC;EAEzG,MAAM;IAAEG,SAAS,EAAEC;EAAiB,CAAE,GAAGN,KAAK,CAACO,IAAI;EAEnDP,KAAK,CAACO,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,IAAIT,GAAG,CAACU,OAAO,EAAE;MACfT,wBAAwB,aAAxBA,wBAAwB,uBAAxBA,wBAAwB,CAAGM,CAAC,EAAEP,GAAG,CAACU,OAAO,CAAC;;EAE9C,CAAC;EAED,OAAOX,KAAK;AACd,CAAC;AAlBYY,0BAAkB","names":["useCharacterSearch","state","ref","setFocusByFirstCharacter","menuListContext_1","context","onKeyDown","originalOnKeyDown","root","e","key","length","current","exports"],"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"]}
@@ -4,33 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuItem_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
-
14
10
  const useCharacterSearch_1 = /*#__PURE__*/require("./useCharacterSearch");
15
-
16
11
  const menuTriggerContext_1 = /*#__PURE__*/require("../../contexts/menuTriggerContext");
17
-
18
12
  const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
19
-
20
13
  const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
21
-
22
14
  const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
23
-
24
15
  const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
25
-
26
16
  const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
27
-
28
17
  const ChevronRightIcon = /*#__PURE__*/react_icons_1.bundleIcon(react_icons_1.ChevronRightFilled, react_icons_1.ChevronRightRegular);
29
18
  const ChevronLeftIcon = /*#__PURE__*/react_icons_1.bundleIcon(react_icons_1.ChevronLeftFilled, react_icons_1.ChevronLeftRegular);
30
19
  /**
31
20
  * Returns the props and state required to render the component
32
21
  */
33
-
34
22
  const useMenuItem_unstable = (props, ref) => {
35
23
  const isSubmenuTrigger = menuTriggerContext_1.useMenuTriggerContext_unstable();
36
24
  const persistOnClickContext = menuContext_1.useMenuContext_unstable(context => context.persistOnItemClick);
@@ -75,22 +63,18 @@ const useMenuItem_unstable = (props, ref) => {
75
63
  ref: react_utilities_1.useMergedRefs(ref, innerRef),
76
64
  onKeyDown: react_utilities_1.useEventCallback(event => {
77
65
  var _a;
78
-
79
66
  (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
80
-
81
67
  if (!event.isDefaultPrevented() && (event.key === keyboard_keys_1.Space || event.key === keyboard_keys_1.Enter)) {
82
68
  dismissedWithKeyboardRef.current = true;
83
69
  }
84
70
  }),
85
71
  onMouseEnter: react_utilities_1.useEventCallback(event => {
86
72
  var _a, _b;
87
-
88
73
  (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
89
74
  (_b = props.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(props, event);
90
75
  }),
91
76
  onClick: react_utilities_1.useEventCallback(event => {
92
77
  var _a;
93
-
94
78
  if (!hasSubmenu && !persistOnClick) {
95
79
  setOpen(event, {
96
80
  open: false,
@@ -101,7 +85,6 @@ const useMenuItem_unstable = (props, ref) => {
101
85
  });
102
86
  dismissedWithKeyboardRef.current = false;
103
87
  }
104
-
105
88
  (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
106
89
  })
107
90
  }
@@ -129,6 +112,5 @@ const useMenuItem_unstable = (props, ref) => {
129
112
  useCharacterSearch_1.useCharacterSearch(state, innerRef);
130
113
  return state;
131
114
  };
132
-
133
115
  exports.useMenuItem_unstable = useMenuItem_unstable;
134
116
  //# sourceMappingURL=useMenuItem.js.map