@fluentui/react-menu 9.7.4 → 9.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +94 -1
  3. package/CHANGELOG.md +24 -2
  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 +1 -0
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js +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.js.map +1 -1
  21. package/lib/components/Menu/useMenu.js +9 -8
  22. package/lib/components/Menu/useMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  24. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  25. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  26. package/lib/components/MenuDivider/index.js.map +1 -1
  27. package/lib/components/MenuDivider/renderMenuDivider.js +1 -3
  28. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDivider.js +1 -0
  30. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  34. package/lib/components/MenuGroup/index.js.map +1 -1
  35. package/lib/components/MenuGroup/renderMenuGroup.js +1 -3
  36. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  37. package/lib/components/MenuGroup/useMenuGroup.js +1 -0
  38. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  41. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  43. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  44. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
  45. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  46. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -0
  47. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  49. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  50. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  51. package/lib/components/MenuItem/index.js.map +1 -1
  52. package/lib/components/MenuItem/renderMenuItem.js +1 -13
  53. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  54. package/lib/components/MenuItem/useCharacterSearch.js +3 -2
  55. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  56. package/lib/components/MenuItem/useMenuItem.js +7 -7
  57. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  58. package/lib/components/MenuItem/useMenuItemStyles.js +15 -2
  59. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  60. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  61. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  62. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  63. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -11
  64. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  65. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  66. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  67. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  68. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  69. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  70. package/lib/components/MenuItemRadio/index.js.map +1 -1
  71. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -11
  72. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  73. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  74. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  75. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  76. package/lib/components/MenuList/MenuList.js.map +1 -1
  77. package/lib/components/MenuList/MenuList.types.js +1 -1
  78. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  79. package/lib/components/MenuList/index.js.map +1 -1
  80. package/lib/components/MenuList/renderMenuList.js +1 -3
  81. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  82. package/lib/components/MenuList/useMenuList.js +6 -5
  83. package/lib/components/MenuList/useMenuList.js.map +1 -1
  84. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  85. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  86. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  87. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  88. package/lib/components/MenuPopover/index.js.map +1 -1
  89. package/lib/components/MenuPopover/renderMenuPopover.js +2 -6
  90. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  91. package/lib/components/MenuPopover/useMenuPopover.js +4 -4
  92. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  93. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  94. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  95. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  96. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  97. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
  98. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  99. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -2
  100. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  101. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  102. package/lib/components/MenuTrigger/MenuTrigger.js +1 -0
  103. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  104. package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
  105. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  106. package/lib/components/MenuTrigger/index.js.map +1 -1
  107. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  108. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  109. package/lib/components/index.js.map +1 -1
  110. package/lib/contexts/menuContext.js +1 -0
  111. package/lib/contexts/menuContext.js.map +1 -1
  112. package/lib/contexts/menuGroupContext.js +2 -4
  113. package/lib/contexts/menuGroupContext.js.map +1 -1
  114. package/lib/contexts/menuListContext.js +1 -0
  115. package/lib/contexts/menuListContext.js.map +1 -1
  116. package/lib/contexts/menuTriggerContext.js +2 -4
  117. package/lib/contexts/menuTriggerContext.js.map +1 -1
  118. package/lib/index.js.map +1 -1
  119. package/lib/selectable/index.js.map +1 -1
  120. package/lib/selectable/types.js +1 -1
  121. package/lib/selectable/types.js.map +1 -1
  122. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  123. package/lib/utils/index.js.map +1 -1
  124. package/lib/utils/useIsSubmenu.js.map +1 -1
  125. package/lib/utils/useOnMenuEnter.js +2 -2
  126. package/lib/utils/useOnMenuEnter.js.map +1 -1
  127. package/lib-commonjs/Menu.js +5 -4
  128. package/lib-commonjs/Menu.js.map +1 -1
  129. package/lib-commonjs/MenuDivider.js +5 -4
  130. package/lib-commonjs/MenuDivider.js.map +1 -1
  131. package/lib-commonjs/MenuGroup.js +5 -4
  132. package/lib-commonjs/MenuGroup.js.map +1 -1
  133. package/lib-commonjs/MenuGroupHeader.js +5 -4
  134. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  135. package/lib-commonjs/MenuItem.js +5 -4
  136. package/lib-commonjs/MenuItem.js.map +1 -1
  137. package/lib-commonjs/MenuItemCheckbox.js +5 -4
  138. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  139. package/lib-commonjs/MenuItemRadio.js +5 -4
  140. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  141. package/lib-commonjs/MenuList.js +5 -4
  142. package/lib-commonjs/MenuList.js.map +1 -1
  143. package/lib-commonjs/MenuPopover.js +5 -4
  144. package/lib-commonjs/MenuPopover.js.map +1 -1
  145. package/lib-commonjs/MenuSplitGroup.js +5 -4
  146. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  147. package/lib-commonjs/MenuTrigger.js +5 -4
  148. package/lib-commonjs/MenuTrigger.js.map +1 -1
  149. package/lib-commonjs/components/Menu/Menu.js +16 -15
  150. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  151. package/lib-commonjs/components/Menu/Menu.types.js +5 -2
  152. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  153. package/lib-commonjs/components/Menu/index.js +9 -8
  154. package/lib-commonjs/components/Menu/index.js.map +1 -1
  155. package/lib-commonjs/components/Menu/renderMenu.js +14 -14
  156. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  157. package/lib-commonjs/components/Menu/useMenu.js +258 -256
  158. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  159. package/lib-commonjs/components/Menu/useMenuContextValues.js +29 -43
  160. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  161. package/lib-commonjs/components/MenuDivider/MenuDivider.js +19 -20
  162. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  163. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +3 -2
  164. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  165. package/lib-commonjs/components/MenuDivider/index.js +9 -8
  166. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +13 -19
  168. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  169. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +22 -21
  170. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  171. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +47 -25
  172. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  173. package/lib-commonjs/components/MenuGroup/MenuGroup.js +21 -22
  174. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +3 -2
  176. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroup/index.js +10 -9
  178. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +16 -22
  180. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +23 -22
  182. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  183. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +18 -15
  184. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  185. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +19 -11
  186. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  187. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +19 -20
  188. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  189. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +3 -2
  190. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  191. package/lib-commonjs/components/MenuGroupHeader/index.js +9 -8
  192. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  193. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +13 -19
  194. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  195. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +22 -23
  196. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  197. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +47 -25
  198. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  199. package/lib-commonjs/components/MenuItem/MenuItem.js +19 -20
  200. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  201. package/lib-commonjs/components/MenuItem/MenuItem.types.js +3 -2
  202. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  203. package/lib-commonjs/components/MenuItem/index.js +9 -8
  204. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  205. package/lib-commonjs/components/MenuItem/renderMenuItem.js +13 -28
  206. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  207. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +24 -22
  208. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  209. package/lib-commonjs/components/MenuItem/useMenuItem.js +97 -104
  210. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  211. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +318 -137
  212. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  213. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +19 -20
  214. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  215. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -2
  216. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  217. package/lib-commonjs/components/MenuItemCheckbox/index.js +9 -8
  218. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  219. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +13 -24
  220. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  221. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +44 -45
  222. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  223. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +38 -30
  224. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  225. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +19 -20
  226. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  227. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +3 -2
  228. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  229. package/lib-commonjs/components/MenuItemRadio/index.js +9 -8
  230. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  231. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +13 -27
  232. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  233. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +42 -45
  234. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +38 -30
  236. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  237. package/lib-commonjs/components/MenuList/MenuList.js +21 -22
  238. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  239. package/lib-commonjs/components/MenuList/MenuList.types.js +5 -2
  240. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  241. package/lib-commonjs/components/MenuList/index.js +10 -9
  242. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  243. package/lib-commonjs/components/MenuList/renderMenuList.js +16 -21
  244. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  245. package/lib-commonjs/components/MenuList/useMenuList.js +143 -137
  246. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  247. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +20 -25
  248. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  249. package/lib-commonjs/components/MenuList/useMenuListStyles.js +33 -23
  250. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  251. package/lib-commonjs/components/MenuPopover/MenuPopover.js +19 -20
  252. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  253. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -2
  254. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  255. package/lib-commonjs/components/MenuPopover/index.js +9 -8
  256. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  257. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +19 -26
  258. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  259. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +102 -110
  260. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  261. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +121 -50
  262. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  263. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +19 -20
  264. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  265. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -2
  266. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  267. package/lib-commonjs/components/MenuSplitGroup/index.js +9 -8
  268. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  269. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +13 -18
  270. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  271. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +58 -64
  272. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  273. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +61 -32
  274. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +15 -15
  276. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  277. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +5 -2
  278. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  279. package/lib-commonjs/components/MenuTrigger/index.js +8 -7
  280. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +14 -16
  282. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  283. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +163 -170
  284. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  285. package/lib-commonjs/components/index.js +6 -5
  286. package/lib-commonjs/components/index.js.map +1 -1
  287. package/lib-commonjs/contexts/menuContext.js +38 -27
  288. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  289. package/lib-commonjs/contexts/menuGroupContext.js +19 -12
  290. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  291. package/lib-commonjs/contexts/menuListContext.js +25 -14
  292. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  293. package/lib-commonjs/contexts/menuTriggerContext.js +18 -12
  294. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  295. package/lib-commonjs/index.js +91 -399
  296. package/lib-commonjs/index.js.map +1 -1
  297. package/lib-commonjs/selectable/index.js +6 -5
  298. package/lib-commonjs/selectable/index.js.map +1 -1
  299. package/lib-commonjs/selectable/types.js +5 -2
  300. package/lib-commonjs/selectable/types.js.map +1 -1
  301. package/lib-commonjs/selectable/useCheckmarkStyles.js +28 -26
  302. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  303. package/lib-commonjs/utils/index.js +5 -4
  304. package/lib-commonjs/utils/index.js.map +1 -1
  305. package/lib-commonjs/utils/useIsSubmenu.js +13 -19
  306. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  307. package/lib-commonjs/utils/useOnMenuEnter.js +57 -68
  308. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  309. package/package.json +15 -14
  310. package/lib-amd/Menu.js +0 -6
  311. package/lib-amd/Menu.js.map +0 -1
  312. package/lib-amd/MenuDivider.js +0 -6
  313. package/lib-amd/MenuDivider.js.map +0 -1
  314. package/lib-amd/MenuGroup.js +0 -6
  315. package/lib-amd/MenuGroup.js.map +0 -1
  316. package/lib-amd/MenuGroupHeader.js +0 -6
  317. package/lib-amd/MenuGroupHeader.js.map +0 -1
  318. package/lib-amd/MenuItem.js +0 -6
  319. package/lib-amd/MenuItem.js.map +0 -1
  320. package/lib-amd/MenuItemCheckbox.js +0 -6
  321. package/lib-amd/MenuItemCheckbox.js.map +0 -1
  322. package/lib-amd/MenuItemRadio.js +0 -6
  323. package/lib-amd/MenuItemRadio.js.map +0 -1
  324. package/lib-amd/MenuList.js +0 -6
  325. package/lib-amd/MenuList.js.map +0 -1
  326. package/lib-amd/MenuPopover.js +0 -6
  327. package/lib-amd/MenuPopover.js.map +0 -1
  328. package/lib-amd/MenuSplitGroup.js +0 -6
  329. package/lib-amd/MenuSplitGroup.js.map +0 -1
  330. package/lib-amd/MenuTrigger.js +0 -6
  331. package/lib-amd/MenuTrigger.js.map +0 -1
  332. package/lib-amd/components/Menu/Menu.js +0 -16
  333. package/lib-amd/components/Menu/Menu.js.map +0 -1
  334. package/lib-amd/components/Menu/Menu.types.js +0 -5
  335. package/lib-amd/components/Menu/Menu.types.js.map +0 -1
  336. package/lib-amd/components/Menu/index.js +0 -10
  337. package/lib-amd/components/Menu/index.js.map +0 -1
  338. package/lib-amd/components/Menu/renderMenu.js +0 -15
  339. package/lib-amd/components/Menu/renderMenu.js.map +0 -1
  340. package/lib-amd/components/Menu/useMenu.js +0 -224
  341. package/lib-amd/components/Menu/useMenu.js.map +0 -1
  342. package/lib-amd/components/Menu/useMenuContextValues.js +0 -29
  343. package/lib-amd/components/Menu/useMenuContextValues.js.map +0 -1
  344. package/lib-amd/components/MenuDivider/MenuDivider.js +0 -17
  345. package/lib-amd/components/MenuDivider/MenuDivider.js.map +0 -1
  346. package/lib-amd/components/MenuDivider/MenuDivider.types.js +0 -5
  347. package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +0 -1
  348. package/lib-amd/components/MenuDivider/index.js +0 -10
  349. package/lib-amd/components/MenuDivider/index.js.map +0 -1
  350. package/lib-amd/components/MenuDivider/renderMenuDivider.js +0 -15
  351. package/lib-amd/components/MenuDivider/renderMenuDivider.js.map +0 -1
  352. package/lib-amd/components/MenuDivider/useMenuDivider.js +0 -18
  353. package/lib-amd/components/MenuDivider/useMenuDivider.js.map +0 -1
  354. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js +0 -18
  355. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
  356. package/lib-amd/components/MenuGroup/MenuGroup.js +0 -18
  357. package/lib-amd/components/MenuGroup/MenuGroup.js.map +0 -1
  358. package/lib-amd/components/MenuGroup/MenuGroup.types.js +0 -5
  359. package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +0 -1
  360. package/lib-amd/components/MenuGroup/index.js +0 -11
  361. package/lib-amd/components/MenuGroup/index.js.map +0 -1
  362. package/lib-amd/components/MenuGroup/renderMenuGroup.js +0 -16
  363. package/lib-amd/components/MenuGroup/renderMenuGroup.js.map +0 -1
  364. package/lib-amd/components/MenuGroup/useMenuGroup.js +0 -20
  365. package/lib-amd/components/MenuGroup/useMenuGroup.js.map +0 -1
  366. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js +0 -12
  367. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js.map +0 -1
  368. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js +0 -14
  369. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
  370. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -17
  371. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +0 -1
  372. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -5
  373. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +0 -1
  374. package/lib-amd/components/MenuGroupHeader/index.js +0 -10
  375. package/lib-amd/components/MenuGroupHeader/index.js.map +0 -1
  376. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js +0 -15
  377. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js.map +0 -1
  378. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js +0 -19
  379. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js.map +0 -1
  380. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -27
  381. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
  382. package/lib-amd/components/MenuItem/MenuItem.js +0 -17
  383. package/lib-amd/components/MenuItem/MenuItem.js.map +0 -1
  384. package/lib-amd/components/MenuItem/MenuItem.types.js +0 -5
  385. package/lib-amd/components/MenuItem/MenuItem.types.js.map +0 -1
  386. package/lib-amd/components/MenuItem/index.js +0 -10
  387. package/lib-amd/components/MenuItem/index.js.map +0 -1
  388. package/lib-amd/components/MenuItem/renderMenuItem.js +0 -19
  389. package/lib-amd/components/MenuItem/renderMenuItem.js.map +0 -1
  390. package/lib-amd/components/MenuItem/useCharacterSearch.js +0 -22
  391. package/lib-amd/components/MenuItem/useCharacterSearch.js.map +0 -1
  392. package/lib-amd/components/MenuItem/useMenuItem.js +0 -75
  393. package/lib-amd/components/MenuItem/useMenuItem.js.map +0 -1
  394. package/lib-amd/components/MenuItem/useMenuItemStyles.js +0 -109
  395. package/lib-amd/components/MenuItem/useMenuItemStyles.js.map +0 -1
  396. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -17
  397. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +0 -1
  398. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -5
  399. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +0 -1
  400. package/lib-amd/components/MenuItemCheckbox/index.js +0 -10
  401. package/lib-amd/components/MenuItemCheckbox/index.js.map +0 -1
  402. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js +0 -16
  403. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +0 -1
  404. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js +0 -26
  405. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +0 -1
  406. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -31
  407. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
  408. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -17
  409. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +0 -1
  410. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js +0 -5
  411. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +0 -1
  412. package/lib-amd/components/MenuItemRadio/index.js +0 -10
  413. package/lib-amd/components/MenuItemRadio/index.js.map +0 -1
  414. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js +0 -19
  415. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js.map +0 -1
  416. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js +0 -27
  417. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js.map +0 -1
  418. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -31
  419. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
  420. package/lib-amd/components/MenuList/MenuList.js +0 -18
  421. package/lib-amd/components/MenuList/MenuList.js.map +0 -1
  422. package/lib-amd/components/MenuList/MenuList.types.js +0 -5
  423. package/lib-amd/components/MenuList/MenuList.types.js.map +0 -1
  424. package/lib-amd/components/MenuList/index.js +0 -11
  425. package/lib-amd/components/MenuList/index.js.map +0 -1
  426. package/lib-amd/components/MenuList/renderMenuList.js +0 -15
  427. package/lib-amd/components/MenuList/renderMenuList.js.map +0 -1
  428. package/lib-amd/components/MenuList/useMenuList.js +0 -125
  429. package/lib-amd/components/MenuList/useMenuList.js.map +0 -1
  430. package/lib-amd/components/MenuList/useMenuListContextValues.js +0 -20
  431. package/lib-amd/components/MenuList/useMenuListContextValues.js.map +0 -1
  432. package/lib-amd/components/MenuList/useMenuListStyles.js +0 -21
  433. package/lib-amd/components/MenuList/useMenuListStyles.js.map +0 -1
  434. package/lib-amd/components/MenuPopover/MenuPopover.js +0 -17
  435. package/lib-amd/components/MenuPopover/MenuPopover.js.map +0 -1
  436. package/lib-amd/components/MenuPopover/MenuPopover.types.js +0 -5
  437. package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +0 -1
  438. package/lib-amd/components/MenuPopover/index.js +0 -10
  439. package/lib-amd/components/MenuPopover/index.js.map +0 -1
  440. package/lib-amd/components/MenuPopover/renderMenuPopover.js +0 -18
  441. package/lib-amd/components/MenuPopover/renderMenuPopover.js.map +0 -1
  442. package/lib-amd/components/MenuPopover/useMenuPopover.js +0 -83
  443. package/lib-amd/components/MenuPopover/useMenuPopover.js.map +0 -1
  444. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -21
  445. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
  446. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js +0 -17
  447. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js.map +0 -1
  448. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -5
  449. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js.map +0 -1
  450. package/lib-amd/components/MenuSplitGroup/index.js +0 -10
  451. package/lib-amd/components/MenuSplitGroup/index.js.map +0 -1
  452. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js +0 -14
  453. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js.map +0 -1
  454. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js +0 -47
  455. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js.map +0 -1
  456. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js +0 -43
  457. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
  458. package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -18
  459. package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +0 -1
  460. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js +0 -5
  461. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +0 -1
  462. package/lib-amd/components/MenuTrigger/index.js +0 -9
  463. package/lib-amd/components/MenuTrigger/index.js.map +0 -1
  464. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -15
  465. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +0 -1
  466. package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -112
  467. package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +0 -1
  468. package/lib-amd/components/index.js +0 -7
  469. package/lib-amd/components/index.js.map +0 -1
  470. package/lib-amd/contexts/menuContext.js +0 -32
  471. package/lib-amd/contexts/menuContext.js.map +0 -1
  472. package/lib-amd/contexts/menuGroupContext.js +0 -13
  473. package/lib-amd/contexts/menuGroupContext.js.map +0 -1
  474. package/lib-amd/contexts/menuListContext.js +0 -23
  475. package/lib-amd/contexts/menuListContext.js.map +0 -1
  476. package/lib-amd/contexts/menuTriggerContext.js +0 -14
  477. package/lib-amd/contexts/menuTriggerContext.js.map +0 -1
  478. package/lib-amd/index.js +0 -69
  479. package/lib-amd/index.js.map +0 -1
  480. package/lib-amd/selectable/index.js +0 -7
  481. package/lib-amd/selectable/index.js.map +0 -1
  482. package/lib-amd/selectable/types.js +0 -5
  483. package/lib-amd/selectable/types.js.map +0 -1
  484. package/lib-amd/selectable/useCheckmarkStyles.js +0 -28
  485. package/lib-amd/selectable/useCheckmarkStyles.js.map +0 -1
  486. package/lib-amd/utils/index.js +0 -6
  487. package/lib-amd/utils/index.js.map +0 -1
  488. package/lib-amd/utils/useIsSubmenu.js +0 -20
  489. package/lib-amd/utils/useIsSubmenu.js.map +0 -1
  490. package/lib-amd/utils/useOnMenuEnter.js +0 -59
  491. package/lib-amd/utils/useOnMenuEnter.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemCheckbox/index.ts"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,iCAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemCheckbox/index.js"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,28 +1,17 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderMenuItemCheckbox_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderMenuItemCheckbox_unstable
