@fluentui/react-menu 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (480) hide show
  1. package/CHANGELOG.json +578 -27
  2. package/CHANGELOG.md +132 -18
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +143 -72
  5. package/lib/Menu.js.map +1 -1
  6. package/lib/MenuDivider.js.map +1 -1
  7. package/lib/MenuGroup.js.map +1 -1
  8. package/lib/MenuGroupHeader.js.map +1 -1
  9. package/lib/MenuItem.js.map +1 -1
  10. package/lib/MenuItemCheckbox.js.map +1 -1
  11. package/lib/MenuItemRadio.js.map +1 -1
  12. package/lib/MenuList.js.map +1 -1
  13. package/lib/MenuPopover.js.map +1 -1
  14. package/lib/MenuSplitGroup.d.ts +1 -0
  15. package/lib/MenuSplitGroup.js +2 -0
  16. package/lib/MenuSplitGroup.js.map +1 -0
  17. package/lib/MenuTrigger.js.map +1 -1
  18. package/lib/components/Menu/Menu.js +7 -7
  19. package/lib/components/Menu/Menu.js.map +1 -1
  20. package/lib/components/Menu/Menu.types.d.ts +3 -2
  21. package/lib/components/Menu/Menu.types.js.map +1 -1
  22. package/lib/components/Menu/index.js.map +1 -1
  23. package/lib/components/Menu/renderMenu.d.ts +1 -1
  24. package/lib/components/Menu/renderMenu.js +1 -1
  25. package/lib/components/Menu/renderMenu.js.map +1 -1
  26. package/lib/components/Menu/useMenu.d.ts +2 -2
  27. package/lib/components/Menu/useMenu.js +119 -128
  28. package/lib/components/Menu/useMenu.js.map +1 -1
  29. package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
  30. package/lib/components/Menu/useMenuContextValues.js +35 -33
  31. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  32. package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
  33. package/lib/components/MenuDivider/MenuDivider.js +8 -8
  34. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  35. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  36. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  37. package/lib/components/MenuDivider/index.js.map +1 -1
  38. package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  39. package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
  40. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  41. package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
  42. package/lib/components/MenuDivider/useMenuDivider.js +9 -7
  43. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  44. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  45. package/lib/components/MenuDivider/useMenuDividerStyles.js +7 -5
  46. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  47. package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
  48. package/lib/components/MenuGroup/MenuGroup.js +10 -8
  49. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  50. package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  51. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  52. package/lib/components/MenuGroup/index.d.ts +1 -0
  53. package/lib/components/MenuGroup/index.js +1 -0
  54. package/lib/components/MenuGroup/index.js.map +1 -1
  55. package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  56. package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
  57. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  58. package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
  59. package/lib/components/MenuGroup/useMenuGroup.js +10 -7
  60. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  61. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  62. package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
  63. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  64. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  65. package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
  66. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  67. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  68. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
  69. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  70. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  71. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  72. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  73. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  74. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +7 -7
  75. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  76. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  77. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
  78. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  79. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  80. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +7 -5
  81. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  82. package/lib/components/MenuItem/MenuItem.d.ts +1 -1
  83. package/lib/components/MenuItem/MenuItem.js +8 -10
  84. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  85. package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
  86. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  87. package/lib/components/MenuItem/index.js.map +1 -1
  88. package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
  89. package/lib/components/MenuItem/renderMenuItem.js +12 -8
  90. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  91. package/lib/components/MenuItem/useCharacterSearch.js +7 -7
  92. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  93. package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
  94. package/lib/components/MenuItem/useMenuItem.js +37 -44
  95. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  96. package/lib/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  97. package/lib/components/MenuItem/useMenuItemStyles.js +31 -27
  98. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  99. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  100. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
  101. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  102. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  103. package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
  104. package/lib/components/MenuItemCheckbox/index.js +1 -0
  105. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  106. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  107. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
  108. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  109. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  110. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
  111. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  112. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  113. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +8 -5
  114. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  115. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  116. package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
  117. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  118. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  119. package/lib/components/MenuItemRadio/index.d.ts +1 -0
  120. package/lib/components/MenuItemRadio/index.js +1 -0
  121. package/lib/components/MenuItemRadio/index.js.map +1 -1
  122. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  123. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
  124. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  125. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  126. package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
  127. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  128. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  129. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +8 -5
  130. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  131. package/lib/components/MenuList/MenuList.d.ts +1 -1
  132. package/lib/components/MenuList/MenuList.js +10 -10
  133. package/lib/components/MenuList/MenuList.js.map +1 -1
  134. package/lib/components/MenuList/MenuList.types.d.ts +12 -10
  135. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  136. package/lib/components/MenuList/index.d.ts +1 -1
  137. package/lib/components/MenuList/index.js +0 -1
  138. package/lib/components/MenuList/index.js.map +1 -1
  139. package/lib/components/MenuList/renderMenuList.d.ts +1 -1
  140. package/lib/components/MenuList/renderMenuList.js +7 -7
  141. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  142. package/lib/components/MenuList/useMenuList.d.ts +1 -1
  143. package/lib/components/MenuList/useMenuList.js +70 -87
  144. package/lib/components/MenuList/useMenuList.js.map +1 -1
  145. package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
  146. package/lib/components/MenuList/useMenuListContextValues.js +19 -17
  147. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  148. package/lib/components/MenuList/useMenuListStyles.d.ts +2 -1
  149. package/lib/components/MenuList/useMenuListStyles.js +9 -7
  150. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  151. package/lib/components/MenuPopover/MenuPopover.js +7 -7
  152. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  153. package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  154. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  155. package/lib/components/MenuPopover/index.js.map +1 -1
  156. package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  157. package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
  158. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  159. package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
  160. package/lib/components/MenuPopover/useMenuPopover.js +35 -41
  161. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  162. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  163. package/lib/components/MenuPopover/useMenuPopoverStyles.js +13 -8
  164. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  165. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  166. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  167. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  168. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  169. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  170. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  171. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  172. package/lib/components/MenuSplitGroup/index.js +6 -0
  173. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  174. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  175. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  176. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  177. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  178. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  179. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  180. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  181. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  182. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  183. package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  184. package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
  185. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  186. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  187. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  188. package/lib/components/MenuTrigger/index.js.map +1 -1
  189. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  190. package/lib/components/MenuTrigger/renderMenuTrigger.js +2 -2
  191. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  192. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  193. package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
  194. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  195. package/lib/components/index.js.map +1 -1
  196. package/lib/contexts/menuContext.d.ts +1 -1
  197. package/lib/contexts/menuContext.js +5 -11
  198. package/lib/contexts/menuContext.js.map +1 -1
  199. package/lib/contexts/menuGroupContext.d.ts +1 -1
  200. package/lib/contexts/menuGroupContext.js +3 -5
  201. package/lib/contexts/menuGroupContext.js.map +1 -1
  202. package/lib/contexts/menuListContext.d.ts +1 -1
  203. package/lib/contexts/menuListContext.js +7 -17
  204. package/lib/contexts/menuListContext.js.map +1 -1
  205. package/lib/contexts/menuTriggerContext.d.ts +1 -1
  206. package/lib/contexts/menuTriggerContext.js +4 -6
  207. package/lib/contexts/menuTriggerContext.js.map +1 -1
  208. package/lib/index.d.ts +11 -10
  209. package/lib/index.js +11 -10
  210. package/lib/index.js.map +1 -1
  211. package/lib/selectable/index.js.map +1 -1
  212. package/lib/selectable/types.js.map +1 -1
  213. package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
  214. package/lib/selectable/useCheckmarkStyles.js +4 -4
  215. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  216. package/lib/utils/index.js.map +1 -1
  217. package/lib/utils/useIsSubmenu.js +3 -5
  218. package/lib/utils/useIsSubmenu.js.map +1 -1
  219. package/lib/utils/useOnMenuEnter.js +16 -14
  220. package/lib/utils/useOnMenuEnter.js.map +1 -1
  221. package/lib-commonjs/Menu.js +1 -1
  222. package/lib-commonjs/Menu.js.map +1 -1
  223. package/lib-commonjs/MenuDivider.js +1 -1
  224. package/lib-commonjs/MenuDivider.js.map +1 -1
  225. package/lib-commonjs/MenuGroup.js +1 -1
  226. package/lib-commonjs/MenuGroup.js.map +1 -1
  227. package/lib-commonjs/MenuGroupHeader.js +1 -1
  228. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  229. package/lib-commonjs/MenuItem.js +1 -1
  230. package/lib-commonjs/MenuItem.js.map +1 -1
  231. package/lib-commonjs/MenuItemCheckbox.js +1 -1
  232. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  233. package/lib-commonjs/MenuItemRadio.js +1 -1
  234. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  235. package/lib-commonjs/MenuList.js +1 -1
  236. package/lib-commonjs/MenuList.js.map +1 -1
  237. package/lib-commonjs/MenuPopover.js +1 -1
  238. package/lib-commonjs/MenuPopover.js.map +1 -1
  239. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  240. package/lib-commonjs/MenuSplitGroup.js +10 -0
  241. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  242. package/lib-commonjs/MenuTrigger.js +1 -1
  243. package/lib-commonjs/MenuTrigger.js.map +1 -1
  244. package/lib-commonjs/components/Menu/Menu.js +7 -7
  245. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  246. package/lib-commonjs/components/Menu/Menu.types.d.ts +3 -2
  247. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  248. package/lib-commonjs/components/Menu/index.js +1 -1
  249. package/lib-commonjs/components/Menu/index.js.map +1 -1
  250. package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
  251. package/lib-commonjs/components/Menu/renderMenu.js +5 -5
  252. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  253. package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
  254. package/lib-commonjs/components/Menu/useMenu.js +130 -141
  255. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  256. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
  257. package/lib-commonjs/components/Menu/useMenuContextValues.js +37 -35
  258. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  259. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
  260. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -9
  261. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  262. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
  263. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  264. package/lib-commonjs/components/MenuDivider/index.js +1 -1
  265. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  266. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
  267. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +11 -12
  268. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  269. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
  270. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +12 -11
  271. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  272. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
  273. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +11 -7
  274. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  275. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
  276. package/lib-commonjs/components/MenuGroup/MenuGroup.js +12 -9
  277. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  278. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
  279. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  280. package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
  281. package/lib-commonjs/components/MenuGroup/index.js +3 -1
  282. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  283. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
  284. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +12 -13
  285. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  286. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
  287. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +13 -11
  288. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  289. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
  290. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +11 -11
  291. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  292. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  293. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
  294. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  295. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
  296. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -9
  297. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  298. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
  299. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  300. package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
  301. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  302. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
  303. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +11 -12
  304. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  305. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
  306. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +16 -12
  307. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  308. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
  309. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +11 -7
  310. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  311. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
  312. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -12
  313. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  314. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
  315. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  316. package/lib-commonjs/components/MenuItem/index.js +1 -1
  317. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  318. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
  319. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -14
  320. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  321. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
  322. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  323. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
  324. package/lib-commonjs/components/MenuItem/useMenuItem.js +45 -53
  325. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  326. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +2 -1
  327. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +40 -33
  328. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  329. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
  330. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -9
  331. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  332. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  333. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
  334. package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
  335. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  336. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
  337. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -14
  338. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  339. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
  340. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +19 -21
  341. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  342. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  343. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +12 -7
  344. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  345. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
  346. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -9
  347. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  348. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  349. package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
  350. package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
  351. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  352. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
  353. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -14
  354. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  355. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
  356. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +19 -20
  357. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  358. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
  359. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +12 -7
  360. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  361. package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
  362. package/lib-commonjs/components/MenuList/MenuList.js +11 -11
  363. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  364. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +12 -10
  365. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  366. package/lib-commonjs/components/MenuList/index.d.ts +1 -1
  367. package/lib-commonjs/components/MenuList/index.js +1 -3
  368. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  369. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
  370. package/lib-commonjs/components/MenuList/renderMenuList.js +12 -13
  371. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  372. package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
  373. package/lib-commonjs/components/MenuList/useMenuList.js +77 -95
  374. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  375. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
  376. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +21 -19
  377. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  378. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +2 -1
  379. package/lib-commonjs/components/MenuList/useMenuListStyles.js +12 -9
  380. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  381. package/lib-commonjs/components/MenuPopover/MenuPopover.js +8 -8
  382. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  383. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
  384. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  385. package/lib-commonjs/components/MenuPopover/index.js +1 -1
  386. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  387. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
  388. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +14 -13
  389. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  390. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
  391. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +43 -50
  392. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  393. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
  394. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +17 -10
  395. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  396. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  397. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  398. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  399. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +14 -0
  400. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  401. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  402. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  403. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  404. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  405. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  406. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  407. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  408. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  409. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  410. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  411. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  412. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  413. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  414. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
  415. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -5
  416. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  417. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +7 -3
  418. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  419. package/lib-commonjs/components/MenuTrigger/index.js +1 -1
  420. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  421. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
  422. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +6 -6
  423. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  424. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
  425. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +175 -7
  426. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  427. package/lib-commonjs/components/index.js +1 -1
  428. package/lib-commonjs/components/index.js.map +1 -1
  429. package/lib-commonjs/contexts/menuContext.d.ts +1 -1
  430. package/lib-commonjs/contexts/menuContext.js +6 -12
  431. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  432. package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
  433. package/lib-commonjs/contexts/menuGroupContext.js +5 -7
  434. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  435. package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
  436. package/lib-commonjs/contexts/menuListContext.js +8 -18
  437. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  438. package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
  439. package/lib-commonjs/contexts/menuTriggerContext.js +6 -8
  440. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  441. package/lib-commonjs/index.d.ts +11 -10
  442. package/lib-commonjs/index.js +17 -15
  443. package/lib-commonjs/index.js.map +1 -1
  444. package/lib-commonjs/selectable/index.js +1 -1
  445. package/lib-commonjs/selectable/index.js.map +1 -1
  446. package/lib-commonjs/selectable/types.js.map +1 -1
  447. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
  448. package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -7
  449. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  450. package/lib-commonjs/utils/index.js +1 -1
  451. package/lib-commonjs/utils/index.js.map +1 -1
  452. package/lib-commonjs/utils/useIsSubmenu.js +5 -7
  453. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  454. package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
  455. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  456. package/package.json +16 -17
  457. package/lib/common/isConformant.d.ts +0 -4
  458. package/lib/common/isConformant.js +0 -12
  459. package/lib/common/isConformant.js.map +0 -1
  460. package/lib/common/mockUseMenuContext.d.ts +0 -7
  461. package/lib/common/mockUseMenuContext.js +0 -36
  462. package/lib/common/mockUseMenuContext.js.map +0 -1
  463. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  464. package/lib/components/MenuTrigger/useTriggerElement.js +0 -179
  465. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  466. package/lib/utils/DefaultIcons.d.ts +0 -7
  467. package/lib/utils/DefaultIcons.js +0 -88
  468. package/lib/utils/DefaultIcons.js.map +0 -1
  469. package/lib-commonjs/common/isConformant.d.ts +0 -4
  470. package/lib-commonjs/common/isConformant.js +0 -23
  471. package/lib-commonjs/common/isConformant.js.map +0 -1
  472. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  473. package/lib-commonjs/common/mockUseMenuContext.js +0 -47
  474. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  475. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  476. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
  477. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
  478. package/lib-commonjs/utils/DefaultIcons.d.ts +0 -7
  479. package/lib-commonjs/utils/DefaultIcons.js +0 -100
  480. package/lib-commonjs/utils/DefaultIcons.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "9.0.0-nightly.f81b28ceb3.1",
