@fluentui/react-menu 9.0.0-beta.1 → 9.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. package/CHANGELOG.json +307 -1
  2. package/CHANGELOG.md +74 -2
  3. package/dist/react-menu.d.ts +34 -7
  4. package/lib/components/Menu/Menu.js +3 -3
  5. package/lib/components/Menu/Menu.js.map +1 -1
  6. package/lib/components/Menu/Menu.types.d.ts +2 -1
  7. package/lib/components/Menu/renderMenu.js +1 -1
  8. package/lib/components/Menu/renderMenu.js.map +1 -1
  9. package/lib/components/Menu/useMenu.js +95 -112
  10. package/lib/components/Menu/useMenu.js.map +1 -1
  11. package/lib/components/Menu/useMenuContextValues.js +34 -32
  12. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  13. package/lib/components/MenuDivider/MenuDivider.js +2 -2
  14. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  15. package/lib/components/MenuDivider/renderMenuDivider.js +6 -7
  16. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  17. package/lib/components/MenuDivider/useMenuDivider.js +6 -7
  18. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  19. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -0
  20. package/lib/components/MenuDivider/useMenuDividerStyles.js +5 -4
  21. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  22. package/lib/components/MenuGroup/MenuGroup.js +5 -3
  23. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  24. package/lib/components/MenuGroup/index.d.ts +1 -0
  25. package/lib/components/MenuGroup/index.js +1 -0
  26. package/lib/components/MenuGroup/index.js.map +1 -1
  27. package/lib/components/MenuGroup/renderMenuGroup.js +6 -7
  28. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  29. package/lib/components/MenuGroup/useMenuGroup.js +6 -6
  30. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  31. package/lib/components/MenuGroup/useMenuGroupContextValues.js +7 -7
  32. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  33. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  34. package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
  35. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  36. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +2 -2
  37. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  38. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +6 -7
  39. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  40. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +8 -6
  41. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  42. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -0
  43. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +5 -4
  44. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  45. package/lib/components/MenuItem/MenuItem.js +2 -2
  46. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  47. package/lib/components/MenuItem/renderMenuItem.js +6 -7
  48. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  49. package/lib/components/MenuItem/useCharacterSearch.js +6 -6
  50. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  51. package/lib/components/MenuItem/useMenuItem.js +31 -36
  52. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  53. package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -0
  54. package/lib/components/MenuItem/useMenuItemStyles.js +5 -4
  55. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  56. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
  57. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  58. package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
  59. package/lib/components/MenuItemCheckbox/index.js +1 -0
  60. package/lib/components/MenuItemCheckbox/index.js.map +1 -1
  61. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -7
  62. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  63. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +12 -13
  64. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  65. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  66. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +4 -1
  67. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  68. package/lib/components/MenuItemRadio/MenuItemRadio.js +2 -2
  69. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  70. package/lib/components/MenuItemRadio/index.d.ts +1 -0
  71. package/lib/components/MenuItemRadio/index.js +1 -0
  72. package/lib/components/MenuItemRadio/index.js.map +1 -1
  73. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -7
  74. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  75. package/lib/components/MenuItemRadio/useMenuItemRadio.js +12 -12
  76. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  77. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -0
  78. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +4 -1
  79. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  80. package/lib/components/MenuList/MenuList.js +3 -3
  81. package/lib/components/MenuList/MenuList.js.map +1 -1
  82. package/lib/components/MenuList/MenuList.types.d.ts +8 -6
  83. package/lib/components/MenuList/renderMenuList.js +6 -7
  84. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  85. package/lib/components/MenuList/useMenuList.js +66 -86
  86. package/lib/components/MenuList/useMenuList.js.map +1 -1
  87. package/lib/components/MenuList/useMenuListContextValues.js +18 -16
  88. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  89. package/lib/components/MenuList/useMenuListStyles.d.ts +1 -0
  90. package/lib/components/MenuList/useMenuListStyles.js +5 -4
  91. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  92. package/lib/components/MenuPopover/MenuPopover.js +2 -2
  93. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  94. package/lib/components/MenuPopover/renderMenuPopover.js +7 -7
  95. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  96. package/lib/components/MenuPopover/useMenuPopover.js +29 -38
  97. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  98. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -0
  99. package/lib/components/MenuPopover/useMenuPopoverStyles.js +7 -6
  100. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  101. package/lib/components/MenuTrigger/MenuTrigger.js +2 -2
  102. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  103. package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
  104. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  105. package/lib/components/MenuTrigger/useMenuTrigger.js +3 -4
  106. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  107. package/lib/components/MenuTrigger/useTriggerElement.js +51 -65
  108. package/lib/components/MenuTrigger/useTriggerElement.js.map +1 -1
  109. package/lib/contexts/menuContext.js +5 -11
  110. package/lib/contexts/menuContext.js.map +1 -1
  111. package/lib/contexts/menuGroupContext.js +3 -5
  112. package/lib/contexts/menuGroupContext.js.map +1 -1
  113. package/lib/contexts/menuListContext.js +7 -17
  114. package/lib/contexts/menuListContext.js.map +1 -1
  115. package/lib/contexts/menuTriggerContext.js +3 -5
  116. package/lib/contexts/menuTriggerContext.js.map +1 -1
  117. package/lib/selectable/useCheckmarkStyles.js +3 -3
  118. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  119. package/lib/utils/useIsSubmenu.js +2 -4
  120. package/lib/utils/useIsSubmenu.js.map +1 -1
  121. package/lib/utils/useOnMenuEnter.js +16 -14
  122. package/lib/utils/useOnMenuEnter.js.map +1 -1
  123. package/lib-commonjs/Menu.js +1 -1
  124. package/lib-commonjs/MenuDivider.js +1 -1
  125. package/lib-commonjs/MenuGroup.js +1 -1
  126. package/lib-commonjs/MenuGroupHeader.js +1 -1
  127. package/lib-commonjs/MenuItem.js +1 -1
  128. package/lib-commonjs/MenuItemCheckbox.js +1 -1
  129. package/lib-commonjs/MenuItemRadio.js +1 -1
  130. package/lib-commonjs/MenuList.js +1 -1
  131. package/lib-commonjs/MenuPopover.js +1 -1
  132. package/lib-commonjs/MenuTrigger.js +1 -1
  133. package/lib-commonjs/components/Menu/Menu.js +6 -6
  134. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  135. package/lib-commonjs/components/Menu/Menu.types.d.ts +2 -1
  136. package/lib-commonjs/components/Menu/index.js +1 -1
  137. package/lib-commonjs/components/Menu/renderMenu.js +3 -3
  138. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  139. package/lib-commonjs/components/Menu/useMenu.js +104 -122
  140. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  141. package/lib-commonjs/components/Menu/useMenuContextValues.js +34 -32
  142. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  143. package/lib-commonjs/components/MenuDivider/MenuDivider.js +6 -6
  144. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  145. package/lib-commonjs/components/MenuDivider/index.js +1 -1
  146. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +8 -10
  147. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  148. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +7 -9
  149. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  150. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -0
  151. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
  152. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  153. package/lib-commonjs/components/MenuGroup/MenuGroup.js +10 -7
  154. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  155. package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
  156. package/lib-commonjs/components/MenuGroup/index.js +3 -1
  157. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  158. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +9 -11
  159. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  160. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +7 -8
  161. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  162. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +8 -8
  163. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  164. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
  165. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
  166. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
  167. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +6 -6
  168. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  169. package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
  170. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +8 -10
  171. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  172. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +10 -9
  173. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  174. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -0
  175. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
  176. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  177. package/lib-commonjs/components/MenuItem/MenuItem.js +7 -7
  178. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  179. package/lib-commonjs/components/MenuItem/index.js +1 -1
  180. package/lib-commonjs/components/MenuItem/renderMenuItem.js +9 -11
  181. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  182. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
  183. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  184. package/lib-commonjs/components/MenuItem/useMenuItem.js +38 -44
  185. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  186. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -0
  187. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +9 -7
  188. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  189. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
  190. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  191. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
  192. package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
  193. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  194. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +9 -11
  195. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  196. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +17 -19
  197. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  198. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
  199. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +10 -5
  200. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  201. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +6 -6
  202. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  203. package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
  204. package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
  205. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  206. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +9 -11
  207. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  208. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +17 -18
  209. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  210. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -0
  211. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +9 -4
  212. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  213. package/lib-commonjs/components/MenuList/MenuList.js +8 -8
  214. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  215. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +8 -6
  216. package/lib-commonjs/components/MenuList/index.js +1 -1
  217. package/lib-commonjs/components/MenuList/renderMenuList.js +9 -11
  218. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  219. package/lib-commonjs/components/MenuList/useMenuList.js +72 -93
  220. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  221. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +18 -16
  222. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  223. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -0
  224. package/lib-commonjs/components/MenuList/useMenuListStyles.js +8 -6
  225. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  226. package/lib-commonjs/components/MenuPopover/MenuPopover.js +6 -6
  227. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  228. package/lib-commonjs/components/MenuPopover/index.js +1 -1
  229. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +10 -11
  230. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  231. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +36 -46
  232. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  233. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -0
  234. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +10 -8
  235. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  236. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +4 -4
  237. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  238. package/lib-commonjs/components/MenuTrigger/index.js +1 -1
  239. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
  240. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  241. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +4 -6
  242. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  243. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +58 -73
  244. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +1 -1
  245. package/lib-commonjs/components/index.js +1 -1
  246. package/lib-commonjs/contexts/menuContext.js +4 -10
  247. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  248. package/lib-commonjs/contexts/menuGroupContext.js +3 -5
  249. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  250. package/lib-commonjs/contexts/menuListContext.js +6 -16
  251. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  252. package/lib-commonjs/contexts/menuTriggerContext.js +3 -5
  253. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  254. package/lib-commonjs/index.js +1 -1
  255. package/lib-commonjs/selectable/index.js +1 -1
  256. package/lib-commonjs/selectable/useCheckmarkStyles.js +4 -4
  257. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  258. package/lib-commonjs/utils/index.js +1 -1
  259. package/lib-commonjs/utils/useIsSubmenu.js +5 -7
  260. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  261. package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
  262. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  263. package/package.json +15 -15
  264. package/lib/common/isConformant.d.ts +0 -4
  265. package/lib/common/isConformant.js +0 -12
  266. package/lib/common/isConformant.js.map +0 -1
  267. package/lib/common/mockUseMenuContext.d.ts +0 -7
  268. package/lib/common/mockUseMenuContext.js +0 -36
  269. package/lib/common/mockUseMenuContext.js.map +0 -1
  270. package/lib/utils/DefaultIcons.d.ts +0 -7
  271. package/lib/utils/DefaultIcons.js +0 -88
  272. package/lib/utils/DefaultIcons.js.map +0 -1
  273. package/lib-commonjs/common/isConformant.d.ts +0 -4
  274. package/lib-commonjs/common/isConformant.js +0 -23
  275. package/lib-commonjs/common/isConformant.js.map +0 -1
  276. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  277. package/lib-commonjs/common/mockUseMenuContext.js +0 -47
  278. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
  279. package/lib-commonjs/utils/DefaultIcons.d.ts +0 -7
  280. package/lib-commonjs/utils/DefaultIcons.js +0 -100
  281. package/lib-commonjs/utils/DefaultIcons.js.map +0 -1