5
8
  });
6
- exports.renderMenuItemCheckbox_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- /** Function that renders the final JSX of the component */
10
- const renderMenuItemCheckbox_unstable = state => {
11
- const {
12
- slots,
13
- slotProps
14
- } = react_utilities_1.getSlots(state);
15
- return React.createElement(slots.root, {
16
- ...slotProps.root
17
- }, slots.checkmark && React.createElement(slots.checkmark, {
18
- ...slotProps.checkmark
19
- }), slots.icon && React.createElement(slots.icon, {
20
- ...slotProps.icon
21
- }), slots.content && React.createElement(slots.content, {
22
- ...slotProps.content
23
- }), slots.secondaryContent && React.createElement(slots.secondaryContent, {
24
- ...slotProps.secondaryContent
25
- }));
26
- };
27
- exports.renderMenuItemCheckbox_unstable = renderMenuItemCheckbox_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const renderMenuItemCheckbox_unstable = (state)=>{
13
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slots.checkmark && /*#__PURE__*/ _react.createElement(slots.checkmark, slotProps.checkmark), slots.icon && /*#__PURE__*/ _react.createElement(slots.icon, slotProps.icon), slots.content && /*#__PURE__*/ _react.createElement(slots.content, slotProps.content), slots.secondaryContent && /*#__PURE__*/ _react.createElement(slots.secondaryContent, slotProps.secondaryContent));
15
+ }; //# sourceMappingURL=renderMenuItemCheckbox.js.map
16
+
28
17
  //# sourceMappingURL=renderMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","renderMenuItemCheckbox_unstable","state","slots","slotProps","getSlots","createElement","root","checkmark","icon","content","secondaryContent","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAIA;AACO,MAAME,+BAA+B,GAAIC,KAA4B,IAAI;EAC9E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAgBH,KAAK,CAAC;EAE3D,OACEJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BJ,KAAK,CAACK,SAAS,IAAIV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,SAAS;IAAA,GAAKJ,SAAS,CAACI;EAAS,EAAI,EAC/DL,KAAK,CAACM,IAAI,IAAIX,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,EAChDN,KAAK,CAACO,OAAO,IAAIZ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACO,OAAO;IAAA,GAAKN,SAAS,CAACM;EAAO,EAAI,EACzDP,KAAK,CAACQ,gBAAgB,IAAIb,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACQ,gBAAgB;IAAA,GAAKP,SAAS,CAACO;EAAgB,EAAI,CAC1E;AAEjB,CAAC;AAXYC,OAAA,CAAAX,+BAA+B,GAAAA,+BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/** Function that renders the final JSX of the component */\nexport const renderMenuItemCheckbox_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, slotProps.checkmark), slots.icon && /*#__PURE__*/React.createElement(slots.icon, slotProps.icon), slots.content && /*#__PURE__*/React.createElement(slots.content, slotProps.content), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, slotProps.secondaryContent));\n};\n//# sourceMappingURL=renderMenuItemCheckbox.js.map"],"names":["renderMenuItemCheckbox_unstable","state","slots","slotProps","getSlots","React","createElement","root","checkmark","icon","content","secondaryContent"],"mappings":";;;;+BAGaA;;aAAAA;;;6DAHU;gCACE;AAElB,MAAMA,kCAAkCC,CAAAA,QAAS;IACtD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEL,MAAMM,SAAS,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,SAAS,EAAEL,UAAUK,SAAS,GAAGN,MAAMO,IAAI,IAAI,WAAW,GAAEJ,OAAMC,aAAa,CAACJ,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAGP,MAAMQ,OAAO,IAAI,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMQ,OAAO,EAAEP,UAAUO,OAAO,GAAGR,MAAMS,gBAAgB,IAAI,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMS,gBAAgB,EAAER,UAAUQ,gBAAgB;AAC/a,GACA,kDAAkD"}
