@fluentui/react-menu 9.5.3 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. package/CHANGELOG.json +139 -1
  2. package/CHANGELOG.md +37 -2
  3. package/dist/index.d.ts +9 -19
  4. package/lib/components/Menu/Menu.js +0 -1
  5. package/lib/components/Menu/Menu.js.map +1 -1
  6. package/lib/components/Menu/renderMenu.js +0 -1
  7. package/lib/components/Menu/renderMenu.js.map +1 -1
  8. package/lib/components/Menu/useMenu.js +16 -34
  9. package/lib/components/Menu/useMenu.js.map +1 -1
  10. package/lib/components/Menu/useMenuContextValues.js +2 -2
  11. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  12. package/lib/components/MenuDivider/MenuDivider.js +0 -1
  13. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  14. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  15. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  16. package/lib/components/MenuDivider/useMenuDivider.js +0 -1
  17. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  18. package/lib/components/MenuDivider/useMenuDividerStyles.js +10 -12
  19. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  20. package/lib/components/MenuGroup/MenuGroup.js +0 -1
  21. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  22. package/lib/components/MenuGroup/renderMenuGroup.js +2 -2
  23. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  24. package/lib/components/MenuGroup/useMenuGroup.js +0 -1
  25. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  26. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  27. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  28. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  29. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  30. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  31. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  32. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +0 -1
  33. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  34. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -12
  35. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  36. package/lib/components/MenuItem/MenuItem.js +0 -1
  37. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  38. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  39. package/lib/components/MenuItem/renderMenuItem.js +12 -7
  40. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  41. package/lib/components/MenuItem/useCharacterSearch.js +0 -5
  42. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  43. package/lib/components/MenuItem/useMenuItem.js +34 -47
  44. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  45. package/lib/components/MenuItem/useMenuItemStyles.js +108 -117
  46. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  47. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  48. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  49. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -6
  50. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  51. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -4
  52. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  53. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -5
  54. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  55. package/lib/components/MenuItemRadio/MenuItemRadio.js +0 -1
  56. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  57. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +10 -6
  58. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  59. package/lib/components/MenuItemRadio/useMenuItemRadio.js +3 -4
  60. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  61. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -5
  62. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  63. package/lib/components/MenuList/MenuList.js +0 -1
  64. package/lib/components/MenuList/MenuList.js.map +1 -1
  65. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  66. package/lib/components/MenuList/renderMenuList.js +2 -2
  67. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  68. package/lib/components/MenuList/useMenuList.js +13 -29
  69. package/lib/components/MenuList/useMenuList.js.map +1 -1
  70. package/lib/components/MenuList/useMenuListContextValues.js +2 -2
  71. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  72. package/lib/components/MenuList/useMenuListStyles.js +6 -9
  73. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  74. package/lib/components/MenuPopover/MenuPopover.js +0 -1
  75. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  76. package/lib/components/MenuPopover/renderMenuPopover.js +4 -5
  77. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  78. package/lib/components/MenuPopover/useMenuPopover.js +6 -13
  79. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  80. package/lib/components/MenuPopover/useMenuPopoverStyles.js +32 -35
  81. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  82. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +0 -1
  83. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  84. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
  85. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  86. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +0 -6
  87. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  88. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -15
  89. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  90. package/lib/components/MenuTrigger/MenuTrigger.js +2 -3
  91. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  92. package/lib/components/MenuTrigger/renderMenuTrigger.js +0 -1
  93. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  94. package/lib/components/MenuTrigger/useMenuTrigger.js +4 -24
  95. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  96. package/lib/contexts/menuContext.js.map +1 -1
  97. package/lib/contexts/menuGroupContext.js +0 -1
  98. package/lib/contexts/menuGroupContext.js.map +1 -1
  99. package/lib/contexts/menuListContext.js.map +1 -1
  100. package/lib/contexts/menuTriggerContext.js +0 -2
  101. package/lib/contexts/menuTriggerContext.js.map +1 -1
  102. package/lib/index.js.map +1 -1
  103. package/lib/selectable/useCheckmarkStyles.js +7 -11
  104. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  105. package/lib/utils/useIsSubmenu.js +0 -1
  106. package/lib/utils/useIsSubmenu.js.map +1 -1
  107. package/lib/utils/useOnMenuEnter.js +4 -11
  108. package/lib/utils/useOnMenuEnter.js.map +1 -1
  109. package/lib-amd/components/MenuItem/MenuItem.types.js.map +1 -1
  110. package/lib-amd/components/MenuItem/useMenuItem.js +26 -30
  111. package/lib-amd/components/MenuItem/useMenuItem.js.map +1 -1
  112. package/lib-amd/components/MenuList/MenuList.types.js.map +1 -1
  113. package/lib-amd/components/MenuList/useMenuList.js +5 -4
  114. package/lib-amd/components/MenuList/useMenuList.js.map +1 -1
  115. package/lib-commonjs/Menu.js +0 -2
  116. package/lib-commonjs/Menu.js.map +1 -1
  117. package/lib-commonjs/MenuDivider.js +0 -2
  118. package/lib-commonjs/MenuDivider.js.map +1 -1
  119. package/lib-commonjs/MenuGroup.js +0 -2
  120. package/lib-commonjs/MenuGroup.js.map +1 -1
  121. package/lib-commonjs/MenuGroupHeader.js +0 -2
  122. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  123. package/lib-commonjs/MenuItem.js +0 -2
  124. package/lib-commonjs/MenuItem.js.map +1 -1
  125. package/lib-commonjs/MenuItemCheckbox.js +0 -2
  126. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  127. package/lib-commonjs/MenuItemRadio.js +0 -2
  128. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  129. package/lib-commonjs/MenuList.js +0 -2
  130. package/lib-commonjs/MenuList.js.map +1 -1
  131. package/lib-commonjs/MenuPopover.js +0 -2
  132. package/lib-commonjs/MenuPopover.js.map +1 -1
  133. package/lib-commonjs/MenuSplitGroup.js +0 -2
  134. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  135. package/lib-commonjs/MenuTrigger.js +0 -2
  136. package/lib-commonjs/MenuTrigger.js.map +1 -1
  137. package/lib-commonjs/components/Menu/Menu.js +0 -6
  138. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  139. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  140. package/lib-commonjs/components/Menu/index.js +0 -6
  141. package/lib-commonjs/components/Menu/index.js.map +1 -1
  142. package/lib-commonjs/components/Menu/renderMenu.js +0 -5
  143. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  144. package/lib-commonjs/components/Menu/useMenu.js +16 -46
  145. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  146. package/lib-commonjs/components/Menu/useMenuContextValues.js +2 -4
  147. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  148. package/lib-commonjs/components/MenuDivider/MenuDivider.js +0 -6
  149. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  150. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  151. package/lib-commonjs/components/MenuDivider/index.js +0 -6
  152. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  153. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -6
  154. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  155. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +0 -4
  156. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  157. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +10 -16
  158. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  159. package/lib-commonjs/components/MenuGroup/MenuGroup.js +0 -7
  160. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  161. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  162. package/lib-commonjs/components/MenuGroup/index.js +0 -7
  163. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  164. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -7
  165. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  166. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +0 -4
  167. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  168. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +0 -3
  169. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  170. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +0 -4
  171. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  172. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +0 -6
  173. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  174. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroupHeader/index.js +0 -6
  176. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -6
  178. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +0 -5
  180. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +10 -16
  182. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  183. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -6
  184. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  185. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  186. package/lib-commonjs/components/MenuItem/index.js +0 -6
  187. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  188. package/lib-commonjs/components/MenuItem/renderMenuItem.js +12 -11
  189. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  190. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +0 -8
  191. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  192. package/lib-commonjs/components/MenuItem/useMenuItem.js +33 -58
  193. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  194. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +108 -124
  195. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  196. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -6
  197. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  198. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  199. package/lib-commonjs/components/MenuItemCheckbox/index.js +0 -6
  200. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  201. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -10
  202. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  203. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +2 -11
  204. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  205. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -11
  206. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  207. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +0 -6
  208. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  209. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  210. package/lib-commonjs/components/MenuItemRadio/index.js +0 -6
  211. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  212. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +10 -10
  213. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  214. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +3 -11
  215. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  216. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -11
  217. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  218. package/lib-commonjs/components/MenuList/MenuList.js +0 -7
  219. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  220. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  221. package/lib-commonjs/components/MenuList/index.js +0 -7
  222. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  223. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -7
  224. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  225. package/lib-commonjs/components/MenuList/useMenuList.js +13 -37
  226. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  227. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +2 -4
  228. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  229. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -12
  230. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  231. package/lib-commonjs/components/MenuPopover/MenuPopover.js +0 -6
  232. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  233. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  234. package/lib-commonjs/components/MenuPopover/index.js +0 -6
  235. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  236. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -10
  237. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  238. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +6 -22
  239. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  240. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +32 -39
  241. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  242. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +0 -6
  243. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  244. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  245. package/lib-commonjs/components/MenuSplitGroup/index.js +0 -6
  246. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  247. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -6
  248. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  249. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +0 -13
  250. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  251. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +12 -20
  252. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  253. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +2 -7
  254. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  255. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  256. package/lib-commonjs/components/MenuTrigger/index.js +0 -5
  257. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  258. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +0 -5
  259. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  260. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +4 -34
  261. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  262. package/lib-commonjs/components/index.js +0 -3
  263. package/lib-commonjs/components/index.js.map +1 -1
  264. package/lib-commonjs/contexts/menuContext.js +0 -4
  265. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  266. package/lib-commonjs/contexts/menuGroupContext.js +0 -5
  267. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  268. package/lib-commonjs/contexts/menuListContext.js +0 -4
  269. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  270. package/lib-commonjs/contexts/menuTriggerContext.js +0 -6
  271. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  272. package/lib-commonjs/index.js +0 -32
  273. package/lib-commonjs/index.js.map +1 -1
  274. package/lib-commonjs/selectable/index.js +0 -3
  275. package/lib-commonjs/selectable/index.js.map +1 -1
  276. package/lib-commonjs/selectable/types.js.map +1 -1
  277. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -13
  278. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  279. package/lib-commonjs/utils/index.js +0 -2
  280. package/lib-commonjs/utils/index.js.map +1 -1
  281. package/lib-commonjs/utils/useIsSubmenu.js +0 -6
  282. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  283. package/lib-commonjs/utils/useOnMenuEnter.js +4 -17
  284. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  285. package/package.json +10 -10
