@fluentui/react-menu 0.0.0-nightlyf3ce1fbe1d20211110.1 → 0.0.0-nightlyfc5cfdc52420220215.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (375) hide show
  1. package/CHANGELOG.json +415 -30
  2. package/CHANGELOG.md +93 -17
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +111 -68
  5. package/lib/MenuSplitGroup.d.ts +1 -0
  6. package/lib/MenuSplitGroup.js +2 -0
  7. package/lib/MenuSplitGroup.js.map +1 -0
  8. package/lib/components/Menu/Menu.js +6 -6
  9. package/lib/components/Menu/Menu.js.map +1 -1
  10. package/lib/components/Menu/Menu.types.d.ts +1 -1
  11. package/lib/components/Menu/renderMenu.d.ts +1 -1
  12. package/lib/components/Menu/renderMenu.js +1 -1
  13. package/lib/components/Menu/renderMenu.js.map +1 -1
  14. package/lib/components/Menu/useMenu.d.ts +2 -2
  15. package/lib/components/Menu/useMenu.js +34 -26
  16. package/lib/components/Menu/useMenu.js.map +1 -1
  17. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  18. package/lib/components/Menu/useMenuContextValues.js +1 -1
  19. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  20. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  21. package/lib/components/MenuDivider/MenuDivider.js +7 -7
  22. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  23. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  24. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  25. package/lib/components/MenuDivider/renderMenuDivider.js +3 -2
  26. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  27. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  28. package/lib/components/MenuDivider/useMenuDivider.js +4 -1
  29. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  30. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js +3 -2
  32. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  34. package/lib/components/MenuGroup/MenuGroup.js +9 -9
  35. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  36. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  37. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  38. package/lib/components/MenuGroup/renderMenuGroup.js +3 -2
  39. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  40. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  41. package/lib/components/MenuGroup/useMenuGroup.js +4 -1
  42. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  43. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  44. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  45. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  46. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  47. package/lib/components/MenuGroup/useMenuGroupStyles.js +2 -2
  48. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  49. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  50. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
  51. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  52. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  53. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  54. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -2
  55. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  56. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  57. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +6 -3
  58. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  59. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  60. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -2
  61. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  62. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  63. package/lib/components/MenuItem/MenuItem.js +7 -9
  64. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  65. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  66. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  67. package/lib/components/MenuItem/renderMenuItem.js +9 -4
  68. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  69. package/lib/components/MenuItem/useCharacterSearch.js +2 -2
  70. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  71. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  72. package/lib/components/MenuItem/useMenuItem.js +11 -16
  73. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  74. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  75. package/lib/components/MenuItem/useMenuItemStyles.js +27 -24
  76. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  77. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  78. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  79. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  80. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  81. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +8 -4
  82. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  83. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  84. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  85. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  86. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  87. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +6 -6
  88. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  89. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  90. package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
  91. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  92. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  93. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +8 -4
  94. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  95. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  96. package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  97. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  98. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  99. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +6 -6
  100. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  101. package/lib/components/MenuList/MenuList.d.ts +1 -1
  102. package/lib/components/MenuList/MenuList.js +9 -9
  103. package/lib/components/MenuList/MenuList.js.map +1 -1
  104. package/lib/components/MenuList/MenuList.types.d.ts +4 -4
  105. package/lib/components/MenuList/index.d.ts +1 -1
  106. package/lib/components/MenuList/index.js +0 -1
  107. package/lib/components/MenuList/index.js.map +1 -1
  108. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  109. package/lib/components/MenuList/renderMenuList.js +3 -2
  110. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  111. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  112. package/lib/components/MenuList/useMenuList.js +11 -8
  113. package/lib/components/MenuList/useMenuList.js.map +1 -1
  114. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  115. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  116. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  117. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
  118. package/lib/components/MenuList/useMenuListStyles.js +5 -4
  119. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  120. package/lib/components/MenuPopover/MenuPopover.js +6 -6
  121. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  122. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  123. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  124. package/lib/components/MenuPopover/renderMenuPopover.js +5 -3
  125. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  126. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  127. package/lib/components/MenuPopover/useMenuPopover.js +11 -8
  128. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  129. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  130. package/lib/components/MenuPopover/useMenuPopoverStyles.js +9 -5
  131. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  132. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  133. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  134. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  135. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  136. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  137. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  138. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  139. package/lib/components/MenuSplitGroup/index.js +6 -0
  140. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  141. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  142. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  143. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  144. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  145. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  146. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  147. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  148. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  149. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  150. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  151. package/lib/components/MenuTrigger/MenuTrigger.js +5 -4
  152. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  153. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  154. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  155. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  156. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  157. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  158. package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
  159. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  160. package/lib/contexts/menuContext.d.ts +1 -1
  161. package/lib/contexts/menuContext.js +1 -1
  162. package/lib/contexts/menuContext.js.map +1 -1
  163. package/lib/contexts/menuGroupContext.d.ts +1 -1
  164. package/lib/contexts/menuGroupContext.js +1 -1
  165. package/lib/contexts/menuGroupContext.js.map +1 -1
  166. package/lib/contexts/menuListContext.d.ts +1 -1
  167. package/lib/contexts/menuListContext.js +1 -1
  168. package/lib/contexts/menuListContext.js.map +1 -1
  169. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  170. package/lib/contexts/menuTriggerContext.js +1 -1
  171. package/lib/contexts/menuTriggerContext.js.map +1 -1
  172. package/lib/index.d.ts +11 -10
  173. package/lib/index.js +11 -10
  174. package/lib/index.js.map +1 -1
  175. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  176. package/lib/selectable/useCheckmarkStyles.js +2 -2
  177. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  178. package/lib/utils/useIsSubmenu.js +2 -2
  179. package/lib/utils/useIsSubmenu.js.map +1 -1
  180. package/lib/utils/useOnMenuEnter.js.map +1 -1
  181. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  182. package/lib-commonjs/MenuSplitGroup.js +10 -0
  183. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  184. package/lib-commonjs/components/Menu/Menu.js +3 -3
  185. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  186. package/lib-commonjs/components/Menu/Menu.types.d.ts +1 -1
  187. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  188. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  189. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  190. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  191. package/lib-commonjs/components/Menu/useMenu.js +40 -33
  192. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  193. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  194. package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
  195. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  196. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  197. package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
  198. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  199. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  200. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  201. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +5 -4
  202. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  203. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  204. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +6 -3
  205. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  206. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  207. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
  208. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  209. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  210. package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
  211. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  212. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  213. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  214. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +5 -4
  215. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  216. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  217. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +6 -3
  218. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  219. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  220. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
  221. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  222. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  223. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -5
  224. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  225. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  226. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
  227. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  228. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  229. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  230. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +5 -4
  231. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  232. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  233. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +7 -4
  234. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  235. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  236. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
  237. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  238. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  239. package/lib-commonjs/components/MenuItem/MenuItem.js +4 -7
  240. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  241. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  242. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  243. package/lib-commonjs/components/MenuItem/renderMenuItem.js +11 -7
  244. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  245. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
  246. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  247. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  248. package/lib-commonjs/components/MenuItem/useMenuItem.js +11 -16
  249. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  250. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  251. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +36 -31
  252. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  253. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  254. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  255. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  256. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  257. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -7
  258. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  259. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  260. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  261. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  262. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  263. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +7 -7
  264. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  265. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  266. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
  267. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  268. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  269. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +10 -7
  270. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  271. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  272. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  273. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  274. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  275. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +7 -7
  276. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  277. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  278. package/lib-commonjs/components/MenuList/MenuList.js +5 -5
  279. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  280. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +4 -4
  281. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  282. package/lib-commonjs/components/MenuList/index.js +0 -2
  283. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  284. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  285. package/lib-commonjs/components/MenuList/renderMenuList.js +5 -4
  286. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  287. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  288. package/lib-commonjs/components/MenuList/useMenuList.js +12 -9
  289. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  290. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  291. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
  292. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  293. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
  294. package/lib-commonjs/components/MenuList/useMenuListStyles.js +9 -8
  295. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  296. package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
  297. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  298. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  299. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  300. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +7 -5
  301. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  302. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  303. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +12 -9
  304. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  305. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  306. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +14 -9
  307. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  308. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  309. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  310. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  311. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  312. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  313. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  314. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  315. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  316. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  317. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  318. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  319. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  320. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  321. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  322. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  323. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  324. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  325. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  326. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  327. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +3 -2
  328. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  329. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
  330. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  331. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
  332. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  333. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  334. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +176 -7
  335. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  336. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  337. package/lib-commonjs/contexts/menuContext.js +3 -3
  338. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  339. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  340. package/lib-commonjs/contexts/menuGroupContext.js +3 -3
  341. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  342. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  343. package/lib-commonjs/contexts/menuListContext.js +3 -3
  344. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  345. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  346. package/lib-commonjs/contexts/menuTriggerContext.js +3 -3
  347. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  348. package/lib-commonjs/index.d.ts +11 -10
  349. package/lib-commonjs/index.js +16 -14
  350. package/lib-commonjs/index.js.map +1 -1
  351. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  352. package/lib-commonjs/selectable/useCheckmarkStyles.js +6 -6
  353. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  354. package/lib-commonjs/utils/useIsSubmenu.js +1 -1
  355. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  356. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  357. package/package.json +15 -17
  358. package/lib/common/isConformant.d.ts +0 -4
  359. package/lib/common/isConformant.js +0 -12
  360. package/lib/common/isConformant.js.map +0 -1
  361. package/lib/common/mockUseMenuContext.d.ts +0 -7
  362. package/lib/common/mockUseMenuContext.js +0 -29
  363. package/lib/common/mockUseMenuContext.js.map +0 -1
  364. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  365. package/lib/components/MenuTrigger/useTriggerElement.js +0 -165
  366. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  367. package/lib-commonjs/common/isConformant.d.ts +0 -4
  368. package/lib-commonjs/common/isConformant.js +0 -23
  369. package/lib-commonjs/common/isConformant.js.map +0 -1
  370. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  371. package/lib-commonjs/common/mockUseMenuContext.js +0 -39
  372. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  373. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  374. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -180
  375. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