@@ -1,49 +1,48 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useMenuItemCheckbox_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useMenuItemCheckbox_unstable
5
8
  });
6
- exports.useMenuItemCheckbox_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
10
- const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
11
- const useMenuItem_1 = /*#__PURE__*/require("../MenuItem/useMenuItem");
12
- /** Returns the props and state required to render the component */
13
- const useMenuItemCheckbox_unstable = (props, ref) => {
14
- const toggleCheckbox = menuListContext_1.useMenuListContext_unstable(context => context.toggleCheckbox);
15
- const {
16
- name,
17
- value
18
- } = props;
19
- const checked = menuListContext_1.useMenuListContext_unstable(context => {
20
- var _a;
21
- const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[name]) || [];
22
- return checkedItems.indexOf(value) !== -1;
23
- });
24
- const state = {
25
- ...useMenuItem_1.useMenuItem_unstable({
26
- role: 'menuitemcheckbox',
27
- persistOnClick: true,
28
- ...props,
29
- 'aria-checked': checked,
30
- checkmark: react_utilities_1.resolveShorthand(props.checkmark, {
31
- defaultProps: {
32
- children: React.createElement(react_icons_1.Checkmark16Filled, null)
33
- },
34
- required: true
35
- }),
36
- onClick: e => {
37
- var _a;
38
- toggleCheckbox === null || toggleCheckbox === void 0 ? void 0 : toggleCheckbox(e, name, value, checked);
39
- (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
40
- }
41
- }, ref),
42
- name,
43
- value,
44
- checked
45
- };
46
- return state;
47
- };
48
- exports.useMenuItemCheckbox_unstable = useMenuItemCheckbox_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactIcons = require("@fluentui/react-icons");
13
+ const _menuListContext = require("../../contexts/menuListContext");
14
+ const _useMenuItem = require("../MenuItem/useMenuItem");
15
+ const useMenuItemCheckbox_unstable = (props, ref)=>{
16
+ const toggleCheckbox = (0, _menuListContext.useMenuListContext_unstable)((context)=>context.toggleCheckbox);
17
+ const { name , value } = props;
18
+ const checked = (0, _menuListContext.useMenuListContext_unstable)((context)=>{
19
+ var _context_checkedValues;
20
+ const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];
21
+ return checkedItems.indexOf(value) !== -1;
22
+ });
23
+ const state = {
24
+ ...(0, _useMenuItem.useMenuItem_unstable)({
25
+ role: 'menuitemcheckbox',
26
+ persistOnClick: true,
27
+ ...props,
28
+ 'aria-checked': checked,
29
+ checkmark: (0, _reactUtilities.resolveShorthand)(props.checkmark, {
30
+ defaultProps: {
31
+ children: /*#__PURE__*/ _react.createElement(_reactIcons.Checkmark16Filled, null)
32
+ },
33
+ required: true
34
+ }),
35
+ onClick: (e)=>{
36
+ var _props_onClick;
37
+ toggleCheckbox === null || toggleCheckbox === void 0 ? void 0 : toggleCheckbox(e, name, value, checked);
38
+ (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
39
+ }
40
+ }, ref),
41
+ name,
42
+ value,
43
+ checked
44
+ };
45
+ return state;
46
+ }; //# sourceMappingURL=useMenuItemCheckbox.js.map
47
+
49
48
  //# sourceMappingURL=useMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","react_icons_1","menuListContext_1","useMenuItem_1","useMenuItemCheckbox_unstable","props","ref","toggleCheckbox","useMenuListContext_unstable","context","name","value","checked","checkedItems","_a","checkedValues","indexOf","state","useMenuItem_unstable","role","persistOnClick","checkmark","resolveShorthand","defaultProps","children","createElement","Checkmark16Filled","required","onClick","e","call","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemCheckbox/useMenuItemCheckbox.tsx"],"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';\nimport type { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';\n\n/** Returns the props and state required to render the component */\nexport const useMenuItemCheckbox_unstable = (\n props: MenuItemCheckboxProps,\n ref: React.Ref<ARIAButtonElement<'div'>>,\n): MenuItemCheckboxState => {\n const toggleCheckbox = useMenuListContext_unstable(context => context.toggleCheckbox);\n const { name, value } = props;\n\n const checked = useMenuListContext_unstable(context => {\n const checkedItems = context.checkedValues?.[name] || [];\n return checkedItems.indexOf(value) !== -1;\n });\n\n const state: MenuItemCheckboxState = {\n ...useMenuItem_unstable(\n {\n role: 'menuitemcheckbox',\n persistOnClick: true,\n ...props,\n 'aria-checked': checked,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: { children: <Checkmark16Filled /> },\n required: true,\n }),\n onClick: (e: React.MouseEvent<ARIAButtonElementIntersection<'div'>>) => {\n toggleCheckbox?.(e, name, value, checked);\n props.onClick?.(e);\n },\n },\n ref,\n ),\n name,\n value,\n checked,\n };\n\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AACA,MAAAG,iBAAA,gBAAAH,OAAA;AACA,MAAAI,aAAA,gBAAAJ,OAAA;AAIA;AACO,MAAMK,4BAA4B,GAAGA,CAC1CC,KAA4B,EAC5BC,GAAwC,KACf;EACzB,MAAMC,cAAc,GAAGL,iBAAA,CAAAM,2BAA2B,CAACC,OAAO,IAAIA,OAAO,CAACF,cAAc,CAAC;EACrF,MAAM;IAAEG,IAAI;IAAEC;EAAK,CAAE,GAAGN,KAAK;EAE7B,MAAMO,OAAO,GAAGV,iBAAA,CAAAM,2BAA2B,CAACC,OAAO,IAAG;;IACpD,MAAMI,YAAY,GAAG,EAAAC,EAAA,GAAAL,OAAO,CAACM,aAAa,cAAAD,EAAA,uBAAAA,EAAA,CAAGJ,IAAI,CAAC,KAAI,EAAE;IACxD,OAAOG,YAAY,CAACG,OAAO,CAACL,KAAK,CAAC,KAAK,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEF,MAAMM,KAAK,GAA0B;IACnC,GAAGd,aAAA,CAAAe,oBAAoB,CACrB;MACEC,IAAI,EAAE,kBAAkB;MACxBC,cAAc,EAAE,IAAI;MACpB,GAAGf,KAAK;MACR,cAAc,EAAEO,OAAO;MACvBS,SAAS,EAAErB,iBAAA,CAAAsB,gBAAgB,CAACjB,KAAK,CAACgB,SAAS,EAAE;QAC3CE,YAAY,EAAE;UAAEC,QAAQ,EAAE1B,KAAA,CAAA2B,aAAA,CAACxB,aAAA,CAAAyB,iBAAiB;QAAG,CAAE;QACjDC,QAAQ,EAAE;OACX,CAAC;MACFC,OAAO,EAAGC,CAAyD,IAAI;;QACrEtB,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAGsB,CAAC,EAAEnB,IAAI,EAAEC,KAAK,EAAEC,OAAO,CAAC;QACzC,CAAAE,EAAA,GAAAT,KAAK,CAACuB,OAAO,cAAAd,EAAA,uBAAAA,EAAA,CAAAgB,IAAA,CAAbzB,KAAK,EAAWwB,CAAC,CAAC;MACpB;KACD,EACDvB,GAAG,CACJ;IACDI,IAAI;IACJC,KAAK;IACLC;GACD;EAED,OAAOK,KAAK;AACd,CAAC;AApCYc,OAAA,CAAA3B,4BAA4B,GAAAA,4BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemCheckbox/useMenuItemCheckbox.js"],"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';\n/** Returns the props and state required to render the component */\nexport const useMenuItemCheckbox_unstable = (props, ref) => {\n const toggleCheckbox = useMenuListContext_unstable(context => context.toggleCheckbox);\n const {\n name,\n value\n } = props;\n const checked = useMenuListContext_unstable(context => {\n var _context_checkedValues;\n const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];\n return checkedItems.indexOf(value) !== -1;\n });\n const state = {\n ...useMenuItem_unstable({\n role: 'menuitemcheckbox',\n persistOnClick: true,\n ...props,\n 'aria-checked': checked,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(Checkmark16Filled, null)\n },\n required: true\n }),\n onClick: e => {\n var _props_onClick;\n toggleCheckbox === null || toggleCheckbox === void 0 ? void 0 : toggleCheckbox(e, name, value, checked);\n (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);\n }\n }, ref),\n name,\n value,\n checked\n };\n return state;\n};\n//# sourceMappingURL=useMenuItemCheckbox.js.map"],"names":["useMenuItemCheckbox_unstable","props","ref","toggleCheckbox","useMenuListContext_unstable","context","name","value","checked","_context_checkedValues","checkedItems","checkedValues","indexOf","state","useMenuItem_unstable","role","persistOnClick","checkmark","resolveShorthand","defaultProps","children","React","createElement","Checkmark16Filled","required","onClick","e","_props_onClick","call"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;gCACU;4BACC;iCACU;6BACP;AAE9B,MAAMA,+BAA+B,CAACC,OAAOC,MAAQ;IAC1D,MAAMC,iBAAiBC,IAAAA,4CAA2B,EAACC,CAAAA,UAAWA,QAAQF,cAAc;IACpF,MAAM,EACJG,KAAI,EACJC,MAAK,EACN,GAAGN;IACJ,MAAMO,UAAUJ,IAAAA,4CAA2B,EAACC,CAAAA,UAAW;QACrD,IAAII;QACJ,MAAMC,eAAe,AAAC,CAAA,AAACD,CAAAA,yBAAyBJ,QAAQM,aAAa,AAAD,MAAO,IAAI,IAAIF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,sBAAsB,CAACH,KAAK,AAAD,KAAM,EAAE;QACnK,OAAOI,aAAaE,OAAO,CAACL,WAAW,CAAC;IAC1C;IACA,MAAMM,QAAQ;QACZ,GAAGC,IAAAA,iCAAoB,EAAC;YACtBC,MAAM;YACNC,gBAAgB,IAAI;YACpB,GAAGf,KAAK;YACR,gBAAgBO;YAChBS,WAAWC,IAAAA,gCAAgB,EAACjB,MAAMgB,SAAS,EAAE;gBAC3CE,cAAc;oBACZC,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,6BAAiB,EAAE,IAAI;gBACpE;gBACAC,UAAU,IAAI;YAChB;YACAC,SAASC,CAAAA,IAAK;gBACZ,IAAIC;gBACJxB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeuB,GAAGpB,MAAMC,OAAOC,QAAQ;gBACtGmB,CAAAA,iBAAiB1B,MAAMwB,OAAO,AAAD,MAAO,IAAI,IAAIE,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeC,IAAI,CAAC3B,OAAOyB,EAAE;YACjH;QACF,GAAGxB,IAAI;QACPI;QACAC;QACAC;IACF;IACA,OAAOK;AACT,GACA,+CAA+C"}