@@ -4,61 +4,54 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuPopoverStyles_unstable = exports.menuPopoverClassNames = 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.menuPopoverClassNames = {
13
10
  root: 'fui-MenuPopover'
14
11
  };
15
-
16
12
  const useStyles = /*#__PURE__*/react_1.__styles({
17
- "root": {
18
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
19
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
20
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
21
- "Btl43ni": ["fyu767a", "f1jar5jt"],
22
- "De3pzq": "fxugw4r",
23
- "sj55zd": "f19n0e5",
24
- "Bf4jedk": "fkqu4gx",
25
- "B2u0y6b": "f1kaai3v",
26
- "a9b677": "f1ahpp82",
27
- "E5pizo": "f1hg901r",
28
- "z8tnut": "f10ra9hq",
29
- "z189sj": ["f8wuabp", "fycuoez"],
30
- "Byoj8tv": "f1y2xyjm",
31
- "uwmqm3": ["fycuoez", "f8wuabp"],
32
- "B4j52fo": "f5ogflp",
33
- "Bekrc4i": ["f1hqa2wf", "finvdd3"],
34
- "Bn0qgzm": "f1f09k3d",
35
- "ibv6hh": ["finvdd3", "f1hqa2wf"],
36
- "icvyot": "fzkkow9",
37
- "vrafjx": ["fcdblym", "fjik90z"],
38
- "oivjwe": "fg706s2",
39
- "wvpqe5": ["fjik90z", "fcdblym"],
40
- "g2u3we": "fghlq4f",
41
- "h3c5rm": ["f1gn591s", "fjscplz"],
42
- "B9xav0g": "fb073pr",
43
- "zhjwy3": ["fjscplz", "f1gn591s"],
44
- "Bahqtrf": "fk6fouc",
45
- "Be2twd7": "fkhj508",
46
- "Bhrd7zp": "figsok6",
47
- "Bg96gwp": "f1i3iumi"
13
+ root: {
14
+ Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
15
+ Beyfa6y: ["f16jpd5f", "f1aa9q02"],
16
+ B7oj6ja: ["f1jar5jt", "fyu767a"],
17
+ Btl43ni: ["fyu767a", "f1jar5jt"],
18
+ De3pzq: "fxugw4r",
19
+ sj55zd: "f19n0e5",
20
+ Bf4jedk: "fkqu4gx",
21
+ B2u0y6b: "f1kaai3v",
22
+ a9b677: "f1ahpp82",
23
+ E5pizo: "f1hg901r",
24
+ z8tnut: "f10ra9hq",
25
+ z189sj: ["f8wuabp", "fycuoez"],
26
+ Byoj8tv: "f1y2xyjm",
27
+ uwmqm3: ["fycuoez", "f8wuabp"],
28
+ B4j52fo: "f5ogflp",
29
+ Bekrc4i: ["f1hqa2wf", "finvdd3"],
30
+ Bn0qgzm: "f1f09k3d",
31
+ ibv6hh: ["finvdd3", "f1hqa2wf"],
32
+ icvyot: "fzkkow9",
33
+ vrafjx: ["fcdblym", "fjik90z"],
34
+ oivjwe: "fg706s2",
35
+ wvpqe5: ["fjik90z", "fcdblym"],
36
+ g2u3we: "fghlq4f",
37
+ h3c5rm: ["f1gn591s", "fjscplz"],
38
+ B9xav0g: "fb073pr",
39
+ zhjwy3: ["fjscplz", "f1gn591s"],
40
+ Bahqtrf: "fk6fouc",
41
+ Be2twd7: "fkhj508",
42
+ Bhrd7zp: "figsok6",
43
+ Bg96gwp: "f1i3iumi"
48
44
  }
49
45
  }, {
50
- "d": [".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fkqu4gx{min-width:128px;}", ".f1kaai3v{max-width:300px;}", ".f1ahpp82{width:-webkit-max-content;width:-moz-max-content;width:max-content;}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
46
+ d: [".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fkqu4gx{min-width:128px;}", ".f1kaai3v{max-width:300px;}", ".f1ahpp82{width:-webkit-max-content;width:-moz-max-content;width:max-content;}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
51
47
  });
52
48
  /**
53
49
  * Apply styling to the Menu slots based on the state
54
50
  */
55
-
56
-
57
51
  const useMenuPopoverStyles_unstable = state => {
58
52
  const styles = useStyles();
59
53
  state.root.className = react_1.mergeClasses(exports.menuPopoverClassNames.root, styles.root, state.root.className);
60
54
  return state;
61
55
  };
62
-
63
56
  exports.useMenuPopoverStyles_unstable = useMenuPopoverStyles_unstable;
64
57
  //# sourceMappingURL=useMenuPopoverStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAeA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,qBAAA,CAAsB,IAAnC,EAAyC,MAAM,CAAC,IAAhD,EAAsD,KAAK,CAAC,IAAN,CAAW,SAAjE,CAAvB;EACA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots> = {\n root: 'fui-MenuPopover',\n};\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n minWidth: '128px',\n maxWidth: '300px',\n width: 'max-content',\n boxShadow: `${tokens.shadow16}`,\n ...shorthands.padding('4px'),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuPopoverStyles_unstable = (state: MenuPopoverState): MenuPopoverState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuPopoverClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAIaA,6BAAqB,GAAqC;EACrEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAa1B;AAEF;;;AAGO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CAACH,6BAAqB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAClG,OAAOF,KAAK;AACd,CAAC;AAJYL,qCAA6B","names":["exports","root","useStyles","react_1","useMenuPopoverStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuPopover/useMenuPopoverStyles.ts"],"sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots> = {\n root: 'fui-MenuPopover',\n};\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n minWidth: '128px',\n maxWidth: '300px',\n width: 'max-content',\n boxShadow: `${tokens.shadow16}`,\n ...shorthands.padding('4px'),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuPopoverStyles_unstable = (state: MenuPopoverState): MenuPopoverState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuPopoverClassNames.root, styles.root, state.root.className);\n return state;\n};\n"]}
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MenuSplitGroup = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useMenuSplitGroup_1 = /*#__PURE__*/require("./useMenuSplitGroup");
11
-
12
9
  const renderMenuSplitGroup_1 = /*#__PURE__*/require("./renderMenuSplitGroup");
13
-
14
10
  const useMenuSplitGroupStyles_1 = /*#__PURE__*/require("./useMenuSplitGroupStyles");
15
11
  /**
16
12
  * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
17
13
  */
18
-
19
-
20
14
  exports.MenuSplitGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useMenuSplitGroup_1.useMenuSplitGroup_unstable(props, ref);
22
16
  useMenuSplitGroupStyles_1.useMenuSplitGroupStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EAEA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EACA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,CAAP;AACD,CALuE,CAA3D;AAOb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { useMenuSplitGroup_unstable } from './useMenuSplitGroup';\nimport { renderMenuSplitGroup_unstable } from './renderMenuSplitGroup';\nimport { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles';\nimport type { MenuSplitGroupProps } from './MenuSplitGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.\n */\nexport const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuSplitGroup_unstable(props, ref);\n\n useMenuSplitGroupStyles_unstable(state);\n return renderMenuSplitGroup_unstable(state);\n});\n\nMenuSplitGroup.displayName = 'MenuSplitGroup';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,sBAAc,gBAA6CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtG,MAAMC,KAAK,GAAGC,8CAA0B,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEpDG,0DAAgC,CAACF,KAAK,CAAC;EACvC,OAAOG,oDAA6B,CAACH,KAAK,CAAC;AAC7C,CAAC,CAAC;AAEFL,sBAAc,CAACS,WAAW,GAAG,gBAAgB","names":["exports","React","forwardRef","props","ref","state","useMenuSplitGroup_1","useMenuSplitGroupStyles_1","renderMenuSplitGroup_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuSplitGroup_unstable } from './useMenuSplitGroup';\nimport { renderMenuSplitGroup_unstable } from './renderMenuSplitGroup';\nimport { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles';\nimport type { MenuSplitGroupProps } from './MenuSplitGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.\n */\nexport const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuSplitGroup_unstable(props, ref);\n\n useMenuSplitGroupStyles_unstable(state);\n return renderMenuSplitGroup_unstable(state);\n});\n\nMenuSplitGroup.displayName = 'MenuSplitGroup';\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("./MenuSplitGroup"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./MenuSplitGroup.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderMenuSplitGroup"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useMenuSplitGroup"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useMenuSplitGroupStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuSplitGroup';\nexport * from './MenuSplitGroup.types';\nexport * from './renderMenuSplitGroup';\nexport * from './useMenuSplitGroup';\nexport * from './useMenuSplitGroupStyles';\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/MenuSplitGroup/index.ts"],"sourcesContent":["export * from './MenuSplitGroup';\nexport * from './MenuSplitGroup.types';\nexport * from './renderMenuSplitGroup';\nexport * from './useMenuSplitGroup';\nexport * from './useMenuSplitGroupStyles';\n"]}
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderMenuSplitGroup_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
  * Render the final JSX of MenuSplitGroup
13
11
  */
14
-
15
-
16
12
  const renderMenuSplitGroup_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
17
+ return React.createElement(slots.root, {
18
+ ...slotProps.root
22
19
  });
23
20
  };
