@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,6 +1,9 @@
1
+ import { mergeClasses } from '@fluentui/react-make-styles';
1
2
  import { useCheckmarkStyles } from '../../selectable/index';
2
3
  import { useMenuItemStyles } from '../MenuItem/useMenuItemStyles';
3
- export var useMenuItemCheckBoxStyles = function (state) {
4
+ export const menuItemCheckboxClassName = 'fui-MenuItemCheckbox';
5
+ export const useMenuItemCheckboxStyles = state => {
6
+ state.root.className = mergeClasses(menuItemCheckboxClassName, state.root.className);
4
7
  useMenuItemStyles(state);
5
8
  useCheckmarkStyles(state);
6
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,IAAM,yBAAyB,GAAG,UAAC,KAAD,EAA6B;AACpE,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CAHM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,6BAA7B;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,yBAAyB,GAAG,sBAAlC;AAEP,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAAiC;AACxE,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAD,EAA4B,KAAK,CAAC,IAAN,CAAW,SAAvC,CAAnC;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CALM","sourceRoot":""}
@@ -6,8 +6,8 @@ import { useMenuItemRadioStyles } from './useMenuItemRadioStyles';
6
6
  * Define a styled MenuItemRadio, using the `useMenuItemRadio` hook.
7
7
  */
8
8
 
9
- export var MenuItemRadio = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useMenuItemRadio(props, ref);
9
+ export const MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useMenuItemRadio(props, ref);
11
11
  useMenuItemRadioStyles(state);
12
12
  return renderMenuItemRadio(state);
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AAIA;;AAEG;;AACH,OAAO,IAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAChG,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
@@ -2,3 +2,4 @@ export * from './MenuItemRadio.types';
2
2
  export * from './MenuItemRadio';
3
3
  export * from './renderMenuItemRadio';
4
4
  export * from './useMenuItemRadio';
5
+ export * from './useMenuItemRadioStyles';
@@ -2,4 +2,5 @@ export * from './MenuItemRadio.types';
2
2
  export * from './MenuItemRadio';
3
3
  export * from './renderMenuItemRadio';
4
4
  export * from './useMenuItemRadio';
5
+ export * from './useMenuItemRadioStyles';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuItemRadio/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuItemRadio/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
@@ -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 '../MenuItem/index';
@@ -7,11 +6,11 @@ import { menuItemSlots } from '../MenuItem/index';
7
6
  * slots to children.
8
7
  */
9
8
 
10
- export var renderMenuItemRadio = function (state) {
11
- var _a = getSlots(state, menuItemSlots),
12
- slots = _a.slots,
13
- slotProps = _a.slotProps;
14
-
15
- 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)));
9
+ export const renderMenuItemRadio = state => {
10
+ const {
11
+ slots,
12
+ slotProps
13
+ } = getSlots(state, menuItemSlots);
14
+ 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)));
16
15
  };
17
16
  //# sourceMappingURL=renderMenuItemRadio.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA;;;AAGG;;AACH,OAAO,IAAM,mBAAmB,GAAG,UAAC,KAAD,EAA0B;AACrD,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/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,aAAT,QAA8B,mBAA9B;AAIA;;;AAGG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAA8B;AAC/D,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';
@@ -8,32 +7,33 @@ import { useMenuItem } from '../MenuItem/useMenuItem';
8
7
  * Given user props, returns state and render function for a MenuItemRadio.
9
8
  */
10
9
 
