@fluentui/react-menu 9.12.11 → 9.12.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. package/CHANGELOG.json +133 -1
  2. package/CHANGELOG.md +37 -2
  3. package/lib/components/Menu/Menu.js.map +1 -1
  4. package/lib/components/Menu/renderMenu.js.map +1 -1
  5. package/lib/components/Menu/useMenu.js +13 -11
  6. package/lib/components/Menu/useMenu.js.map +1 -1
  7. package/lib/components/Menu/useMenuContextValues.js +1 -1
  8. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  9. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  10. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  11. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  13. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  14. package/lib/components/MenuGroup/renderMenuGroup.js +5 -4
  15. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  16. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  17. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  18. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  19. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  20. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  21. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  22. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -1
  23. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  24. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  25. package/lib/components/MenuItem/renderMenuItem.js +10 -2
  26. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  27. package/lib/components/MenuItem/useCharacterSearch.js +5 -4
  28. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  29. package/lib/components/MenuItem/useMenuItem.js +8 -8
  30. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  31. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  32. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +9 -2
  33. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  34. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  35. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  36. package/lib/components/MenuItemLink/MenuItemLink.js.map +1 -1
  37. package/lib/components/MenuItemLink/renderMenuItemLink.js +9 -2
  38. package/lib/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
  39. package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  40. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  41. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +9 -2
  42. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  43. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  44. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  45. package/lib/components/MenuList/MenuList.js.map +1 -1
  46. package/lib/components/MenuList/renderMenuList.js +5 -4
  47. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  48. package/lib/components/MenuList/useMenuList.js +6 -4
  49. package/lib/components/MenuList/useMenuList.js.map +1 -1
  50. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  51. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  52. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  53. package/lib/components/MenuPopover/renderMenuPopover.js +6 -5
  54. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  55. package/lib/components/MenuPopover/useMenuPopover.js +6 -4
  56. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  57. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  58. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
  59. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  60. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +8 -6
  61. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  62. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  63. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  64. package/lib/components/MenuTrigger/useMenuTrigger.js +15 -13
  65. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  66. package/lib/contexts/menuContext.js.map +1 -1
  67. package/lib/contexts/menuGroupContext.js.map +1 -1
  68. package/lib/contexts/menuListContext.js.map +1 -1
  69. package/lib/contexts/menuTriggerContext.js.map +1 -1
  70. package/lib/utils/useIsSubmenu.js.map +1 -1
  71. package/lib/utils/useOnMenuEnter.js +1 -1
  72. package/lib/utils/useOnMenuEnter.js.map +1 -1
  73. package/lib-commonjs/Menu.js +2 -2
  74. package/lib-commonjs/Menu.js.map +1 -1
  75. package/lib-commonjs/MenuDivider.js +2 -2
  76. package/lib-commonjs/MenuDivider.js.map +1 -1
  77. package/lib-commonjs/MenuGroup.js +2 -2
  78. package/lib-commonjs/MenuGroup.js.map +1 -1
  79. package/lib-commonjs/MenuGroupHeader.js +2 -2
  80. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  81. package/lib-commonjs/MenuItem.js +2 -2
  82. package/lib-commonjs/MenuItem.js.map +1 -1
  83. package/lib-commonjs/MenuItemCheckbox.js +2 -2
  84. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  85. package/lib-commonjs/MenuItemLink.js +2 -2
  86. package/lib-commonjs/MenuItemLink.js.map +1 -1
  87. package/lib-commonjs/MenuItemRadio.js +2 -2
  88. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  89. package/lib-commonjs/MenuList.js +2 -2
  90. package/lib-commonjs/MenuList.js.map +1 -1
  91. package/lib-commonjs/MenuPopover.js +2 -2
  92. package/lib-commonjs/MenuPopover.js.map +1 -1
  93. package/lib-commonjs/MenuSplitGroup.js +2 -2
  94. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  95. package/lib-commonjs/MenuTrigger.js +2 -2
  96. package/lib-commonjs/MenuTrigger.js.map +1 -1
  97. package/lib-commonjs/components/Menu/Menu.js +5 -3
  98. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  99. package/lib-commonjs/components/Menu/Menu.types.js +2 -2
  100. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  101. package/lib-commonjs/components/Menu/index.js +6 -6
  102. package/lib-commonjs/components/Menu/index.js.map +1 -1
  103. package/lib-commonjs/components/Menu/renderMenu.js +5 -3
  104. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  105. package/lib-commonjs/components/Menu/useMenu.js +35 -31
  106. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  107. package/lib-commonjs/components/Menu/useMenuContextValues.js +4 -2
  108. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  109. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -7
  110. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  111. package/lib-commonjs/components/MenuDivider/index.js +6 -6
  112. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  113. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +8 -6
  114. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  115. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +7 -5
  116. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  117. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +7 -3
  118. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  119. package/lib-commonjs/components/MenuGroup/MenuGroup.js +9 -7
  120. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  121. package/lib-commonjs/components/MenuGroup/index.js +7 -7
  122. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  123. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +11 -8
  124. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  125. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +8 -6
  126. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  127. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +6 -4
  128. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  129. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js +6 -2
  130. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
  131. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -7
  132. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  133. package/lib-commonjs/components/MenuGroupHeader/index.js +6 -6
  134. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  135. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +8 -6
  136. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  137. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +8 -6
  138. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  139. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +7 -3
  140. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  141. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -7
  142. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  143. package/lib-commonjs/components/MenuItem/index.js +6 -6
  144. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  145. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -6
  146. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  147. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +10 -7
  148. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  149. package/lib-commonjs/components/MenuItem/useMenuItem.js +31 -29
  150. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  151. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +7 -3
  152. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  153. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -7
  154. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  155. package/lib-commonjs/components/MenuItemCheckbox/index.js +6 -6
  156. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  157. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -6
  158. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  159. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +13 -11
  160. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  161. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +8 -4
  162. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  163. package/lib-commonjs/components/MenuItemLink/MenuItemLink.js +7 -5
  164. package/lib-commonjs/components/MenuItemLink/MenuItemLink.js.map +1 -1
  165. package/lib-commonjs/components/MenuItemLink/index.js +6 -6
  166. package/lib-commonjs/components/MenuItemLink/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js +15 -6
  168. package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
  169. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js +7 -5
  170. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  171. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js +9 -5
  172. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
  173. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -7
  174. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  175. package/lib-commonjs/components/MenuItemRadio/index.js +6 -6
  176. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  177. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -6
  178. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  179. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +13 -11
  180. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  181. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +8 -4
  182. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  183. package/lib-commonjs/components/MenuList/MenuList.js +9 -7
  184. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  185. package/lib-commonjs/components/MenuList/MenuList.types.js +2 -2
  186. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  187. package/lib-commonjs/components/MenuList/index.js +7 -7
  188. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  189. package/lib-commonjs/components/MenuList/renderMenuList.js +11 -8
  190. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  191. package/lib-commonjs/components/MenuList/useMenuList.js +21 -17
  192. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  193. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +4 -2
  194. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  195. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +7 -3
  196. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  197. package/lib-commonjs/components/MenuPopover/MenuPopover.js +9 -7
  198. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  199. package/lib-commonjs/components/MenuPopover/index.js +6 -6
  200. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  201. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +13 -10
  202. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  203. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +23 -19
  204. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  205. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +7 -3
  206. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  207. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +9 -7
  208. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  209. package/lib-commonjs/components/MenuSplitGroup/index.js +6 -6
  210. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  211. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +8 -6
  212. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  213. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +21 -17
  214. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  215. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +7 -3
  216. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  217. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +5 -3
  218. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  219. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +2 -2
  220. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  221. package/lib-commonjs/components/MenuTrigger/index.js +5 -5
  222. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  223. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -3
  224. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  225. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +33 -29
  226. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  227. package/lib-commonjs/components/index.js +3 -3
  228. package/lib-commonjs/components/index.js.map +1 -1
  229. package/lib-commonjs/contexts/menuContext.js +14 -8
  230. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  231. package/lib-commonjs/contexts/menuGroupContext.js +8 -4
  232. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  233. package/lib-commonjs/contexts/menuListContext.js +14 -8
  234. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  235. package/lib-commonjs/contexts/menuTriggerContext.js +8 -4
  236. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  237. package/lib-commonjs/index.js +225 -83
  238. package/lib-commonjs/index.js.map +1 -1
  239. package/lib-commonjs/selectable/index.js +3 -3
  240. package/lib-commonjs/selectable/index.js.map +1 -1
  241. package/lib-commonjs/selectable/types.js +2 -2
  242. package/lib-commonjs/selectable/types.js.map +1 -1
  243. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js +4 -2
  244. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
  245. package/lib-commonjs/utils/index.js +2 -2
  246. package/lib-commonjs/utils/index.js.map +1 -1
  247. package/lib-commonjs/utils/useIsSubmenu.js +5 -3
  248. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  249. package/lib-commonjs/utils/useOnMenuEnter.js +16 -10
  250. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  251. package/package.json +16 -16
