@fluentui/react-menu 9.7.3 → 9.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +139 -1
  3. package/CHANGELOG.md +38 -2
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuDivider.js.map +1 -1
  6. package/lib/MenuGroup.js.map +1 -1
  7. package/lib/MenuGroupHeader.js.map +1 -1
  8. package/lib/MenuItem.js.map +1 -1
  9. package/lib/MenuItemCheckbox.js.map +1 -1
  10. package/lib/MenuItemRadio.js.map +1 -1
  11. package/lib/MenuList.js.map +1 -1
  12. package/lib/MenuPopover.js.map +1 -1
  13. package/lib/MenuSplitGroup.js.map +1 -1
  14. package/lib/MenuTrigger.js.map +1 -1
  15. package/lib/components/Menu/Menu.js +1 -0
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js +1 -1
  18. package/lib/components/Menu/Menu.types.js.map +1 -1
  19. package/lib/components/Menu/index.js.map +1 -1
  20. package/lib/components/Menu/renderMenu.js.map +1 -1
  21. package/lib/components/Menu/useMenu.js +9 -8
  22. package/lib/components/Menu/useMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  24. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  25. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  26. package/lib/components/MenuDivider/index.js.map +1 -1
  27. package/lib/components/MenuDivider/renderMenuDivider.js +1 -3
  28. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDivider.js +1 -0
  30. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  34. package/lib/components/MenuGroup/index.js.map +1 -1
  35. package/lib/components/MenuGroup/renderMenuGroup.js +1 -3
  36. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  37. package/lib/components/MenuGroup/useMenuGroup.js +1 -0
  38. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  41. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  43. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  44. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
  45. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  46. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -0
  47. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  49. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  50. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  51. package/lib/components/MenuItem/index.js.map +1 -1
  52. package/lib/components/MenuItem/renderMenuItem.js +1 -13
  53. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  54. package/lib/components/MenuItem/useCharacterSearch.js +3 -2
  55. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  56. package/lib/components/MenuItem/useMenuItem.js +7 -7
  57. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  58. package/lib/components/MenuItem/useMenuItemStyles.js +15 -2
  59. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  60. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  61. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  62. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  63. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -11
  64. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  65. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  66. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  67. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  68. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  69. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  70. package/lib/components/MenuItemRadio/index.js.map +1 -1
  71. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -11
  72. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  73. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  74. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  75. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  76. package/lib/components/MenuList/MenuList.js.map +1 -1
  77. package/lib/components/MenuList/MenuList.types.js +1 -1
  78. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  79. package/lib/components/MenuList/index.js.map +1 -1
  80. package/lib/components/MenuList/renderMenuList.js +1 -3
  81. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  82. package/lib/components/MenuList/useMenuList.js +6 -5
  83. package/lib/components/MenuList/useMenuList.js.map +1 -1
  84. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  85. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  86. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  87. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  88. package/lib/components/MenuPopover/index.js.map +1 -1
  89. package/lib/components/MenuPopover/renderMenuPopover.js +2 -6
  90. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  91. package/lib/components/MenuPopover/useMenuPopover.js +4 -4
  92. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  93. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  94. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  95. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  96. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  97. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
  98. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  99. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -2
  100. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  101. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  102. package/lib/components/MenuTrigger/MenuTrigger.js +1 -0
  103. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  104. package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
  105. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  106. package/lib/components/MenuTrigger/index.js.map +1 -1
  107. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  108. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  109. package/lib/components/index.js.map +1 -1
  110. package/lib/contexts/menuContext.js +1 -0
  111. package/lib/contexts/menuContext.js.map +1 -1
  112. package/lib/contexts/menuGroupContext.js +2 -4
  113. package/lib/contexts/menuGroupContext.js.map +1 -1
  114. package/lib/contexts/menuListContext.js +1 -0
  115. package/lib/contexts/menuListContext.js.map +1 -1
  116. package/lib/contexts/menuTriggerContext.js +2 -4
  117. package/lib/contexts/menuTriggerContext.js.map +1 -1
  118. package/lib/index.js.map +1 -1
  119. package/lib/selectable/index.js.map +1 -1
  120. package/lib/selectable/types.js +1 -1
  121. package/lib/selectable/types.js.map +1 -1
  122. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  123. package/lib/utils/index.js.map +1 -1
  124. package/lib/utils/useIsSubmenu.js.map +1 -1
  125. package/lib/utils/useOnMenuEnter.js +2 -2
  126. package/lib/utils/useOnMenuEnter.js.map +1 -1
  127. package/lib-commonjs/Menu.js +5 -4
  128. package/lib-commonjs/Menu.js.map +1 -1
  129. package/lib-commonjs/MenuDivider.js +5 -4
  130. package/lib-commonjs/MenuDivider.js.map +1 -1
  131. package/lib-commonjs/MenuGroup.js +5 -4
  132. package/lib-commonjs/MenuGroup.js.map +1 -1
  133. package/lib-commonjs/MenuGroupHeader.js +5 -4
  134. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  135. package/lib-commonjs/MenuItem.js +5 -4
  136. package/lib-commonjs/MenuItem.js.map +1 -1
  137. package/lib-commonjs/MenuItemCheckbox.js +5 -4
  138. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  139. package/lib-commonjs/MenuItemRadio.js +5 -4
  140. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  141. package/lib-commonjs/MenuList.js +5 -4
  142. package/lib-commonjs/MenuList.js.map +1 -1
  143. package/lib-commonjs/MenuPopover.js +5 -4
  144. package/lib-commonjs/MenuPopover.js.map +1 -1
  145. package/lib-commonjs/MenuSplitGroup.js +5 -4
  146. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  147. package/lib-commonjs/MenuTrigger.js +5 -4
  148. package/lib-commonjs/MenuTrigger.js.map +1 -1
  149. package/lib-commonjs/components/Menu/Menu.js +16 -15
  150. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  151. package/lib-commonjs/components/Menu/Menu.types.js +5 -2
  152. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  153. package/lib-commonjs/components/Menu/index.js +9 -8
  154. package/lib-commonjs/components/Menu/index.js.map +1 -1
  155. package/lib-commonjs/components/Menu/renderMenu.js +14 -14
  156. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  157. package/lib-commonjs/components/Menu/useMenu.js +258 -256
  158. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  159. package/lib-commonjs/components/Menu/useMenuContextValues.js +29 -43
  160. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  161. package/lib-commonjs/components/MenuDivider/MenuDivider.js +19 -20
  162. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  163. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +3 -2
  164. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  165. package/lib-commonjs/components/MenuDivider/index.js +9 -8
  166. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +13 -19
  168. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  169. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +22 -21
  170. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  171. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +47 -25
  172. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  173. package/lib-commonjs/components/MenuGroup/MenuGroup.js +21 -22
  174. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +3 -2
  176. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroup/index.js +10 -9
  178. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +16 -22
  180. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +23 -22
  182. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  183. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +18 -15
  184. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  185. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +19 -11
  186. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  187. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +19 -20
  188. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  189. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +3 -2
  190. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  191. package/lib-commonjs/components/MenuGroupHeader/index.js +9 -8
  192. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  193. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +13 -19
  194. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  195. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +22 -23
  196. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  197. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +47 -25
  198. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  199. package/lib-commonjs/components/MenuItem/MenuItem.js +19 -20
  200. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  201. package/lib-commonjs/components/MenuItem/MenuItem.types.js +3 -2
  202. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  203. package/lib-commonjs/components/MenuItem/index.js +9 -8
  204. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  205. package/lib-commonjs/components/MenuItem/renderMenuItem.js +13 -28
  206. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  207. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +24 -22
  208. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  209. package/lib-commonjs/components/MenuItem/useMenuItem.js +97 -104
  210. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  211. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +318 -137
  212. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  213. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +19 -20
  214. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  215. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -2
  216. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  217. package/lib-commonjs/components/MenuItemCheckbox/index.js +9 -8
  218. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  219. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +13 -24
  220. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  221. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +44 -45
  222. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  223. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +38 -30
  224. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  225. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +19 -20
  226. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  227. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +3 -2
  228. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  229. package/lib-commonjs/components/MenuItemRadio/index.js +9 -8
  230. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  231. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +13 -27
  232. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  233. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +42 -45
  234. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +38 -30
  236. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  237. package/lib-commonjs/components/MenuList/MenuList.js +21 -22
  238. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  239. package/lib-commonjs/components/MenuList/MenuList.types.js +5 -2
  240. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  241. package/lib-commonjs/components/MenuList/index.js +10 -9
  242. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  243. package/lib-commonjs/components/MenuList/renderMenuList.js +16 -21
  244. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  245. package/lib-commonjs/components/MenuList/useMenuList.js +143 -137
  246. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  247. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +20 -25
  248. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  249. package/lib-commonjs/components/MenuList/useMenuListStyles.js +33 -23
  250. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  251. package/lib-commonjs/components/MenuPopover/MenuPopover.js +19 -20
  252. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  253. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -2
  254. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  255. package/lib-commonjs/components/MenuPopover/index.js +9 -8
  256. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  257. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +19 -26
  258. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  259. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +102 -110
  260. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  261. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +121 -50
  262. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  263. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +19 -20
  264. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  265. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -2
  266. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  267. package/lib-commonjs/components/MenuSplitGroup/index.js +9 -8
  268. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  269. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +13 -18
  270. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  271. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +58 -64
  272. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  273. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +61 -32
  274. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +15 -15
  276. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  277. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +5 -2
  278. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  279. package/lib-commonjs/components/MenuTrigger/index.js +8 -7
  280. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +14 -16
  282. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  283. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +163 -170
  284. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  285. package/lib-commonjs/components/index.js +6 -5
  286. package/lib-commonjs/components/index.js.map +1 -1
  287. package/lib-commonjs/contexts/menuContext.js +38 -27
  288. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  289. package/lib-commonjs/contexts/menuGroupContext.js +19 -12
  290. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  291. package/lib-commonjs/contexts/menuListContext.js +25 -14
  292. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  293. package/lib-commonjs/contexts/menuTriggerContext.js +18 -12
  294. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  295. package/lib-commonjs/index.js +91 -399
  296. package/lib-commonjs/index.js.map +1 -1
  297. package/lib-commonjs/selectable/index.js +6 -5
  298. package/lib-commonjs/selectable/index.js.map +1 -1
  299. package/lib-commonjs/selectable/types.js +5 -2
  300. package/lib-commonjs/selectable/types.js.map +1 -1
  301. package/lib-commonjs/selectable/useCheckmarkStyles.js +28 -26
  302. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  303. package/lib-commonjs/utils/index.js +5 -4
  304. package/lib-commonjs/utils/index.js.map +1 -1
  305. package/lib-commonjs/utils/useIsSubmenu.js +13 -19
  306. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  307. package/lib-commonjs/utils/useOnMenuEnter.js +57 -68
  308. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  309. package/package.json +15 -14
  310. package/lib-amd/Menu.js +0 -6
  311. package/lib-amd/Menu.js.map +0 -1
  312. package/lib-amd/MenuDivider.js +0 -6
  313. package/lib-amd/MenuDivider.js.map +0 -1
  314. package/lib-amd/MenuGroup.js +0 -6
  315. package/lib-amd/MenuGroup.js.map +0 -1
  316. package/lib-amd/MenuGroupHeader.js +0 -6
  317. package/lib-amd/MenuGroupHeader.js.map +0 -1
  318. package/lib-amd/MenuItem.js +0 -6
  319. package/lib-amd/MenuItem.js.map +0 -1
  320. package/lib-amd/MenuItemCheckbox.js +0 -6
  321. package/lib-amd/MenuItemCheckbox.js.map +0 -1
  322. package/lib-amd/MenuItemRadio.js +0 -6
  323. package/lib-amd/MenuItemRadio.js.map +0 -1
  324. package/lib-amd/MenuList.js +0 -6
  325. package/lib-amd/MenuList.js.map +0 -1
  326. package/lib-amd/MenuPopover.js +0 -6
  327. package/lib-amd/MenuPopover.js.map +0 -1
  328. package/lib-amd/MenuSplitGroup.js +0 -6
  329. package/lib-amd/MenuSplitGroup.js.map +0 -1
  330. package/lib-amd/MenuTrigger.js +0 -6
  331. package/lib-amd/MenuTrigger.js.map +0 -1
  332. package/lib-amd/components/Menu/Menu.js +0 -16
  333. package/lib-amd/components/Menu/Menu.js.map +0 -1
  334. package/lib-amd/components/Menu/Menu.types.js +0 -5
  335. package/lib-amd/components/Menu/Menu.types.js.map +0 -1
  336. package/lib-amd/components/Menu/index.js +0 -10
  337. package/lib-amd/components/Menu/index.js.map +0 -1
  338. package/lib-amd/components/Menu/renderMenu.js +0 -15
  339. package/lib-amd/components/Menu/renderMenu.js.map +0 -1
  340. package/lib-amd/components/Menu/useMenu.js +0 -224
  341. package/lib-amd/components/Menu/useMenu.js.map +0 -1
  342. package/lib-amd/components/Menu/useMenuContextValues.js +0 -29
  343. package/lib-amd/components/Menu/useMenuContextValues.js.map +0 -1
  344. package/lib-amd/components/MenuDivider/MenuDivider.js +0 -17
  345. package/lib-amd/components/MenuDivider/MenuDivider.js.map +0 -1
  346. package/lib-amd/components/MenuDivider/MenuDivider.types.js +0 -5
  347. package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +0 -1
  348. package/lib-amd/components/MenuDivider/index.js +0 -10
  349. package/lib-amd/components/MenuDivider/index.js.map +0 -1
  350. package/lib-amd/components/MenuDivider/renderMenuDivider.js +0 -15
  351. package/lib-amd/components/MenuDivider/renderMenuDivider.js.map +0 -1
  352. package/lib-amd/components/MenuDivider/useMenuDivider.js +0 -18
  353. package/lib-amd/components/MenuDivider/useMenuDivider.js.map +0 -1
  354. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js +0 -18
  355. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
  356. package/lib-amd/components/MenuGroup/MenuGroup.js +0 -18
  357. package/lib-amd/components/MenuGroup/MenuGroup.js.map +0 -1
  358. package/lib-amd/components/MenuGroup/MenuGroup.types.js +0 -5
  359. package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +0 -1
  360. package/lib-amd/components/MenuGroup/index.js +0 -11
  361. package/lib-amd/components/MenuGroup/index.js.map +0 -1
  362. package/lib-amd/components/MenuGroup/renderMenuGroup.js +0 -16
  363. package/lib-amd/components/MenuGroup/renderMenuGroup.js.map +0 -1
  364. package/lib-amd/components/MenuGroup/useMenuGroup.js +0 -20
  365. package/lib-amd/components/MenuGroup/useMenuGroup.js.map +0 -1
  366. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js +0 -12
  367. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js.map +0 -1
  368. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js +0 -14
  369. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
  370. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -17
  371. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +0 -1
  372. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -5
  373. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +0 -1
  374. package/lib-amd/components/MenuGroupHeader/index.js +0 -10
  375. package/lib-amd/components/MenuGroupHeader/index.js.map +0 -1
  376. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js +0 -15
  377. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js.map +0 -1
  378. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js +0 -19
  379. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js.map +0 -1
  380. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -27
  381. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
  382. package/lib-amd/components/MenuItem/MenuItem.js +0 -17
  383. package/lib-amd/components/MenuItem/MenuItem.js.map +0 -1
  384. package/lib-amd/components/MenuItem/MenuItem.types.js +0 -5
  385. package/lib-amd/components/MenuItem/MenuItem.types.js.map +0 -1
  386. package/lib-amd/components/MenuItem/index.js +0 -10
  387. package/lib-amd/components/MenuItem/index.js.map +0 -1
  388. package/lib-amd/components/MenuItem/renderMenuItem.js +0 -19
  389. package/lib-amd/components/MenuItem/renderMenuItem.js.map +0 -1
  390. package/lib-amd/components/MenuItem/useCharacterSearch.js +0 -22
  391. package/lib-amd/components/MenuItem/useCharacterSearch.js.map +0 -1
  392. package/lib-amd/components/MenuItem/useMenuItem.js +0 -75
  393. package/lib-amd/components/MenuItem/useMenuItem.js.map +0 -1
  394. package/lib-amd/components/MenuItem/useMenuItemStyles.js +0 -109
  395. package/lib-amd/components/MenuItem/useMenuItemStyles.js.map +0 -1
  396. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -17
  397. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +0 -1
  398. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -5
  399. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +0 -1
  400. package/lib-amd/components/MenuItemCheckbox/index.js +0 -10
  401. package/lib-amd/components/MenuItemCheckbox/index.js.map +0 -1
  402. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js +0 -16
  403. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +0 -1
  404. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js +0 -26
  405. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +0 -1
  406. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -31
  407. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
  408. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -17
  409. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +0 -1
  410. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js +0 -5
  411. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +0 -1
  412. package/lib-amd/components/MenuItemRadio/index.js +0 -10
  413. package/lib-amd/components/MenuItemRadio/index.js.map +0 -1
  414. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js +0 -19
  415. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js.map +0 -1
  416. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js +0 -27
  417. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js.map +0 -1
  418. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -31
  419. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
  420. package/lib-amd/components/MenuList/MenuList.js +0 -18
  421. package/lib-amd/components/MenuList/MenuList.js.map +0 -1
  422. package/lib-amd/components/MenuList/MenuList.types.js +0 -5
  423. package/lib-amd/components/MenuList/MenuList.types.js.map +0 -1
  424. package/lib-amd/components/MenuList/index.js +0 -11
  425. package/lib-amd/components/MenuList/index.js.map +0 -1
  426. package/lib-amd/components/MenuList/renderMenuList.js +0 -15
  427. package/lib-amd/components/MenuList/renderMenuList.js.map +0 -1
  428. package/lib-amd/components/MenuList/useMenuList.js +0 -125
  429. package/lib-amd/components/MenuList/useMenuList.js.map +0 -1
  430. package/lib-amd/components/MenuList/useMenuListContextValues.js +0 -20
  431. package/lib-amd/components/MenuList/useMenuListContextValues.js.map +0 -1
  432. package/lib-amd/components/MenuList/useMenuListStyles.js +0 -21
  433. package/lib-amd/components/MenuList/useMenuListStyles.js.map +0 -1
  434. package/lib-amd/components/MenuPopover/MenuPopover.js +0 -17
  435. package/lib-amd/components/MenuPopover/MenuPopover.js.map +0 -1
  436. package/lib-amd/components/MenuPopover/MenuPopover.types.js +0 -5
  437. package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +0 -1
  438. package/lib-amd/components/MenuPopover/index.js +0 -10
  439. package/lib-amd/components/MenuPopover/index.js.map +0 -1
  440. package/lib-amd/components/MenuPopover/renderMenuPopover.js +0 -18
  441. package/lib-amd/components/MenuPopover/renderMenuPopover.js.map +0 -1
  442. package/lib-amd/components/MenuPopover/useMenuPopover.js +0 -83
  443. package/lib-amd/components/MenuPopover/useMenuPopover.js.map +0 -1
  444. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -21
  445. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
  446. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js +0 -17
  447. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js.map +0 -1
  448. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -5
  449. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js.map +0 -1
  450. package/lib-amd/components/MenuSplitGroup/index.js +0 -10
  451. package/lib-amd/components/MenuSplitGroup/index.js.map +0 -1
  452. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js +0 -14
  453. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js.map +0 -1
  454. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js +0 -47
  455. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js.map +0 -1
  456. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js +0 -43
  457. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
  458. package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -18
  459. package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +0 -1
  460. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js +0 -5
  461. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +0 -1
  462. package/lib-amd/components/MenuTrigger/index.js +0 -9
  463. package/lib-amd/components/MenuTrigger/index.js.map +0 -1
  464. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -15
  465. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +0 -1
  466. package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -112
  467. package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +0 -1
  468. package/lib-amd/components/index.js +0 -7
  469. package/lib-amd/components/index.js.map +0 -1
  470. package/lib-amd/contexts/menuContext.js +0 -32
  471. package/lib-amd/contexts/menuContext.js.map +0 -1
  472. package/lib-amd/contexts/menuGroupContext.js +0 -13
  473. package/lib-amd/contexts/menuGroupContext.js.map +0 -1
  474. package/lib-amd/contexts/menuListContext.js +0 -23
  475. package/lib-amd/contexts/menuListContext.js.map +0 -1
  476. package/lib-amd/contexts/menuTriggerContext.js +0 -14
  477. package/lib-amd/contexts/menuTriggerContext.js.map +0 -1
  478. package/lib-amd/index.js +0 -69
  479. package/lib-amd/index.js.map +0 -1
  480. package/lib-amd/selectable/index.js +0 -7
  481. package/lib-amd/selectable/index.js.map +0 -1
  482. package/lib-amd/selectable/types.js +0 -5
  483. package/lib-amd/selectable/types.js.map +0 -1
  484. package/lib-amd/selectable/useCheckmarkStyles.js +0 -28
  485. package/lib-amd/selectable/useCheckmarkStyles.js.map +0 -1
  486. package/lib-amd/utils/index.js +0 -6
  487. package/lib-amd/utils/index.js.map +0 -1
  488. package/lib-amd/utils/useIsSubmenu.js +0 -20
  489. package/lib-amd/utils/useIsSubmenu.js.map +0 -1
  490. package/lib-amd/utils/useOnMenuEnter.js +0 -59
  491. package/lib-amd/utils/useOnMenuEnter.js.map +0 -1