@@ -1,17 +1,17 @@
1
- import { __assign } from "tslib";
2
1
  import { getNativeElementProps, useId } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Given user props, returns state and render function for a MenuGroup.
5
4
  */
6
5
 
7
6
  export function useMenuGroup(props, ref) {
8
- var headerId = useId('menu-group');
7
+ const headerId = useId('menu-group');
9
8
  return {
10
- root: getNativeElementProps('div', __assign({
11
- ref: ref,
9
+ root: getNativeElementProps('div', {
10
+ ref,
12
11
  'aria-labelledby': headerId,
13
- role: 'group'
14
- }, props)),
12
+ role: 'group',
13
+ ...props
14
+ }),
15
15
  headerId: headerId
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":";AACA,SAAS,qBAAT,EAAgC,KAAhC,QAA6C,2BAA7C;AAGA;;AAEG;;AACH,OAAM,SAAU,YAAV,CAAuB,KAAvB,EAA8C,GAA9C,EAAyE;AAC7E,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAD,CAAtB;AAEA,SAAO;AACL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAM,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAA,GAD4B;AAE/B,yBAAmB,QAFY;AAG/B,MAAA,IAAI,EAAE;AAHyB,KAAA,EAI5B,KAJ4B,CAAN,CADtB;AAOL,IAAA,QAAQ,EAAE;AAPL,GAAP;AASD","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,KAAhC,QAA6C,2BAA7C;AAGA;;AAEG;;AACH,OAAM,SAAU,YAAV,CAAuB,KAAvB,EAA8C,GAA9C,EAAyE;AAC7E,QAAM,QAAQ,GAAG,KAAK,CAAC,YAAD,CAAtB;AAEA,SAAO;AACL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,yBAAmB,QAFc;AAGjC,MAAA,IAAI,EAAE,OAH2B;AAIjC,SAAG;AAJ8B,KAAR,CADtB;AAOL,IAAA,QAAQ,EAAE;AAPL,GAAP;AASD","sourceRoot":""}
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  export function useMenuGroupContextValues(state) {
3
- var headerId = state.headerId;
4
- var menuGroup = React.useMemo(function () {
5
- return {
6
- headerId: headerId
7
- };
8
- }, [headerId]);
3
+ const {
4
+ headerId
5
+ } = state;
6
+ const menuGroup = React.useMemo(() => ({
7
+ headerId
8
+ }), [headerId]);
9
9
  return {
10
- menuGroup: menuGroup
10
+ menuGroup
11
11
  };
12
12
  }
13
13
  //# sourceMappingURL=useMenuGroupContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,yBAAV,CAAoC,KAApC,EAAyD;AACrD,MAAA,QAAQ,GAAK,KAAK,CAAV,QAAR;AACR,MAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,YAAA;AAAM,WAAC;AAAE,MAAA,QAAQ,EAAX;AAAC,KAAD;AAAc,GAAlC,EAAoC,CAAC,QAAD,CAApC,CAAlB;AAEA,SAAO;AAAE,IAAA,SAAS,EAAA;AAAX,GAAP;AACD","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,yBAAV,CAAoC,KAApC,EAAyD;AAC7D,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AACA,QAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;AAAE,IAAA;AAAF,GAAP,CAAd,EAAoC,CAAC,QAAD,CAApC,CAAlB;AAEA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ import type { MenuGroupState } from './MenuGroup.types';
2
+ export declare const menuGroupClassName = "fui-MenuGroup";
3
+ export declare const useMenuGroupStyles: (state: MenuGroupState) => MenuGroupState;
@@ -0,0 +1,7 @@
1
+ import { mergeClasses } from '@fluentui/react-make-styles';
2
+ export const menuGroupClassName = 'fui-MenuGroup';
3
+ export const useMenuGroupStyles = state => {
4
+ state.root.className = mergeClasses(menuGroupClassName, state.root.className);
5
+ return state;
6
+ };
7
+ //# sourceMappingURL=useMenuGroupStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,6BAA7B;AAGA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AAEP,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAA0C;AAC1E,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,KAAK,CAAC,IAAN,CAAW,SAAhC,CAAnC;AAEA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
@@ -6,8 +6,8 @@ import { renderMenuGroupHeader } from './renderMenuGroupHeader';
6
6
  * Define a styled MenuGroupHeader, using the `useMenuGroupHeader` hook.
7
7
  */
8
8
 
9
- export var MenuGroupHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useMenuGroupHeader(props, ref);
9
+ export const MenuGroupHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useMenuGroupHeader(props, ref);
11
11
  useMenuGroupHeaderStyles(state);
12
12
  return renderMenuGroupHeader(state);
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,wBAAT,QAAyC,4BAAzC;AACA,SAAS,qBAAT,QAAsC,yBAAtC;AAIA;;AAEG;;AACH,OAAO,IAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AACpG,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AACA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,wBAAT,QAAyC,4BAAzC;AACA,SAAS,qBAAT,QAAsC,yBAAtC;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxG,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AACA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  /**
@@ -6,11 +5,11 @@ import { getSlots } from '@fluentui/react-utilities';
6
5
  * slots to children.
7
6
  */
8
7
 
9
- export var renderMenuGroupHeader = function (state) {
10
- var _a = getSlots(state),
11
- slots = _a.slots,
12
- slotProps = _a.slotProps;
13
-
14
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root));
8
+ export const renderMenuGroupHeader = state => {
9
+ const {
10
+ slots,
11
+ slotProps
12
+ } = getSlots(state);
13
+ return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root));
15
14
  };
