@fluentui/react-menu 0.0.0-nightlyf8be6a7c6520220106.1 → 0.0.0-nightlyff78d1e27a20220217.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (412) hide show
  1. package/CHANGELOG.json +204 -33
  2. package/CHANGELOG.md +47 -16
  3. package/dist/react-menu.d.ts +73 -80
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuDivider.js.map +1 -1
  6. package/lib/MenuGroup.js.map +1 -1
  7. package/lib/MenuGroupHeader.js.map +1 -1
  8. package/lib/MenuItem.js.map +1 -1
  9. package/lib/MenuItemCheckbox.js.map +1 -1
  10. package/lib/MenuItemRadio.js.map +1 -1
  11. package/lib/MenuList.js.map +1 -1
  12. package/lib/MenuPopover.js.map +1 -1
  13. package/lib/MenuSplitGroup.js.map +1 -1
  14. package/lib/MenuTrigger.js.map +1 -1
  15. package/lib/components/Menu/Menu.js +6 -6
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.d.ts +1 -1
  18. package/lib/components/Menu/Menu.types.js.map +1 -1
  19. package/lib/components/Menu/index.js.map +1 -1
  20. package/lib/components/Menu/renderMenu.d.ts +1 -1
  21. package/lib/components/Menu/renderMenu.js +1 -1
  22. package/lib/components/Menu/renderMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenu.d.ts +2 -2
  24. package/lib/components/Menu/useMenu.js +6 -5
  25. package/lib/components/Menu/useMenu.js.map +1 -1
  26. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  27. package/lib/components/Menu/useMenuContextValues.js +1 -1
  28. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  29. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  30. package/lib/components/MenuDivider/MenuDivider.js +7 -7
  31. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  32. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  33. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  34. package/lib/components/MenuDivider/index.js.map +1 -1
  35. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  36. package/lib/components/MenuDivider/renderMenuDivider.js +1 -1
  37. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  38. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  39. package/lib/components/MenuDivider/useMenuDivider.js +4 -1
  40. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  41. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  42. package/lib/components/MenuDivider/useMenuDividerStyles.js +3 -2
  43. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  44. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  45. package/lib/components/MenuGroup/MenuGroup.js +9 -9
  46. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  47. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  48. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  49. package/lib/components/MenuGroup/index.js.map +1 -1
  50. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  51. package/lib/components/MenuGroup/renderMenuGroup.js +1 -1
  52. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  53. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  54. package/lib/components/MenuGroup/useMenuGroup.js +4 -1
  55. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  56. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  57. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  58. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  59. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  60. package/lib/components/MenuGroup/useMenuGroupStyles.js +2 -2
  61. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  62. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  63. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
  64. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  65. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  66. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  67. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  68. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  69. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -1
  70. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  71. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  72. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +6 -3
  73. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  74. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  75. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -2
  76. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  77. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  78. package/lib/components/MenuItem/MenuItem.js +7 -7
  79. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  80. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  81. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  82. package/lib/components/MenuItem/index.js.map +1 -1
  83. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  84. package/lib/components/MenuItem/renderMenuItem.js +7 -8
  85. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  86. package/lib/components/MenuItem/useCharacterSearch.js +2 -2
  87. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  88. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  89. package/lib/components/MenuItem/useMenuItem.js +10 -15
  90. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  91. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  92. package/lib/components/MenuItem/useMenuItemStyles.js +12 -7
  93. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  94. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  95. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  96. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  97. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  98. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  99. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  100. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -7
  101. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  102. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  103. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  104. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  105. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  106. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +6 -6
  107. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  108. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  109. package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
  110. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  111. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  112. package/lib/components/MenuItemRadio/index.js.map +1 -1
  113. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  114. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -7
  115. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  116. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  117. package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  118. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  119. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  120. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +6 -6
  121. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  122. package/lib/components/MenuList/MenuList.d.ts +1 -1
  123. package/lib/components/MenuList/MenuList.js +9 -9
  124. package/lib/components/MenuList/MenuList.js.map +1 -1
  125. package/lib/components/MenuList/MenuList.types.d.ts +4 -4
  126. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  127. package/lib/components/MenuList/index.d.ts +1 -1
  128. package/lib/components/MenuList/index.js +0 -1
  129. package/lib/components/MenuList/index.js.map +1 -1
  130. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  131. package/lib/components/MenuList/renderMenuList.js +1 -1
  132. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  133. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  134. package/lib/components/MenuList/useMenuList.js +11 -8
  135. package/lib/components/MenuList/useMenuList.js.map +1 -1
  136. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  137. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  138. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  139. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
  140. package/lib/components/MenuList/useMenuListStyles.js +2 -2
  141. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  142. package/lib/components/MenuPopover/MenuPopover.js +6 -6
  143. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  144. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  145. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  146. package/lib/components/MenuPopover/index.js.map +1 -1
  147. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  148. package/lib/components/MenuPopover/renderMenuPopover.js +1 -1
  149. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  150. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  151. package/lib/components/MenuPopover/useMenuPopover.js +11 -8
  152. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  153. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  154. package/lib/components/MenuPopover/useMenuPopoverStyles.js +3 -2
  155. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  156. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +6 -6
  157. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  158. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
  159. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  160. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  161. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  162. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -3
  163. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  164. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
  165. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +3 -8
  166. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  167. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  168. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +3 -2
  169. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  170. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  171. package/lib/components/MenuTrigger/MenuTrigger.js +5 -4
  172. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  173. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
  174. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  175. package/lib/components/MenuTrigger/index.js.map +1 -1
  176. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  177. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  178. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  179. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  180. package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
  181. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  182. package/lib/components/index.js.map +1 -1
  183. package/lib/contexts/menuContext.d.ts +1 -1
  184. package/lib/contexts/menuContext.js +1 -1
  185. package/lib/contexts/menuContext.js.map +1 -1
  186. package/lib/contexts/menuGroupContext.d.ts +1 -1
  187. package/lib/contexts/menuGroupContext.js +1 -1
  188. package/lib/contexts/menuGroupContext.js.map +1 -1
  189. package/lib/contexts/menuListContext.d.ts +1 -1
  190. package/lib/contexts/menuListContext.js +1 -1
  191. package/lib/contexts/menuListContext.js.map +1 -1
  192. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  193. package/lib/contexts/menuTriggerContext.js +1 -1
  194. package/lib/contexts/menuTriggerContext.js.map +1 -1
  195. package/lib/index.js.map +1 -1
  196. package/lib/selectable/index.js.map +1 -1
  197. package/lib/selectable/types.js.map +1 -1
  198. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  199. package/lib/selectable/useCheckmarkStyles.js +2 -2
  200. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  201. package/lib/utils/index.js.map +1 -1
  202. package/lib/utils/useIsSubmenu.js +2 -2
  203. package/lib/utils/useIsSubmenu.js.map +1 -1
  204. package/lib/utils/useOnMenuEnter.js.map +1 -1
  205. package/lib-commonjs/Menu.js.map +1 -1
  206. package/lib-commonjs/MenuDivider.js.map +1 -1
  207. package/lib-commonjs/MenuGroup.js.map +1 -1
  208. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  209. package/lib-commonjs/MenuItem.js.map +1 -1
  210. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  211. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  212. package/lib-commonjs/MenuList.js.map +1 -1
  213. package/lib-commonjs/MenuPopover.js.map +1 -1
  214. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  215. package/lib-commonjs/MenuTrigger.js.map +1 -1
  216. package/lib-commonjs/components/Menu/Menu.js +3 -3
  217. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  218. package/lib-commonjs/components/Menu/Menu.types.d.ts +1 -1
  219. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  220. package/lib-commonjs/components/Menu/index.js.map +1 -1
  221. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  222. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  223. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  224. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  225. package/lib-commonjs/components/Menu/useMenu.js +7 -6
  226. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  227. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  228. package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
  229. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  230. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  231. package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
  232. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  233. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  234. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  235. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  236. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  237. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +3 -3
  238. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  239. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  240. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +6 -3
  241. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  242. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  243. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
  244. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  245. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  246. package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
  247. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  248. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  249. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  250. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  251. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  252. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +3 -3
  253. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  254. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  255. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +6 -3
  256. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  257. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  258. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
  259. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  260. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
  261. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -5
  262. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  263. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  264. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
  265. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  266. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  267. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  268. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  269. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  270. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -3
  271. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  272. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  273. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +7 -4
  274. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  275. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  276. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
  277. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  278. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  279. package/lib-commonjs/components/MenuItem/MenuItem.js +4 -4
  280. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  281. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  282. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  283. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  284. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  285. package/lib-commonjs/components/MenuItem/renderMenuItem.js +9 -11
  286. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  287. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
  288. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  289. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  290. package/lib-commonjs/components/MenuItem/useMenuItem.js +10 -15
  291. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  292. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
  293. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +20 -14
  294. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  295. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  296. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  297. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  298. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  299. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  300. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  301. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +8 -10
  302. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  303. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  304. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
  305. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  306. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
  307. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +7 -7
  308. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  309. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  310. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
  311. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  312. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  313. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  314. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  315. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +8 -10
  316. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  317. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  318. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
  319. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  320. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
  321. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +7 -7
  322. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  323. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  324. package/lib-commonjs/components/MenuList/MenuList.js +5 -5
  325. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  326. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +4 -4
  327. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  328. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  329. package/lib-commonjs/components/MenuList/index.js +0 -2
  330. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  331. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  332. package/lib-commonjs/components/MenuList/renderMenuList.js +3 -3
  333. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  334. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  335. package/lib-commonjs/components/MenuList/useMenuList.js +12 -9
  336. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  337. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  338. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
  339. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  340. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
  341. package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -6
  342. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  343. package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
  344. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  345. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  346. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  347. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  348. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  349. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +3 -3
  350. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  351. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  352. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +12 -9
  353. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  354. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
  355. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +8 -6
  356. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  357. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -3
  358. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  359. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
  360. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  361. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  362. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
  363. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +4 -6
  364. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  365. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
  366. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +6 -11
  367. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  368. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
  369. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +8 -6
  370. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  371. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  372. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +3 -2
  373. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  374. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
  375. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  376. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  377. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  378. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
  379. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  380. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  381. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +176 -7
  382. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  383. package/lib-commonjs/components/index.js.map +1 -1
  384. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  385. package/lib-commonjs/contexts/menuContext.js +3 -3
  386. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  387. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  388. package/lib-commonjs/contexts/menuGroupContext.js +3 -3
  389. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  390. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  391. package/lib-commonjs/contexts/menuListContext.js +3 -3
  392. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  393. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  394. package/lib-commonjs/contexts/menuTriggerContext.js +3 -3
  395. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  396. package/lib-commonjs/index.js.map +1 -1
  397. package/lib-commonjs/selectable/index.js.map +1 -1
  398. package/lib-commonjs/selectable/types.js.map +1 -1
  399. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  400. package/lib-commonjs/selectable/useCheckmarkStyles.js +6 -6
  401. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  402. package/lib-commonjs/utils/index.js.map +1 -1
  403. package/lib-commonjs/utils/useIsSubmenu.js +1 -1
  404. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  405. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  406. package/package.json +13 -15
  407. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  408. package/lib/components/MenuTrigger/useTriggerElement.js +0 -166
  409. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  410. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  411. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -181
  412. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,cAAc,GAAI,KAAD,IAAyB;AACrD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,EAA+B,aAAA,CAAA,aAA/B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA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AA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,EAKG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAL7B,CADF;AASD,CAZM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuItem_unstable = (state: MenuItemState) => {\n const { slots, slotProps } = getSlots<MenuItemSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.checkmark && <slots.checkmark {...slotProps.checkmark} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.content && <slots.content {...slotProps.content} />}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n {slots.submenuIndicator && <slots.submenuIndicator {...slotProps.submenuIndicator} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -8,7 +8,7 @@ exports.useCharacterSearch = void 0;
8
8
  const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
9
9
 
10
10
  const useCharacterSearch = (state, ref) => {
11
- const setFocusByFirstCharacter = menuListContext_1.useMenuListContext(context => context.setFocusByFirstCharacter);
11
+ const setFocusByFirstCharacter = menuListContext_1.useMenuListContext_unstable(context => context.setFocusByFirstCharacter);
12
12
  const {
13
13
  onKeyDown: onKeyDownBase
14
14
  } = state.root;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":";;;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,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;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourcesContent":["import * as React from 'react';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport type { MenuItemState } from '../../components/index';\n\nexport const useCharacterSearch = (state: MenuItemState, ref: React.RefObject<HTMLElement>) => {\n const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);\n\n const { onKeyDown: onKeyDownBase } = state.root;\n state.root.onKeyDown = e => {\n if (onKeyDownBase) {\n onKeyDownBase(e);\n }\n\n if (e.key?.length > 1) {\n return;\n }\n\n if (ref.current) {\n setFocusByFirstCharacter?.(e, ref.current);\n }\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,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;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuItem = exports.menuItemSlots = void 0;
6
+ exports.useMenuItem_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
@@ -20,22 +20,17 @@ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
20
20
  const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
21
21
 
22
22
  const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
23
- /**
24
- * Consts listing which props are shorthand props.
25
- */
26
-
27
-
28
- exports.menuItemSlots = ['root', 'icon', 'submenuIndicator', 'content', 'secondaryContent', 'checkmark'];
29
23
  /**
30
24
  * Returns the props and state required to render the component
31
25
  */
32
26
 
33
- const useMenuItem = (props, ref) => {
34
- const hasSubmenu = menuTriggerContext_1.useMenuTriggerContext() || props.hasSubmenu;
35
- const hasIcons = menuListContext_1.useMenuListContext(context => context.hasIcons);
36
- const hasCheckmarks = menuListContext_1.useMenuListContext(context => context.hasCheckmarks);
37
- const setOpen = menuContext_1.useMenuContext(context => context.setOpen);
38
- const persistOnClickContext = menuContext_1.useMenuContext(context => context.persistOnItemClick);
27
+
28
+ const useMenuItem_unstable = (props, ref) => {
29
+ const hasSubmenu = menuTriggerContext_1.useMenuTriggerContext_unstable() || props.hasSubmenu;
30
+ const hasIcons = menuListContext_1.useMenuListContext_unstable(context => context.hasIcons);
31
+ const hasCheckmarks = menuListContext_1.useMenuListContext_unstable(context => context.hasCheckmarks);
32
+ const setOpen = menuContext_1.useMenuContext_unstable(context => context.setOpen);
33
+ const persistOnClickContext = menuContext_1.useMenuContext_unstable(context => context.persistOnItemClick);
39
34
  const dismissedWithKeyboardRef = React.useRef(false);
40
35
  const {
41
36
  dir
@@ -68,7 +63,7 @@ const useMenuItem = (props, ref) => {
68
63
  submenuIndicator: react_utilities_1.resolveShorthand(props.submenuIndicator, {
69
64
  required: hasSubmenu,
70
65
  defaultProps: {
71
- children: dir === 'ltr' ? React.createElement(react_icons_1.ChevronRight20Regular, null) : React.createElement(react_icons_1.ChevronLeft20Regular, null)
66
+ children: dir === 'ltr' ? React.createElement(react_icons_1.ChevronRightRegular, null) : React.createElement(react_icons_1.ChevronLeftRegular, null)
72
67
  }
73
68
  }),
74
69
  content: react_utilities_1.resolveShorthand(props.content, {
@@ -140,5 +135,5 @@ const useMenuItem = (props, ref) => {
140
135
  return state;
141
136
  };
142
137
 
143
- exports.useMenuItem = useMenuItem;
138
+ exports.useMenuItem_unstable = useMenuItem_unstable;
144
139
  //# sourceMappingURL=useMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIA,MAAA,iBAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,aAAA,GAA4C,CACvD,MADuD,EAEvD,MAFuD,EAGvD,kBAHuD,EAIvD,SAJuD,EAKvD,kBALuD,EAMvD,WANuD,CAA5C;AASb;;AAEG;;AACI,MAAM,WAAW,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;AAC9F,QAAM,UAAU,GAAG,oBAAA,CAAA,qBAAA,MAA2B,KAAK,CAAC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O,KAAP;AACD,CA3FM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport {\n useEventCallback,\n shouldPreventDefaultOnKeyDown,\n resolveShorthand,\n useMergedRefs,\n getNativeElementProps,\n} from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport { useCharacterSearch } from './useCharacterSearch';\nimport { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContext';\nimport { ChevronRightRegular as ChevronRightIcon, ChevronLeftRegular as ChevronLeftIcon } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport type { MenuItemProps, MenuItemState } from './MenuItem.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useMenuItem_unstable = (props: MenuItemProps, ref: React.Ref<HTMLElement>): MenuItemState => {\n const hasSubmenu = useMenuTriggerContext_unstable() || props.hasSubmenu;\n const hasIcons = useMenuListContext_unstable(context => context.hasIcons);\n const hasCheckmarks = useMenuListContext_unstable(context => context.hasCheckmarks);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const persistOnClickContext = useMenuContext_unstable(context => context.persistOnItemClick);\n const dismissedWithKeyboardRef = React.useRef(false);\n\n const { dir } = useFluent();\n const innerRef = React.useRef<HTMLElement>(null);\n\n const state: MenuItemState = {\n hasSubmenu,\n ...props,\n components: {\n root: 'div',\n icon: 'span',\n checkmark: 'span',\n submenuIndicator: 'span',\n content: 'span',\n secondaryContent: 'span',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'menuitem',\n tabIndex: 0,\n 'aria-disabled': props.disabled,\n ...props,\n }),\n icon: resolveShorthand(props.icon, { required: hasIcons }),\n checkmark: resolveShorthand(props.checkmark, { required: hasCheckmarks }),\n submenuIndicator: resolveShorthand(props.submenuIndicator, {\n required: hasSubmenu,\n defaultProps: {\n children: dir === 'ltr' ? <ChevronRightIcon /> : <ChevronLeftIcon />,\n },\n }),\n content: resolveShorthand(props.content, {\n required: !!props.children,\n defaultProps: { children: props.children },\n }),\n secondaryContent: resolveShorthand(props.secondaryContent),\n };\n\n const { onClick: onClickOriginal, onKeyDown: onKeyDownOriginal } = state.root;\n state.root.onKeyDown = e => {\n if (shouldPreventDefaultOnKeyDown(e)) {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n dismissedWithKeyboardRef.current = true;\n e.preventDefault();\n (e.target as HTMLElement)?.click();\n }\n\n onKeyDownOriginal?.(e);\n };\n\n state.root.onClick = e => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n let shouldPersist = persistOnClickContext;\n // prop wins over context;\n if (state.persistOnClick !== undefined && persistOnClickContext !== state.persistOnClick) {\n shouldPersist = state.persistOnClick;\n }\n\n if (!hasSubmenu && !shouldPersist) {\n setOpen(e, { open: false, keyboard: dismissedWithKeyboardRef.current, bubble: true });\n dismissedWithKeyboardRef.current = false;\n }\n\n onClickOriginal?.(e);\n };\n\n const { onMouseEnter: onMouseEnterOriginal } = state.root;\n state.root.onMouseEnter = useEventCallback(e => {\n innerRef.current?.focus();\n\n onMouseEnterOriginal?.(e);\n });\n\n useCharacterSearch(state, innerRef);\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -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;
@@ -3,17 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuItemStyles = exports.menuItemClassName = void 0;
6
+ exports.useMenuItemStyles_unstable = exports.menuItemClassName = void 0;
7
7
 
8
- const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
11
 
12
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
+
12
14
  const index_1 = /*#__PURE__*/require("../../selectable/index");
13
15
 
14
16
  exports.menuItemClassName = 'fui-MenuItem';
15
17
 
16
- const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
18
+ const useStyles = /*#__PURE__*/react_1.__styles({
17
19
  "focusIndicator": {
18
20
  "B486eqv": "f2hkw1w",
19
21
  "B1bra5l": "fc85khu",
@@ -67,11 +69,15 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
67
69
  },
68
70
  "icon": {
69
71
  "a9b677": "f64fuq3",
70
- "Bqenvij": "fjamq6b"
72
+ "Bqenvij": "fjamq6b",
73
+ "Be2twd7": "fe5j1ua",
74
+ "Bg96gwp": "fez10in"
71
75
  },
72
76
  "submenuIndicator": {
73
77
  "a9b677": "f64fuq3",
74
- "Bqenvij": "fjamq6b"
78
+ "Bqenvij": "fjamq6b",
79
+ "Be2twd7": "fe5j1ua",
80
+ "Bg96gwp": "fez10in"
75
81
  },
76
82
  "disabled": {
77
83
  "sj55zd": "f1s2aq7o",
@@ -80,35 +86,35 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
80
86
  }
81
87
  }, {
82
88
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
83
- "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;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"],
89
+ "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);}"],
84
90
  "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
85
91
  "f": [".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}", ".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}"]
86
92
  });
87
93
  /** Applies style classnames to slots */
88
94
 
89
95
 
90
- const useMenuItemStyles = state => {
96
+ const useMenuItemStyles_unstable = state => {
91
97
  const styles = useStyles();
92
- state.root.className = react_make_styles_1.mergeClasses(exports.menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
98
+ state.root.className = react_1.mergeClasses(exports.menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
93
99
 
94
100
  if (state.content) {
95
- state.content.className = react_make_styles_1.mergeClasses(styles.content, state.content.className);
101
+ state.content.className = react_1.mergeClasses(styles.content, state.content.className);
96
102
  }
97
103
 
98
104
  if (state.secondaryContent) {
99
- state.secondaryContent.className = react_make_styles_1.mergeClasses(!state.disabled && styles.secondaryContent, state.secondaryContent.className);
105
+ state.secondaryContent.className = react_1.mergeClasses(!state.disabled && styles.secondaryContent, state.secondaryContent.className);
100
106
  }
101
107
 
102
108
  if (state.icon) {
103
- state.icon.className = react_make_styles_1.mergeClasses(styles.icon, state.icon.className);
109
+ state.icon.className = react_1.mergeClasses(styles.icon, state.icon.className);
104
110
  }
105
111
 
106
112
  if (state.submenuIndicator) {
107
- state.submenuIndicator.className = react_make_styles_1.mergeClasses(styles.submenuIndicator, state.submenuIndicator.className);
113
+ state.submenuIndicator.className = react_1.mergeClasses(styles.submenuIndicator, state.submenuIndicator.className);
108
114
  }
109
115
 
110
- index_1.useCheckmarkStyles(state);
116
+ index_1.useCheckmarkStyles_unstable(state);
111
117
  };
112
118
 
113
- exports.useMenuItemStyles = useMenuItemStyles;
119
+ exports.useMenuItemStyles_unstable = useMenuItemStyles_unstable;
114
120
  //# sourceMappingURL=useMenuItemStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAIa,OAAA,CAAA,iBAAA,GAAoB,cAApB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;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;;;AACO,MAAM,iBAAiB,GAAI,KAAD,IAAyB;AACxD,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CACrB,OAAA,CAAA,iBADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,MAAM,CAAC,cAHc,EAIrB,KA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,SAFU,CAAnC;AAID;;AAED,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAvB;AACD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,gBAApB,EAAsC,KAAK,CAAC,gBAAN,CAAuB,SAA7D,CAAnC;AACD;;AACD,EAAA,OAAA,CAAA,2BAAA,CAA4B,KAA5B;AACD,CA7BM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { MenuItemCheckboxState } from '../MenuItemCheckbox/index';\nimport type { MenuItemState } from './MenuItem.types';\n\nexport const menuItemClassName = 'fui-MenuItem';\n\nconst useStyles = makeStyles({\n focusIndicator: createFocusOutlineStyle(),\n root: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n position: 'relative',\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: '10px',\n paddingLeft: '10px',\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n ...shorthands.gap('4px'),\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n\n userSelect: 'none',\n },\n content: {\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1,\n },\n secondaryContent: {\n paddingLeft: '2px',\n paddingRight: '2px',\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover,\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover,\n },\n },\n icon: {\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n },\n submenuIndicator: {\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = (state: MenuItemState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n menuItemClassName,\n styles.root,\n styles.focusIndicator,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.content) {\n state.content.className = mergeClasses(styles.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n !state.disabled && styles.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(styles.icon, state.icon.className);\n }\n\n if (state.submenuIndicator) {\n state.submenuIndicator.className = mergeClasses(styles.submenuIndicator, state.submenuIndicator.className);\n }\n useCheckmarkStyles_unstable(state as MenuItemCheckboxState);\n};\n"],"sourceRoot":"../src/"}
@@ -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>;
@@ -13,14 +13,14 @@ const renderMenuItemCheckbox_1 = /*#__PURE__*/require("./renderMenuItemCheckbox"
13
13
 
14
14
  const useMenuItemCheckboxStyles_1 = /*#__PURE__*/require("./useMenuItemCheckboxStyles");
15
15
  /**
16
- * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox` hook.
16
+ * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
17
17
  */
18
18
 
19
19
 
20
20
  exports.MenuItemCheckbox = /*#__PURE__*/React.forwardRef((props, ref) => {
21
- const state = useMenuItemCheckbox_1.useMenuItemCheckbox(props, ref);
22
- useMenuItemCheckboxStyles_1.useMenuItemCheckboxStyles(state);
23
- return renderMenuItemCheckbox_1.renderMenuItemCheckbox(state);
21
+ const state = useMenuItemCheckbox_1.useMenuItemCheckbox_unstable(props, ref);
22
+ useMenuItemCheckboxStyles_1.useMenuItemCheckboxStyles_unstable(state);
23
+ return renderMenuItemCheckbox_1.renderMenuItemCheckbox_unstable(state);
24
24
  });
25
25
  exports.MenuItemCheckbox.displayName = 'MenuItemCheckbox';
26
26
  //# sourceMappingURL=MenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,gBAA+D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1G,QAAM,KAAK,GAAG,qBAAA,CAAA,mBAAA,CAAoB,KAApB,EAA2B,GAA3B,CAAd;AACA,EAAA,2BAAA,CAAA,yBAAA,CAA0B,KAA1B;AAEA,SAAO,wBAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CAL2E,CAA/D;AAOb,OAAA,CAAA,gBAAA,CAAiB,WAAjB,GAA+B,kBAA/B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,gBAA+D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1G,QAAM,KAAK,GAAG,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,EAAoC,GAApC,CAAd;AACA,EAAA,2BAAA,CAAA,kCAAA,CAAmC,KAAnC;AAEA,SAAO,wBAAA,CAAA,+BAAA,CAAgC,KAAhC,CAAP;AACD,CAL2E,CAA/D;AAOb,OAAA,CAAA,gBAAA,CAAiB,WAAjB,GAA+B,kBAA/B","sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles';\nimport type { MenuItemCheckboxProps } from './MenuItemCheckbox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.\n */\nexport const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemCheckbox_unstable(props, ref);\n useMenuItemCheckboxStyles_unstable(state);\n\n return renderMenuItemCheckbox_unstable(state);\n});\n\nMenuItemCheckbox.displayName = 'MenuItemCheckbox';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemCheckbox/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles';\n"],"sourceRoot":"../src/"}
@@ -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;
@@ -3,28 +3,26 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderMenuItemCheckbox = void 0;
6
+ exports.renderMenuItemCheckbox_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
10
10
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
- const index_1 = /*#__PURE__*/require("../MenuItem/index");
13
11
  /** Function that renders the final JSX of the component */
14
12
 
15
13
 
16
- const renderMenuItemCheckbox = state => {
14
+ const renderMenuItemCheckbox_unstable = state => {
17
15
  const {
18
16
  slots,
19
17
  slotProps
20
- } = react_utilities_1.getSlots(state, index_1.menuItemSlots);
18
+ } = react_utilities_1.getSlots(state);
21
19
  return React.createElement(slots.root, { ...slotProps.root
22
- }, React.createElement(slots.checkmark, { ...slotProps.checkmark
23
- }), React.createElement(slots.icon, { ...slotProps.icon
24
- }), React.createElement(slots.content, { ...slotProps.content
25
- }), React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
20
+ }, slots.checkmark && React.createElement(slots.checkmark, { ...slotProps.checkmark
21
+ }), slots.icon && React.createElement(slots.icon, { ...slotProps.icon
22
+ }), slots.content && React.createElement(slots.content, { ...slotProps.content
23
+ }), slots.secondaryContent && React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
26
24
  }));
27
25
  };
28
26
 
29
- exports.renderMenuItemCheckbox = renderMenuItemCheckbox;
27
+ exports.renderMenuItemCheckbox_unstable = renderMenuItemCheckbox_unstable;
30
28
  //# sourceMappingURL=renderMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;;AACO,MAAM,sBAAsB,GAAI,K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G,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,IAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuItemCheckboxState } from './MenuItemCheckbox.types';\nimport type { MenuItemSlots } from '../MenuItem/MenuItem.types';\n\n/** Function that renders the final JSX of the component */\nexport const renderMenuItemCheckbox_unstable = (state: MenuItemCheckboxState) => {\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/"}
@@ -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;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuItemCheckbox = void 0;
6
+ exports.useMenuItemCheckbox_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
@@ -17,8 +17,8 @@ const useMenuItem_1 = /*#__PURE__*/require("../MenuItem/useMenuItem");
17
17
  /** Returns the props and state required to render the component */
18
18
 
19
19
 
20
- const useMenuItemCheckbox = (props, ref) => {
21
- const state = useMenuItem_1.useMenuItem({
20
+ const useMenuItemCheckbox_unstable = (props, ref) => {
21
+ const state = useMenuItem_1.useMenuItem_unstable({
22
22
  role: 'menuitemcheckbox',
23
23
  persistOnClick: true,
24
24
  ...props,
@@ -29,11 +29,11 @@ const useMenuItemCheckbox = (props, ref) => {
29
29
  required: true
30
30
  })
31
31
  }, ref);
32
- const toggleCheckbox = menuListContext_1.useMenuListContext(context => context.toggleCheckbox);
32
+ const toggleCheckbox = menuListContext_1.useMenuListContext_unstable(context => context.toggleCheckbox);
33
33
  const {
34
34
  onClick: onClickOriginal
35
35
  } = state.root;
36
- const checked = menuListContext_1.useMenuListContext(context => {
36
+ const checked = menuListContext_1.useMenuListContext_unstable(context => {
37
37
  var _a;
38
38
 
39
39
  const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
@@ -56,5 +56,5 @@ const useMenuItemCheckbox = (props, ref) => {
56
56
  return state;
57
57
  };
58
58
 
59
- exports.useMenuItemCheckbox = useMenuItemCheckbox;
59
+ exports.useMenuItemCheckbox_unstable = useMenuItemCheckbox_unstable;
60
60
  //# sourceMappingURL=useMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,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A,GAA4B,4BAA5B","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;
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuItemCheckboxStyles = exports.menuItemCheckboxClassName = void 0;
6
+ exports.useMenuItemCheckboxStyles_unstable = exports.menuItemCheckboxClassName = void 0;
7
7
 
8
- const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const index_1 = /*#__PURE__*/require("../../selectable/index");
11
11
 
@@ -13,11 +13,11 @@ const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles"
13
13
 
14
14
  exports.menuItemCheckboxClassName = 'fui-MenuItemCheckbox';
15
15
 
16
- const useMenuItemCheckboxStyles = state => {
17
- state.root.className = react_make_styles_1.mergeClasses(exports.menuItemCheckboxClassName, state.root.className);
18
- useMenuItemStyles_1.useMenuItemStyles(state);
19
- index_1.useCheckmarkStyles(state);
16
+ const useMenuItemCheckboxStyles_unstable = state => {
17
+ state.root.className = react_1.mergeClasses(exports.menuItemCheckboxClassName, state.root.className);
18
+ useMenuItemStyles_1.useMenuItemStyles_unstable(state);
19
+ index_1.useCheckmarkStyles_unstable(state);
20
20
  };
21
21
 
22
- exports.useMenuItemCheckboxStyles = useMenuItemCheckboxStyles;
22
+ exports.useMenuItemCheckboxStyles_unstable = useMenuItemCheckboxStyles_unstable;
23
23
  //# sourceMappingURL=useMenuItemCheckboxStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAGa,OAAA,CAAA,yBAAA,GAA4B,sBAA5B;;AAEN,MAAM,yBAAyB,GAAI,KAAD,IAAiC;AACxE,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAb,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAvB;AAEA,EAAA,mBAAA,CAAA,iBAAA,CAAkB,KAAlB;AACA,EAAA,OAAA,CAAA,kBAAA,CAAmB,KAAnB;AACD,CALM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAGa,OAAA,CAAA,yBAAA,GAA4B,sBAA5B;;AAEN,MAAM,kCAAkC,GAAI,KAAD,IAAiC;AACjF,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAb,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAvB;AAEA,EAAA,mBAAA,CAAA,0BAAA,CAA2B,KAA3B;AACA,EAAA,OAAA,CAAA,2BAAA,CAA4B,KAA5B;AACD,CALM;;AAAM,OAAA,CAAA,kCAAA,GAAkC,kCAAlC","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>;
@@ -13,14 +13,14 @@ const renderMenuItemRadio_1 = /*#__PURE__*/require("./renderMenuItemRadio");
13
13
 
14
14
  const useMenuItemRadioStyles_1 = /*#__PURE__*/require("./useMenuItemRadioStyles");
15
15
  /**
16
- * Define a styled MenuItemRadio, using the `useMenuItemRadio` hook.
16
+ * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
17
17
  */
18
18
 
19
19
 
20
20
  exports.MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
21
- const state = useMenuItemRadio_1.useMenuItemRadio(props, ref);
22
- useMenuItemRadioStyles_1.useMenuItemRadioStyles(state);
23
- return renderMenuItemRadio_1.renderMenuItemRadio(state);
21
+ const state = useMenuItemRadio_1.useMenuItemRadio_unstable(props, ref);
22
+ useMenuItemRadioStyles_1.useMenuItemRadioStyles_unstable(state);
23
+ return renderMenuItemRadio_1.renderMenuItemRadio_unstable(state);
24
24
  });
25
25
  exports.MenuItemRadio.displayName = 'MenuItemRadio';
26
26
  //# sourceMappingURL=MenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB,GAAxB,CAAd;AACA,EAAA,wBAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,SAAO,qBAAA,CAAA,mBAAA,CAAoB,KAApB,CAAP;AACD,CALqE,CAAzD;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,EAAiC,GAAjC,CAAd;AACA,EAAA,wBAAA,CAAA,+BAAA,CAAgC,KAAhC;AAEA,SAAO,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,CAAP;AACD,CALqE,CAAzD;AAOb,OAAA,CAAA,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,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuItemRadio/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n"],"sourceRoot":"../src/"}
@@ -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;
@@ -3,31 +3,29 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderMenuItemRadio = void 0;
6
+ exports.renderMenuItemRadio_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
10
10
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
- const index_1 = /*#__PURE__*/require("../MenuItem/index");
13
11
  /**
14
12
  * Redefine the render function to add slots. Reuse the menuitemradio structure but add
15
13
  * slots to children.
16
14
  */
17
15
 
18
16
 
19
- const renderMenuItemRadio = state => {
17
+ const renderMenuItemRadio_unstable = state => {
20
18
  const {
21
19
  slots,
22
20
  slotProps
23
- } = react_utilities_1.getSlots(state, index_1.menuItemSlots);
21
+ } = react_utilities_1.getSlots(state);
24
22
  return React.createElement(slots.root, { ...slotProps.root
25
- }, React.createElement(slots.checkmark, { ...slotProps.checkmark
26
- }), React.createElement(slots.icon, { ...slotProps.icon
27
- }), React.createElement(slots.content, { ...slotProps.content
28
- }), React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
23
+ }, slots.checkmark && React.createElement(slots.checkmark, { ...slotProps.checkmark
24
+ }), slots.icon && React.createElement(slots.icon, { ...slotProps.icon
25
+ }), slots.content && React.createElement(slots.content, { ...slotProps.content
26
+ }), slots.secondaryContent && React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
29
27
  }));
30
28
  };
31
29
 
32
- exports.renderMenuItemRadio = renderMenuItemRadio;
30
+ exports.renderMenuItemRadio_unstable = renderMenuItemRadio_unstable;
33
31
  //# sourceMappingURL=renderMenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings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AA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,SAAN,IAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADtB,EAEG,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,OAAN,IAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHpB,EAIG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJ7B,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","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;