@@ -1,35 +1,43 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useMenuItemRadioStyles_unstable = exports.menuItemRadioClassNames = void 0;
7
- const react_1 = /*#__PURE__*/require("@griffel/react");
8
- const index_1 = /*#__PURE__*/require("../../selectable/index");
9
- const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles");
10
- exports.menuItemRadioClassNames = {
11
- root: 'fui-MenuItemRadio',
12
- icon: 'fui-MenuItemRadio__icon',
13
- checkmark: 'fui-MenuItemRadio__checkmark',
14
- content: 'fui-MenuItemRadio__content',
15
- secondaryContent: 'fui-MenuItemRadio__secondaryContent'
16
- };
17
- const useMenuItemRadioStyles_unstable = state => {
18
- state.root.className = react_1.mergeClasses(exports.menuItemRadioClassNames.root, state.root.className);
19
- if (state.content) {
20
- state.content.className = react_1.mergeClasses(exports.menuItemRadioClassNames.content, state.content.className);
21
- }
22
- if (state.secondaryContent) {
23
- state.secondaryContent.className = react_1.mergeClasses(exports.menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);
24
- }
25
- if (state.icon) {
26
- state.icon.className = react_1.mergeClasses(exports.menuItemRadioClassNames.icon, state.icon.className);
27
- }
28
- if (state.checkmark) {
29
- state.checkmark.className = react_1.mergeClasses(exports.menuItemRadioClassNames.checkmark, state.checkmark.className);
30
- }
31
- useMenuItemStyles_1.useMenuItemStyles_unstable(state);
32
- index_1.useCheckmarkStyles_unstable(state);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ menuItemRadioClassNames: ()=>menuItemRadioClassNames,
13
+ useMenuItemRadioStyles_unstable: ()=>useMenuItemRadioStyles_unstable
14
+ });
15
+ const _react = require("@griffel/react");
16
+ const _index = require("../../selectable/index");
17
+ const _useMenuItemStyles = require("../MenuItem/useMenuItemStyles");
18
+ const menuItemRadioClassNames = {
19
+ root: 'fui-MenuItemRadio',
20
+ icon: 'fui-MenuItemRadio__icon',
21
+ checkmark: 'fui-MenuItemRadio__checkmark',
22
+ content: 'fui-MenuItemRadio__content',
23
+ secondaryContent: 'fui-MenuItemRadio__secondaryContent'
33
24
  };