24
-
25
21
  exports.renderMenuSplitGroup_unstable = renderMenuSplitGroup_unstable;
26
22
  //# sourceMappingURL=renderMenuSplitGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuSplitGroupState, MenuSplitGroupSlots } from './MenuSplitGroup.types';\n\n/**\n * Render the final JSX of MenuSplitGroup\n */\nexport const renderMenuSplitGroup_unstable = (state: MenuSplitGroupState) => {\n const { slots, slotProps } = getSlots<MenuSplitGroupSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,6BAA6B,GAAIC,KAA0B,IAAI;EAC1E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAsBH,KAAK,CAAC;EAEjE,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,qCAA6B","names":["renderMenuSplitGroup_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuSplitGroupState, MenuSplitGroupSlots } from './MenuSplitGroup.types';\n\n/**\n * Render the final JSX of MenuSplitGroup\n */\nexport const renderMenuSplitGroup_unstable = (state: MenuSplitGroupState) => {\n const { slots, slotProps } = getSlots<MenuSplitGroupSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuSplitGroup_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_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
-
14
10
  const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
15
-
16
11
  const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
17
12
  /**
18
13
  * Create the state required to render MenuSplitGroup.
@@ -23,8 +18,6 @@ const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
23
18
  * @param props - props from this instance of MenuSplitGroup
24
19
  * @param ref - reference to root HTMLElement of MenuSplitGroup
25
20
  */
