@fluentui/react-menu 9.7.4 → 9.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +94 -1
  3. package/CHANGELOG.md +24 -2
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuDivider.js.map +1 -1
  6. package/lib/MenuGroup.js.map +1 -1
  7. package/lib/MenuGroupHeader.js.map +1 -1
  8. package/lib/MenuItem.js.map +1 -1
  9. package/lib/MenuItemCheckbox.js.map +1 -1
  10. package/lib/MenuItemRadio.js.map +1 -1
  11. package/lib/MenuList.js.map +1 -1
  12. package/lib/MenuPopover.js.map +1 -1
  13. package/lib/MenuSplitGroup.js.map +1 -1
  14. package/lib/MenuTrigger.js.map +1 -1
  15. package/lib/components/Menu/Menu.js +1 -0
  16. package/lib/components/Menu/Menu.js.map +1 -1
  17. package/lib/components/Menu/Menu.types.js +1 -1
  18. package/lib/components/Menu/Menu.types.js.map +1 -1
  19. package/lib/components/Menu/index.js.map +1 -1
  20. package/lib/components/Menu/renderMenu.js.map +1 -1
  21. package/lib/components/Menu/useMenu.js +9 -8
  22. package/lib/components/Menu/useMenu.js.map +1 -1
  23. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  24. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  25. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  26. package/lib/components/MenuDivider/index.js.map +1 -1
  27. package/lib/components/MenuDivider/renderMenuDivider.js +1 -3
  28. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  29. package/lib/components/MenuDivider/useMenuDivider.js +1 -0
  30. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  31. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  32. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  33. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  34. package/lib/components/MenuGroup/index.js.map +1 -1
  35. package/lib/components/MenuGroup/renderMenuGroup.js +1 -3
  36. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  37. package/lib/components/MenuGroup/useMenuGroup.js +1 -0
  38. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  39. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  40. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  41. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  43. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  44. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
  45. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  46. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -0
  47. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  48. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  49. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  50. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  51. package/lib/components/MenuItem/index.js.map +1 -1
  52. package/lib/components/MenuItem/renderMenuItem.js +1 -13
  53. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  54. package/lib/components/MenuItem/useCharacterSearch.js +3 -2
  55. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  56. package/lib/components/MenuItem/useMenuItem.js +7 -7
  57. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  58. package/lib/components/MenuItem/useMenuItemStyles.js +15 -2
  59. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  60. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  61. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  62. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  63. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -11
  64. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  65. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  66. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  67. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  68. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  69. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  70. package/lib/components/MenuItemRadio/index.js.map +1 -1
  71. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -11
  72. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  73. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  74. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  75. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  76. package/lib/components/MenuList/MenuList.js.map +1 -1
  77. package/lib/components/MenuList/MenuList.types.js +1 -1
  78. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  79. package/lib/components/MenuList/index.js.map +1 -1
  80. package/lib/components/MenuList/renderMenuList.js +1 -3
  81. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  82. package/lib/components/MenuList/useMenuList.js +6 -5
  83. package/lib/components/MenuList/useMenuList.js.map +1 -1
  84. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  85. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  86. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  87. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  88. package/lib/components/MenuPopover/index.js.map +1 -1
  89. package/lib/components/MenuPopover/renderMenuPopover.js +2 -6
  90. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  91. package/lib/components/MenuPopover/useMenuPopover.js +4 -4
  92. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  93. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  94. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  95. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  96. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  97. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
  98. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  99. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -2
  100. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  101. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  102. package/lib/components/MenuTrigger/MenuTrigger.js +1 -0
  103. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  104. package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
  105. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  106. package/lib/components/MenuTrigger/index.js.map +1 -1
  107. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  108. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  109. package/lib/components/index.js.map +1 -1
  110. package/lib/contexts/menuContext.js +1 -0
  111. package/lib/contexts/menuContext.js.map +1 -1
  112. package/lib/contexts/menuGroupContext.js +2 -4
  113. package/lib/contexts/menuGroupContext.js.map +1 -1
  114. package/lib/contexts/menuListContext.js +1 -0
  115. package/lib/contexts/menuListContext.js.map +1 -1
  116. package/lib/contexts/menuTriggerContext.js +2 -4
  117. package/lib/contexts/menuTriggerContext.js.map +1 -1
  118. package/lib/index.js.map +1 -1
  119. package/lib/selectable/index.js.map +1 -1
  120. package/lib/selectable/types.js +1 -1
  121. package/lib/selectable/types.js.map +1 -1
  122. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  123. package/lib/utils/index.js.map +1 -1
  124. package/lib/utils/useIsSubmenu.js.map +1 -1
  125. package/lib/utils/useOnMenuEnter.js +2 -2
  126. package/lib/utils/useOnMenuEnter.js.map +1 -1
  127. package/lib-commonjs/Menu.js +5 -4
  128. package/lib-commonjs/Menu.js.map +1 -1
  129. package/lib-commonjs/MenuDivider.js +5 -4
  130. package/lib-commonjs/MenuDivider.js.map +1 -1
  131. package/lib-commonjs/MenuGroup.js +5 -4
  132. package/lib-commonjs/MenuGroup.js.map +1 -1
  133. package/lib-commonjs/MenuGroupHeader.js +5 -4
  134. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  135. package/lib-commonjs/MenuItem.js +5 -4
  136. package/lib-commonjs/MenuItem.js.map +1 -1
  137. package/lib-commonjs/MenuItemCheckbox.js +5 -4
  138. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  139. package/lib-commonjs/MenuItemRadio.js +5 -4
  140. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  141. package/lib-commonjs/MenuList.js +5 -4
  142. package/lib-commonjs/MenuList.js.map +1 -1
  143. package/lib-commonjs/MenuPopover.js +5 -4
  144. package/lib-commonjs/MenuPopover.js.map +1 -1
  145. package/lib-commonjs/MenuSplitGroup.js +5 -4
  146. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  147. package/lib-commonjs/MenuTrigger.js +5 -4
  148. package/lib-commonjs/MenuTrigger.js.map +1 -1
  149. package/lib-commonjs/components/Menu/Menu.js +16 -15
  150. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  151. package/lib-commonjs/components/Menu/Menu.types.js +5 -2
  152. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  153. package/lib-commonjs/components/Menu/index.js +9 -8
  154. package/lib-commonjs/components/Menu/index.js.map +1 -1
  155. package/lib-commonjs/components/Menu/renderMenu.js +14 -14
  156. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  157. package/lib-commonjs/components/Menu/useMenu.js +258 -256
  158. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  159. package/lib-commonjs/components/Menu/useMenuContextValues.js +29 -43
  160. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  161. package/lib-commonjs/components/MenuDivider/MenuDivider.js +19 -20
  162. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  163. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +3 -2
  164. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  165. package/lib-commonjs/components/MenuDivider/index.js +9 -8
  166. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +13 -19
  168. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  169. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +22 -21
  170. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  171. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +47 -25
  172. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  173. package/lib-commonjs/components/MenuGroup/MenuGroup.js +21 -22
  174. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  175. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +3 -2
  176. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroup/index.js +10 -9
  178. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  179. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +16 -22
  180. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  181. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +23 -22
  182. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  183. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +18 -15
  184. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  185. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +19 -11
  186. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  187. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +19 -20
  188. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  189. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +3 -2
  190. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  191. package/lib-commonjs/components/MenuGroupHeader/index.js +9 -8
  192. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  193. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +13 -19
  194. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  195. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +22 -23
  196. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  197. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +47 -25
  198. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  199. package/lib-commonjs/components/MenuItem/MenuItem.js +19 -20
  200. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  201. package/lib-commonjs/components/MenuItem/MenuItem.types.js +3 -2
  202. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  203. package/lib-commonjs/components/MenuItem/index.js +9 -8
  204. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  205. package/lib-commonjs/components/MenuItem/renderMenuItem.js +13 -28
  206. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  207. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +24 -22
  208. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  209. package/lib-commonjs/components/MenuItem/useMenuItem.js +97 -104
  210. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  211. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +318 -137
  212. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  213. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +19 -20
  214. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  215. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -2
  216. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  217. package/lib-commonjs/components/MenuItemCheckbox/index.js +9 -8
  218. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  219. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +13 -24
  220. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  221. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +44 -45
  222. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  223. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +38 -30
  224. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  225. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +19 -20
  226. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  227. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +3 -2
  228. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  229. package/lib-commonjs/components/MenuItemRadio/index.js +9 -8
  230. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  231. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +13 -27
  232. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  233. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +42 -45
  234. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +38 -30
  236. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  237. package/lib-commonjs/components/MenuList/MenuList.js +21 -22
  238. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  239. package/lib-commonjs/components/MenuList/MenuList.types.js +5 -2
  240. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  241. package/lib-commonjs/components/MenuList/index.js +10 -9
  242. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  243. package/lib-commonjs/components/MenuList/renderMenuList.js +16 -21
  244. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  245. package/lib-commonjs/components/MenuList/useMenuList.js +143 -137
  246. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  247. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +20 -25
  248. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  249. package/lib-commonjs/components/MenuList/useMenuListStyles.js +33 -23
  250. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  251. package/lib-commonjs/components/MenuPopover/MenuPopover.js +19 -20
  252. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  253. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -2
  254. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  255. package/lib-commonjs/components/MenuPopover/index.js +9 -8
  256. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  257. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +19 -26
  258. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  259. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +102 -110
  260. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  261. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +121 -50
  262. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  263. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +19 -20
  264. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  265. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -2
  266. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  267. package/lib-commonjs/components/MenuSplitGroup/index.js +9 -8
  268. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  269. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +13 -18
  270. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  271. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +58 -64
  272. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  273. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +61 -32
  274. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +15 -15
  276. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  277. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +5 -2
  278. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  279. package/lib-commonjs/components/MenuTrigger/index.js +8 -7
  280. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  281. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +14 -16
  282. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  283. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +163 -170
  284. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  285. package/lib-commonjs/components/index.js +6 -5
  286. package/lib-commonjs/components/index.js.map +1 -1
  287. package/lib-commonjs/contexts/menuContext.js +38 -27
  288. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  289. package/lib-commonjs/contexts/menuGroupContext.js +19 -12
  290. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  291. package/lib-commonjs/contexts/menuListContext.js +25 -14
  292. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  293. package/lib-commonjs/contexts/menuTriggerContext.js +18 -12
  294. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  295. package/lib-commonjs/index.js +91 -399
  296. package/lib-commonjs/index.js.map +1 -1
  297. package/lib-commonjs/selectable/index.js +6 -5
  298. package/lib-commonjs/selectable/index.js.map +1 -1
  299. package/lib-commonjs/selectable/types.js +5 -2
  300. package/lib-commonjs/selectable/types.js.map +1 -1
  301. package/lib-commonjs/selectable/useCheckmarkStyles.js +28 -26
  302. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  303. package/lib-commonjs/utils/index.js +5 -4
  304. package/lib-commonjs/utils/index.js.map +1 -1
  305. package/lib-commonjs/utils/useIsSubmenu.js +13 -19
  306. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  307. package/lib-commonjs/utils/useOnMenuEnter.js +57 -68
  308. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  309. package/package.json +15 -14
  310. package/lib-amd/Menu.js +0 -6
  311. package/lib-amd/Menu.js.map +0 -1
  312. package/lib-amd/MenuDivider.js +0 -6
  313. package/lib-amd/MenuDivider.js.map +0 -1
  314. package/lib-amd/MenuGroup.js +0 -6
  315. package/lib-amd/MenuGroup.js.map +0 -1
  316. package/lib-amd/MenuGroupHeader.js +0 -6
  317. package/lib-amd/MenuGroupHeader.js.map +0 -1
  318. package/lib-amd/MenuItem.js +0 -6
  319. package/lib-amd/MenuItem.js.map +0 -1
  320. package/lib-amd/MenuItemCheckbox.js +0 -6
  321. package/lib-amd/MenuItemCheckbox.js.map +0 -1
  322. package/lib-amd/MenuItemRadio.js +0 -6
  323. package/lib-amd/MenuItemRadio.js.map +0 -1
  324. package/lib-amd/MenuList.js +0 -6
  325. package/lib-amd/MenuList.js.map +0 -1
  326. package/lib-amd/MenuPopover.js +0 -6
  327. package/lib-amd/MenuPopover.js.map +0 -1
  328. package/lib-amd/MenuSplitGroup.js +0 -6
  329. package/lib-amd/MenuSplitGroup.js.map +0 -1
  330. package/lib-amd/MenuTrigger.js +0 -6
  331. package/lib-amd/MenuTrigger.js.map +0 -1
  332. package/lib-amd/components/Menu/Menu.js +0 -16
  333. package/lib-amd/components/Menu/Menu.js.map +0 -1
  334. package/lib-amd/components/Menu/Menu.types.js +0 -5
  335. package/lib-amd/components/Menu/Menu.types.js.map +0 -1
  336. package/lib-amd/components/Menu/index.js +0 -10
  337. package/lib-amd/components/Menu/index.js.map +0 -1
  338. package/lib-amd/components/Menu/renderMenu.js +0 -15
  339. package/lib-amd/components/Menu/renderMenu.js.map +0 -1
  340. package/lib-amd/components/Menu/useMenu.js +0 -224
  341. package/lib-amd/components/Menu/useMenu.js.map +0 -1
  342. package/lib-amd/components/Menu/useMenuContextValues.js +0 -29
  343. package/lib-amd/components/Menu/useMenuContextValues.js.map +0 -1
  344. package/lib-amd/components/MenuDivider/MenuDivider.js +0 -17
  345. package/lib-amd/components/MenuDivider/MenuDivider.js.map +0 -1
  346. package/lib-amd/components/MenuDivider/MenuDivider.types.js +0 -5
  347. package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +0 -1
  348. package/lib-amd/components/MenuDivider/index.js +0 -10
  349. package/lib-amd/components/MenuDivider/index.js.map +0 -1
  350. package/lib-amd/components/MenuDivider/renderMenuDivider.js +0 -15
  351. package/lib-amd/components/MenuDivider/renderMenuDivider.js.map +0 -1
  352. package/lib-amd/components/MenuDivider/useMenuDivider.js +0 -18
  353. package/lib-amd/components/MenuDivider/useMenuDivider.js.map +0 -1
  354. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js +0 -18
  355. package/lib-amd/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
  356. package/lib-amd/components/MenuGroup/MenuGroup.js +0 -18
  357. package/lib-amd/components/MenuGroup/MenuGroup.js.map +0 -1
  358. package/lib-amd/components/MenuGroup/MenuGroup.types.js +0 -5
  359. package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +0 -1
  360. package/lib-amd/components/MenuGroup/index.js +0 -11
  361. package/lib-amd/components/MenuGroup/index.js.map +0 -1
  362. package/lib-amd/components/MenuGroup/renderMenuGroup.js +0 -16
  363. package/lib-amd/components/MenuGroup/renderMenuGroup.js.map +0 -1
  364. package/lib-amd/components/MenuGroup/useMenuGroup.js +0 -20
  365. package/lib-amd/components/MenuGroup/useMenuGroup.js.map +0 -1
  366. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js +0 -12
  367. package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js.map +0 -1
  368. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js +0 -14
  369. package/lib-amd/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
  370. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -17
  371. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +0 -1
  372. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -5
  373. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +0 -1
  374. package/lib-amd/components/MenuGroupHeader/index.js +0 -10
  375. package/lib-amd/components/MenuGroupHeader/index.js.map +0 -1
  376. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js +0 -15
  377. package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js.map +0 -1
  378. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js +0 -19
  379. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js.map +0 -1
  380. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -27
  381. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
  382. package/lib-amd/components/MenuItem/MenuItem.js +0 -17
  383. package/lib-amd/components/MenuItem/MenuItem.js.map +0 -1
  384. package/lib-amd/components/MenuItem/MenuItem.types.js +0 -5
  385. package/lib-amd/components/MenuItem/MenuItem.types.js.map +0 -1
  386. package/lib-amd/components/MenuItem/index.js +0 -10
  387. package/lib-amd/components/MenuItem/index.js.map +0 -1
  388. package/lib-amd/components/MenuItem/renderMenuItem.js +0 -19
  389. package/lib-amd/components/MenuItem/renderMenuItem.js.map +0 -1
  390. package/lib-amd/components/MenuItem/useCharacterSearch.js +0 -22
  391. package/lib-amd/components/MenuItem/useCharacterSearch.js.map +0 -1
  392. package/lib-amd/components/MenuItem/useMenuItem.js +0 -75
  393. package/lib-amd/components/MenuItem/useMenuItem.js.map +0 -1
  394. package/lib-amd/components/MenuItem/useMenuItemStyles.js +0 -109
  395. package/lib-amd/components/MenuItem/useMenuItemStyles.js.map +0 -1
  396. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -17
  397. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +0 -1
  398. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -5
  399. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +0 -1
  400. package/lib-amd/components/MenuItemCheckbox/index.js +0 -10
  401. package/lib-amd/components/MenuItemCheckbox/index.js.map +0 -1
  402. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js +0 -16
  403. package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +0 -1
  404. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js +0 -26
  405. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +0 -1
  406. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -31
  407. package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
  408. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -17
  409. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +0 -1
  410. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js +0 -5
  411. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +0 -1
  412. package/lib-amd/components/MenuItemRadio/index.js +0 -10
  413. package/lib-amd/components/MenuItemRadio/index.js.map +0 -1
  414. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js +0 -19
  415. package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js.map +0 -1
  416. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js +0 -27
  417. package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js.map +0 -1
  418. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -31
  419. package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
  420. package/lib-amd/components/MenuList/MenuList.js +0 -18
  421. package/lib-amd/components/MenuList/MenuList.js.map +0 -1
  422. package/lib-amd/components/MenuList/MenuList.types.js +0 -5
  423. package/lib-amd/components/MenuList/MenuList.types.js.map +0 -1
  424. package/lib-amd/components/MenuList/index.js +0 -11
  425. package/lib-amd/components/MenuList/index.js.map +0 -1
  426. package/lib-amd/components/MenuList/renderMenuList.js +0 -15
  427. package/lib-amd/components/MenuList/renderMenuList.js.map +0 -1
  428. package/lib-amd/components/MenuList/useMenuList.js +0 -125
  429. package/lib-amd/components/MenuList/useMenuList.js.map +0 -1
  430. package/lib-amd/components/MenuList/useMenuListContextValues.js +0 -20
  431. package/lib-amd/components/MenuList/useMenuListContextValues.js.map +0 -1
  432. package/lib-amd/components/MenuList/useMenuListStyles.js +0 -21
  433. package/lib-amd/components/MenuList/useMenuListStyles.js.map +0 -1
  434. package/lib-amd/components/MenuPopover/MenuPopover.js +0 -17
  435. package/lib-amd/components/MenuPopover/MenuPopover.js.map +0 -1
  436. package/lib-amd/components/MenuPopover/MenuPopover.types.js +0 -5
  437. package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +0 -1
  438. package/lib-amd/components/MenuPopover/index.js +0 -10
  439. package/lib-amd/components/MenuPopover/index.js.map +0 -1
  440. package/lib-amd/components/MenuPopover/renderMenuPopover.js +0 -18
  441. package/lib-amd/components/MenuPopover/renderMenuPopover.js.map +0 -1
  442. package/lib-amd/components/MenuPopover/useMenuPopover.js +0 -83
  443. package/lib-amd/components/MenuPopover/useMenuPopover.js.map +0 -1
  444. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -21
  445. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
  446. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js +0 -17
  447. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js.map +0 -1
  448. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -5
  449. package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js.map +0 -1
  450. package/lib-amd/components/MenuSplitGroup/index.js +0 -10
  451. package/lib-amd/components/MenuSplitGroup/index.js.map +0 -1
  452. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js +0 -14
  453. package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js.map +0 -1
  454. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js +0 -47
  455. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js.map +0 -1
  456. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js +0 -43
  457. package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
  458. package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -18
  459. package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +0 -1
  460. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js +0 -5
  461. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +0 -1
  462. package/lib-amd/components/MenuTrigger/index.js +0 -9
  463. package/lib-amd/components/MenuTrigger/index.js.map +0 -1
  464. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -15
  465. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +0 -1
  466. package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -112
  467. package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +0 -1
  468. package/lib-amd/components/index.js +0 -7
  469. package/lib-amd/components/index.js.map +0 -1
  470. package/lib-amd/contexts/menuContext.js +0 -32
  471. package/lib-amd/contexts/menuContext.js.map +0 -1
  472. package/lib-amd/contexts/menuGroupContext.js +0 -13
  473. package/lib-amd/contexts/menuGroupContext.js.map +0 -1
  474. package/lib-amd/contexts/menuListContext.js +0 -23
  475. package/lib-amd/contexts/menuListContext.js.map +0 -1
  476. package/lib-amd/contexts/menuTriggerContext.js +0 -14
  477. package/lib-amd/contexts/menuTriggerContext.js.map +0 -1
  478. package/lib-amd/index.js +0 -69
  479. package/lib-amd/index.js.map +0 -1
  480. package/lib-amd/selectable/index.js +0 -7
  481. package/lib-amd/selectable/index.js.map +0 -1
  482. package/lib-amd/selectable/types.js +0 -5
  483. package/lib-amd/selectable/types.js.map +0 -1
  484. package/lib-amd/selectable/useCheckmarkStyles.js +0 -28
  485. package/lib-amd/selectable/useCheckmarkStyles.js.map +0 -1
  486. package/lib-amd/utils/index.js +0 -6
  487. package/lib-amd/utils/index.js.map +0 -1
  488. package/lib-amd/utils/useIsSubmenu.js +0 -20
  489. package/lib-amd/utils/useIsSubmenu.js.map +0 -1
  490. package/lib-amd/utils/useOnMenuEnter.js +0 -59
  491. package/lib-amd/utils/useOnMenuEnter.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"menuGroupContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;IAEA,IAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAC1C,SAAS,CAC8B,CAAC;IAE1C,IAAM,4BAA4B,GAA0B;QAC1D,QAAQ,EAAE,EAAE;KACb,CAAC;IAaW,QAAA,wBAAwB,GAAG,gBAAgB,CAAC,QAAQ,CAAC;IAC3D,IAAM,4BAA4B,GAAG,sBAAM,OAAA,MAAA,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,mCAAI,4BAA4B,CAAA,EAAA,CAAC;IAAxG,QAAA,4BAA4B,gCAA4E","sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue | undefined>(\n undefined,\n) as React.Context<MenuGroupContextValue>;\n\nconst menuGroupContextDefaultValue: MenuGroupContextValue = {\n headerId: '',\n};\n\n/**\n * Context used to guarantee correct aria-relationship between header\n * and group information\n */\nexport type MenuGroupContextValue = {\n /**\n * Element id applied to the `MenuGroupHeader` component\n */\n headerId: string;\n};\n\nexport const MenuGroupContextProvider = MenuGroupContext.Provider;\nexport const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext) ?? menuGroupContextDefaultValue;\n"]}