34
- exports.useMenuItemRadioStyles_unstable = useMenuItemRadioStyles_unstable;
25
+ const useMenuItemRadioStyles_unstable = (state)=>{
26
+ state.root.className = (0, _react.mergeClasses)(menuItemRadioClassNames.root, state.root.className);
27
+ if (state.content) {
28
+ state.content.className = (0, _react.mergeClasses)(menuItemRadioClassNames.content, state.content.className);
29
+ }
30
+ if (state.secondaryContent) {
31
+ state.secondaryContent.className = (0, _react.mergeClasses)(menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);
32
+ }
33
+ if (state.icon) {
34
+ state.icon.className = (0, _react.mergeClasses)(menuItemRadioClassNames.icon, state.icon.className);
35
+ }
36
+ if (state.checkmark) {
37
+ state.checkmark.className = (0, _react.mergeClasses)(menuItemRadioClassNames.checkmark, state.checkmark.className);
38
+ }
39
+ (0, _useMenuItemStyles.useMenuItemStyles_unstable)(state);
40
+ (0, _index.useCheckmarkStyles_unstable)(state);
41
+ }; //# sourceMappingURL=useMenuItemRadioStyles.js.map
42
+
35
43
  //# sourceMappingURL=useMenuItemRadioStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_1","require","index_1","useMenuItemStyles_1","exports","menuItemRadioClassNames","root","icon","checkmark","content","secondaryContent","useMenuItemRadioStyles_unstable","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"sources":["../src/packages/react-components/react-menu/src/components/MenuItemRadio/useMenuItemRadioStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { 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};\n\nexport const useMenuItemRadioStyles_unstable = (state: MenuItemRadioState) => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n menuItemRadioClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,OAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AAKaG,OAAA,CAAAC,uBAAuB,GAA4D;EAC9FC,IAAI,EAAE,mBAAmB;EACzBC,IAAI,EAAE,yBAAyB;EAC/BC,SAAS,EAAE,8BAA8B;EACzCC,OAAO,EAAE,4BAA4B;EACrCC,gBAAgB,EAAE;CACnB;AAEM,MAAMC,+BAA+B,GAAIC,KAAyB,IAAI;EAC3EA,KAAK,CAACN,IAAI,CAACO,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,uBAAuB,CAACC,IAAI,EAAEM,KAAK,CAACN,IAAI,CAACO,SAAS,CAAC;EAEvF,IAAID,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACI,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,uBAAuB,CAACI,OAAO,EAAEG,KAAK,CAACH,OAAO,CAACI,SAAS,CAAC;;EAGlG,IAAID,KAAK,CAACF,gBAAgB,EAAE;IAC1BE,KAAK,CAACF,gBAAgB,CAACG,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAC7CV,OAAA,CAAAC,uBAAuB,CAACK,gBAAgB,EACxCE,KAAK,CAACF,gBAAgB,CAACG,SAAS,CACjC;;EAGH,IAAID,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,uBAAuB,CAACE,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;;EAGzF,IAAID,KAAK,CAACJ,SAAS,EAAE;IACnBI,KAAK,CAACJ,SAAS,CAACK,SAAS,GAAGb,OAAA,CAAAc,YAAY,CAACV,OAAA,CAAAC,uBAAuB,CAACG,SAAS,EAAEI,KAAK,CAACJ,SAAS,CAACK,SAAS,CAAC;;EAGxGV,mBAAA,CAAAY,0BAA0B,CAACH,KAAK,CAAC;EACjCV,OAAA,CAAAc,2BAA2B,CAACJ,KAAK,CAAC;AACpC,CAAC;AAxBYR,OAAA,CAAAO,+BAA+B,GAAAA,+BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuItemRadio/useMenuItemRadioStyles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';\nexport const menuItemRadioClassNames = {\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};\nexport const useMenuItemRadioStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemRadioStyles.js.map"],"names":["menuItemRadioClassNames","useMenuItemRadioStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB,MAAvBA;IAOAC,+BAA+B,MAA/BA;;uBAVgB;uBACe;mCACD;AACpC,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,kCAAkCM,CAAAA,QAAS;IACtDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACtF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACjG,CAAC;IACD,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC5H,CAAC;IACD,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IACxF,CAAC;IACD,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IACvG,CAAC;IACDE,IAAAA,6CAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,kDAAkD"}