@@ -1,35 +1,43 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useMenuItemCheckboxStyles_unstable = exports.menuItemCheckboxClassNames = void 0;
7
- const react_1 = /*#__PURE__*/require("@griffel/react");
8
- const index_1 = /*#__PURE__*/require("../../selectable/index");
9
- const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles");
10
- exports.menuItemCheckboxClassNames = {
11
- root: 'fui-MenuItemCheckbox',
12
- icon: 'fui-MenuItemCheckbox__icon',
13
- checkmark: 'fui-MenuItemCheckbox__checkmark',
14
- content: 'fui-MenuItemCheckbox__content',
15
- secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'
16
- };
17
- const useMenuItemCheckboxStyles_unstable = state => {
18
- state.root.className = react_1.mergeClasses(exports.menuItemCheckboxClassNames.root, state.root.className);
19
- if (state.content) {
20
- state.content.className = react_1.mergeClasses(exports.menuItemCheckboxClassNames.content, state.content.className);
21
- }
22
- if (state.secondaryContent) {
23
- state.secondaryContent.className = react_1.mergeClasses(exports.menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);
24
- }
25
- if (state.icon) {
26
- state.icon.className = react_1.mergeClasses(exports.menuItemCheckboxClassNames.icon, state.icon.className);
27
- }
28
- if (state.checkmark) {
29
- state.checkmark.className = react_1.mergeClasses(exports.menuItemCheckboxClassNames.checkmark, state.checkmark.className);
30
- }
31
- useMenuItemStyles_1.useMenuItemStyles_unstable(state);
32
- index_1.useCheckmarkStyles_unstable(state);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ menuItemCheckboxClassNames: ()=>menuItemCheckboxClassNames,
13
+ useMenuItemCheckboxStyles_unstable: ()=>useMenuItemCheckboxStyles_unstable
14
+ });
15
+ const _react = require("@griffel/react");
16
+ const _index = require("../../selectable/index");
17
+ const _useMenuItemStyles = require("../MenuItem/useMenuItemStyles");
18
+ const menuItemCheckboxClassNames = {
19
+ root: 'fui-MenuItemCheckbox',
20
+ icon: 'fui-MenuItemCheckbox__icon',
21
+ checkmark: 'fui-MenuItemCheckbox__checkmark',
22
+ content: 'fui-MenuItemCheckbox__content',
23
+ secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'
33
24
  };