3
+ "version": "9.0.0-rc.4",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "MIT",
14
14
  "scripts": {
15
15
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
16
- "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-menu/src && yarn docs",
16
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-menu/src && yarn docs",
17
17
  "build": "just-scripts build",
18
18
  "bundle-size": "bundle-size measure",
19
19
  "clean": "just-scripts clean",
@@ -22,15 +22,14 @@
22
22
  "just": "just-scripts",
23
23
  "lint": "just-scripts lint",
24
24
  "start": "yarn storybook",
25
- "storybook": "start-storybook",
26
- "test": "jest"
25
+ "storybook": "node ../../scripts/storybook/runner",
26
+ "test": "jest --passWithNoTests",
27
+ "type-check": "tsc -b tsconfig.json"
27
28
  },
28
29
  "devDependencies": {
29
- "@fluentui/babel-make-styles": "9.0.0-nightly.f81b28ceb3.1",
30
30
  "@fluentui/eslint-plugin": "*",
31
- "@fluentui/jest-serializer-make-styles": "9.0.0-nightly.f81b28ceb3.1",
32
31
  "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-make-styles": "9.0.0-nightly.f81b28ceb3.1",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.3",
34
33
  "@fluentui/scripts": "^1.0.0",
35
34
  "@types/enzyme": "3.10.3",
36
35
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -44,15 +43,16 @@
44
43
  "react-test-renderer": "^16.3.0"
45
44
  },