@@ -1,27 +1,26 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "MenuList", {
6
+ enumerable: true,
7
+ get: ()=>MenuList
5
8
  });
6
- exports.MenuList = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useMenuList_1 = /*#__PURE__*/require("./useMenuList");
9
- const renderMenuList_1 = /*#__PURE__*/require("./renderMenuList");
10
- const useMenuListContextValues_1 = /*#__PURE__*/require("./useMenuListContextValues");
11
- const useMenuListStyles_1 = /*#__PURE__*/require("./useMenuListStyles");
12
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
- /**
14
- * Define a styled MenuList, using the `useMenuList_unstable` hook.
15
- */
16
- exports.MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {
17
- const state = useMenuList_1.useMenuList_unstable(props, ref);
18
- const contextValues = useMenuListContextValues_1.useMenuListContextValues_unstable(state);
19
- useMenuListStyles_1.useMenuListStyles_unstable(state);
20
- const {
21
- useMenuListStyles_unstable: useCustomStyles
22
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
23
- useCustomStyles(state);
24
- return renderMenuList_1.renderMenuList_unstable(state, contextValues);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useMenuList = require("./useMenuList");
12
+ const _renderMenuList = require("./renderMenuList");
13
+ const _useMenuListContextValues = require("./useMenuListContextValues");
14
+ const _useMenuListStyles = require("./useMenuListStyles");
15
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
16
+ const MenuList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useMenuList.useMenuList_unstable)(props, ref);
18
+ const contextValues = (0, _useMenuListContextValues.useMenuListContextValues_unstable)(state);
19
+ (0, _useMenuListStyles.useMenuListStyles_unstable)(state);
20
+ const { useMenuListStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
21
+ useCustomStyles(state);
22
+ return (0, _renderMenuList.renderMenuList_unstable)(state, contextValues);
25
23
  });
