@fluentui/react-menu 9.7.14 → 9.7.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. package/CHANGELOG.json +115 -1
  2. package/CHANGELOG.md +34 -2
  3. package/lib/Menu.js +0 -1
  4. package/lib/Menu.js.map +1 -1
  5. package/lib/MenuDivider.js +0 -1
  6. package/lib/MenuDivider.js.map +1 -1
  7. package/lib/MenuGroup.js +0 -1
  8. package/lib/MenuGroup.js.map +1 -1
  9. package/lib/MenuGroupHeader.js +0 -1
  10. package/lib/MenuGroupHeader.js.map +1 -1
  11. package/lib/MenuItem.js +0 -1
  12. package/lib/MenuItem.js.map +1 -1
  13. package/lib/MenuItemCheckbox.js +0 -1
  14. package/lib/MenuItemCheckbox.js.map +1 -1
  15. package/lib/MenuItemRadio.js +0 -1
  16. package/lib/MenuItemRadio.js.map +1 -1
  17. package/lib/MenuList.js +0 -1
  18. package/lib/MenuList.js.map +1 -1
  19. package/lib/MenuPopover.js +0 -1
  20. package/lib/MenuPopover.js.map +1 -1
  21. package/lib/MenuSplitGroup.js +0 -1
  22. package/lib/MenuSplitGroup.js.map +1 -1
  23. package/lib/MenuTrigger.js +0 -1
  24. package/lib/MenuTrigger.js.map +1 -1
  25. package/lib/components/Menu/Menu.js +4 -6
  26. package/lib/components/Menu/Menu.js.map +1 -1
  27. package/lib/components/Menu/Menu.types.js +0 -1
  28. package/lib/components/Menu/Menu.types.js.map +1 -1
  29. package/lib/components/Menu/index.js +0 -1
  30. package/lib/components/Menu/index.js.map +1 -1
  31. package/lib/components/Menu/renderMenu.js +4 -6
  32. package/lib/components/Menu/renderMenu.js.map +1 -1
  33. package/lib/components/Menu/useMenu.js +242 -236
  34. package/lib/components/Menu/useMenu.js.map +1 -1
  35. package/lib/components/Menu/useMenuContextValues.js +22 -39
  36. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  37. package/lib/components/MenuDivider/MenuDivider.js +5 -7
  38. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  39. package/lib/components/MenuDivider/MenuDivider.types.js +1 -2
  40. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  41. package/lib/components/MenuDivider/index.js +0 -1
  42. package/lib/components/MenuDivider/index.js.map +1 -1
  43. package/lib/components/MenuDivider/renderMenuDivider.js +4 -9
  44. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  45. package/lib/components/MenuDivider/useMenuDivider.js +12 -14
  46. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  47. package/lib/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  48. package/lib/components/MenuGroup/MenuGroup.js +6 -8
  49. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  50. package/lib/components/MenuGroup/MenuGroup.types.js +1 -2
  51. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  52. package/lib/components/MenuGroup/index.js +0 -1
  53. package/lib/components/MenuGroup/index.js.map +1 -1
  54. package/lib/components/MenuGroup/renderMenuGroup.js +6 -11
  55. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  56. package/lib/components/MenuGroup/useMenuGroup.js +14 -16
  57. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  58. package/lib/components/MenuGroup/useMenuGroupContextValues.js +9 -10
  59. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  60. package/lib/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
  61. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +5 -7
  62. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  63. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js +1 -2
  64. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  65. package/lib/components/MenuGroupHeader/index.js +0 -1
  66. package/lib/components/MenuGroupHeader/index.js.map +1 -1
  67. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +4 -9
  68. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  69. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +12 -16
  70. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  71. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  72. package/lib/components/MenuItem/MenuItem.js +5 -7
  73. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  74. package/lib/components/MenuItem/MenuItem.types.js +1 -2
  75. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  76. package/lib/components/MenuItem/index.js +0 -1
  77. package/lib/components/MenuItem/index.js.map +1 -1
  78. package/lib/components/MenuItem/renderMenuItem.js +4 -9
  79. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  80. package/lib/components/MenuItem/useCharacterSearch.js +14 -17
  81. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  82. package/lib/components/MenuItem/useMenuItem.js +79 -88
  83. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  84. package/lib/components/MenuItem/useMenuItemStyles.styles.js +5 -5
  85. package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  86. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +5 -7
  87. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  88. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js +1 -2
  89. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  90. package/lib/components/MenuItemCheckbox/index.js +0 -1
  91. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  92. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +4 -9
  93. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  94. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +31 -36
  95. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  96. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  97. package/lib/components/MenuItemRadio/MenuItemRadio.js +5 -7
  98. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  99. package/lib/components/MenuItemRadio/MenuItemRadio.types.js +1 -2
  100. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  101. package/lib/components/MenuItemRadio/index.js +0 -1
  102. package/lib/components/MenuItemRadio/index.js.map +1 -1
  103. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +4 -9
  104. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  105. package/lib/components/MenuItemRadio/useMenuItemRadio.js +29 -34
  106. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  107. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  108. package/lib/components/MenuList/MenuList.js +6 -8
  109. package/lib/components/MenuList/MenuList.js.map +1 -1
  110. package/lib/components/MenuList/MenuList.types.js +0 -1
  111. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  112. package/lib/components/MenuList/index.js +0 -1
  113. package/lib/components/MenuList/index.js.map +1 -1
  114. package/lib/components/MenuList/renderMenuList.js +6 -11
  115. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  116. package/lib/components/MenuList/useMenuList.js +130 -126
  117. package/lib/components/MenuList/useMenuList.js.map +1 -1
  118. package/lib/components/MenuList/useMenuListContextValues.js +13 -21
  119. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  120. package/lib/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  121. package/lib/components/MenuPopover/MenuPopover.js +5 -7
  122. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  123. package/lib/components/MenuPopover/MenuPopover.types.js +1 -2
  124. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  125. package/lib/components/MenuPopover/index.js +0 -1
  126. package/lib/components/MenuPopover/index.js.map +1 -1
  127. package/lib/components/MenuPopover/renderMenuPopover.js +9 -14
  128. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  129. package/lib/components/MenuPopover/useMenuPopover.js +87 -91
  130. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  131. package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  132. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +5 -7
  133. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  134. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +1 -2
  135. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  136. package/lib/components/MenuSplitGroup/index.js +0 -1
  137. package/lib/components/MenuSplitGroup/index.js.map +1 -1
  138. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +4 -9
  139. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  140. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +45 -47
  141. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  142. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  143. package/lib/components/MenuTrigger/MenuTrigger.js +3 -5
  144. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  145. package/lib/components/MenuTrigger/MenuTrigger.types.js +0 -1
  146. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  147. package/lib/components/MenuTrigger/index.js +0 -1
  148. package/lib/components/MenuTrigger/index.js.map +1 -1
  149. package/lib/components/MenuTrigger/renderMenuTrigger.js +4 -6
  150. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  151. package/lib/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -1
  152. package/lib/components/index.js +0 -1
  153. package/lib/components/index.js.map +1 -1
  154. package/lib/contexts/menuContext.js +21 -22
  155. package/lib/contexts/menuContext.js.map +1 -1
  156. package/lib/contexts/menuGroupContext.js +3 -4
  157. package/lib/contexts/menuGroupContext.js.map +1 -1
  158. package/lib/contexts/menuListContext.js +8 -9
  159. package/lib/contexts/menuListContext.js.map +1 -1
  160. package/lib/contexts/menuTriggerContext.js +2 -4
  161. package/lib/contexts/menuTriggerContext.js.map +1 -1
  162. package/lib/index.js +0 -1
  163. package/lib/index.js.map +1 -1
  164. package/lib/selectable/index.js +0 -1
  165. package/lib/selectable/index.js.map +1 -1
  166. package/lib/selectable/types.js +0 -1
  167. package/lib/selectable/types.js.map +1 -1
  168. package/lib/selectable/useCheckmarkStyles.styles.js.map +1 -1
  169. package/lib/utils/index.js +0 -1
  170. package/lib/utils/index.js.map +1 -1
  171. package/lib/utils/useIsSubmenu.js +4 -6
  172. package/lib/utils/useIsSubmenu.js.map +1 -1
  173. package/lib/utils/useOnMenuEnter.js +39 -44
  174. package/lib/utils/useOnMenuEnter.js.map +1 -1
  175. package/lib-commonjs/Menu.js +0 -3
  176. package/lib-commonjs/Menu.js.map +1 -1
  177. package/lib-commonjs/MenuDivider.js +0 -3
  178. package/lib-commonjs/MenuDivider.js.map +1 -1
  179. package/lib-commonjs/MenuGroup.js +0 -3
  180. package/lib-commonjs/MenuGroup.js.map +1 -1
  181. package/lib-commonjs/MenuGroupHeader.js +0 -3
  182. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  183. package/lib-commonjs/MenuItem.js +0 -3
  184. package/lib-commonjs/MenuItem.js.map +1 -1
  185. package/lib-commonjs/MenuItemCheckbox.js +0 -3
  186. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  187. package/lib-commonjs/MenuItemRadio.js +0 -3
  188. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  189. package/lib-commonjs/MenuList.js +0 -3
  190. package/lib-commonjs/MenuList.js.map +1 -1
  191. package/lib-commonjs/MenuPopover.js +0 -3
  192. package/lib-commonjs/MenuPopover.js.map +1 -1
  193. package/lib-commonjs/MenuSplitGroup.js +0 -3
  194. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  195. package/lib-commonjs/MenuTrigger.js +0 -3
  196. package/lib-commonjs/MenuTrigger.js.map +1 -1
  197. package/lib-commonjs/components/Menu/Menu.js +1 -3
  198. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  199. package/lib-commonjs/components/Menu/Menu.types.js +0 -3
  200. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  201. package/lib-commonjs/components/Menu/index.js +0 -3
  202. package/lib-commonjs/components/Menu/index.js.map +1 -1
  203. package/lib-commonjs/components/Menu/renderMenu.js +1 -3
  204. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  205. package/lib-commonjs/components/Menu/useMenu.js +2 -5
  206. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  207. package/lib-commonjs/components/Menu/useMenuContextValues.js +1 -3
  208. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  209. package/lib-commonjs/components/MenuDivider/MenuDivider.js +1 -3
  210. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  211. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +0 -3
  212. package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
  213. package/lib-commonjs/components/MenuDivider/index.js +0 -3
  214. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  215. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +1 -3
  216. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  217. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +1 -3
  218. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  219. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +0 -2
  220. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  221. package/lib-commonjs/components/MenuGroup/MenuGroup.js +1 -3
  222. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  223. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +0 -3
  224. package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
  225. package/lib-commonjs/components/MenuGroup/index.js +0 -3
  226. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  227. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +1 -3
  228. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  229. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +1 -3
  230. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  231. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +1 -3
  232. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  233. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js +0 -2
  234. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
  235. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +1 -3
  236. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  237. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -3
  238. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  239. package/lib-commonjs/components/MenuGroupHeader/index.js +0 -3
  240. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  241. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
  242. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  243. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +1 -3
  244. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  245. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +0 -2
  246. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  247. package/lib-commonjs/components/MenuItem/MenuItem.js +1 -3
  248. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  249. package/lib-commonjs/components/MenuItem/MenuItem.types.js +0 -3
  250. package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
  251. package/lib-commonjs/components/MenuItem/index.js +0 -3
  252. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  253. package/lib-commonjs/components/MenuItem/renderMenuItem.js +1 -3
  254. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  255. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -3
  256. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  257. package/lib-commonjs/components/MenuItem/useMenuItem.js +3 -5
  258. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  259. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +12 -14
  260. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  261. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +1 -3
  262. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  263. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -3
  264. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  265. package/lib-commonjs/components/MenuItemCheckbox/index.js +0 -3
  266. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  267. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -3
  268. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  269. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +1 -3
  270. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  271. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +0 -2
  272. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  273. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +1 -3
  274. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  275. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +0 -3
  276. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  277. package/lib-commonjs/components/MenuItemRadio/index.js +0 -3
  278. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  279. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +1 -3
  280. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  281. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +1 -3
  282. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  283. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +0 -2
  284. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  285. package/lib-commonjs/components/MenuList/MenuList.js +1 -3
  286. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  287. package/lib-commonjs/components/MenuList/MenuList.types.js +0 -3
  288. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  289. package/lib-commonjs/components/MenuList/index.js +0 -3
  290. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  291. package/lib-commonjs/components/MenuList/renderMenuList.js +1 -3
  292. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  293. package/lib-commonjs/components/MenuList/useMenuList.js +1 -3
  294. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  295. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +1 -3
  296. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  297. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +0 -2
  298. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  299. package/lib-commonjs/components/MenuPopover/MenuPopover.js +1 -3
  300. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  301. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +0 -3
  302. package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
  303. package/lib-commonjs/components/MenuPopover/index.js +0 -3
  304. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  305. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +1 -3
  306. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  307. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +1 -3
  308. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  309. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +0 -2
  310. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  311. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +1 -3
  312. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  313. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -3
  314. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  315. package/lib-commonjs/components/MenuSplitGroup/index.js +0 -3
  316. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  317. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
  318. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  319. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +1 -3
  320. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  321. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +0 -2
  322. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  323. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +1 -3
  324. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  325. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +0 -3
  326. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  327. package/lib-commonjs/components/MenuTrigger/index.js +0 -3
  328. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  329. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +1 -3
  330. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  331. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.styles.js +0 -2
  332. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -1
  333. package/lib-commonjs/components/index.js +0 -3
  334. package/lib-commonjs/components/index.js.map +1 -1
  335. package/lib-commonjs/contexts/menuContext.js +2 -4
  336. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  337. package/lib-commonjs/contexts/menuGroupContext.js +1 -3
  338. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  339. package/lib-commonjs/contexts/menuListContext.js +2 -4
  340. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  341. package/lib-commonjs/contexts/menuTriggerContext.js +1 -3
  342. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  343. package/lib-commonjs/index.js +0 -3
  344. package/lib-commonjs/index.js.map +1 -1
  345. package/lib-commonjs/selectable/index.js +0 -3
  346. package/lib-commonjs/selectable/index.js.map +1 -1
  347. package/lib-commonjs/selectable/types.js +0 -3
  348. package/lib-commonjs/selectable/types.js.map +1 -1
  349. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js +0 -2
  350. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
  351. package/lib-commonjs/utils/index.js +0 -3
  352. package/lib-commonjs/utils/index.js.map +1 -1
  353. package/lib-commonjs/utils/useIsSubmenu.js +1 -3
  354. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  355. package/lib-commonjs/utils/useOnMenuEnter.js +1 -3
  356. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  357. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMenuContext_unstable","useIsSubmenu","useFocusFinders","useFluent_unstable","useFluent","ArrowRight","ArrowLeft","Escape","ArrowDown","applyTriggerPropsToChildren","getTriggerChild","isHTMLElement","mergeCallbacks","useEventCallback","useMergedRefs","useARIAButtonProps","useMenuTrigger_unstable","props","children","disableButtonEnhancement","triggerRef","context","menuPopoverRef","setOpen","open","triggerId","openOnHover","openOnContext","isSubmenu","findFirstFocusable","focusFirst","useCallback","firstFocusable","current","focus","openedWithKeyboardRef","useRef","hasMouseMoved","dir","OpenArrowKey","child","onContextMenu","event","isTargetDisabled","preventDefault","keyboard","type","onClick","onKeyDown","key","onMouseEnter","onMouseMove","onMouseLeave","contextMenuProps","id","ref","triggerChildProps","undefined","ariaButtonTriggerChildProps","isDisabled","el","hasAttribute","getAttribute","target","currentTarget"],"sources":["../../../src/components/MenuTrigger/useMenuTrigger.styles.ts"],"sourcesContent":["import * as React from 'react';\nimport { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n isHTMLElement,\n mergeCallbacks,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */\nexport const useMenuTrigger_unstable = (props: MenuTriggerProps): MenuTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n\n const triggerRef = useMenuContext_unstable(context => context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const open = useMenuContext_unstable(context => context.open);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const openOnHover = useMenuContext_unstable(context => context.openOnHover);\n const openOnContext = useMenuContext_unstable(context => context.openOnContext);\n\n const isSubmenu = useIsSubmenu();\n\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, menuPopoverRef]);\n\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n\n const child = getTriggerChild(children);\n\n const onContextMenu = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n if (openOnContext) {\n event.preventDefault();\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerContextMenu', event });\n }\n };\n\n const onClick = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n if (!openOnContext) {\n setOpen(event, { open: !open, keyboard: openedWithKeyboardRef.current, type: 'menuTriggerClick', event });\n openedWithKeyboardRef.current = false;\n }\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n const key = event.key;\n\n if (!openOnContext && ((isSubmenu && key === OpenArrowKey) || (!isSubmenu && key === ArrowDown))) {\n setOpen(event, { open: true, keyboard: true, type: 'menuTriggerKeyDown', event });\n }\n\n if (key === Escape && !isSubmenu) {\n setOpen(event, { open: false, keyboard: true, type: 'menuTriggerKeyDown', event });\n }\n\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n\n const onMouseEnter = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerMouseEnter', event });\n }\n };\n\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerMouseMove', event });\n hasMouseMoved.current = true;\n }\n };\n\n const onMouseLeave = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover) {\n setOpen(event, { open: false, keyboard: false, type: 'menuTriggerMouseLeave', event });\n }\n };\n\n const contextMenuProps = {\n id: triggerId,\n ...child?.props,\n ref: useMergedRefs(triggerRef, child?.ref),\n onMouseEnter: useEventCallback(mergeCallbacks(child?.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child?.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child?.props.onContextMenu, onContextMenu)),\n onMouseMove: useEventCallback(mergeCallbacks(child?.props.onMouseMove, onMouseMove)),\n };\n\n const triggerChildProps = {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child?.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child?.props.onKeyDown, onKeyDown)),\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n triggerChildProps,\n );\n\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren(\n children,\n openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n\nconst isTargetDisabled = (event: React.SyntheticEvent | Event) => {\n const isDisabled = (el: HTMLElement) =>\n el.hasAttribute('disabled') || (el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true');\n if (isHTMLElement(event.target) && isDisabled(event.target)) {\n return true;\n }\n\n return isHTMLElement(event.currentTarget) && isDisabled(event.currentTarget);\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,eAAe,QAAQ;AAChC,SAASC,kBAAA,IAAsBC,SAAS,QAAQ;AAChD,SAASC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,SAAS,QAAQ;AACzD,SACEC,2BAA2B,EAC3BC,eAAe,EACfC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,aAAa,QACR;AACP,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;AAMA,OAAO,MAAMC,uBAAA,GAA2BC,KAAA,IAA8C;EACpF,MAAM;IAAEC,QAAA;IAAUC,wBAAA,GAA2B;EAAK,CAAE,GAAGF,KAAA;EAEvD,MAAMG,UAAA,GAAapB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQD,UAAU;EACxE,MAAME,cAAA,GAAiBtB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQC,cAAc;EAChF,MAAMC,OAAA,GAAUvB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQE,OAAO;EAClE,MAAMC,IAAA,GAAOxB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQG,IAAI;EAC5D,MAAMC,SAAA,GAAYzB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQI,SAAS;EACtE,MAAMC,WAAA,GAAc1B,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQK,WAAW;EAC1E,MAAMC,aAAA,GAAgB3B,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,C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,KAAA,CAAOvB,KAAK,CAAC8B,OAAO,EAAEA,OAAA;IAC/DC,SAAA,EAAWnC,gBAAA,CAAiBD,cAAA,CAAe4B,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOvB,KAAK,CAAC+B,SAAS,EAAEA,SAAA;EACrE;EAEA,MAAMU,2BAAA,GAA8B3C,kBAAA,CAClC,CAAAyB,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOM,IAAI,MAAK,YAAY,CAAAN,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOM,IAAI,MAAK,MAAMN,KAAA,CAAMM,IAAI,GAAG,KAAK,EACpEU,iBAAA;EAGF,OAAO;IACL5B,SAAA;IACAV,QAAA,EAAUT,2BAAA,CACRS,QAAA,EACAS,aAAA,GAAgB0B,gBAAA,GAAmBlC,wBAAA,GAA2BqC,iBAAA,GAAoBE,2BAA2B;EAEjH;AACF;AAEA,MAAMf,gBAAA,GAAoBD,KAAA,IAAwC;EAChE,MAAMiB,UAAA,GAAcC,EAAA,IAClBA,EAAA,CAAGC,YAAY,CAAC,eAAgBD,EAAA,CAAGC,YAAY,CAAC,oBAAoBD,EAAA,CAAGE,YAAY,CAAC,qBAAqB;EAC3G,IAAInD,aAAA,CAAc+B,KAAA,CAAMqB,MAAM,KAAKJ,UAAA,CAAWjB,KAAA,CAAMqB,MAAM,GAAG;IAC3D,OAAO,IAAI;EACb;EAEA,OAAOpD,aAAA,CAAc+B,KAAA,CAAMsB,aAAa,KAAKL,UAAA,CAAWjB,KAAA,CAAMsB,aAAa;AAC7E"}