1
+ import { mergeClasses, __styles } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
2
3
  export const menuGroupHeaderClassName = 'fui-MenuGroupHeader';
3
4
 
4
5
  const useStyles = /*#__PURE__*/__styles({
@@ -16,7 +17,7 @@ const useStyles = /*#__PURE__*/__styles({
16
17
  "d": [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
17
18
  });
18
19
 
19
- export const useMenuGroupHeaderStyles = state => {
20
+ export const useMenuGroupHeaderStyles_unstable = state => {
20
21
  const styles = useStyles();
21
22
  state.root.className = mergeClasses(menuGroupHeaderClassName, styles.root, state.root.className);
22
23
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AAGA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAAgC;AACtE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,wBAAD,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;AAC/E,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,wBAAD,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  import type { MenuItemProps } from './MenuItem.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled MenuItem, using the `useMenuItem` and `useMenuItemStyles` hook.
4
+ * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
5
5
  */
6
6
  export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
@@ -1,17 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useMenuItem } from './useMenuItem';
3
- import { renderMenuItem } from './renderMenuItem';
4
- import { useMenuItemStyles } from './useMenuItemStyles';
5
- import { useCheckmarkStyles } from '../../selectable/index';
2
+ import { useMenuItem_unstable } from './useMenuItem';
3
+ import { renderMenuItem_unstable } from './renderMenuItem';
4
+ import { useMenuItemStyles_unstable } from './useMenuItemStyles';
6
5
  /**
7
- * Define a styled MenuItem, using the `useMenuItem` and `useMenuItemStyles` hook.
6
+ * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
8
7
  */
9
8
 
10
9
  export const MenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useMenuItem(props, ref);
12
- useMenuItemStyles(state);
13
- useCheckmarkStyles(state);
14
- return renderMenuItem(state);
10
+ const state = useMenuItem_unstable(props, ref);
11
+ useMenuItemStyles_unstable(state);
12
+ return renderMenuItem_unstable(state);
15
13
  });
16
14
  MenuItem.displayName = 'MenuItem';
17
15
  //# sourceMappingURL=MenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAKA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1F,QAAM,KAAK,GAAG,WAAW,CAAC,KAAD,EAAQ,GAAR,CAAzB;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1F,QAAM,KAAK,GAAG,oBAAoB,CAAC,KAAD,EAAQ,GAAR,CAAlC;AAEA,EAAA,0BAA0B,CAAC,KAAD,CAA1B;AACA,SAAO,uBAAuB,CAAC,KAAD,CAA9B;AACD,CAL2D,CAArD;AAOP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
@@ -1,28 +1,28 @@
1
- import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  export declare type MenuItemSlots = {
3
- root: IntrinsicShorthandProps<'div'>;
3
+ root: Slot<'div'>;
4
4
  /**
5
5
  * Icon slot rendered before children content
6
6
  */
7
- icon?: IntrinsicShorthandProps<'span'>;
7
+ icon?: Slot<'span'>;
8
8
  /**
9
9
  * A helper slot for alignment when a menu item is used with selectable menuitems
10
10
  * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components
11
11
  */
12
- checkmark?: IntrinsicShorthandProps<'span'>;
12
+ checkmark?: Slot<'span'>;
13
13
  /**
14
14
  * Icon slot that shows the indicator for a submenu
15
15
  */
16
- submenuIndicator?: IntrinsicShorthandProps<'span'>;
16
+ submenuIndicator?: Slot<'span'>;
17
17
  /**
18
18
  * Component children are placed in this slot
19
19
  * Avoid using the `children` property in this slot in favour of Component children whenever possible
20
20
  */
21
- content: IntrinsicShorthandProps<'span'>;
21
+ content?: Slot<'span'>;
22
22
  /**
23
23
  * Secondary content rendered opposite the primary content (e.g Shortcut text)
24
24
  */
25
- secondaryContent?: IntrinsicShorthandProps<'span'>;
25
+ secondaryContent?: Slot<'span'>;
26
26
  };
27
27
  declare type MenuItemCommons = {
28
28
  /**
@@ -2,4 +2,4 @@ import type { MenuItemState } from './MenuItem.types';
2
2
  /**
3
3
  * Function that renders the final JSX of the component
4
4
  */
5
- export declare const renderMenuItem: (state: MenuItemState) => JSX.Element;
5
+ export declare const renderMenuItem_unstable: (state: MenuItemState) => JSX.Element;
@@ -1,15 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { menuItemSlots } from './useMenuItem';
4
3
  /**
5
4
  * Function that renders the final JSX of the component
6
5
  */
7
6
 
8
- export const renderMenuItem = state => {
7
+ export const renderMenuItem_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
- } = getSlots(state, menuItemSlots);
13
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, Object.assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, Object.assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, Object.assign({}, slotProps.secondaryContent)), /*#__PURE__*/React.createElement(slots.submenuIndicator, Object.assign({}, slotProps.submenuIndicator)));
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
14
+ }), slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
15
+ }), slots.content && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
16
+ }), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
17
+ }), slots.submenuIndicator && /*#__PURE__*/React.createElement(slots.submenuIndicator, { ...slotProps.submenuIndicator
18
+ }));
14
19
  };
