@fluentui/react-menu 9.25.7 → 9.25.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/lib/components/Menu/Menu.js.map +1 -1
  3. package/lib/components/Menu/Menu.types.js.map +1 -1
  4. package/lib/components/Menu/MenuSurfaceMotion.js.map +1 -1
  5. package/lib/components/Menu/index.js.map +1 -1
  6. package/lib/components/Menu/renderMenu.js +2 -2
  7. package/lib/components/Menu/renderMenu.js.map +1 -1
  8. package/lib/components/Menu/useMenu.js +2 -2
  9. package/lib/components/Menu/useMenu.js.map +1 -1
  10. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  11. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  13. package/lib/components/MenuDivider/index.js.map +1 -1
  14. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  15. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  16. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  17. package/lib/components/MenuDivider/useMenuDividerStyles.styles.raw.js.map +1 -1
  18. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  19. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  20. package/lib/components/MenuGroup/index.js.map +1 -1
  21. package/lib/components/MenuGroup/renderMenuGroup.js +2 -2
  22. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  23. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  24. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  25. package/lib/components/MenuGroup/useMenuGroupStyles.styles.raw.js.map +1 -1
  26. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  27. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  28. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  29. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  30. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  31. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  32. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.js.map +1 -1
  33. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  34. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  35. package/lib/components/MenuItem/index.js.map +1 -1
  36. package/lib/components/MenuItem/renderMenuItem.js +2 -2
  37. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  38. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  39. package/lib/components/MenuItem/useMenuItem.js +1 -2
  40. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  41. package/lib/components/MenuItem/useMenuItemBase.js.map +1 -1
  42. package/lib/components/MenuItem/useMenuItemStyles.styles.js +19 -9
  43. package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  44. package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js +15 -6
  45. package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js.map +1 -1
  46. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  47. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  48. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  49. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +2 -2
  50. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  51. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +1 -2
  52. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  53. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.js.map +1 -1
  54. package/lib/components/MenuItemLink/MenuItemLink.js.map +1 -1
  55. package/lib/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
  56. package/lib/components/MenuItemLink/index.js.map +1 -1
  57. package/lib/components/MenuItemLink/renderMenuItemLink.js +2 -2
  58. package/lib/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
  59. package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  60. package/lib/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.js.map +1 -1
  61. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  62. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  63. package/lib/components/MenuItemRadio/index.js.map +1 -1
  64. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +2 -2
  65. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  66. package/lib/components/MenuItemRadio/useMenuItemRadio.js +1 -2
  67. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  68. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.js.map +1 -1
  69. package/lib/components/MenuItemSwitch/MenuItemSwitch.js.map +1 -1
  70. package/lib/components/MenuItemSwitch/MenuItemSwitch.types.js.map +1 -1
  71. package/lib/components/MenuItemSwitch/index.js.map +1 -1
  72. package/lib/components/MenuItemSwitch/renderMenuItemSwitch.js +2 -2
  73. package/lib/components/MenuItemSwitch/renderMenuItemSwitch.js.map +1 -1
  74. package/lib/components/MenuItemSwitch/useMenuItemSwitch.js +1 -2
  75. package/lib/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -1
  76. package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js.map +1 -1
  77. package/lib/components/MenuList/MenuList.js.map +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 +2 -2
  81. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  82. package/lib/components/MenuList/useMenuList.js +1 -3
  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.styles.raw.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 -2
  90. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  91. package/lib/components/MenuPopover/useMenuPopover.js +1 -1
  92. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  93. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.raw.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 +4 -4
  98. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  99. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  100. package/lib/components/MenuSplitGroup/useMenuSplitGroupContextValues.js.map +1 -1
  101. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.js.map +1 -1
  102. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  103. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  104. package/lib/components/MenuTrigger/index.js.map +1 -1
  105. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  106. package/lib/components/MenuTrigger/useMenuTrigger.js +2 -2
  107. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  108. package/lib/components/index.js.map +1 -1
  109. package/lib/contexts/menuContext.js.map +1 -1
  110. package/lib/contexts/menuGroupContext.js.map +1 -1
  111. package/lib/contexts/menuListContext.js.map +1 -1
  112. package/lib/contexts/menuSplitGroupContext.js.map +1 -1
  113. package/lib/contexts/menuTriggerContext.js.map +1 -1
  114. package/lib/selectable/index.js.map +1 -1
  115. package/lib/selectable/types.js.map +1 -1
  116. package/lib/selectable/useCheckmarkStyles.styles.raw.js.map +1 -1
  117. package/lib/utils/index.js.map +1 -1
  118. package/lib/utils/useIsSubmenu.js.map +1 -1
  119. package/lib/utils/useOnMenuEnter.js +1 -1
  120. package/lib/utils/useOnMenuEnter.js.map +1 -1
  121. package/lib/utils/useOnMenuSafeZoneTimeout.js.map +1 -1
  122. package/lib/utils/useValidateNesting.js +4 -4
  123. package/lib/utils/useValidateNesting.js.map +1 -1
  124. package/lib-commonjs/Menu.cjs +6 -6
  125. package/lib-commonjs/MenuDivider.cjs +6 -6
  126. package/lib-commonjs/MenuGroup.cjs +7 -7
  127. package/lib-commonjs/MenuGroupHeader.cjs +6 -6
  128. package/lib-commonjs/MenuItem.cjs +7 -7
  129. package/lib-commonjs/MenuItemCheckbox.cjs +7 -7
  130. package/lib-commonjs/MenuItemLink.cjs +7 -7
  131. package/lib-commonjs/MenuItemRadio.cjs +7 -7
  132. package/lib-commonjs/MenuItemSwitch.cjs +8 -8
  133. package/lib-commonjs/MenuList.cjs +8 -8
  134. package/lib-commonjs/MenuPopover.cjs +7 -7
  135. package/lib-commonjs/MenuSplitGroup.cjs +6 -6
  136. package/lib-commonjs/MenuTrigger.cjs +5 -5
  137. package/lib-commonjs/components/Menu/Menu.cjs.map +1 -1
  138. package/lib-commonjs/components/Menu/Menu.types.cjs.map +1 -1
  139. package/lib-commonjs/components/Menu/MenuSurfaceMotion.cjs.map +1 -1
  140. package/lib-commonjs/components/Menu/index.cjs +6 -6
  141. package/lib-commonjs/components/Menu/index.cjs.map +1 -1
  142. package/lib-commonjs/components/Menu/renderMenu.cjs.map +1 -1
  143. package/lib-commonjs/components/Menu/useMenu.cjs +5 -5
  144. package/lib-commonjs/components/Menu/useMenu.cjs.map +1 -1
  145. package/lib-commonjs/components/Menu/useMenuContextValues.cjs.map +1 -1
  146. package/lib-commonjs/components/MenuDivider/MenuDivider.cjs.map +1 -1
  147. package/lib-commonjs/components/MenuDivider/MenuDivider.types.cjs.map +1 -1
  148. package/lib-commonjs/components/MenuDivider/index.cjs +6 -6
  149. package/lib-commonjs/components/MenuDivider/index.cjs.map +1 -1
  150. package/lib-commonjs/components/MenuDivider/renderMenuDivider.cjs.map +1 -1
  151. package/lib-commonjs/components/MenuDivider/useMenuDivider.cjs.map +1 -1
  152. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.cjs +3 -3
  153. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.cjs.map +1 -1
  154. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.raw.cjs +3 -3
  155. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.raw.cjs.map +1 -1
  156. package/lib-commonjs/components/MenuGroup/MenuGroup.cjs.map +1 -1
  157. package/lib-commonjs/components/MenuGroup/MenuGroup.types.cjs.map +1 -1
  158. package/lib-commonjs/components/MenuGroup/index.cjs +7 -7
  159. package/lib-commonjs/components/MenuGroup/index.cjs.map +1 -1
  160. package/lib-commonjs/components/MenuGroup/renderMenuGroup.cjs.map +1 -1
  161. package/lib-commonjs/components/MenuGroup/useMenuGroup.cjs.map +1 -1
  162. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.cjs.map +1 -1
  163. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.cjs +3 -3
  164. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.cjs.map +1 -1
  165. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.raw.cjs +3 -3
  166. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.raw.cjs.map +1 -1
  167. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.cjs.map +1 -1
  168. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.cjs.map +1 -1
  169. package/lib-commonjs/components/MenuGroupHeader/index.cjs +6 -6
  170. package/lib-commonjs/components/MenuGroupHeader/index.cjs.map +1 -1
  171. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.cjs.map +1 -1
  172. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.cjs.map +1 -1
  173. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.cjs +3 -3
  174. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.cjs.map +1 -1
  175. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.cjs +3 -3
  176. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.raw.cjs.map +1 -1
  177. package/lib-commonjs/components/MenuItem/MenuItem.cjs.map +1 -1
  178. package/lib-commonjs/components/MenuItem/MenuItem.types.cjs.map +1 -1
  179. package/lib-commonjs/components/MenuItem/index.cjs +7 -7
  180. package/lib-commonjs/components/MenuItem/index.cjs.map +1 -1
  181. package/lib-commonjs/components/MenuItem/renderMenuItem.cjs.map +1 -1
  182. package/lib-commonjs/components/MenuItem/useCharacterSearch.cjs.map +1 -1
  183. package/lib-commonjs/components/MenuItem/useMenuItem.cjs +1 -2
  184. package/lib-commonjs/components/MenuItem/useMenuItem.cjs.map +1 -1
  185. package/lib-commonjs/components/MenuItem/useMenuItemBase.cjs.map +1 -1
  186. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.cjs +60 -38
  187. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.cjs.map +1 -1
  188. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.cjs +18 -9
  189. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.cjs.map +1 -1
  190. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.cjs.map +1 -1
  191. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.cjs.map +1 -1
  192. package/lib-commonjs/components/MenuItemCheckbox/index.cjs +7 -7
  193. package/lib-commonjs/components/MenuItemCheckbox/index.cjs.map +1 -1
  194. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.cjs.map +1 -1
  195. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.cjs +4 -5
  196. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.cjs.map +1 -1
  197. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.cjs +3 -3
  198. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.cjs.map +1 -1
  199. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.cjs +3 -3
  200. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.raw.cjs.map +1 -1
  201. package/lib-commonjs/components/MenuItemLink/MenuItemLink.cjs.map +1 -1
  202. package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.cjs.map +1 -1
  203. package/lib-commonjs/components/MenuItemLink/index.cjs +7 -7
  204. package/lib-commonjs/components/MenuItemLink/index.cjs.map +1 -1
  205. package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.cjs.map +1 -1
  206. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.cjs +3 -3
  207. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.cjs.map +1 -1
  208. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.cjs +3 -3
  209. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.cjs.map +1 -1
  210. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.cjs +3 -3
  211. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.raw.cjs.map +1 -1
  212. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.cjs.map +1 -1
  213. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.cjs.map +1 -1
  214. package/lib-commonjs/components/MenuItemRadio/index.cjs +7 -7
  215. package/lib-commonjs/components/MenuItemRadio/index.cjs.map +1 -1
  216. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.cjs.map +1 -1
  217. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.cjs +4 -5
  218. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.cjs.map +1 -1
  219. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.cjs +3 -3
  220. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.cjs.map +1 -1
  221. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.cjs +3 -3
  222. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.raw.cjs.map +1 -1
  223. package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.cjs.map +1 -1
  224. package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.types.cjs.map +1 -1
  225. package/lib-commonjs/components/MenuItemSwitch/index.cjs +8 -8
  226. package/lib-commonjs/components/MenuItemSwitch/index.cjs.map +1 -1
  227. package/lib-commonjs/components/MenuItemSwitch/renderMenuItemSwitch.cjs.map +1 -1
  228. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitch.cjs +4 -5
  229. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitch.cjs.map +1 -1
  230. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.cjs +4 -4
  231. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.cjs.map +1 -1
  232. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.cjs +4 -4
  233. package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.cjs.map +1 -1
  234. package/lib-commonjs/components/MenuList/MenuList.cjs.map +1 -1
  235. package/lib-commonjs/components/MenuList/MenuList.types.cjs.map +1 -1
  236. package/lib-commonjs/components/MenuList/index.cjs +8 -8
  237. package/lib-commonjs/components/MenuList/index.cjs.map +1 -1
  238. package/lib-commonjs/components/MenuList/renderMenuList.cjs.map +1 -1
  239. package/lib-commonjs/components/MenuList/useMenuList.cjs +4 -6
  240. package/lib-commonjs/components/MenuList/useMenuList.cjs.map +1 -1
  241. package/lib-commonjs/components/MenuList/useMenuListContextValues.cjs.map +1 -1
  242. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.cjs +3 -3
  243. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.cjs.map +1 -1
  244. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.raw.cjs +3 -3
  245. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.raw.cjs.map +1 -1
  246. package/lib-commonjs/components/MenuPopover/MenuPopover.cjs.map +1 -1
  247. package/lib-commonjs/components/MenuPopover/MenuPopover.types.cjs.map +1 -1
  248. package/lib-commonjs/components/MenuPopover/index.cjs +7 -7
  249. package/lib-commonjs/components/MenuPopover/index.cjs.map +1 -1
  250. package/lib-commonjs/components/MenuPopover/renderMenuPopover.cjs.map +1 -1
  251. package/lib-commonjs/components/MenuPopover/useMenuPopover.cjs +4 -4
  252. package/lib-commonjs/components/MenuPopover/useMenuPopover.cjs.map +1 -1
  253. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.cjs +3 -3
  254. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.cjs.map +1 -1
  255. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.raw.cjs +3 -3
  256. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.raw.cjs.map +1 -1
  257. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.cjs.map +1 -1
  258. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.cjs.map +1 -1
  259. package/lib-commonjs/components/MenuSplitGroup/index.cjs +6 -6
  260. package/lib-commonjs/components/MenuSplitGroup/index.cjs.map +1 -1
  261. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.cjs +2 -2
  262. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.cjs.map +1 -1
  263. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.cjs.map +1 -1
  264. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupContextValues.cjs.map +1 -1
  265. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.cjs +4 -4
  266. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.cjs.map +1 -1
  267. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.cjs +4 -4
  268. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.raw.cjs.map +1 -1
  269. package/lib-commonjs/components/MenuTrigger/MenuTrigger.cjs.map +1 -1
  270. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.cjs.map +1 -1
  271. package/lib-commonjs/components/MenuTrigger/index.cjs +5 -5
  272. package/lib-commonjs/components/MenuTrigger/index.cjs.map +1 -1
  273. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.cjs.map +1 -1
  274. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.cjs +5 -5
  275. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.cjs.map +1 -1
  276. package/lib-commonjs/components/index.cjs +12 -12
  277. package/lib-commonjs/components/index.cjs.map +1 -1
  278. package/lib-commonjs/contexts/menuContext.cjs +4 -4
  279. package/lib-commonjs/contexts/menuContext.cjs.map +1 -1
  280. package/lib-commonjs/contexts/menuGroupContext.cjs +3 -3
  281. package/lib-commonjs/contexts/menuGroupContext.cjs.map +1 -1
  282. package/lib-commonjs/contexts/menuListContext.cjs +4 -4
  283. package/lib-commonjs/contexts/menuListContext.cjs.map +1 -1
  284. package/lib-commonjs/contexts/menuSplitGroupContext.cjs +5 -5
  285. package/lib-commonjs/contexts/menuSplitGroupContext.cjs.map +1 -1
  286. package/lib-commonjs/contexts/menuTriggerContext.cjs +3 -3
  287. package/lib-commonjs/contexts/menuTriggerContext.cjs.map +1 -1
  288. package/lib-commonjs/index.cjs +86 -86
  289. package/lib-commonjs/index.cjs.map +1 -1
  290. package/lib-commonjs/selectable/index.cjs.map +1 -1
  291. package/lib-commonjs/selectable/types.cjs.map +1 -1
  292. package/lib-commonjs/selectable/useCheckmarkStyles.styles.raw.cjs.map +1 -1
  293. package/lib-commonjs/utils/index.cjs +8 -8
  294. package/lib-commonjs/utils/index.cjs.map +1 -1
  295. package/lib-commonjs/utils/useIsSubmenu.cjs.map +1 -1
  296. package/lib-commonjs/utils/useOnMenuEnter.cjs +5 -5
  297. package/lib-commonjs/utils/useOnMenuEnter.cjs.map +1 -1
  298. package/lib-commonjs/utils/useOnMenuSafeZoneTimeout.cjs +3 -3
  299. package/lib-commonjs/utils/useOnMenuSafeZoneTimeout.cjs.map +1 -1
  300. package/lib-commonjs/utils/useValidateNesting.cjs +4 -4
  301. package/lib-commonjs/utils/useValidateNesting.cjs.map +1 -1
  302. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemLink/useMenuItemLink.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { MenuItemLinkProps, MenuItemLinkState } from './MenuItemLink.types';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\nimport { useMenuItemBase_unstable } from '../MenuItem/useMenuItemBase';\nimport type { MenuItemProps } from '../MenuItem/MenuItem.types';\n\n/**\n * Create the state required to render MenuItemLink.\n *\n * The returned state can be modified with hooks such as useMenuItemLinkStyles_unstable,\n * before being passed to renderMenuItemLink_unstable.\n *\n * @param props - props from this instance of MenuItemLink\n * @param ref - reference to root HTMLElement of MenuItemLink\n */\nexport const useMenuItemLink_unstable = (\n props: MenuItemLinkProps,\n ref: React.Ref<HTMLAnchorElement>,\n): MenuItemLinkState => {\n // casting because the root slot changes from div to a\n const baseState = useMenuItem_unstable(props as MenuItemProps, null);\n // FIXME: casting because the root slot changes from div to a,\n // ideal solution would be to extract common logic from useMenuItem_unstable root\n // and use it in both without assuming element type\n const _props = { ...props, ...(baseState.root as ExtractSlotProps<Slot<'a'>>), ref, tabIndex: props.tabIndex };\n\n return {\n ...baseState,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n role: 'menuitem',\n ..._props,\n }),\n { elementType: 'a' },\n ),\n };\n};\n\n/**\n * Base hook for MenuItemLink, mirrors `useMenuItemLink_unstable` but composes with\n * `useMenuItemBase_unstable`.\n *\n * @param props - props from this instance of MenuItemLink\n * @param ref - reference to root HTMLElement of MenuItemLink\n */\nexport const useMenuItemLinkBase_unstable = (\n props: MenuItemLinkProps,\n ref: React.Ref<HTMLAnchorElement>,\n): MenuItemLinkState => {\n const baseState = useMenuItemBase_unstable(props as MenuItemProps, null);\n const _props = { ...props, ...(baseState.root as ExtractSlotProps<Slot<'a'>>), ref, tabIndex: props.tabIndex };\n\n return {\n ...baseState,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n role: 'menuitem',\n ..._props,\n }),\n { elementType: 'a' },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useMenuItem_unstable","useMenuItemBase_unstable","useMenuItemLink_unstable","props","ref","baseState","_props","root","tabIndex","components","always","role","elementType","useMenuItemLinkBase_unstable"],"mappings":"AAAA;AAIA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,wBAAwB,QAAQ,iCAA8B;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,sDAAsD;IACtD,MAAMC,YAAYL,qBAAqBG,OAAwB;IAC/D,8DAA8D;IAC9D,iFAAiF;IACjF,mDAAmD;IACnD,MAAMG,SAAS;QAAE,GAAGH,KAAK;QAAE,GAAIE,UAAUE,IAAI;QAAkCH;QAAKI,UAAUL,MAAMK,QAAQ;IAAC;IAE7G,OAAO;QACL,GAAGH,SAAS;QACZI,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBF,MAAM;QACR;QACAA,MAAMR,KAAKW,MAAM,CACfZ,yBAAyB,KAAK;YAC5Ba,MAAM;YACN,GAAGL,MAAM;QACX,IACA;YAAEM,aAAa;QAAI;IAEvB;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,+BAA+B,CAC1CV,OACAC;IAEA,MAAMC,YAAYJ,yBAAyBE,OAAwB;IACnE,MAAMG,SAAS;QAAE,GAAGH,KAAK;QAAE,GAAIE,UAAUE,IAAI;QAAkCH;QAAKI,UAAUL,MAAMK,QAAQ;IAAC;IAE7G,OAAO;QACL,GAAGH,SAAS;QACZI,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBF,MAAM;QACR;QACAA,MAAMR,KAAKW,MAAM,CACfZ,yBAAyB,KAAK;YAC5Ba,MAAM;YACN,GAAGL,MAAM;QACX,IACA;YAAEM,aAAa;QAAI;IAEvB;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemLink/useMenuItemLink.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { MenuItemLinkProps, MenuItemLinkState } from './MenuItemLink.types';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\nimport { useMenuItemBase_unstable } from '../MenuItem/useMenuItemBase';\nimport type { MenuItemProps } from '../MenuItem/MenuItem.types';\n\n/**\n * Create the state required to render MenuItemLink.\n *\n * The returned state can be modified with hooks such as useMenuItemLinkStyles_unstable,\n * before being passed to renderMenuItemLink_unstable.\n *\n * @param props - props from this instance of MenuItemLink\n * @param ref - reference to root HTMLElement of MenuItemLink\n */\nexport const useMenuItemLink_unstable = (\n props: MenuItemLinkProps,\n ref: React.Ref<HTMLAnchorElement>,\n): MenuItemLinkState => {\n // casting because the root slot changes from div to a\n const baseState = useMenuItem_unstable(props as MenuItemProps, null);\n // FIXME: casting because the root slot changes from div to a,\n // ideal solution would be to extract common logic from useMenuItem_unstable root\n // and use it in both without assuming element type\n const _props = { ...props, ...(baseState.root as ExtractSlotProps<Slot<'a'>>), ref, tabIndex: props.tabIndex };\n\n return {\n ...baseState,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n role: 'menuitem',\n ..._props,\n }),\n { elementType: 'a' },\n ),\n };\n};\n\n/**\n * Base hook for MenuItemLink, mirrors `useMenuItemLink_unstable` but composes with\n * `useMenuItemBase_unstable`.\n *\n * @param props - props from this instance of MenuItemLink\n * @param ref - reference to root HTMLElement of MenuItemLink\n */\nexport const useMenuItemLinkBase_unstable = (\n props: MenuItemLinkProps,\n ref: React.Ref<HTMLAnchorElement>,\n): MenuItemLinkState => {\n const baseState = useMenuItemBase_unstable(props as MenuItemProps, null);\n const _props = { ...props, ...(baseState.root as ExtractSlotProps<Slot<'a'>>), ref, tabIndex: props.tabIndex };\n\n return {\n ...baseState,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n role: 'menuitem',\n ..._props,\n }),\n { elementType: 'a' },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useMenuItem_unstable","useMenuItemBase_unstable","useMenuItemLink_unstable","props","ref","baseState","_props","root","tabIndex","components","always","role","elementType","useMenuItemLinkBase_unstable"],"mappings":"AAAA;AAIA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,wBAAwB,QAAQ,iCAA8B;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,sDAAsD;IACtD,MAAMC,YAAYL,qBAAqBG,OAAwB;IAC/D,8DAA8D;IAC9D,iFAAiF;IACjF,mDAAmD;IACnD,MAAMG,SAAS;QAAE,GAAGH,KAAK;QAAE,GAAIE,UAAUE,IAAI;QAAkCH;QAAKI,UAAUL,MAAMK,QAAQ;IAAC;IAE7G,OAAO;QACL,GAAGH,SAAS;QACZI,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBF,MAAM;QACR;QACAA,MAAMR,KAAKW,MAAM,CACfZ,yBAAyB,KAAK;YAC5Ba,MAAM;YACN,GAAGL,MAAM;QACX,IACA;YAAEM,aAAa;QAAI;IAEvB;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,+BAA+B,CAC1CV,OACAC;IAEA,MAAMC,YAAYJ,yBAAyBE,OAAwB;IACnE,MAAMG,SAAS;QAAE,GAAGH,KAAK;QAAE,GAAIE,UAAUE,IAAI;QAAkCH;QAAKI,UAAUL,MAAMK,QAAQ;IAAC;IAE7G,OAAO;QACL,GAAGH,SAAS;QACZI,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBF,MAAM;QACR;QACAA,MAAMR,KAAKW,MAAM,CACfZ,yBAAyB,KAAK;YAC5Ba,MAAM;YACN,GAAGL,MAAM;QACX,IACA;YAAEM,aAAa;QAAI;IAEvB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemLink/useMenuItemLinkStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuItemLinkSlots, MenuItemLinkState } from './MenuItemLink.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport const menuItemLinkClassNames: SlotClassNames<MenuItemLinkSlots> = {\n root: 'fui-MenuItemLink',\n icon: 'fui-MenuItemLink__icon',\n checkmark: 'fui-MenuItemLink__checkmark',\n content: 'fui-MenuItemLink__content',\n secondaryContent: 'fui-MenuItemLink__secondaryContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n resetLink: {\n textDecorationLine: 'none',\n textDecorationThickness: 'initial',\n textDecorationStyle: 'initial',\n textDecorationColor: 'initial',\n },\n});\n\n/**\n * Apply styling to the MenuItemLink slots based on the state\n */\nexport const useMenuItemLinkStyles_unstable = (state: MenuItemLinkState): MenuItemLinkState => {\n useMenuItemStyles_unstable(state as MenuItemState);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemLinkClassNames.root, styles.resetLink, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemLinkClassNames.icon, state.icon.className);\n }\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemLinkClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemLinkClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemLinkClassNames.checkmark, state.checkmark.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useMenuItemStyles_unstable","menuItemLinkClassNames","root","icon","checkmark","content","secondaryContent","useStyles","resetLink","textDecorationLine","textDecorationThickness","textDecorationStyle","textDecorationColor","useMenuItemLinkStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,0BAA0B,QAAQ,0CAAuC;AAGlF,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYT,WAAW;IAC3BU,WAAW;QACTC,oBAAoB;QACpBC,yBAAyB;QACzBC,qBAAqB;QACrBC,qBAAqB;IACvB;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7Cd,2BAA2Bc;IAC3B,MAAMC,SAASR;IACf,oDAAoD;IACpDO,MAAMZ,IAAI,CAACc,SAAS,GAAGjB,aAAaE,uBAAuBC,IAAI,EAAEa,OAAOP,SAAS,EAAEM,MAAMZ,IAAI,CAACc,SAAS;IAEvG,IAAIF,MAAMX,IAAI,EAAE;QACd,oDAAoD;QACpDW,MAAMX,IAAI,CAACa,SAAS,GAAGjB,aAAaE,uBAAuBE,IAAI,EAAEW,MAAMX,IAAI,CAACa,SAAS;IACvF;IAEA,IAAIF,MAAMT,OAAO,EAAE;QACjB,oDAAoD;QACpDS,MAAMT,OAAO,CAACW,SAAS,GAAGjB,aAAaE,uBAAuBI,OAAO,EAAES,MAAMT,OAAO,CAACW,SAAS;IAChG;IAEA,IAAIF,MAAMR,gBAAgB,EAAE;QAC1B,oDAAoD;QACpDQ,MAAMR,gBAAgB,CAACU,SAAS,GAAGjB,aACjCE,uBAAuBK,gBAAgB,EACvCQ,MAAMR,gBAAgB,CAACU,SAAS;IAEpC;IAEA,IAAIF,MAAMV,SAAS,EAAE;QACnB,oDAAoD;QACpDU,MAAMV,SAAS,CAACY,SAAS,GAAGjB,aAAaE,uBAAuBG,SAAS,EAAEU,MAAMV,SAAS,CAACY,SAAS;IACtG;IAEA,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemLink/useMenuItemLinkStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuItemLinkSlots, MenuItemLinkState } from './MenuItemLink.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { MenuItemState } from '../MenuItem/MenuItem.types';\n\nexport const menuItemLinkClassNames: SlotClassNames<MenuItemLinkSlots> = {\n root: 'fui-MenuItemLink',\n icon: 'fui-MenuItemLink__icon',\n checkmark: 'fui-MenuItemLink__checkmark',\n content: 'fui-MenuItemLink__content',\n secondaryContent: 'fui-MenuItemLink__secondaryContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n resetLink: {\n textDecorationLine: 'none',\n textDecorationThickness: 'initial',\n textDecorationStyle: 'initial',\n textDecorationColor: 'initial',\n },\n});\n\n/**\n * Apply styling to the MenuItemLink slots based on the state\n */\nexport const useMenuItemLinkStyles_unstable = (state: MenuItemLinkState): MenuItemLinkState => {\n useMenuItemStyles_unstable(state as MenuItemState);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemLinkClassNames.root, styles.resetLink, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemLinkClassNames.icon, state.icon.className);\n }\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemLinkClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemLinkClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemLinkClassNames.checkmark, state.checkmark.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useMenuItemStyles_unstable","menuItemLinkClassNames","root","icon","checkmark","content","secondaryContent","useStyles","resetLink","textDecorationLine","textDecorationThickness","textDecorationStyle","textDecorationColor","useMenuItemLinkStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,0BAA0B,QAAQ,0CAAuC;AAGlF,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYT,WAAW;IAC3BU,WAAW;QACTC,oBAAoB;QACpBC,yBAAyB;QACzBC,qBAAqB;QACrBC,qBAAqB;IACvB;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7Cd,2BAA2Bc;IAC3B,MAAMC,SAASR;IACf,oDAAoD;IACpDO,MAAMZ,IAAI,CAACc,SAAS,GAAGjB,aAAaE,uBAAuBC,IAAI,EAAEa,OAAOP,SAAS,EAAEM,MAAMZ,IAAI,CAACc,SAAS;IAEvG,IAAIF,MAAMX,IAAI,EAAE;QACd,oDAAoD;QACpDW,MAAMX,IAAI,CAACa,SAAS,GAAGjB,aAAaE,uBAAuBE,IAAI,EAAEW,MAAMX,IAAI,CAACa,SAAS;IACvF;IAEA,IAAIF,MAAMT,OAAO,EAAE;QACjB,oDAAoD;QACpDS,MAAMT,OAAO,CAACW,SAAS,GAAGjB,aAAaE,uBAAuBI,OAAO,EAAES,MAAMT,OAAO,CAACW,SAAS;IAChG;IAEA,IAAIF,MAAMR,gBAAgB,EAAE;QAC1B,oDAAoD;QACpDQ,MAAMR,gBAAgB,CAACU,SAAS,GAAGjB,aACjCE,uBAAuBK,gBAAgB,EACvCQ,MAAMR,gBAAgB,CAACU,SAAS;IAEpC;IAEA,IAAIF,MAAMV,SAAS,EAAE;QACnB,oDAAoD;QACpDU,MAAMV,SAAS,CAACY,SAAS,GAAGjB,aAAaE,uBAAuBG,SAAS,EAAEU,MAAMV,SAAS,CAACY,SAAS;IACtG;IAEA,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemRadio/MenuItemRadio.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport type { MenuItemRadioProps } from './MenuItemRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n\n return renderMenuItemRadio_unstable(state);\n});\n\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"names":["React","useMenuItemRadio_unstable","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","MenuItemRadio","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,qCAAkC;AAGlF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAEhCL,4BAA4B,mCAAmCK;IAE/D,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport type { MenuItemRadioProps } from './MenuItemRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n\n return renderMenuItemRadio_unstable(state);\n});\n\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"names":["React","useMenuItemRadio_unstable","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","MenuItemRadio","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,qCAAkC;AAGlF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAEhCL,4BAA4B,mCAAmCK;IAE/D,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../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\n/**\n * Since MenuItemRadio has no design props, MenuItemRadioBaseProps equals MenuItemRadioProps\n */\nexport type MenuItemRadioBaseProps = MenuItemRadioProps;\n\n/**\n * Since MenuItemRadio has no design props, MenuItemRadioBaseState equals MenuItemRadioState\n */\nexport type MenuItemRadioBaseState = MenuItemRadioState;\n"],"names":[],"mappings":"AAYA;;CAEC,GACD,WAAwD"}
1
+ {"version":3,"sources":["../../../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\n/**\n * Since MenuItemRadio has no design props, MenuItemRadioBaseProps equals MenuItemRadioProps\n */\nexport type MenuItemRadioBaseProps = MenuItemRadioProps;\n\n/**\n * Since MenuItemRadio has no design props, MenuItemRadioBaseState equals MenuItemRadioState\n */\nexport type MenuItemRadioBaseState = MenuItemRadioState;\n"],"names":[],"mappings":"AAYA;;CAEC,GACD,WAAwD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemRadio/index.ts"],"sourcesContent":["export type {\n MenuItemRadioProps,\n MenuItemRadioState,\n MenuItemRadioBaseProps,\n MenuItemRadioBaseState,\n} from './MenuItemRadio.types';\nexport { MenuItemRadio } from './MenuItemRadio';\nexport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nexport { useMenuItemRadio_unstable, useMenuItemRadioBase_unstable } from './useMenuItemRadio';\nexport { menuItemRadioClassNames, useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\n"],"names":["MenuItemRadio","renderMenuItemRadio_unstable","useMenuItemRadio_unstable","useMenuItemRadioBase_unstable","menuItemRadioClassNames","useMenuItemRadioStyles_unstable"],"mappings":"AAMA,SAASA,aAAa,QAAQ,qBAAkB;AAChD,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,yBAAyB,EAAEC,6BAA6B,QAAQ,wBAAqB;AAC9F,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,qCAAkC"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/index.ts"],"sourcesContent":["export type {\n MenuItemRadioProps,\n MenuItemRadioState,\n MenuItemRadioBaseProps,\n MenuItemRadioBaseState,\n} from './MenuItemRadio.types';\nexport { MenuItemRadio } from './MenuItemRadio';\nexport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nexport { useMenuItemRadio_unstable, useMenuItemRadioBase_unstable } from './useMenuItemRadio';\nexport { menuItemRadioClassNames, useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\n"],"names":["MenuItemRadio","renderMenuItemRadio_unstable","useMenuItemRadio_unstable","useMenuItemRadioBase_unstable","menuItemRadioClassNames","useMenuItemRadioStyles_unstable"],"mappings":"AAMA,SAASA,aAAa,QAAQ,qBAAkB;AAChD,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,yBAAyB,EAAEC,6BAA6B,QAAQ,wBAAqB;AAC9F,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,qCAAkC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Redefine the render function to add slots. Reuse the menuitemradio structure but add
5
5
  * slots to children.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<MenuItemSlots>(state);\n\n return (\n <state.root>\n {state.checkmark && <state.checkmark />}\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.secondaryContent && <state.secondaryContent />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuItemRadio_unstable","state","root","checkmark","icon","content","children","subText","secondaryContent"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAKxD;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAA2BE;IAE3B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,SAAS,kBAAI,KAACF,MAAME,SAAS;YACnCF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YACzBH,MAAMI,OAAO,kBACZ,MAACJ,MAAMI,OAAO;;oBACXJ,MAAMI,OAAO,CAACC,QAAQ;oBACtBL,MAAMM,OAAO,kBAAI,KAACN,MAAMM,OAAO;;;YAGnCN,MAAMO,gBAAgB,kBAAI,KAACP,MAAMO,gBAAgB;;;AAGxD,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<MenuItemSlots>(state);\n\n return (\n <state.root>\n {state.checkmark && <state.checkmark />}\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.secondaryContent && <state.secondaryContent />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuItemRadio_unstable","state","root","checkmark","icon","content","children","subText","secondaryContent"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAKxD;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAA2BE;IAE3B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,SAAS,kBAAI,KAACF,MAAME,SAAS;YACnCF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YACzBH,MAAMI,OAAO,kBACZ,MAACJ,MAAMI,OAAO;;oBACXJ,MAAMI,OAAO,CAACC,QAAQ;oBACtBL,MAAMM,OAAO,kBAAI,KAACN,MAAMM,OAAO;;;YAGnCN,MAAMO,gBAAgB,kBAAI,KAACP,MAAMO,gBAAgB;;;AAGxD,EAAE"}
@@ -10,8 +10,7 @@ import { useMenuItemBase_unstable } from "../MenuItem/useMenuItemBase.js";
10
10
  const state = useMenuItemRadioBase_unstable(props, ref);
11
11
  // Set default checkmark icon
12
12
  if (state.checkmark) {
13
- var _state_checkmark;
14
- var _children;
13
+ var _state_checkmark, _children;
15
14
  (_children = (_state_checkmark = state.checkmark).children) !== null && _children !== void 0 ? _children : _state_checkmark.children = /*#__PURE__*/ React.createElement(Checkmark16Filled, null);
16
15
  }
17
16
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemRadio/useMenuItemRadio.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItemBase_unstable } from '../MenuItem/useMenuItemBase';\nimport type {\n MenuItemRadioBaseProps,\n MenuItemRadioBaseState,\n MenuItemRadioProps,\n MenuItemRadioState,\n} 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 state = useMenuItemRadioBase_unstable(props, ref);\n\n // Set default checkmark icon\n if (state.checkmark) {\n state.checkmark.children ??= <Checkmark16Filled />;\n }\n\n return state;\n};\n\n/**\n * Base hook for MenuItemRadio component, produces state required to render the component.\n * It doesn't set any design-related props specific to MenuItemRadio.\n */\nexport const useMenuItemRadioBase_unstable = (\n props: MenuItemRadioBaseProps,\n ref: React.Ref<ARIAButtonElement<'div'>>,\n): MenuItemRadioBaseState => {\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 ...useMenuItemBase_unstable(\n {\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: slot.optional(props.checkmark, {\n renderByDefault: true,\n elementType: 'span',\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"],"names":["React","slot","Checkmark16Filled","useMenuListContext_unstable","useMenuItemBase_unstable","useMenuItemRadio_unstable","props","ref","state","useMenuItemRadioBase_unstable","checkmark","children","name","value","checked","context","checkedItems","checkedValues","indexOf","selectRadio","role","optional","renderByDefault","elementType","onClick","e"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,2BAA2B,QAAQ,oCAAiC;AAC7E,SAASC,wBAAwB,QAAQ,iCAA8B;AASvE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,QAAQC,8BAA8BH,OAAOC;IAEnD,6BAA6B;IAC7B,IAAIC,MAAME,SAAS,EAAE;YACnBF;;QAAAA,cAAAA,mBAAAA,MAAME,SAAS,EAACC,yDAAhBH,iBAAgBG,yBAAa,oBAACT;IAChC;IAEA,OAAOM;AACT,EAAE;AAEF;;;CAGC,GACD,OAAO,MAAMC,gCAAgC,CAC3CH,OACAC;IAEA,MAAM,EAAEK,IAAI,EAAEC,KAAK,EAAE,GAAGP;IAExB,MAAMQ,UAAUX,4BAA4BY,CAAAA;YACrBA;QAArB,MAAMC,eAAeD,EAAAA,yBAAAA,QAAQE,aAAa,cAArBF,6CAAAA,sBAAuB,CAACH,KAAK,KAAI,EAAE;QACxD,OAAOI,aAAaE,OAAO,CAACL,WAAW,CAAC;IAC1C;IAEA,MAAMM,cAAchB,4BAA4BY,CAAAA,UAAWA,QAAQI,WAAW;IAE9E,OAAO;QACL,GAAGf,yBACD;YACE,GAAGE,KAAK;YACRc,MAAM;YACN,gBAAgBN;YAChBJ,WAAWT,KAAKoB,QAAQ,CAACf,MAAMI,SAAS,EAAE;gBACxCY,iBAAiB;gBACjBC,aAAa;YACf;YACAC,SAAS,CAACC;oBAERnB;gBADAa,wBAAAA,kCAAAA,YAAcM,GAAGb,MAAMC,OAAOC;iBAC9BR,iBAAAA,MAAMkB,OAAO,cAAblB,qCAAAA,oBAAAA,OAAgBmB;YAClB;QACF,GACAlB,IACD;QACDO;QACAF;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadio.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItemBase_unstable } from '../MenuItem/useMenuItemBase';\nimport type {\n MenuItemRadioBaseProps,\n MenuItemRadioBaseState,\n MenuItemRadioProps,\n MenuItemRadioState,\n} 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 state = useMenuItemRadioBase_unstable(props, ref);\n\n // Set default checkmark icon\n if (state.checkmark) {\n state.checkmark.children ??= <Checkmark16Filled />;\n }\n\n return state;\n};\n\n/**\n * Base hook for MenuItemRadio component, produces state required to render the component.\n * It doesn't set any design-related props specific to MenuItemRadio.\n */\nexport const useMenuItemRadioBase_unstable = (\n props: MenuItemRadioBaseProps,\n ref: React.Ref<ARIAButtonElement<'div'>>,\n): MenuItemRadioBaseState => {\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 ...useMenuItemBase_unstable(\n {\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: slot.optional(props.checkmark, {\n renderByDefault: true,\n elementType: 'span',\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"],"names":["React","slot","Checkmark16Filled","useMenuListContext_unstable","useMenuItemBase_unstable","useMenuItemRadio_unstable","props","ref","state","useMenuItemRadioBase_unstable","checkmark","children","name","value","checked","context","checkedItems","checkedValues","indexOf","selectRadio","role","optional","renderByDefault","elementType","onClick","e"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B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les.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { MenuItemRadioState } from './MenuItemRadio.types';\n\nexport const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent',\n subText: 'fui-MenuItemRadio__subText',\n};\n\nexport const useMenuItemRadioStyles_unstable = (state: MenuItemRadioState): void => {\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemRadioClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemRadioClassNames.subText, state.subText.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"names":["mergeClasses","useCheckmarkStyles_unstable","useMenuItemStyles_unstable","menuItemRadioClassNames","root","icon","checkmark","content","secondaryContent","subText","useMenuItemRadioStyles_unstable","state","className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uItemRadioStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { MenuItemRadioState } from './MenuItemRadio.types';\n\nexport const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent',\n subText: 'fui-MenuItemRadio__subText',\n};\n\nexport const useMenuItemRadioStyles_unstable = (state: MenuItemRadioState): void => {\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemRadioClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemRadioClassNames.subText, state.subText.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"names":["mergeClasses","useCheckmarkStyles_unstable","useMenuItemStyles_unstable","menuItemRadioClassNames","root","icon","checkmark","content","secondaryContent","subText","useMenuItemRadio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ources":["../src/components/MenuItemSwitch/MenuItemSwitch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMenuItemSwitch_unstable } from './useMenuItemSwitch';\nimport { renderMenuItemSwitch_unstable } from './renderMenuItemSwitch';\nimport { useMenuItemSwitchStyles_unstable } from './useMenuItemSwitchStyles.styles';\nimport type { MenuItemSwitchProps } from './MenuItemSwitch.types';\n\nexport const MenuItemSwitch: ForwardRefComponent<MenuItemSwitchProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemSwitch_unstable(props, ref);\n\n useMenuItemSwitchStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemSwitchStyles_unstable')(state);\n return renderMenuItemSwitch_unstable(state);\n});\n\nMenuItemSwitch.displayName = 'MenuItemSwitch';\n"],"names":["React","useCustomStyleHook_unstable","useMenuItemSwitch_unstable","renderMenuItemSwitch_unstable","useMenuItemSwitchStyles_unstable","MenuItemSwitch","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,gCAAgC,QAAQ,sCAAmC;AAGpF,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDJ,iCAAiCK;IACjCR,4BAA4B,oCAAoCQ;IAChE,OAAON,8BAA8BM;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/MenuItemSwitch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMenuItemSwitch_unstable } from './useMenuItemSwitch';\nimport { renderMenuItemSwitch_unstable } from './renderMenuItemSwitch';\nimport { useMenuItemSwitchStyles_unstable } from './useMenuItemSwitchStyles.styles';\nimport type { MenuItemSwitchProps } from './MenuItemSwitch.types';\n\nexport const MenuItemSwitch: ForwardRefComponent<MenuItemSwitchProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemSwitch_unstable(props, ref);\n\n useMenuItemSwitchStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemSwitchStyles_unstable')(state);\n return renderMenuItemSwitch_unstable(state);\n});\n\nMenuItemSwitch.displayName = 'MenuItemSwitch';\n"],"names":["React","useCustomStyleHook_unstable","useMenuItemSwitch_unstable","renderMenuItemSwitch_unstable","useMenuItemSwitchStyles_unstable","MenuItemSwitch","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,gCAAgC,QAAQ,sCAAmC;AAGpF,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDJ,iCAAiCK;IACjCR,4BAA4B,oCAAoCQ;IAChE,OAAON,8BAA8BM;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemSwitch/MenuItemSwitch.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../MenuItem/MenuItem.types';\nimport type { MenuItemSelectableState } from '../../selectable/types';\nimport type { MenuItemCheckboxProps } from '../MenuItemCheckbox/MenuItemCheckbox.types';\n\nexport type MenuItemSwitchSlots = Pick<MenuItemSlots, 'root' | 'content' | 'secondaryContent' | 'icon' | 'subText'> & {\n switchIndicator?: Slot<'span'>;\n};\n\n/**\n * MenuItemSwitch Props\n */\nexport type MenuItemSwitchProps = ComponentProps<MenuItemSwitchSlots> &\n Pick<MenuItemCheckboxProps, 'disabled' | 'persistOnClick' | 'name' | 'value'>;\n\n/**\n * State used in rendering MenuItemSwitch\n */\nexport type MenuItemSwitchState = ComponentState<MenuItemSwitchSlots> &\n MenuItemSelectableState &\n Required<Pick<MenuItemSwitchProps, 'disabled'>>;\n"],"names":[],"mappings":"AAeA;;CAEC,GACD,WAEkD"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/MenuItemSwitch.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../MenuItem/MenuItem.types';\nimport type { MenuItemSelectableState } from '../../selectable/types';\nimport type { MenuItemCheckboxProps } from '../MenuItemCheckbox/MenuItemCheckbox.types';\n\nexport type MenuItemSwitchSlots = Pick<MenuItemSlots, 'root' | 'content' | 'secondaryContent' | 'icon' | 'subText'> & {\n switchIndicator?: Slot<'span'>;\n};\n\n/**\n * MenuItemSwitch Props\n */\nexport type MenuItemSwitchProps = ComponentProps<MenuItemSwitchSlots> &\n Pick<MenuItemCheckboxProps, 'disabled' | 'persistOnClick' | 'name' | 'value'>;\n\n/**\n * State used in rendering MenuItemSwitch\n */\nexport type MenuItemSwitchState = ComponentState<MenuItemSwitchSlots> &\n MenuItemSelectableState &\n Required<Pick<MenuItemSwitchProps, 'disabled'>>;\n"],"names":[],"mappings":"AAeA;;CAEC,GACD,WAEkD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemSwitch/index.ts"],"sourcesContent":["export { MenuItemSwitch } from './MenuItemSwitch';\nexport type { MenuItemSwitchProps, MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\nexport { renderMenuItemSwitch_unstable } from './renderMenuItemSwitch';\nexport { useMenuItemSwitch_unstable, useMenuItemSwitchBase_unstable } from './useMenuItemSwitch';\nexport {\n circleFilledClassName,\n menuItemSwitchClassNames,\n useMenuItemSwitchStyles_unstable,\n} from './useMenuItemSwitchStyles.styles';\n"],"names":["MenuItemSwitch","renderMenuItemSwitch_unstable","useMenuItemSwitch_unstable","useMenuItemSwitchBase_unstable","circleFilledClassName","menuItemSwitchClassNames","useMenuItemSwitchStyles_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,sBAAmB;AAElD,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,0BAA0B,EAAEC,8BAA8B,QAAQ,yBAAsB;AACjG,SACEC,qBAAqB,EACrBC,wBAAwB,EACxBC,gCAAgC,QAC3B,sCAAmC"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/index.ts"],"sourcesContent":["export { MenuItemSwitch } from './MenuItemSwitch';\nexport type { MenuItemSwitchProps, MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\nexport { renderMenuItemSwitch_unstable } from './renderMenuItemSwitch';\nexport { useMenuItemSwitch_unstable, useMenuItemSwitchBase_unstable } from './useMenuItemSwitch';\nexport {\n circleFilledClassName,\n menuItemSwitchClassNames,\n useMenuItemSwitchStyles_unstable,\n} from './useMenuItemSwitchStyles.styles';\n"],"names":["MenuItemSwitch","renderMenuItemSwitch_unstable","useMenuItemSwitch_unstable","useMenuItemSwitchBase_unstable","circleFilledClassName","menuItemSwitchClassNames","useMenuItemSwitchStyles_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,sBAAmB;AAElD,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,0BAA0B,EAAEC,8BAA8B,QAAQ,yBAAsB;AACjG,SACEC,qBAAqB,EACrBC,wBAAwB,EACxBC,gCAAgC,QAC3B,sCAAmC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Function that renders the final JSX of the component
5
5
  */ export const renderMenuItemSwitch_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemSwitch/renderMenuItemSwitch.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuItemSwitch_unstable = (state: MenuItemSwitchState): JSXElement => {\n assertSlots<MenuItemSwitchSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.secondaryContent && <state.secondaryContent />}\n {state.switchIndicator && <state.switchIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuItemSwitch_unstable","state","root","icon","content","children","subText","secondaryContent","switchIndicator"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5CF,YAAiCE;IAEjC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,OAAO,kBACZ,MAACH,MAAMG,OAAO;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,kBAAI,KAACL,MAAMK,OAAO;;;YAGnCL,MAAMM,gBAAgB,kBAAI,KAACN,MAAMM,gBAAgB;YACjDN,MAAMO,eAAe,kBAAI,KAACP,MAAMO,eAAe;;;AAGtD,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/renderMenuItemSwitch.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuItemSwitch_unstable = (state: MenuItemSwitchState): JSXElement => {\n assertSlots<MenuItemSwitchSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.secondaryContent && <state.secondaryContent />}\n {state.switchIndicator && <state.switchIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuItemSwitch_unstable","state","root","icon","content","children","subText","secondaryContent","switchIndicator"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5CF,YAAiCE;IAEjC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,OAAO,kBACZ,MAACH,MAAMG,OAAO;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,kBAAI,KAACL,MAAMK,OAAO;;;YAGnCL,MAAMM,gBAAgB,kBAAI,KAACN,MAAMM,gBAAgB;YACjDN,MAAMO,eAAe,kBAAI,KAACP,MAAMO,eAAe;;;AAGtD,EAAE"}
@@ -16,8 +16,7 @@ import { circleFilledClassName } from "./useMenuItemSwitchStyles.styles.js";
16
16
  const state = useMenuItemSwitchBase_unstable(props, ref);
17
17
  // Set default icon for switch indicator
18
18
  if (state.switchIndicator) {
19
- var _state_switchIndicator;
20
- var _children;
19
+ var _state_switchIndicator, _children;
21
20
  (_children = (_state_switchIndicator = state.switchIndicator).children) !== null && _children !== void 0 ? _children : _state_switchIndicator.children = /*#__PURE__*/ React.createElement(CircleFilled, {
22
21
  className: circleFilledClassName
23
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemSwitch/useMenuItemSwitch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchProps, MenuItemSwitchState } from './MenuItemSwitch.types';\nimport { useMenuItemCheckboxBase_unstable } from '../MenuItemCheckbox/useMenuItemCheckbox';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { circleFilledClassName } from './useMenuItemSwitchStyles.styles';\n\n/**\n * Create the state required to render MenuItemSwitch.\n *\n * The returned state can be modified with hooks such as useMenuItemSwitchStyles_unstable,\n * before being passed to renderMenuItemSwitch_unstable.\n *\n * @param props - props from this instance of MenuItemSwitch\n * @param ref - reference to root HTMLDivElement of MenuItemSwitch\n */\nexport const useMenuItemSwitch_unstable = (\n props: MenuItemSwitchProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuItemSwitchState => {\n const state = useMenuItemSwitchBase_unstable(props, ref);\n\n // Set default icon for switch indicator\n if (state.switchIndicator) {\n state.switchIndicator.children ??= <CircleFilled className={circleFilledClassName} />;\n }\n\n return state;\n};\n\n/**\n * Base hook for MenuItemSwitch component, produces state required to render the component.\n * It doesn't set any design-related props specific to MenuItemSwitch.\n *\n * @param props - props from this instance of MenuItemSwitch\n * @param ref - reference to root HTMLDivElement of MenuItemSwitch\n */\nexport const useMenuItemSwitchBase_unstable = (\n props: MenuItemSwitchProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuItemSwitchState => {\n const baseState = useMenuItemCheckboxBase_unstable(props, ref);\n return {\n ...baseState,\n switchIndicator: slot.optional(props.switchIndicator, {\n renderByDefault: true,\n elementType: 'span',\n }),\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n switchIndicator: 'span',\n },\n };\n};\n"],"names":["React","slot","useMenuItemCheckboxBase_unstable","CircleFilled","circleFilledClassName","useMenuItemSwitch_unstable","props","ref","state","useMenuItemSwitchBase_unstable","switchIndicator","children","className","baseState","optional","renderByDefault","elementType","components"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AAEjD,SAASC,gCAAgC,QAAQ,6CAA0C;AAC3F,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,qBAAqB,QAAQ,sCAAmC;AAEzE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,QAAQC,+BAA+BH,OAAOC;IAEpD,wCAAwC;IACxC,IAAIC,MAAME,eAAe,EAAE;YACzBF;;QAAAA,cAAAA,yBAAAA,MAAME,eAAe,EAACC,yDAAtBH,uBAAsBG,yBAAa,oBAACR;YAAaS,WAAWR;;IAC9D;IAEA,OAAOI;AACT,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,iCAAiC,CAC5CH,OACAC;IAEA,MAAMM,YAAYX,iCAAiCI,OAAOC;IAC1D,OAAO;QACL,GAAGM,SAAS;QACZH,iBAAiBT,KAAKa,QAAQ,CAACR,MAAMI,eAAe,EAAE;YACpDK,iBAAiB;YACjBC,aAAa;QACf;QACAC,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBP,iBAAiB;QACnB;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/useMenuItemSwitch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchProps, MenuItemSwitchState } from './MenuItemSwitch.types';\nimport { useMenuItemCheckboxBase_unstable } from '../MenuItemCheckbox/useMenuItemCheckbox';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { circleFilledClassName } from './useMenuItemSwitchStyles.styles';\n\n/**\n * Create the state required to render MenuItemSwitch.\n *\n * The returned state can be modified with hooks such as useMenuItemSwitchStyles_unstable,\n * before being passed to renderMenuItemSwitch_unstable.\n *\n * @param props - props from this instance of MenuItemSwitch\n * @param ref - reference to root HTMLDivElement of MenuItemSwitch\n */\nexport const useMenuItemSwitch_unstable = (\n props: MenuItemSwitchProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuItemSwitchState => {\n const state = useMenuItemSwitchBase_unstable(props, ref);\n\n // Set default icon for switch indicator\n if (state.switchIndicator) {\n state.switchIndicator.children ??= <CircleFilled className={circleFilledClassName} />;\n }\n\n return state;\n};\n\n/**\n * Base hook for MenuItemSwitch component, produces state required to render the component.\n * It doesn't set any design-related props specific to MenuItemSwitch.\n *\n * @param props - props from this instance of MenuItemSwitch\n * @param ref - reference to root HTMLDivElement of MenuItemSwitch\n */\nexport const useMenuItemSwitchBase_unstable = (\n props: MenuItemSwitchProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuItemSwitchState => {\n const baseState = useMenuItemCheckboxBase_unstable(props, ref);\n return {\n ...baseState,\n switchIndicator: slot.optional(props.switchIndicator, {\n renderByDefault: true,\n elementType: 'span',\n }),\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n switchIndicator: 'span',\n },\n };\n};\n"],"names":["React","slot","useMenuItemCheckboxBase_unstable","CircleFilled","circleFilledClassName","useMenuItemSwitch_unstable","props","ref","state","useMenuItemSwitchBase_unstable","switchIndicator","children","className","baseState","optional","renderByDefault","elementType","components"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AAEjD,SAASC,gCAAgC,QAAQ,6CAA0C;AAC3F,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,qBAAqB,QAAQ,sCAAmC;AAEzE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,QAAQC,+BAA+BH,OAAOC;IAEpD,wCAAwC;IACxC,IAAIC,MAAME,eAAe,EAAE;YACzBF,wBAAAA;SAAAA,YAAAA,CAAAA,yBAAAA,MAAME,eAAe,EAACC,QAAQ,cAA9BH,uBAAAA,YAAAA,uBAAsBG,QAAQ,iBAAK,oBAACR;YAAaS,WAAWR;;IAC9D;IAEA,OAAOI;AACT,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,iCAAiC,CAC5CH,OACAC;IAEA,MAAMM,YAAYX,iCAAiCI,OAAOC;IAC1D,OAAO;QACL,GAAGM,SAAS;QACZH,iBAAiBT,KAAKa,QAAQ,CAACR,MAAMI,eAAe,EAAE;YACpDK,iBAAiB;YACjBC,aAAa;QACf;QACAC,YAAY;YACV,4DAA4D;YAC5D,GAAGJ,UAAUI,UAAU;YACvBP,iBAAiB;QACnB;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, makeResetStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { type SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\n\nexport const menuItemSwitchClassNames: SlotClassNames<MenuItemSwitchSlots> = {\n root: 'fui-MenuItemSwitch',\n icon: 'fui-MenuItemSwitch__icon',\n content: 'fui-MenuItemSwitch__content',\n secondaryContent: 'fui-MenuItemSwitch__secondaryContent',\n switchIndicator: 'fui-MenuItemSwitch__switchIndicator',\n subText: 'fui-MenuItemSwitch__subText',\n};\n\nexport const circleFilledClassName = 'fui-MenuItemSwitch__switchIndicator__circleFilled';\n\n// Thumb and track sizes used by the component.\nconst spaceBetweenThumbAndTrack = 2;\nconst trackHeight = 20;\nconst trackWidth = 40;\nconst thumbSize = trackHeight - spaceBetweenThumbAndTrack;\n\nconst useSwitchIndicatorBaseClassName = makeResetStyles({\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n lineHeight: 0,\n boxSizing: 'border-box',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: `${thumbSize}px`,\n height: `${trackHeight}px`,\n transitionDuration: tokens.durationNormal,\n transitionTimingFunction: tokens.curveEasyEase,\n transitionProperty: 'background, border, color',\n width: `${trackWidth}px`,\n marginRight: tokens.spacingHorizontalXS,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n color: tokens.colorNeutralStrokeAccessible,\n ':hover': {\n color: tokens.colorNeutralStrokeAccessibleHover,\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':hover:active': {\n color: tokens.colorNeutralStrokeAccessiblePressed,\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n [`& .${circleFilledClassName}`]: {\n transitionDuration: tokens.durationNormal,\n transitionTimingFunction: tokens.curveEasyEase,\n transitionProperty: 'transform',\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n },\n});\n\nconst useSwitchIndicatorStyles = makeStyles({\n checked: {\n [`& .${circleFilledClassName}`]: {\n transform: `translateX(${trackWidth - thumbSize - spaceBetweenThumbAndTrack}px)`,\n },\n\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundInverted,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n\n ':hover': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n\n ':hover:active': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n});\n\nconst useMultilineStyles = makeStyles({\n switch: {\n alignSelf: 'center',\n },\n});\n\n/**\n * Apply styling to the MenuItemSwitch slots based on the state\n */\nexport const useMenuItemSwitchStyles_unstable = (state: MenuItemSwitchState): MenuItemSwitchState => {\n const { checked, subText } = state;\n const multiline = !!subText;\n const switchIndicatorStyles = useSwitchIndicatorStyles();\n const switchIndicatorBaseStyles = useSwitchIndicatorBaseClassName();\n const multilineStyles = useMultilineStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemSwitchClassNames.root, state.root.className);\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemSwitchClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemSwitchClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemSwitchClassNames.icon, state.icon.className);\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemSwitchClassNames.subText, state.subText.className);\n }\n\n if (state.switchIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.switchIndicator.className = mergeClasses(\n menuItemSwitchClassNames.switchIndicator,\n switchIndicatorBaseStyles,\n checked && switchIndicatorStyles.checked,\n state.switchIndicator.className,\n multiline && multilineStyles.switch,\n );\n }\n\n useMenuItemStyles_unstable({\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n checkmark: 'span',\n submenuIndicator: 'span',\n },\n checkmark: undefined,\n submenuIndicator: undefined,\n hasSubmenu: false,\n submenuOpen: false,\n persistOnClick: true,\n });\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","tokens","useMenuItemStyles_unstable","menuItemSwitchClassNames","root","icon","content","secondaryContent","switchIndicator","subText","circleFilledClassName","spaceBetweenThumbAndTrack","trackHeight","trackWidth","thumbSize","useSwitchIndicatorBaseClassName","borderRadius","borderRadiusCircular","border","strokeWidthThin","colorNeutralStrokeAccessible","lineHeight","boxSizing","fill","flexShrink","fontSize","height","transitionDuration","durationNormal","transitionTimingFunction","curveEasyEase","transitionProperty","width","marginRight","spacingHorizontalXS","color","colorNeutralStrokeAccessibleHover","borderColor","colorNeutralStrokeAccessiblePressed","useSwitchIndicatorStyles","checked","transform","backgroundColor","colorCompoundBrandBackground","colorNeutralForegroundInverted","colorTransparentStroke","colorCompoundBrandBackgroundHover","colorTransparentStrokeInteractive","colorCompoundBrandBackgroundPressed","useMultilineStyles","switch","alignSelf","useMenuItemSwitchStyles_unstable","state","multiline","switchIndicatorStyles","switchIndicatorBaseStyles","multilineStyles","className","components","checkmark","submenuIndicator","undefined","hasSubmenu","submenuOpen","persistOnClick"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,eAAe,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACvF,SAASC,MAAM,QAAQ,wBAAwB;AAG/C,SAASC,0BAA0B,QAAQ,0CAAuC;AAElF,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,MAAM;IACNC,SAAS;IACTC,kBAAkB;IAClBC,iBAAiB;IACjBC,SAAS;AACX,EAAE;AAEF,OAAO,MAAMC,wBAAwB,oDAAoD;AAEzF,+CAA+C;AAC/C,MAAMC,4BAA4B;AAClC,MAAMC,cAAc;AACpB,MAAMC,aAAa;AACnB,MAAMC,YAAYF,cAAcD;AAEhC,MAAMI,kCAAkCjB,gBAAgB;IACtDkB,cAAcf,OAAOgB,oBAAoB;IACzCC,QAAQ,GAAGjB,OAAOkB,eAAe,CAAC,OAAO,EAAElB,OAAOmB,4BAA4B,EAAE;IAChFC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,YAAY;IACZC,UAAU,GAAGX,UAAU,EAAE,CAAC;IAC1BY,QAAQ,GAAGd,YAAY,EAAE,CAAC;IAC1Be,oBAAoB1B,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K;QACRM,YAAY;YACV,4DAA4D;YAC5D,GAAGN,MAAMM,UAAU;YACnBC,WAAW;YACXC,kBAAkB;QACpB;QACAD,WAAWE;QACXD,kBAAkBC;QAClBC,YAAY;QACZC,aAAa;QACbC,gBAAgB;IAClB;IAEA,OAAOZ;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, makeResetStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { type SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSwitchSlots, MenuItemSwitchState } from './MenuItemSwitch.types';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\n\nexport const menuItemSwitchClassNames: SlotClassNames<MenuItemSwitchSlots> = {\n root: 'fui-MenuItemSwitch',\n icon: 'fui-MenuItemSwitch__icon',\n content: 'fui-MenuItemSwitch__content',\n secondaryContent: 'fui-MenuItemSwitch__secondaryContent',\n switchIndicator: 'fui-MenuItemSwitch__switchIndicator',\n subText: 'fui-MenuItemSwitch__subText',\n};\n\nexport const circleFilledClassName = 'fui-MenuItemSwitch__switchIndicator__circleFilled';\n\n// Thumb and track sizes used by the component.\nconst spaceBetweenThumbAndTrack = 2;\nconst trackHeight = 20;\nconst trackWidth = 40;\nconst thumbSize = trackHeight - spaceBetweenThumbAndTrack;\n\nconst useSwitchIndicatorBaseClassName = makeResetStyles({\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n lineHeight: 0,\n boxSizing: 'border-box',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: `${thumbSize}px`,\n height: `${trackHeight}px`,\n transitionDuration: tokens.durationNormal,\n transitionTimingFunction: tokens.curveEasyEase,\n transitionProperty: 'background, border, color',\n width: `${trackWidth}px`,\n marginRight: tokens.spacingHorizontalXS,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n color: tokens.colorNeutralStrokeAccessible,\n ':hover': {\n color: tokens.colorNeutralStrokeAccessibleHover,\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':hover:active': {\n color: tokens.colorNeutralStrokeAccessiblePressed,\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n [`& .${circleFilledClassName}`]: {\n transitionDuration: tokens.durationNormal,\n transitionTimingFunction: tokens.curveEasyEase,\n transitionProperty: 'transform',\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n },\n});\n\nconst useSwitchIndicatorStyles = makeStyles({\n checked: {\n [`& .${circleFilledClassName}`]: {\n transform: `translateX(${trackWidth - thumbSize - spaceBetweenThumbAndTrack}px)`,\n },\n\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundInverted,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n\n ':hover': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n\n ':hover:active': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n});\n\nconst useMultilineStyles = makeStyles({\n switch: {\n alignSelf: 'center',\n },\n});\n\n/**\n * Apply styling to the MenuItemSwitch slots based on the state\n */\nexport const useMenuItemSwitchStyles_unstable = (state: MenuItemSwitchState): MenuItemSwitchState => {\n const { checked, subText } = state;\n const multiline = !!subText;\n const switchIndicatorStyles = useSwitchIndicatorStyles();\n const switchIndicatorBaseStyles = useSwitchIndicatorBaseClassName();\n const multilineStyles = useMultilineStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemSwitchClassNames.root, state.root.className);\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemSwitchClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemSwitchClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemSwitchClassNames.icon, state.icon.className);\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemSwitchClassNames.subText, state.subText.className);\n }\n\n if (state.switchIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.switchIndicator.className = mergeClasses(\n menuItemSwitchClassNames.switchIndicator,\n switchIndicatorBaseStyles,\n checked && switchIndicatorStyles.checked,\n state.switchIndicator.className,\n multiline && multilineStyles.switch,\n );\n }\n\n useMenuItemStyles_unstable({\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n checkmark: 'span',\n submenuIndicator: 'span',\n },\n checkmark: undefined,\n submenuIndicator: undefined,\n hasSubmenu: false,\n submenuOpen: false,\n persistOnClick: true,\n });\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","tokens","useMenuItemStyles_unstable","menuItemSwitchClassNames","root","icon","content","secondaryContent","switchIndicator","subText","circleFilledClassName","spaceBetweenThumbAndTrack","trackHeight","trackWidth","thumbSize","useSwitchIndicatorBaseClassName","borderRadius","borderRadiusCircular","border","strokeWidthThin","colorNeutralStrokeAccessible","lineHeight","boxSizing","fill","flexShrink","fontSize","height","transitionDuration","durationNormal","transitionTimingFunction","curveEasyEase","transitionProperty","width","marginRight","spacingHorizontalXS","color","colorNeutralStrokeAccessibleHover","borderColor","colorNeutralStrokeAccessiblePressed","useSwitchIndicatorStyles","checked","transform","backgroundColor","colorCompoundBrandBackground","colorNeutralForegroundInverted","colorTransparentStroke","colorCompoundBrandBackgroundHover","colorTransparentStrokeInteractive","colorCompoundBrandBackgroundPressed","useMultilineStyles","switch","alignSelf","useMenuItemSwitchStyles_unstable","state","multiline","switchIndicatorStyles","switchIndicatorBaseStyles","multilineStyles","className","components","checkmark","submenuIndicator","undefined","hasSubmenu","submenuOpen","persistOnClick"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,eAAe,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACvF,SAASC,MAAM,QAAQ,wBAAwB;AAG/C,SAASC,0BAA0B,QAAQ,0CAAuC;AAElF,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,MAAM;IACNC,SAAS;IACTC,kBAAkB;IAClBC,iBAAiB;IACjBC,SAAS;AACX,EAAE;AAEF,OAAO,MAAMC,wBAAwB,oDAAoD;AAEzF,+CAA+C;AAC/C,MAAMC,4BAA4B;AAClC,MAAMC,cAAc;AACpB,MAAMC,aAAa;AACnB,MAAMC,YAAYF,cAAcD;AAEhC,MAAMI,kCAAkCjB,gBAAgB;IACtDkB,cAAcf,OAAOgB,oBAAoB;IACzCC,QAAQ,GAAGjB,OAAOkB,eAAe,CAAC,OAAO,EAAElB,OAAOmB,4BAA4B,EAAE;IAChFC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,YAAY;IACZC,UAAU,GAAGX,UAAU,EAAE,CAAC;IAC1BY,QAAQ,GAAGd,YAAY,EAAE,CAAC;IAC1Be,oBAAoB1B,OAAO2B,cAAc;IACzCC,0BAA0B5B,OAAO6B,aAAa;IAC9CC,oBAAoB;IACpBC,OAAO,GAAGnB,WAAW,EAAE,CAAC;IACxBoB,aAAahC,OAAOiC,mBAAmB;IAEvC,sDAAsD;QACpDP,oBAAoB;IACtB;IAEAQ,OAAOlC,OAAOmB,4BAA4B;IAC1C,UAAU;QACRe,OAAOlC,OAAOmC,iCAAiC;QAC/CC,aAAapC,OAAOmC,iCAAiC;IACvD;IAEA,iBAAiB;QACfD,OAAOlC,OAAOqC,mCAAmC;QACjDD,aAAapC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AAO,EAAE;QACjB,oDAAoD;QACpD+C,MAAM/C,OAAO,CAACoD,SAAS,GAAG3D,aAAaI,yBAAyBG,OAAO,EAAE+C,MAAM/C,OAAO,CAACoD,SAAS;IAClG;IAEA,IAAIL,MAAM9C,gBAAgB,EAAE;QAC1B,oDAAoD;QACpD8C,MAAM9C,gBAAgB,CAACmD,SAAS,GAAG3D,aACjCI,yBAAyBI,gBAAgB,EACzC8C,MAAM9C,gBAAgB,CAACmD,SAAS;IAEpC;IAEA,IAAIL,MAAMhD,IAAI,EAAE;QACd,oDAAoD;QACpDgD,MAAMhD,IAAI,CAACqD,SAAS,GAAG3D,aAAaI,yBAAyBE,IAAI,EAAEgD,MAAMhD,IAAI,CAACqD,SAAS;IACzF;IAEA,IAAIL,MAAM5C,OAAO,EAAE;QACjB,oDAAoD;QACpD4C,MAAM5C,OAAO,CAACiD,SAAS,GAAG3D,aAAaI,yBAAyBM,OAAO,EAAE4C,MAAM5C,OAAO,CAACiD,SAAS;IAClG;IAEA,IAAIL,MAAM7C,eAAe,EAAE;QACzB,oDAAoD;QACpD6C,MAAM7C,eAAe,CAACkD,SAAS,GAAG3D,aAChCI,yBAAyBK,eAAe,EACxCgD,2BACAhB,WAAWe,sBAAsBf,OAAO,EACxCa,MAAM7C,eAAe,CAACkD,SAAS,EAC/BJ,aAAaG,gBAAgBP,MAAM;IAEvC;IAEAhD,2BAA2B;QACzB,GAAGmD,KAAK;QACRM,YAAY;YACV,4DAA4D;YAC5D,GAAGN,MAAMM,UAAU;YACnBC,WAAW;YACXC,kBAAkB;QACpB;QACAD,WAAWE;QACXD,kBAAkBC;QAClBC,YAAY;QACZC,aAAa;QACbC,gBAAgB;IAClB;IAEA,OAAOZ;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/MenuList.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport type { MenuListProps } from './MenuList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList: ForwardRefComponent<MenuListProps> = React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n\n useMenuListStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n\n return renderMenuList_unstable(state, contextValues);\n});\n\nMenuList.displayName = 'MenuList';\n"],"names":["React","useMenuList_unstable","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","MenuList","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,iCAAiC,QAAQ,gCAA6B;AAC/E,SAASC,0BAA0B,QAAQ,gCAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQT,qBAAqBO,OAAOC;IAC1C,MAAME,gBAAgBR,kCAAkCO;IAExDN,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport type { MenuListProps } from './MenuList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList: ForwardRefComponent<MenuListProps> = React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n\n useMenuListStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n\n return renderMenuList_unstable(state, contextValues);\n});\n\nMenuList.displayName = 'MenuList';\n"],"names":["React","useMenuList_unstable","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","MenuList","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,iCAAiC,QAAQ,gCAA6B;AAC/E,SAASC,0BAA0B,QAAQ,gCAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQT,qBAAqBO,OAAOC;IAC1C,MAAME,gBAAgBR,kCAAkCO;IAExDN,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/MenuList.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuListContextValue } from '../../contexts/menuListContext';\nimport type { SelectableHandler } from '../../selectable/index';\n\nexport type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;\n\nexport type MenuCheckedValueChangeData = {\n /** The items for this value that are checked */\n checkedItems: string[];\n /** The name of the value */\n name: string;\n};\n\nexport type MenuListSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuListProps = ComponentProps<MenuListSlots> & {\n /**\n * Map of all checked values\n */\n checkedValues?: Record<string, string[]>;\n\n /**\n * Default values to be checked on mount\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * States that menu items can contain selectable items and reserve slots for item alignment\n */\n hasCheckmarks?: boolean;\n\n /**\n * States that menu items can contain icons and reserve slots for item alignment\n */\n hasIcons?: boolean;\n\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n};\n\nexport type MenuListState = ComponentState<MenuListSlots> &\n Required<Pick<MenuListProps, 'checkedValues' | 'hasCheckmarks' | 'hasIcons'>> &\n Pick<MenuListProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {\n /**\n * Selects a radio item, will de-select the currently selected ratio item\n */\n selectRadio: SelectableHandler;\n\n /**\n * Callback to set focus on the next menu item by first character\n */\n setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;\n\n /*\n * Toggles the state of a checkbox item\n */\n toggleCheckbox: SelectableHandler;\n\n /**\n * States if the MenuList is inside MenuContext\n */\n hasMenuContext?: boolean;\n };\n\nexport type MenuListContextValues = {\n menuList: MenuListContextValue;\n};\n\n/**\n * @deprecated this type is not being used internally anymore\n */\nexport type UninitializedMenuListState = Omit<\n MenuListState,\n 'checkedValues' | 'selectRadio' | 'setFocusByFirstCharacter' | 'toggleCheckbox'\n> &\n Partial<Pick<MenuListState, 'checkedValues'>>;\n"],"names":[],"mappings":"AA6EA;;CAEC,GACD,WAIgD"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/MenuList.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuListContextValue } from '../../contexts/menuListContext';\nimport type { SelectableHandler } from '../../selectable/index';\n\nexport type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;\n\nexport type MenuCheckedValueChangeData = {\n /** The items for this value that are checked */\n checkedItems: string[];\n /** The name of the value */\n name: string;\n};\n\nexport type MenuListSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuListProps = ComponentProps<MenuListSlots> & {\n /**\n * Map of all checked values\n */\n checkedValues?: Record<string, string[]>;\n\n /**\n * Default values to be checked on mount\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * States that menu items can contain selectable items and reserve slots for item alignment\n */\n hasCheckmarks?: boolean;\n\n /**\n * States that menu items can contain icons and reserve slots for item alignment\n */\n hasIcons?: boolean;\n\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n};\n\nexport type MenuListState = ComponentState<MenuListSlots> &\n Required<Pick<MenuListProps, 'checkedValues' | 'hasCheckmarks' | 'hasIcons'>> &\n Pick<MenuListProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {\n /**\n * Selects a radio item, will de-select the currently selected ratio item\n */\n selectRadio: SelectableHandler;\n\n /**\n * Callback to set focus on the next menu item by first character\n */\n setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;\n\n /*\n * Toggles the state of a checkbox item\n */\n toggleCheckbox: SelectableHandler;\n\n /**\n * States if the MenuList is inside MenuContext\n */\n hasMenuContext?: boolean;\n };\n\nexport type MenuListContextValues = {\n menuList: MenuListContextValue;\n};\n\n/**\n * @deprecated this type is not being used internally anymore\n */\nexport type UninitializedMenuListState = Omit<\n MenuListState,\n 'checkedValues' | 'selectRadio' | 'setFocusByFirstCharacter' | 'toggleCheckbox'\n> &\n Partial<Pick<MenuListState, 'checkedValues'>>;\n"],"names":[],"mappings":"AA6EA;;CAEC,GACD,WAIgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/index.ts"],"sourcesContent":["export { MenuList } from './MenuList';\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UninitializedMenuListState,\n} from './MenuList.types';\nexport { renderMenuList_unstable } from './renderMenuList';\nexport { useMenuList_unstable, useMenuListBase_unstable } from './useMenuList';\nexport { menuListClassNames, useMenuListStyles_unstable } from './useMenuListStyles.styles';\nexport { useMenuListContextValues_unstable } from './useMenuListContextValues';\n"],"names":["MenuList","renderMenuList_unstable","useMenuList_unstable","useMenuListBase_unstable","menuListClassNames","useMenuListStyles_unstable","useMenuListContextValues_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAWtC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAgB;AAC/E,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B;AAC5F,SAASC,iCAAiC,QAAQ,gCAA6B"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/index.ts"],"sourcesContent":["export { MenuList } from './MenuList';\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UninitializedMenuListState,\n} from './MenuList.types';\nexport { renderMenuList_unstable } from './renderMenuList';\nexport { useMenuList_unstable, useMenuListBase_unstable } from './useMenuList';\nexport { menuListClassNames, useMenuListStyles_unstable } from './useMenuListStyles.styles';\nexport { useMenuListContextValues_unstable } from './useMenuListContextValues';\n"],"names":["MenuList","renderMenuList_unstable","useMenuList_unstable","useMenuListBase_unstable","menuListClassNames","useMenuListStyles_unstable","useMenuListContextValues_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAWtC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAgB;AAC/E,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B;AAC5F,SAASC,iCAAiC,QAAQ,gCAA6B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  import { MenuListProvider } from "../../contexts/menuListContext.js";
4
4
  /**
5
5
  * Function that renders the final JSX of the component
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/renderMenuList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuListContextValues, MenuListSlots, MenuListState } from './MenuList.types';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuList_unstable = (state: MenuListState, contextValues: MenuListContextValues): JSXElement => {\n assertSlots<MenuListSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <state.root />\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","renderMenuList_unstable","state","contextValues","value","menuList","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,gBAAgB,QAAQ,oCAAiC;AAElE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5DJ,YAA2BG;IAE3B,qBACE,KAACF;QAAiBI,OAAOD,cAAcE,QAAQ;kBAC7C,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuListContextValues, MenuListSlots, MenuListState } from './MenuList.types';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuList_unstable = (state: MenuListState, contextValues: MenuListContextValues): JSXElement => {\n assertSlots<MenuListSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <state.root />\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","renderMenuList_unstable","state","contextValues","value","menuList","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,gBAAgB,QAAQ,oCAAiC;AAElE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5DJ,YAA2BG;IAE3B,qBACE,KAACF;QAAiBI,OAAOD,cAAcE,QAAQ;kBAC7C,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -90,6 +90,7 @@ const MENU_ITEM_ROLES_SELECTOR = MENU_ITEM_ROLES.map((role)=>`[role="${role}"]`)
90
90
  * @param props - props from this instance of MenuList
91
91
  * @param ref - reference to root HTMLElement of MenuList
92
92
  */ export const useMenuListBase_unstable = (props, ref)=>{
93
+ var _props_checkedValues, _props_onCheckedValueChange, _ref, _props_hasIcons, _ref1, _props_hasCheckmarks;
93
94
  const triggerId = useMenuContext_unstable((context)=>context.triggerId);
94
95
  const checkedValuesContext = useMenuContext_unstable((context)=>context.checkedValues);
95
96
  const onCheckedValueChangeContext = useMenuContext_unstable((context)=>context.onCheckedValueChange);
@@ -105,13 +106,11 @@ const MENU_ITEM_ROLES_SELECTOR = MENU_ITEM_ROLES.map((role)=>`[role="${role}"]`)
105
106
  const menuItems = Array.from(innerRef.current.querySelectorAll(MENU_ITEM_ROLES_SELECTOR));
106
107
  focusItemMatchingFirstCharacter(menuItems, e.key, itemEl);
107
108
  }, []);
108
- var _props_checkedValues;
109
109
  const [checkedValues, setCheckedValues] = useControllableState({
110
110
  state: (_props_checkedValues = props.checkedValues) !== null && _props_checkedValues !== void 0 ? _props_checkedValues : hasMenuContext ? checkedValuesContext : undefined,
111
111
  defaultState: props.defaultCheckedValues,
112
112
  initialState: {}
113
113
  });
114
- var _props_onCheckedValueChange;
115
114
  const handleCheckedValueChange = (_props_onCheckedValueChange = props.onCheckedValueChange) !== null && _props_onCheckedValueChange !== void 0 ? _props_onCheckedValueChange : hasMenuContext ? onCheckedValueChangeContext : undefined;
116
115
  const toggleCheckbox = useEventCallback((e, name, value, checked)=>{
117
116
  const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
@@ -145,7 +144,6 @@ const MENU_ITEM_ROLES_SELECTOR = MENU_ITEM_ROLES.map((role)=>`[role="${role}"]`)
145
144
  checkedItems: newCheckedItems
146
145
  });
147
146
  });
148
- var _props_hasIcons, _ref, _props_hasCheckmarks, _ref1;
149
147
  return {
150
148
  components: {
151
149
  root: 'div'
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/useMenuList.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n useMergedRefs,\n useEventCallback,\n useControllableState,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport {\n useArrowNavigationGroup,\n useFocusFinders,\n TabsterMoveFocusEventName,\n type TabsterMoveFocusEvent,\n} from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MenuContext } from '../../contexts/menuContext';\nimport type { MenuListProps, MenuListState } from './MenuList.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\nconst MENU_ITEM_ROLES = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];\nconst MENU_ITEM_ROLES_SELECTOR = MENU_ITEM_ROLES.map(role => `[role=\"${role}\"]`).join(',');\n\n/**\n * Returns the props and state required to render the component.\n *\n * Composes with `useMenuListBase_unstable` and adds Tabster-driven keyboard\n * navigation: circular arrow-key focus, a `TabsterMoveFocusEvent` listener\n * that lets `useMenuPopover_unstable` handle Tab key presses, a focus-aware\n * `setFocusByFirstCharacter`, and the `hasIcons` / `hasCheckmarks` slot\n * alignment hints sourced from the parent `MenuContext`.\n */\nexport const useMenuList_unstable = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n const menuContext = useMenuContextSelectors();\n const hasMenuContext = useHasParentContext(MenuContext);\n\n if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {\n // TODO throw warnings in development safely\n // eslint-disable-next-line no-console\n console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');\n }\n\n const wrapperRef = React.useRef<HTMLElement>(null);\n const { findAllFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n const focusAttributes = useArrowNavigationGroup({ circular: true });\n\n const baseState = useMenuListBase_unstable(props, ref);\n // recreate root non-mutatively: merge wrapperRef so the effect below can\n // observe the rendered DOM element, and add Tabster arrow-nav attributes\n const mergedRootRef = useMergedRefs(baseState.root.ref, wrapperRef) as React.Ref<HTMLDivElement>;\n\n React.useEffect(() => {\n const element = wrapperRef.current;\n\n if (!hasMenuContext || !targetDocument || !element) {\n return;\n }\n\n const onTabsterMoveFocus = (e: TabsterMoveFocusEvent) => {\n const nextElement = e.detail.next;\n if (nextElement && element.contains(targetDocument.activeElement) && !element.contains(nextElement)) {\n // Preventing Tabster from handling Tab press, useMenuPopover will handle it.\n e.preventDefault();\n }\n };\n\n targetDocument.addEventListener(TabsterMoveFocusEventName, onTabsterMoveFocus);\n return () => {\n targetDocument.removeEventListener(TabsterMoveFocusEventName, onTabsterMoveFocus);\n };\n }, [hasMenuContext, targetDocument]);\n\n const setFocusByFirstCharacter = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => {\n if (!wrapperRef.current) {\n return;\n }\n const menuItems = findAllFocusable(\n wrapperRef.current,\n (el: HTMLElement) => el.hasAttribute('role') && MENU_ITEM_ROLES.indexOf(el.getAttribute('role')!) !== -1,\n );\n focusItemMatchingFirstCharacter(menuItems, e.key, itemEl);\n },\n [findAllFocusable],\n );\n\n return {\n ...baseState,\n root: {\n ...focusAttributes,\n ...baseState.root,\n ref: mergedRootRef,\n },\n setFocusByFirstCharacter,\n };\n};\n\n/**\n * Base hook for MenuList component, produces state required to render the component.\n *\n * Does not invoke any Tabster APIs internally: arrow-key navigation and the\n * focus-aware `setFocusByFirstCharacter` are added by the wrapper\n * `useMenuList_unstable`. The base's `setFocusByFirstCharacter` walks the DOM\n * via `querySelectorAll` and does not filter by Tabster's focusability rules,\n * so consumers integrating their own focus management should layer that on top.\n *\n * @param props - props from this instance of MenuList\n * @param ref - reference to root HTMLElement of MenuList\n */\nexport const useMenuListBase_unstable = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const checkedValuesContext = useMenuContext_unstable(context => context.checkedValues);\n const onCheckedValueChangeContext = useMenuContext_unstable(context => context.onCheckedValueChange);\n const hasIconsContext = useMenuContext_unstable(context => context.hasIcons);\n const hasCheckmarksContext = useMenuContext_unstable(context => context.hasCheckmarks);\n const hasMenuContext = useHasParentContext(MenuContext);\n\n const innerRef = React.useRef<HTMLElement>(null);\n const validateNestingRef = useValidateNesting('MenuList');\n\n const setFocusByFirstCharacter = React.useCallback((e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => {\n if (!innerRef.current) {\n return;\n }\n const menuItems = Array.from(innerRef.current.querySelectorAll<HTMLElement>(MENU_ITEM_ROLES_SELECTOR));\n focusItemMatchingFirstCharacter(menuItems, e.key, itemEl);\n }, []);\n\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues ?? (hasMenuContext ? checkedValuesContext : undefined),\n defaultState: props.defaultCheckedValues,\n initialState: {},\n });\n\n const handleCheckedValueChange =\n props.onCheckedValueChange ?? (hasMenuContext ? onCheckedValueChangeContext : undefined);\n\n const toggleCheckbox = useEventCallback(\n (e: React.MouseEvent | React.KeyboardEvent, name: string, value: string, checked: boolean) => {\n const checkedItems = checkedValues?.[name] || [];\n const newCheckedItems = [...checkedItems];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n\n handleCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n },\n );\n\n const selectRadio = useEventCallback((e: React.MouseEvent | React.KeyboardEvent, name: string, value: string) => {\n const newCheckedItems = [value];\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n handleCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n });\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, innerRef, validateNestingRef) as React.Ref<HTMLDivElement>,\n role: 'menu',\n 'aria-labelledby': triggerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n checkedValues,\n hasIcons: props.hasIcons ?? hasIconsContext ?? false,\n hasCheckmarks: props.hasCheckmarks ?? hasCheckmarksContext ?? false,\n hasMenuContext,\n setFocusByFirstCharacter,\n selectRadio,\n toggleCheckbox,\n };\n};\n\n/**\n * Focuses the next menu item whose textContent starts with the typed character,\n * wrapping around the list. Shared between the Tabster-free base impl and the\n * Tabster-aware wrapper.\n */\nconst focusItemMatchingFirstCharacter = (menuItems: HTMLElement[], key: string, current: HTMLElement) => {\n let startIndex = menuItems.indexOf(current) + 1;\n if (startIndex === menuItems.length) {\n startIndex = 0;\n }\n\n const firstChars = menuItems.map(menuItem => menuItem.textContent?.charAt(0).toLowerCase());\n const char = key.toLowerCase();\n\n const getIndexFirstChars = (start: number) => {\n for (let i = start; i < firstChars.length; i++) {\n if (char === firstChars[i]) {\n return i;\n }\n }\n return -1;\n };\n\n let index = getIndexFirstChars(startIndex);\n if (index === -1) {\n index = getIndexFirstChars(0);\n }\n if (index > -1) {\n menuItems[index].focus();\n }\n};\n\n/**\n * Adds some sugar to fetching multiple context selector values\n */\nconst useMenuContextSelectors = () => {\n const checkedValues = useMenuContext_unstable(context => context.checkedValues);\n const onCheckedValueChange = useMenuContext_unstable(context => context.onCheckedValueChange);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const hasIcons = useMenuContext_unstable(context => context.hasIcons);\n const hasCheckmarks = useMenuContext_unstable(context => context.hasCheckmarks);\n\n return {\n checkedValues,\n onCheckedValueChange,\n triggerId,\n hasIcons,\n hasCheckmarks,\n };\n};\n\n/**\n * Helper function to detect if props and MenuContext values are both used\n */\nconst usingPropsAndMenuContext = (\n props: MenuListProps,\n contextValue: ReturnType<typeof useMenuContextSelectors>,\n hasMenuContext: boolean,\n) => {\n let isUsingPropsAndContext = false;\n for (const val in contextValue) {\n if (props[val as keyof Omit<typeof contextValue, 'hasMenuContext' | 'onCheckedValueChange' | 'triggerId'>]) {\n isUsingPropsAndContext = true;\n }\n }\n\n return hasMenuContext && isUsingPropsAndContext;\n};\n"],"names":["React","useMergedRefs","useEventCallback","useControllableState","getIntrinsicElementProps","slot","useArrowNavigationGroup","useFocusFinders","TabsterMoveFocusEventName","useFluent_unstable","useFluent","useHasParentContext","useMenuContext_unstable","MenuContext","useValidateNesting","MENU_ITEM_ROLES","MENU_ITEM_ROLES_SELECTOR","map","role","join","useMenuList_unstable","props","ref","menuContext","useMenuContextSelectors","hasMenuContext","usingPropsAndMenuContext","console","warn","wrapperRef","useRef","findAllFocusable","targetDocument","focusAttributes","circular","baseState","useMenuListBase_unstable","mergedRootRef","root","useEffect","element","current","onTabsterMoveFocus","e","nextElement","detail","next","contains","activeElement","preventDefault","addEventListener","removeEventListener","setFocusByFirstCharacter","useCallback","itemEl","menuItems","el","hasAttribute","indexOf","getAttribute","focusItemMatchingFirstCharacter","key","triggerId","context","checkedValuesContext","checkedValues","onCheckedValueChangeContext","onCheckedValueChange","hasIconsContext","hasIcons","hasCheckmarksContext","hasCheckmarks","innerRef","validateNestingRef","Array","from","querySelectorAll","setCheckedValues","state","undefined","defaultState","defaultCheckedValues","initialState","handleCheckedValueChange","toggleCheckbox","name","value","checked","checkedItems","newCheckedItems","splice","push","s","selectRadio","components","always","elementType","startIndex","length","firstChars","menuItem","textContent","charAt","toLowerCase","char","getIndexFirstChars","start","i","index","focus","contextValue","isUsingPropsAndContext","val"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,aAAa,EACbC,gBAAgB,EAChBC,oBAAoB,EACpBC,wBAAwB,EACxBC,IAAI,QACC,4BAA4B;AACnC,SACEC,uBAAuB,EACvBC,eAAe,EACfC,yBAAyB,QAEpB,0BAA0B;AACjC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,uBAAuB,QAAQ,gCAA6B;AACrE,SAASC,WAAW,QAAQ,gCAA6B;AAEzD,SAASC,kBAAkB,QAAQ,oCAAiC;AAEpE,MAAMC,kBAAkB;IAAC;IAAY;IAAoB;CAAgB;AACzE,MAAMC,2BAA2BD,gBAAgBE,GAAG,CAACC,CAAAA,OAAQ,CAAC,OAAO,EAAEA,KAAK,EAAE,CAAC,EAAEC,IAAI,CAAC;AAEtF;;;;;;;;CAQC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AE;QACAL;QACAO;QACAE;IACF;AACF;AAEA;;CAEC,GACD,MAAM7C,2BAA2B,CAC/BL,OACAyF,cACArF;IAEA,IAAIsF,yBAAyB;IAC7B,IAAK,MAAMC,OAAOF,aAAc;QAC9B,IAAIzF,KAAK,CAAC2F,IAAgG,EAAE;YAC1GD,yBAAyB;QAC3B;IACF;IAEA,OAAOtF,kBAAkBsF;AAC3B"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/useMenuList.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n useMergedRefs,\n useEventCallback,\n useControllableState,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport {\n useArrowNavigationGroup,\n useFocusFinders,\n TabsterMoveFocusEventName,\n type TabsterMoveFocusEvent,\n} from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MenuContext } from '../../contexts/menuContext';\nimport type { MenuListProps, MenuListState } from './MenuList.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\nconst MENU_ITEM_ROLES = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];\nconst MENU_ITEM_ROLES_SELECTOR = MENU_ITEM_ROLES.map(role => `[role=\"${role}\"]`).join(',');\n\n/**\n * Returns the props and state required to render the component.\n *\n * Composes with `useMenuListBase_unstable` and adds Tabster-driven keyboard\n * navigation: circular arrow-key focus, a `TabsterMoveFocusEvent` listener\n * that lets `useMenuPopover_unstable` handle Tab key presses, a focus-aware\n * `setFocusByFirstCharacter`, and the `hasIcons` / `hasCheckmarks` slot\n * alignment hints sourced from the parent `MenuContext`.\n */\nexport const useMenuList_unstable = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n const menuContext = useMenuContextSelectors();\n const hasMenuContext = useHasParentContext(MenuContext);\n\n if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {\n // TODO throw warnings in development safely\n // eslint-disable-next-line no-console\n console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');\n }\n\n const wrapperRef = React.useRef<HTMLElement>(null);\n const { findAllFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n const focusAttributes = useArrowNavigationGroup({ circular: true });\n\n const baseState = useMenuListBase_unstable(props, ref);\n // recreate root non-mutatively: merge wrapperRef so the effect below can\n // observe the rendered DOM element, and add Tabster arrow-nav attributes\n const mergedRootRef = useMergedRefs(baseState.root.ref, wrapperRef) as React.Ref<HTMLDivElement>;\n\n React.useEffect(() => {\n const element = wrapperRef.current;\n\n if (!hasMenuContext || !targetDocument || !element) {\n return;\n }\n\n const onTabsterMoveFocus = (e: TabsterMoveFocusEvent) => {\n const nextElement = e.detail.next;\n if (nextElement && element.contains(targetDocument.activeElement) && !element.contains(nextElement)) {\n // Preventing Tabster from handling Tab press, useMenuPopover will handle it.\n e.preventDefault();\n }\n };\n\n targetDocument.addEventListener(TabsterMoveFocusEventName, onTabsterMoveFocus);\n return () => {\n targetDocument.removeEventListener(TabsterMoveFocusEventName, onTabsterMoveFocus);\n };\n }, [hasMenuContext, targetDocument]);\n\n const setFocusByFirstCharacter = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => {\n if (!wrapperRef.current) {\n return;\n }\n const menuItems = findAllFocusable(\n wrapperRef.current,\n (el: HTMLElement) => el.hasAttribute('role') && MENU_ITEM_ROLES.indexOf(el.getAttribute('role')!) !== -1,\n );\n focusItemMatchingFirstCharacter(menuItems, e.key, itemEl);\n },\n [findAllFocusable],\n );\n\n return {\n ...baseState,\n root: {\n ...focusAttributes,\n ...baseState.root,\n ref: mergedRootRef,\n },\n setFocusByFirstCharacter,\n };\n};\n\n/**\n * Base hook for MenuList component, produces state required to render the component.\n *\n * Does not invoke any Tabster APIs internally: arrow-key navigation and the\n * focus-aware `setFocusByFirstCharacter` are added by the wrapper\n * `useMenuList_unstable`. The base's `setFocusByFirstCharacter` walks the DOM\n * via `querySelectorAll` and does not filter by Tabster's focusability rules,\n * so consumers integrating their own focus management should layer that on top.\n *\n * @param props - props from this instance of MenuList\n * @param ref - reference to root HTMLElement of MenuList\n */\nexport const useMenuListBase_unstable = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const checkedValuesContext = useMenuContext_unstable(context => context.checkedValues);\n const onCheckedValueChangeContext = useMenuContext_unstable(context => context.onCheckedValueChange);\n const hasIconsContext = useMenuContext_unstable(context => context.hasIcons);\n const hasCheckmarksContext = useMenuContext_unstable(context => context.hasCheckmarks);\n const hasMenuContext = useHasParentContext(MenuContext);\n\n const innerRef = React.useRef<HTMLElement>(null);\n const validateNestingRef = useValidateNesting('MenuList');\n\n const setFocusByFirstCharacter = React.useCallback((e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => {\n if (!innerRef.current) {\n return;\n }\n const menuItems = Array.from(innerRef.current.querySelectorAll<HTMLElement>(MENU_ITEM_ROLES_SELECTOR));\n focusItemMatchingFirstCharacter(menuItems, e.key, itemEl);\n }, []);\n\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues ?? (hasMenuContext ? checkedValuesContext : undefined),\n defaultState: props.defaultCheckedValues,\n initialState: {},\n });\n\n const handleCheckedValueChange =\n props.onCheckedValueChange ?? (hasMenuContext ? onCheckedValueChangeContext : undefined);\n\n const toggleCheckbox = useEventCallback(\n (e: React.MouseEvent | React.KeyboardEvent, name: string, value: string, checked: boolean) => {\n const checkedItems = checkedValues?.[name] || [];\n const newCheckedItems = [...checkedItems];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n\n handleCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n },\n );\n\n const selectRadio = useEventCallback((e: React.MouseEvent | React.KeyboardEvent, name: string, value: string) => {\n const newCheckedItems = [value];\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n handleCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n });\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, innerRef, validateNestingRef) as React.Ref<HTMLDivElement>,\n role: 'menu',\n 'aria-labelledby': triggerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n checkedValues,\n hasIcons: props.hasIcons ?? hasIconsContext ?? false,\n hasCheckmarks: props.hasCheckmarks ?? hasCheckmarksContext ?? false,\n hasMenuContext,\n setFocusByFirstCharacter,\n selectRadio,\n toggleCheckbox,\n };\n};\n\n/**\n * Focuses the next menu item whose textContent starts with the typed character,\n * wrapping around the list. Shared between the Tabster-free base impl and the\n * Tabster-aware wrapper.\n */\nconst focusItemMatchingFirstCharacter = (menuItems: HTMLElement[], key: string, current: HTMLElement) => {\n let startIndex = menuItems.indexOf(current) + 1;\n if (startIndex === menuItems.length) {\n startIndex = 0;\n }\n\n const firstChars = menuItems.map(menuItem => menuItem.textContent?.charAt(0).toLowerCase());\n const char = key.toLowerCase();\n\n const getIndexFirstChars = (start: number) => {\n for (let i = start; i < firstChars.length; i++) {\n if (char === firstChars[i]) {\n return i;\n }\n }\n return -1;\n };\n\n let index = getIndexFirstChars(startIndex);\n if (index === -1) {\n index = getIndexFirstChars(0);\n }\n if (index > -1) {\n menuItems[index].focus();\n }\n};\n\n/**\n * Adds some sugar to fetching multiple context selector values\n */\nconst useMenuContextSelectors = () => {\n const checkedValues = useMenuContext_unstable(context => context.checkedValues);\n const onCheckedValueChange = useMenuContext_unstable(context => context.onCheckedValueChange);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const hasIcons = useMenuContext_unstable(context => context.hasIcons);\n const hasCheckmarks = useMenuContext_unstable(context => context.hasCheckmarks);\n\n return {\n checkedValues,\n onCheckedValueChange,\n triggerId,\n hasIcons,\n hasCheckmarks,\n };\n};\n\n/**\n * Helper function to detect if props and MenuContext values are both used\n */\nconst usingPropsAndMenuContext = (\n props: MenuListProps,\n contextValue: ReturnType<typeof useMenuContextSelectors>,\n hasMenuContext: boolean,\n) => {\n let isUsingPropsAndContext = false;\n for (const val in contextValue) {\n if (props[val as keyof Omit<typeof contextValue, 'hasMenuContext' | 'onCheckedValueChange' | 'triggerId'>]) {\n isUsingPropsAndContext = true;\n }\n }\n\n return hasMenuContext && isUsingPropsAndContext;\n};\n"],"names":["React","useMergedRefs","useEventCallback","useControllableState","getIntrinsicElementProps","slot","useArrowNavigationGroup","useFocusFinders","TabsterMoveFocusEventName","useFluent_unstable","useFluent","useHasParentContext","useMenuContext_unstable","MenuContext","useValidateNesting","MENU_ITEM_ROLES","MENU_ITEM_ROLES_SELECTOR","map","role","join","useMenuList_unstable","props","ref","menuContext","useMenuContextSelectors","hasMenuContext","usingPropsAndMenuContext","console","warn","wrapperRef","useRef","findAllFocusable","targetDocument","focusAttributes","circular","baseState","useMenuListBase_unstable","mergedRootRef","root","useEffect","element","current","onTabsterMoveFocus","e","nextElement","detail","next","contains","activeElement","preventDefault","addEventListener","removeEventListener","setFocusByFirstCharacter","useCallback","itemEl","menuItems","el","hasAttribute","indexOf","getAttribute","focusItemMatchingFirstCharacter","key","triggerId","context","checkedValuesContext","checkedValues","onCheckedValueChangeContext","onCheckedValueChange","hasIconsContext","hasIcons","hasCheckmarksContext","hasCheckmarks","innerRef","validateNestingRef","Array","from","querySelectorAll","setCheckedValues","state","undefined","defaultState","defaultCheckedValues","initialState","handleCheckedValueChange","toggleCheckbox","name","value","checked","checkedItems","newCheckedItems","splice","push","s","selectRadio","components","always","elementType","startIndex","length","firstChars","menuItem","textContent","charAt","toLowerCase","char","getIndexFirstChars","start","i","index","focus","contextValue","isUsingPropsAndContext","val"],"mappings":"AAAA;AAEA,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AmBR;IAC/B,IAAIW,UAAU,CAAC,GAAG;QAChBA,QAAQH,mBAAmB;IAC7B;IACA,IAAIG,QAAQ,CAAC,GAAG;QACdrD,SAAS,CAACqD,MAAM,CAACC,KAAK;IACxB;AACF;AAEA;;CAEC,GACD,MAAMrF,0BAA0B;IAC9B,MAAMyC,gBAAgBrD,wBAAwBmD,CAAAA,UAAWA,QAAQE,aAAa;IAC9E,MAAME,uBAAuBvD,wBAAwBmD,CAAAA,UAAWA,QAAQI,oBAAoB;IAC5F,MAAML,YAAYlD,wBAAwBmD,CAAAA,UAAWA,QAAQD,SAAS;IACtE,MAAMO,WAAWzD,wBAAwBmD,CAAAA,UAAWA,QAAQM,QAAQ;IACpE,MAAME,gBAAgB3D,wBAAwBmD,CAAAA,UAAWA,QAAQQ,aAAa;IAE9E,OAAO;QACLN;QACAE;QACAL;QACAO;QACAE;IACF;AACF;AAEA;;CAEC,GACD,MAAM7C,2BAA2B,CAC/BL,OACAyF,cACArF;IAEA,IAAIsF,yBAAyB;IAC7B,IAAK,MAAMC,OAAOF,aAAc;QAC9B,IAAIzF,KAAK,CAAC2F,IAAgG,EAAE;YAC1GD,yBAAyB;QAC3B;IACF;IAEA,OAAOtF,kBAAkBsF;AAC3B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/useMenuListContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { MenuListContextValues, MenuListState } from './MenuList.types';\n\nexport function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues {\n const { checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox } = state;\n\n const menuList = React.useMemo(\n () => ({\n checkedValues,\n hasCheckmarks,\n hasIcons,\n selectRadio,\n setFocusByFirstCharacter,\n toggleCheckbox,\n }),\n [checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox],\n );\n\n return { menuList };\n}\n"],"names":["React","useMenuListContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","selectRadio","setFocusByFirstCharacter","toggleCheckbox","menuList","useMemo"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,kCAAkCC,KAAoB;IACpE,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAE,GAAGN;IAE1G,MAAMO,WAAWT,MAAMU,OAAO,CAC5B,IAAO,CAAA;YACLP;YACAC;YACAC;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QAACL;QAAeC;QAAeC;QAAUC;QAAaC;QAA0BC;KAAe;IAGjG,OAAO;QAAEC;IAAS;AACpB"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/useMenuListContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { MenuListContextValues, MenuListState } from './MenuList.types';\n\nexport function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues {\n const { checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox } = state;\n\n const menuList = React.useMemo(\n () => ({\n checkedValues,\n hasCheckmarks,\n hasIcons,\n selectRadio,\n setFocusByFirstCharacter,\n toggleCheckbox,\n }),\n [checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox],\n );\n\n return { menuList };\n}\n"],"names":["React","useMenuListContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","selectRadio","setFocusByFirstCharacter","toggleCheckbox","menuList","useMemo"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,kCAAkCC,KAAoB;IACpE,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAE,GAAGN;IAE1G,MAAMO,WAAWT,MAAMU,OAAO,CAC5B,IAAO,CAAA;YACLP;YACAC;YACAC;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QAACL;QAAeC;QAAeC;QAAUC;QAAaC;QAA0BC;KAAe;IAGjG,OAAO;QAAEC;IAAS;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuList/useMenuListStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuListSlots, MenuListState } from './MenuList.types';\n\nexport const menuListClassNames: SlotClassNames<MenuListSlots> = {\n root: 'fui-MenuList',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n },\n hasMenuContext: {\n height: '100%',\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = (state: MenuListState): MenuListState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n menuListClassNames.root,\n styles.root,\n state.hasMenuContext && styles.hasMenuContext,\n state.root.className,\n );\n return state;\n};\n"],"names":["mergeClasses","makeStyles","menuListClassNames","root","useStyles","display","flexDirection","gap","hasMenuContext","height","useMenuListStyles_unstable","state","styles","className"],"mappings":"AAAA;AAGA,SAASA,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAG1D,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYH,WAAW;IAC3BE,MAAM;QACJE,SAAS;QACTC,eAAe;QACfC,KAAK;IACP;IACAC,gBAAgB;QACdC,QAAQ;IACV;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAMC,SAASR;IACf,oDAAoD;IACpDO,MAAMR,IAAI,CAACU,SAAS,GAAGb,aACrBE,mBAAmBC,IAAI,EACvBS,OAAOT,IAAI,EACXQ,MAAMH,cAAc,IAAII,OAAOJ,cAAc,EAC7CG,MAAMR,IAAI,CAACU,SAAS;IAEtB,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuListSlots, MenuListState } from './MenuList.types';\n\nexport const menuListClassNames: SlotClassNames<MenuListSlots> = {\n root: 'fui-MenuList',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n },\n hasMenuContext: {\n height: '100%',\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = (state: MenuListState): MenuListState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n menuListClassNames.root,\n styles.root,\n state.hasMenuContext && styles.hasMenuContext,\n state.root.className,\n );\n return state;\n};\n"],"names":["mergeClasses","makeStyles","menuListClassNames","root","useStyles","display","flexDirection","gap","hasMenuContext","height","useMenuListStyles_unstable","state","styles","className"],"mappings":"AAAA;AAGA,SAASA,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAG1D,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYH,WAAW;IAC3BE,MAAM;QACJE,SAAS;QACTC,eAAe;QACfC,KAAK;IACP;IACAC,gBAAgB;QACdC,QAAQ;IACV;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAMC,SAASR;IACf,oDAAoD;IACpDO,MAAMR,IAAI,CAACU,SAAS,GAAGb,aACrBE,mBAAmBC,IAAI,EACvBS,OAAOT,IAAI,EACXQ,MAAMH,cAAc,IAAII,OAAOJ,cAAc,EAC7CG,MAAMR,IAAI,CAACU,SAAS;IAEtB,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuPopover/MenuPopover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport type { MenuPopoverProps } from './MenuPopover.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */\nexport const MenuPopover: ForwardRefComponent<MenuPopoverProps> = React.forwardRef((props, ref) => {\n const state = useMenuPopover_unstable(props, ref);\n\n useMenuPopoverStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);\n\n return renderMenuPopover_unstable(state);\n});\n\nMenuPopover.displayName = 'MenuPopover';\n"],"names":["React","useMenuPopover_unstable","useMenuPopoverStyles_unstable","renderMenuPopover_unstable","useCustomStyleHook_unstable","MenuPopover","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,mCAAgC;AAC9E,SAASC,0BAA0B,QAAQ,yBAAsB;AAGjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CN,8BAA8BO;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAON,2BAA2BM;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/MenuPopover/MenuPopover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport type { MenuPopoverProps } from './MenuPopover.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */\nexport const MenuPopover: ForwardRefComponent<MenuPopoverProps> = React.forwardRef((props, ref) => {\n const state = useMenuPopover_unstable(props, ref);\n\n useMenuPopoverStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);\n\n return renderMenuPopover_unstable(state);\n});\n\nMenuPopover.displayName = 'MenuPopover';\n"],"names":["React","useMenuPopover_unstable","useMenuPopoverStyles_unstable","renderMenuPopover_unstable","useCustomStyleHook_unstable","MenuPopover","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,mCAAgC;AAC9E,SAASC,0BAA0B,QAAQ,yBAAsB;AAGjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CN,8BAA8BO;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAON,2BAA2BM;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuPopover/MenuPopover.types.ts"],"sourcesContent":["import type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nexport type MenuPopoverSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuPopover Props\n */\nexport type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;\n\n/**\n * State used in rendering MenuPopover\n */\nexport type MenuPopoverState = ComponentState<MenuPopoverSlots> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline: boolean;\n\n safeZone?: React.ReactElement | null;\n };\n"],"names":[],"mappings":"AAaA;;CAEC,GACD,WASI"}
1
+ {"version":3,"sources":["../../../src/components/MenuPopover/MenuPopover.types.ts"],"sourcesContent":["import type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nexport type MenuPopoverSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MenuPopover Props\n */\nexport type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;\n\n/**\n * State used in rendering MenuPopover\n */\nexport type MenuPopoverState = ComponentState<MenuPopoverSlots> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline: boolean;\n\n safeZone?: React.ReactElement | null;\n };\n"],"names":[],"mappings":"AAaA;;CAEC,GACD,WASI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuPopover/index.ts"],"sourcesContent":["export { MenuPopover } from './MenuPopover';\nexport type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nexport { renderMenuPopover_unstable } from './renderMenuPopover';\nexport { useMenuPopover_unstable, useMenuPopoverBase_unstable } from './useMenuPopover';\nexport { menuPopoverClassNames, useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\n"],"names":["MenuPopover","renderMenuPopover_unstable","useMenuPopover_unstable","useMenuPopoverBase_unstable","menuPopoverClassNames","useMenuPopoverStyles_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,EAAEC,2BAA2B,QAAQ,sBAAmB;AACxF,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,mCAAgC"}
1
+ {"version":3,"sources":["../../../src/components/MenuPopover/index.ts"],"sourcesContent":["export { MenuPopover } from './MenuPopover';\nexport type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nexport { renderMenuPopover_unstable } from './renderMenuPopover';\nexport { useMenuPopover_unstable, useMenuPopoverBase_unstable } from './useMenuPopover';\nexport { menuPopoverClassNames, useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\n"],"names":["MenuPopover","renderMenuPopover_unstable","useMenuPopover_unstable","useMenuPopoverBase_unstable","menuPopoverClassNames","useMenuPopoverStyles_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,EAAEC,2BAA2B,QAAQ,sBAAmB;AACxF,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,mCAAgC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  import { Portal } from "@fluentui/react-portal";
4
4
  /**
5
5
  * Render the final JSX of MenuPopover
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuPopover/renderMenuPopover.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of MenuPopover\n */\nexport const renderMenuPopover_unstable = (state: MenuPopoverState): JSXElement => {\n assertSlots<MenuPopoverSlots>(state);\n\n if (state.inline) {\n return (\n <>\n <state.root />\n {state.safeZone}\n </>\n );\n }\n\n return (\n <Portal mountNode={state.mountNode}>\n <state.root />\n {state.safeZone}\n </Portal>\n );\n};\n"],"names":["assertSlots","Portal","renderMenuPopover_unstable","state","inline","root","safeZone","mountNode"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCH,YAA8BG;IAE9B,IAAIA,MAAMC,MAAM,EAAE;QAChB,qBACE;;8BACE,KAACD,MAAME,IAAI;gBACVF,MAAMG,QAAQ;;;IAGrB;IAEA,qBACE,MAACL;QAAOM,WAAWJ,MAAMI,SAAS;;0BAChC,KAACJ,MAAME,IAAI;YACVF,MAAMG,QAAQ;;;AAGrB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/MenuPopover/renderMenuPopover.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of MenuPopover\n */\nexport const renderMenuPopover_unstable = (state: MenuPopoverState): JSXElement => {\n assertSlots<MenuPopoverSlots>(state);\n\n if (state.inline) {\n return (\n <>\n <state.root />\n {state.safeZone}\n </>\n );\n }\n\n return (\n <Portal mountNode={state.mountNode}>\n <state.root />\n {state.safeZone}\n </Portal>\n );\n};\n"],"names":["assertSlots","Portal","renderMenuPopover_unstable","state","inline","root","safeZone","mountNode"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCH,YAA8BG;IAE9B,IAAIA,MAAMC,MAAM,EAAE;QAChB,qBACE;;8BACE,KAACD,MAAME,IAAI;gBACVF,MAAMG,QAAQ;;;IAGrB;IAEA,qBACE,MAACL;QAAOM,WAAWJ,MAAMI,SAAS;;0BAChC,KAACJ,MAAME,IAAI;YACVF,MAAMG,QAAQ;;;AAGrB,EAAE"}
@@ -18,6 +18,7 @@ import { dispatchMenuEnterEvent, useIsSubmenu } from "../../utils/index.js";
18
18
  * @param props - props from this instance of MenuPopover
19
19
  * @param ref - reference to root HTMLElement of MenuPopover
20
20
  */ export const useMenuPopoverBase_unstable = (props, ref)=>{
21
+ var _useMenuContext_unstable;
21
22
  'use no memo'; // justified: compiler would optimize useMenuPopoverBase_unstable — manual opt-out to preserve runtime behavior
22
23
  const safeZone = useMenuContext_unstable((context)=>context.safeZone);
23
24
  const popoverRef = useMenuContext_unstable((context)=>context.menuPopoverRef);
@@ -60,7 +61,6 @@ import { dispatchMenuEnterEvent, useIsSubmenu } from "../../utils/index.js";
60
61
  }, [
61
62
  clearThrottleTimeout
62
63
  ]);
63
- var _useMenuContext_unstable;
64
64
  const inline = (_useMenuContext_unstable = useMenuContext_unstable((context)=>context.inline)) !== null && _useMenuContext_unstable !== void 0 ? _useMenuContext_unstable : false;
65
65
  const mountNode = useMenuContext_unstable((context)=>context.mountNode);
66
66
  const rootProps = slot.always(getIntrinsicElementProps('div', {