1
+ {"version":3,"names":["React","useMenuContext_unstable","useIsSubmenu","useFocusFinders","useFluent_unstable","useFluent","ArrowRight","ArrowLeft","Escape","ArrowDown","applyTriggerPropsToChildren","getTriggerChild","isHTMLElement","mergeCallbacks","useEventCallback","useMergedRefs","useARIAButtonProps","useMenuTrigger_unstable","props","children","disableButtonEnhancement","triggerRef","context","menuPopoverRef","setOpen","open","triggerId","openOnHover","openOnContext","isSubmenu","findFirstFocusable","focusFirst","useCallback","firstFocusable","current","focus","openedWithKeyboardRef","useRef","hasMouseMoved","dir","OpenArrowKey","child","onContextMenu","event","isTargetDisabled","preventDefault","keyboard","type","onClick","onKeyDown","key","onMouseEnter","onMouseMove","onMouseLeave","contextMenuProps","id","ref","triggerChildProps","undefined","ariaButtonTriggerChildProps","isDisabled","el","hasAttribute","getAttribute","target","currentTarget"],"sources":["useMenuTrigger.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport { applyTriggerPropsToChildren, getTriggerChild, isHTMLElement, mergeCallbacks, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */ export const useMenuTrigger_unstable = (props)=>{\n const { children , disableButtonEnhancement =false } = props;\n const triggerRef = useMenuContext_unstable((context)=>context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable((context)=>context.menuPopoverRef);\n const setOpen = useMenuContext_unstable((context)=>context.setOpen);\n const open = useMenuContext_unstable((context)=>context.open);\n const triggerId = useMenuContext_unstable((context)=>context.triggerId);\n const openOnHover = useMenuContext_unstable((context)=>context.openOnHover);\n const openOnContext = useMenuContext_unstable((context)=>context.openOnContext);\n const isSubmenu = useIsSubmenu();\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(()=>{\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n }, [\n findFirstFocusable,\n menuPopoverRef\n ]);\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n const child = getTriggerChild(children);\n const onContextMenu = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnContext) {\n event.preventDefault();\n setOpen(event, {\n open: true,\n keyboard: false,\n type: 'menuTriggerContextMenu',\n event\n });\n }\n };\n const onClick = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n if (!openOnContext) {\n setOpen(event, {\n open: !open,\n keyboard: openedWithKeyboardRef.current,\n type: 'menuTriggerClick',\n event\n });\n openedWithKeyboardRef.current = false;\n }\n };\n const onKeyDown = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n const key = event.key;\n if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === ArrowDown)) {\n setOpen(event, {\n open: true,\n keyboard: true,\n type: 'menuTriggerKeyDown',\n event\n });\n }\n if (key === Escape && !isSubmenu) {\n setOpen(event, {\n open: false,\n keyboard: true,\n type: 'menuTriggerKeyDown',\n event\n });\n }\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n const onMouseEnter = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(event, {\n open: true,\n keyboard: false,\n type: 'menuTriggerMouseEnter',\n event\n });\n }\n };\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(event, {\n open: true,\n keyboard: false,\n type: 'menuTriggerMouseMove',\n event\n });\n hasMouseMoved.current = true;\n }\n };\n const onMouseLeave = (event)=>{\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover) {\n setOpen(event, {\n open: false,\n keyboard: false,\n type: 'menuTriggerMouseLeave',\n event\n });\n }\n };\n const contextMenuProps = {\n id: triggerId,\n ...child === null || child === void 0 ? void 0 : child.props,\n ref: useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref),\n onMouseEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),\n onMouseMove: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseMove, onMouseMove))\n };\n const triggerChildProps = {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren(children, openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\nconst isTargetDisabled = (event)=>{\n const isDisabled = (el)=>el.hasAttribute('disabled') || el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true';\n if (isHTMLElement(event.target) && isDisabled(event.target)) {\n return true;\n }\n return isHTMLElement(event.currentTarget) && isDisabled(event.currentTarget);\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,YAAY,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D,MAAMf,gBAAgB,GAAID,KAAK,IAAG;EAC9B,MAAMiB,UAAU,GAAIC,EAAE,IAAGA,EAAE,CAACC,YAAY,CAAC,UAAU,CAAC,IAAID,EAAE,CAACC,YAAY,CAAC,eAAe,CAAC,IAAID,EAAE,CAACE,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;EACvI,IAAInD,aAAa,CAAC+B,KAAK,CAACqB,MAAM,CAAC,IAAIJ,UAAU,CAACjB,KAAK,CAACqB,MAAM,CAAC,EAAE;IACzD,OAAO,IAAI;EACf;EACA,OAAOpD,aAAa,CAAC+B,KAAK,CAACsB,aAAa,CAAC,IAAIL,UAAU,CAACjB,KAAK,CAACsB,aAAa,CAAC;AAChF,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './MenuItem/index';
2
2
  export * from './MenuList/index';
3
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './MenuItem/index';\nexport * from './MenuList/index';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './MenuItem/index';\nexport * from './MenuList/index';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,mBAAmB"}
@@ -1,27 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
3
- export const MenuContext = /*#__PURE__*/createContext(undefined);
3
+ export const MenuContext = createContext(undefined);
4
4
  const menuContextDefaultValue = {
5
- open: false,
6
- setOpen: () => false,
7
- checkedValues: {},
8
- onCheckedValueChange: () => null,
9
- isSubmenu: false,
10
- triggerRef: {
11
- current: null
12
- },
13
- menuPopoverRef: {
14
- current: null
15
- },
16
- mountNode: null,
17
- triggerId: '',
18
- openOnContext: false,
19
- openOnHover: false,
20
- hasIcons: false,
21
- hasCheckmarks: false,
22
- inline: false,
23
- persistOnItemClick: false
5
+ open: false,
6
+ setOpen: ()=>false,
7
+ checkedValues: {},
8
+ onCheckedValueChange: ()=>null,
9
+ isSubmenu: false,
10
+ triggerRef: {
11
+ current: null
12
+ },
13
+ menuPopoverRef: {
14
+ current: null
15
+ },
16
+ mountNode: null,
17
+ triggerId: '',
18
+ openOnContext: false,
19
+ openOnHover: false,
20
+ hasIcons: false,
21
+ hasCheckmarks: false,
22
+ inline: false,
23
+ persistOnItemClick: false
24
24
  };
25
25
  export const MenuProvider = MenuContext.Provider;
26
- export const useMenuContext_unstable = selector => useContextSelector(MenuContext, (ctx = menuContextDefaultValue) => selector(ctx));
27
- //# sourceMappingURL=menuContext.js.map
26
+ export const useMenuContext_unstable = (selector)=>useContextSelector(MenuContext, (ctx = menuContextDefaultValue)=>selector(ctx));
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useContextSelector","MenuContext","undefined","menuContextDefaultValue","open","setOpen","checkedValues","onCheckedValueChange","isSubmenu","triggerRef","current","menuPopoverRef","mountNode","triggerId","openOnContext","openOnHover","hasIcons","hasCheckmarks","inline","persistOnItemClick","MenuProvider","Provider","useMenuContext_unstable","selector","ctx"],"sources":["../../src/contexts/menuContext.ts"],"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 { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue | undefined>(\n undefined,\n) as Context<MenuContextValue>;\n\nconst menuContextDefaultValue: MenuContextValue = {\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n isSubmenu: false,\n triggerRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n mountNode: null,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n inline: false,\n persistOnItemClick: false,\n};\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'mountNode'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n> & {\n open: boolean;\n triggerId: string;\n /**\n * Default values to be checked on mount\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n};\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, (ctx = menuContextDefaultValue) => selector(ctx));\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ;AAIlD,OAAO,MAAMC,WAAA,gBAAyCF,aAAA,CACpDG,SAAA;AAGF,MAAMC,uBAAA,GAA4C;EAChDC,IAAA,EAAM,KAAK;EACXC,OAAA,EAASA,CAAA,KAAM,KAAK;EACpBC,aAAA,EAAe,CAAC;EAChBC,oBAAA,EAAsBA,CAAA,KAAM,IAAI;EAChCC,SAAA,EAAW,KAAK;EAChBC,UAAA,EAAY;IAAEC,OAAA,EAAS;EAAK;EAC5BC,cAAA,EAAgB;IAAED,OAAA,EAAS;EAAK;EAChCE,SAAA,EAAW,IAAI;EACfC,SAAA,EAAW;EACXC,aAAA,EAAe,KAAK;EACpBC,WAAA,EAAa,KAAK;EAClBC,QAAA,EAAU,KAAK;EACfC,aAAA,EAAe,KAAK;EACpBC,MAAA,EAAQ,KAAK;EACbC,kBAAA,EAAoB;AACtB;AAkCA,OAAO,MAAMC,YAAA,GAAenB,WAAA,CAAYoB,QAAQ;AAEhD,OAAO,MAAMC,uBAAA,GAA8BC,QAAA,IACzCvB,kBAAA,CAAmBC,WAAA,EAAa,CAACuB,GAAA,GAAMrB,uBAAuB,KAAKoB,QAAA,CAASC,GAAA"}
1
+ {"version":3,"sources":["menuContext.ts"],"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 { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue | undefined>(\n undefined,\n) as Context<MenuContextValue>;\n\nconst menuContextDefaultValue: MenuContextValue = {\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n isSubmenu: false,\n triggerRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n mountNode: null,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n inline: false,\n persistOnItemClick: false,\n};\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'mountNode'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n> & {\n open: boolean;\n triggerId: string;\n /**\n * Default values to be checked on mount\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n};\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, (ctx = menuContextDefaultValue) => selector(ctx));\n"],"names":["React","createContext","useContextSelector","MenuContext","undefined","menuContextDefaultValue","open","setOpen","checkedValues","onCheckedValueChange","isSubmenu","triggerRef","current","menuPopoverRef","mountNode","triggerId","openOnContext","openOnHover","hasIcons","hasCheckmarks","inline","persistOnItemClick","MenuProvider","Provider","useMenuContext_unstable","selector","ctx"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,cAAyCF,cACpDG,WAC6B;AAE/B,MAAMC,0BAA4C;IAChDC,MAAM,KAAK;IACXC,SAAS,IAAM,KAAK;IACpBC,eAAe,CAAC;IAChBC,sBAAsB,IAAM,IAAI;IAChCC,WAAW,KAAK;IAChBC,YAAY;QAAEC,SAAS,IAAI;IAAC;IAC5BC,gBAAgB;QAAED,SAAS,IAAI;IAAC;IAChCE,WAAW,IAAI;IACfC,WAAW;IACXC,eAAe,KAAK;IACpBC,aAAa,KAAK;IAClBC,UAAU,KAAK;IACfC,eAAe,KAAK;IACpBC,QAAQ,KAAK;IACbC,oBAAoB,KAAK;AAC3B;AAkCA,OAAO,MAAMC,eAAenB,YAAYoB,QAAQ,CAAC;AAEjD,OAAO,MAAMC,0BAA0B,CAAIC,WACzCvB,mBAAmBC,aAAa,CAACuB,MAAMrB,uBAAuB,GAAKoB,SAASC,MAAM"}
@@ -1,9 +1,8 @@
1
1
  import * as React from 'react';
2
- const MenuGroupContext = /*#__PURE__*/React.createContext(undefined);
2
+ const MenuGroupContext = React.createContext(undefined);
3
3
  const menuGroupContextDefaultValue = {
4
- headerId: ''
4
+ headerId: ''
5
5
  };
6
6
  export const MenuGroupContextProvider = MenuGroupContext.Provider;
7
7
  var _React_useContext;
8
- export const useMenuGroupContext_unstable = () => (_React_useContext = React.useContext(MenuGroupContext)) !== null && _React_useContext !== void 0 ? _React_useContext : menuGroupContextDefaultValue;
9
- //# sourceMappingURL=menuGroupContext.js.map
8
+ export const useMenuGroupContext_unstable = ()=>(_React_useContext = React.useContext(MenuGroupContext)) !== null && _React_useContext !== void 0 ? _React_useContext : menuGroupContextDefaultValue;
@@ -1 +1 @@
1
- {"version":3,"names":["React","MenuGroupContext","createContext","undefined","menuGroupContextDefaultValue","headerId","MenuGroupContextProvider","Provider","_React_useContext","useMenuGroupContext_unstable","useContext"],"sources":["../../src/contexts/menuGroupContext.ts"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,MAAMC,gBAAA,gBAAmBD,KAAA,CAAME,aAAa,CAC1CC,SAAA;AAGF,MAAMC,4BAAA,GAAsD;EAC1DC,QAAA,EAAU;AACZ;AAaA,OAAO,MAAMC,wBAAA,GAA2BL,gBAAA,CAAiBM,QAAQ;IACfC,iBAAA;AAAlD,OAAO,MAAMC,4BAAA,GAA+BA,CAAA,KAAM,CAAAD,iBAAA,GAAAR,KAAA,CAAMU,UAAU,CAACT,gBAAA,eAAjBO,iBAAA,cAAAA,iBAAA,GAAsCJ,4BAA4B"}
1
+ {"version":3,"sources":["menuGroupContext.ts"],"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"],"names":["React","MenuGroupContext","createContext","undefined","menuGroupContextDefaultValue","headerId","MenuGroupContextProvider","Provider","useMenuGroupContext_unstable","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,MAAMC,mBAAmBD,MAAME,aAAa,CAC1CC;AAGF,MAAMC,+BAAsD;IAC1DC,UAAU;AACZ;AAaA,OAAO,MAAMC,2BAA2BL,iBAAiBM,QAAQ,CAAC;IAChBP;AAAlD,OAAO,MAAMQ,+BAA+B,IAAMR,CAAAA,oBAAAA,MAAMS,UAAU,CAACR,+BAAjBD,+BAAAA,oBAAsCI,4BAA4B,CAAC"}
@@ -1,14 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
3
- export const MenuListContext = /*#__PURE__*/createContext(undefined);
3
+ export const MenuListContext = createContext(undefined);
4
4
  const menuListContextDefaultValue = {
5
- checkedValues: {},
6
- setFocusByFirstCharacter: () => null,
7
- toggleCheckbox: () => null,
8
- selectRadio: () => null,
9
- hasIcons: false,
10
- hasCheckmarks: false
5
+ checkedValues: {},
6
+ setFocusByFirstCharacter: ()=>null,
7
+ toggleCheckbox: ()=>null,
8
+ selectRadio: ()=>null,
9
+ hasIcons: false,
10
+ hasCheckmarks: false
11
11
  };
12
12
  export const MenuListProvider = MenuListContext.Provider;
13
- export const useMenuListContext_unstable = selector => useContextSelector(MenuListContext, (ctx = menuListContextDefaultValue) => selector(ctx));
14
- //# sourceMappingURL=menuListContext.js.map
13
+ export const useMenuListContext_unstable = (selector)=>useContextSelector(MenuListContext, (ctx = menuListContextDefaultValue)=>selector(ctx));
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useContextSelector","MenuListContext","undefined","menuListContextDefaultValue","checkedValues","setFocusByFirstCharacter","toggleCheckbox","selectRadio","hasIcons","hasCheckmarks","MenuListProvider","Provider","useMenuListContext_unstable","selector","ctx"],"sources":["../../src/contexts/menuListContext.tsx"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ;AAKlD,OAAO,MAAMC,eAAA,gBAAiDF,aAAA,CAC5DG,SAAA;AAGF,MAAMC,2BAAA,GAAoD;EACxDC,aAAA,EAAe,CAAC;EAChBC,wBAAA,EAA0BA,CAAA,KAAM,IAAI;EACpCC,cAAA,EAAgBA,CAAA,KAAM,IAAI;EAC1BC,WAAA,EAAaA,CAAA,KAAM,IAAI;EACvBC,QAAA,EAAU,KAAK;EACfC,aAAA,EAAe;AACjB;AAqBA,OAAO,MAAMC,gBAAA,GAAmBT,eAAA,CAAgBU,QAAQ;AAExD,OAAO,MAAMC,2BAAA,GAAmCC,QAAA,IAC9Cb,kBAAA,CAAmBC,eAAA,EAAiB,CAACa,GAAA,GAAMX,2BAA2B,KAAKU,QAAA,CAASC,GAAA"}
1
+ {"version":3,"sources":["menuListContext.tsx"],"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"],"names":["React","createContext","useContextSelector","MenuListContext","undefined","menuListContextDefaultValue","checkedValues","setFocusByFirstCharacter","toggleCheckbox","selectRadio","hasIcons","hasCheckmarks","MenuListProvider","Provider","useMenuListContext_unstable","selector","ctx"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAKrF,OAAO,MAAMC,kBAAiDF,cAC5DG,WACiC;AAEnC,MAAMC,8BAAoD;IACxDC,eAAe,CAAC;IAChBC,0BAA0B,IAAM,IAAI;IACpCC,gBAAgB,IAAM,IAAI;IAC1BC,aAAa,IAAM,IAAI;IACvBC,UAAU,KAAK;IACfC,eAAe,KAAK;AACtB;AAqBA,OAAO,MAAMC,mBAAmBT,gBAAgBU,QAAQ,CAAC;AAEzD,OAAO,MAAMC,8BAA8B,CAAKC,WAC9Cb,mBAAmBC,iBAAiB,CAACa,MAAMX,2BAA2B,GAAKU,SAASC,MAAM"}
@@ -1,10 +1,8 @@
1
1
  import * as React from 'react';
2
2
  /**
3
3
  * Context used communicate with a child menu item that it is a trigger for a submenu
4
- */
5
- const MenuTriggerContext = /*#__PURE__*/React.createContext(undefined);
4
+ */ const MenuTriggerContext = React.createContext(undefined);
6
5
  const menuTriggerContextDefaultValue = false;
7
6
  export const MenuTriggerContextProvider = MenuTriggerContext.Provider;
8
7
  var _React_useContext;
9
- export const useMenuTriggerContext_unstable = () => (_React_useContext = React.useContext(MenuTriggerContext)) !== null && _React_useContext !== void 0 ? _React_useContext : menuTriggerContextDefaultValue;
10
- //# sourceMappingURL=menuTriggerContext.js.map
8
+ export const useMenuTriggerContext_unstable = ()=>(_React_useContext = React.useContext(MenuTriggerContext)) !== null && _React_useContext !== void 0 ? _React_useContext : menuTriggerContextDefaultValue;
@@ -1 +1 @@
1
- {"version":3,"names":["React","MenuTriggerContext","createContext","undefined","menuTriggerContextDefaultValue","MenuTriggerContextProvider","Provider","_React_useContext","useMenuTriggerContext_unstable","useContext"],"sources":["../../src/contexts/menuTriggerContext.ts"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB;;;AAGA,MAAMC,kBAAA,gBAAqBD,KAAA,CAAME,aAAa,CAAsBC,SAAA;AAEpE,MAAMC,8BAAA,GAAiC,KAAK;AAE5C,OAAO,MAAMC,0BAAA,GAA6BJ,kBAAA,CAAmBK,QAAQ;IAEnEC,iBAAA;AADF,OAAO,MAAMC,8BAAA,GAAiCA,CAAA,KAC5C,CAAAD,iBAAA,GAAAP,KAAA,CAAMS,UAAU,CAACR,kBAAA,eAAjBM,iBAAA,cAAAA,iBAAA,GAAwCH,8BAA8B"}
1
+ {"version":3,"sources":["menuTriggerContext.ts"],"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"],"names":["React","MenuTriggerContext","createContext","undefined","menuTriggerContextDefaultValue","MenuTriggerContextProvider","Provider","useMenuTriggerContext_unstable","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B;;CAEC,GACD,MAAMC,qBAAqBD,MAAME,aAAa,CAAsBC;AAEpE,MAAMC,iCAAiC,KAAK;AAE5C,OAAO,MAAMC,6BAA6BJ,mBAAmBK,QAAQ,CAAC;IAEpEN;AADF,OAAO,MAAMO,iCAAiC,IAC5CP,CAAAA,oBAAAA,MAAMQ,UAAU,CAACP,iCAAjBD,+BAAAA,oBAAwCI,8BAA8B,CAAC"}
package/lib/index.js CHANGED
@@ -14,4 +14,3 @@ export { MenuPopover, menuPopoverClassNames, renderMenuPopover_unstable, useMenu
14
14
  export { MenuSplitGroup, menuSplitGroupClassNames, renderMenuSplitGroup_unstable, useMenuSplitGroupStyles_unstable, useMenuSplitGroup_unstable } from './MenuSplitGroup';
15
15
  export { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';
16
16
  export { useCheckmarkStyles_unstable } from './selectable/index';
17
- //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["MenuProvider","useMenuContext_unstable","MenuTriggerContextProvider","useMenuTriggerContext_unstable","MenuGroupContextProvider","useMenuGroupContext_unstable","MenuListProvider","useMenuListContext_unstable","Menu","renderMenu_unstable","useMenuContextValues_unstable","useMenu_unstable","MenuDivider","menuDividerClassNames","renderMenuDivider_unstable","useMenuDividerStyles_unstable","useMenuDivider_unstable","MenuGroup","menuGroupClassNames","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useMenuGroup_unstable","MenuGroupHeader","menuGroupHeaderClassNames","renderMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","useMenuGroupHeader_unstable","MenuItem","menuItemClassNames","renderMenuItem_unstable","useMenuItemStyles_unstable","useMenuItem_unstable","MenuItemCheckbox","menuItemCheckboxClassNames","renderMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useMenuItemCheckbox_unstable","MenuItemRadio","menuItemRadioClassNames","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable","MenuList","menuListClassNames","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useMenuList_unstable","MenuPopover","menuPopoverClassNames","renderMenuPopover_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable","MenuSplitGroup","menuSplitGroupClassNames","renderMenuSplitGroup_unstable","useMenuSplitGroupStyles_unstable","useMenuSplitGroup_unstable","MenuTrigger","renderMenuTrigger_unstable","useMenuTrigger_unstable","useCheckmarkStyles_unstable"],"sources":["../src/index.ts"],"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"],"mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ;AAEtD,SAASC,0BAA0B,EAAEC,8BAA8B,QAAQ;AAC3E,SAASC,wBAAwB,EAAEC,4BAA4B,QAAQ;AAEvE,SAASC,gBAAgB,EAAEC,2BAA2B,QAAQ;AAG9D,SAASC,IAAI,EAAEC,mBAAmB,EAAEC,6BAA6B,EAAEC,gBAAgB,QAAQ;AAY3F,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB;AAEP,SACEC,SAAS,EACTC,mBAAmB,EACnBC,wBAAwB,EACxBC,kCAAkC,EAClCC,2BAA2B,EAC3BC,qBAAqB,QAChB;AAEP,SACEC,eAAe,EACfC,yBAAyB,EACzBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,2BAA2B,QACtB;AAEP,SACEC,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf;AAEP,SACEC,gBAAgB,EAChBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,kCAAkC,EAClCC,4BAA4B,QACvB;AAEP,SACEC,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB;AAEP,SACEC,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,oBAAoB,QACf;AAYP,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB;AAEP,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB;AAEP,SAASC,WAAW,EAAEC,0BAA0B,EAAEC,uBAAuB,QAAQ;AAGjF,SAASC,2BAA2B,QAAQ"}
1
+ {"version":3,"sources":["index.ts"],"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"],"names":["MenuProvider","useMenuContext_unstable","MenuTriggerContextProvider","useMenuTriggerContext_unstable","MenuGroupContextProvider","useMenuGroupContext_unstable","MenuListProvider","useMenuListContext_unstable","Menu","renderMenu_unstable","useMenuContextValues_unstable","useMenu_unstable","MenuDivider","menuDividerClassNames","renderMenuDivider_unstable","useMenuDividerStyles_unstable","useMenuDivider_unstable","MenuGroup","menuGroupClassNames","renderMenuGroup_unstable","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useMenuGroup_unstable","MenuGroupHeader","menuGroupHeaderClassNames","renderMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","useMenuGroupHeader_unstable","MenuItem","menuItemClassNames","renderMenuItem_unstable","useMenuItemStyles_unstable","useMenuItem_unstable","MenuItemCheckbox","menuItemCheckboxClassNames","renderMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useMenuItemCheckbox_unstable","MenuItemRadio","menuItemRadioClassNames","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable","MenuList","menuListClassNames","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useMenuList_unstable","MenuPopover","menuPopoverClassNames","renderMenuPopover_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable","MenuSplitGroup","menuSplitGroupClassNames","renderMenuSplitGroup_unstable","useMenuSplitGroupStyles_unstable","useMenuSplitGroup_unstable","MenuTrigger","renderMenuTrigger_unstable","useMenuTrigger_unstable","useCheckmarkStyles_unstable"],"mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,yBAAyB;AAE/E,SAASC,0BAA0B,EAAEC,8BAA8B,QAAQ,gCAAgC;AAC3G,SAASC,wBAAwB,EAAEC,4BAA4B,QAAQ,8BAA8B;AAErG,SAASC,gBAAgB,EAAEC,2BAA2B,QAAQ,6BAA6B;AAG3F,SAASC,IAAI,EAAEC,mBAAmB,EAAEC,6BAA6B,EAAEC,gBAAgB,QAAQ,SAAS;AAYpG,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,gBAAgB;AAEvB,SACEC,SAAS,EACTC,mBAAmB,EACnBC,wBAAwB,EACxBC,kCAAkC,EAClCC,2BAA2B,EAC3BC,qBAAqB,QAChB,cAAc;AAErB,SACEC,eAAe,EACfC,yBAAyB,EACzBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,2BAA2B,QACtB,oBAAoB;AAE3B,SACEC,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,aAAa;AAEpB,SACEC,gBAAgB,EAChBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,kCAAkC,EAClCC,4BAA4B,QACvB,qBAAqB;AAE5B,SACEC,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAEzB,SACEC,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,oBAAoB,QACf,aAAa;AAYpB,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,gBAAgB;AAEvB,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SAASC,WAAW,EAAEC,0BAA0B,EAAEC,uBAAuB,QAAQ,gBAAgB;AAGjG,SAASC,2BAA2B,QAAQ,qBAAqB"}
@@ -1,3 +1,2 @@
1
1
  export * from './useCheckmarkStyles.styles';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/selectable/index.ts"],"sourcesContent":["export * from './useCheckmarkStyles.styles';\nexport * from './types';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './useCheckmarkStyles.styles';\nexport * from './types';\n"],"names":[],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,UAAU"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../src/selectable/types.ts"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["types.ts"],"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"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"names":["mergeClasses","__styles","useStyles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","useCheckmarkStyles_unstable","state","styles","checkmark","className","checked"],"sources":["../../src/selectable/useCheckmarkStyles.styles.ts"],"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"],"mappings":"AAAA,SAASA,YAAY,EAAAC,QAAA,QAAoB;AAIzC,MAAMC,SAAA,gBAAYD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,WAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EASlB;AAEA;;;;;AAKA,OAAO,MAAMC,2BAAA,GAA+BC,KAAA,IAAsE;EAChH,MAAMC,MAAA,GAAST,SAAA;EACf,IAAIQ,KAAA,CAAME,SAAS,EAAE;IACnBF,KAAA,CAAME,SAAS,CAACC,SAAS,GAAGb,YAAA,CAC1BW,MAAA,CAAOR,IAAI,EACXO,KAAA,CAAMI,OAAO,IAAIH,MAAA,CAAOJ,WAAW,EACnCG,KAAA,CAAME,SAAS,CAACC,SAAS;EAE7B;AACF"}
1
+ {"version":3,"names":["mergeClasses","__styles","useStyles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","useCheckmarkStyles_unstable","state","styles","checkmark","className","checked"],"sources":["useCheckmarkStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden'\n },\n rootChecked: {\n visibility: 'visible'\n }\n});\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */ export const useCheckmarkStyles_unstable = (state)=>{\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);\n }\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AACzD,MAAMC,SAAS,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,WAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,CASjB,CAAC;AACF;AACA;AACA;AACA;AACA;AAAI,OAAO,MAAMC,2BAA2B,GAAIC,KAAK,IAAG;EACpD,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,IAAIQ,KAAK,CAACE,SAAS,EAAE;IACjBF,KAAK,CAACE,SAAS,CAACC,SAAS,GAAGb,YAAY,CAACW,MAAM,CAACR,IAAI,EAAEO,KAAK,CAACI,OAAO,IAAIH,MAAM,CAACJ,WAAW,EAAEG,KAAK,CAACE,SAAS,CAACC,SAAS,CAAC;EACzH;AACJ,CAAC"}
@@ -1,2 +1 @@
1
1
  export * from './useOnMenuEnter';
2
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './useOnMenuEnter';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './useOnMenuEnter';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB"}
@@ -8,10 +8,8 @@ import { MenuListContext } from '../contexts/menuListContext';
8
8
  * A simple hook to check box contexts easily
9
9
  *
10
10
  * @returns whether the component is part of a submenu
11
- */
12
- export function useIsSubmenu() {
13
- const menuContextValue = useMenuContext_unstable(context => context.isSubmenu);
14
- const hasMenuListContext = useHasParentContext(MenuListContext);
15
- return menuContextValue || hasMenuListContext;
11
+ */ export function useIsSubmenu() {
12
+ const menuContextValue = useMenuContext_unstable((context)=>context.isSubmenu);
13
+ const hasMenuListContext = useHasParentContext(MenuListContext);
14
+ return menuContextValue || hasMenuListContext;
16
15
  }
17
- //# sourceMappingURL=useIsSubmenu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useHasParentContext","useMenuContext_unstable","MenuListContext","useIsSubmenu","menuContextValue","context","isSubmenu","hasMenuListContext"],"sources":["../../src/utils/useIsSubmenu.ts"],"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"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,uBAAuB,QAAQ;AACxC,SAASC,eAAe,QAAQ;AAEhC;;;;;;;;AAQA,OAAO,SAASC,aAAA,EAAe;EAC7B,MAAMC,gBAAA,GAAmBH,uBAAA,CAAwBI,OAAA,IAAWA,OAAA,CAAQC,SAAS;EAC7E,MAAMC,kBAAA,GAAqBP,mBAAA,CAAoBE,eAAA;EAE/C,OAAOE,gBAAA,IAAoBG,kBAAA;AAC7B"}
1
+ {"version":3,"sources":["useIsSubmenu.ts"],"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"],"names":["useHasParentContext","useMenuContext_unstable","MenuListContext","useIsSubmenu","menuContextValue","context","isSubmenu","hasMenuListContext"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;CAOC,GACD,OAAO,SAASC,eAAe;IAC7B,MAAMC,mBAAmBH,wBAAwBI,CAAAA,UAAWA,QAAQC,SAAS;IAC7E,MAAMC,qBAAqBP,oBAAoBE;IAE/C,OAAOE,oBAAoBG;AAC7B,CAAC"}
@@ -3,8 +3,7 @@ import { useEventCallback } from '@fluentui/react-utilities';
3
3
  import { elementContains } from '@fluentui/react-portal';
4
4
  /**
5
5
  * Name of the custom event
6
- */
7
- export const MENU_ENTER_EVENT = 'fuimenuenter';
6
+ */ export const MENU_ENTER_EVENT = 'fuimenuenter';
8
7
  /**
9
8
  * This hook works similarly to @see {useOnClickOutside}
10
9
  *
@@ -15,51 +14,47 @@ export const MENU_ENTER_EVENT = 'fuimenuenter';
15
14
  * We don't use the native mouseenter event because it would trigger too many times in the document
16
15
  * Instead, dispatch custom DOM event from the menu so that it can bubble
17
16
  * Each nested menu can use the listener to check if the event is from a child or parent menu
18
- */
19
- export const useOnMenuMouseEnter = options => {
20
- const {
21
- refs,
22
- callback,
23
- element,
24
- disabled
25
- } = options;
26
- // Keep mouse event here because this is essentially a custom 'mouseenter' event
27
- const listener = useEventCallback(ev => {
28
- const popoverRef = refs[0];
29
- const someMenuPopover = ev.target;
30
- var _popoverRef_current;
31
- // someMenu is a child -> will always be contained because of vParents
32
- // someMenu is a parent -> will always not be contained because no vParent
33
- // someMenu is the current popover -> it will contain itself
34
- const isOutsidePopover = !elementContains((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);
35
- if (isOutsidePopover && !disabled) {
36
- callback(ev);
37
- }
38
- });
39
- React.useEffect(() => {
40
- // eslint-disable-next-line eqeqeq
41
- if (element == null) {
42
- return;
43
- }
44
- if (!disabled) {
45
- element.addEventListener(MENU_ENTER_EVENT, listener);
46
- }
47
- return () => {
48
- element.removeEventListener(MENU_ENTER_EVENT, listener);
49
- };
50
- }, [listener, element, disabled]);
17
+ */ export const useOnMenuMouseEnter = (options)=>{
18
+ const { refs , callback , element , disabled } = options;
19
+ // Keep mouse event here because this is essentially a custom 'mouseenter' event
20
+ const listener = useEventCallback((ev)=>{
21
+ const popoverRef = refs[0];
22
+ const someMenuPopover = ev.target;
23
+ var _popoverRef_current;
24
+ // someMenu is a child -> will always be contained because of vParents
25
+ // someMenu is a parent -> will always not be contained because no vParent
26
+ // someMenu is the current popover -> it will contain itself
27
+ const isOutsidePopover = !elementContains((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);
28
+ if (isOutsidePopover && !disabled) {
29
+ callback(ev);
30
+ }
31
+ });
32
+ React.useEffect(()=>{
33
+ // eslint-disable-next-line eqeqeq
34
+ if (element == null) {
35
+ return;
36
+ }
37
+ if (!disabled) {
38
+ element.addEventListener(MENU_ENTER_EVENT, listener);
39
+ }
40
+ return ()=>{
41
+ element.removeEventListener(MENU_ENTER_EVENT, listener);
42
+ };
43
+ }, [
44
+ listener,
45
+ element,
46
+ disabled
47
+ ]);
51
48
  };
52
49
  /**
53
50
  * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`
54
51
  * @param el element for the event target
55
52
  * @param nativeEvent the native mouse event this is mapped to
56
- */
57
- export const dispatchMenuEnterEvent = (el, nativeEvent) => {
58
- el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {
59
- bubbles: true,
60
- detail: {
61
- nativeEvent
62
- }
63
- }));
53
+ */ export const dispatchMenuEnterEvent = (el, nativeEvent)=>{
54
+ el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {
55
+ bubbles: true,
56
+ detail: {
57
+ nativeEvent
58
+ }
59
+ }));
64
60
  };
65
- //# sourceMappingURL=useOnMenuEnter.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEventCallback","elementContains","MENU_ENTER_EVENT","useOnMenuMouseEnter","options","refs","callback","element","disabled","listener","ev","popoverRef","someMenuPopover","target","_popoverRef_current","isOutsidePopover","current","useEffect","addEventListener","removeEventListener","dispatchMenuEnterEvent","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"sources":["../../src/utils/useOnMenuEnter.ts"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,eAAe,QAAQ;AAGhC;;;AAGA,OAAO,MAAMC,gBAAA,GAAmB;AAEhC;;;;;;;;;;;AAWA,OAAO,MAAMC,mBAAA,GAAuBC,OAAA,IAA8C;EAChF,MAAM;IAAEC,IAAA;IAAMC,QAAA;IAAUC,OAAA;IAASC;EAAQ,CAAE,GAAGJ,OAAA;EAE9C;EACA,MAAMK,QAAA,GAAWT,gBAAA,CAAkBU,EAAA,IAAmB;IACpD,MAAMC,UAAA,GAAaN,IAAI,CAAC,EAAE;IAC1B,MAAMO,eAAA,GAAkBF,EAAA,CAAGG,MAAM;QAKSC,mBAAA;IAH1C;IACA;IACA;IACA,MAAMC,gBAAA,GAAmB,CAACd,eAAA,CAAgB,CAAAa,mBAAA,GAAAH,UAAA,CAAWK,OAAO,cAAlBF,mBAAA,cAAAA,mBAAA,GAAsB,IAAI,EAAEF,eAAA;IACtE,IAAIG,gBAAA,IAAoB,CAACP,QAAA,EAAU;MACjCF,QAAA,CAASI,EAAA;IACX;EACF;EAEAX,KAAA,CAAMkB,SAAS,CAAC,MAAM;IACpB;IACA,IAAIV,OAAA,IAAW,IAAI,EAAE;MACnB;IACF;IAUA,IAAI,CAACC,QAAA,EAAU;MACbD,OAAA,CAAQW,gBAAgB,CAAChB,gBAAA,EAAkBO,QAAA;IAC7C;IAEA,OAAO,MAAM;MACXF,OAAA,CAAQY,mBAAmB,CAACjB,gBAAA,EAAkBO,QAAA;IAChD;EACF,GAAG,CAACA,QAAA,EAAUF,OAAA,EAASC,QAAA,CAAS;AAClC;AAEA;;;;;AAKA,OAAO,MAAMY,sBAAA,GAAyBA,CAACC,EAAA,EAAiBC,WAAA,KAA4B;EAClFD,EAAA,CAAGE,aAAa,CAAC,IAAIC,WAAA,CAAYtB,gBAAA,EAAkB;IAAEuB,OAAA,EAAS,IAAI;IAAEC,MAAA,EAAQ;MAAEJ;IAAY;EAAE;AAC9F"}
1
+ {"version":3,"sources":["useOnMenuEnter.ts"],"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"],"names":["React","useEventCallback","elementContains","MENU_ENTER_EVENT","useOnMenuMouseEnter","options","refs","callback","element","disabled","listener","ev","popoverRef","someMenuPopover","target","isOutsidePopover","current","useEffect","addEventListener","removeEventListener","dispatchMenuEnterEvent","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,eAAe,QAAQ,yBAAyB;AAGzD;;CAEC,GACD,OAAO,MAAMC,mBAAmB,eAAe;AAE/C;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,sBAAsB,CAACC,UAA8C;IAChF,MAAM,EAAEC,KAAI,EAAEC,SAAQ,EAAEC,QAAO,EAAEC,SAAQ,EAAE,GAAGJ;IAE9C,gFAAgF;IAChF,MAAMK,WAAWT,iBAAiB,CAACU,KAAmB;QACpD,MAAMC,aAAaN,IAAI,CAAC,EAAE;QAC1B,MAAMO,kBAAkBF,GAAGG,MAAM;YAKSF;QAH1C,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,MAAMG,mBAAmB,CAACb,gBAAgBU,CAAAA,sBAAAA,WAAWI,OAAO,cAAlBJ,iCAAAA,sBAAsB,IAAI,EAAEC;QACtE,IAAIE,oBAAoB,CAACN,UAAU;YACjCF,SAASI;QACX,CAAC;IACH;IAEAX,MAAMiB,SAAS,CAAC,IAAM;QACpB,kCAAkC;QAClC,IAAIT,WAAW,IAAI,EAAE;YACnB;QACF,CAAC;QAUD,IAAI,CAACC,UAAU;YACbD,QAAQU,gBAAgB,CAACf,kBAAkBO;QAC7C,CAAC;QAED,OAAO,IAAM;YACXF,QAAQW,mBAAmB,CAAChB,kBAAkBO;QAChD;IACF,GAAG;QAACA;QAAUF;QAASC;KAAS;AAClC,EAAE;AAEF;;;;CAIC,GACD,OAAO,MAAMW,yBAAyB,CAACC,IAAiBC,cAA4B;IAClFD,GAAGE,aAAa,CAAC,IAAIC,YAAYrB,kBAAkB;QAAEsB,SAAS,IAAI;QAAEC,QAAQ;YAAEJ;QAAY;IAAE;AAC9F,EAAE"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/Menu/index"), exports);
7
- //# sourceMappingURL=Menu.js.map
8
-
9
- //# sourceMappingURL=Menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/Menu.js"],"sourcesContent":["export * from './components/Menu/index';\n//# sourceMappingURL=Menu.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,gCAAgC"}
1
+ {"version":3,"sources":["Menu.js"],"sourcesContent":["export * from './components/Menu/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuDivider/index"), exports);
7
- //# sourceMappingURL=MenuDivider.js.map
8
-
9
- //# sourceMappingURL=MenuDivider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuDivider.js"],"sourcesContent":["export * from './components/MenuDivider/index';\n//# sourceMappingURL=MenuDivider.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
1
+ {"version":3,"sources":["MenuDivider.js"],"sourcesContent":["export * from './components/MenuDivider/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuGroup/index"), exports);
7
- //# sourceMappingURL=MenuGroup.js.map
8
-
9
- //# sourceMappingURL=MenuGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuGroup.js"],"sourcesContent":["export * from './components/MenuGroup/index';\n//# sourceMappingURL=MenuGroup.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,qCAAqC"}
1
+ {"version":3,"sources":["MenuGroup.js"],"sourcesContent":["export * from './components/MenuGroup/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuGroupHeader/index"), exports);
7
- //# sourceMappingURL=MenuGroupHeader.js.map
8
-
9
- //# sourceMappingURL=MenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuGroupHeader.js"],"sourcesContent":["export * from './components/MenuGroupHeader/index';\n//# sourceMappingURL=MenuGroupHeader.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,2CAA2C"}
1
+ {"version":3,"sources":["MenuGroupHeader.js"],"sourcesContent":["export * from './components/MenuGroupHeader/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuItem/index"), exports);
7
- //# sourceMappingURL=MenuItem.js.map
8
-
9
- //# sourceMappingURL=MenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuItem.js"],"sourcesContent":["export * from './components/MenuItem/index';\n//# sourceMappingURL=MenuItem.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,oCAAoC"}
1
+ {"version":3,"sources":["MenuItem.js"],"sourcesContent":["export * from './components/MenuItem/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuItemCheckbox/index"), exports);
7
- //# sourceMappingURL=MenuItemCheckbox.js.map
8
-
9
- //# sourceMappingURL=MenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuItemCheckbox.js"],"sourcesContent":["export * from './components/MenuItemCheckbox/index';\n//# sourceMappingURL=MenuItemCheckbox.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,4CAA4C"}
1
+ {"version":3,"sources":["MenuItemCheckbox.js"],"sourcesContent":["export * from './components/MenuItemCheckbox/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/MenuItemRadio/index"), exports);
7
- //# sourceMappingURL=MenuItemRadio.js.map
8
-
9
- //# sourceMappingURL=MenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/MenuItemRadio.js"],"sourcesContent":["export * from './components/MenuItemRadio/index';\n//# sourceMappingURL=MenuItemRadio.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
1
+ {"version":3,"sources":["MenuItemRadio.js"],"sourcesContent":["export * from './components/MenuItemRadio/index';\n"],"names":[],"mappings":";;;;;oBAAc"}