15
20
  //# sourceMappingURL=renderMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,eAA9B;AAGA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAAI,KAAD,IAAyB;AACrD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,EAAuB,aAAvB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,SAAf,CAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,OAAf,CAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CAJF,eAKE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CALF,CADF;AASD,CAZM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,SAAN,iBAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,iBAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,EAKG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAL7B,CADF;AASD,CAZM","sourceRoot":""}
@@ -1,6 +1,6 @@
1
- import { useMenuListContext } from '../../contexts/menuListContext';
1
+ import { useMenuListContext_unstable } from '../../contexts/menuListContext';
2
2
  export const useCharacterSearch = (state, ref) => {
3
- const setFocusByFirstCharacter = useMenuListContext(context => context.setFocusByFirstCharacter);
3
+ const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);
4
4
  const {
5
5
  onKeyDown: onKeyDownBase
6
6
  } = state.root;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":"AACA,SAAS,kBAAT,QAAmC,gCAAnC;AAGA,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;AAC5F,QAAM,wBAAwB,GAAG,kBAAkB,CAAC,OAAO,IAAI,OAAO,CAAC,wBAApB,CAAnD;AAEA,QAAM;AAAE,IAAA,SAAS,EAAE;AAAb,MAA+B,KAAK,CAAC,IAA3C;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,CAAC,IAAG;;;AACzB,QAAI,aAAJ,EAAmB;AACjB,MAAA,aAAa,CAAC,CAAD,CAAb;AACD;;AAED,QAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;AACrB;AACD;;AAED,QAAI,GAAG,CAAC,OAAR,EAAiB;AACf,MAAA,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;AACD;AACF,GAZD;;AAcA,SAAO,KAAP;AACD,CAnBM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":"AACA,SAAS,2BAAT,QAA4C,gCAA5C;AAGA,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;AAC5F,QAAM,wBAAwB,GAAG,2BAA2B,CAAC,OAAO,IAAI,OAAO,CAAC,wBAApB,CAA5D;AAEA,QAAM;AAAE,IAAA,SAAS,EAAE;AAAb,MAA+B,KAAK,CAAC,IAA3C;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,CAAC,IAAG;;;AACzB,QAAI,aAAJ,EAAmB;AACjB,MAAA,aAAa,CAAC,CAAD,CAAb;AACD;;AAED,QAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;AACrB;AACD;;AAED,QAAI,GAAG,CAAC,OAAR,EAAiB;AACf,MAAA,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;AACD;AACF,GAZD;;AAcA,SAAO,KAAP;AACD,CAnBM","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { MenuItemProps, MenuItemSlots, MenuItemState } from './MenuItem.types';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