package/CHANGELOG.json CHANGED
@@ -2,7 +2,139 @@
2
2
  "name": "@fluentui/react-menu",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 29 Aug 2023 12:53:36 GMT",
5
+ "date": "Tue, 05 Sep 2023 15:35:07 GMT",
6
+ "tag": "@fluentui/react-menu_v9.12.13",
7
+ "version": "9.12.13",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-menu",
13
+ "comment": "Bump @fluentui/react-aria to v9.3.35",
14
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-menu",
19
+ "comment": "Bump @fluentui/react-context-selector to v9.1.33",
20
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-menu",
25
+ "comment": "Bump @fluentui/react-portal to v9.3.12",
26
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-menu",
31
+ "comment": "Bump @fluentui/react-positioning to v9.9.10",
32
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-menu",
37
+ "comment": "Bump @fluentui/react-tabster to v9.12.7",
38
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-menu",
43
+ "comment": "Bump @fluentui/react-utilities to v9.13.2",
44
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-menu",
49
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.5",
50
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Tue, 05 Sep 2023 13:29:26 GMT",
57
+ "tag": "@fluentui/react-menu_v9.12.12",
58
+ "version": "9.12.12",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "bernardo.sunderhus@gmail.com",
63
+ "package": "@fluentui/react-menu",
64
+ "commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
65
+ "comment": "chore: migrate package to use JSX importSource"
66
+ },
67
+ {
68
+ "author": "bernardo.sunderhus@gmail.com",
69
+ "package": "@fluentui/react-menu",
70
+ "commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
71
+ "comment": "bumps @swc/helpers version to 0.5.1"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-menu",
76
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.4",
77
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-menu",
82
+ "comment": "Bump @fluentui/react-aria to v9.3.34",
83
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-menu",
88
+ "comment": "Bump @fluentui/react-context-selector to v9.1.32",
89
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-menu",
94
+ "comment": "Bump @fluentui/react-portal to v9.3.11",
95
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-menu",
100
+ "comment": "Bump @fluentui/react-positioning to v9.9.9",
101
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-menu",
106
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.3",
107
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-menu",
112
+ "comment": "Bump @fluentui/react-tabster to v9.12.6",
113
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-menu",
118
+ "comment": "Bump @fluentui/react-theme to v9.1.12",
119
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-menu",
124
+ "comment": "Bump @fluentui/react-utilities to v9.13.1",
125
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@fluentui/react-menu",
130
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.4",
131
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ "date": "Tue, 29 Aug 2023 12:57:36 GMT",
6
138
  "tag": "@fluentui/react-menu_v9.12.11",
7
139
  "version": "9.12.11",
8
140
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,47 @@
1
1
  # Change Log - @fluentui/react-menu
2
2
 
3
- This log was last generated on Tue, 29 Aug 2023 12:53:36 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 05 Sep 2023 15:35:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.12.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.12.13)
8
+
9
+ Tue, 05 Sep 2023 15:35:07 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.12.12..@fluentui/react-menu_v9.12.13)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-aria to v9.3.35 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
15
+ - Bump @fluentui/react-context-selector to v9.1.33 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
16
+ - Bump @fluentui/react-portal to v9.3.12 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
17
+ - Bump @fluentui/react-positioning to v9.9.10 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.12.7 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.13.2 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
20
+ - Bump @fluentui/react-jsx-runtime to v9.0.5 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
21
+
22
+ ## [9.12.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.12.12)
23
+
24
+ Tue, 05 Sep 2023 13:29:26 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.12.11..@fluentui/react-menu_v9.12.12)
26
+
27
+ ### Patches
28
+
29
+ - chore: migrate package to use JSX importSource ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
30
+ - bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
31
+ - Bump @fluentui/keyboard-keys to v9.0.4 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
32
+ - Bump @fluentui/react-aria to v9.3.34 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
33
+ - Bump @fluentui/react-context-selector to v9.1.32 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
34
+ - Bump @fluentui/react-portal to v9.3.11 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
35
+ - Bump @fluentui/react-positioning to v9.9.9 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
36
+ - Bump @fluentui/react-shared-contexts to v9.7.3 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
37
+ - Bump @fluentui/react-tabster to v9.12.6 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
38
+ - Bump @fluentui/react-theme to v9.1.12 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
39
+ - Bump @fluentui/react-utilities to v9.13.1 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
40
+ - Bump @fluentui/react-jsx-runtime to v9.0.4 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
41
+
7
42
  ## [9.12.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.12.11)
8
43
 
9
- Tue, 29 Aug 2023 12:53:36 GMT
44
+ Tue, 29 Aug 2023 12:57:36 GMT
10
45
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.12.10..@fluentui/react-menu_v9.12.11)
11
46
 