46
45
  "dependencies": {
47
- "@fluentui/keyboard-keys": "9.0.0-nightly.f81b28ceb3.1",
48
- "@fluentui/react-context-selector": "9.0.0-nightly.f81b28ceb3.1",
49
- "@fluentui/react-icons": "^1.1.140",
50
- "@fluentui/react-make-styles": "9.0.0-nightly.f81b28ceb3.1",
51
- "@fluentui/react-portal": "9.0.0-nightly.f81b28ceb3.1",
52
- "@fluentui/react-positioning": "9.0.0-nightly.f81b28ceb3.1",
53
- "@fluentui/react-provider": "9.0.0-nightly.f81b28ceb3.1",
54
- "@fluentui/react-tabster": "9.0.0-nightly.f81b28ceb3.1",
55
- "@fluentui/react-utilities": "9.0.0-nightly.f81b28ceb3.1",
46
+ "@fluentui/keyboard-keys": "9.0.0-rc.3",
47
+ "@fluentui/react-context-selector": "9.0.0-rc.4",
48
+ "@fluentui/react-icons": "^2.0.159-beta.10",
49
+ "@griffel/react": "1.0.0",
50
+ "@fluentui/react-portal": "9.0.0-rc.4",
51
+ "@fluentui/react-positioning": "9.0.0-rc.4",
52
+ "@fluentui/react-shared-contexts": "9.0.0-rc.3",
53
+ "@fluentui/react-tabster": "9.0.0-rc.4",
54
+ "@fluentui/react-theme": "9.0.0-rc.3",
55
+ "@fluentui/react-utilities": "9.0.0-rc.4",
56
56
  "tslib": "^2.1.0"
57
57
  },