26
- exports.MenuList.displayName = 'MenuList';
24
+ MenuList.displayName = 'MenuList'; //# sourceMappingURL=MenuList.js.map
25
+
27
26
  //# sourceMappingURL=MenuList.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useMenuList_1","renderMenuList_1","useMenuListContextValues_1","useMenuListStyles_1","react_shared_contexts_1","exports","MenuList","forwardRef","props","ref","state","useMenuList_unstable","contextValues","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderMenuList_unstable","displayName"],"sources":["../src/packages/react-components/react-menu/src/components/MenuList/MenuList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles';\nimport type { MenuListProps } from './MenuList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useMenuListStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderMenuList_unstable(state, contextValues);\n});\n\nMenuList.displayName = 'MenuList';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,gBAAA,gBAAAF,OAAA;AACA,MAAAG,0BAAA,gBAAAH,OAAA;AACA,MAAAI,mBAAA,gBAAAJ,OAAA;AAGA,MAAAK,uBAAA,gBAAAL,OAAA;AAEA;;;AAGaM,OAAA,CAAAC,QAAQ,gBAAuCR,KAAK,CAACS,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGV,aAAA,CAAAW,oBAAoB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAC9C,MAAMG,aAAa,GAAGV,0BAAA,CAAAW,iCAAiC,CAACH,KAAK,CAAC;EAE9DP,mBAAA,CAAAW,0BAA0B,CAACJ,KAAK,CAAC;EAEjC,MAAM;IAAEI,0BAA0B,EAAEC;EAAe,CAAE,GAAGX,uBAAA,CAAAY,4BAA4B,EAAE;EACtFD,eAAe,CAACL,KAAK,CAAC;EAEtB,OAAOT,gBAAA,CAAAgB,uBAAuB,CAACP,KAAK,EAAEE,aAAa,CAAC;AACtD,CAAC,CAAC;AAEFP,OAAA,CAAAC,QAAQ,CAACY,WAAW,GAAG,UAAU"}