11
- export var useMenuItemRadio = function (props, ref) {
12
- var radioProps = {
10
+ export const useMenuItemRadio = (props, ref) => {
11
+ const radioProps = {
13
12
  role: 'menuitemradio'
14
13
  };
15
- var state = useMenuItem(__assign(__assign(__assign({}, radioProps), props), {
14
+ const state = useMenuItem({ ...radioProps,
15
+ ...props,
16
16
  checkmark: resolveShorthand(props.checkmark, {
17
17
  defaultProps: {
18
18
  children: /*#__PURE__*/React.createElement(Checkmark16Filled, null)
19
19
  },
20
20
  required: true
21
21
  })
22
- }), ref);
23
- var selectRadio = useMenuListContext(function (context) {
24
- return context.selectRadio;
25
- });
26
- var onClickOriginal = state.root.onClick;
27
- var checked = useMenuListContext(function (context) {
22
+ }, ref);
23
+ const selectRadio = useMenuListContext(context => context.selectRadio);
24
+ const {
25
+ onClick: onClickOriginal
26
+ } = state.root;
27
+ const checked = useMenuListContext(context => {
28
28
  var _a;
29
29
 
30
- var checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
30
+ const checkedItems = ((_a = context.checkedValues) === null || _a === void 0 ? void 0 : _a[state.name]) || [];
31
31
  return checkedItems.indexOf(state.value) !== -1;
32
32
  });
33
33
  state.checked = checked;
34
34
  state.root['aria-checked'] = state.checked; // MenuItem state already transforms keyDown to click events
35
35
 
36
- state.root.onClick = function (e) {
36
+ state.root.onClick = e => {
37
37
  if (state.disabled) {
38
38
  e.preventDefault();
39
39
  e.stopPropagation();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadio.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;;AAEG;;AACH,OAAO,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAA4B,GAA5B,EAAuD;AACrF,MAAM,UAAU,GAAG;AACjB,IAAA,IAAI,EAAE;AADW,GAAnB;AAIA,MAAM,KAAK,GAAG,WAAW,CAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EAElB,UAFkB,CAAA,EAGlB,KAHkB,CAAA,EAGb;AACR,IAAA,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;AAC3C,MAAA,YAAY,EAAE;AAAE,QAAA,QAAQ,eAAE,KAAA,CA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A,EAAA,KAAK,CAAC,OAAN,GAAgB,OAAhB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,cAAX,IAA6B,KAAK,CAAC,OAAnC,CAzB6G,CA2B7G;;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,WAAW,KAAA,IAAX,IAAA,WAAW,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAA,WAAW,CAAG,CAAH,EAAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAX;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 { MenuItemRadioState } from './MenuItemRadio.types';
2
+ export declare const menuItemRadioClassName = "fui-MenuItemRadio";
2
3
  export declare const useMenuItemRadioStyles: (state: MenuItemRadioState) => void;
@@ -1,6 +1,9 @@
1
+ import { mergeClasses } from '@fluentui/react-make-styles';
1
2
  import { useCheckmarkStyles } from '../../selectable/index';
2
3
  import { useMenuItemStyles } from '../MenuItem/useMenuItemStyles';
3
- export var useMenuItemRadioStyles = function (state) {
4
+ export const menuItemRadioClassName = 'fui-MenuItemRadio';
5
+ export const useMenuItemRadioStyles = state => {
6
+ state.root.className = mergeClasses(menuItemRadioClassName, state.root.className);
4
7
  useMenuItemStyles(state);
5
8
  useCheckmarkStyles(state);
6
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,IAAM,sBAAsB,GAAG,UAAC,KAAD,EAA0B;AAC9D,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CAHM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuItemRadio/useMenuItemRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,6BAA7B;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,sBAAsB,GAAG,mBAA/B;AAEP,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAA8B;AAClE,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,sBAAD,EAAyB,KAAK,CAAC,IAAN,CAAW,SAApC,CAAnC;AAEA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AACA,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CALM","sourceRoot":""}
@@ -7,9 +7,9 @@ import { useMenuListStyles } from './useMenuListStyles';
7
7
  * Define a styled MenuList, using the `useMenuList` hook.
8
8
  */
9
9
 
10
- export var MenuList = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
- var state = useMenuList(props, ref);
12
- var contextValues = useMenuListContextValues(state);
10
+ export const MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {
11
+ const state = useMenuList(props, ref);
12
+ const contextValues = useMenuListContextValues(state);
13
13
  useMenuListStyles(state);
14
14
  return renderMenuList(state, contextValues);
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,wBAAT,QAAyC,4BAAzC;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AAIA;;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;AACA,MAAM,aAAa,GAAG,wBAAwB,CAAC,KAAD,CAA9C;AACA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AAEA,SAAO,cAAc,CAAC,KAAD,EAAQ,aAAR,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuList/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,wBAAT,QAAyC,4BAAzC;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AAIA;;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;AACA,QAAM,aAAa,GAAG,wBAAwB,CAAC,KAAD,CAA9C;AACA,EAAA,iBAAiB,CAAC,KAAD,CAAjB;AAEA,SAAO,cAAc,CAAC,KAAD,EAAQ,aAAR,CAArB;AACD,CAN2D,CAArD;AAQP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourceRoot":""}
@@ -2,6 +2,13 @@ import * as React from 'react';
2
2
  import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
3
3
  import { MenuListContextValue } from '../../contexts/menuListContext';
4
4
  import { SelectableHandler } from '../../selectable/index';
5
+ export declare type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;
6
+ export declare type MenuCheckedValueChangeData = {
7
+ /** The name of the value */
8
+ name: string;
9
+ /** The items for this value that are checked */
10
+ checkedItems: string[];
11
+ };
5
12
  export declare type MenuListCommons = {
6
13
  /**
7
14
  * Callback when checked items change for value with a name
@@ -9,12 +16,7 @@ export declare type MenuListCommons = {
9
16
  * @param event - React's original SyntheticEvent
10
17
  * @param data - A data object with relevant information
11
18
  */
12
- onCheckedValueChange?: (e: React.MouseEvent | React.KeyboardEvent, data: {
13
- /** The name of the value */
14
- name: string;
15
- /** The items for this value that are checked */
16
- checkedItems: string[];
17
- }) => void;
19
+ onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
18
20
  /**
19
21
  * Map of all checked values
20
22
  */
@@ -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 { MenuListProvider } from '../../contexts/menuListContext';
@@ -6,13 +5,13 @@ import { MenuListProvider } from '../../contexts/menuListContext';
6
5
  * Function that renders the final JSX of the component
7
6
  */
8
7
 
9
- export var renderMenuList = function (state, contextValues) {
10
- var _a = getSlots(state),
11
- slots = _a.slots,
12
- slotProps = _a.slotProps;
13
-
8
+ export const renderMenuList = (state, contextValues) => {
9
+ const {
10
+ slots,
11
+ slotProps
12
+ } = getSlots(state);
14
13
  return /*#__PURE__*/React.createElement(MenuListProvider, {
15
14
  value: contextValues.menuList
16
- }, /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root)));
15
+ }, /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root)));
17
16
  };
18
17
  //# sourceMappingURL=renderMenuList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,gBAAT,QAAiC,gCAAjC;AAEA;;AAEG;;AACH,OAAO,IAAM,cAAc,GAAG,UAAC,KAAD,EAAuB,aAAvB,EAA2D;AACjF,MAAA,EAAA,GAAuB,QAAQ,CAAgB,KAAhB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAjB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,CADF;AAKD,CARM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,gBAAT,QAAiC,gCAAjC;AAEA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAAG,CAAC,KAAD,EAAuB,aAAvB,KAA+D;AAC3F,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAjB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,CADF;AAKD,CARM","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import { __assign, __spreadArrays } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { useMergedRefs, useEventCallback, useControllableState, getNativeElementProps } from '@fluentui/react-utilities';
4
3
  import { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';
@@ -9,13 +8,15 @@ import { MenuContext } from '../../contexts/menuContext';
9
8
  * Returns the props and state required to render the component
10
9
  */
11
10
 
12
- export var useMenuList = function (props, ref) {
13
- var focusAttributes = useArrowNavigationGroup({
11
+ export const useMenuList = (props, ref) => {
12
+ const focusAttributes = useArrowNavigationGroup({
14
13
  circular: true
15
14
  });
16
- var findAllFocusable = useFocusFinders().findAllFocusable;
17
- var menuContext = useMenuContextSelectors();
18
- var hasMenuContext = useHasParentContext(MenuContext);
15
+ const {
16
+ findAllFocusable
17
+ } = useFocusFinders();
18
+ const menuContext = useMenuContextSelectors();
19
+ const hasMenuContext = useHasParentContext(MenuContext);
19
20
 
20
21
  if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {
21
22
  // TODO throw warnings in development safely
@@ -23,44 +24,44 @@ export var useMenuList = function (props, ref) {
23
24
  console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');
24
25
  }
25
26
 
26
- var innerRef = React.useRef(null);
27
-
28
- var initialState = __assign(__assign({
29
- root: getNativeElementProps('div', __assign(__assign({
27
+ const innerRef = React.useRef(null);
28
+ const initialState = {
29
+ root: getNativeElementProps('div', {
30
30
  ref: useMergedRefs(ref, innerRef),
31
31
  role: 'menu',
32
- 'aria-labelledby': menuContext.triggerId
33
- }, focusAttributes), props)),
32
+ 'aria-labelledby': menuContext.triggerId,
33
+ ...focusAttributes,
34
+ ...props
35
+ }),
34
36
  hasIcons: menuContext.hasIcons,
35
- hasCheckmarks: menuContext.hasCheckmarks
36
- }, hasMenuContext && menuContext), props);
37
-
38
- var setFocusByFirstCharacter = React.useCallback(function (e, itemEl) {
37
+ hasCheckmarks: menuContext.hasCheckmarks,
38
+ ...(hasMenuContext && menuContext),
39
+ ...props
40
+ };
41
+ const setFocusByFirstCharacter = React.useCallback((e, itemEl) => {
39
42
  // TODO use some kind of children registration to reduce dependency on DOM roles
40
- var acceptedRoles = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];
43
+ const acceptedRoles = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];
41
44
 
42
45
  if (!innerRef.current) {
43
46
  return;
44
47
  }
45
48
 
46
- var menuItems = findAllFocusable(innerRef.current, function (el) {
47
- return el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1;
48
- });
49
- var startIndex = menuItems.indexOf(itemEl) + 1;
49
+ const menuItems = findAllFocusable(innerRef.current, el => el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1);
50
+ let startIndex = menuItems.indexOf(itemEl) + 1;
50
51
 
51
52
  if (startIndex === menuItems.length) {
52
53
  startIndex = 0;
53
54
  }
54
55
 
55
- var firstChars = menuItems.map(function (menuItem) {
56
+ const firstChars = menuItems.map(menuItem => {
56
57
  var _a;
57
58
 
58
59
  return (_a = menuItem.textContent) === null || _a === void 0 ? void 0 : _a.charAt(0).toLowerCase();
59
60
  });
60
- var char = e.key.toLowerCase();
61
+ const char = e.key.toLowerCase();
61
62
 
62
- var getIndexFirstChars = function (start, firstChar) {
63
- for (var i = start; i < firstChars.length; i++) {
63
+ const getIndexFirstChars = (start, firstChar) => {
64
+ for (let i = start; i < firstChars.length; i++) {
64
65
  if (char === firstChars[i]) {
65
66
  return i;
66
67
  }
@@ -70,7 +71,7 @@ export var useMenuList = function (props, ref) {
70
71
  }; // Check remaining slots in the menu
71
72
 
72
73
 
73
- var index = getIndexFirstChars(startIndex, char); // If not found in remaining slots, check from beginning
74
+ let index = getIndexFirstChars(startIndex, char); // If not found in remaining slots, check from beginning
74
75
 
75
76
  if (index === -1) {
76
77
  index = getIndexFirstChars(0, char);
@@ -81,20 +82,17 @@ export var useMenuList = function (props, ref) {
81
82
  menuItems[index].focus();
82
83
  }
83
84
  }, [findAllFocusable]);
84
-
85
- var _a = useControllableState({
85
+ const [checkedValues, setCheckedValues] = useControllableState({
86
86
  state: initialState.checkedValues,
87
87
  defaultState: initialState.defaultCheckedValues,
88
88
  initialState: {}
89
- }),
90
- checkedValues = _a[0],
91
- setCheckedValues = _a[1];
92
-
93
- var onCheckedValueChange = initialState.onCheckedValueChange;
94
- var toggleCheckbox = useEventCallback(function (e, name, value, checked) {
95
- var checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
96
-
97
- var newCheckedItems = __spreadArrays(checkedItems);
89
+ });
90
+ const {
91
+ onCheckedValueChange
92
+ } = initialState;
93
+ const toggleCheckbox = useEventCallback((e, name, value, checked) => {
94
+ const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
95
+ const newCheckedItems = [...checkedItems];
98
96
 
99
97
  if (checked) {
100
98
  newCheckedItems.splice(newCheckedItems.indexOf(value), 1);
@@ -103,67 +101,49 @@ export var useMenuList = function (props, ref) {
103
101
  }
104
102
 
105
103
  onCheckedValueChange === null || onCheckedValueChange === void 0 ? void 0 : onCheckedValueChange(e, {
106
- name: name,
104
+ name,
107
105
  checkedItems: newCheckedItems
108
106
  });
109
- setCheckedValues(function (s) {
110
- var _a;
111
-
112
- return __assign(__assign({}, s), (_a = {}, _a[name] = newCheckedItems, _a));
113
- });
107
+ setCheckedValues(s => ({ ...s,
108
+ [name]: newCheckedItems
109
+ }));
114
110
  });
115
- var selectRadio = useEventCallback(function (e, name, value) {
116
- var newCheckedItems = [value];
117
- setCheckedValues(function (s) {
118
- var _a;
119
-
120
- return __assign(__assign({}, s), (_a = {}, _a[name] = newCheckedItems, _a));
121
- });
111
+ const selectRadio = useEventCallback((e, name, value) => {
112
+ const newCheckedItems = [value];
113
+ setCheckedValues(s => ({ ...s,
114
+ [name]: newCheckedItems
115
+ }));
122
116
  onCheckedValueChange === null || onCheckedValueChange === void 0 ? void 0 : onCheckedValueChange(e, {
123
- name: name,
117
+ name,
124
118
  checkedItems: newCheckedItems
125
119
  });
126
120
  });
127
-
128
- var state = __assign(__assign({}, initialState), {
129
- setFocusByFirstCharacter: setFocusByFirstCharacter,
130
- selectRadio: selectRadio,
131
- toggleCheckbox: toggleCheckbox,
121
+ const state = { ...initialState,
122
+ setFocusByFirstCharacter,
123
+ selectRadio,
124
+ toggleCheckbox,
132
125
  checkedValues: checkedValues !== null && checkedValues !== void 0 ? checkedValues : {}
133
- });
134
-
126
+ };
135
127
  return state;
136
128
  };
137
129
  /**
138
130
  * Adds some sugar to fetching multiple context selector values
139
131
  */
140
132
 
141
- var useMenuContextSelectors = function () {
142
- var checkedValues = useMenuContext(function (context) {
143
- return context.checkedValues;
144
- });
145
- var onCheckedValueChange = useMenuContext(function (context) {
146
- return context.onCheckedValueChange;
147
- });
148
- var defaultCheckedValues = useMenuContext(function (context) {
149
- return context.defaultCheckedValues;
150
- });
151
- var triggerId = useMenuContext(function (context) {
152
- return context.triggerId;
153
- });
154
- var hasIcons = useMenuContext(function (context) {
155
- return context.hasIcons;
156
- });
157
- var hasCheckmarks = useMenuContext(function (context) {
158
- return context.hasCheckmarks;
159
- });
133
+ const useMenuContextSelectors = () => {
134
+ const checkedValues = useMenuContext(context => context.checkedValues);
135
+ const onCheckedValueChange = useMenuContext(context => context.onCheckedValueChange);
136
+ const defaultCheckedValues = useMenuContext(context => context.defaultCheckedValues);
137
+ const triggerId = useMenuContext(context => context.triggerId);
138
+ const hasIcons = useMenuContext(context => context.hasIcons);
139
+ const hasCheckmarks = useMenuContext(context => context.hasCheckmarks);
160
140
  return {
161
- checkedValues: checkedValues,
162
- onCheckedValueChange: onCheckedValueChange,
163
- defaultCheckedValues: defaultCheckedValues,
164
- triggerId: triggerId,
165
- hasIcons: hasIcons,
166
- hasCheckmarks: hasCheckmarks
141
+ checkedValues,
142
+ onCheckedValueChange,
143
+ defaultCheckedValues,
144
+ triggerId,
145
+ hasIcons,
146
+ hasCheckmarks
167
147
  };
168
148
  };
169
149
  /**
@@ -171,10 +151,10 @@ var useMenuContextSelectors = function () {
171
151
  */
172
152
 
173
153
 
174
- var usingPropsAndMenuContext = function (props, contextValue, hasMenuContext) {
175
- var isUsingPropsAndContext = false;
154
+ const usingPropsAndMenuContext = (props, contextValue, hasMenuContext) => {
155
+ let isUsingPropsAndContext = false;
176
156
 
177
- for (var val in contextValue) {
157
+ for (const val in contextValue) {
178
158
  if (props[val]) {
179
159
  isUsingPropsAndContext = true;
180
160
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuList.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,aADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,qBAJF,QAKO,2BALP;AAMA,SAAS,uBAAT,EAAkC,eAAlC,QAAyD,yBAAzD;AACA,SAAS,mBAAT,QAAoC,kCAApC;AACA,SAAS,cAAT,QAA+B,4BAA/B;AACA,SAAS,WAAT,QAA4B,4BAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAuB,GAAvB,EAAkD;AAC3E,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAAE,IAAA,QAAQ,EAAE;AAAZ,GAAD,CAA/C;AACQ,MAAA,gBAAgB,GAAK,eAAe,GAApB,gBAAhB;AACR,MAAM,WAAW,GAAG,uBAAuB,EAA3C;AACA,MAAM,cAAc,GAAG,mBAAmB,CAAC,WAAD,CAA1C;;AAEA,MAAI,wBAAwB,CAAC,KAAD,EAAQ,WAAR,EAAqB,cAArB,CAA5B,EAAkE;AAChE;AACA;AACA,IAAA,OAAO,CAAC,IAAR,CAAa,+FAAb;AACD;;AAED,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAA0B,IAA1B,CAAjB;;AACA,MAAM,YAAY,GAAA,QAAA,CAAA,QAAA,CAAA;AAChB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAM,QAAA,CAAA,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,QAAN,CADa;AAE/B,MAAA,IAAI,EAAE,MAFyB;AAG/B,yBAAmB,WAAW,CAAC;AAHA,KAAA,EAI5B,eAJ4B,CAAA,EAK5B,KAL4B,CAAN,CADX;AAQhB,IAAA,QAAQ,EAAE,WAAW,CAAC,QARN;AA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,QAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,QAApB,CAA/B;AACA,QAAM,aAAa,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,aAApB,CAApC;AAEA,SAAO;AACL,IAAA,aADK;AAEL,IAAA,oBAFK;AAGL,IAAA,oBAHK;AAIL,IAAA,SAJK;AAKL,IAAA,QALK;AAML,IAAA;AANK,GAAP;AAQD,CAhBD;AAkBA;;AAEG;;;AACH,MAAM,wBAAwB,GAAG,CAC/B,KAD+B,EAE/B,YAF+B,EAG/B,cAH+B,KAI7B;AACF,MAAI,sBAAsB,GAAG,KAA7B;;AACA,OAAK,MAAM,GAAX,IAAkB,YAAlB,EAAgC;AAC9B,QAAI,KAAK,CAAC,GAAD,CAAT,EAA4G;AAC1G,MAAA,sBAAsB,GAAG,IAAzB;AACD;AACF;;AAED,SAAO,cAAc,IAAI,sBAAzB;AACD,CAbD","sourceRoot":""}
@@ -1,23 +1,25 @@
1
1
  export function useMenuListContextValues(state) {
2
- var onCheckedValueChange = state.onCheckedValueChange,
3
- checkedValues = state.checkedValues,
4
- toggleCheckbox = state.toggleCheckbox,
5
- selectRadio = state.selectRadio,
6
- setFocusByFirstCharacter = state.setFocusByFirstCharacter,
7
- hasIcons = state.hasIcons,
8
- hasCheckmarks = state.hasCheckmarks; // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
2
+ const {
3
+ onCheckedValueChange,
4
+ checkedValues,
5
+ toggleCheckbox,
6
+ selectRadio,
7
+ setFocusByFirstCharacter,
8
+ hasIcons,
9
+ hasCheckmarks
10
+ } = state; // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
9
11
 
10
- var menuList = {
11
- onCheckedValueChange: onCheckedValueChange,
12
- checkedValues: checkedValues,
13
- toggleCheckbox: toggleCheckbox,
14
- selectRadio: selectRadio,
15
- setFocusByFirstCharacter: setFocusByFirstCharacter,
16
- hasIcons: hasIcons,
17
- hasCheckmarks: hasCheckmarks
12
+ const menuList = {
13
+ onCheckedValueChange,
14
+ checkedValues,
15
+ toggleCheckbox,
16
+ selectRadio,
17
+ setFocusByFirstCharacter,
18
+ hasIcons,
19
+ hasCheckmarks
18
20
  };
19
21
  return {
20
- menuList: menuList
22
+ menuList
21
23
  };
22
24
  }
23
25
  //# sourceMappingURL=useMenuListContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuListContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,wBAAV,CAAmC,KAAnC,EAAuD;AAEzD,MAAA,oBAAoB,GAOlB,KAAK,CAPa,oBAApB;AAAA,MACA,aAAa,GAMX,KAAK,CANM,aADb;AAAA,MAEA,cAAc,GAKZ,KAAK,CALO,cAFd;AAAA,MAGA,WAAW,GAIT,KAAK,CAJI,WAHX;AAAA,MAIA,wBAAwB,GAGtB,KAAK,CAHiB,wBAJxB;AAAA,MAKA,QAAQ,GAEN,KAAK,CAFC,QALR;AAAA,MAMA,aAAa,GACX,KAAK,CADM,aANb,CAFyD,CAW3D;;AACA,MAAM,QAAQ,GAAG;AACf,IAAA,oBAAoB,EAAA,oBADL;AAEf,IAAA,aAAa,EAAA,aAFE;AAGf,IAAA,cAAc,EAAA,cAHC;AAIf,IAAA,WAAW,EAAA,WAJI;AAKf,IAAA,wBAAwB,EAAA,wBALT;AAMf,IAAA,QAAQ,EAAA,QANO;AAOf,IAAA,aAAa,EAAA;AAPE,GAAjB;AAUA,SAAO;AAAE,IAAA,QAAQ,EAAA;AAAV,GAAP;AACD","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuList/useMenuListContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,wBAAV,CAAmC,KAAnC,EAAuD;AAC3D,QAAM;AACJ,IAAA,oBADI;AAEJ,IAAA,aAFI;AAGJ,IAAA,cAHI;AAIJ,IAAA,WAJI;AAKJ,IAAA,wBALI;AAMJ,IAAA,QANI;AAOJ,IAAA;AAPI,MAQF,KARJ,CAD2D,CAW3D;;AACA,QAAM,QAAQ,GAAG;AACf,IAAA,oBADe;AAEf,IAAA,aAFe;AAGf,IAAA,cAHe;AAIf,IAAA,WAJe;AAKf,IAAA,wBALe;AAMf,IAAA,QANe;AAOf,IAAA;AAPe,GAAjB;AAUA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourceRoot":""}
@@ -1,4 +1,5 @@
1
1
  import type { MenuListState } from './MenuList.types';
2
+ export declare const menuListClassName = "fui-MenuList";
2
3
  /**
3
4
  * Apply styling to the Menu slots based on the state
4
5
  */
@@ -1,6 +1,7 @@
1
1
  import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
+ export const menuListClassName = 'fui-MenuList';
2
3
 
3
- var useStyles = /*#__PURE__*/__styles({
4
+ const useStyles = /*#__PURE__*/__styles({
4
5
  "root": {
5
6
  "mc9l5x": "f22iagw",
6
7
  "Beiy3e4": "f1vx9l62",
@@ -14,9 +15,9 @@ var useStyles = /*#__PURE__*/__styles({
14
15
  */
15
16
 
16
17
 
17
- export var useMenuListStyles = function (state) {
18
- var styles = useStyles();
19
- state.root.className = mergeClasses(styles.root, state.root.className);
18
+ export const useMenuListStyles = state => {
19
+ const styles = useStyles();
20
+ state.root.className = mergeClasses(menuListClassName, styles.root, state.root.className);
20
21
  return state;
21
22
  };
22
23
  //# sourceMappingURL=useMenuListStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;AAGA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAQA;;AAEG;;;AACH,OAAO,IAAM,iBAAiB,GAAG,UAAC,KAAD,EAAqB;AACpD,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;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAQA;;AAEG;;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAAwC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,iBAAD,EAAoB,MAAM,CAAC,IAA3B,EAAiC,KAAK,CAAC,IAAN,CAAW,SAA5C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
@@ -6,8 +6,8 @@ import { renderMenuPopover } from './renderMenuPopover';
6
6
  * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
7
7
  */
8
8
 
9
- export var MenuPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useMenuPopover(props, ref);
9
+ export const MenuPopover = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useMenuPopover(props, ref);
11
11
  useMenuPopoverStyles(state);
12
12
  return renderMenuPopover(state);
13
13
  });