16
15
  //# sourceMappingURL=renderMenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,IAAM,qBAAqB,GAAG,UAAC,KAAD,EAA4B;AACzD,MAAA,EAAA,GAAuB,QAAQ,CAAuB,KAAvB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAgC;AACnE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAuB,KAAvB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAAP;AACD,CAJM","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign } from "tslib";
2
1
  import { useMenuGroupContext } from '../../contexts/menuGroupContext';
3
2
  import { getNativeElementProps } from '@fluentui/react-utilities';
4
3
  /**
@@ -6,12 +5,15 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
6
5
  */
7
6
 
8
7
  export function useMenuGroupHeader(props, ref) {
9
- var id = useMenuGroupContext().headerId;
8
+ const {
9
+ headerId: id
10
+ } = useMenuGroupContext();
10
11
  return {
11
- root: getNativeElementProps('div', __assign({
12
- ref: ref,
13
- id: id
14
- }, props))
12
+ root: getNativeElementProps('div', {
13
+ ref,
14
+ id,
15
+ ...props
16
+ })
15
17
  };
16
18
  }
17
19
  //# sourceMappingURL=useMenuGroupHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":";AACA,SAAS,mBAAT,QAAoC,iCAApC;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAM,SAAU,kBAAV,CAA6B,KAA7B,EAA0D,GAA1D,EAAqF;AACjF,MAAU,EAAE,GAAK,mBAAmB,GAAxB,QAAZ;AAER,SAAO;AACL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAM,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAA,GAD4B;AAE/B,MAAA,EAAE,EAAA;AAF6B,KAAA,EAG5B,KAH4B,CAAN;AADtB,GAAP;AAOD","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":"AACA,SAAS,mBAAT,QAAoC,iCAApC;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAM,SAAU,kBAAV,CAA6B,KAA7B,EAA0D,GAA1D,EAAqF;AACzF,QAAM;AAAE,IAAA,QAAQ,EAAE;AAAZ,MAAmB,mBAAmB,EAA5C;AAEA,SAAO;AACL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,MAAA,EAFiC;AAGjC,SAAG;AAH8B,KAAR;AADtB,GAAP;AAOD","sourceRoot":""}