34
- exports.useMenuItemCheckboxStyles_unstable = useMenuItemCheckboxStyles_unstable;
25
+ const useMenuItemCheckboxStyles_unstable = (state)=>{
26
+ state.root.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.root, state.root.className);
27
+ if (state.content) {
28
+ state.content.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.content, state.content.className);
29
+ }
30
+ if (state.secondaryContent) {
31
+ state.secondaryContent.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);
32
+ }
33
+ if (state.icon) {
34
+ state.icon.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.icon, state.icon.className);
35
+ }
36
+ if (state.checkmark) {
37
+ state.checkmark.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.checkmark, state.checkmark.className);
38
+ }
39
+ (0, _useMenuItemStyles.useMenuItemStyles_unstable)(state);
40
+ (0, _index.useCheckmarkStyles_unstable)(state);
41
+ }; //# sourceMappingURL=useMenuItemCheckboxStyles.js.map
42
+
35
43
  //# sourceMappingURL=useMenuItemCheckboxStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_1","require","index_1","useMenuItemStyles_1","exports","menuItemCheckboxClassNames","root","icon","checkmark","content","secondaryContent","useMenuItemCheckboxStyles_unstable","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { MenuItemCheckboxState } from './MenuItemCheckbox.types';\n\nexport const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {\n root: 'fui-MenuItemCheckbox',\n icon: 'fui-MenuItemCheckbox__icon',\n checkmark: 'fui-MenuItemCheckbox__checkmark',\n content: 'fui-MenuItemCheckbox__content',\n secondaryContent: 'fui-MenuItemCheckbox__secondaryContent',\n};\n\nexport const useMenuItemCheckboxStyles_unstable = (state: MenuItemCheckboxState) => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n menuItemCheckboxClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,OAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AAKaG,OAAA,CAAAC,0BAA0B,GAA4D;EACjGC,IAAI,EAAE,sBAAsB;EAC5BC,IAAI,EAAE,4BAA4B;EAClCC,SAAS,EAAE,iCAAiC;EAC5CC,OAAO,EAAE,+BAA+B;EACxCC,gBAAgB,EAAE;CACnB;AAEM,MAAMC,kCAAkC,GAAIC,KAA4B,IAAI;EACjFA,KAAK,CAACN,IAAI,CAACO,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,0BAA0B,CAACC,IAAI,EAAEM,KAAK,CAACN,IAAI,CAACO,SAAS,CAAC;EAE1F,IAAID,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACI,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,0BAA0B,CAACI,OAAO,EAAEG,KAAK,CAACH,OAAO,CAACI,SAAS,CAAC;;EAGrG,IAAID,KAAK,CAACF,gBAAgB,EAAE;IAC1BE,KAAK,CAACF,gBAAgB,CAACG,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAC7CV,OAAA,CAAAC,0BAA0B,CAACK,gBAAgB,EAC3CE,KAAK,CAACF,gBAAgB,CAACG,SAAS,CACjC;;EAGH,IAAID,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,0BAA0B,CAACE,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;;EAG5F,IAAID,KAAK,CAACJ,SAAS,EAAE;IACnBI,KAAK,CAACJ,SAAS,CAACK,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,0BAA0B,CAACG,SAAS,EAAEI,KAAK,CAACJ,SAAS,CAACK,SAAS,CAAC;;EAG3GV,mBAAA,CAAAY,0BAA0B,CAACH,KAAK,CAAC;EACjCV,OAAA,CAAAc,2BAA2B,CAACJ,KAAK,CAAC;AACpC,CAAC;AAxBYR,OAAA,CAAAO,kCAAkC,GAAAA,kCAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nexport const menuItemCheckboxClassNames = {\n root: 'fui-MenuItemCheckbox',\n icon: 'fui-MenuItemCheckbox__icon',\n checkmark: 'fui-MenuItemCheckbox__checkmark',\n content: 'fui-MenuItemCheckbox__content',\n secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'\n};\nexport const useMenuItemCheckboxStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemCheckboxStyles.js.map"],"names":["menuItemCheckboxClassNames","useMenuItemCheckboxStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B,MAA1BA;IAOAC,kCAAkC,MAAlCA;;uBAVgB;uBACe;mCACD;AACpC,MAAMD,6BAA6B;IACxCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,qCAAqCM,CAAAA,QAAS;IACzDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACzF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACpG,CAAC;IACD,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC/H,CAAC;IACD,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IAC3F,CAAC;IACD,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IAC1G,CAAC;IACDE,IAAAA,6CAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,qDAAqD"}
