@fluentui/react-menu 0.0.0-nightlyebf02572f720211207.1 → 0.0.0-nightlyf3017f159620220222.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (429) hide show
  1. package/CHANGELOG.json +313 -29
  2. package/CHANGELOG.md +71 -16
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +112 -68
  5. package/lib/Menu.js.map +1 -1
  6. package/lib/MenuDivider.js.map +1 -1
  7. package/lib/MenuGroup.js.map +1 -1
  8. package/lib/MenuGroupHeader.js.map +1 -1
  9. package/lib/MenuItem.js.map +1 -1
  10. package/lib/MenuItemCheckbox.js.map +1 -1
  11. package/lib/MenuItemRadio.js.map +1 -1
  12. package/lib/MenuList.js.map +1 -1
  13. package/lib/MenuPopover.js.map +1 -1
  14. package/lib/MenuSplitGroup.d.ts +1 -0
  15. package/lib/MenuSplitGroup.js +2 -0
  16. package/lib/MenuSplitGroup.js.map +1 -0
  17. package/lib/MenuTrigger.js.map +1 -1
  18. package/lib/components/Menu/Menu.js +6 -6
  19. package/lib/components/Menu/Menu.js.map +1 -1
  20. package/lib/components/Menu/Menu.types.d.ts +1 -1
  21. package/lib/components/Menu/Menu.types.js.map +1 -1
  22. package/lib/components/Menu/index.js.map +1 -1
  23. package/lib/components/Menu/renderMenu.d.ts +1 -1
  24. package/lib/components/Menu/renderMenu.js +1 -1
  25. package/lib/components/Menu/renderMenu.js.map +1 -1
  26. package/lib/components/Menu/useMenu.d.ts +2 -2
  27. package/lib/components/Menu/useMenu.js +33 -25
  28. package/lib/components/Menu/useMenu.js.map +1 -1
  29. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  30. package/lib/components/Menu/useMenuContextValues.js +1 -1
  31. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  32. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  33. package/lib/components/MenuDivider/MenuDivider.js +7 -7
  34. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  35. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  36. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  37. package/lib/components/MenuDivider/index.js.map +1 -1
  38. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  39. package/lib/components/MenuDivider/renderMenuDivider.js +3 -2
  40. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  41. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  42. package/lib/components/MenuDivider/useMenuDivider.js +4 -1
  43. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  44. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  45. package/lib/components/MenuDivider/useMenuDividerStyles.js +3 -2
  46. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  47. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  48. package/lib/components/MenuGroup/MenuGroup.js +9 -9
  49. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  50. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  51. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  52. package/lib/components/MenuGroup/index.js.map +1 -1
  53. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  54. package/lib/components/MenuGroup/renderMenuGroup.js +3 -2
  55. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  56. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  57. package/lib/components/MenuGroup/useMenuGroup.js +4 -1
  58. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  59. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  60. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  61. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  62. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  63. package/lib/components/MenuGroup/useMenuGroupStyles.js +2 -2
  64. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  65. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  66. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
  67. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  68. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  69. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  70. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  71. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  72. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -2
  73. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  74. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  75. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +6 -3
  76. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  77. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  78. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -2
  79. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  80. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  81. package/lib/components/MenuItem/MenuItem.js +7 -9
  82. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  83. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  84. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  85. package/lib/components/MenuItem/index.js.map +1 -1
  86. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  87. package/lib/components/MenuItem/renderMenuItem.js +9 -4
  88. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  89. package/lib/components/MenuItem/useCharacterSearch.js +2 -2
  90. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  91. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  92. package/lib/components/MenuItem/useMenuItem.js +14 -16
  93. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  94. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  95. package/lib/components/MenuItem/useMenuItemStyles.js +21 -22
  96. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  97. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  98. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  99. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  100. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  101. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  102. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  103. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +8 -4
  104. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  105. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  106. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  107. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  108. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  109. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +6 -6
  110. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  111. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  112. package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
  113. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  114. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  115. package/lib/components/MenuItemRadio/index.js.map +1 -1
  116. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  117. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +8 -4
  118. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  119. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  120. package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  121. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  122. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  123. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +6 -6
  124. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  125. package/lib/components/MenuList/MenuList.d.ts +1 -1
  126. package/lib/components/MenuList/MenuList.js +9 -9
  127. package/lib/components/MenuList/MenuList.js.map +1 -1
  128. package/lib/components/MenuList/MenuList.types.d.ts +4 -4
  129. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  130. package/lib/components/MenuList/index.d.ts +1 -1
  131. package/lib/components/MenuList/index.js +0 -1
  132. package/lib/components/MenuList/index.js.map +1 -1
  133. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  134. package/lib/components/MenuList/renderMenuList.js +3 -2
  135. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  136. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  137. package/lib/components/MenuList/useMenuList.js +11 -8
  138. package/lib/components/MenuList/useMenuList.js.map +1 -1
  139. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  140. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  141. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  142. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
  143. package/lib/components/MenuList/useMenuListStyles.js +2 -2
  144. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  145. package/lib/components/MenuPopover/MenuPopover.js +6 -6
  146. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  147. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  148. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  149. package/lib/components/MenuPopover/index.js.map +1 -1
  150. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  151. package/lib/components/MenuPopover/renderMenuPopover.js +5 -3
  152. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  153. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  154. package/lib/components/MenuPopover/useMenuPopover.js +11 -8
  155. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  156. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  157. package/lib/components/MenuPopover/useMenuPopoverStyles.js +3 -2
  158. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  159. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  160. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  161. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  162. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  163. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  164. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  165. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  166. package/lib/components/MenuSplitGroup/index.js +6 -0
  167. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  168. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  169. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  170. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  171. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  172. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  173. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  174. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  175. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  176. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  177. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  178. package/lib/components/MenuTrigger/MenuTrigger.js +5 -4
  179. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  180. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  181. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  182. package/lib/components/MenuTrigger/index.js.map +1 -1
  183. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  184. package/lib/components/MenuTrigger/renderMenuTrigger.js +2 -2
  185. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  186. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  187. package/lib/components/MenuTrigger/useMenuTrigger.js +168 -5
  188. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  189. package/lib/components/index.js.map +1 -1
  190. package/lib/contexts/menuContext.d.ts +1 -1
  191. package/lib/contexts/menuContext.js +1 -1
  192. package/lib/contexts/menuContext.js.map +1 -1
  193. package/lib/contexts/menuGroupContext.d.ts +1 -1
  194. package/lib/contexts/menuGroupContext.js +1 -1
  195. package/lib/contexts/menuGroupContext.js.map +1 -1
  196. package/lib/contexts/menuListContext.d.ts +1 -1
  197. package/lib/contexts/menuListContext.js +1 -1
  198. package/lib/contexts/menuListContext.js.map +1 -1
  199. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  200. package/lib/contexts/menuTriggerContext.js +2 -2
  201. package/lib/contexts/menuTriggerContext.js.map +1 -1
  202. package/lib/index.d.ts +11 -10
  203. package/lib/index.js +11 -10
  204. package/lib/index.js.map +1 -1
  205. package/lib/selectable/index.js.map +1 -1
  206. package/lib/selectable/types.js.map +1 -1
  207. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  208. package/lib/selectable/useCheckmarkStyles.js +2 -2
  209. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  210. package/lib/utils/index.js.map +1 -1
  211. package/lib/utils/useIsSubmenu.js +2 -2
  212. package/lib/utils/useIsSubmenu.js.map +1 -1
  213. package/lib/utils/useOnMenuEnter.js.map +1 -1
  214. package/lib-commonjs/Menu.js.map +1 -1
  215. package/lib-commonjs/MenuDivider.js.map +1 -1
  216. package/lib-commonjs/MenuGroup.js.map +1 -1
  217. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  218. package/lib-commonjs/MenuItem.js.map +1 -1
  219. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  220. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  221. package/lib-commonjs/MenuList.js.map +1 -1
  222. package/lib-commonjs/MenuPopover.js.map +1 -1
  223. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  224. package/lib-commonjs/MenuSplitGroup.js +10 -0
  225. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  226. package/lib-commonjs/MenuTrigger.js.map +1 -1
  227. package/lib-commonjs/components/Menu/Menu.js +3 -3
  228. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  229. package/lib-commonjs/components/Menu/Menu.types.d.ts +1 -1
  230. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  231. package/lib-commonjs/components/Menu/index.js.map +1 -1
  232. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  233. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  234. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  235. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  236. package/lib-commonjs/components/Menu/useMenu.js +38 -31
  237. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  238. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  239. package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
  240. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  241. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  242. package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
  243. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  244. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  245. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  246. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  247. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  248. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +5 -4
  249. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  250. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  251. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +6 -3
  252. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  253. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  254. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
  255. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  256. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  257. package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
  258. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  259. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  260. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  261. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  262. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  263. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +5 -4
  264. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  265. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  266. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +6 -3
  267. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  268. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  269. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
  270. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  271. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  272. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -5
  273. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  274. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  275. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
  276. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  277. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  278. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  279. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  280. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  281. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +5 -4
  282. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  283. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  284. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +7 -4
  285. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  286. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  287. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
  288. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  289. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  290. package/lib-commonjs/components/MenuItem/MenuItem.js +4 -7
  291. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  292. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  293. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  294. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  295. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  296. package/lib-commonjs/components/MenuItem/renderMenuItem.js +11 -7
  297. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  298. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
  299. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  300. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  301. package/lib-commonjs/components/MenuItem/useMenuItem.js +13 -15
  302. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  303. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  304. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +30 -29
  305. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  306. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  307. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  308. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  309. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  310. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  311. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  312. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +10 -7
  313. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  314. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  315. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  316. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  317. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  318. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +7 -7
  319. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  320. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  321. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
  322. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  323. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  324. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  325. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  326. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +10 -7
  327. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  328. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  329. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  330. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  331. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  332. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +7 -7
  333. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  334. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  335. package/lib-commonjs/components/MenuList/MenuList.js +5 -5
  336. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  337. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +4 -4
  338. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  339. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  340. package/lib-commonjs/components/MenuList/index.js +0 -2
  341. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  342. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  343. package/lib-commonjs/components/MenuList/renderMenuList.js +5 -4
  344. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  345. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  346. package/lib-commonjs/components/MenuList/useMenuList.js +12 -9
  347. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  348. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  349. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
  350. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  351. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
  352. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -6
  353. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  354. package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
  355. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  356. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  357. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  358. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  359. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  360. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +7 -5
  361. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  362. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  363. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +12 -9
  364. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  365. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  366. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +8 -6
  367. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  368. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  369. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  370. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  371. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  372. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  373. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  374. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  375. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  376. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  377. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  378. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  379. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  380. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  381. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  382. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  383. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  384. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  385. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  386. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  387. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +3 -2
  388. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  389. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  390. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  391. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  392. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  393. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +4 -4
  394. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  395. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  396. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +177 -7
  397. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  398. package/lib-commonjs/components/index.js.map +1 -1
  399. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  400. package/lib-commonjs/contexts/menuContext.js +3 -3
  401. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  402. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  403. package/lib-commonjs/contexts/menuGroupContext.js +3 -3
  404. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  405. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  406. package/lib-commonjs/contexts/menuListContext.js +3 -3
  407. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  408. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  409. package/lib-commonjs/contexts/menuTriggerContext.js +4 -4
  410. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  411. package/lib-commonjs/index.d.ts +11 -10
  412. package/lib-commonjs/index.js +16 -14
  413. package/lib-commonjs/index.js.map +1 -1
  414. package/lib-commonjs/selectable/index.js.map +1 -1
  415. package/lib-commonjs/selectable/types.js.map +1 -1
  416. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  417. package/lib-commonjs/selectable/useCheckmarkStyles.js +6 -6
  418. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  419. package/lib-commonjs/utils/index.js.map +1 -1
  420. package/lib-commonjs/utils/useIsSubmenu.js +1 -1
  421. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  422. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  423. package/package.json +13 -15
  424. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  425. package/lib/components/MenuTrigger/useTriggerElement.js +0 -165
  426. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  427. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  428. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -180
  429. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -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;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AA,CAArB,GAAqB,KAAA,CAArB,GAAqB,EAAA,CAAG,KAAK,CAAC,IAAT,CAArB,KAAuC,EAA5D;AACA,WAAO,YAAY,CAAC,OAAb,CAAqB,KAAK,CAAC,KAA3B,MAAsC,CAAC,CAA9C;AACD,GAH0C,CAA3C;AAKA,EAAA,KAAK,CAAC,OAAN,GAAgB,OAAhB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,cAAX,IAA6B,KAAK,CAAC,OAAnC,CAtByB,CAwBzB;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,OAAX,GAAqB,CAAC,IAAG;AACvB,QAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,MAAA,CAAC,CAAC,cAAF;AACA,MAAA,CAAC,CAAC,eAAF;AACA;AACD;;AAED,IAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAG,CAAH,EAAM,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","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\nimport type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox.types';\n\n/** Returns the props and state required to render the component */\nexport const useMenuItemCheckbox_unstable = (\n props: MenuItemCheckboxProps,\n ref: React.Ref<HTMLElement>,\n): MenuItemCheckboxState => {\n const state = useMenuItem_unstable(\n {\n role: 'menuitemcheckbox',\n persistOnClick: true,\n ...props,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: { children: <Checkmark16Filled /> },\n required: true,\n }),\n },\n ref,\n ) as MenuItemCheckboxState;\n\n const toggleCheckbox = useMenuListContext_unstable(context => context.toggleCheckbox);\n const { onClick: onClickOriginal } = state.root;\n const checked = useMenuListContext_unstable(context => {\n const checkedItems = context.checkedValues?.[state.name] || [];\n return checkedItems.indexOf(state.value) !== -1;\n });\n\n state.checked = checked;\n state.root['aria-checked'] = state.checked;\n\n // MenuItem state already transforms keyDown to click events\n state.root.onClick = e => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n toggleCheckbox?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -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":["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","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nimport type { MenuItemCheckboxState } from './MenuItemCheckbox.types';\n\nexport const menuItemCheckboxClassName = 'fui-MenuItemCheckbox';\n\nexport const useMenuItemCheckboxStyles_unstable = (state: MenuItemCheckboxState) => {\n state.root.className = mergeClasses(menuItemCheckboxClassName, state.root.className);\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"sourceRoot":"../src/"}