1
+ {"version":3,"sources":["../../../lib/components/MenuList/MenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n useMenuListStyles_unstable(state);\n const {\n useMenuListStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderMenuList_unstable(state, contextValues);\n});\nMenuList.displayName = 'MenuList';\n//# sourceMappingURL=MenuList.js.map"],"names":["MenuList","React","forwardRef","props","ref","state","useMenuList_unstable","contextValues","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderMenuList_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;6BACc;gCACG;0CACU;mCACP;qCACE;AAItC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,2DAAiC,EAACH;IACxDI,IAAAA,6CAA0B,EAACJ;IAC3B,MAAM,EACJI,4BAA4BC,gBAAe,EAC5C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBL;IAChB,OAAOO,IAAAA,uCAAuB,EAACP,OAAOE;AACxC;AACAP,SAASa,WAAW,GAAG,YACvB,oCAAoC"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=MenuList.types.js.map
8
+
6
9
  //# sourceMappingURL=MenuList.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-menu/src/components/MenuList/MenuList.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuListContextValue } from '../../contexts/menuListContext';\nimport type { SelectableHandler } from '../../selectable/index';\n\nexport type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;\n\nexport type MenuCheckedValueChangeData = {\n /** The 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 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\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"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/MenuList/MenuList.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=MenuList.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,0CAA0C"}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./MenuList"), exports);
8
- tslib_1.__exportStar(require("./MenuList.types"), exports);
9
- tslib_1.__exportStar(require("./renderMenuList"), exports);
10
- tslib_1.__exportStar(require("./useMenuList"), exports);
11
- tslib_1.__exportStar(require("./useMenuListStyles"), exports);
12
- tslib_1.__exportStar(require("./useMenuListContextValues"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./MenuList"), exports);
7
+ _exportStar(require("./MenuList.types"), exports);
8
+ _exportStar(require("./renderMenuList"), exports);
9
+ _exportStar(require("./useMenuList"), exports);
10
+ _exportStar(require("./useMenuListStyles"), exports);
11
+ _exportStar(require("./useMenuListContextValues"), exports);
12
+ //# sourceMappingURL=index.js.map
13
+
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuList/index.ts"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles';\nexport * from './useMenuListContextValues';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,gBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,gCAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuList/index.js"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles';\nexport * from './useMenuListContextValues';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,25 +1,20 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderMenuList_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderMenuList_unstable
5
8
  });
6
- exports.renderMenuList_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const menuListContext_1 = /*#__PURE__*/require("../../contexts/menuListContext");
10
- /**
11
- * Function that renders the final JSX of the component
12
- */
13
- const renderMenuList_unstable = (state, contextValues) => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(menuListContext_1.MenuListProvider, {
19
- value: contextValues.menuList
20
- }, React.createElement(slots.root, {
21
- ...slotProps.root
22
- }));
23
- };
24
- exports.renderMenuList_unstable = renderMenuList_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _menuListContext = require("../../contexts/menuListContext");
13
+ const renderMenuList_unstable = (state, contextValues)=>{
14
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
15
+ return /*#__PURE__*/ _react.createElement(_menuListContext.MenuListProvider, {
16
+ value: contextValues.menuList
17
+ }, /*#__PURE__*/ _react.createElement(slots.root, slotProps.root));
18
+ }; //# sourceMappingURL=renderMenuList.js.map
19
+
25
20
  //# sourceMappingURL=renderMenuList.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","menuListContext_1","renderMenuList_unstable","state","contextValues","slots","slotProps","getSlots","createElement","MenuListProvider","value","menuList","root","exports"],"sources":["../src/packages/react-components/react-menu/src/components/MenuList/renderMenuList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuListContextValues, MenuListSlots, MenuListState } from './MenuList.types';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuList_unstable = (state: MenuListState, contextValues: MenuListContextValues) => {\n const { slots, slotProps } = getSlots<MenuListSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <slots.root {...slotProps.root} />\n </MenuListProvider>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAEA,MAAAE,iBAAA,gBAAAF,OAAA;AAEA;;;AAGO,MAAMG,uBAAuB,GAAGA,CAACC,KAAoB,EAAEC,aAAoC,KAAI;EACpG,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,iBAAA,CAAAO,QAAQ,CAAgBJ,KAAK,CAAC;EAE3D,OACEL,KAAA,CAAAU,aAAA,CAACP,iBAAA,CAAAQ,gBAAgB;IAACC,KAAK,EAAEN,aAAa,CAACO;EAAQ,GAC7Cb,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CACjB;AAEvB,CAAC;AARYC,OAAA,CAAAX,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/MenuList/renderMenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuList_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(MenuListProvider, {\n value: contextValues.menuList\n }, /*#__PURE__*/React.createElement(slots.root, slotProps.root));\n};\n//# sourceMappingURL=renderMenuList.js.map"],"names":["renderMenuList_unstable","state","contextValues","slots","slotProps","getSlots","React","createElement","MenuListProvider","value","menuList","root"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;gCACE;iCACQ;AAI1B,MAAMA,0BAA0B,CAACC,OAAOC,gBAAkB;IAC/D,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACJ;IACb,OAAO,WAAW,GAAEK,OAAMC,aAAa,CAACC,iCAAgB,EAAE;QACxDC,OAAOP,cAAcQ,QAAQ;IAC/B,GAAG,WAAW,GAAEJ,OAAMC,aAAa,CAACJ,MAAMQ,IAAI,EAAEP,UAAUO,IAAI;AAChE,GACA,0CAA0C"}
@@ -1,153 +1,159 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useMenuList_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
10
- const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
11
- const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
12
- const menuContext_2 = /*#__PURE__*/require("../../contexts/menuContext");
13
- /**
14
- * Returns the props and state required to render the component
15
- */
16
- const useMenuList_unstable = (props, ref) => {
17
- var _a, _b;
18
- const {
19
- findAllFocusable
20
- } = react_tabster_1.useFocusFinders();
21
- const menuContext = useMenuContextSelectors();
22
- const hasMenuContext = react_context_selector_1.useHasParentContext(menuContext_2.MenuContext);
23
- const focusAttributes = react_tabster_1.useArrowNavigationGroup({
24
- circular: true,
25
- ignoreDefaultKeydown: {
26
- Tab: hasMenuContext
27
- }
28
- });
29
- if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {
30
- // TODO throw warnings in development safely
31
- // eslint-disable-next-line no-console
32
- console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');
33
- }
34
- const innerRef = React.useRef(null);
35
- const setFocusByFirstCharacter = React.useCallback((e, itemEl) => {
36
- // TODO use some kind of children registration to reduce dependency on DOM roles
37
- const acceptedRoles = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];
38
- if (!innerRef.current) {
39
- return;
40
- }
41
- const menuItems = findAllFocusable(innerRef.current, el => el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1);
42
- let startIndex = menuItems.indexOf(itemEl) + 1;
43
- if (startIndex === menuItems.length) {
44
- startIndex = 0;
5
+ Object.defineProperty(exports, "useMenuList_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useMenuList_unstable
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactTabster = require("@fluentui/react-tabster");
13
+ const _reactContextSelector = require("@fluentui/react-context-selector");
14
+ const _menuContext = require("../../contexts/menuContext");
15
+ const useMenuList_unstable = (props, ref)=>{
16
+ const { findAllFocusable } = (0, _reactTabster.useFocusFinders)();
17
+ const menuContext = useMenuContextSelectors();
18
+ const hasMenuContext = (0, _reactContextSelector.useHasParentContext)(_menuContext.MenuContext);
19
+ const focusAttributes = (0, _reactTabster.useArrowNavigationGroup)({
20
+ circular: true,
21
+ ignoreDefaultKeydown: {
22
+ Tab: hasMenuContext
23
+ }
24
+ });
25
+ if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {
26
+ // TODO throw warnings in development safely
27
+ // eslint-disable-next-line no-console
28
+ console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');
45
29
  }
46
- const firstChars = menuItems.map(menuItem => {
47
- var _a;
48
- return (_a = menuItem.textContent) === null || _a === void 0 ? void 0 : _a.charAt(0).toLowerCase();
30
+ const innerRef = _react.useRef(null);
31
+ const setFocusByFirstCharacter = _react.useCallback((e, itemEl)=>{
32
+ // TODO use some kind of children registration to reduce dependency on DOM roles
33
+ const acceptedRoles = [
34
+ 'menuitem',
35
+ 'menuitemcheckbox',
36
+ 'menuitemradio'
37
+ ];
38
+ if (!innerRef.current) {
39
+ return;
40
+ }
41
+ const menuItems = findAllFocusable(innerRef.current, (el)=>el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1);
42
+ let startIndex = menuItems.indexOf(itemEl) + 1;
43
+ if (startIndex === menuItems.length) {
44
+ startIndex = 0;
45
+ }
46
+ const firstChars = menuItems.map((menuItem)=>{
47
+ var _menuItem_textContent;
48
+ return (_menuItem_textContent = menuItem.textContent) === null || _menuItem_textContent === void 0 ? void 0 : _menuItem_textContent.charAt(0).toLowerCase();
49
+ });
50
+ const char = e.key.toLowerCase();
51
+ const getIndexFirstChars = (start, firstChar)=>{
52
+ for(let i = start; i < firstChars.length; i++){
53
+ if (char === firstChars[i]) {
54
+ return i;
55
+ }
56
+ }
57
+ return -1;
58
+ };
59
+ // Check remaining slots in the menu
60
+ let index = getIndexFirstChars(startIndex, char);
61
+ // If not found in remaining slots, check from beginning
62
+ if (index === -1) {
63
+ index = getIndexFirstChars(0, char);
64
+ }
65
+ // If match was found...
66
+ if (index > -1) {
67
+ menuItems[index].focus();
68
+ }
69
+ }, [
70
+ findAllFocusable
71
+ ]);
72
+ var _props_checkedValues;
73
+ const [checkedValues, setCheckedValues] = (0, _reactUtilities.useControllableState)({
74
+ state: (_props_checkedValues = props.checkedValues) !== null && _props_checkedValues !== void 0 ? _props_checkedValues : hasMenuContext ? menuContext.checkedValues : undefined,
75
+ defaultState: props.defaultCheckedValues,
76
+ initialState: {}
49
77
  });
50
- const char = e.key.toLowerCase();
51
- const getIndexFirstChars = (start, firstChar) => {
52
- for (let i = start; i < firstChars.length; i++) {
53
- if (char === firstChars[i]) {
54
- return i;
78
+ var _props_onCheckedValueChange;
79
+ const handleCheckedValueChange = (_props_onCheckedValueChange = props.onCheckedValueChange) !== null && _props_onCheckedValueChange !== void 0 ? _props_onCheckedValueChange : hasMenuContext ? menuContext.onCheckedValueChange : undefined;
80
+ const toggleCheckbox = (0, _reactUtilities.useEventCallback)((e, name, value, checked)=>{
81
+ const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
82
+ const newCheckedItems = [
83
+ ...checkedItems
84
+ ];
85
+ if (checked) {
86
+ newCheckedItems.splice(newCheckedItems.indexOf(value), 1);
87
+ } else {
88
+ newCheckedItems.push(value);
55
89
  }
56
- }
57
- return -1;
58
- };
59
- // Check remaining slots in the menu
60
- let index = getIndexFirstChars(startIndex, char);
61
- // If not found in remaining slots, check from beginning
62
- if (index === -1) {
63
- index = getIndexFirstChars(0, char);
64
- }
65
- // If match was found...
66
- if (index > -1) {
67
- menuItems[index].focus();
68
- }
69
- }, [findAllFocusable]);
70
- const [checkedValues, setCheckedValues] = react_utilities_1.useControllableState({
71
- state: (_a = props.checkedValues) !== null && _a !== void 0 ? _a : hasMenuContext ? menuContext.checkedValues : undefined,
72
- defaultState: props.defaultCheckedValues,
73
- initialState: {}
74
- });
75
- const handleCheckedValueChange = (_b = props.onCheckedValueChange) !== null && _b !== void 0 ? _b : hasMenuContext ? menuContext.onCheckedValueChange : undefined;
76
- const toggleCheckbox = react_utilities_1.useEventCallback((e, name, value, checked) => {
77
- const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
78
- const newCheckedItems = [...checkedItems];
79
- if (checked) {
80
- newCheckedItems.splice(newCheckedItems.indexOf(value), 1);
81
- } else {
82
- newCheckedItems.push(value);
83
- }
84
- handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
85
- name,
86
- checkedItems: newCheckedItems
90
+ handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
91
+ name,
92
+ checkedItems: newCheckedItems
93
+ });
94
+ setCheckedValues((s)=>({
95
+ ...s,
96
+ [name]: newCheckedItems
97
+ }));
87
98
  });
88
- setCheckedValues(s => ({
89
- ...s,
90
- [name]: newCheckedItems
91
- }));
92
- });
93
- const selectRadio = react_utilities_1.useEventCallback((e, name, value) => {
94
- const newCheckedItems = [value];
95
- setCheckedValues(s => ({
96
- ...s,
97
- [name]: newCheckedItems
98
- }));
99
- handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
100
- name,
101
- checkedItems: newCheckedItems
99
+ const selectRadio = (0, _reactUtilities.useEventCallback)((e, name, value)=>{
100
+ const newCheckedItems = [
101
+ value
102
+ ];
103
+ setCheckedValues((s)=>({
104
+ ...s,
105
+ [name]: newCheckedItems
106
+ }));
107
+ handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
108
+ name,
109
+ checkedItems: newCheckedItems
110
+ });
102
111
  });
103
- });
104
- return {
105
- components: {
106
- root: 'div'
107
- },
108
- root: react_utilities_1.getNativeElementProps('div', {
109
- ref: react_utilities_1.useMergedRefs(ref, innerRef),
110
- role: 'menu',
111
- 'aria-labelledby': menuContext.triggerId,
112
- ...focusAttributes,
113
- ...props
114
- }),
115
- hasIcons: menuContext.hasIcons || false,
116
- hasCheckmarks: menuContext.hasCheckmarks || false,
117
- checkedValues,
118
- setFocusByFirstCharacter,
119
- selectRadio,
120
- toggleCheckbox
121
- };
112
+ return {
113
+ components: {
114
+ root: 'div'
115
+ },
116
+ root: (0, _reactUtilities.getNativeElementProps)('div', {
117
+ ref: (0, _reactUtilities.useMergedRefs)(ref, innerRef),
118
+ role: 'menu',
119
+ 'aria-labelledby': menuContext.triggerId,
120
+ ...focusAttributes,
121
+ ...props
122
+ }),
123
+ hasIcons: menuContext.hasIcons || false,
124
+ hasCheckmarks: menuContext.hasCheckmarks || false,
125
+ checkedValues,
126
+ setFocusByFirstCharacter,
127
+ selectRadio,
128
+ toggleCheckbox
129
+ };
122
130
  };
123
- exports.useMenuList_unstable = useMenuList_unstable;
124
131
  /**
125
132
  * Adds some sugar to fetching multiple context selector values
126
- */
127
- const useMenuContextSelectors = () => {
128
- const checkedValues = menuContext_1.useMenuContext_unstable(context => context.checkedValues);
129
- const onCheckedValueChange = menuContext_1.useMenuContext_unstable(context => context.onCheckedValueChange);
130
- const triggerId = menuContext_1.useMenuContext_unstable(context => context.triggerId);
131
- const hasIcons = menuContext_1.useMenuContext_unstable(context => context.hasIcons);
132
- const hasCheckmarks = menuContext_1.useMenuContext_unstable(context => context.hasCheckmarks);
133
- return {
134
- checkedValues,
135
- onCheckedValueChange,
136
- triggerId,
137
- hasIcons,
138
- hasCheckmarks
139
- };
133
+ */ const useMenuContextSelectors = ()=>{
134
+ const checkedValues = (0, _menuContext.useMenuContext_unstable)((context)=>context.checkedValues);
135
+ const onCheckedValueChange = (0, _menuContext.useMenuContext_unstable)((context)=>context.onCheckedValueChange);
136
+ const triggerId = (0, _menuContext.useMenuContext_unstable)((context)=>context.triggerId);
137
+ const hasIcons = (0, _menuContext.useMenuContext_unstable)((context)=>context.hasIcons);
138
+ const hasCheckmarks = (0, _menuContext.useMenuContext_unstable)((context)=>context.hasCheckmarks);
139
+ return {
140
+ checkedValues,
141
+ onCheckedValueChange,
142
+ triggerId,
143
+ hasIcons,
144
+ hasCheckmarks
145
+ };
140
146
  };
141
147
  /**
142
148
  * Helper function to detect if props and MenuContext values are both used
143
- */
144
- const usingPropsAndMenuContext = (props, contextValue, hasMenuContext) => {
145
- let isUsingPropsAndContext = false;
146
- for (const val in contextValue) {
147
- if (props[val]) {
148
- isUsingPropsAndContext = true;
149
+ */ const usingPropsAndMenuContext = (props, contextValue, hasMenuContext)=>{
150
+ let isUsingPropsAndContext = false;
151
+ for(const val in contextValue){
152
+ if (props[val]) {
153
+ isUsingPropsAndContext = true;
154
+ }
149
155
  }
150
- }
151
- return hasMenuContext && isUsingPropsAndContext;
152
- };
156
+ return hasMenuContext && isUsingPropsAndContext;
157
+ }; //# sourceMappingURL=useMenuList.js.map
158
+
153
159
  //# sourceMappingURL=useMenuList.js.map