- export declare const menuItemSlots: Array<keyof MenuItemSlots>;
2
+ import type { MenuItemProps, MenuItemState } from './MenuItem.types';
7
3
  /**
8
4
  * Returns the props and state required to render the component
9
5
  */
10
- export declare const useMenuItem: (props: MenuItemProps, ref: React.Ref<HTMLElement>) => MenuItemState;
6
+ export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React.Ref<HTMLElement>) => MenuItemState;
@@ -2,25 +2,20 @@ import * as React from 'react';
2
2
  import { useEventCallback, shouldPreventDefaultOnKeyDown, resolveShorthand, useMergedRefs, getNativeElementProps } from '@fluentui/react-utilities';
3
3
  import { useFluent } from '@fluentui/react-shared-contexts';
4
4
  import { useCharacterSearch } from './useCharacterSearch';
5
- import { useMenuTriggerContext } from '../../contexts/menuTriggerContext';
6
- import { ChevronRight20Regular as ChevronRightIcon, ChevronLeft20Regular as ChevronLeftIcon } from '@fluentui/react-icons';
7
- import { useMenuListContext } from '../../contexts/menuListContext';
8
- import { useMenuContext } from '../../contexts/menuContext';
9
- /**
10
- * Consts listing which props are shorthand props.
11
- */
12
-
13
- export const menuItemSlots = ['root', 'icon', 'submenuIndicator', 'content', 'secondaryContent', 'checkmark'];
5
+ import { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContext';
6
+ import { ChevronRightRegular as ChevronRightIcon, ChevronLeftRegular as ChevronLeftIcon } from '@fluentui/react-icons';
7
+ import { useMenuListContext_unstable } from '../../contexts/menuListContext';
8
+ import { useMenuContext_unstable } from '../../contexts/menuContext';
14
9
  /**
15
10
  * Returns the props and state required to render the component
16
11
  */
17
12
 
18
- export const useMenuItem = (props, ref) => {
19
- const hasSubmenu = useMenuTriggerContext();
20
- const hasIcons = useMenuListContext(context => context.hasIcons);
21
- const hasCheckmarks = useMenuListContext(context => context.hasCheckmarks);
22
- const setOpen = useMenuContext(context => context.setOpen);
23
- const persistOnClickContext = useMenuContext(context => context.persistOnItemClick);
13
+ export const useMenuItem_unstable = (props, ref) => {
14
+ const hasSubmenu = useMenuTriggerContext_unstable() || props.hasSubmenu;
15
+ const hasIcons = useMenuListContext_unstable(context => context.hasIcons);
16
+ const hasCheckmarks = useMenuListContext_unstable(context => context.hasCheckmarks);
17
+ const setOpen = useMenuContext_unstable(context => context.setOpen);
18
+ const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);
24
19
  const dismissedWithKeyboardRef = React.useRef(false);
25
20
  const {
26
21
  dir
@@ -57,7 +52,7 @@ export const useMenuItem = (props, ref) => {
57
52
  }
58
53
  }),
59
54
  content: resolveShorthand(props.content, {
60
- required: true,
55
+ required: !!props.children,
61
56
  defaultProps: {
62
57
  children: props.children
63
58
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAA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ourceRoot":""}
@@ -1,4 +1,4 @@
1
1
  import type { MenuItemState } from './MenuItem.types';
2
2
  export declare const menuItemClassName = "fui-MenuItem";
3
3
  /** Applies style classnames to slots */
4
- export declare const useMenuItemStyles: (state: MenuItemState) => void;
4
+ export declare const useMenuItemStyles_unstable: (state: MenuItemState) => void;
@@ -1,39 +1,32 @@
1
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
1
+ import { mergeClasses, __styles, shorthands } from '@griffel/react';
2
2
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
3
+ import { tokens } from '@fluentui/react-theme';
4
+ import { useCheckmarkStyles_unstable } from '../../selectable/index';
3
5
  export const menuItemClassName = 'fui-MenuItem';
4
6
 
5
7
  const useStyles = /*#__PURE__*/__styles({
6
8
  "focusIndicator": {
7
9
  "B486eqv": "f2hkw1w",
8
- "Bnmjwt4": "flfsvnh",
9
- "Jopkrh": ["f1781m5e", "flvaaa9"],
10
- "hhrs2v": "f50u1b5",
11
- "B7jbng7": ["flvaaa9", "f1781m5e"],
10
+ "B1bra5l": "fc85khu",
12
11
  "e8izhr": "f1pxpxw8",
13
12
  "in3gf6": "f1149fnl",
14
13
  "B1i23sz": "fd1orka",
15
14
  "ln9as": "fgtqheg",
16
15
  "Bfgg0yq": "fq7mjg8",
17
- "B7231uf": "fmqgchs",
18
- "Bxoolf0": ["f1lv6wi8", "famjx04"],
19
- "fo1iai": "f1nbyjd2",
20
- "Bh81ga8": ["famjx04", "f1lv6wi8"],
21
- "qztvpn": "f5n18is",
22
- "ge3ubn": ["f13az7yk", "f14kwzu1"],
23
- "F41yt0": "fneogx5",
24
- "Bxrdl85": ["f14kwzu1", "f13az7yk"],
16
+ "i16j1i": "fq9bj62",
17
+ "yxydaw": "fy07e8r",
25
18
  "B9sa02e": "f1ha6shg",
26
- "hzsgvt": "f1f43d5r",
27
- "Ba9tnbb": ["f1ib27sc", "f14s7j5v"],
28
- "Fpkomr": "f13oqbgc",
29
- "Bttdqvk": ["f14s7j5v", "f1ib27sc"],
19
+ "yaquy9": "f4ltwxu",
30
20
  "Bl8qd6i": "f1284xzw",
31
21
  "Byzgy54": "f14dru39",
32
22
  "mq8cyt": ["fvabyfg", "f12y1wz2"],
33
23
  "B1a67j7": ["f12y1wz2", "fvabyfg"]
34
24
  },
35
25
  "root": {
36
- "Dimara": "ft85np5",
26
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
27
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
28
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
29
+ "Btl43ni": ["fyu767a", "f1jar5jt"],
37
30
  "qhf8xq": "f10pi13n",
38
31
  "sj55zd": "f19n0e5",
39
32
  "De3pzq": "fxugw4r",
@@ -44,7 +37,8 @@ const useStyles = /*#__PURE__*/__styles({
44
37
  "Bt984gj": "f122n59",
45
38
  "Be2twd7": "fkhj508",
46
39
  "Bceei9c": "f1k6fduh",
47
- "rmohyg": "f4xv25i",
40
+ "i8kkvl": "f1q8lukm",
41
+ "Belr9w4": "f1ma2n7n",
48
42
  "Jwef8y": "f1knas48",
49
43
  "Bi91k9c": "fnwyq0v",
50
44
  "famaaq": "f1xqy1su"
@@ -64,11 +58,15 @@ const useStyles = /*#__PURE__*/__styles({
64
58
  },
65
59
  "icon": {
66
60
  "a9b677": "f64fuq3",
67
- "Bqenvij": "fjamq6b"
61
+ "Bqenvij": "fjamq6b",
62
+ "Be2twd7": "fe5j1ua",
63
+ "Bg96gwp": "fez10in"
68
64
  },
69
65
  "submenuIndicator": {
70
66
  "a9b677": "f64fuq3",
71
- "Bqenvij": "fjamq6b"
67
+ "Bqenvij": "fjamq6b",
68
+ "Be2twd7": "fe5j1ua",
69
+ "Bg96gwp": "fez10in"
72
70
  },
73
71
  "disabled": {
74
72
  "sj55zd": "f1s2aq7o",
@@ -77,17 +75,20 @@ const useStyles = /*#__PURE__*/__styles({
77
75
  }
78
76
  }, {
79
77
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
80
- "d": ["[data-keyboard-nav] .flfsvnh:focus{border-top-color:transparent;}", "[data-keyboard-nav] .f1781m5e:focus{border-right-color:transparent;}", "[data-keyboard-nav] .flvaaa9:focus{border-left-color:transparent;}", "[data-keyboard-nav] .f50u1b5:focus{border-bottom-color:transparent;}", "[data-keyboard-nav] .f1pxpxw8:focus:after{content:\"\";}", "[data-keyboard-nav] .f1149fnl:focus:after{position:absolute;}", "[data-keyboard-nav] .fd1orka:focus:after{pointer-events:none;}", "[data-keyboard-nav] .fgtqheg:focus:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fq7mjg8:focus:after{z-index:1;}", "[data-keyboard-nav] .fmqgchs:focus:after{border-top-style:solid;}", "[data-keyboard-nav] .f1lv6wi8:focus:after{border-right-style:solid;}", "[data-keyboard-nav] .famjx04:focus:after{border-left-style:solid;}", "[data-keyboard-nav] .f1nbyjd2:focus:after{border-bottom-style:solid;}", "[data-keyboard-nav] .f5n18is:focus:after{border-top-width:2px;}", "[data-keyboard-nav] .f13az7yk:focus:after{border-right-width:2px;}", "[data-keyboard-nav] .f14kwzu1:focus:after{border-left-width:2px;}", "[data-keyboard-nav] .fneogx5:focus:after{border-bottom-width:2px;}", "[data-keyboard-nav] .f1ha6shg:focus:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1f43d5r:focus:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1ib27sc:focus:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f14s7j5v:focus:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f13oqbgc:focus:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1284xzw:focus:after{top:-2px;}", "[data-keyboard-nav] .f14dru39:focus:after{bottom:-2px;}", "[data-keyboard-nav] .fvabyfg:focus:after{left:-2px;}", "[data-keyboard-nav] .f12y1wz2:focus:after{right:-2px;}", ".ft85np5{border-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1k6fduh{cursor:pointer;}", ".f4xv25i{gap:4px;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f161knb0{padding-left:2px;}", ".f12huiiw{padding-right:2px;}", ".f3rmtva{background-color:transparent;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"],
78
+ "d": ["[data-keyboard-nav] .fc85khu:focus{border-color:transparent;}", "[data-keyboard-nav] .f1pxpxw8:focus:after{content:\"\";}", "[data-keyboard-nav] .f1149fnl:focus:after{position:absolute;}", "[data-keyboard-nav] .fd1orka:focus:after{pointer-events:none;}", "[data-keyboard-nav] .fgtqheg:focus:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fq7mjg8:focus:after{z-index:1;}", "[data-keyboard-nav] .fq9bj62:focus:after{border-style:solid;}", "[data-keyboard-nav] .fy07e8r:focus:after{border-width:2px;}", "[data-keyboard-nav] .f1ha6shg:focus:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f4ltwxu:focus:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1284xzw:focus:after{top:-2px;}", "[data-keyboard-nav] .f14dru39:focus:after{bottom:-2px;}", "[data-keyboard-nav] .fvabyfg:focus:after{left:-2px;}", "[data-keyboard-nav] .f12y1wz2:focus:after{right:-2px;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1k6fduh{cursor:pointer;}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f161knb0{padding-left:2px;}", ".f12huiiw{padding-right:2px;}", ".f3rmtva{background-color:transparent;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".fe5j1ua{font-size:20px;}", ".fez10in{line-height:0;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"],
81
79
  "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
82
80
  "f": [".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}", ".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}"]
83
81
  });
84
82
  /** Applies style classnames to slots */
85
83
 
86
84
 
87
- export const useMenuItemStyles = state => {
85
+ export const useMenuItemStyles_unstable = state => {
88
86
  const styles = useStyles();
89
87
  state.root.className = mergeClasses(menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
90
- state.content.className = mergeClasses(styles.content, state.content.className);
88
+
89
+ if (state.content) {
90
+ state.content.className = mergeClasses(styles.content, state.content.className);
91
+ }
91
92
 
92
93
  if (state.secondaryContent) {
93
94
  state.secondaryContent.className = mergeClasses(!state.disabled && styles.secondaryContent, state.secondaryContent.className);
@@ -100,5 +101,7 @@ export const useMenuItemStyles = state => {
100
101
  if (state.submenuIndicator) {
101
102
  state.submenuIndicator.className = mergeClasses(styles.submenuIndicator, state.submenuIndicator.className);
102
103
  }
104
+
105
+ useCheckmarkStyles_unstable(state);
103
106
  };
104
107
  //# sourceMappingURL=useMenuItemStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AA4DA;;;AACA,OAAO,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AAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAAC,MAAM,CAAC,gBAAR,EAA0B,KAAK,CAAC,gBAAN,CAAuB,SAAjD,CAA/C;AACD;;AACD,EAAA,2BAA2B,CAAC,KAAD,CAA3B;AACD,CA7BM","sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  import type { MenuItemCheckboxProps } from './MenuItemCheckbox.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox` hook.
4
+ * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
5
5
  */
6
6
  export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useMenuItemCheckbox } from './useMenuItemCheckbox';
3
- import { renderMenuItemCheckbox } from './renderMenuItemCheckbox';
4
- import { useMenuItemCheckboxStyles } from './useMenuItemCheckboxStyles';
2
+ import { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';
3
+ import { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';
4
+ import { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles';
5
5
  /**
6
- * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox` hook.
6
+ * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
7
7
  */
8
8
 
9
9
  export const MenuItemCheckbox = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useMenuItemCheckbox(props, ref);
11
- useMenuItemCheckboxStyles(state);
12
- return renderMenuItemCheckbox(state);
10
+ const state = useMenuItemCheckbox_unstable(props, ref);
11
+ useMenuItemCheckboxStyles_unstable(state);
12
+ return renderMenuItemCheckbox_unstable(state);
13
13
  });
14
14
  MenuItemCheckbox.displayName = 'MenuItemCheckbox';
15
15
  //# sourceMappingURL=MenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,yBAAT,QAA0C,6BAA1C;AAIA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1G,QAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,EAAQ,GAAR,CAAjC;AACA,EAAA,yBAAyB,CAAC,KAAD,CAAzB;AAEA,SAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,WAAjB,GAA+B,kBAA/B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AACA,SAAS,kCAAT,QAAmD,6BAAnD;AAIA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1G,QAAM,KAAK,GAAG,4BAA4B,CAAC,KAAD,EAAQ,GAAR,CAA1C;AACA,EAAA,kCAAkC,CAAC,KAAD,CAAlC;AAEA,SAAO,+BAA+B,CAAC,KAAD,CAAtC;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,WAAjB,GAA+B,kBAA/B","sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';
2
2
  /** Function that renders the final JSX of the component */
3
- export declare const renderMenuItemCheckbox: (state: MenuItemCheckboxState) => JSX.Element;
3
+ export declare const renderMenuItemCheckbox_unstable: (state: MenuItemCheckboxState) => JSX.Element;
@@ -1,13 +1,17 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { menuItemSlots } from '../MenuItem/index';
4
3
  /** Function that renders the final JSX of the component */
5
4
 
6
- export const renderMenuItemCheckbox = state => {
5
+ export const renderMenuItemCheckbox_unstable = state => {
7
6
  const {
8
7
  slots,
9
8
  slotProps
10
- } = getSlots(state, menuItemSlots);
11
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, Object.assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, Object.assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, Object.assign({}, slotProps.secondaryContent)));
9
+ } = getSlots(state);
10
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
11
+ }, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
12
+ }), slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
13
+ }), slots.content && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
14
+ }), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
15
+ }));
12
16
  };
13
17
  //# sourceMappingURL=renderMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA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EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,iBAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,CADF;AAQD,CAXM","sourceRoot":""}
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox.types';
3
3
  /** Returns the props and state required to render the component */
4
- export declare const useMenuItemCheckbox: (props: MenuItemCheckboxProps, ref: React.Ref<HTMLElement>) => MenuItemCheckboxState;
4
+ export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React.Ref<HTMLElement>) => MenuItemCheckboxState;
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { resolveShorthand } from '@fluentui/react-utilities';
3
3
  import { Checkmark16Filled } from '@fluentui/react-icons';
4
- import { useMenuListContext } from '../../contexts/menuListContext';
5
- import { useMenuItem } from '../MenuItem/useMenuItem';
4
+ import { useMenuListContext_unstable } from '../../contexts/menuListContext';
5
+ import { useMenuItem_unstable } from '../MenuItem/useMenuItem';
6
6
  /** Returns the props and state required to render the component */
7
7
 
8
- export const useMenuItemCheckbox = (props, ref) => {
9
- const state = useMenuItem({
8
+ export const useMenuItemCheckbox_unstable = (props, ref) => {
9
+ const state = useMenuItem_unstable({
10
10
  role: 'menuitemcheckbox',
11
11
  persistOnClick: true,
12
12
  ...props,
@@ -17,11 +17,11 @@ export const useMenuItemCheckbox = (props, ref) => {
17
17
  required: true
18
18
  })
19
19
  }, ref);
20
- const toggleCheckbox = useMenuListContext(context => context.toggleCheckbox);
20
+ const toggleCheckbox = useMenuListContext_unstable(context => context.toggleCheckbox);
21
21
  const {
22
22
  onClick: onClickOriginal
23
23
  } = state.root;
24
- const checked = useMenuListContext(context => {
24
+ const checked = useMenuListContext_unstable(context => {
25
25
  var _a;
26
26
 
27
27
  const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,iBAAT,QAAkC,uBAAlC;AACA,SAAS,kBAAT,QAAmC,gCAAnC;AACA,SAAS,WAAT,QAA4B,yBAA5B;AAGA;;AACA,OAAO,MAAM,mBAAmB,GAAG,CACjC,KADiC,EAEjC,GAFiC,KAGR;AACzB,QAAM,KAAK,GAAG,WAAW,CACvB;AACE,IAAA,IAAI,EAAE,kBADR;AAEE,IAAA,cAAc,EAAE,IAFlB;AAGE,OAAG,KAHL;AAIE,IAAA,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;AAC3C,MAAA,YAAY,EAAE;AAAE,QAAA,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,iBAAD,EAAkB,IAAlB;AAAZ,OAD6B;AAE3C,MAAA,QAAQ,EAAE;AAFiC,KAAlB;AAJ7B,GADuB,EAUvB,GAVuB,CAAzB;AAaA,QAAM,cAAc,GAAG,kBAAkB,CAAC,OAAO,IAAI,OAAO,CAAC,cAApB,CAAzC;AACA,QAAM;AAAE,IAAA,OAAO,EAAE;AAAX,MAA+B,KAAK,CAAC,IAA3C;AACA,QAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,IAAG;;;AAC3C,UAAM,YAAY,GAAG,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AAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAd;AACA,IAAA,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;AACD,GATD;;AAWA,SAAO,KAAP;AACD,CAxCM","sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';
2
2
  export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
3
- export declare const useMenuItemCheckboxStyles: (state: MenuItemCheckboxState) => void;
3
+ export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => void;
@@ -1,10 +1,10 @@
1
- import { mergeClasses } from '@fluentui/react-make-styles';
2
- import { useCheckmarkStyles } from '../../selectable/index';
3
- import { useMenuItemStyles } from '../MenuItem/useMenuItemStyles';
1
+ import { mergeClasses } from '@griffel/react';
2
+ import { useCheckmarkStyles_unstable } from '../../selectable/index';
3
+ import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';
4
4
  export const menuItemCheckboxClassName = 'fui-MenuItemCheckbox';
5
- export const useMenuItemCheckboxStyles = state => {
5
+ export const useMenuItemCheckboxStyles_unstable = state => {
6
6
  state.root.className = mergeClasses(menuItemCheckboxClassName, state.root.className);
7
- useMenuItemStyles(state);
8
- useCheckmarkStyles(state);
7
+ useMenuItemStyles_unstable(state);
8
+ useCheckmarkStyles_unstable(state);
9
9
  };
10
10
  //# sourceMappingURL=useMenuItemCheckboxStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,6BAA7B;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,yBAAyB,GAAG,sBAAlC;AAEP,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAAiC;AACxE,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAD,EAA4B,KAAK,CAAC,IAAN,CAAW,SAAvC,CAAnC;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CALM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,2BAAT,QAA4C,wBAA5C;AACA,SAAS,0BAAT,QAA2C,+BAA3C;AAGA,OAAO,MAAM,yBAAyB,GAAG,sBAAlC;AAEP,OAAO,MAAM,kCAAkC,GAAI,KAAD,IAAiC;AACjF,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAD,EAA4B,KAAK,CAAC,IAAN,CAAW,SAAvC,CAAnC;AAEA,EAAA,0BAA0B,CAAC,KAAD,CAA1B;AACA,EAAA,2BAA2B,CAAC,KAAD,CAA3B;AACD,CALM","sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  import type { MenuItemRadioProps } from './MenuItemRadio.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled MenuItemRadio, using the `useMenuItemRadio` hook.
4
+ * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
5
5
  */
6
6
  export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useMenuItemRadio } from './useMenuItemRadio';
3
- import { renderMenuItemRadio } from './renderMenuItemRadio';
4
- import { useMenuItemRadioStyles } from './useMenuItemRadioStyles';
2
+ import { useMenuItemRadio_unstable } from './useMenuItemRadio';
3
+ import { renderMenuItemRadio_unstable } from './renderMenuItemRadio';
4
+ import { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles';
5
5
  /**
6
- * Define a styled MenuItemRadio, using the `useMenuItemRadio` hook.
6
+ * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
7
7
  */
8
8
 
9
9
  export const MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useMenuItemRadio(props, ref);
11
- useMenuItemRadioStyles(state);
12
- return renderMenuItemRadio(state);
10
+ const state = useMenuItemRadio_unstable(props, ref);
11
+ useMenuItemRadioStyles_unstable(state);
12
+ return renderMenuItemRadio_unstable(state);
13
13
  });
14
14
  MenuItemRadio.displayName = 'MenuItemRadio';
15
15
  //# sourceMappingURL=MenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,yBAAyB,CAAC,KAAD,EAAQ,GAAR,CAAvC;AACA,EAAA,+BAA+B,CAAC,KAAD,CAA/B;AAEA,SAAO,4BAA4B,CAAC,KAAD,CAAnC;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
@@ -3,4 +3,4 @@ import type { MenuItemRadioState } from './MenuItemRadio.types';
3
3
  * Redefine the render function to add slots. Reuse the menuitemradio structure but add
4
4
  * slots to children.
5
5
  */
6
- export declare const renderMenuItemRadio: (state: MenuItemRadioState) => JSX.Element;
6
+ export declare const renderMenuItemRadio_unstable: (state: MenuItemRadioState) => JSX.Element;