@@ -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":["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","sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles';\nimport type { MenuItemRadioProps } from './MenuItemRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */\nexport const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemRadio_unstable(props, ref);\n useMenuItemRadioStyles_unstable(state);\n\n return renderMenuItemRadio_unstable(state);\n});\n\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItemRadio.types.js","sourceRoot":"","sources":["../../../src/components/MenuItemRadio/MenuItemRadio.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"MenuItemRadio.types.js","sourceRoot":"../src/","sources":["components/MenuItemRadio/MenuItemRadio.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';\nimport type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;\n\nexport type MenuItemRadioState = MenuItemState & MenuItemSelectableState;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuItemRadio/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/MenuItemRadio/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n"]}
@@ -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;
@@ -1,16 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { menuItemSlots } from '../MenuItem/index';
4
3
  /**
5
4
  * Redefine the render function to add slots. Reuse the menuitemradio structure but add
6
5
  * slots to children.
7
6
  */
8
7
 
9
- export const renderMenuItemRadio = state => {
8
+ export const renderMenuItemRadio_unstable = state => {
10
9
  const {
11
10
  slots,
12
11
  slotProps
13
- } = getSlots(state, menuItemSlots);
14
- 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)));
12
+ } = getSlots(state);
13
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
14
+ }, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
15
+ }), slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
16
+ }), slots.content && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
17
+ }), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
18
+ }));
15
19
  };