12
47
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenu_unstable } from './useMenu';\nimport { useMenuContextValues_unstable } from './useMenuContextValues';\nimport { renderMenu_unstable } from './renderMenu';\nimport type { MenuProps } from './Menu.types';\n\n/**\n * Wrapper component that manages state for a popup MenuList and a MenuTrigger\n */\nexport const Menu: React.FC<MenuProps> = props => {\n const state = useMenu_unstable(props);\n const contextValues = useMenuContextValues_unstable(state);\n\n return renderMenu_unstable(state, contextValues);\n};\n\nMenu.displayName = 'Menu';\n"],"names":["React","useMenu_unstable","useMenuContextValues_unstable","renderMenu_unstable","Menu","props","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,mBAAmB,QAAQ,eAAe;AAGnD;;CAEC,GACD,OAAO,MAAMC,OAA4BC,CAAAA,QAAS;IAChD,MAAMC,QAAQL,iBAAiBI;IAC/B,MAAME,gBAAgBL,8BAA8BI;IAEpD,OAAOH,oBAAoBG,OAAOC;AACpC,EAAE;AAEFH,KAAKI,WAAW,GAAG"}
1
+ {"version":3,"sources":["Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenu_unstable } from './useMenu';\nimport { useMenuContextValues_unstable } from './useMenuContextValues';\nimport { renderMenu_unstable } from './renderMenu';\nimport type { MenuProps } from './Menu.types';\n\n/**\n * Wrapper component that manages state for a popup MenuList and a MenuTrigger\n */\nexport const Menu: React.FC<MenuProps> = props => {\n const state = useMenu_unstable(props);\n const contextValues = useMenuContextValues_unstable(state);\n\n return renderMenu_unstable(state, contextValues);\n};\n\nMenu.displayName = 'Menu';\n"],"names":["React","useMenu_unstable","useMenuContextValues_unstable","renderMenu_unstable","Menu","props","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,mBAAmB,QAAQ,eAAe;AAGnD;;CAEC,GACD,OAAO,MAAMC,OAA4BC,CAAAA;IACvC,MAAMC,QAAQL,iBAAiBI;IAC/B,MAAME,gBAAgBL,8BAA8BI;IAEpD,OAAOH,oBAAoBG,OAAOC;AACpC,EAAE;AAEFH,KAAKI,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n */\nexport const renderMenu_unstable = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"],"names":["React","MenuProvider","renderMenu_unstable","state","contextValues","value","menu","menuTrigger","open","menuPopover"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAG1D;;CAEC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAkBC,gBAAqC;IACzF,qBACE,oBAACH;QAAaI,OAAOD,cAAcE,IAAI;OACpCH,MAAMI,WAAW,EACjBJ,MAAMK,IAAI,IAAIL,MAAMM,WAAW;AAGtC,EAAE"}
1
+ {"version":3,"sources":["renderMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n */\nexport const renderMenu_unstable = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"],"names":["React","MenuProvider","renderMenu_unstable","state","contextValues","value","menu","menuTrigger","open","menuPopover"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAG1D;;CAEC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAkBC;IACpD,qBACE,oBAACH;QAAaI,OAAOD,cAAcE,IAAI;OACpCH,MAAMI,WAAW,EACjBJ,MAAMK,IAAI,IAAIL,MAAMM,WAAW;AAGtC,EAAE"}
@@ -26,7 +26,7 @@ const submenuFallbackPositions = [
26
26
  * @param props - props from this instance of Menu
27
27
  */ export const useMenu_unstable = (props)=>{
28
28
  const isSubmenu = useIsSubmenu();
29
- const { hoverDelay =500 , inline =false , hasCheckmarks =false , hasIcons =false , closeOnScroll =false , openOnContext =false , persistOnItemClick =false , openOnHover =isSubmenu , defaultCheckedValues , mountNode =null } = props;
29
+ const { hoverDelay = 500, inline = false, hasCheckmarks = false, hasIcons = false, closeOnScroll = false, openOnContext = false, persistOnItemClick = false, openOnHover = isSubmenu, defaultCheckedValues, mountNode = null } = props;
30
30
  const triggerId = useId('menu');
31
31
  const [contextTarget, setContextTarget] = usePositioningMouseTarget();
32
32
  const positioningState = {
@@ -55,7 +55,7 @@ const submenuFallbackPositions = [
55
55
  } else if (children.length === 1) {
56
56
  menuPopover = children[0];
57
57
  }
58
- const { targetRef: triggerRef , containerRef: menuPopoverRef } = usePositioning(positioningState);
58
+ const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePositioning(positioningState);
59
59
  // TODO Better way to narrow types ?
60
60
  const [open, setOpen] = useMenuOpenState({
61
61
  hoverDelay,
@@ -108,9 +108,9 @@ const submenuFallbackPositions = [
108
108
  defaultState: props.defaultCheckedValues,
109
109
  initialState: {}
110
110
  });
111
- const onCheckedValueChange = useEventCallback((e, { name , checkedItems })=>{
112
- var _props_onCheckedValueChange;
113
- (_props_onCheckedValueChange = props.onCheckedValueChange) === null || _props_onCheckedValueChange === void 0 ? void 0 : _props_onCheckedValueChange.call(props, e, {
111
+ const onCheckedValueChange = useEventCallback((e, { name, checkedItems })=>{
112
+ var _props_onCheckedValueChange, _props;
113
+ (_props_onCheckedValueChange = (_props = props).onCheckedValueChange) === null || _props_onCheckedValueChange === void 0 ? void 0 : _props_onCheckedValueChange.call(_props, e, {
114
114
  name,
115
115
  checkedItems
116
116
  });
@@ -125,11 +125,11 @@ const submenuFallbackPositions = [
125
125
  ];
126
126
  };
127
127
  const useMenuOpenState = (state)=>{
128
- const { targetDocument } = useFluent();
128
+ const { targetDocument } = useFluent();
129
129
  const parentSetOpen = useMenuContext_unstable((context)=>context.setOpen);
130
130
  const onOpenChange = useEventCallback((e, data)=>{
131
- var _state_onOpenChange;
132
- return (_state_onOpenChange = state.onOpenChange) === null || _state_onOpenChange === void 0 ? void 0 : _state_onOpenChange.call(state, e, data);
131
+ var _state_onOpenChange, _state;
132
+ return (_state_onOpenChange = (_state = state).onOpenChange) === null || _state_onOpenChange === void 0 ? void 0 : _state_onOpenChange.call(_state, e, data);
133
133
  });
134
134
  const setOpenTimeout = React.useRef(0);
135
135
  const enteringTriggerRef = React.useRef(false);
@@ -139,8 +139,9 @@ const useMenuOpenState = (state)=>{
139
139
  initialState: false
140
140
  });
141
141
  const trySetOpen = useEventCallback((e, data)=>{
142
+ var _onOpenChange;
142
143
  const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;
143
- onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(event, {
144
+ (_onOpenChange = onOpenChange) === null || _onOpenChange === void 0 ? void 0 : _onOpenChange(event, {
144
145
  ...data
145
146
  });
146
147
  if (data.open && e.type === 'contextmenu') {
@@ -231,10 +232,11 @@ const useMenuOpenState = (state)=>{
231
232
  };
232
233
  }, []);
233
234
  // Manage focus for open state
234
- const { findFirstFocusable } = useFocusFinders();
235
+ const { findFirstFocusable } = useFocusFinders();
235
236
  const focusFirst = React.useCallback(()=>{
237
+ var _firstFocusable;
236
238
  const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);
237
- firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
239
+ (_firstFocusable = firstFocusable) === null || _firstFocusable === void 0 ? void 0 : _firstFocusable.focus();
238
240
  }, [
239
241
  findFirstFocusable,
240
242
  state.menuPopoverRef
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n usePositioningMouseTarget,\n usePositioning,\n resolvePositioningShorthand,\n PositioningShorthandValue,\n} from '@fluentui/react-positioning';\nimport {\n useControllableState,\n useId,\n useOnClickOutside,\n useEventCallback,\n useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvent, MenuProps, MenuState } from './Menu.types';\n\n// If it's not possible to position the submenu in smaller viewports, try\n// and fallback to this order of positions\nconst submenuFallbackPositions: PositioningShorthandValue[] = [\n 'after',\n 'after-bottom',\n 'before-top',\n 'before',\n 'before-bottom',\n 'above',\n];\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = (props: MenuProps): MenuState => {\n const isSubmenu = useIsSubmenu();\n const {\n hoverDelay = 500,\n inline = false,\n hasCheckmarks = false,\n hasIcons = false,\n closeOnScroll = false,\n openOnContext = false,\n persistOnItemClick = false,\n openOnHover = isSubmenu,\n defaultCheckedValues,\n mountNode = null,\n } = props;\n const triggerId = useId('menu');\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n\n const positioningState = {\n position: isSubmenu ? 'after' : 'below',\n align: isSubmenu ? 'top' : 'start',\n target: props.openOnContext ? contextTarget : undefined,\n fallbackPositions: isSubmenu ? submenuFallbackPositions : undefined,\n ...resolvePositioningShorthand(props.positioning),\n } as const;\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at least one child');\n }\n\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n\n let menuTrigger: React.ReactElement | undefined = undefined;\n let menuPopover: React.ReactElement | undefined = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePositioning(positioningState);\n\n // TODO Better way to narrow types ?\n const [open, setOpen] = useMenuOpenState({\n hoverDelay,\n isSubmenu,\n setContextTarget,\n closeOnScroll,\n menuPopoverRef,\n triggerRef,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: props.onOpenChange,\n openOnContext,\n });\n\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState({\n checkedValues: props.checkedValues,\n defaultCheckedValues,\n onCheckedValueChange: props.onCheckedValueChange,\n });\n\n return {\n inline,\n hoverDelay,\n triggerId,\n isSubmenu,\n openOnHover,\n contextTarget,\n setContextTarget,\n hasCheckmarks,\n hasIcons,\n closeOnScroll,\n menuTrigger,\n menuPopover,\n mountNode,\n triggerRef,\n menuPopoverRef,\n components: {},\n openOnContext,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n persistOnItemClick,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n props: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues,\n defaultState: props.defaultCheckedValues,\n initialState: {},\n });\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n props.onCheckedValueChange?.(e, { name, checkedItems });\n\n setCheckedValues(currentValue => ({\n ...currentValue,\n [name]: checkedItems,\n }));\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<\n MenuState,\n | 'isSubmenu'\n | 'menuPopoverRef'\n | 'setContextTarget'\n | 'triggerRef'\n | 'openOnContext'\n | 'closeOnScroll'\n | 'hoverDelay'\n > &\n Pick<MenuProps, 'open' | 'defaultOpen' | 'onOpenChange'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\n const onOpenChange: MenuProps['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvent, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvent, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n callback: event => setOpen(event, { open: false, type: 'clickOutside', event }),\n });\n\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = state.openOnContext || state.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: event => setOpen(event, { open: false, type: 'scrollOutside', event }),\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n disabled: !open || !closeOnScroll,\n });\n\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: event => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(event, { open: false, type: 'menuMouseEnter', event });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n }, [open, focusFirst]);\n\n return [open, setOpen] as const;\n};\n"],"names":["React","usePositioningMouseTarget","usePositioning","resolvePositioningShorthand","useControllableState","useId","useOnClickOutside","useEventCallback","useOnScrollOutside","useFluent_unstable","useFluent","elementContains","useFocusFinders","useMenuContext_unstable","MENU_ENTER_EVENT","useOnMenuMouseEnter","useIsSubmenu","submenuFallbackPositions","useMenu_unstable","props","isSubmenu","hoverDelay","inline","hasCheckmarks","hasIcons","closeOnScroll","openOnContext","persistOnItemClick","openOnHover","defaultCheckedValues","mountNode","triggerId","contextTarget","setContextTarget","positioningState","position","align","target","undefined","fallbackPositions","positioning","children","Children","toArray","process","env","NODE_ENV","length","console","warn","menuTrigger","menuPopover","targetRef","triggerRef","containerRef","menuPopoverRef","open","setOpen","useMenuOpenState","defaultOpen","onOpenChange","checkedValues","onCheckedValueChange","useMenuSelectableState","components","setCheckedValues","state","defaultState","initialState","e","name","checkedItems","currentValue","targetDocument","parentSetOpen","context","data","setOpenTimeout","useRef","enteringTriggerRef","setOpenState","trySetOpen","event","CustomEvent","type","detail","nativeEvent","bubble","clearTimeout","current","Event","persist","contains","setTimeout","disabled","element","refs","filter","Boolean","callback","useEffect","findFirstFocusable","focusFirst","useCallback","firstFocusable","focus"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,yBAAyB,EACzBC,cAAc,EACdC,2BAA2B,QAEtB,8BAA8B;AACrC,SACEC,oBAAoB,EACpBC,KAAK,EACLC,iBAAiB,EACjBC,gBAAgB,EAChBC,kBAAkB,QACb,4BAA4B;AACnC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,uBAAuB,QAAQ,6BAA6B;AACrE,SAASC,gBAAgB,EAAEC,mBAAmB,QAAQ,oBAAoB;AAC1E,SAASC,YAAY,QAAQ,2BAA2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QAClBgF,SAAStB;QACT0B,UAAUjB,CAAAA,QAAS;YACjB,wFAAwF;YACxF,2DAA2D;YAC3D,IAAI,CAACH,mBAAmBU,OAAO,EAAE;gBAC/BhC,QAAQyB,OAAO;oBAAE1B,MAAM,KAAK;oBAAE4B,MAAM;oBAAkBF;gBAAM;YAC9D,CAAC;QACH;QACAY,UAAU,CAACtC;QACXwC,MAAM;YAAC9B,MAAMX,cAAc;SAAC;IAC9B;IAEA,2BAA2B;IAC3B,kEAAkE;IAClEvD,MAAMoG,SAAS,CAAC,IAAM;QACpB,OAAO,IAAM;YACXZ,aAAaX,eAAeY,OAAO;QACrC;IACF,GAAG,EAAE;IAEL,8BAA8B;IAC9B,MAAM,EAAEY,mBAAkB,EAAE,GAAGzF;IAC/B,MAAM0F,aAAatG,MAAMuG,WAAW,CAAC,IAAM;QACzC,MAAMC,iBAAiBH,mBAAmBnC,MAAMX,cAAc,CAACkC,OAAO;QACtEe,2BAAAA,4BAAAA,KAAAA,IAAAA,eAAgBC,KAAK;IACvB,GAAG;QAACJ;QAAoBnC,MAAMX,cAAc;KAAC;IAE7CvD,MAAMoG,SAAS,CAAC,IAAM;QACpB,IAAI5C,MAAM;YACR8C;QACF,CAAC;IACH,GAAG;QAAC9C;QAAM8C;KAAW;IAErB,OAAO;QAAC9C;QAAMC;KAAQ;AACxB"}
1
+ {"version":3,"sources":["useMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n usePositioningMouseTarget,\n usePositioning,\n resolvePositioningShorthand,\n PositioningShorthandValue,\n} from '@fluentui/react-positioning';\nimport {\n useControllableState,\n useId,\n useOnClickOutside,\n useEventCallback,\n useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvent, MenuProps, MenuState } from './Menu.types';\n\n// If it's not possible to position the submenu in smaller viewports, try\n// and fallback to this order of positions\nconst submenuFallbackPositions: PositioningShorthandValue[] = [\n 'after',\n 'after-bottom',\n 'before-top',\n 'before',\n 'before-bottom',\n 'above',\n];\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = (props: MenuProps): MenuState => {\n const isSubmenu = useIsSubmenu();\n const {\n hoverDelay = 500,\n inline = false,\n hasCheckmarks = false,\n hasIcons = false,\n closeOnScroll = false,\n openOnContext = false,\n persistOnItemClick = false,\n openOnHover = isSubmenu,\n defaultCheckedValues,\n mountNode = null,\n } = props;\n const triggerId = useId('menu');\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n\n const positioningState = {\n position: isSubmenu ? 'after' : 'below',\n align: isSubmenu ? 'top' : 'start',\n target: props.openOnContext ? contextTarget : undefined,\n fallbackPositions: isSubmenu ? submenuFallbackPositions : undefined,\n ...resolvePositioningShorthand(props.positioning),\n } as const;\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at least one child');\n }\n\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n\n let menuTrigger: React.ReactElement | undefined = undefined;\n let menuPopover: React.ReactElement | undefined = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePositioning(positioningState);\n\n // TODO Better way to narrow types ?\n const [open, setOpen] = useMenuOpenState({\n hoverDelay,\n isSubmenu,\n setContextTarget,\n closeOnScroll,\n menuPopoverRef,\n triggerRef,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: props.onOpenChange,\n openOnContext,\n });\n\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState({\n checkedValues: props.checkedValues,\n defaultCheckedValues,\n onCheckedValueChange: props.onCheckedValueChange,\n });\n\n return {\n inline,\n hoverDelay,\n triggerId,\n isSubmenu,\n openOnHover,\n contextTarget,\n setContextTarget,\n hasCheckmarks,\n hasIcons,\n closeOnScroll,\n menuTrigger,\n menuPopover,\n mountNode,\n triggerRef,\n menuPopoverRef,\n components: {},\n openOnContext,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n persistOnItemClick,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n props: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues,\n defaultState: props.defaultCheckedValues,\n initialState: {},\n });\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n props.onCheckedValueChange?.(e, { name, checkedItems });\n\n setCheckedValues(currentValue => ({\n ...currentValue,\n [name]: checkedItems,\n }));\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<\n MenuState,\n | 'isSubmenu'\n | 'menuPopoverRef'\n | 'setContextTarget'\n | 'triggerRef'\n | 'openOnContext'\n | 'closeOnScroll'\n | 'hoverDelay'\n > &\n Pick<MenuProps, 'open' | 'defaultOpen' | 'onOpenChange'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\n const onOpenChange: MenuProps['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvent, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvent, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n callback: event => setOpen(event, { open: false, type: 'clickOutside', event }),\n });\n\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = state.openOnContext || state.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: event => setOpen(event, { open: false, type: 'scrollOutside', event }),\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(\n Boolean,\n ) as React.MutableRefObject<HTMLElement>[],\n disabled: !open || !closeOnScroll,\n });\n\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: event => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(event, { open: false, type: 'menuMouseEnter', event });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n }, [open, focusFirst]);\n\n return [open, setOpen] as const;\n};\n"],"names":["React","usePositioningMouseTarget","usePositioning","resolvePositioningShorthand","useControllableState","useId","useOnClickOutside","useEventCallback","useOnScrollOutside","useFluent_unstable","useFluent","elementContains","useFocusFinders","useMenuContext_unstable","MENU_ENTER_EVENT","useOnMenuMouseEnter","useIsSubmenu","submenuFallbackPositions","useMenu_unstable","props","isSubmenu","hoverDelay","inline","hasCheckmarks","hasIcons","closeOnScroll","openOnContext","persistOnItemClick","openOnHover","defaultCheckedValues","mountNode","triggerId","contextTarget","setContextTarget","positioningState","position","align","target","undefined","fallbackPositions","positioning","children","Children","toArray","process","env","NODE_ENV","length","console","warn","menuTrigger","menuPopover","targetRef","triggerRef","containerRef","menuPopoverRef","open","setOpen","useMenuOpenState","defaultOpen","onOpenChange","checkedValues","onCheckedValueChange","useMenuSelectableState","components","setCheckedValues","state","defaultState","initialState","e","name","checkedItems","currentValue","targetDocument","parentSetOpen","context","data","setOpenTimeout","useRef","enteringTriggerRef","setOpenState","trySetOpen","event","CustomEvent","type","detail","nativeEvent","bubble","clearTimeout","current","Event","persist","contains","setTimeout","disabled","element","refs","filter","Boolean","callback","useEffect","findFirstFocusable","focusFirst","useCallback","firstFocusable","focus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AE1B,MAAM;gBAAO4B,MAAM;gBAAiBF;YAAM;QAC9Ec,MAAM;YAAC9B,MAAMX,cAAc;YAAE,CAACW,MAAMxC,aAAa,IAAIwC,MAAMb,UAAU;SAAC,CAAC4C,MAAM,CAC3EC;QAEFJ,UAAU,CAACtC,QAAQ,CAAC/B;IACtB;IAEAV,oBAAoB;QAClBgF,SAAStB;QACT0B,UAAUjB,CAAAA;YACR,wFAAwF;YACxF,2DAA2D;YAC3D,IAAI,CAACH,mBAAmBU,OAAO,EAAE;gBAC/BhC,QAAQyB,OAAO;oBAAE1B,MAAM;oBAAO4B,MAAM;oBAAkBF;gBAAM;YAC9D;QACF;QACAY,UAAU,CAACtC;QACXwC,MAAM;YAAC9B,MAAMX,cAAc;SAAC;IAC9B;IAEA,2BAA2B;IAC3B,kEAAkE;IAClEvD,MAAMoG,SAAS,CAAC;QACd,OAAO;YACLZ,aAAaX,eAAeY,OAAO;QACrC;IACF,GAAG,EAAE;IAEL,8BAA8B;IAC9B,MAAM,EAAEY,kBAAkB,EAAE,GAAGzF;IAC/B,MAAM0F,aAAatG,MAAMuG,WAAW,CAAC;YAEnCC;QADA,MAAMA,iBAAiBH,mBAAmBnC,MAAMX,cAAc,CAACkC,OAAO;SACtEe,kBAAAA,4BAAAA,sCAAAA,gBAAgBC,KAAK;IACvB,GAAG;QAACJ;QAAoBnC,MAAMX,cAAc;KAAC;IAE7CvD,MAAMoG,SAAS,CAAC;QACd,IAAI5C,MAAM;YACR8C;QACF;IACF,GAAG;QAAC9C;QAAM8C;KAAW;IAErB,OAAO;QAAC9C;QAAMC;KAAQ;AACxB"}
@@ -1,5 +1,5 @@
1
1
  export function useMenuContextValues_unstable(state) {
2
- const { checkedValues , hasCheckmarks , hasIcons , inline , isSubmenu , menuPopoverRef , mountNode , onCheckedValueChange , open , openOnContext , openOnHover , persistOnItemClick , setOpen , triggerId , triggerRef } = state;
2
+ const { checkedValues, hasCheckmarks, hasIcons, inline, isSubmenu, menuPopoverRef, mountNode, onCheckedValueChange, open, openOnContext, openOnHover, persistOnItemClick, setOpen, triggerId, triggerRef } = state;
3
3
  // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
4
4
  const menu = {
5
5
  checkedValues,
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuContextValues.ts"],"sourcesContent":["import type { MenuContextValues, MenuState } from './Menu.types';\n\nexport function useMenuContextValues_unstable(state: MenuState): MenuContextValues {\n const {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n mountNode,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menu = {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n mountNode,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n };\n\n return { menu };\n}\n"],"names":["useMenuContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","inline","isSubmenu","menuPopoverRef","mountNode","onCheckedValueChange","open","openOnContext","openOnHover","persistOnItemClick","setOpen","triggerId","triggerRef","menu"],"mappings":"AAEA,OAAO,SAASA,8BAA8BC,KAAgB,EAAqB;IACjF,MAAM,EACJC,cAAa,EACbC,cAAa,EACbC,SAAQ,EACRC,OAAM,EACNC,UAAS,EACTC,eAAc,EACdC,UAAS,EACTC,qBAAoB,EACpBC,KAAI,EACJC,cAAa,EACbC,YAAW,EACXC,mBAAkB,EAClBC,QAAO,EACPC,UAAS,EACTC,WAAU,EACX,GAAGf;IAEJ,mGAAmG;IACnG,MAAMgB,OAAO;QACXf;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAK;AAChB,CAAC"}
1
+ {"version":3,"sources":["useMenuContextValues.ts"],"sourcesContent":["import type { MenuContextValues, MenuState } from './Menu.types';\n\nexport function useMenuContextValues_unstable(state: MenuState): MenuContextValues {\n const {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n mountNode,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menu = {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n inline,\n isSubmenu,\n menuPopoverRef,\n mountNode,\n onCheckedValueChange,\n open,\n openOnContext,\n openOnHover,\n persistOnItemClick,\n setOpen,\n triggerId,\n triggerRef,\n };\n\n return { menu };\n}\n"],"names":["useMenuContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","inline","isSubmenu","menuPopoverRef","mountNode","onCheckedValueChange","open","openOnContext","openOnHover","persistOnItemClick","setOpen","triggerId","triggerRef","menu"],"mappings":"AAEA,OAAO,SAASA,8BAA8BC,KAAgB;IAC5D,MAAM,EACJC,aAAa,EACbC,aAAa,EACbC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,oBAAoB,EACpBC,IAAI,EACJC,aAAa,EACbC,WAAW,EACXC,kBAAkB,EAClBC,OAAO,EACPC,SAAS,EACTC,UAAU,EACX,GAAGf;IAEJ,mGAAmG;IACnG,MAAMgB,OAAO;QACXf;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAK;AAChB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles.styles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.\n */\nexport const MenuDivider: ForwardRefComponent<MenuDividerProps> = React.forwardRef((props, ref) => {\n const state = useMenuDivider_unstable(props, ref);\n\n useMenuDividerStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuDividerStyles_unstable')(state);\n\n return renderMenuDivider_unstable(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"],"names":["React","useMenuDivider_unstable","useMenuDividerStyles_unstable","renderMenuDivider_unstable","useCustomStyleHook_unstable","MenuDivider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,gCAAgC;AAC9E,SAASC,0BAA0B,QAAQ,sBAAsB;AAGjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACjG,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CN,8BAA8BO;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAON,2BAA2BM;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles.styles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.\n */\nexport const MenuDivider: ForwardRefComponent<MenuDividerProps> = React.forwardRef((props, ref) => {\n const state = useMenuDivider_unstable(props, ref);\n\n useMenuDividerStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuDividerStyles_unstable')(state);\n\n return renderMenuDivider_unstable(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"],"names":["React","useMenuDivider_unstable","useMenuDividerStyles_unstable","renderMenuDivider_unstable","useCustomStyleHook_unstable","MenuDivider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,gCAAgC;AAC9E,SAASC,0BAA0B,QAAQ,sBAAsB;AAGjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CN,8BAA8BO;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAON,2BAA2BM;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -1,9 +1,9 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Redefine the render function to add slots. Reuse the menudivider structure but add
5
5
  * slots to children.
6
6
  */ export const renderMenuDivider_unstable = (state)=>{
7
7
  assertSlots(state);
8
- return /*#__PURE__*/ createElement(state.root, null);
8
+ return /*#__PURE__*/ _jsx(state.root, {});
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuDivider.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menudivider structure but add\n * slots to children.\n */\nexport const renderMenuDivider_unstable = (state: MenuDividerState) => {\n assertSlots<MenuDividerSlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderMenuDivider_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;;CAGC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrEF,YAA8BE;IAE9B,qBAAO,AAbT,cAaUA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["renderMenuDivider.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menudivider structure but add\n * slots to children.\n */\nexport const renderMenuDivider_unstable = (state: MenuDividerState) => {\n assertSlots<MenuDividerSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuDivider_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;;CAGC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAE9B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuDivider.ts"],"sourcesContent":["import { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Given user props, returns state and render function for a MenuDivider.\n */\nexport const useMenuDivider_unstable = (props: MenuDividerProps, ref: React.Ref<HTMLElement>): MenuDividerState => {\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n role: 'presentation',\n 'aria-hidden': true,\n ...props,\n ref,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getNativeElementProps","slot","React","useMenuDivider_unstable","props","ref","components","root","always","role","elementType"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,YAAYC,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfR,sBAAsB,OAAO;YAC3BS,MAAM;YACN,eAAe,IAAI;YACnB,GAAGL,KAAK;YACRC;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useMenuDivider.ts"],"sourcesContent":["import { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Given user props, returns state and render function for a MenuDivider.\n */\nexport const useMenuDivider_unstable = (props: MenuDividerProps, ref: React.Ref<HTMLElement>): MenuDividerState => {\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n role: 'presentation',\n 'aria-hidden': true,\n ...props,\n ref,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getNativeElementProps","slot","React","useMenuDivider_unstable","props","ref","components","root","always","role","elementType"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,YAAYC,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfR,sBAAsB,OAAO;YAC3BS,MAAM;YACN,eAAe;YACf,GAAGL,KAAK;YACRC;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.\n */\nexport const MenuGroup: ForwardRefComponent<MenuGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroup_unstable(props, ref);\n const contextValues = useMenuGroupContextValues_unstable(state);\n\n useMenuGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuGroupStyles_unstable')(state);\n\n return renderMenuGroup_unstable(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"],"names":["React","useMenuGroup_unstable","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useCustomStyleHook_unstable","MenuGroup","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,kCAAkC,QAAQ,8BAA8B;AAGjF,SAASC,2BAA2B,QAAQ,8BAA8B;AAC1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDN,MAAMO,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC7F,MAAMC,QAAQT,sBAAsBO,OAAOC;IAC3C,MAAME,gBAAgBR,mCAAmCO;IAEzDN,4BAA4BM;IAE5BL,4BAA4B,+BAA+BK;IAE3D,OAAOR,yBAAyBQ,OAAOC;AACzC,GAAG;AAEHL,UAAUM,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.\n */\nexport const MenuGroup: ForwardRefComponent<MenuGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroup_unstable(props, ref);\n const contextValues = useMenuGroupContextValues_unstable(state);\n\n useMenuGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuGroupStyles_unstable')(state);\n\n return renderMenuGroup_unstable(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"],"names":["React","useMenuGroup_unstable","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useCustomStyleHook_unstable","MenuGroup","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,kCAAkC,QAAQ,8BAA8B;AAGjF,SAASC,2BAA2B,QAAQ,8BAA8B;AAC1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQT,sBAAsBO,OAAOC;IAC3C,MAAME,gBAAgBR,mCAAmCO;IAEzDN,4BAA4BM;IAE5BL,4BAA4B,+BAA+BK;IAE3D,OAAOR,yBAAyBQ,OAAOC;AACzC,GAAG;AAEHL,UAAUM,WAAW,GAAG"}
@@ -1,4 +1,4 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { MenuGroupContextProvider } from '../../contexts/menuGroupContext';
4
4
  /**
@@ -6,7 +6,8 @@ import { MenuGroupContextProvider } from '../../contexts/menuGroupContext';
6
6
  * slots to children.
7
7
  */ export const renderMenuGroup_unstable = (state, contextValues)=>{
8
8
  assertSlots(state);
9
- return /*#__PURE__*/ createElement(MenuGroupContextProvider, {
10
- value: contextValues.menuGroup
11
- }, /*#__PURE__*/ createElement(state.root, null));
9
+ return /*#__PURE__*/ _jsx(MenuGroupContextProvider, {
10
+ value: contextValues.menuGroup,
11
+ children: /*#__PURE__*/ _jsx(state.root, {})
12
+ });
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuGroup.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<MenuGroupSlots>(state);\n\n return (\n <MenuGroupContextProvider value={contextValues.menuGroup}>\n <state.root />\n </MenuGroupContextProvider>\n );\n};\n"],"names":["createElement","assertSlots","MenuGroupContextProvider","renderMenuGroup_unstable","state","contextValues","value","menuGroup","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,kCAAkC;AAE3E;;;CAGC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC,gBAA0C;IACxGJ,YAA4BG;IAE5B,qBACE,AAfJ,cAeKF;QAAyBI,OAAOD,cAAcE,SAAS;qBACtD,AAhBN,cAgBOH,MAAMI,IAAI;AAGjB,EAAE"}
1
+ {"version":3,"sources":["renderMenuGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<MenuGroupSlots>(state);\n\n return (\n <MenuGroupContextProvider value={contextValues.menuGroup}>\n <state.root />\n </MenuGroupContextProvider>\n );\n};\n"],"names":["assertSlots","MenuGroupContextProvider","renderMenuGroup_unstable","state","contextValues","value","menuGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,kCAAkC;AAE3E;;;CAGC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DJ,YAA4BG;IAE5B,qBACE,KAACF;QAAyBI,OAAOD,cAAcE,SAAS;kBACtD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } 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: slot.always(\n getNativeElementProps('div', {\n ref,\n 'aria-labelledby': headerId,\n role: 'group',\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["React","getNativeElementProps","useId","slot","useMenuGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAG/E;;CAEC,GACD,OAAO,SAASC,sBAAsBC,KAAqB,EAAEC,GAA2B,EAAkB;IACxG,MAAMC,WAAWL,MAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfT,sBAAsB,OAAO;YAC3BK;YACA,mBAAmBC;YACnBI,MAAM;YACN,GAAGN,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["useMenuGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } 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: slot.always(\n getNativeElementProps('div', {\n ref,\n 'aria-labelledby': headerId,\n role: 'group',\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["React","getNativeElementProps","useId","slot","useMenuGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAG/E;;CAEC,GACD,OAAO,SAASC,sBAAsBC,KAAqB,EAAEC,GAA2B;IACtF,MAAMC,WAAWL,MAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfT,sBAAsB,OAAO;YAC3BK;YACA,mBAAmBC;YACnBI,MAAM;YACN,GAAGN,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export function useMenuGroupContextValues_unstable(state) {
3
- const { headerId } = state;
3
+ const { headerId } = state;
4
4
  const menuGroup = React.useMemo(()=>({
5
5
  headerId
6
6
  }), [
@@ -1 +1 @@
1
- {"version":3,"sources":["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"],"names":["React","useMenuGroupContextValues_unstable","state","headerId","menuGroup","useMemo"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,mCAAmCC,KAAqB,EAA0B;IAChG,MAAM,EAAEC,SAAQ,EAAE,GAAGD;IACrB,MAAME,YAAYJ,MAAMK,OAAO,CAAC,IAAO,CAAA;YAAEF;QAAS,CAAA,GAAI;QAACA;KAAS;IAEhE,OAAO;QAAEC;IAAU;AACrB,CAAC"}
1
+ {"version":3,"sources":["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"],"names":["React","useMenuGroupContextValues_unstable","state","headerId","menuGroup","useMemo"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,mCAAmCC,KAAqB;IACtE,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAME,YAAYJ,MAAMK,OAAO,CAAC,IAAO,CAAA;YAAEF;QAAS,CAAA,GAAI;QAACA;KAAS;IAEhE,OAAO;QAAEC;IAAU;AACrB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuGroupHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles.styles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport type { MenuGroupHeaderProps } from './MenuGroupHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useMenuGroupHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuGroupHeaderStyles_unstable')(state);\n\n return renderMenuGroupHeader_unstable(state);\n});\n\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n"],"names":["React","useMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","renderMenuGroupHeader_unstable","useCustomStyleHook_unstable","MenuGroupHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,iCAAiC,QAAQ,oCAAoC;AACtF,SAASC,8BAA8B,QAAQ,0BAA0B;AAGzE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDN,kCAAkCO;IAElCL,4BAA4B,qCAAqCK;IAEjE,OAAON,+BAA+BM;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuGroupHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles.styles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport type { MenuGroupHeaderProps } from './MenuGroupHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useMenuGroupHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuGroupHeaderStyles_unstable')(state);\n\n return renderMenuGroupHeader_unstable(state);\n});\n\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n"],"names":["React","useMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","renderMenuGroupHeader_unstable","useCustomStyleHook_unstable","MenuGroupHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,iCAAiC,QAAQ,oCAAoC;AACtF,SAASC,8BAA8B,QAAQ,0BAA0B;AAGzE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDN,kCAAkCO;IAElCL,4BAA4B,qCAAqCK;IAEjE,OAAON,+BAA+BM;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
@@ -1,9 +1,9 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Redefine the render function to add slots. Reuse the menugroupheader structure but add
5
5
  * slots to children.
6
6
  */ export const renderMenuGroupHeader_unstable = (state)=>{
7
7
  assertSlots(state);
8
- return /*#__PURE__*/ createElement(state.root, null);
8
+ return /*#__PURE__*/ _jsx(state.root, {});
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<MenuGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderMenuGroupHeader_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;;CAGC,GACD,OAAO,MAAMC,iCAAiC,CAACC,QAAgC;IAC7EF,YAAkCE;IAElC,qBAAO,AAbT,cAaUA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["renderMenuGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<MenuGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGroupHeader_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;;CAGC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -4,7 +4,7 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
4
4
  /**
5
5
  * Given user props, returns state and render function for a MenuGroupHeader.
6
6
  */ export function useMenuGroupHeader_unstable(props, ref) {
7
- const { headerId: id } = useMenuGroupContext_unstable();
7
+ const { headerId: id } = useMenuGroupContext_unstable();
8
8
  return {
9
9
  components: {
10
10
  root: 'div'
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuGroupHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';\nimport { getNativeElementProps, slot } 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: slot.always(\n getNativeElementProps('div', {\n ref,\n id,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useMenuGroupContext_unstable","getNativeElementProps","slot","useMenuGroupHeader_unstable","props","ref","headerId","id","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;CAEC,GACD,OAAO,SAASC,4BACdC,KAA2B,EAC3BC,GAA2B,EACL;IACtB,MAAM,EAAEC,UAAUC,GAAE,EAAE,GAAGP;IAEzB,OAAO;QACLQ,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,KAAKQ,MAAM,CACfT,sBAAsB,OAAO;YAC3BI;YACAE;YACA,GAAGH,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF,CAAC"}
1
+ {"version":3,"sources":["useMenuGroupHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';\nimport { getNativeElementProps, slot } 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: slot.always(\n getNativeElementProps('div', {\n ref,\n id,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useMenuGroupContext_unstable","getNativeElementProps","slot","useMenuGroupHeader_unstable","props","ref","headerId","id","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;CAEC,GACD,OAAO,SAASC,4BACdC,KAA2B,EAC3BC,GAA2B;IAE3B,MAAM,EAAEC,UAAUC,EAAE,EAAE,GAAGP;IAEzB,OAAO;QACLQ,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,KAAKQ,MAAM,CACfT,sBAAsB,OAAO;YAC3BI;YACAE;YACA,GAAGH,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles.styles';\nimport type { MenuItemProps } from './MenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useMenuItemStyles_unstable')(state);\n\n return renderMenuItem_unstable(state);\n});\n\nMenuItem.displayName = 'MenuItem';\n"],"names":["React","useMenuItem_unstable","renderMenuItem_unstable","useMenuItemStyles_unstable","useCustomStyleHook_unstable","MenuItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC3F,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles.styles';\nimport type { MenuItemProps } from './MenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useMenuItemStyles_unstable')(state);\n\n return renderMenuItem_unstable(state);\n});\n\nMenuItem.displayName = 'MenuItem';\n"],"names":["React","useMenuItem_unstable","renderMenuItem_unstable","useMenuItemStyles_unstable","useCustomStyleHook_unstable","MenuItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -1,8 +1,16 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Function that renders the final JSX of the component
5
5
  */ export const renderMenuItem_unstable = (state)=>{
6
6
  assertSlots(state);
7
- return /*#__PURE__*/ createElement(state.root, null, state.checkmark && /*#__PURE__*/ createElement(state.checkmark, null), state.icon && /*#__PURE__*/ createElement(state.icon, null), state.content && /*#__PURE__*/ createElement(state.content, null), state.secondaryContent && /*#__PURE__*/ createElement(state.secondaryContent, null), state.submenuIndicator && /*#__PURE__*/ createElement(state.submenuIndicator, null));
7
+ return /*#__PURE__*/ _jsxs(state.root, {
8
+ children: [
9
+ state.checkmark && /*#__PURE__*/ _jsx(state.checkmark, {}),
10
+ state.icon && /*#__PURE__*/ _jsx(state.icon, {}),
11
+ state.content && /*#__PURE__*/ _jsx(state.content, {}),
12
+ state.secondaryContent && /*#__PURE__*/ _jsx(state.secondaryContent, {}),
13
+ state.submenuIndicator && /*#__PURE__*/ _jsx(state.submenuIndicator, {})
14
+ ]
15
+ });
8
16
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<MenuItemSlots>(state);\n\n return (\n <state.root>\n {state.checkmark && <state.checkmark />}\n {state.icon && <state.icon />}\n {state.content && <state.content />}\n {state.secondaryContent && <state.secondaryContent />}\n {state.submenuIndicator && <state.submenuIndicator />}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderMenuItem_unstable","state","root","checkmark","icon","content","secondaryContent","submenuIndicator"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,QAAyB;IAC/DF,YAA2BE;IAE3B,qBACE,AAbJ,cAaKA,MAAMC,IAAI,QACRD,MAAME,SAAS,kBAAI,AAd1B,cAc2BF,MAAME,SAAS,SACnCF,MAAMG,IAAI,kBAAI,AAfrB,cAesBH,MAAMG,IAAI,SACzBH,MAAMI,OAAO,kBAAI,AAhBxB,cAgByBJ,MAAMI,OAAO,SAC/BJ,MAAMK,gBAAgB,kBAAI,AAjBjC,cAiBkCL,MAAMK,gBAAgB,SACjDL,MAAMM,gBAAgB,kBAAI,AAlBjC,cAkBkCN,MAAMM,gBAAgB;AAGxD,EAAE"}
1
+ {"version":3,"sources":["renderMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<MenuItemSlots>(state);\n\n return (\n <state.root>\n {state.checkmark && <state.checkmark />}\n {state.icon && <state.icon />}\n {state.content && <state.content />}\n {state.secondaryContent && <state.secondaryContent />}\n {state.submenuIndicator && <state.submenuIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuItem_unstable","state","root","checkmark","icon","content","secondaryContent","submenuIndicator"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,SAAS,kBAAI,KAACF,MAAME,SAAS;YACnCF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YACzBH,MAAMI,OAAO,kBAAI,KAACJ,MAAMI,OAAO;YAC/BJ,MAAMK,gBAAgB,kBAAI,KAACL,MAAMK,gBAAgB;YACjDL,MAAMM,gBAAgB,kBAAI,KAACN,MAAMM,gBAAgB;;;AAGxD,EAAE"}