26
-
27
-
28
21
  const useMenuSplitGroup_unstable = (props, ref) => {
29
22
  const innerRef = React.useRef();
30
23
  const {
@@ -39,24 +32,19 @@ const useMenuSplitGroup_unstable = (props, ref) => {
39
32
  } = react_tabster_1.useFocusFinders();
40
33
  const onKeyDown = React.useCallback(e => {
41
34
  var _a;
42
-
43
35
  const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
44
-
45
36
  if (!activeElement) {
46
37
  return;
47
38
  }
48
-
49
39
  if (!((_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.contains(activeElement))) {
50
40
  return;
51
41
  }
52
-
53
42
  if (e.key === nextArrowKey) {
54
43
  const next = findNextFocusable(activeElement, {
55
44
  container: innerRef.current
56
45
  });
57
46
  next === null || next === void 0 ? void 0 : next.focus();
58
47
  }
59
-
60
48
  if (e.key === prevArrowKey) {
61
49
  const prev = findPrevFocusable(activeElement, {
62
50
  container: innerRef.current
@@ -76,6 +64,5 @@ const useMenuSplitGroup_unstable = (props, ref) => {
76
64
  })
77
65
  };
78
66
  };
79
-
80
67
  exports.useMenuSplitGroup_unstable = useMenuSplitGroup_unstable;
81
68
  //# sourceMappingURL=useMenuSplitGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/useMenuSplitGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,EAAjB;EACA,MAAM;IAAE,GAAF;IAAO;EAAP,IAA0B,uBAAA,CAAA,kBAAA,EAAhC;EAEA,MAAM,YAAY,GAAG,iBAAA,CAAA,aAAA,CAAc,eAAA,CAAA,UAAd,EAA0B,GAA1B,CAArB;EACA,MAAM,YAAY,GAAG,iBAAA,CAAA,aAAA,CAAc,eAAA,CAAA,SAAd,EAAyB,GAAzB,CAArB;EAEA,MAAM;IAAE,iBAAF;IAAqB;EAArB,IAA2C,eAAA,CAAA,eAAA,EAAjD;EAEA,MAAM,SAAS,GAAG,KAAK,CAAC,WAAN,CACf,CAAD,IAAwC;;;IACtC,MAAM,aAAa,GAAG,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,aAAtC;;IACA,IAAI,CAAC,aAAL,EAAoB;MAClB;IACD;;IAED,IAAI,EAAC,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAT,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,KAAA,CAAhB,GAAgB,EAAA,CAAE,QAAF,CAAW,aAAX,CAAjB,CAAJ,EAAgD;MAC9C;IACD;;IAED,IAAI,CAAC,CAAC,GAAF,KAAU,YAAd,EAA4B;MAC1B,MAAM,IAAI,GAAG,iBAAiB,CAAC,aAAD,EAA+B;QAAE,SAAS,EAAE,QAAQ,CAAC;MAAtB,CAA/B,CAA9B;MACA,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,KAAN,EAAA;IACD;;IAED,IAAI,CAAC,CAAC,GAAF,KAAU,YAAd,EAA4B;MAC1B,MAAM,IAAI,GAAG,iBAAiB,CAAC,aAAD,EAA+B;QAAE,SAAS,EAAE,QAAQ,CAAC;MAAtB,CAA/B,CAA9B;MACA,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,KAAN,EAAA;IACD;EACF,CApBe,EAqBhB,CAAC,iBAAD,EAAoB,iBAApB,EAAuC,cAAvC,EAAuD,YAAvD,EAAqE,YAArE,CArBgB,CAAlB;EAwBA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,IAAI,EAAE,OAD2B;MAEjC,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,QAAnB,CAF4B;MAGjC,SAHiC;MAIjC,GAAG;IAJ8B,CAA7B;EAJD,CAAP;AAWD,CA/CM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, getRTLSafeKey, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.types';\nimport { ArrowRight, ArrowLeft } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render MenuSplitGroup.\n *\n * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,\n * before being passed to renderMenuSplitGroup_unstable.\n *\n * @param props - props from this instance of MenuSplitGroup\n * @param ref - reference to root HTMLElement of MenuSplitGroup\n */\nexport const useMenuSplitGroup_unstable = (\n props: MenuSplitGroupProps,\n ref: React.Ref<HTMLElement>,\n): MenuSplitGroupState => {\n const innerRef = React.useRef<HTMLElement>();\n const { dir, targetDocument } = useFluent();\n\n const nextArrowKey = getRTLSafeKey(ArrowRight, dir);\n const prevArrowKey = getRTLSafeKey(ArrowLeft, dir);\n\n const { findNextFocusable, findPrevFocusable } = useFocusFinders();\n\n const onKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n const activeElement = targetDocument?.activeElement;\n if (!activeElement) {\n return;\n }\n\n if (!innerRef.current?.contains(activeElement)) {\n return;\n }\n\n if (e.key === nextArrowKey) {\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n next?.focus();\n }\n\n if (e.key === prevArrowKey) {\n const prev = findPrevFocusable(activeElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n },\n [findNextFocusable, findPrevFocusable, targetDocument, nextArrowKey, prevArrowKey],\n );\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n role: 'group',\n ref: useMergedRefs(ref, innerRef),\n onKeyDown,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAEA;AAEA;;;;;;;;;AASO,MAAMA,0BAA0B,GAAG,CACxCC,KAA0B,EAC1BC,GAA2B,KACJ;EACvB,MAAMC,QAAQ,GAAGC,KAAK,CAACC,MAAM,EAAe;EAC5C,MAAM;IAAEC,GAAG;IAAEC;EAAc,CAAE,GAAGC,0CAAS,EAAE;EAE3C,MAAMC,YAAY,GAAGC,+BAAa,CAACC,0BAAU,EAAEL,GAAG,CAAC;EACnD,MAAMM,YAAY,GAAGF,+BAAa,CAACC,yBAAS,EAAEL,GAAG,CAAC;EAElD,MAAM;IAAEO,iBAAiB;IAAEC;EAAiB,CAAE,GAAGC,+BAAe,EAAE;EAElE,MAAMC,SAAS,GAAGZ,KAAK,CAACa,WAAW,CAChCC,CAAmC,IAAI;;IACtC,MAAMC,aAAa,GAAGZ,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEY,aAAa;IACnD,IAAI,CAACA,aAAa,EAAE;MAClB;;IAGF,IAAI,EAAC,cAAQ,CAACC,OAAO,0CAAEC,QAAQ,CAACF,aAAa,CAAC,GAAE;MAC9C;;IAGF,IAAID,CAAC,CAACI,GAAG,KAAKb,YAAY,EAAE;MAC1B,MAAMc,IAAI,GAAGV,iBAAiB,CAACM,aAA4B,EAAE;QAAEK,SAAS,EAAErB,QAAQ,CAACiB;MAAO,CAAE,CAAC;MAC7FG,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,KAAK,EAAE;;IAGf,IAAIP,CAAC,CAACI,GAAG,KAAKV,YAAY,EAAE;MAC1B,MAAMc,IAAI,GAAGZ,iBAAiB,CAACK,aAA4B,EAAE;QAAEK,SAAS,EAAErB,QAAQ,CAACiB;MAAO,CAAE,CAAC;MAC7FM,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAED,KAAK,EAAE;;EAEjB,CAAC,EACD,CAACZ,iBAAiB,EAAEC,iBAAiB,EAAEP,cAAc,EAAEE,YAAY,EAAEG,YAAY,CAAC,CACnF;EAED,OAAO;IACLe,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAElB,uCAAqB,CAAC,KAAK,EAAE;MACjCmB,IAAI,EAAE,OAAO;MACb3B,GAAG,EAAEQ,+BAAa,CAACR,GAAG,EAAEC,QAAQ,CAAC;MACjCa,SAAS;MACT,GAAGf;KACJ;GACF;AACH,CAAC;AA/CY6B,kCAA0B","names":["useMenuSplitGroup_unstable","props","ref","innerRef","React","useRef","dir","targetDocument","react_shared_contexts_1","nextArrowKey","react_utilities_1","keyboard_keys_1","prevArrowKey","findNextFocusable","findPrevFocusable","react_tabster_1","onKeyDown","useCallback","e","activeElement","current","contains","key","next","container","focus","prev","components","root","role","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/useMenuSplitGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, getRTLSafeKey, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.types';\nimport { ArrowRight, ArrowLeft } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render MenuSplitGroup.\n *\n * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,\n * before being passed to renderMenuSplitGroup_unstable.\n *\n * @param props - props from this instance of MenuSplitGroup\n * @param ref - reference to root HTMLElement of MenuSplitGroup\n */\nexport const useMenuSplitGroup_unstable = (\n props: MenuSplitGroupProps,\n ref: React.Ref<HTMLElement>,\n): MenuSplitGroupState => {\n const innerRef = React.useRef<HTMLElement>();\n const { dir, targetDocument } = useFluent();\n\n const nextArrowKey = getRTLSafeKey(ArrowRight, dir);\n const prevArrowKey = getRTLSafeKey(ArrowLeft, dir);\n\n const { findNextFocusable, findPrevFocusable } = useFocusFinders();\n\n const onKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n const activeElement = targetDocument?.activeElement;\n if (!activeElement) {\n return;\n }\n\n if (!innerRef.current?.contains(activeElement)) {\n return;\n }\n\n if (e.key === nextArrowKey) {\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n next?.focus();\n }\n\n if (e.key === prevArrowKey) {\n const prev = findPrevFocusable(activeElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n },\n [findNextFocusable, findPrevFocusable, targetDocument, nextArrowKey, prevArrowKey],\n );\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n role: 'group',\n ref: useMergedRefs(ref, innerRef),\n onKeyDown,\n ...props,\n }),\n };\n};\n"]}
@@ -4,46 +4,38 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuSplitGroupStyles_unstable = exports.menuSplitGroupClassNames = 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
  const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles");
13
-
14
10
  exports.menuSplitGroupClassNames = {
15
11
  root: 'fui-MenuSplitGroup'
16
12
  };
17
13
  /**
18
14
  * Styles for the root slot
19
15
  */
20
-
21
16
  const useStyles = /*#__PURE__*/react_1.__styles({
22
- "root": {
23
- "mc9l5x": "f22iagw",
24
- "u7v6m2": "f168awwq",
25
- "Bo1wru1": ["f1om2jlk", "fcyhg04"],
26
- "Bhkyaub": ["fgqgg70", "fqo1hry"],
27
- "J9ixe0": ["fh1zedf", "f1auaj6e"],
28
- "rj29m3": ["fokbbcd", "f1xlvh9o"],
29
- "B2knx3v": "f1mf2v5d",
30
- "Bl7aesu": "fi8lk9b",
31
- "e82tai": "f1tc32yi",
32
- "Bnkcs84": "f1kve8m0"
17
+ root: {
18
+ mc9l5x: "f22iagw",
19
+ u7v6m2: "f168awwq",
20
+ Bo1wru1: ["f1om2jlk", "fcyhg04"],
21
+ Bhkyaub: ["fgqgg70", "fqo1hry"],
22
+ J9ixe0: ["fh1zedf", "f1auaj6e"],
23
+ rj29m3: ["fokbbcd", "f1xlvh9o"],
24
+ B2knx3v: "f1mf2v5d",
25
+ Bl7aesu: "fi8lk9b",
26
+ e82tai: "f1tc32yi",
27
+ Bnkcs84: "f1kve8m0"
33
28
  }
34
29
  }, {
35
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f168awwq>.fui-MenuItem:nth-child(1){width:100%;}", ".f1om2jlk>.fui-MenuItem:nth-child(2){border-top-left-radius:0;}", ".fcyhg04>.fui-MenuItem:nth-child(2){border-top-right-radius:0;}", ".fgqgg70>.fui-MenuItem:nth-child(2){border-bottom-left-radius:0;}", ".fqo1hry>.fui-MenuItem:nth-child(2){border-bottom-right-radius:0;}", ".fh1zedf>.fui-MenuItem:nth-child(2){padding-left:0;}", ".f1auaj6e>.fui-MenuItem:nth-child(2){padding-right:0;}", ".fokbbcd>.fui-MenuItem:nth-child(2){margin-left:auto;}", ".f1xlvh9o>.fui-MenuItem:nth-child(2){margin-right:auto;}", ".f1mf2v5d>.fui-MenuItem:nth-child(2)::before{content:\"\";}", ".fi8lk9b>.fui-MenuItem:nth-child(2)::before{width:var(--strokeWidthThin);}", ".f1tc32yi>.fui-MenuItem:nth-child(2)::before{height:24px;}", ".f1kve8m0>.fui-MenuItem:nth-child(2)::before{background-color:var(--colorNeutralStroke1);}"]
30
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f168awwq>.fui-MenuItem:nth-child(1){width:100%;}", ".f1om2jlk>.fui-MenuItem:nth-child(2){border-top-left-radius:0;}", ".fcyhg04>.fui-MenuItem:nth-child(2){border-top-right-radius:0;}", ".fgqgg70>.fui-MenuItem:nth-child(2){border-bottom-left-radius:0;}", ".fqo1hry>.fui-MenuItem:nth-child(2){border-bottom-right-radius:0;}", ".fh1zedf>.fui-MenuItem:nth-child(2){padding-left:0;}", ".f1auaj6e>.fui-MenuItem:nth-child(2){padding-right:0;}", ".fokbbcd>.fui-MenuItem:nth-child(2){margin-left:auto;}", ".f1xlvh9o>.fui-MenuItem:nth-child(2){margin-right:auto;}", ".f1mf2v5d>.fui-MenuItem:nth-child(2)::before{content:\"\";}", ".fi8lk9b>.fui-MenuItem:nth-child(2)::before{width:var(--strokeWidthThin);}", ".f1tc32yi>.fui-MenuItem:nth-child(2)::before{height:24px;}", ".f1kve8m0>.fui-MenuItem:nth-child(2)::before{background-color:var(--colorNeutralStroke1);}"]
36
31
  });
37
32
  /**
38
33
  * Apply styling to the MenuSplitGroup slots based on the state
39
34
  */
40
-
41
-
42
35
  const useMenuSplitGroupStyles_unstable = state => {
43
36
  const styles = useStyles();
44
37
  state.root.className = react_1.mergeClasses(exports.menuSplitGroupClassNames.root, styles.root, state.root.className);
45
38
  return state;
46
39
  };
47
-
48
40
  exports.useMenuSplitGroupStyles_unstable = useMenuSplitGroupStyles_unstable;
49
41
  //# sourceMappingURL=useMenuSplitGroupStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAIa,OAAA,CAAA,wBAAA,GAAgE;EAC3E,IAAI,EAAE;AADqE,CAAhE;AAGb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACI,MAAM,gCAAgC,GAAI,KAAD,IAAoD;EAClG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,wBAAA,CAAyB,IAAtC,EAA4C,MAAM,CAAC,IAAnD,EAAyD,KAAK,CAAC,IAAN,CAAW,SAApE,CAAvB;EACA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { menuItemClassNames } from '../MenuItem/useMenuItemStyles';\nimport type { MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots> = {\n root: 'fui-MenuSplitGroup',\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n [`& > .${menuItemClassNames.root}:nth-child(1)`]: {\n width: '100%',\n },\n [`& > .${menuItemClassNames.root}:nth-child(2)`]: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n marginLeft: 'auto',\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n },\n});\n\n/**\n * Apply styling to the MenuSplitGroup slots based on the state\n */\nexport const useMenuSplitGroupStyles_unstable = (state: MenuSplitGroupState): MenuSplitGroupState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuSplitGroupClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAIaA,gCAAwB,GAAwC;EAC3EC,IAAI,EAAE;CACP;AACD;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAmB1B;AAEF;;;AAGO,MAAMC,gCAAgC,GAAIC,KAA0B,IAAyB;EAClG,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CAACH,gCAAwB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EACrG,OAAOF,KAAK;AACd,CAAC;AAJYL,wCAAgC","names":["exports","root","useStyles","react_1","useMenuSplitGroupStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { menuItemClassNames } from '../MenuItem/useMenuItemStyles';\nimport type { MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots> = {\n root: 'fui-MenuSplitGroup',\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n [`& > .${menuItemClassNames.root}:nth-child(1)`]: {\n width: '100%',\n },\n [`& > .${menuItemClassNames.root}:nth-child(2)`]: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n marginLeft: 'auto',\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n },\n});\n\n/**\n * Apply styling to the MenuSplitGroup slots based on the state\n */\nexport const useMenuSplitGroupStyles_unstable = (state: MenuSplitGroupState): MenuSplitGroupState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuSplitGroupClassNames.root, styles.root, state.root.className);\n return state;\n};\n"]}
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MenuTrigger = void 0;
7
-
8
7
  const useMenuTrigger_1 = /*#__PURE__*/require("./useMenuTrigger");
9
-
10
8
  const renderMenuTrigger_1 = /*#__PURE__*/require("./renderMenuTrigger");
11
9
  /**
12
10
  * Wraps a trigger element as an only child
13
11
  * and adds the necessary event handling to open a popup menu
14
12
  */
15
-
16
-
17
13
  const MenuTrigger = props => {
18
14
  const state = useMenuTrigger_1.useMenuTrigger_unstable(props);
19
15
  return renderMenuTrigger_1.renderMenuTrigger_unstable(state);
20
16
  };
21
-
22
17
  exports.MenuTrigger = MenuTrigger;
23
- exports.MenuTrigger.displayName = 'MenuTrigger'; // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
24
-
18
+ exports.MenuTrigger.displayName = 'MenuTrigger';
19
+ // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
25
20
  exports.MenuTrigger.isFluentTriggerComponent = true;
26
21
  //# sourceMappingURL=MenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAA+B,KAAK,IAAG;EAC7D,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;EAEA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B,C,CACA;;AACC,OAAA,CAAA,WAAA,CAAuC,wBAAvC,GAAkE,IAAlE","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AAIA;;;;AAIO,MAAMA,WAAW,GAA+BC,KAAK,IAAG;EAC7D,MAAMC,KAAK,GAAGC,wCAAuB,CAACF,KAAK,CAAC;EAE5C,OAAOG,8CAA0B,CAACF,KAAK,CAAC;AAC1C,CAAC;AAJYG,mBAAW;AAMxBA,mBAAW,CAACC,WAAW,GAAG,aAAa;AACvC;AACCD,mBAAsC,CAACE,wBAAwB,GAAG,IAAI","names":["MenuTrigger","props","state","useMenuTrigger_1","renderMenuTrigger_1","exports","displayName","isFluentTriggerComponent"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,14 +3,9 @@
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("./MenuTrigger"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./MenuTrigger.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderMenuTrigger"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useMenuTrigger"), exports);
16
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuTrigger';\nexport * from './MenuTrigger.types';\nexport * from './renderMenuTrigger';\nexport * from './useMenuTrigger';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuTrigger/index.ts"],"sourcesContent":["export * from './MenuTrigger';\nexport * from './MenuTrigger.types';\nexport * from './renderMenuTrigger';\nexport * from './useMenuTrigger';\n"]}
@@ -4,22 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderMenuTrigger_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const menuTriggerContext_1 = /*#__PURE__*/require("../../contexts/menuTriggerContext");
11
9
  /**
12
10
  * Render the final JSX of MenuTrigger
13
11
  *
14
12
  * Only renders children
15
13
  */
16
-
17
-
18
14
  const renderMenuTrigger_unstable = state => {
19
15
  return React.createElement(menuTriggerContext_1.MenuTriggerContextProvider, {
20
16
  value: state.isSubmenu
21
17
  }, state.children);
22
18
  };
23
-
24
19
  exports.renderMenuTrigger_unstable = renderMenuTrigger_unstable;
25
20
  //# sourceMappingURL=renderMenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-menu/src/components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,OAAO,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;IAAC,KAAK,EAAE,KAAK,CAAC;EAAd,CAA3B,EAAqD,KAAK,CAAC,QAA3D,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext';\nimport type { MenuTriggerState } from './MenuTrigger.types';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderMenuTrigger_unstable = (state: MenuTriggerState) => {\n return <MenuTriggerContextProvider value={state.isSubmenu}>{state.children}</MenuTriggerContextProvider>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;;;AAKO,MAAMA,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,OAAOC,oBAACC,+CAA0B;IAACC,KAAK,EAAEH,KAAK,CAACI;EAAS,GAAGJ,KAAK,CAACK,QAAQ,CAA8B;AAC1G,CAAC;AAFYC,kCAA0B","names":["renderMenuTrigger_unstable","state","React","menuTriggerContext_1","value","isSubmenu","children","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-menu/src/components/MenuTrigger/renderMenuTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext';\nimport type { MenuTriggerState } from './MenuTrigger.types';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderMenuTrigger_unstable = (state: MenuTriggerState) => {\n return <MenuTriggerContextProvider value={state.isSubmenu}>{state.children}</MenuTriggerContextProvider>;\n};\n"]}
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useMenuTrigger_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
11
-
12
9
  const useIsSubmenu_1 = /*#__PURE__*/require("../../utils/useIsSubmenu");
13
-
14
10
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
-
16
11
  const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
17
-
18
12
  const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
19
-
20
13
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
21
-
22
14
  const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
23
15
  /**
24
16
  * Create the state required to render MenuTrigger.
@@ -26,8 +18,6 @@ const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
26
18
  *
27
19
  * @param props - props from this instance of MenuTrigger
28
20
  */
29
-
30
-
31
21
  const useMenuTrigger_unstable = props => {
32
22
  const {
33
23
  children,
@@ -55,12 +45,10 @@ const useMenuTrigger_unstable = props => {
55
45
  } = react_shared_contexts_1.useFluent_unstable();
56
46
  const OpenArrowKey = dir === 'ltr' ? keyboard_keys_1.ArrowRight : keyboard_keys_1.ArrowLeft;
57
47
  const child = react_utilities_1.getTriggerChild(children);
58
-
59
48
  const onContextMenu = event => {
60
49
  if (isTargetDisabled(event)) {
61
50
  return;
62
51
  }
63
-
64
52
  if (openOnContext) {
65
53
  event.preventDefault();
66
54
  setOpen(event, {
@@ -71,12 +59,10 @@ const useMenuTrigger_unstable = props => {
71
59
  });
72
60
  }
73
61
  };
74
-
75
62
  const onClick = event => {
76
63
  if (isTargetDisabled(event)) {
77
64
  return;
78
65
  }
79
-
80
66
  if (!openOnContext) {
81
67
  setOpen(event, {
82
68
  open: !open,
@@ -87,14 +73,11 @@ const useMenuTrigger_unstable = props => {
87
73
  openedWithKeyboardRef.current = false;
88
74
  }
89
75
  };
90
-
91
76
  const onKeyDown = event => {
92
77
  if (isTargetDisabled(event)) {
93
78
  return;
94
79
  }
95
-
96
80
  const key = event.key;
97
-
98
81
  if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === keyboard_keys_1.ArrowDown)) {
99
82
  setOpen(event, {
100
83
  open: true,
@@ -103,7 +86,6 @@ const useMenuTrigger_unstable = props => {
103
86
  event
104
87
  });
105
88
  }
106
-
107
89
  if (key === keyboard_keys_1.Escape && !isSubmenu) {
108
90
  setOpen(event, {
109
91
  open: false,
@@ -111,19 +93,16 @@ const useMenuTrigger_unstable = props => {
111
93
  type: 'menuTriggerKeyDown',
112
94
  event
113
95
  });
114
- } // if menu is already open, can't rely on effects to focus
115
-
116
-
96
+ }
97
+ // if menu is already open, can't rely on effects to focus
117
98
  if (open && key === OpenArrowKey && isSubmenu) {
118
99
  focusFirst();
119
100
  }
120
101
  };
121
-
122
102
  const onMouseEnter = event => {
123
103
  if (isTargetDisabled(event)) {
124
104
  return;
125
105
  }
126
-
127
106
  if (openOnHover && hasMouseMoved.current) {
128
107
  setOpen(event, {
129
108
  open: true,
@@ -132,16 +111,14 @@ const useMenuTrigger_unstable = props => {
132
111
  event
133
112
  });
134
113
  }
135
- }; // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
114
+ };
115
+ // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
136
116
  // First time open the mouse using mousemove and then continue with mouseenter
137
117
  // Only use once to determine that the user is using the mouse since it is an expensive event to handle
138
-
139
-
140
118
  const onMouseMove = event => {
141
119
  if (isTargetDisabled(event)) {
142
120
  return;
143
121
  }
144
-
145
122
  if (openOnHover && !hasMouseMoved.current) {
146
123
  setOpen(event, {
147
124
  open: true,
@@ -152,12 +129,10 @@ const useMenuTrigger_unstable = props => {
152
129
  hasMouseMoved.current = true;
153
130
  }
154
131
  };
155
-
156
132
  const onMouseLeave = event => {
157
133
  if (isTargetDisabled(event)) {
158
134
  return;
159
135
  }
160
-
161
136
  if (openOnHover) {
162
137
  setOpen(event, {
163
138
  open: false,
@@ -167,7 +142,6 @@ const useMenuTrigger_unstable = props => {
167
142
  });
168
143
  }
169
144
  };
170
-
171
145
  const contextMenuProps = {
172
146
  id: triggerId,
173
147
  ...(child === null || child === void 0 ? void 0 : child.props),
@@ -190,16 +164,12 @@ const useMenuTrigger_unstable = props => {
190
164
  children: react_utilities_1.applyTriggerPropsToChildren(children, openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)
191
165
  };
192
166
  };
193
-
194
167
  exports.useMenuTrigger_unstable = useMenuTrigger_unstable;
195
-
196
168
  const isTargetDisabled = e => {
197
169
  const isDisabled = el => el.hasAttribute('disabled') || el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true';
198
-
199
170
  if (e.target instanceof HTMLElement && isDisabled(e.target)) {
200
171
  return true;
201
172
  }
202
-
203
173
  return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);
204
174
  };
205
175
  //# sourceMappingURL=useMenuTrigger.js.map