@@ -1,25 +1,24 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "MenuItemRadio", {
6
+ enumerable: true,
7
+ get: ()=>MenuItemRadio
5
8
  });
6
- exports.MenuItemRadio = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useMenuItemRadio_1 = /*#__PURE__*/require("./useMenuItemRadio");
9
- const renderMenuItemRadio_1 = /*#__PURE__*/require("./renderMenuItemRadio");
10
- const useMenuItemRadioStyles_1 = /*#__PURE__*/require("./useMenuItemRadioStyles");
11
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
12
- /**
13
- * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
14
- */
15
- exports.MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
16
- const state = useMenuItemRadio_1.useMenuItemRadio_unstable(props, ref);
17
- useMenuItemRadioStyles_1.useMenuItemRadioStyles_unstable(state);
18
- const {
19
- useMenuItemRadioStyles_unstable: useCustomStyles
20
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
21
- useCustomStyles(state);
22
- return renderMenuItemRadio_1.renderMenuItemRadio_unstable(state);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useMenuItemRadio = require("./useMenuItemRadio");
12
+ const _renderMenuItemRadio = require("./renderMenuItemRadio");
13
+ const _useMenuItemRadioStyles = require("./useMenuItemRadioStyles");
14
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const MenuItemRadio = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
+ const state = (0, _useMenuItemRadio.useMenuItemRadio_unstable)(props, ref);
17
+ (0, _useMenuItemRadioStyles.useMenuItemRadioStyles_unstable)(state);
18
+ const { useMenuItemRadioStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
19
+ useCustomStyles(state);
20
+ return (0, _renderMenuItemRadio.renderMenuItemRadio_unstable)(state);
23
21
  });
24
- exports.MenuItemRadio.displayName = 'MenuItemRadio';
22
+ MenuItemRadio.displayName = 'MenuItemRadio'; //# sourceMappingURL=MenuItemRadio.js.map
23
+
25
24
  //# sourceMappingURL=MenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useMenuItemRadio_1","renderMenuItemRadio_1","useMenuItemRadioStyles_1","react_shared_contexts_1","exports","MenuItemRadio","forwardRef","props","ref","state","useMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderMenuItemRadio_unstable","displayName"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.tsx"],"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';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\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\n useMenuItemRadioStyles_unstable(state);\n\n const { useMenuItemRadioStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderMenuItemRadio_unstable(state);\n});\n\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,qBAAA,gBAAAF,OAAA;AACA,MAAAG,wBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,aAAa,gBAA4CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGT,kBAAA,CAAAU,yBAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDN,wBAAA,CAAAS,+BAA+B,CAACF,KAAK,CAAC;EAEtC,MAAM;IAAEE,+BAA+B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EAC3FD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,qBAAA,CAAAa,4BAA4B,CAACL,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,OAAA,CAAAC,aAAa,CAACU,WAAW,GAAG,eAAe"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/MenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */\nexport const MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuItemRadio_unstable(props, ref);\n useMenuItemRadioStyles_unstable(state);\n const {\n useMenuItemRadioStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderMenuItemRadio_unstable(state);\n});\nMenuItemRadio.displayName = 'MenuItemRadio';\n//# sourceMappingURL=MenuItemRadio.js.map"],"names":["MenuItemRadio","React","forwardRef","props","ref","state","useMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderMenuItemRadio_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;kCACmB;qCACG;wCACG;qCACH;AAItC,MAAMA,gBAAgB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,uDAA+B,EAACF;IAChC,MAAM,EACJE,iCAAiCC,gBAAe,EACjD,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBH;IAChB,OAAOK,IAAAA,iDAA4B,EAACL;AACtC;AACAL,cAAcW,WAAW,GAAG,iBAC5B,yCAAyC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ //# sourceMappingURL=MenuItemRadio.types.js.map