@@ -1,2 +1,3 @@
1
1
  import type { MenuGroupHeaderState } from './MenuGroupHeader.types';
2
+ export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
2
3
  export declare const useMenuGroupHeaderStyles: (state: MenuGroupHeaderState) => import("@fluentui/react-utilities").ComponentState<import("./MenuGroupHeader.types").MenuGroupHeaderSlots>;
@@ -1,6 +1,7 @@
1
1
  import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
+ export const menuGroupHeaderClassName = 'fui-MenuGroupHeader';
2
3
 
3
- var useStyles = /*#__PURE__*/__styles({
4
+ const useStyles = /*#__PURE__*/__styles({
4
5
  "root": {
5
6
  "Be2twd7": "fy9rknc",
6
7
  "sj55zd": "f11d4kpn",
@@ -15,9 +16,9 @@ var useStyles = /*#__PURE__*/__styles({
15
16
  "d": [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
16
17
  });
17
18
 
18
- export var useMenuGroupHeaderStyles = function (state) {
19
- var styles = useStyles();
20
- state.root.className = mergeClasses(styles.root, state.root.className);
19
+ export const useMenuGroupHeaderStyles = state => {
20
+ const styles = useStyles();
21
+ state.root.className = mergeClasses(menuGroupHeaderClassName, styles.root, state.root.className);
21
22
  return state;
22
23
  };
23
24
  //# sourceMappingURL=useMenuGroupHeaderStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;AAGA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,IAAM,wBAAwB,GAAG,UAAC,KAAD,EAA4B;AAClE,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AAGA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAAgC;AACtE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,wBAAD,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
@@ -7,8 +7,8 @@ import { useCheckmarkStyles } from '../../selectable/index';
7
7
  * Define a styled MenuItem, using the `useMenuItem` and `useMenuItemStyles` hook.
8
8
  */
9
9
 
10
- export var MenuItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
- var state = useMenuItem(props, ref);
10
+ export const MenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
11
+ const state = useMenuItem(props, ref);
12
12
  useMenuItemStyles(state);
13
13
  useCheckmarkStyles(state);
14
14
  return renderMenuItem(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAKA;;AAEG;;AACH,OAAO,IAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtF,MAAM,KAAK,GAAG,WAAW,CAAC,KAAD,EAAQ,GAAR,CAAzB;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAKA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1F,QAAM,KAAK,GAAG,WAAW,CAAC,KAAD,EAAQ,GAAR,CAAzB;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  import { menuItemSlots } from './useMenuItem';
@@ -6,11 +5,11 @@ import { menuItemSlots } from './useMenuItem';
6
5
  * Function that renders the final JSX of the component
7
6
  */
8
7
 
9
- export var renderMenuItem = function (state) {
10
- var _a = getSlots(state, menuItemSlots),
11
- slots = _a.slots,
12
- slotProps = _a.slotProps;
13
-
14
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, __assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, __assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, __assign({}, slotProps.secondaryContent)), /*#__PURE__*/React.createElement(slots.submenuIndicator, __assign({}, slotProps.submenuIndicator)));
8
+ export const renderMenuItem = state => {
9
+ const {
10
+ slots,
11
+ slotProps
12
+ } = getSlots(state, menuItemSlots);
13
+ return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, Object.assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, Object.assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, Object.assign({}, slotProps.secondaryContent)), /*#__PURE__*/React.createElement(slots.submenuIndicator, Object.assign({}, slotProps.submenuIndicator)));
15
14
  };
16
15
  //# sourceMappingURL=renderMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/renderMenuItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,eAA9B;AAGA;;AAEG;;AACH,OAAO,IAAM,cAAc,GAAG,UAAC,KAAD,EAAqB;AAC3C,MAAA,EAAA,GAAuB,QAAQ,CAAgB,KAAhB,EAAuB,aAAvB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,SAAf,CAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,OAAf,CAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,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AA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CALF,CADF;AASD,CAZM","sourceRoot":""}
@@ -1,11 +1,11 @@
1
1
  import { useMenuListContext } from '../../contexts/menuListContext';
2
- export var useCharacterSearch = function (state, ref) {
3
- var setFocusByFirstCharacter = useMenuListContext(function (context) {
4
- return context.setFocusByFirstCharacter;
5
- });
6
- var onKeyDownBase = state.root.onKeyDown;
2
+ export const useCharacterSearch = (state, ref) => {
3
+ const setFocusByFirstCharacter = useMenuListContext(context => context.setFocusByFirstCharacter);
4
+ const {
5
+ onKeyDown: onKeyDownBase
6
+ } = state.root;
7
7
 
8
- state.root.onKeyDown = function (e) {
8
+ state.root.onKeyDown = e => {
9
9
  var _a;
10
10
 
11
11
  if (onKeyDownBase) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":"AACA,SAAS,kBAAT,QAAmC,gCAAnC;AAGA,OAAO,IAAM,kBAAkB,GAAG,UAAC,KAAD,EAAuB,GAAvB,EAAwD;AACxF,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,wBAAA;AAAgC,GAA5C,CAAnD;AAEQ,MAAW,aAAa,GAAK,KAAK,CAAC,IAAN,CAAL,SAAxB;;AACR,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,UAAA,CAAA,EAAC;;;AACtB,QAAI,aAAJ,EAAmB;AACjB,MAAA,aAAa,CAAC,CAAD,CAAb;AACD;;AAED,QAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;AACrB;AACD;;AAED,QAAI,GAAG,CAAC,OAAR,EAAiB;AACf,MAAA,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;AACD;AACF,GAZD;;AAcA,SAAO,KAAP;AACD,CAnBM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItem/useCharacterSearch.ts"],"names":[],"mappings":"AACA,SAAS,kBAAT,QAAmC,gCAAnC;AAGA,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA4D;AAC5F,QAAM,wBAAwB,GAAG,kBAAkB,CAAC,OAAO,IAAI,OAAO,CAAC,wBAApB,CAAnD;AAEA,QAAM;AAAE,IAAA,SAAS,EAAE;AAAb,MAA+B,KAAK,CAAC,IAA3C;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,CAAC,IAAG;;;AACzB,QAAI,aAAJ,EAAmB;AACjB,MAAA,aAAa,CAAC,CAAD,CAAb;AACD;;AAED,QAAI,CAAA,CAAA,EAAA,GAAA,CAAC,CAAC,GAAF,MAAK,IAAL,IAAK,EAAA,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAK,EAAA,CAAE,MAAP,IAAgB,CAApB,EAAuB;AACrB;AACD;;AAED,QAAI,GAAG,CAAC,OAAR,EAAiB;AACf,MAAA,wBAAwB,KAAA,IAAxB,IAAA,wBAAwB,KAAA,KAAA,CAAxB,GAAwB,KAAA,CAAxB,GAAA,wBAAwB,CAAG,CAAH,EAAM,GAAG,CAAC,OAAV,CAAxB;AACD;AACF,GAZD;;AAcA,SAAO,KAAP;AACD,CAnBM","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { useEventCallback, shouldPreventDefaultOnKeyDown, resolveShorthand, useMergedRefs, getNativeElementProps } from '@fluentui/react-utilities';
4
3
  import { useFluent } from '@fluentui/react-shared-contexts';
@@ -11,32 +10,25 @@ import { useMenuContext } from '../../contexts/menuContext';
11
10
  * Consts listing which props are shorthand props.
12
11
  */
13
12
 
14
- export var menuItemSlots = ['root', 'icon', 'submenuIndicator', 'content', 'secondaryContent', 'checkmark'];
13
+ export const menuItemSlots = ['root', 'icon', 'submenuIndicator', 'content', 'secondaryContent', 'checkmark'];
15
14
  /**
16
15
  * Returns the props and state required to render the component
17
16
  */
18
17
 
19
- export var useMenuItem = function (props, ref) {
20
- var hasSubmenu = useMenuTriggerContext();
21
- var hasIcons = useMenuListContext(function (context) {
22
- return context.hasIcons;
23
- });
24
- var hasCheckmarks = useMenuListContext(function (context) {
25
- return context.hasCheckmarks;
26
- });
27
- var setOpen = useMenuContext(function (context) {
28
- return context.setOpen;
29
- });
30
- var persistOnClickContext = useMenuContext(function (context) {
31
- return context.persistOnItemClick;
32
- });
33
- var dismissedWithKeyboardRef = React.useRef(false);
34
- var dir = useFluent().dir;
35
- var innerRef = React.useRef(null);
36
-
37
- var state = __assign(__assign({
38
- hasSubmenu: hasSubmenu
39
- }, props), {
18
+ export const useMenuItem = (props, ref) => {
19
+ const hasSubmenu = useMenuTriggerContext();
20
+ const hasIcons = useMenuListContext(context => context.hasIcons);
21
+ const hasCheckmarks = useMenuListContext(context => context.hasCheckmarks);
22
+ const setOpen = useMenuContext(context => context.setOpen);
23
+ const persistOnClickContext = useMenuContext(context => context.persistOnItemClick);
24
+ const dismissedWithKeyboardRef = React.useRef(false);
25
+ const {
26
+ dir
27
+ } = useFluent();
28
+ const innerRef = React.useRef(null);
29
+ const state = {
30
+ hasSubmenu,
31
+ ...props,
40
32
  components: {
41
33
  root: 'div',
42
34
  icon: 'span',
@@ -45,12 +37,13 @@ export var useMenuItem = function (props, ref) {
45
37
  content: 'span',
46
38
  secondaryContent: 'span'
47
39
  },
48
- root: getNativeElementProps('div', __assign({
40
+ root: getNativeElementProps('div', {
49
41
  ref: useMergedRefs(ref, innerRef),
50
42
  role: 'menuitem',
51
43
  tabIndex: 0,
52
- 'aria-disabled': props.disabled
53
- }, props)),
44
+ 'aria-disabled': props.disabled,
45
+ ...props
46
+ }),
54
47
  icon: resolveShorthand(props.icon, {
55
48
  required: hasIcons
56
49
  }),
@@ -70,13 +63,13 @@ export var useMenuItem = function (props, ref) {
70
63
  }
71
64
  }),
72
65
  secondaryContent: resolveShorthand(props.secondaryContent)
73
- });
74
-
75
- var _a = state.root,
76
- onClickOriginal = _a.onClick,
77
- onKeyDownOriginal = _a.onKeyDown;
66
+ };
67
+ const {
68
+ onClick: onClickOriginal,
69
+ onKeyDown: onKeyDownOriginal
70
+ } = state.root;
78
71
 
79
- state.root.onKeyDown = function (e) {
72
+ state.root.onKeyDown = e => {
80
73
  var _a;
81
74
 
82
75
  if (shouldPreventDefaultOnKeyDown(e)) {
@@ -94,14 +87,14 @@ export var useMenuItem = function (props, ref) {
94
87
  onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);
95
88
  };
96
89
 
97
- state.root.onClick = function (e) {
90
+ state.root.onClick = e => {
98
91
  if (state.disabled) {
99
92
  e.preventDefault();
100
93
  e.stopPropagation();
101
94
  return;
102
95
  }
103
96
 
104
- var shouldPersist = persistOnClickContext; // prop wins over context;
97
+ let shouldPersist = persistOnClickContext; // prop wins over context;
105
98
 
106
99
  if (state.persistOnClick !== undefined && persistOnClickContext !== state.persistOnClick) {
107
100
  shouldPersist = state.persistOnClick;
@@ -119,8 +112,10 @@ export var useMenuItem = function (props, ref) {
119
112
  onClickOriginal === null || onClickOriginal === void 0 ? void 0 : onClickOriginal(e);
120
113
  };
121
114
 
122
- var onMouseEnterOriginal = state.root.onMouseEnter;
123
- state.root.onMouseEnter = useEventCallback(function (e) {
115
+ const {
116
+ onMouseEnter: onMouseEnterOriginal
117
+ } = state.root;
118
+ state.root.onMouseEnter = useEventCallback(e => {
124
119
  var _a;
125
120
 
126
121
  (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":";AAAA,OAA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AT,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,KAAA,CAAhB,GAAgB,EAAA,CAAE,KAAF,EAAhB;AAEA,IAAA,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;AACD,GAJyC,CAA1C;AAMA,EAAA,kBAAkB,CAAC,KAAD,EAAQ,QAAR,CAAlB;AACA,SAAO,KAAP;AACD,CAxFM","sourceRoot":""}
@@ -1,3 +1,4 @@
1
1
  import type { MenuItemState } from './MenuItem.types';
2
+ export declare const menuItemClassName = "fui-MenuItem";
2
3
  /** Applies style classnames to slots */
3
4
  export declare const useMenuItemStyles: (state: MenuItemState) => void;
@@ -1,7 +1,8 @@
1
1
  import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
2
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
3
+ export const menuItemClassName = 'fui-MenuItem';
3
4
 
4
- var useStyles = /*#__PURE__*/__styles({
5
+ const useStyles = /*#__PURE__*/__styles({
5
6
  "focusIndicator": {
6
7
  "B486eqv": "f2hkw1w",
7
8
  "Bnmjwt4": "flfsvnh",
@@ -83,9 +84,9 @@ var useStyles = /*#__PURE__*/__styles({
83
84
  /** Applies style classnames to slots */
84
85
 
85
86
 
86
- export var useMenuItemStyles = function (state) {
87
- var styles = useStyles();
88
- state.root.className = mergeClasses(styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
87
+ export const useMenuItemStyles = state => {
88
+ const styles = useStyles();
89
+ state.root.className = mergeClasses(menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
89
90
  state.content.className = mergeClasses(styles.content, state.content.className);
90
91
 
91
92
  if (state.secondaryContent) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SA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JQ,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;AAOA,EAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,MAAM,CAAC,OAAR,EAAiB,KAAK,CAAC,OAAN,CAAc,SAA/B,CAAtC;;AACA,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAC7C,CAAC,KAAK,CAAC,QAAP,IAAmB,MAAM,CAAC,gBADmB,EAE7C,KAAK,CAAC,gBAAN,CAAuB,SAFsB,CAA/C;AAID;;AAED,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAAC,MAAM,CAAC,gBAAR,EAA0B,KAAK,CAAC,gBAAN,CAAuB,SAAjD,CAA/C;AACD;AACF,CAxBM","sourceRoot":""}
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { useMenuItemCheckbox } from './useMenuItemCheckbox';
3
3
  import { renderMenuItemCheckbox } from './renderMenuItemCheckbox';
4
- import { useMenuItemCheckBoxStyles } from './useMenuItemCheckboxStyles';
4
+ import { useMenuItemCheckboxStyles } from './useMenuItemCheckboxStyles';
5
5
  /**
6
6
  * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox` hook.
7
7
  */
8
8
 
9
- export var MenuItemCheckbox = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useMenuItemCheckbox(props, ref);
11
- useMenuItemCheckBoxStyles(state);
9
+ export const MenuItemCheckbox = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useMenuItemCheckbox(props, ref);
11
+ useMenuItemCheckboxStyles(state);
12
12
  return renderMenuItemCheckbox(state);
13
13
  });
14
14
  MenuItemCheckbox.displayName = 'MenuItemCheckbox';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,yBAAT,QAA0C,6BAA1C;AAIA;;AAEG;;AACH,OAAO,IAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtG,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,EAAQ,GAAR,CAAjC;AACA,EAAA,yBAAyB,CAAC,KAAD,CAAzB;AAEA,SAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,WAAjB,GAA+B,kBAA/B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,yBAAT,QAA0C,6BAA1C;AAIA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC1G,QAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,EAAQ,GAAR,CAAjC;AACA,EAAA,yBAAyB,CAAC,KAAD,CAAzB;AAEA,SAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,WAAjB,GAA+B,kBAA/B","sourceRoot":""}
@@ -2,3 +2,4 @@ export * from './MenuItemCheckbox.types';
2
2
  export * from './MenuItemCheckbox';
3
3
  export * from './renderMenuItemCheckbox';
4
4
  export * from './useMenuItemCheckbox';
5
+ export * from './useMenuItemCheckboxStyles';
@@ -2,4 +2,5 @@ export * from './MenuItemCheckbox.types';
2
2
  export * from './MenuItemCheckbox';
3
3
  export * from './renderMenuItemCheckbox';
4
4
  export * from './useMenuItemCheckbox';
5
+ export * from './useMenuItemCheckboxStyles';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuItemCheckbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuItemCheckbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC"}
@@ -1,14 +1,13 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  import { menuItemSlots } from '../MenuItem/index';
5
4
  /** Function that renders the final JSX of the component */
6
5
 
7
- export var renderMenuItemCheckbox = function (state) {
8
- var _a = getSlots(state, menuItemSlots),
9
- slots = _a.slots,
10
- slotProps = _a.slotProps;
11
-
12
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, __assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, __assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, __assign({}, slotProps.secondaryContent)));
6
+ export const renderMenuItemCheckbox = state => {
7
+ const {
8
+ slots,
9
+ slotProps
10
+ } = getSlots(state, menuItemSlots);
11
+ return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.checkmark, Object.assign({}, slotProps.checkmark)), /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), /*#__PURE__*/React.createElement(slots.content, Object.assign({}, slotProps.content)), /*#__PURE__*/React.createElement(slots.secondaryContent, Object.assign({}, slotProps.secondaryContent)));
13
12
  };
14
13
  //# sourceMappingURL=renderMenuItemCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA;;AACA,OAAO,IAAM,sBAAsB,GAAG,UAAC,KAAD,EAA6B;AAC3D,MAAA,EAAA,GAAuB,QAAQ,CAAgB,KAAhB,EAAuB,aAAvB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,SAAf,CAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,OAAf,CAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CAJF,CADF;AAQD,CAXM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA;;AACA,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAiC;AACrE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,EAAuB,aAAvB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,SAAf,CAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,OAAf,CAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CAJF,CADF;AAQD,CAXM","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { resolveShorthand } from '@fluentui/react-utilities';
4
3
  import { Checkmark16Filled } from '@fluentui/react-icons';
@@ -6,32 +5,32 @@ import { useMenuListContext } from '../../contexts/menuListContext';
6
5
  import { useMenuItem } from '../MenuItem/useMenuItem';
7
6
  /** Returns the props and state required to render the component */
8
7
 
9
- export var useMenuItemCheckbox = function (props, ref) {
10
- var state = useMenuItem(__assign(__assign({
8
+ export const useMenuItemCheckbox = (props, ref) => {
9
+ const state = useMenuItem({
11
10
  role: 'menuitemcheckbox',
12
- persistOnClick: true
13
- }, props), {
11
+ persistOnClick: true,
12
+ ...props,
14
13
  checkmark: resolveShorthand(props.checkmark, {
15
14
  defaultProps: {
16
15
  children: /*#__PURE__*/React.createElement(Checkmark16Filled, null)
17
16
  },
18
17
  required: true
19
18
  })
20
- }), ref);
21
- var toggleCheckbox = useMenuListContext(function (context) {
22
- return context.toggleCheckbox;
23
- });
24
- var onClickOriginal = state.root.onClick;
25
- var checked = useMenuListContext(function (context) {
19
+ }, ref);
20
+ const toggleCheckbox = useMenuListContext(context => context.toggleCheckbox);
21
+ const {
22
+ onClick: onClickOriginal
23
+ } = state.root;
24
+ const checked = useMenuListContext(context => {
26
25
  var _a;
27
26
 
28
- var checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
27
+ const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
29
28
  return checkedItems.indexOf(state.value) !== -1;
30
29
  });
31
30
  state.checked = checked;
32
31
  state.root['aria-checked'] = state.checked; // MenuItem state already transforms keyDown to click events
33
32
 
34
- state.root.onClick = function (e) {
33
+ state.root.onClick = e => {
35
34
  if (state.disabled) {
36
35
  e.preventDefault();
37
36
  e.stopPropagation();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,iBAAT,QAAkC,uBAAlC;AACA,SAAS,kBAAT,QAAmC,gCAAnC;AACA,SAAS,WAAT,QAA4B,yBAA5B;AAGA;;AACA,OAAO,I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BAAkB,CAAC,OAAO,IAAG;;;AAC3C,UAAM,YAAY,GAAG,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,aAAR,MAAqB,IAArB,IAAqB,EAAA,KAAA,KAAA,CAArB,GAAqB,KAAA,CAArB,GAAqB,EAAA,CAAG,KAAK,CAAC,IAAT,CAArB,KAAuC,EAA5D;AACA,WAAO,YAAY,CAAC,OAAb,CAAqB,KAAK,CAAC,KAA3B,MAAsC,CAAC,CAA9C;AACD,GAHiC,CAAlC;AAKA,EAAA,KAAK,CAAC,OAAN,GAAgB,OAAhB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,cAAX,IAA6B,KAAK,CAAC,OAAnC,CAtByB,CAwBzB;;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,OAAX,GAAqB,CAAC,IAAG;AACvB,QAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,MAAA,CAAC,CAAC,cAAF;AACA,MAAA,CAAC,CAAC,eAAF;AACA;AACD;;AAED,IAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAG,CAAH,EAAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAd;AACA,IAAA,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;AACD,GATD;;AAWA,SAAO,KAAP;AACD,CAxCM","sourceRoot":""}
@@ -1,2 +1,3 @@
1
1
  import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';
2
- export declare const useMenuItemCheckBoxStyles: (state: MenuItemCheckboxState) => void;
2
+ export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
3
+ export declare const useMenuItemCheckboxStyles: (state: MenuItemCheckboxState) => void;