58
58
  "peerDependencies": {
@@ -62,7 +62,6 @@
62
62
  "react-dom": ">=16.8.0 <18.0.0"
63
63
  },
64
64
  "beachball": {
65
- "tag": "beta",
66
65
  "disallowedChangeTypes": [
67
66
  "major",
68
67
  "minor",
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,12 +0,0 @@
1
- import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
2
- import makeStylesTests from '@fluentui/react-conformance-make-styles';
3
- export function isConformant(testInfo) {
4
- var defaultOptions = {
5
- asPropHandlesRef: true,
6
- componentPath: module.parent.filename.replace('.test', ''),
7
- skipAsPropTests: true,
8
- extraTests: makeStylesTests
9
- };
10
- baseIsConformant(defaultOptions, testInfo);
11
- }
12
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { MenuContextValue } from '../contexts/menuContext';
2
- /**
3
- * A test utility to mock the useMenuContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Menu context values to set for testing
6
- */
7
- export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
@@ -1,36 +0,0 @@
1
- import { __assign } from "tslib";
2
- import { useMenuContext } from '../contexts/menuContext';
3
- /**
4
- * A test utility to mock the useMenuContext hook that relies on context selector
5
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
6
- * @param options Menu context values to set for testing
7
- */
8
-
9
- export var mockUseMenuContext = function (options) {
10
- if (options === void 0) {
11
- options = {};
12
- }
13
-
14
- var mockContext = __assign({
15
- open: false,
16
- setOpen: function () {
17
- return null;
18
- },
19
- triggerRef: {
20
- current: null
21
- },
22
- menuPopoverRef: {
23
- current: null
24
- },
25
- openOnContext: false,
26
- openOnHover: false,
27
- isSubmenu: false,
28
- triggerId: 'id'
29
- }, options); // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
-
31
-
32
- useMenuContext.mockImplementation(function (selector) {
33
- return selector(mockContext);
34
- });
35
- };
36
- //# sourceMappingURL=mockUseMenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUseMenuContext.ts"],"names":[],"mappings":";AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;AAIG;;AACH,OAAO,IAAM,kBAAkB,GAAG,UAAC,OAAD,EAAwC;AAAvC,MAAA,OAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,OAAA,GAAA,EAAA;AAAuC;;AACxE,MAAM,WAAW,GAAA,QAAA,CAAA;AACf,IAAA,IAAI,EAAE,KADS;AAEf,IAAA,OAAO,EAAE,YAAA;AAAM,aAAA,IAAA;AAAI,KAFJ;AAGf,IAAA,UAAU,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAHE;AAIf,IAAA,cAAc,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAJF;AAKf,IAAA,aAAa,EAAE,KALA;AAMf,IAAA,WAAW,EAAE,KANE;AAOf,IAAA,SAAS,EAAE,KAPI;AAQf,IAAA,SAAS,EAAE;AARI,GAAA,EASZ,OATY,CAAjB,CADwE,CAYxE;;;AACC,EAAA,cAA4B,CAAC,kBAA7B,CAAgD,UAAC,QAAD,EAA6C;AAC5F,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM","sourceRoot":""}
@@ -1,5 +0,0 @@
1
- import type { MenuTriggerState } from './MenuTrigger.types';
2
- /**
3
- * Adds the necessary props to the trigger element
4
- */
5
- export declare const useTriggerElement: (state: MenuTriggerState) => MenuTriggerState;
@@ -1,179 +0,0 @@
1
- import { __assign } from "tslib";
2
- import * as React from 'react';
3
- import { ArrowRight, ArrowDown, ArrowLeft, Escape } from '@fluentui/keyboard-keys';
4
- import { applyTriggerPropsToChildren, onlyChild, shouldPreventDefaultOnKeyDown, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
5
- import { useFocusFinders } from '@fluentui/react-tabster';
6
- import { useMenuContext } from '../../contexts/menuContext';
7
- import { useFluent } from '@fluentui/react-shared-contexts';
8
- import { useIsSubmenu } from '../../utils/useIsSubmenu';
9
-
10
- var noop = function () {
11
- return null;
12
- };
13
- /**
14
- * Adds the necessary props to the trigger element
15
- */
16
-
17
-
18
- export var useTriggerElement = function (state) {
19
- var _a, _b;
20
-
21
- var triggerRef = useMenuContext(function (context) {
22
- return context.triggerRef;
23
- });
24
- var menuPopoverRef = useMenuContext(function (context) {
25
- return context.menuPopoverRef;
26
- });
27
- var setOpen = useMenuContext(function (context) {
28
- return context.setOpen;
29
- });
30
- var open = useMenuContext(function (context) {
31
- return context.open;
32
- });
33
- var triggerId = useMenuContext(function (context) {
34
- return context.triggerId;
35
- });
36
- var openOnHover = useMenuContext(function (context) {
37
- return context.openOnHover;
38
- });
39
- var openOnContext = useMenuContext(function (context) {
40
- return context.openOnContext;
41
- });
42
- var isSubmenu = useIsSubmenu();
43
- var findFirstFocusable = useFocusFinders().findFirstFocusable;
44
- var focusFirst = React.useCallback(function () {
45
- var firstFocusable = findFirstFocusable(menuPopoverRef.current);
46
- firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
47
- }, [findFirstFocusable, menuPopoverRef]);
48
- var openedWithKeyboardRef = React.useRef(false);
49
- var hasMouseMoved = React.useRef(false);
50
- var dir = useFluent().dir;
51
- var OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;
52
- var child = /*#__PURE__*/React.isValidElement(state.children) ? onlyChild(state.children) : undefined;
53
- var onContextMenu = useEventCallback(function (e) {
54
- var _a, _b;
55
-
56
- if (openOnContext) {
57
- e.preventDefault();
58
- setOpen(e, {
59
- open: true,
60
- keyboard: false
61
- });
62
- }
63
-
64
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onContextMenu) === null || _b === void 0 ? void 0 : _b.call(_a, e);
65
- });
66
- var onClick = useEventCallback(function (e) {
67
- var _a, _b;
68
-
69
- if (!openOnContext) {
70
- setOpen(e, {
71
- open: !open,
72
- keyboard: openedWithKeyboardRef.current
73
- });
74
- openedWithKeyboardRef.current = false;
75
- }
76
-
77
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
78
- });
79
- var onKeyDown = useEventCallback(function (e) {
80
- var _a, _b, _c;
81
-
82
- if (shouldPreventDefaultOnKeyDown(e)) {
83
- e.preventDefault();
84
- openedWithKeyboardRef.current = true;
85
- (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
86
- }
87
-
88
- var key = e.key;
89
-
90
- if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === ArrowDown)) {
91
- setOpen(e, {
92
- open: true,
93
- keyboard: true
94
- });
95
- }
96
-
97
- if (key === Escape && !isSubmenu) {
98
- setOpen(e, {
99
- open: false,
100
- keyboard: true
101
- });
102
- } // if menu is already open, can't rely on effects to focus
103
-
104
-
105
- if (open && key === OpenArrowKey && isSubmenu) {
106
- focusFirst();
107
- }
108
-
109
- if (open && key === ArrowDown && !isSubmenu) {
110
- focusFirst();
111
- }
112
-
113
- (_c = (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, e);
114
- });
115
- var onMouseEnter = useEventCallback(function (e) {
116
- var _a, _b;
117
-
118
- if (openOnHover && hasMouseMoved.current) {
119
- setOpen(e, {
120
- open: true,
121
- keyboard: false
122
- });
123
- }
124
-
125
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(_a, e);
126
- }); // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
127
- // First time open the mouse using mousemove and then continue with mouseenter
128
- // Only use once to determine that the user is using the mouse since it is an expensive event to handle
129
-
130
- var onMouseMove = useEventCallback(function (e) {
131
- if (openOnHover && !hasMouseMoved.current) {
132
- setOpen(e, {
133
- open: true,
134
- keyboard: false
135
- });
136
- hasMouseMoved.current = true;
137
- }
138
- });
139
- var onMouseLeave = useEventCallback(function (e) {
140
- var _a, _b;
141
-
142
- if (openOnHover) {
143
- setOpen(e, {
144
- open: false,
145
- keyboard: false
146
- });
147
- }
148
-
149
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseLeave) === null || _b === void 0 ? void 0 : _b.call(_a, e);
150
- });
151
- var disabled = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.disabled;
152
-
153
- var triggerProps = __assign({
154
- 'aria-haspopup': true,
155
- 'aria-expanded': open,
156
- id: ((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id) || triggerId
157
- }, !disabled ? {
158
- onClick: onClick,
159
- onMouseEnter: onMouseEnter,
160
- onMouseLeave: onMouseLeave,
161
- onContextMenu: onContextMenu,
162
- onKeyDown: onKeyDown,
163
- onMouseMove: onMouseMove
164
- } : // Spread disabled event handlers to implement contract and avoid specific disabled logic in handlers
165
- {
166
- onClick: noop,
167
- onMouseEnter: noop,
168
- onMouseLeave: noop,
169
- onContextMenu: noop,
170
- onKeyDown: noop,
171
- onMouseMove: noop
172
- });
173
-
174
- state.children = applyTriggerPropsToChildren(state.children, __assign(__assign({}, triggerProps), {
175
- ref: useMergedRefs(typeof state.children !== 'function' && state.children.ref || null, triggerRef)
176
- }));
177
- return state;
178
- };
179
- //# sourceMappingURL=useTriggerElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useTriggerElement.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,UAAT,EAAqB,SAArB,EAAgC,SAAhC,EAA2C,MAA3C,QAAyD,yBAAzD;AACA,SACE,2BADF,EAEE,SAFF,EAGE,6BAHF,EAIE,gBAJF,EAKE,aALF,QAMO,2BANP;AAOA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SAAS,cAAT,QAA+B,4BAA/B;AACA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,YAAT,QAA6B,0BAA7B;;AAGA,IAAM,IAAI,GAAG,YAAA;AAAM,SAAA,IAAA;AAAI,CAAvB;AAEA;;AAEG;;;AACH,OAAO,IAAM,iBAAiB,GAAG,UAAC,KAAD,EAAwB;;;AACvD,MAAM,UAAU,GAAG,cAAc,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,UAAA;AAAkB,GAA9B,CAAjC;AACA,MAAM,cAAc,GAAG,cAAc,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,cAAA;AAAsB,GAAlC,CAArC;AACA,M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aAAa,EAAE,IAJjB;AAKE,IAAA,SAAS,EAAE,IALb;AAME,IAAA,WAAW,EAAE;AANf,GAfY,CAAlB;;AAyBA,EAAA,KAAK,CAAC,QAAN,GAAiB,2BAA2B,CAAC,KAAK,CAAC,QAAP,EAAe,QAAA,CAAA,QAAA,CAAA,EAAA,EACtD,YADsD,CAAA,EAC1C;AACf,IAAA,GAAG,EAAE,aAAa,CAAE,OAAO,KAAK,CAAC,QAAb,KAA0B,UAA1B,IAAwC,KAAK,CAAC,QAAN,CAAe,GAAxD,IAAgE,IAAjE,EAAuE,UAAvE;AADH,GAD0C,CAAf,CAA5C;AAKA,SAAO,KAAP;AACD,CAhIM","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export declare const renderIcon: (SVGElement: (props: {
3
- svgClasses: string;
4
- }) => JSX.Element) => React.FC<React.HTMLAttributes<HTMLSpanElement>>;
5
- export declare const ChevronRightIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
6
- export declare const ChevronLeftIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
7
- export declare const AcceptIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
@@ -1,88 +0,0 @@
1
- import { __assign } from "tslib";
2
- import * as React from 'react';
3
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
4
- import { getNativeProps, htmlElementProperties } from '@fluentui/react-utilities';
5
-
6
- var useStyles = /*#__PURE__*/__styles({
7
- "root": {
8
- "mc9l5x": "f14t3ns0",
9
- "ha4doy": "fmrv4ls",
10
- "fb3t49": "fdgdznj",
11
- "a9b677": "fhson10",
12
- "Bqenvij": "f1un31zh"
13
- },
14
- "svg": {
15
- "Bqenvij": "f1l02sjl",
16
- "Bkfmm31": "f1w9h62z",
17
- "ha4doy": "f12kltsn"
18
- }
19
- }, {
20
- "d": [".f14t3ns0{display:inline-block;}", ".fmrv4ls{vertical-align:middle;}", ".fdgdznj{speak:none;}", ".fhson10{width:1em;}", ".f1un31zh{height:1em;}", ".f1l02sjl{height:100%;}", ".f1w9h62z{fill:currentColor;}", ".f12kltsn{vertical-align:top;}"]
21
- }); //
22
- // !!! A temporary workaround to avoid dependencies on any icon packages.
23
- // !!! A usage of converged icon package should be considered.
24
- //
25
-
26
-
27
- var useIconProps = function (props) {
28
- var _a;
29
-
30
- var containerProps = props['aria-label'] ? {} : (_a = {
31
- role: 'presentation'
32
- }, _a['aria-hidden'] = true, _a);
33
- var nativeProps = getNativeProps(props, htmlElementProperties);
34
- var styles = useStyles();
35
- var rootClasses = styles.root;
36
- var svgClasses = styles.svg;
37
- return {
38
- containerProps: containerProps,
39
- nativeProps: nativeProps,
40
- rootClasses: rootClasses,
41
- svgClasses: svgClasses
42
- };
43
- };
44
-
45
- export var renderIcon = function (SVGElement) {
46
- return function (props) {
47
- var _a = useIconProps(props),
48
- containerProps = _a.containerProps,
49
- nativeProps = _a.nativeProps,
50
- rootClasses = _a.rootClasses,
51
- svgClasses = _a.svgClasses;
52
-
53
- return /*#__PURE__*/React.createElement('span', __assign(__assign(__assign({}, containerProps), nativeProps), {
54
- className: mergeClasses(rootClasses, props.className)
55
- }), /*#__PURE__*/React.createElement(SVGElement, {
56
- svgClasses: svgClasses
57
- }));
58
- };
59
- };
60
- export var ChevronRightIcon = /*#__PURE__*/renderIcon(function (props) {
61
- return /*#__PURE__*/React.createElement("svg", {
62
- xmlns: "http://www.w3.org/2000/svg",
63
- viewBox: "0 0 2048 2048",
64
- className: props.svgClasses
65
- }, /*#__PURE__*/React.createElement("path", {
66
- d: "M515 1955l930-931L515 93l90-90 1022 1021L605 2045l-90-90z"
67
- }));
68
- });
69
- export var ChevronLeftIcon = /*#__PURE__*/renderIcon(function (props) {
70
- return /*#__PURE__*/React.createElement("svg", {
71
- xmlns: "http://www.w3.org/2000/svg",
72
- viewBox: "0 0 2048 2048",
73
- className: props.svgClasses,
74
- focusable: "false"
75
- }, /*#__PURE__*/React.createElement("path", {
76
- d: "M1443 2045L421 1024 1443 3l90 90-930 931 930 931-90 90z"
77
- }));
78
- });
79
- export var AcceptIcon = /*#__PURE__*/renderIcon(function (props) {
80
- return /*#__PURE__*/React.createElement("svg", {
81
- xmlns: "http://www.w3.org/2000/svg",
82
- viewBox: "0 0 2048 2048",
83
- className: props.svgClasses
84
- }, /*#__PURE__*/React.createElement("path", {
85
- d: "M640 1755L19 1133l90-90 531 530L1939 275l90 90L640 1755z"
86
- }));
87
- });
88
- //# sourceMappingURL=DefaultIcons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/DefaultIcons.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,2BAAtD;;AAEA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB,C,CAeA;AACA;AACA;AACA;;;AAEA,IAAM,YAAY,GAAG,UAAC,KAAD,EAA6C;;;AAChE,MAAM,cAAc,GAAG,KAAK,CAAC,YAAD,CAAL,GACnB,EADmB,IAEpB,EAAA,GAAA;AACG,IAAA,IAAI,EAAE;AADT,GAAA,EAEG,EAAA,CAAC,aAAD,CAAA,GAAiB,IAFpB,EAGE,EALkB,CAAvB;AAMA,MAAM,WAAW,GAAG,cAAc,CAAoC,KAApC,EAA2C,qBAA3C,CAAlC;AACA,MAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,IAA3B;AACA,MAAM,UAAU,GAAG,MAAM,CAAC,GAA1B;AAEA,SAAO;AAAE,IAAA,cAAc,EAAA,cAAhB;AAAkB,IAAA,WAAW,EAAA,WAA7B;AAA+B,IAAA,WAAW,EAAA,WAA1C;AAA4C,IAAA,UAAU,EAAA;AAAtD,GAAP;AACD,CAdD;;AAgBA,OAAO,IAAM,UAAU,GA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AAA,EAAA;AAAM,IAAA,CAAC,EAFwC;AAE/C,GAAA,CADF,CADiD;AAIlD,CAJwC,CAAlC;AAMP,OAAO,IAAM,UAAU,gBAAG,UAAU,CAAC,UAAA,KAAA,EAAK;AAAI,sBAC5C,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,KAAK,EAAC,4BAAX;AAAwC,IAAA,OAAO,EAAC,eAAhD;AAAgE,IAAA,SAAS,EAAE,KAAK,CAAC;AAAjF,GAAA,eACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,CAAC,EAFmC;AAE1C,GAAA,CADF,CAD4C;AAI7C,CAJmC,CAA7B","sourceRoot":""}
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isConformant = void 0;
7
-
8
- var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
9
-
10
- var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
11
-
12
- function isConformant(testInfo) {
13
- var defaultOptions = {
14
- asPropHandlesRef: true,
15
- componentPath: module.parent.filename.replace('.test', ''),
16
- skipAsPropTests: true,
17
- extraTests: react_conformance_make_styles_1.default
18
- };
19
- react_conformance_1.isConformant(defaultOptions, testInfo);
20
- }
21
-
22
- exports.isConformant = isConformant;
23
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAJ+C,GAA7D;AAOA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAXD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { MenuContextValue } from '../contexts/menuContext';
2
- /**
3
- * A test utility to mock the useMenuContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Menu context values to set for testing
6
- */
7
- export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mockUseMenuContext = void 0;
7
-
8
- var tslib_1 = /*#__PURE__*/require("tslib");
9
-
10
- var menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
11
- /**
12
- * A test utility to mock the useMenuContext hook that relies on context selector
13
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
14
- * @param options Menu context values to set for testing
15
- */
16
-
17
-
18
- var mockUseMenuContext = function (options) {
19
- if (options === void 0) {
20
- options = {};
21
- }
22
-
23
- var mockContext = tslib_1.__assign({
24
- open: false,
25
- setOpen: function () {
26
- return null;
27
- },
28
- triggerRef: {
29
- current: null
30
- },
31
- menuPopoverRef: {
32
- current: null
33
- },
34
- openOnContext: false,
35
- openOnHover: false,
36
- isSubmenu: false,
37
- triggerId: 'id'
38
- }, options); // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
-
40
-
41
- menuContext_1.useMenuContext.mockImplementation(function (selector) {
42
- return selector(mockContext);
43
- });
44
- };
45
-
46
- exports.mockUseMenuContext = mockUseMenuContext;
47
- //# sourceMappingURL=mockUseMenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUseMenuContext.ts"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;AAIG;;;AACI,IAAM,kBAAkB,GAAG,UAAC,OAAD,EAAwC;AAAvC,MAAA,OAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,OAAA,GAAA,EAAA;AAAuC;;AACxE,MAAM,WAAW,GAAA,OAAA,CAAA,QAAA,CAAA;AACf,IAAA,IAAI,EAAE,KADS;AAEf,IAAA,OAAO,EAAE,YAAA;AAAM,aAAA,IAAA;AAAI,KAFJ;AAGf,IAAA,UAAU,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAHE;AAIf,IAAA,cAAc,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAJF;AAKf,IAAA,aAAa,EAAE,KALA;AAMf,IAAA,WAAW,EAAE,KANE;AAOf,IAAA,SAAS,EAAE,KAPI;AAQf,IAAA,SAAS,EAAE;AARI,GAAA,EASZ,OATY,CAAjB,CADwE,CAYxE;;;AACC,EAAA,aAAA,CAAA,cAAA,CAA6B,kBAA7B,CAAgD,UAAC,QAAD,EAA6C;AAC5F,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
@@ -1,5 +0,0 @@
1
- import type { MenuTriggerState } from './MenuTrigger.types';
2
- /**
3
- * Adds the necessary props to the trigger element
4
- */
5
- export declare const useTriggerElement: (state: MenuTriggerState) => MenuTriggerState;