6
+
6
7
  //# sourceMappingURL=MenuItemRadio.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.types.ts"],"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"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/MenuItemRadio.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=MenuItemRadio.types.js.map"],"names":[],"mappings":";;;;CACA,+CAA+C"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./MenuItemRadio.types"), exports);
8
- tslib_1.__exportStar(require("./MenuItemRadio"), exports);
9
- tslib_1.__exportStar(require("./renderMenuItemRadio"), exports);
10
- tslib_1.__exportStar(require("./useMenuItemRadio"), exports);
11
- tslib_1.__exportStar(require("./useMenuItemRadioStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./MenuItemRadio.types"), exports);
7
+ _exportStar(require("./MenuItemRadio"), exports);
8
+ _exportStar(require("./renderMenuItemRadio"), exports);
9
+ _exportStar(require("./useMenuItemRadio"), exports);
10
+ _exportStar(require("./useMenuItemRadioStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/index.ts"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/index.js"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,31 +1,17 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderMenuItemRadio_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderMenuItemRadio_unstable
5
8
  });
6
- exports.renderMenuItemRadio_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- /**
10
- * Redefine the render function to add slots. Reuse the menuitemradio structure but add
11
- * slots to children.
12
- */
13
- const renderMenuItemRadio_unstable = state => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(slots.root, {
19
- ...slotProps.root
20
- }, slots.checkmark && React.createElement(slots.checkmark, {
21
- ...slotProps.checkmark
22
- }), slots.icon && React.createElement(slots.icon, {
23
- ...slotProps.icon
24
- }), slots.content && React.createElement(slots.content, {
25
- ...slotProps.content
26
- }), slots.secondaryContent && React.createElement(slots.secondaryContent, {
27
- ...slotProps.secondaryContent
28
- }));
29
- };
30
- exports.renderMenuItemRadio_unstable = renderMenuItemRadio_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const renderMenuItemRadio_unstable = (state)=>{
13
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slots.checkmark && /*#__PURE__*/ _react.createElement(slots.checkmark, slotProps.checkmark), slots.icon && /*#__PURE__*/ _react.createElement(slots.icon, slotProps.icon), slots.content && /*#__PURE__*/ _react.createElement(slots.content, slotProps.content), slots.secondaryContent && /*#__PURE__*/ _react.createElement(slots.secondaryContent, slotProps.secondaryContent));
15
+ }; //# sourceMappingURL=renderMenuItemRadio.js.map
16
+
31
17
  //# sourceMappingURL=renderMenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","renderMenuItemRadio_unstable","state","slots","slotProps","getSlots","createElement","root","checkmark","icon","content","secondaryContent","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAIA;;;;AAIO,MAAME,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAgBH,KAAK,CAAC;EAE3D,OACEJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BJ,KAAK,CAACK,SAAS,IAAIV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,SAAS;IAAA,GAAKJ,SAAS,CAACI;EAAS,EAAI,EAC/DL,KAAK,CAACM,IAAI,IAAIX,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,EAChDN,KAAK,CAACO,OAAO,IAAIZ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACO,OAAO;IAAA,GAAKN,SAAS,CAACM;EAAO,EAAI,EACzDP,KAAK,CAACQ,gBAAgB,IAAIb,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACQ,gBAAgB;IAAA,GAAKP,SAAS,CAACO;EAAgB,EAAI,CAC1E;AAEjB,CAAC;AAXYC,OAAA,CAAAX,4BAA4B,GAAAA,4BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/renderMenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\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 => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.checkmark && /*#__PURE__*/React.createElement(slots.checkmark, slotProps.checkmark), slots.icon && /*#__PURE__*/React.createElement(slots.icon, slotProps.icon), slots.content && /*#__PURE__*/React.createElement(slots.content, slotProps.content), slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, slotProps.secondaryContent));\n};\n//# sourceMappingURL=renderMenuItemRadio.js.map"],"names":["renderMenuItemRadio_unstable","state","slots","slotProps","getSlots","React","createElement","root","checkmark","icon","content","secondaryContent"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;gCACE;AAKlB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEL,MAAMM,SAAS,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,SAAS,EAAEL,UAAUK,SAAS,GAAGN,MAAMO,IAAI,IAAI,WAAW,GAAEJ,OAAMC,aAAa,CAACJ,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAGP,MAAMQ,OAAO,IAAI,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMQ,OAAO,EAAEP,UAAUO,OAAO,GAAGR,MAAMS,gBAAgB,IAAI,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMS,gBAAgB,EAAER,UAAUQ,gBAAgB;AAC/a,GACA,+CAA+C"}
@@ -1,49 +1,46 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useMenuItemRadio_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useMenuItemRadio_unstable
5
8
  });