@@ -1,23 +0,0 @@
1
- define(["require", "exports", "@fluentui/react-context-selector"], function (require, exports, react_context_selector_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useMenuListContext_unstable = exports.MenuListProvider = exports.MenuListContext = void 0;
5
- exports.MenuListContext = react_context_selector_1.createContext(undefined);
6
- var menuListContextDefaultValue = {
7
- checkedValues: {},
8
- setFocusByFirstCharacter: function () { return null; },
9
- toggleCheckbox: function () { return null; },
10
- selectRadio: function () { return null; },
11
- hasIcons: false,
12
- hasCheckmarks: false,
13
- };
14
- exports.MenuListProvider = exports.MenuListContext.Provider;
15
- var useMenuListContext_unstable = function (selector) {
16
- return react_context_selector_1.useContextSelector(exports.MenuListContext, function (ctx) {
17
- if (ctx === void 0) { ctx = menuListContextDefaultValue; }
18
- return selector(ctx);
19
- });
20
- };
21
- exports.useMenuListContext_unstable = useMenuListContext_unstable;
22
- });
23
- //# sourceMappingURL=menuListContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menuListContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuListContext.tsx"],"names":[],"mappings":";;;;IAMa,QAAA,eAAe,GAAkC,sCAAa,CACzE,SAAS,CACuB,CAAC;IAEnC,IAAM,2BAA2B,GAAyB;QACxD,aAAa,EAAE,EAAE;QACjB,wBAAwB,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QACpC,cAAc,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QAC1B,WAAW,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QACvB,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC;IAqBW,QAAA,gBAAgB,GAAG,uBAAe,CAAC,QAAQ,CAAC;IAElD,IAAM,2BAA2B,GAAG,UAAK,QAAkD;QAChG,OAAA,2CAAkB,CAAC,uBAAe,EAAE,UAAC,GAAiC;YAAjC,oBAAA,EAAA,iCAAiC;YAAK,OAAA,QAAQ,CAAC,GAAG,CAAC;QAAb,CAAa,CAAC;IAAzF,CAAyF,CAAC;IAD/E,QAAA,2BAA2B,+BACoD","sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { SelectableHandler } from '../selectable/index';\nimport type { MenuCheckedValueChangeData, MenuCheckedValueChangeEvent, MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue | undefined>(\n undefined,\n) as Context<MenuListContextValue>;\n\nconst menuListContextDefaultValue: MenuListContextValue = {\n checkedValues: {},\n setFocusByFirstCharacter: () => null,\n toggleCheckbox: () => null,\n selectRadio: () => null,\n hasIcons: false,\n hasCheckmarks: false,\n};\n\n/**\n * Context shared between MenuList and its children components\n */\nexport type MenuListContextValue = Pick<MenuListProps, 'checkedValues' | 'hasIcons' | 'hasCheckmarks'> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\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 * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, (ctx = menuListContextDefaultValue) => selector(ctx));\n"]}
@@ -1,14 +0,0 @@
1
- define(["require", "exports", "react"], function (require, exports, React) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = void 0;
5
- /**
6
- * Context used communicate with a child menu item that it is a trigger for a submenu
7
- */
8
- var MenuTriggerContext = React.createContext(undefined);
9
- var menuTriggerContextDefaultValue = false;
10
- exports.MenuTriggerContextProvider = MenuTriggerContext.Provider;
11
- var useMenuTriggerContext_unstable = function () { var _a; return (_a = React.useContext(MenuTriggerContext)) !== null && _a !== void 0 ? _a : menuTriggerContextDefaultValue; };
12
- exports.useMenuTriggerContext_unstable = useMenuTriggerContext_unstable;
13
- });
14
- //# sourceMappingURL=menuTriggerContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menuTriggerContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;IAEA;;OAEG;IACH,IAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAsB,SAAS,CAA2B,CAAC;IAEzG,IAAM,8BAA8B,GAAG,KAAK,CAAC;IAEhC,QAAA,0BAA0B,GAAG,kBAAkB,CAAC,QAAQ,CAAC;IAC/D,IAAM,8BAA8B,GAAG,sBAC5C,OAAA,MAAA,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,mCAAI,8BAA8B,CAAA,EAAA,CAAC;IAD5D,QAAA,8BAA8B,kCAC8B","sourcesContent":["import * as React from 'react';\n\n/**\n * Context used communicate with a child menu item that it is a trigger for a submenu\n */\nconst MenuTriggerContext = React.createContext<boolean | undefined>(undefined) as React.Context<boolean>;\n\nconst menuTriggerContextDefaultValue = false;\n\nexport const MenuTriggerContextProvider = MenuTriggerContext.Provider;\nexport const useMenuTriggerContext_unstable = () =>\n React.useContext(MenuTriggerContext) ?? menuTriggerContextDefaultValue;\n"]}
package/lib-amd/index.js DELETED
@@ -1,69 +0,0 @@
1
- define(["require", "exports", "./contexts/menuContext", "./contexts/menuTriggerContext", "./contexts/menuGroupContext", "./contexts/menuListContext", "./Menu", "./MenuDivider", "./MenuGroup", "./MenuGroupHeader", "./MenuItem", "./MenuItemCheckbox", "./MenuItemRadio", "./MenuList", "./MenuPopover", "./MenuSplitGroup", "./MenuTrigger", "./selectable/index"], function (require, exports, menuContext_1, menuTriggerContext_1, menuGroupContext_1, menuListContext_1, Menu_1, MenuDivider_1, MenuGroup_1, MenuGroupHeader_1, MenuItem_1, MenuItemCheckbox_1, MenuItemRadio_1, MenuList_1, MenuPopover_1, MenuSplitGroup_1, MenuTrigger_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useCheckmarkStyles_unstable = exports.useMenuTrigger_unstable = exports.renderMenuTrigger_unstable = exports.MenuTrigger = exports.useMenuSplitGroup_unstable = exports.useMenuSplitGroupStyles_unstable = exports.renderMenuSplitGroup_unstable = exports.menuSplitGroupClassNames = exports.MenuSplitGroup = exports.useMenuPopover_unstable = exports.useMenuPopoverStyles_unstable = exports.renderMenuPopover_unstable = exports.menuPopoverClassNames = exports.MenuPopover = exports.useMenuList_unstable = exports.useMenuListStyles_unstable = exports.useMenuListContextValues_unstable = exports.renderMenuList_unstable = exports.menuListClassNames = exports.MenuList = exports.useMenuItemRadio_unstable = exports.useMenuItemRadioStyles_unstable = exports.renderMenuItemRadio_unstable = exports.menuItemRadioClassNames = exports.MenuItemRadio = exports.useMenuItemCheckbox_unstable = exports.useMenuItemCheckboxStyles_unstable = exports.renderMenuItemCheckbox_unstable = exports.menuItemCheckboxClassNames = exports.MenuItemCheckbox = exports.useMenuItem_unstable = exports.useMenuItemStyles_unstable = exports.renderMenuItem_unstable = exports.menuItemClassNames = exports.MenuItem = exports.useMenuGroupHeader_unstable = exports.useMenuGroupHeaderStyles_unstable = exports.renderMenuGroupHeader_unstable = exports.menuGroupHeaderClassNames = exports.MenuGroupHeader = exports.useMenuGroup_unstable = exports.useMenuGroupStyles_unstable = exports.useMenuGroupContextValues_unstable = exports.renderMenuGroup_unstable = exports.menuGroupClassNames = exports.MenuGroup = exports.useMenuDivider_unstable = exports.useMenuDividerStyles_unstable = exports.renderMenuDivider_unstable = exports.menuDividerClassNames = exports.MenuDivider = exports.useMenu_unstable = exports.useMenuContextValues_unstable = exports.renderMenu_unstable = exports.Menu = exports.useMenuListContext_unstable = exports.MenuListProvider = exports.useMenuGroupContext_unstable = exports.MenuGroupContextProvider = exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = exports.useMenuContext_unstable = exports.MenuProvider = void 0;
5
- Object.defineProperty(exports, "MenuProvider", { enumerable: true, get: function () { return menuContext_1.MenuProvider; } });
6
- Object.defineProperty(exports, "useMenuContext_unstable", { enumerable: true, get: function () { return menuContext_1.useMenuContext_unstable; } });
7
- Object.defineProperty(exports, "MenuTriggerContextProvider", { enumerable: true, get: function () { return menuTriggerContext_1.MenuTriggerContextProvider; } });
8
- Object.defineProperty(exports, "useMenuTriggerContext_unstable", { enumerable: true, get: function () { return menuTriggerContext_1.useMenuTriggerContext_unstable; } });
9
- Object.defineProperty(exports, "MenuGroupContextProvider", { enumerable: true, get: function () { return menuGroupContext_1.MenuGroupContextProvider; } });
10
- Object.defineProperty(exports, "useMenuGroupContext_unstable", { enumerable: true, get: function () { return menuGroupContext_1.useMenuGroupContext_unstable; } });
11
- Object.defineProperty(exports, "MenuListProvider", { enumerable: true, get: function () { return menuListContext_1.MenuListProvider; } });
12
- Object.defineProperty(exports, "useMenuListContext_unstable", { enumerable: true, get: function () { return menuListContext_1.useMenuListContext_unstable; } });
13
- Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return Menu_1.Menu; } });
14
- Object.defineProperty(exports, "renderMenu_unstable", { enumerable: true, get: function () { return Menu_1.renderMenu_unstable; } });
15
- Object.defineProperty(exports, "useMenuContextValues_unstable", { enumerable: true, get: function () { return Menu_1.useMenuContextValues_unstable; } });
16
- Object.defineProperty(exports, "useMenu_unstable", { enumerable: true, get: function () { return Menu_1.useMenu_unstable; } });
17
- Object.defineProperty(exports, "MenuDivider", { enumerable: true, get: function () { return MenuDivider_1.MenuDivider; } });
18
- Object.defineProperty(exports, "menuDividerClassNames", { enumerable: true, get: function () { return MenuDivider_1.menuDividerClassNames; } });
19
- Object.defineProperty(exports, "renderMenuDivider_unstable", { enumerable: true, get: function () { return MenuDivider_1.renderMenuDivider_unstable; } });
20
- Object.defineProperty(exports, "useMenuDividerStyles_unstable", { enumerable: true, get: function () { return MenuDivider_1.useMenuDividerStyles_unstable; } });
21
- Object.defineProperty(exports, "useMenuDivider_unstable", { enumerable: true, get: function () { return MenuDivider_1.useMenuDivider_unstable; } });
22
- Object.defineProperty(exports, "MenuGroup", { enumerable: true, get: function () { return MenuGroup_1.MenuGroup; } });
23
- Object.defineProperty(exports, "menuGroupClassNames", { enumerable: true, get: function () { return MenuGroup_1.menuGroupClassNames; } });
24
- Object.defineProperty(exports, "renderMenuGroup_unstable", { enumerable: true, get: function () { return MenuGroup_1.renderMenuGroup_unstable; } });
25
- Object.defineProperty(exports, "useMenuGroupContextValues_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroupContextValues_unstable; } });
26
- Object.defineProperty(exports, "useMenuGroupStyles_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroupStyles_unstable; } });
27
- Object.defineProperty(exports, "useMenuGroup_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroup_unstable; } });
28
- Object.defineProperty(exports, "MenuGroupHeader", { enumerable: true, get: function () { return MenuGroupHeader_1.MenuGroupHeader; } });
29
- Object.defineProperty(exports, "menuGroupHeaderClassNames", { enumerable: true, get: function () { return MenuGroupHeader_1.menuGroupHeaderClassNames; } });
30
- Object.defineProperty(exports, "renderMenuGroupHeader_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.renderMenuGroupHeader_unstable; } });
31
- Object.defineProperty(exports, "useMenuGroupHeaderStyles_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.useMenuGroupHeaderStyles_unstable; } });
32
- Object.defineProperty(exports, "useMenuGroupHeader_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.useMenuGroupHeader_unstable; } });
33
- Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return MenuItem_1.MenuItem; } });
34
- Object.defineProperty(exports, "menuItemClassNames", { enumerable: true, get: function () { return MenuItem_1.menuItemClassNames; } });
35
- Object.defineProperty(exports, "renderMenuItem_unstable", { enumerable: true, get: function () { return MenuItem_1.renderMenuItem_unstable; } });
36
- Object.defineProperty(exports, "useMenuItemStyles_unstable", { enumerable: true, get: function () { return MenuItem_1.useMenuItemStyles_unstable; } });
37
- Object.defineProperty(exports, "useMenuItem_unstable", { enumerable: true, get: function () { return MenuItem_1.useMenuItem_unstable; } });
38
- Object.defineProperty(exports, "MenuItemCheckbox", { enumerable: true, get: function () { return MenuItemCheckbox_1.MenuItemCheckbox; } });
39
- Object.defineProperty(exports, "menuItemCheckboxClassNames", { enumerable: true, get: function () { return MenuItemCheckbox_1.menuItemCheckboxClassNames; } });
40
- Object.defineProperty(exports, "renderMenuItemCheckbox_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.renderMenuItemCheckbox_unstable; } });
41
- Object.defineProperty(exports, "useMenuItemCheckboxStyles_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.useMenuItemCheckboxStyles_unstable; } });
42
- Object.defineProperty(exports, "useMenuItemCheckbox_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.useMenuItemCheckbox_unstable; } });
43
- Object.defineProperty(exports, "MenuItemRadio", { enumerable: true, get: function () { return MenuItemRadio_1.MenuItemRadio; } });
44
- Object.defineProperty(exports, "menuItemRadioClassNames", { enumerable: true, get: function () { return MenuItemRadio_1.menuItemRadioClassNames; } });
45
- Object.defineProperty(exports, "renderMenuItemRadio_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.renderMenuItemRadio_unstable; } });
46
- Object.defineProperty(exports, "useMenuItemRadioStyles_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.useMenuItemRadioStyles_unstable; } });
47
- Object.defineProperty(exports, "useMenuItemRadio_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.useMenuItemRadio_unstable; } });
48
- Object.defineProperty(exports, "MenuList", { enumerable: true, get: function () { return MenuList_1.MenuList; } });
49
- Object.defineProperty(exports, "menuListClassNames", { enumerable: true, get: function () { return MenuList_1.menuListClassNames; } });
50
- Object.defineProperty(exports, "renderMenuList_unstable", { enumerable: true, get: function () { return MenuList_1.renderMenuList_unstable; } });
51
- Object.defineProperty(exports, "useMenuListContextValues_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuListContextValues_unstable; } });
52
- Object.defineProperty(exports, "useMenuListStyles_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuListStyles_unstable; } });
53
- Object.defineProperty(exports, "useMenuList_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuList_unstable; } });
54
- Object.defineProperty(exports, "MenuPopover", { enumerable: true, get: function () { return MenuPopover_1.MenuPopover; } });
55
- Object.defineProperty(exports, "menuPopoverClassNames", { enumerable: true, get: function () { return MenuPopover_1.menuPopoverClassNames; } });
56
- Object.defineProperty(exports, "renderMenuPopover_unstable", { enumerable: true, get: function () { return MenuPopover_1.renderMenuPopover_unstable; } });
57
- Object.defineProperty(exports, "useMenuPopoverStyles_unstable", { enumerable: true, get: function () { return MenuPopover_1.useMenuPopoverStyles_unstable; } });
58
- Object.defineProperty(exports, "useMenuPopover_unstable", { enumerable: true, get: function () { return MenuPopover_1.useMenuPopover_unstable; } });
59
- Object.defineProperty(exports, "MenuSplitGroup", { enumerable: true, get: function () { return MenuSplitGroup_1.MenuSplitGroup; } });
60
- Object.defineProperty(exports, "menuSplitGroupClassNames", { enumerable: true, get: function () { return MenuSplitGroup_1.menuSplitGroupClassNames; } });
61
- Object.defineProperty(exports, "renderMenuSplitGroup_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.renderMenuSplitGroup_unstable; } });
62
- Object.defineProperty(exports, "useMenuSplitGroupStyles_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.useMenuSplitGroupStyles_unstable; } });
63
- Object.defineProperty(exports, "useMenuSplitGroup_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.useMenuSplitGroup_unstable; } });
64
- Object.defineProperty(exports, "MenuTrigger", { enumerable: true, get: function () { return MenuTrigger_1.MenuTrigger; } });
65
- Object.defineProperty(exports, "renderMenuTrigger_unstable", { enumerable: true, get: function () { return MenuTrigger_1.renderMenuTrigger_unstable; } });
66
- Object.defineProperty(exports, "useMenuTrigger_unstable", { enumerable: true, get: function () { return MenuTrigger_1.useMenuTrigger_unstable; } });
67
- Object.defineProperty(exports, "useCheckmarkStyles_unstable", { enumerable: true, get: function () { return index_1.useCheckmarkStyles_unstable; } });
68
- });
69
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/index.ts"],"names":[],"mappings":";;;;IAAS,2GAAA,YAAY,OAAA;IAAE,sHAAA,uBAAuB,OAAA;IAErC,gIAAA,0BAA0B,OAAA;IAAE,oIAAA,8BAA8B,OAAA;IAC1D,4HAAA,wBAAwB,OAAA;IAAE,gIAAA,4BAA4B,OAAA;IAEtD,mHAAA,gBAAgB,OAAA;IAAE,8HAAA,2BAA2B,OAAA;IAG7C,4FAAA,IAAI,OAAA;IAAE,2GAAA,mBAAmB,OAAA;IAAE,qHAAA,6BAA6B,OAAA;IAAE,wGAAA,gBAAgB,OAAA;IAajF,0GAAA,WAAW,OAAA;IACX,oHAAA,qBAAqB,OAAA;IACrB,yHAAA,0BAA0B,OAAA;IAC1B,4HAAA,6BAA6B,OAAA;IAC7B,sHAAA,uBAAuB,OAAA;IAIvB,sGAAA,SAAS,OAAA;IACT,gHAAA,mBAAmB,OAAA;IACnB,qHAAA,wBAAwB,OAAA;IACxB,+HAAA,kCAAkC,OAAA;IAClC,wHAAA,2BAA2B,OAAA;IAC3B,kHAAA,qBAAqB,OAAA;IAIrB,kHAAA,eAAe,OAAA;IACf,4HAAA,yBAAyB,OAAA;IACzB,iIAAA,8BAA8B,OAAA;IAC9B,oIAAA,iCAAiC,OAAA;IACjC,8HAAA,2BAA2B,OAAA;IAI3B,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAIpB,oHAAA,gBAAgB,OAAA;IAChB,8HAAA,0BAA0B,OAAA;IAC1B,mIAAA,+BAA+B,OAAA;IAC/B,sIAAA,kCAAkC,OAAA;IAClC,gIAAA,4BAA4B,OAAA;IAI5B,8GAAA,aAAa,OAAA;IACb,wHAAA,uBAAuB,OAAA;IACvB,6HAAA,4BAA4B,OAAA;IAC5B,gIAAA,+BAA+B,OAAA;IAC/B,0HAAA,yBAAyB,OAAA;IAIzB,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,6HAAA,iCAAiC,OAAA;IACjC,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAcpB,0GAAA,WAAW,OAAA;IACX,oHAAA,qBAAqB,OAAA;IACrB,yHAAA,0BAA0B,OAAA;IAC1B,4HAAA,6BAA6B,OAAA;IAC7B,sHAAA,uBAAuB,OAAA;IAIvB,gHAAA,cAAc,OAAA;IACd,0HAAA,wBAAwB,OAAA;IACxB,+HAAA,6BAA6B,OAAA;IAC7B,kIAAA,gCAAgC,OAAA;IAChC,4HAAA,0BAA0B,OAAA;IAGnB,0GAAA,WAAW,OAAA;IAAE,yHAAA,0BAA0B,OAAA;IAAE,sHAAA,uBAAuB,OAAA;IAGhE,oHAAA,2BAA2B,OAAA","sourcesContent":["export { MenuProvider, useMenuContext_unstable } from './contexts/menuContext';\nexport type { MenuContextValue } from './contexts/menuContext';\nexport { MenuTriggerContextProvider, useMenuTriggerContext_unstable } from './contexts/menuTriggerContext';\nexport { MenuGroupContextProvider, useMenuGroupContext_unstable } from './contexts/menuGroupContext';\nexport type { MenuGroupContextValue } from './contexts/menuGroupContext';\nexport { MenuListProvider, useMenuListContext_unstable } from './contexts/menuListContext';\nexport type { MenuListContextValue } from './contexts/menuListContext';\n\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './Menu';\nexport type {\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // MenuOpenEvents is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './Menu';\nexport {\n MenuDivider,\n menuDividerClassNames,\n renderMenuDivider_unstable,\n useMenuDividerStyles_unstable,\n useMenuDivider_unstable,\n} from './MenuDivider';\nexport type { MenuDividerProps, MenuDividerSlots, MenuDividerState } from './MenuDivider';\nexport {\n MenuGroup,\n menuGroupClassNames,\n renderMenuGroup_unstable,\n useMenuGroupContextValues_unstable,\n useMenuGroupStyles_unstable,\n useMenuGroup_unstable,\n} from './MenuGroup';\nexport type { MenuGroupContextValues, MenuGroupProps, MenuGroupSlots, MenuGroupState } from './MenuGroup';\nexport {\n MenuGroupHeader,\n menuGroupHeaderClassNames,\n renderMenuGroupHeader_unstable,\n useMenuGroupHeaderStyles_unstable,\n useMenuGroupHeader_unstable,\n} from './MenuGroupHeader';\nexport type { MenuGroupHeaderProps, MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader';\nexport {\n MenuItem,\n menuItemClassNames,\n renderMenuItem_unstable,\n useMenuItemStyles_unstable,\n useMenuItem_unstable,\n} from './MenuItem';\nexport type { MenuItemProps, MenuItemSlots, MenuItemState } from './MenuItem';\nexport {\n MenuItemCheckbox,\n menuItemCheckboxClassNames,\n renderMenuItemCheckbox_unstable,\n useMenuItemCheckboxStyles_unstable,\n useMenuItemCheckbox_unstable,\n} from './MenuItemCheckbox';\nexport type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox';\nexport {\n MenuItemRadio,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n} from './MenuItemRadio';\nexport type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio';\nexport {\n MenuList,\n menuListClassNames,\n renderMenuList_unstable,\n useMenuListContextValues_unstable,\n useMenuListStyles_unstable,\n useMenuList_unstable,\n} from './MenuList';\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // UninitializedMenuListState is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n UninitializedMenuListState,\n} from './MenuList';\nexport {\n MenuPopover,\n menuPopoverClassNames,\n renderMenuPopover_unstable,\n useMenuPopoverStyles_unstable,\n useMenuPopover_unstable,\n} from './MenuPopover';\nexport type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './MenuPopover';\nexport {\n MenuSplitGroup,\n menuSplitGroupClassNames,\n renderMenuSplitGroup_unstable,\n useMenuSplitGroupStyles_unstable,\n useMenuSplitGroup_unstable,\n} from './MenuSplitGroup';\nexport type { MenuSplitGroupProps, MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';\nexport type { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger';\n\nexport { useCheckmarkStyles_unstable } from './selectable/index';\nexport type { MenuItemSelectableProps, MenuItemSelectableState, SelectableHandler } from './selectable/index';\n"]}
@@ -1,7 +0,0 @@
1
- define(["require", "exports", "tslib", "./useCheckmarkStyles", "./types"], function (require, exports, tslib_1, useCheckmarkStyles_1, types_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(useCheckmarkStyles_1, exports);
5
- tslib_1.__exportStar(types_1, exports);
6
- });
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/index.ts"],"names":[],"mappings":";;;IAAA,oDAAqC;IACrC,uCAAwB","sourcesContent":["export * from './useCheckmarkStyles';\nexport * from './types';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type SelectableHandler = (\n e: React.MouseEvent | React.KeyboardEvent,\n name: string,\n value: string,\n checked: boolean,\n) => void;\n\n/**\n * Props for selecatble menu items\n */\nexport type MenuItemSelectableProps = {\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_name.asp\n */\n name: string;\n\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_value.asp\n */\n value: string;\n};\n\n/**\n * State for selectable menu items\n */\nexport type MenuItemSelectableState = MenuItemSelectableProps & {\n /**\n * Selectable is checked\n */\n checked: boolean;\n};\n"]}
@@ -1,28 +0,0 @@
1
- define(["require", "exports", "@griffel/react"], function (require, exports, react_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useCheckmarkStyles_unstable = void 0;
5
- var useStyles = react_1.makeStyles({
6
- root: {
7
- width: '16px',
8
- height: '16px',
9
- visibility: 'hidden',
10
- },
11
- rootChecked: {
12
- visibility: 'visible',
13
- },
14
- });
15
- /**
16
- * Applies styles to a checkmark slot for selectable menu items
17
- *
18
- * @param state - should contain a `checkmark` slot
19
- */
20
- var useCheckmarkStyles_unstable = function (state) {
21
- var styles = useStyles();
22
- if (state.checkmark) {
23
- state.checkmark.className = react_1.mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
24
- }
25
- };
26
- exports.useCheckmarkStyles_unstable = useCheckmarkStyles_unstable;
27
- });
28
- //# sourceMappingURL=useCheckmarkStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckmarkStyles.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,QAAQ;SACrB;QACD,WAAW,EAAE;YACX,UAAU,EAAE,SAAS;SACtB;KACF,CAAC,CAAC;IAEH;;;;OAIG;IACI,IAAM,2BAA2B,GAAG,UAAC,KAAiE;QAC3G,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,oBAAY,CACtC,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,EACnC,KAAK,CAAC,SAAS,CAAC,SAAS,CAC1B,CAAC;SACH;IACH,CAAC,CAAC;IATW,QAAA,2BAA2B,+BAStC","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuItemSelectableState } from './types';\nimport type { MenuItemState } from '../components/MenuItem/MenuItem.types';\n\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden',\n },\n rootChecked: {\n visibility: 'visible',\n },\n});\n\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */\nexport const useCheckmarkStyles_unstable = (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(\n styles.root,\n state.checked && styles.rootChecked,\n state.checkmark.className,\n );\n }\n};\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./useOnMenuEnter"], function (require, exports, tslib_1, useOnMenuEnter_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(useOnMenuEnter_1, exports);
5
- });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/index.ts"],"names":[],"mappings":";;;IAAA,gDAAiC","sourcesContent":["export * from './useOnMenuEnter';\n"]}
@@ -1,20 +0,0 @@
1
- define(["require", "exports", "@fluentui/react-context-selector", "../contexts/menuContext", "../contexts/menuListContext"], function (require, exports, react_context_selector_1, menuContext_1, menuListContext_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useIsSubmenu = void 0;
5
- /**
6
- * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
7
- * or whether it is a part of a `MenuList`
8
- *
9
- * A simple hook to check box contexts easily
10
- *
11
- * @returns whether the component is part of a submenu
12
- */
13
- function useIsSubmenu() {
14
- var menuContextValue = menuContext_1.useMenuContext_unstable(function (context) { return context.isSubmenu; });
15
- var hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
16
- return menuContextValue || hasMenuListContext;
17
- }
18
- exports.useIsSubmenu = useIsSubmenu;
19
- });
20
- //# sourceMappingURL=useIsSubmenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIsSubmenu.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;OAOG;IACH,SAAgB,YAAY;QAC1B,IAAM,gBAAgB,GAAG,qCAAuB,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,CAAC,SAAS,EAAjB,CAAiB,CAAC,CAAC;QAC/E,IAAM,kBAAkB,GAAG,4CAAmB,CAAC,iCAAe,CAAC,CAAC;QAEhE,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;IAChD,CAAC;IALD,oCAKC","sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\n\n/**\n * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true\n * or whether it is a part of a `MenuList`\n *\n * A simple hook to check box contexts easily\n *\n * @returns whether the component is part of a submenu\n */\nexport function useIsSubmenu() {\n const menuContextValue = useMenuContext_unstable(context => context.isSubmenu);\n const hasMenuListContext = useHasParentContext(MenuListContext);\n\n return menuContextValue || hasMenuListContext;\n}\n"]}
@@ -1,59 +0,0 @@
1
- define(["require", "exports", "react", "@fluentui/react-utilities", "@fluentui/react-portal"], function (require, exports, React, react_utilities_1, react_portal_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.dispatchMenuEnterEvent = exports.useOnMenuMouseEnter = exports.MENU_ENTER_EVENT = void 0;
5
- /**
6
- * Name of the custom event
7
- */
8
- exports.MENU_ENTER_EVENT = 'fuimenuenter';
9
- /**
10
- * This hook works similarly to @see {useOnClickOutside}
11
- *
12
- * Problem: Trying to behave the same as system menus:
13
- * When the mouse leaves a stack of nested menus the stack should not dismiss.
14
- * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.
15
- *
16
- * We don't use the native mouseenter event because it would trigger too many times in the document
17
- * Instead, dispatch custom DOM event from the menu so that it can bubble
18
- * Each nested menu can use the listener to check if the event is from a child or parent menu
19
- */
20
- var useOnMenuMouseEnter = function (options) {
21
- var refs = options.refs, callback = options.callback, element = options.element, disabled = options.disabled;
22
- // Keep mouse event here because this is essentially a custom 'mouseenter' event
23
- var listener = react_utilities_1.useEventCallback(function (ev) {
24
- var _a;
25
- var popoverRef = refs[0];
26
- var someMenuPopover = ev.target;
27
- // someMenu is a child -> will always be contained because of vParents
28
- // someMenu is a parent -> will always not be contained because no vParent
29
- // someMenu is the current popover -> it will contain itself
30
- var isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
31
- if (isOutsidePopover && !disabled) {
32
- callback(ev);
33
- }
34
- });
35
- React.useEffect(function () {
36
- // eslint-disable-next-line eqeqeq
37
- if (element == null) {
38
- return;
39
- }
40
- if (!disabled) {
41
- element.addEventListener(exports.MENU_ENTER_EVENT, listener);
42
- }
43
- return function () {
44
- element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
45
- };
46
- }, [listener, element, disabled]);
47
- };
48
- exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
49
- /**
50
- * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`
51
- * @param el element for the event target
52
- * @param nativeEvent the native mouse event this is mapped to
53
- */
54
- var dispatchMenuEnterEvent = function (el, nativeEvent) {
55
- el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent: nativeEvent } }));
56
- };
57
- exports.dispatchMenuEnterEvent = dispatchMenuEnterEvent;
58
- });
59
- //# sourceMappingURL=useOnMenuEnter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnMenuEnter.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;IAKA;;OAEG;IACU,QAAA,gBAAgB,GAAG,cAAc,CAAC;IAE/C;;;;;;;;;;OAUG;IACI,IAAM,mBAAmB,GAAG,UAAC,OAAyC;QACnE,IAAA,IAAI,GAAkC,OAAO,KAAzC,EAAE,QAAQ,GAAwB,OAAO,SAA/B,EAAE,OAAO,GAAe,OAAO,QAAtB,EAAE,QAAQ,GAAK,OAAO,SAAZ,CAAa;QAEtD,gFAAgF;QAChF,IAAM,QAAQ,GAAG,kCAAgB,CAAC,UAAC,EAAc;;YAC/C,IAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3B,IAAM,eAAe,GAAG,EAAE,CAAC,MAAqB,CAAC;YAEjD,sEAAsE;YACtE,0EAA0E;YAC1E,4DAA4D;YAC5D,IAAM,gBAAgB,GAAG,CAAC,8BAAe,CAAC,MAAA,UAAU,CAAC,OAAO,mCAAI,IAAI,EAAE,eAAe,CAAC,CAAC;YACvF,IAAI,gBAAgB,IAAI,CAAC,QAAQ,EAAE;gBACjC,QAAQ,CAAC,EAAE,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,SAAS,CAAC;YACd,kCAAkC;YAClC,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,OAAO;aACR;YAUD,IAAI,CAAC,QAAQ,EAAE;gBACb,OAAO,CAAC,gBAAgB,CAAC,wBAAgB,EAAE,QAA4B,CAAC,CAAC;aAC1E;YAED,OAAO;gBACL,OAAO,CAAC,mBAAmB,CAAC,wBAAgB,EAAE,QAA4B,CAAC,CAAC;YAC9E,CAAC,CAAC;QACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC;IAvCW,QAAA,mBAAmB,uBAuC9B;IAEF;;;;OAIG;IACI,IAAM,sBAAsB,GAAG,UAAC,EAAe,EAAE,WAAuB;QAC7E,EAAE,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,wBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,aAAA,EAAE,EAAE,CAAC,CAAC,CAAC;IAClG,CAAC,CAAC;IAFW,QAAA,sBAAsB,0BAEjC","sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { elementContains } from '@fluentui/react-portal';\nimport type { UseOnClickOrScrollOutsideOptions } from '@fluentui/react-utilities';\n\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\n\n/**\n * This hook works similarly to @see {useOnClickOutside}\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */\nexport const useOnMenuMouseEnter = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled } = options;\n\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev: MouseEvent) => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target as HTMLElement;\n\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains(popoverRef.current ?? null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n\n /**\n * Because `addEventListener` type override falls back to 2nd definition (evt name is unknown string literal)\n * evt is being typed as a base class of MouseEvent -> `Event`.\n * This type is used to override `listener` calls to make TS happy\n */\n\n type ListenerOverride = (evt: Event) => void;\n\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n }\n\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n };\n }, [listener, element, disabled]);\n};\n\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el element for the event target\n * @param nativeEvent the native mouse event this is mapped to\n */\nexport const dispatchMenuEnterEvent = (el: HTMLElement, nativeEvent: MouseEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent } }));\n};\n"]}