16
20
  //# sourceMappingURL=renderMenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA;;;AAGG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAA8B;AAC/D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,EAAuB,aAAvB,CAArC;AAEA,sBACE,KAAA,CAA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jB,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","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuItemRadioState } from './MenuItemRadio.types';\nimport type { MenuItemSlots } from '../MenuItem/MenuItem.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menuitemradio structure but add\n * slots to children.\n */\nexport const renderMenuItemRadio_unstable = (state: MenuItemRadioState) => {\n const { slots, slotProps } = getSlots<MenuItemSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.checkmark && <slots.checkmark {...slotProps.checkmark} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.content && <slots.content {...slotProps.content} />}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ import type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio.typ
3
3
  /**
4
4
  * Given user props, returns state and render function for a MenuItemRadio.
5
5
  */
6
- export declare const useMenuItemRadio: (props: MenuItemRadioProps, ref: React.Ref<HTMLElement>) => MenuItemRadioState;
6
+ export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React.Ref<HTMLElement>) => MenuItemRadioState;
@@ -1,17 +1,17 @@
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
  /**
7
7
  * Given user props, returns state and render function for a MenuItemRadio.
8
8
  */
9
9
 
10
- export const useMenuItemRadio = (props, ref) => {
10
+ export const useMenuItemRadio_unstable = (props, ref) => {
11
11
  const radioProps = {
12
12
  role: 'menuitemradio'
13
13
  };
14
- const state = useMenuItem({ ...radioProps,
14
+ const state = useMenuItem_unstable({ ...radioProps,
15
15
  ...props,
16
16
  checkmark: resolveShorthand(props.checkmark, {
17
17
  defaultProps: {
@@ -20,11 +20,11 @@ export const useMenuItemRadio = (props, ref) => {
20
20
  required: true
21
21
  })
22
22
  }, ref);
23
- const selectRadio = useMenuListContext(context => context.selectRadio);
23
+ const selectRadio = useMenuListContext_unstable(context => context.selectRadio);
24
24
  const {
25
25
  onClick: onClickOriginal
26
26
  } = state.root;
27
- const checked = useMenuListContext(context => {
27
+ const checked = useMenuListContext_unstable(context => {
28
28
  var _a;
29
29
 
30
30
  const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadio.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;;AAEG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAA4B,GAA5B,KAA+E;AAC7G,QAAM,UAAU,GAAG;AACjB,IAAA,IAAI,EAAE;AADW,GAAnB;AAIA,QAAM,KAAK,GAAG,WAAW,CACvB,EACE,GAAG,UADL;AAEE,OAAG,KAFL;AAGE,IAAA,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;AAC3C,MAAA,YAAY,EAAE;AAAE,QAAA,Q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AAN,GAAgB,OAAhB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,cAAX,IAA6B,KAAK,CAAC,OAAnC,CAzBsB,CA2BtB;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,OAAX,GAAqB,CAAC,IAAG;AACvB,QAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,MAAA,CAAC,CAAC,cAAF;AACA,MAAA,CAAC,CAAC,eAAF;AACA;AACD;;AAED,IAAA,WAAW,KAAA,IAAX,IAAA,WAAW,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAA,WAAW,CAAG,CAAH,EAAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAX;AACA,IAAA,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;AACD,GATD;;AAWA,SAAO,KAAP;AACD,CA3CM","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\nimport type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio.types';\n\n/**\n * Given user props, returns state and render function for a MenuItemRadio.\n */\nexport const useMenuItemRadio_unstable = (\n props: MenuItemRadioProps,\n ref: React.Ref<HTMLElement>,\n): MenuItemRadioState => {\n const radioProps = {\n role: 'menuitemradio',\n };\n\n const state = useMenuItem_unstable(\n {\n ...radioProps,\n ...props,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: { children: <Checkmark16Filled /> },\n required: true,\n }),\n },\n ref,\n ) as MenuItemRadioState;\n\n const selectRadio = useMenuListContext_unstable(context => context.selectRadio);\n const { onClick: onClickOriginal } = state.root;\n const checked = useMenuListContext_unstable(context => {\n const checkedItems = context.checkedValues?.[state.name] || [];\n return checkedItems.indexOf(state.value) !== -1;\n });\n\n state.checked = checked;\n state.root['aria-checked'] = state.checked;\n\n // MenuItem state already transforms keyDown to click events\n state.root.onClick = e => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n selectRadio?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,3 +1,3 @@
1
1
  import type { MenuItemRadioState } from './MenuItemRadio.types';
2
2
  export declare const menuItemRadioClassName = "fui-MenuItemRadio";
3
- export declare const useMenuItemRadioStyles: (state: MenuItemRadioState) => void;
3
+ export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => 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 menuItemRadioClassName = 'fui-MenuItemRadio';
5
- export const useMenuItemRadioStyles = state => {
5
+ export const useMenuItemRadioStyles_unstable = state => {
6
6
  state.root.className = mergeClasses(menuItemRadioClassName, state.root.className);
7
- useMenuItemStyles(state);
8
- useCheckmarkStyles(state);
7
+ useMenuItemStyles_unstable(state);
8
+ useCheckmarkStyles_unstable(state);
9
9
  };
10
10
  //# sourceMappingURL=useMenuItemRadioStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,6BAA7B;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,sBAAsB,GAAG,mBAA/B;AAEP,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAA8B;AAClE,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,sBAAD,EAAyB,KAAK,CAAC,IAAN,CAAW,SAApC,CAAnC;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CALM","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemRadio/useMenuItemRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,2BAAT,QAA4C,wBAA5C;AACA,SAAS,0BAAT,QAA2C,+BAA3C;AAGA,OAAO,MAAM,sBAAsB,GAAG,mBAA/B;AAEP,OAAO,MAAM,+BAA+B,GAAI,KAAD,IAA8B;AAC3E,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,sBAAD,EAAyB,KAAK,CAAC,IAAN,CAAW,SAApC,CAAnC;AAEA,EAAA,0BAA0B,CAAC,KAAD,CAA1B;AACA,EAAA,2BAA2B,CAAC,KAAD,CAA3B;AACD,CALM","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nimport type { MenuItemRadioState } from './MenuItemRadio.types';\n\nexport const menuItemRadioClassName = 'fui-MenuItemRadio';\n\nexport const useMenuItemRadioStyles_unstable = (state: MenuItemRadioState) => {\n state.root.className = mergeClasses(menuItemRadioClassName, state.root.className);\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
1
  import type { MenuListProps } from './MenuList.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled MenuList, using the `useMenuList` hook.
4
+ * Define a styled MenuList, using the `useMenuList_unstable` hook.
5
5
  */
6
6
  export declare const MenuList: ForwardRefComponent<MenuListProps>;
@@ -1,17 +1,17 @@
1
1
  import * as React from 'react';
2
- import { useMenuList } from './useMenuList';
3
- import { renderMenuList } from './renderMenuList';
4
- import { useMenuListContextValues } from './useMenuListContextValues';
5
- import { useMenuListStyles } from './useMenuListStyles';
2
+ import { useMenuList_unstable } from './useMenuList';
3
+ import { renderMenuList_unstable } from './renderMenuList';
4
+ import { useMenuListContextValues_unstable } from './useMenuListContextValues';
5
+ import { useMenuListStyles_unstable } from './useMenuListStyles';
6
6
  /**
7
- * Define a styled MenuList, using the `useMenuList` hook.
7
+ * Define a styled MenuList, using the `useMenuList_unstable` hook.
8
8
  */
9
9
 
10
10
  export const MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useMenuList(props, ref);
12
- const contextValues = useMenuListContextValues(state);
13
- useMenuListStyles(state);
14
- return renderMenuList(state, contextValues);
11
+ const state = useMenuList_unstable(props, ref);
12
+ const contextValues = useMenuListContextValues_unstable(state);
13
+ useMenuListStyles_unstable(state);
14
+ return renderMenuList_unstable(state, contextValues);
15
15
  });
16
16
  MenuList.displayName = 'MenuList';
17
17
  //# sourceMappingURL=MenuList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,wBAAT,QAAyC,4BAAzC;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AAIA;;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;AACA,QAAM,aAAa,GAAG,wBAAwB,CAAC,KAAD,CAA9C;AACA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AAEA,SAAO,cAAc,CAAC,KAAD,EAAQ,aAAR,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuList/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,iCAAT,QAAkD,4BAAlD;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;AACA,QAAM,aAAa,GAAG,iCAAiC,CAAC,KAAD,CAAvD;AACA,EAAA,0BAA0B,CAAC,KAAD,CAA1B;AAEA,SAAO,uBAAuB,CAAC,KAAD,EAAQ,aAAR,CAA9B;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles';\nimport type { MenuListProps } from './MenuList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList: ForwardRefComponent<MenuListProps> = React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n useMenuListStyles_unstable(state);\n\n return renderMenuList_unstable(state, contextValues);\n});\n\nMenuList.displayName = 'MenuList';\n"],"sourceRoot":"../src/"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
3
- import { MenuListContextValue } from '../../contexts/menuListContext';
4
- import { SelectableHandler } from '../../selectable/index';
2
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
+ import type { MenuListContextValue } from '../../contexts/menuListContext';
4
+ import type { SelectableHandler } from '../../selectable/index';
5
5
  export declare type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;
6
6
  export declare type MenuCheckedValueChangeData = {
7
7
  /** The name of the value */
@@ -35,7 +35,7 @@ export declare type MenuListCommons = {
35
35
  hasCheckmarks?: boolean;
36
36
  };
37
37
  export declare type MenuListSlots = {
38
- root: IntrinsicShorthandProps<'div'>;
38
+ root: Slot<'div'>;
39
39
  };
40
40
  export declare type MenuListProps = ComponentProps<MenuListSlots> & Partial<MenuListCommons>;
41
41
  export declare type MenuListState = ComponentState<MenuListSlots> & MenuListCommons & {
@@ -1 +1 @@
1
- {"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../../src/components/MenuList/MenuList.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"MenuList.types.js","sourceRoot":"../src/","sources":["components/MenuList/MenuList.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuListContextValue } from '../../contexts/menuListContext';\nimport type { SelectableHandler } from '../../selectable/index';\n\nexport type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;\n\nexport type MenuCheckedValueChangeData = {\n /** The name of the value */\n name: string;\n /** The items for this value that are checked */\n checkedItems: string[];\n};\n\nexport type MenuListCommons = {\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n */\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n\n /**\n * Map of all checked values\n */\n checkedValues: Record<string, string[]>;\n\n /**\n * Default values to be checked on mount\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * States that menu items can contain icons and reserve slots for item alignment\n */\n hasIcons?: boolean;\n\n /**\n * States that menu items can contain selectable items and reserve slots for item alignment\n */\n hasCheckmarks?: boolean;\n};\n\nexport type MenuListSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuListProps = ComponentProps<MenuListSlots> & Partial<MenuListCommons>;\n\nexport type MenuListState = ComponentState<MenuListSlots> &\n MenuListCommons & {\n /**\n * Callback to set focus on the next menu item by first character\n */\n setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;\n\n /*\n * Toggles the state of a checkbox item\n */\n toggleCheckbox: SelectableHandler;\n\n /**\n * Selects a radio item, will de-select the currently selected ratio item\n */\n selectRadio: SelectableHandler;\n };\n\nexport type MenuListContextValues = {\n menuList: MenuListContextValue;\n};\n\nexport type UninitializedMenuListState = Omit<\n MenuListState,\n 'setFocusByFirstCharacter' | 'toggleCheckbox' | 'selectRadio' | 'checkedValues'\n> &\n Partial<Pick<MenuListState, 'checkedValues'>>;\n"]}
@@ -1,5 +1,5 @@
1
1
  export * from './MenuList';
2
- export * from './MenuList.types';
2
+ export type { MenuCheckedValueChangeData, MenuCheckedValueChangeEvent, MenuListContextValues, MenuListProps, MenuListSlots, MenuListState, UninitializedMenuListState, } from './MenuList.types';
3
3
  export * from './renderMenuList';
4
4
  export * from './useMenuList';
5
5
  export * from './useMenuListStyles';
@@ -1,5 +1,4 @@
1
1
  export * from './MenuList';
2
- export * from './MenuList.types';
3
2
  export * from './renderMenuList';
4
3
  export * from './useMenuList';
5
4
  export * from './useMenuListStyles';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuList/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/MenuList/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAW3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './MenuList';\n// Explicit exports to omit MenuListCommons\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n UninitializedMenuListState,\n} from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles';\nexport * from './useMenuListContextValues';\n"]}
@@ -2,4 +2,4 @@ import { MenuListContextValues, MenuListState } from './MenuList.types';
2
2
  /**
3
3
  * Function that renders the final JSX of the component
4
4
  */
5
- export declare const renderMenuList: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
5
+ export declare const renderMenuList_unstable: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
@@ -5,13 +5,14 @@ import { MenuListProvider } from '../../contexts/menuListContext';
5
5
  * Function that renders the final JSX of the component
6
6
  */
7
7
 
8
- export const renderMenuList = (state, contextValues) => {
8
+ export const renderMenuList_unstable = (state, contextValues) => {
9
9
  const {
10
10
  slots,
11
11
  slotProps
12
12
  } = getSlots(state);
13
13
  return /*#__PURE__*/React.createElement(MenuListProvider, {
14
14
  value: contextValues.menuList
15
- }, /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root)));
15
+ }, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
16
+ }));
16
17
  };
17
18
  //# sourceMappingURL=renderMenuList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,gBAAT,QAAiC,gCAAjC;AAEA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAAG,CAAC,KAAD,EAAuB,aAAvB,KAA+D;AAC3F,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAjB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,CADF;AAKD,CARM","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuList/renderMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,gBAAT,QAAiC,gCAAjC;AAEA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAAuB,aAAvB,KAA+D;AACpG,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAjB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADF,CADF;AAKD,CARM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuListContextValues, MenuListSlots, MenuListState } from './MenuList.types';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuList_unstable = (state: MenuListState, contextValues: MenuListContextValues) => {\n const { slots, slotProps } = getSlots<MenuListSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <slots.root {...slotProps.root} />\n </MenuListProvider>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ import type { MenuListProps, MenuListState } from './MenuList.types';
3
3
  /**
4
4
  * Returns the props and state required to render the component
5
5
  */
6
- export declare const useMenuList: (props: MenuListProps, ref: React.Ref<HTMLElement>) => MenuListState;
6
+ export declare const useMenuList_unstable: (props: MenuListProps, ref: React.Ref<HTMLElement>) => MenuListState;
@@ -2,13 +2,13 @@ import * as React from 'react';
2
2
  import { useMergedRefs, useEventCallback, useControllableState, getNativeElementProps } from '@fluentui/react-utilities';
3
3
  import { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';
4
4
  import { useHasParentContext } from '@fluentui/react-context-selector';
5
- import { useMenuContext } from '../../contexts/menuContext';
5
+ import { useMenuContext_unstable } from '../../contexts/menuContext';
6
6
  import { MenuContext } from '../../contexts/menuContext';
7
7
  /**
8
8
  * Returns the props and state required to render the component
9
9
  */
10
10
 
11
- export const useMenuList = (props, ref) => {
11
+ export const useMenuList_unstable = (props, ref) => {
12
12
  const focusAttributes = useArrowNavigationGroup({
13
13
  circular: true
14
14
  });
@@ -26,6 +26,9 @@ export const useMenuList = (props, ref) => {
26
26
 
27
27
  const innerRef = React.useRef(null);
28
28
  const initialState = {
29
+ components: {
30
+ root: 'div'
31
+ },
29
32
  root: getNativeElementProps('div', {
30
33
  ref: useMergedRefs(ref, innerRef),
31
34
  role: 'menu',
@@ -131,12 +134,12 @@ export const useMenuList = (props, ref) => {
131
134
  */
132
135
 
133
136
  const useMenuContextSelectors = () => {
134
- const checkedValues = useMenuContext(context => context.checkedValues);
135
- const onCheckedValueChange = useMenuContext(context => context.onCheckedValueChange);
136
- const defaultCheckedValues = useMenuContext(context => context.defaultCheckedValues);
137
- const triggerId = useMenuContext(context => context.triggerId);
138
- const hasIcons = useMenuContext(context => context.hasIcons);
139
- const hasCheckmarks = useMenuContext(context => context.hasCheckmarks);
137
+ const checkedValues = useMenuContext_unstable(context => context.checkedValues);
138
+ const onCheckedValueChange = useMenuContext_unstable(context => context.onCheckedValueChange);
139
+ const defaultCheckedValues = useMenuContext_unstable(context => context.defaultCheckedValues);
140
+ const triggerId = useMenuContext_unstable(context => context.triggerId);
141
+ const hasIcons = useMenuContext_unstable(context => context.hasIcons);
142
+ const hasCheckmarks = useMenuContext_unstable(context => context.hasCheckmarks);
140
143
  return {
141
144
  checkedValues,
142
145
  onCheckedValueChange,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,aADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,qBAJF,QAKO,2BALP;AAMA,SAAS,uBAAT,EAAkC,eAAlC,QAAyD,yBAAzD;AACA,SAAS,mBAAT,QAAoC,kCAApC;AACA,SAAS,cAAT,QAA+B,4BAA/B;AACA,SAAS,WAAT,QAA4B,4BAA5B;AAGA;;AAEG;;AACH,OAAO,MAAM,WAAW,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;AAC9F,QAAM,eAAe,GAAG,uBAAuB,CAAC;AAAE,IAAA,QAAQ,EAAE;AAAZ,GAAD,CAA/C;AACA,QAAM;AAAE,IAAA;AAAF,MAAuB,eAAe,EAA5C;AACA,QAAM,WAAW,GAAG,uBAAuB,EAA3C;AACA,QAAM,cAAc,GAAG,mBAAmB,CAAC,WAAD,CAA1C;;AAEA,MAAI,wBAAwB,CAAC,KAAD,EAAQ,WAAR,EAAqB,cAArB,CAA5B,EAAkE;AAChE;AACA;AACA,IAAA,OAAO,CAAC,IAAR,CAAa,+FAAb;AACD;;AAED,QAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAA0B,IAA1B,CAAjB;AACA,QAAM,YAAY,GAA+B;AAC/C,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,QAAN,CADe;AAEjC,MAAA,I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AC,GAAD,CAAT,EAA4G;AAC1G,MAAA,sBAAsB,GAAG,IAAzB;AACD;AACF;;AAED,SAAO,cAAc,IAAI,sBAAzB;AACD,CAbD","sourcesContent":["import * as React from 'react';\nimport {\n useMergedRefs,\n useEventCallback,\n useControllableState,\n getNativeElementProps,\n} from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MenuContext } from '../../contexts/menuContext';\nimport type { MenuListProps, MenuListState, UninitializedMenuListState } from './MenuList.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useMenuList_unstable = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n const focusAttributes = useArrowNavigationGroup({ circular: true });\n const { findAllFocusable } = useFocusFinders();\n const menuContext = useMenuContextSelectors();\n const hasMenuContext = useHasParentContext(MenuContext);\n\n if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {\n // TODO throw warnings in development safely\n // eslint-disable-next-line no-console\n console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');\n }\n\n const innerRef = React.useRef<HTMLElement>(null);\n const initialState: UninitializedMenuListState = {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'menu',\n 'aria-labelledby': menuContext.triggerId,\n ...focusAttributes,\n ...props,\n }),\n hasIcons: menuContext.hasIcons,\n hasCheckmarks: menuContext.hasCheckmarks,\n ...(hasMenuContext && menuContext),\n ...props,\n };\n\n const setFocusByFirstCharacter = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => {\n // TODO use some kind of children registration to reduce dependency on DOM roles\n const acceptedRoles = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];\n if (!innerRef.current) {\n return;\n }\n\n const menuItems = findAllFocusable(\n innerRef.current,\n (el: HTMLElement) => el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')!) !== -1,\n );\n\n let startIndex = menuItems.indexOf(itemEl) + 1;\n if (startIndex === menuItems.length) {\n startIndex = 0;\n }\n\n const firstChars = menuItems.map(menuItem => menuItem.textContent?.charAt(0).toLowerCase());\n const char = e.key.toLowerCase();\n\n const getIndexFirstChars = (start: number, firstChar: string) => {\n for (let i = start; i < firstChars.length; i++) {\n if (char === firstChars[i]) {\n return i;\n }\n }\n return -1;\n };\n\n // Check remaining slots in the menu\n let index = getIndexFirstChars(startIndex, char);\n\n // If not found in remaining slots, check from beginning\n if (index === -1) {\n index = getIndexFirstChars(0, char);\n }\n\n // If match was found...\n if (index > -1) {\n menuItems[index].focus();\n }\n },\n [findAllFocusable],\n );\n\n const [checkedValues, setCheckedValues] = useControllableState({\n state: initialState.checkedValues,\n defaultState: initialState.defaultCheckedValues,\n initialState: {},\n });\n\n const { onCheckedValueChange } = initialState;\n const toggleCheckbox = useEventCallback(\n (e: React.MouseEvent | React.KeyboardEvent, name: string, value: string, checked: boolean) => {\n const checkedItems = checkedValues?.[name] || [];\n const newCheckedItems = [...checkedItems];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n\n onCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n },\n );\n\n const selectRadio = useEventCallback((e: React.MouseEvent | React.KeyboardEvent, name: string, value: string) => {\n const newCheckedItems = [value];\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n onCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n });\n\n const state = {\n ...initialState,\n setFocusByFirstCharacter,\n selectRadio,\n toggleCheckbox,\n checkedValues: checkedValues ?? {},\n };\n\n return state;\n};\n\n/**\n * Adds some sugar to fetching multiple context selector values\n */\nconst useMenuContextSelectors = () => {\n const checkedValues = useMenuContext_unstable(context => context.checkedValues);\n const onCheckedValueChange = useMenuContext_unstable(context => context.onCheckedValueChange);\n const defaultCheckedValues = useMenuContext_unstable(context => context.defaultCheckedValues);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const hasIcons = useMenuContext_unstable(context => context.hasIcons);\n const hasCheckmarks = useMenuContext_unstable(context => context.hasCheckmarks);\n\n return {\n checkedValues,\n onCheckedValueChange,\n defaultCheckedValues,\n triggerId,\n hasIcons,\n hasCheckmarks,\n };\n};\n\n/**\n * Helper function to detect if props and MenuContext values are both used\n */\nconst usingPropsAndMenuContext = (\n props: MenuListProps,\n contextValue: ReturnType<typeof useMenuContextSelectors>,\n hasMenuContext: boolean,\n) => {\n let isUsingPropsAndContext = false;\n for (const val in contextValue) {\n if (props[val as keyof Omit<typeof contextValue, 'hasMenuContext' | 'onCheckedValueChange' | 'triggerId'>]) {\n isUsingPropsAndContext = true;\n }\n }\n\n return hasMenuContext && isUsingPropsAndContext;\n};\n"],"sourceRoot":"../src/"}
@@ -1,2 +1,2 @@
1
1
  import type { MenuListContextValues, MenuListState } from './MenuList.types';
2
- export declare function useMenuListContextValues(state: MenuListState): MenuListContextValues;
2
+ export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
@@ -1,4 +1,4 @@
1
- export function useMenuListContextValues(state) {
1
+ export function useMenuListContextValues_unstable(state) {
2
2
  const {
3
3
  onCheckedValueChange,
4
4
  checkedValues,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuListContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,wBAAV,CAAmC,KAAnC,EAAuD;AAC3D,QAAM;AACJ,IAAA,oBADI;AAEJ,IAAA,aAFI;AAGJ,IAAA,cAHI;AAIJ,IAAA,WAJI;AAKJ,IAAA,wBALI;AAMJ,IAAA,QANI;AAOJ,IAAA;AAPI,MAQF,KARJ,CAD2D,CAW3D;;AACA,QAAM,QAAQ,GAAG;AACf,IAAA,oBADe;AAEf,IAAA,aAFe;AAGf,IAAA,cAHe;AAIf,IAAA,WAJe;AAKf,IAAA,wBALe;AAMf,IAAA,QANe;AAOf,IAAA;AAPe,GAAjB;AAUA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuList/useMenuListContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,iCAAV,CAA4C,KAA5C,EAAgE;AACpE,QAAM;AACJ,IAAA,oBADI;AAEJ,IAAA,aAFI;AAGJ,IAAA,cAHI;AAIJ,IAAA,WAJI;AAKJ,IAAA,wBALI;AAMJ,IAAA,QANI;AAOJ,IAAA;AAPI,MAQF,KARJ,CADoE,CAWpE;;AACA,QAAM,QAAQ,GAAG;AACf,IAAA,oBADe;AAEf,IAAA,aAFe;AAGf,IAAA,cAHe;AAIf,IAAA,WAJe;AAKf,IAAA,wBALe;AAMf,IAAA,QANe;AAOf,IAAA;AAPe,GAAjB;AAUA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourcesContent":["import type { MenuListContextValues, MenuListState } from './MenuList.types';\n\nexport function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues {\n const {\n onCheckedValueChange,\n checkedValues,\n toggleCheckbox,\n selectRadio,\n setFocusByFirstCharacter,\n hasIcons,\n hasCheckmarks,\n } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menuList = {\n onCheckedValueChange,\n checkedValues,\n toggleCheckbox,\n selectRadio,\n setFocusByFirstCharacter,\n hasIcons,\n hasCheckmarks,\n };\n\n return { menuList };\n}\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ export declare const menuListClassName = "fui-MenuList";
3
3
  /**
4
4
  * Apply styling to the Menu slots based on the state
5
5
  */
6
- export declare const useMenuListStyles: (state: MenuListState) => MenuListState;
6
+ export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuListState;
@@ -1,4 +1,4 @@
1
- import { mergeClasses, __styles, shorthands } from '@fluentui/react-make-styles';
1
+ import { mergeClasses, __styles, shorthands } from '@griffel/react';
2
2
  export const menuListClassName = 'fui-MenuList';
3
3
 
4
4
  const useStyles = /*#__PURE__*/__styles({
@@ -16,7 +16,7 @@ const useStyles = /*#__PURE__*/__styles({
16
16
  */
17
17
 
18
18
 
19
- export const useMenuListStyles = state => {
19
+ export const useMenuListStyles_unstable = state => {
20
20
  const styles = useStyles();
21
21
  state.root.className = mergeClasses(menuListClassName, styles.root, state.root.className);
22
22
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAQA;;AAEG;;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAAwC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,iBAAD,EAAoB,MAAM,CAAC,IAA3B,EAAiC,KAAK,CAAC,IAAN,CAAW,SAA5C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAQA;;AAEG;;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAwC;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,iBAAD,EAAoB,MAAM,CAAC,IAA3B,EAAiC,KAAK,CAAC,IAAN,CAAW,SAA5C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourcesContent":["import { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport type { MenuListState } from './MenuList.types';\n\nexport const menuListClassName = 'fui-MenuList';\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.gap('2px'),\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = (state: MenuListState): MenuListState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuListClassName, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useMenuPopover } from './useMenuPopover';
3
- import { useMenuPopoverStyles } from './useMenuPopoverStyles';
4
- import { renderMenuPopover } from './renderMenuPopover';
2
+ import { useMenuPopover_unstable } from './useMenuPopover';
3
+ import { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles';
4
+ import { renderMenuPopover_unstable } from './renderMenuPopover';
5
5
  /**
6
6
  * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
7
7
  */
8
8
 
9
9
  export const MenuPopover = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useMenuPopover(props, ref);
11
- useMenuPopoverStyles(state);
12
- return renderMenuPopover(state);
10
+ const state = useMenuPopover_unstable(props, ref);
11
+ useMenuPopoverStyles_unstable(state);
12
+ return renderMenuPopover_unstable(state);
13
13
  });
14
14
  MenuPopover.displayName = 'MenuPopover';
15
15
  //# sourceMappingURL=MenuPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuPopover/MenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,cAAc,CAAC,KAAD,EAAQ,GAAR,CAA5B;AAEA,EAAA,oBAAoB,CAAC,KAAD,CAApB;AACA,SAAO,iBAAiB,CAAC,KAAD,CAAxB;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuPopover/MenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AAEA,EAAA,6BAA6B,CAAC,KAAD,CAA7B;AACA,SAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport type { MenuPopoverProps } from './MenuPopover.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */\nexport const MenuPopover: ForwardRefComponent<MenuPopoverProps> = React.forwardRef((props, ref) => {\n const state = useMenuPopover_unstable(props, ref);\n\n useMenuPopoverStyles_unstable(state);\n return renderMenuPopover_unstable(state);\n});\n\nMenuPopover.displayName = 'MenuPopover';\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
- import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  export declare type MenuPopoverSlots = {
3
- root: IntrinsicShorthandProps<'div'>;
3
+ root: Slot<'div'>;
4
4
  };
5
5
  /**
6
6
  * MenuPopover Props