6
- exports.useMenuItemRadio_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
10
- const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
11
- const useMenuItem_1 = /*#__PURE__*/require("../MenuItem/useMenuItem");
12
- /**
13
- * Given user props, returns state and render function for a MenuItemRadio.
14
- */
15
- const useMenuItemRadio_unstable = (props, ref) => {
16
- const {
17
- name,
18
- value
19
- } = props;
20
- const checked = menuListContext_1.useMenuListContext_unstable(context => {
21
- var _a;
22
- const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[name]) || [];
23
- return checkedItems.indexOf(value) !== -1;
24
- });
25
- const selectRadio = menuListContext_1.useMenuListContext_unstable(context => context.selectRadio);
26
- return {
27
- ...useMenuItem_1.useMenuItem_unstable({
28
- ...props,
29
- role: 'menuitemradio',
30
- 'aria-checked': checked,
31
- checkmark: react_utilities_1.resolveShorthand(props.checkmark, {
32
- defaultProps: {
33
- children: React.createElement(react_icons_1.Checkmark16Filled, null)
34
- },
35
- required: true
36
- }),
37
- onClick: e => {
38
- var _a;
39
- selectRadio === null || selectRadio === void 0 ? void 0 : selectRadio(e, name, value, checked);
40
- (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
41
- }
42
- }, ref),
43
- checked,
44
- name,
45
- value
46
- };
47
- };
48
- exports.useMenuItemRadio_unstable = useMenuItemRadio_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactIcons = require("@fluentui/react-icons");
13
+ const _menuListContext = require("../../contexts/menuListContext");
14
+ const _useMenuItem = require("../MenuItem/useMenuItem");
15
+ const useMenuItemRadio_unstable = (props, ref)=>{
16
+ const { name , value } = props;
17
+ const checked = (0, _menuListContext.useMenuListContext_unstable)((context)=>{
18
+ var _context_checkedValues;
19
+ const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];
20
+ return checkedItems.indexOf(value) !== -1;
21
+ });
22
+ const selectRadio = (0, _menuListContext.useMenuListContext_unstable)((context)=>context.selectRadio);
23
+ return {
24
+ ...(0, _useMenuItem.useMenuItem_unstable)({
25
+ ...props,
26
+ role: 'menuitemradio',
27
+ 'aria-checked': checked,
28
+ checkmark: (0, _reactUtilities.resolveShorthand)(props.checkmark, {
29
+ defaultProps: {
30
+ children: /*#__PURE__*/ _react.createElement(_reactIcons.Checkmark16Filled, null)
31
+ },
32
+ required: true
33
+ }),
34
+ onClick: (e)=>{
35
+ var _props_onClick;
36
+ selectRadio === null || selectRadio === void 0 ? void 0 : selectRadio(e, name, value, checked);
37
+ (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
38
+ }
39
+ }, ref),
40
+ checked,
41
+ name,
42
+ value
43
+ };
44
+ }; //# sourceMappingURL=useMenuItemRadio.js.map
45
+
49
46
  //# sourceMappingURL=useMenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","react_icons_1","menuListContext_1","useMenuItem_1","useMenuItemRadio_unstable","props","ref","name","value","checked","useMenuListContext_unstable","context","checkedItems","_a","checkedValues","indexOf","selectRadio","useMenuItem_unstable","role","checkmark","resolveShorthand","defaultProps","children","createElement","Checkmark16Filled","required","onClick","e","call","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/useMenuItemRadio.tsx"],"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';\nimport type { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';\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<ARIAButtonElement<'div'>>,\n): MenuItemRadioState => {\n const { name, value } = props;\n\n const checked = useMenuListContext_unstable(context => {\n const checkedItems = context.checkedValues?.[name] || [];\n return checkedItems.indexOf(value) !== -1;\n });\n\n const selectRadio = useMenuListContext_unstable(context => context.selectRadio);\n\n return {\n ...useMenuItem_unstable(\n {\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: { children: <Checkmark16Filled /> },\n required: true,\n }),\n onClick: (e: React.MouseEvent<ARIAButtonElementIntersection<'div'>>) => {\n selectRadio?.(e, name, value, checked);\n props.onClick?.(e);\n },\n },\n ref,\n ),\n checked,\n name,\n value,\n };\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AACA,MAAAG,iBAAA,gBAAAH,OAAA;AACA,MAAAI,aAAA,gBAAAJ,OAAA;AAIA;;;AAGO,MAAMK,yBAAyB,GAAGA,CACvCC,KAAyB,EACzBC,GAAwC,KAClB;EACtB,MAAM;IAAEC,IAAI;IAAEC;EAAK,CAAE,GAAGH,KAAK;EAE7B,MAAMI,OAAO,GAAGP,iBAAA,CAAAQ,2BAA2B,CAACC,OAAO,IAAG;;IACpD,MAAMC,YAAY,GAAG,EAAAC,EAAA,GAAAF,OAAO,CAACG,aAAa,cAAAD,EAAA,uBAAAA,EAAA,CAAGN,IAAI,CAAC,KAAI,EAAE;IACxD,OAAOK,YAAY,CAACG,OAAO,CAACP,KAAK,CAAC,KAAK,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEF,MAAMQ,WAAW,GAAGd,iBAAA,CAAAQ,2BAA2B,CAACC,OAAO,IAAIA,OAAO,CAACK,WAAW,CAAC;EAE/E,OAAO;IACL,GAAGb,aAAA,CAAAc,oBAAoB,CACrB;MACE,GAAGZ,KAAK;MACRa,IAAI,EAAE,eAAe;MACrB,cAAc,EAAET,OAAO;MACvBU,SAAS,EAAEnB,iBAAA,CAAAoB,gBAAgB,CAACf,KAAK,CAACc,SAAS,EAAE;QAC3CE,YAAY,EAAE;UAAEC,QAAQ,EAAExB,KAAA,CAAAyB,aAAA,CAACtB,aAAA,CAAAuB,iBAAiB;QAAG,CAAE;QACjDC,QAAQ,EAAE;OACX,CAAC;MACFC,OAAO,EAAGC,CAAyD,IAAI;;QACrEX,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAGW,CAAC,EAAEpB,IAAI,EAAEC,KAAK,EAAEC,OAAO,CAAC;QACtC,CAAAI,EAAA,GAAAR,KAAK,CAACqB,OAAO,cAAAb,EAAA,uBAAAA,EAAA,CAAAe,IAAA,CAAbvB,KAAK,EAAWsB,CAAC,CAAC;MACpB;KACD,EACDrB,GAAG,CACJ;IACDG,OAAO;IACPF,IAAI;IACJC;GACD;AACH,CAAC;AAlCYqB,OAAA,CAAAzB,yBAAyB,GAAAA,yBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/useMenuItemRadio.js"],"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';\n/**\n * Given user props, returns state and render function for a MenuItemRadio.\n */\nexport const useMenuItemRadio_unstable = (props, ref) => {\n const {\n name,\n value\n } = props;\n const checked = useMenuListContext_unstable(context => {\n var _context_checkedValues;\n const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];\n return checkedItems.indexOf(value) !== -1;\n });\n const selectRadio = useMenuListContext_unstable(context => context.selectRadio);\n return {\n ...useMenuItem_unstable({\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: resolveShorthand(props.checkmark, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(Checkmark16Filled, null)\n },\n required: true\n }),\n onClick: e => {\n var _props_onClick;\n selectRadio === null || selectRadio === void 0 ? void 0 : selectRadio(e, name, value, checked);\n (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);\n }\n }, ref),\n checked,\n name,\n value\n };\n};\n//# sourceMappingURL=useMenuItemRadio.js.map"],"names":["useMenuItemRadio_unstable","props","ref","name","value","checked","useMenuListContext_unstable","context","_context_checkedValues","checkedItems","checkedValues","indexOf","selectRadio","useMenuItem_unstable","role","checkmark","resolveShorthand","defaultProps","children","React","createElement","Checkmark16Filled","required","onClick","e","_props_onClick","call"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACU;4BACC;iCACU;6BACP;AAI9B,MAAMA,4BAA4B,CAACC,OAAOC,MAAQ;IACvD,MAAM,EACJC,KAAI,EACJC,MAAK,EACN,GAAGH;IACJ,MAAMI,UAAUC,IAAAA,4CAA2B,EAACC,CAAAA,UAAW;QACrD,IAAIC;QACJ,MAAMC,eAAe,AAAC,CAAA,AAACD,CAAAA,yBAAyBD,QAAQG,aAAa,AAAD,MAAO,IAAI,IAAIF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,sBAAsB,CAACL,KAAK,AAAD,KAAM,EAAE;QACnK,OAAOM,aAAaE,OAAO,CAACP,WAAW,CAAC;IAC1C;IACA,MAAMQ,cAAcN,IAAAA,4CAA2B,EAACC,CAAAA,UAAWA,QAAQK,WAAW;IAC9E,OAAO;QACL,GAAGC,IAAAA,iCAAoB,EAAC;YACtB,GAAGZ,KAAK;YACRa,MAAM;YACN,gBAAgBT;YAChBU,WAAWC,IAAAA,gCAAgB,EAACf,MAAMc,SAAS,EAAE;gBAC3CE,cAAc;oBACZC,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,6BAAiB,EAAE,IAAI;gBACpE;gBACAC,UAAU,IAAI;YAChB;YACAC,SAASC,CAAAA,IAAK;gBACZ,IAAIC;gBACJb,gBAAgB,IAAI,IAAIA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYY,GAAGrB,MAAMC,OAAOC,QAAQ;gBAC7FoB,CAAAA,iBAAiBxB,MAAMsB,OAAO,AAAD,MAAO,IAAI,IAAIE,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeC,IAAI,CAACzB,OAAOuB,EAAE;YACjH;QACF,GAAGtB,IAAI;QACPG;QACAF;QACAC;IACF;AACF,GACA,4CAA4C"}