@fluentui/react-menu 9.12.11 → 9.12.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. package/CHANGELOG.json +82 -1
  2. package/CHANGELOG.md +22 -2
  3. package/lib/components/Menu/Menu.js.map +1 -1
  4. package/lib/components/Menu/renderMenu.js.map +1 -1
  5. package/lib/components/Menu/useMenu.js +13 -11
  6. package/lib/components/Menu/useMenu.js.map +1 -1
  7. package/lib/components/Menu/useMenuContextValues.js +1 -1
  8. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  9. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  10. package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
  11. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  13. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  14. package/lib/components/MenuGroup/renderMenuGroup.js +5 -4
  15. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  16. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  17. package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
  18. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  19. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  20. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
  21. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  22. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -1
  23. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  24. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  25. package/lib/components/MenuItem/renderMenuItem.js +10 -2
  26. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  27. package/lib/components/MenuItem/useCharacterSearch.js +5 -4
  28. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  29. package/lib/components/MenuItem/useMenuItem.js +8 -8
  30. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  31. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  32. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +9 -2
  33. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  34. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
  35. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  36. package/lib/components/MenuItemLink/MenuItemLink.js.map +1 -1
  37. package/lib/components/MenuItemLink/renderMenuItemLink.js +9 -2
  38. package/lib/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
  39. package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  40. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  41. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +9 -2
  42. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  43. package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
  44. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  45. package/lib/components/MenuList/MenuList.js.map +1 -1
  46. package/lib/components/MenuList/renderMenuList.js +5 -4
  47. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  48. package/lib/components/MenuList/useMenuList.js +6 -4
  49. package/lib/components/MenuList/useMenuList.js.map +1 -1
  50. package/lib/components/MenuList/useMenuListContextValues.js +1 -1
  51. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  52. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  53. package/lib/components/MenuPopover/renderMenuPopover.js +6 -5
  54. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  55. package/lib/components/MenuPopover/useMenuPopover.js +6 -4
  56. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  57. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  58. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
  59. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  60. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +8 -6
  61. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  62. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  63. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  64. package/lib/components/MenuTrigger/useMenuTrigger.js +15 -13
  65. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  66. package/lib/contexts/menuContext.js.map +1 -1
  67. package/lib/contexts/menuGroupContext.js.map +1 -1
  68. package/lib/contexts/menuListContext.js.map +1 -1
  69. package/lib/contexts/menuTriggerContext.js.map +1 -1
  70. package/lib/utils/useIsSubmenu.js.map +1 -1
  71. package/lib/utils/useOnMenuEnter.js +1 -1
  72. package/lib/utils/useOnMenuEnter.js.map +1 -1
  73. package/lib-commonjs/Menu.js +2 -2
  74. package/lib-commonjs/Menu.js.map +1 -1
  75. package/lib-commonjs/MenuDivider.js +2 -2
  76. package/lib-commonjs/MenuDivider.js.map +1 -1
  77. package/lib-commonjs/MenuGroup.js +2 -2
  78. package/lib-commonjs/MenuGroup.js.map +1 -1
  79. package/lib-commonjs/MenuGroupHeader.js +2 -2
  80. package/lib-commonjs/MenuGroupHeader.js.map +1 -1
  81. package/lib-commonjs/MenuItem.js +2 -2
  82. package/lib-commonjs/MenuItem.js.map +1 -1
  83. package/lib-commonjs/MenuItemCheckbox.js +2 -2
  84. package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
  85. package/lib-commonjs/MenuItemLink.js +2 -2
  86. package/lib-commonjs/MenuItemLink.js.map +1 -1
  87. package/lib-commonjs/MenuItemRadio.js +2 -2
  88. package/lib-commonjs/MenuItemRadio.js.map +1 -1
  89. package/lib-commonjs/MenuList.js +2 -2
  90. package/lib-commonjs/MenuList.js.map +1 -1
  91. package/lib-commonjs/MenuPopover.js +2 -2
  92. package/lib-commonjs/MenuPopover.js.map +1 -1
  93. package/lib-commonjs/MenuSplitGroup.js +2 -2
  94. package/lib-commonjs/MenuSplitGroup.js.map +1 -1
  95. package/lib-commonjs/MenuTrigger.js +2 -2
  96. package/lib-commonjs/MenuTrigger.js.map +1 -1
  97. package/lib-commonjs/components/Menu/Menu.js +5 -3
  98. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  99. package/lib-commonjs/components/Menu/Menu.types.js +2 -2
  100. package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
  101. package/lib-commonjs/components/Menu/index.js +6 -6
  102. package/lib-commonjs/components/Menu/index.js.map +1 -1
  103. package/lib-commonjs/components/Menu/renderMenu.js +5 -3
  104. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  105. package/lib-commonjs/components/Menu/useMenu.js +35 -31
  106. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  107. package/lib-commonjs/components/Menu/useMenuContextValues.js +4 -2
  108. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  109. package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -7
  110. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  111. package/lib-commonjs/components/MenuDivider/index.js +6 -6
  112. package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
  113. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +8 -6
  114. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  115. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +7 -5
  116. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  117. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +7 -3
  118. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
  119. package/lib-commonjs/components/MenuGroup/MenuGroup.js +9 -7
  120. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  121. package/lib-commonjs/components/MenuGroup/index.js +7 -7
  122. package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
  123. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +11 -8
  124. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  125. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +8 -6
  126. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  127. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +6 -4
  128. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  129. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js +6 -2
  130. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
  131. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -7
  132. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  133. package/lib-commonjs/components/MenuGroupHeader/index.js +6 -6
  134. package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
  135. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +8 -6
  136. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  137. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +8 -6
  138. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  139. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +7 -3
  140. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
  141. package/lib-commonjs/components/MenuItem/MenuItem.js +9 -7
  142. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  143. package/lib-commonjs/components/MenuItem/index.js +6 -6
  144. package/lib-commonjs/components/MenuItem/index.js.map +1 -1
  145. package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -6
  146. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  147. package/lib-commonjs/components/MenuItem/useCharacterSearch.js +10 -7
  148. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  149. package/lib-commonjs/components/MenuItem/useMenuItem.js +31 -29
  150. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  151. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +7 -3
  152. package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
  153. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -7
  154. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  155. package/lib-commonjs/components/MenuItemCheckbox/index.js +6 -6
  156. package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
  157. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -6
  158. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  159. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +13 -11
  160. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  161. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +8 -4
  162. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
  163. package/lib-commonjs/components/MenuItemLink/MenuItemLink.js +7 -5
  164. package/lib-commonjs/components/MenuItemLink/MenuItemLink.js.map +1 -1
  165. package/lib-commonjs/components/MenuItemLink/index.js +6 -6
  166. package/lib-commonjs/components/MenuItemLink/index.js.map +1 -1
  167. package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js +15 -6
  168. package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
  169. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js +7 -5
  170. package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js.map +1 -1
  171. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js +9 -5
  172. package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
  173. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -7
  174. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  175. package/lib-commonjs/components/MenuItemRadio/index.js +6 -6
  176. package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
  177. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -6
  178. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  179. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +13 -11
  180. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  181. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +8 -4
  182. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
  183. package/lib-commonjs/components/MenuList/MenuList.js +9 -7
  184. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  185. package/lib-commonjs/components/MenuList/MenuList.types.js +2 -2
  186. package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
  187. package/lib-commonjs/components/MenuList/index.js +7 -7
  188. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  189. package/lib-commonjs/components/MenuList/renderMenuList.js +11 -8
  190. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  191. package/lib-commonjs/components/MenuList/useMenuList.js +21 -17
  192. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  193. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +4 -2
  194. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  195. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +7 -3
  196. package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
  197. package/lib-commonjs/components/MenuPopover/MenuPopover.js +9 -7
  198. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  199. package/lib-commonjs/components/MenuPopover/index.js +6 -6
  200. package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
  201. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +13 -10
  202. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  203. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +23 -19
  204. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  205. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +7 -3
  206. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
  207. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +9 -7
  208. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  209. package/lib-commonjs/components/MenuSplitGroup/index.js +6 -6
  210. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
  211. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +8 -6
  212. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  213. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +21 -17
  214. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  215. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +7 -3
  216. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
  217. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +5 -3
  218. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  219. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +2 -2
  220. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  221. package/lib-commonjs/components/MenuTrigger/index.js +5 -5
  222. package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
  223. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -3
  224. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  225. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +33 -29
  226. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  227. package/lib-commonjs/components/index.js +3 -3
  228. package/lib-commonjs/components/index.js.map +1 -1
  229. package/lib-commonjs/contexts/menuContext.js +14 -8
  230. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  231. package/lib-commonjs/contexts/menuGroupContext.js +8 -4
  232. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  233. package/lib-commonjs/contexts/menuListContext.js +14 -8
  234. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  235. package/lib-commonjs/contexts/menuTriggerContext.js +8 -4
  236. package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
  237. package/lib-commonjs/index.js +225 -83
  238. package/lib-commonjs/index.js.map +1 -1
  239. package/lib-commonjs/selectable/index.js +3 -3
  240. package/lib-commonjs/selectable/index.js.map +1 -1
  241. package/lib-commonjs/selectable/types.js +2 -2
  242. package/lib-commonjs/selectable/types.js.map +1 -1
  243. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js +4 -2
  244. package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
  245. package/lib-commonjs/utils/index.js +2 -2
  246. package/lib-commonjs/utils/index.js.map +1 -1
  247. package/lib-commonjs/utils/useIsSubmenu.js +5 -3
  248. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  249. package/lib-commonjs/utils/useOnMenuEnter.js +16 -10
  250. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  251. package/package.json +16 -16
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "MenuItemRadio", {
6
6
  enumerable: true,
7
- get: ()=>MenuItemRadio
7
+ get: function() {
8
+ return MenuItemRadio;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useMenuItemRadio = require("./useMenuItemRadio");
12
14
  const _renderMenuItemRadio = require("./renderMenuItemRadio");
13
- const _useMenuItemRadioStylesStyles = require("./useMenuItemRadioStyles.styles");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _useMenuItemRadioStylesstyles = require("./useMenuItemRadioStyles.styles");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const MenuItemRadio = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useMenuItemRadio.useMenuItemRadio_unstable)(props, ref);
17
- (0, _useMenuItemRadioStylesStyles.useMenuItemRadioStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuItemRadioStyles_unstable')(state);
19
+ (0, _useMenuItemRadioStylesstyles.useMenuItemRadioStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMenuItemRadioStyles_unstable')(state);
19
21
  return (0, _renderMenuItemRadio.renderMenuItemRadio_unstable)(state);
20
22
  });
21
23
  MenuItemRadio.displayName = 'MenuItemRadio';
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */ export const MenuItemRadio = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemRadio_unstable(props, ref);\n useMenuItemRadioStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n return renderMenuItemRadio_unstable(state);\n});\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"names":["MenuItemRadio","React","forwardRef","props","ref","state","useMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","renderMenuItemRadio_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;kCACmB;qCACG;8CACG;qCACJ;AAGjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC1E,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACxC;AACAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */ export const MenuItemRadio = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemRadio_unstable(props, ref);\n useMenuItemRadioStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n return renderMenuItemRadio_unstable(state);\n});\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"names":["MenuItemRadio","React","forwardRef","props","ref","state","useMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","renderMenuItemRadio_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;kCACmB;qCACG;8CACG;qCACJ;AAGjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACxC;AACAL,cAAcU,WAAW,GAAG"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./MenuItemRadio.types"), exports);
7
- _exportStar(require("./MenuItemRadio"), exports);
8
- _exportStar(require("./renderMenuItemRadio"), exports);
9
- _exportStar(require("./useMenuItemRadio"), exports);
10
- _exportStar(require("./useMenuItemRadioStyles.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./MenuItemRadio.types"), exports);
7
+ _export_star._(require("./MenuItemRadio"), exports);
8
+ _export_star._(require("./renderMenuItemRadio"), exports);
9
+ _export_star._(require("./useMenuItemRadio"), exports);
10
+ _export_star._(require("./useMenuItemRadioStyles.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1,14 +1,23 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderMenuItemRadio_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderMenuItemRadio_unstable
7
+ get: function() {
8
+ return renderMenuItemRadio_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const renderMenuItemRadio_unstable = (state)=>{
12
- (0, _reactUtilities.assertSlots)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.checkmark && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.checkmark, null), state.icon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.icon, null), state.content && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.content, null), state.secondaryContent && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.secondaryContent, null));
14
+ (0, _reactutilities.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ state.checkmark && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.checkmark, {}),
18
+ state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
19
+ state.content && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
20
+ state.secondaryContent && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.secondaryContent, {})
21
+ ]
22
+ });
14
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuItemRadio.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Redefine the render function to add slots. Reuse the menuitemradio structure but add\n * slots to children.\n */ export const renderMenuItemRadio_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.checkmark && /*#__PURE__*/ createElement(state.checkmark, null), state.icon && /*#__PURE__*/ createElement(state.icon, null), state.content && /*#__PURE__*/ createElement(state.content, null), state.secondaryContent && /*#__PURE__*/ createElement(state.secondaryContent, null));\n};\n"],"names":["renderMenuItemRadio_unstable","state","assertSlots","createElement","root","checkmark","icon","content","secondaryContent"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;AAIjB,MAAMA,+BAA+B,CAACC,QAAQ;IACrDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMI,SAAS,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACF,MAAMI,SAAS,EAAE,IAAI,GAAGJ,MAAMK,IAAI,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMK,IAAI,EAAE,IAAI,GAAGL,MAAMM,OAAO,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACF,MAAMM,OAAO,EAAE,IAAI,GAAGN,MAAMO,gBAAgB,IAAI,WAAW,GAAGL,IAAAA,8BAAa,EAACF,MAAMO,gBAAgB,EAAE,IAAI;AAClV"}
1
+ {"version":3,"sources":["renderMenuItemRadio.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Redefine the render function to add slots. Reuse the menuitemradio structure but add\n * slots to children.\n */ export const renderMenuItemRadio_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.checkmark && /*#__PURE__*/ _jsx(state.checkmark, {}),\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n state.content && /*#__PURE__*/ _jsx(state.content, {}),\n state.secondaryContent && /*#__PURE__*/ _jsx(state.secondaryContent, {})\n ]\n });\n};\n"],"names":["renderMenuItemRadio_unstable","state","assertSlots","_jsxs","root","children","checkmark","_jsx","icon","content","secondaryContent"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAK7DA;;;eAAAA;;;4BAL2G;gCAChG;AAIjB,MAAMA,+BAA+B,CAACC;IAC7CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,SAAS,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,SAAS,EAAE,CAAC;YACxDL,MAAMO,IAAI,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,IAAI,EAAE,CAAC;YAC9CP,MAAMQ,OAAO,IAAI,WAAW,GAAGF,IAAAA,eAAI,EAACN,MAAMQ,OAAO,EAAE,CAAC;YACpDR,MAAMS,gBAAgB,IAAI,WAAW,GAAGH,IAAAA,eAAI,EAACN,MAAMS,gBAAgB,EAAE,CAAC;SACzE;IACL;AACJ"}
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useMenuItemRadio_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useMenuItemRadio_unstable
7
+ get: function() {
8
+ return useMenuItemRadio_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _reactIcons = require("@fluentui/react-icons");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _reacticons = require("@fluentui/react-icons");
13
15
  const _menuListContext = require("../../contexts/menuListContext");
14
16
  const _useMenuItem = require("../MenuItem/useMenuItem");
15
17
  const useMenuItemRadio_unstable = (props, ref)=>{
16
- const { name , value } = props;
18
+ const { name, value } = props;
17
19
  const checked = (0, _menuListContext.useMenuListContext_unstable)((context)=>{
18
20
  var _context_checkedValues;
19
21
  const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];
@@ -25,17 +27,17 @@ const useMenuItemRadio_unstable = (props, ref)=>{
25
27
  ...props,
26
28
  role: 'menuitemradio',
27
29
  'aria-checked': checked,
28
- checkmark: _reactUtilities.slot.optional(props.checkmark, {
30
+ checkmark: _reactutilities.slot.optional(props.checkmark, {
29
31
  defaultProps: {
30
- children: /*#__PURE__*/ _react.createElement(_reactIcons.Checkmark16Filled, null)
32
+ children: /*#__PURE__*/ _react.createElement(_reacticons.Checkmark16Filled, null)
31
33
  },
32
34
  renderByDefault: true,
33
35
  elementType: 'span'
34
36
  }),
35
37
  onClick: (e)=>{
36
- var _props_onClick;
37
- selectRadio === null || selectRadio === void 0 ? void 0 : selectRadio(e, name, value, checked);
38
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
38
+ var _selectRadio, _props_onClick, _props;
39
+ (_selectRadio = selectRadio) === null || _selectRadio === void 0 ? void 0 : _selectRadio(e, name, value, checked);
40
+ (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, e);
39
41
  }
40
42
  }, ref),
41
43
  checked,
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\n/**\n * Given user props, returns state and render function for a MenuItemRadio.\n */ export const useMenuItemRadio_unstable = (props, ref)=>{\n const { name , value } = props;\n const checked = useMenuListContext_unstable((context)=>{\n var _context_checkedValues;\n const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];\n return checkedItems.indexOf(value) !== -1;\n });\n const selectRadio = useMenuListContext_unstable((context)=>context.selectRadio);\n return {\n ...useMenuItem_unstable({\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: slot.optional(props.checkmark, {\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(Checkmark16Filled, null)\n },\n renderByDefault: true,\n elementType: 'span'\n }),\n onClick: (e)=>{\n var _props_onClick;\n selectRadio === null || selectRadio === void 0 ? void 0 : selectRadio(e, name, value, checked);\n (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);\n }\n }, ref),\n checked,\n name,\n value\n };\n};\n"],"names":["useMenuItemRadio_unstable","props","ref","name","value","checked","useMenuListContext_unstable","context","_context_checkedValues","checkedItems","checkedValues","indexOf","selectRadio","useMenuItem_unstable","role","checkmark","slot","optional","defaultProps","children","React","createElement","Checkmark16Filled","renderByDefault","elementType","onClick","e","_props_onClick","call"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACF;4BACa;iCACU;6BACP;AAG1B,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAM,EAAEC,KAAI,EAAGC,MAAK,EAAG,GAAGH;IAC1B,MAAMI,UAAUC,IAAAA,4CAA2B,EAAC,CAACC,UAAU;QACnD,IAAIC;QACJ,MAAMC,eAAe,AAAC,CAAA,AAACD,CAAAA,yBAAyBD,QAAQG,aAAa,AAAD,MAAO,IAAI,IAAIF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,sBAAsB,CAACL,KAAK,AAAD,KAAM,EAAE;QACnK,OAAOM,aAAaE,OAAO,CAACP,WAAW,CAAC;IAC5C;IACA,MAAMQ,cAAcN,IAAAA,4CAA2B,EAAC,CAACC,UAAUA,QAAQK,WAAW;IAC9E,OAAO;QACH,GAAGC,IAAAA,iCAAoB,EAAC;YACpB,GAAGZ,KAAK;YACRa,MAAM;YACN,gBAAgBT;YAChBU,WAAWC,oBAAI,CAACC,QAAQ,CAAChB,MAAMc,SAAS,EAAE;gBACtCG,cAAc;oBACVC,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,6BAAiB,EAAE,IAAI;gBACvE;gBACAC,iBAAiB,IAAI;gBACrBC,aAAa;YACjB;YACAC,SAAS,CAACC,IAAI;gBACV,IAAIC;gBACJf,gBAAgB,IAAI,IAAIA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYc,GAAGvB,MAAMC,OAAOC,QAAQ;gBAC7FsB,CAAAA,iBAAiB1B,MAAMwB,OAAO,AAAD,MAAO,IAAI,IAAIE,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeC,IAAI,CAAC3B,OAAOyB,EAAE;YACnH;QACJ,GAAGxB,IAAI;QACPG;QACAF;QACAC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useMenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\n/**\n * Given user props, returns state and render function for a MenuItemRadio.\n */ export const useMenuItemRadio_unstable = (props, ref)=>{\n const { name, value } = props;\n const checked = useMenuListContext_unstable((context)=>{\n var _context_checkedValues;\n const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];\n return checkedItems.indexOf(value) !== -1;\n });\n const selectRadio = useMenuListContext_unstable((context)=>context.selectRadio);\n return {\n ...useMenuItem_unstable({\n ...props,\n role: 'menuitemradio',\n 'aria-checked': checked,\n checkmark: slot.optional(props.checkmark, {\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(Checkmark16Filled, null)\n },\n renderByDefault: true,\n elementType: 'span'\n }),\n onClick: (e)=>{\n var _selectRadio, _props_onClick, _props;\n (_selectRadio = selectRadio) === null || _selectRadio === void 0 ? void 0 : _selectRadio(e, name, value, checked);\n (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, e);\n }\n }, ref),\n checked,\n name,\n value\n };\n};\n"],"names":["useMenuItemRadio_unstable","props","ref","name","value","checked","useMenuListContext_unstable","context","_context_checkedValues","checkedItems","checkedValues","indexOf","selectRadio","useMenuItem_unstable","role","checkmark","slot","optional","defaultProps","children","React","createElement","Checkmark16Filled","renderByDefault","elementType","onClick","e","_selectRadio","_props_onClick","_props","call"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;gCACF;4BACa;iCACU;6BACP;AAG1B,MAAMA,4BAA4B,CAACC,OAAOC;IACjD,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGH;IACxB,MAAMI,UAAUC,IAAAA,4CAA2B,EAAC,CAACC;QACzC,IAAIC;QACJ,MAAMC,eAAe,AAAC,CAAA,AAACD,CAAAA,yBAAyBD,QAAQG,aAAa,AAAD,MAAO,QAAQF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,sBAAsB,CAACL,KAAK,AAAD,KAAM,EAAE;QACnK,OAAOM,aAAaE,OAAO,CAACP,WAAW,CAAC;IAC5C;IACA,MAAMQ,cAAcN,IAAAA,4CAA2B,EAAC,CAACC,UAAUA,QAAQK,WAAW;IAC9E,OAAO;QACH,GAAGC,IAAAA,iCAAoB,EAAC;YACpB,GAAGZ,KAAK;YACRa,MAAM;YACN,gBAAgBT;YAChBU,WAAWC,oBAAI,CAACC,QAAQ,CAAChB,MAAMc,SAAS,EAAE;gBACtCG,cAAc;oBACVC,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,6BAAiB,EAAE;gBACnE;gBACAC,iBAAiB;gBACjBC,aAAa;YACjB;YACAC,SAAS,CAACC;gBACN,IAAIC,cAAcC,gBAAgBC;gBACjCF,CAAAA,eAAef,WAAU,MAAO,QAAQe,iBAAiB,KAAK,IAAI,KAAK,IAAIA,aAAaD,GAAGvB,MAAMC,OAAOC;gBACxGuB,CAAAA,iBAAiB,AAACC,CAAAA,SAAS5B,KAAI,EAAGwB,OAAO,AAAD,MAAO,QAAQG,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeE,IAAI,CAACD,QAAQH;YAC7H;QACJ,GAAGxB,IAAI;QACPG;QACAF;QACAC;IACJ;AACJ"}
@@ -9,12 +9,16 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- menuItemRadioClassNames: ()=>menuItemRadioClassNames,
13
- useMenuItemRadioStyles_unstable: ()=>useMenuItemRadioStyles_unstable
12
+ menuItemRadioClassNames: function() {
13
+ return menuItemRadioClassNames;
14
+ },
15
+ useMenuItemRadioStyles_unstable: function() {
16
+ return useMenuItemRadioStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const _index = require("../../selectable/index");
17
- const _useMenuItemStylesStyles = require("../MenuItem/useMenuItemStyles.styles");
21
+ const _useMenuItemStylesstyles = require("../MenuItem/useMenuItemStyles.styles");
18
22
  const menuItemRadioClassNames = {
19
23
  root: 'fui-MenuItemRadio',
20
24
  icon: 'fui-MenuItemRadio__icon',
@@ -36,6 +40,6 @@ const useMenuItemRadioStyles_unstable = (state)=>{
36
40
  if (state.checkmark) {
37
41
  state.checkmark.className = (0, _react.mergeClasses)(menuItemRadioClassNames.checkmark, state.checkmark.className);
38
42
  }
39
- (0, _useMenuItemStylesStyles.useMenuItemStyles_unstable)(state);
43
+ (0, _useMenuItemStylesstyles.useMenuItemStyles_unstable)(state);
40
44
  (0, _index.useCheckmarkStyles_unstable)(state);
41
45
  }; //# sourceMappingURL=useMenuItemRadioStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuItemRadioStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemRadioClassNames = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent'\n};\nexport const useMenuItemRadioStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemRadioStyles.styles.js.map"],"names":["menuItemRadioClassNames","useMenuItemRadioStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB,MAAvBA;IAOAC,+BAA+B,MAA/BA;;uBAVgB;uBACe;yCACD;AACpC,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,kCAAkCM,CAAAA,QAAS;IACtDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACtF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACjG,CAAC;IACD,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC5H,CAAC;IACD,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IACxF,CAAC;IACD,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IACvG,CAAC;IACDE,IAAAA,mDAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,yDAAyD"}
1
+ {"version":3,"sources":["useMenuItemRadioStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemRadioClassNames = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent'\n};\nexport const useMenuItemRadioStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemRadioStyles.styles.js.map"],"names":["menuItemRadioClassNames","useMenuItemRadioStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB;eAAvBA;;IAOAC,+BAA+B;eAA/BA;;;uBAVgB;uBACe;yCACD;AACpC,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,kCAAkCM,CAAAA;IAC7CA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACtF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACjG;IACA,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC5H;IACA,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IACxF;IACA,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IACvG;IACAE,IAAAA,mDAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,yDAAyD"}
@@ -4,20 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "MenuList", {
6
6
  enumerable: true,
7
- get: ()=>MenuList
7
+ get: function() {
8
+ return MenuList;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useMenuList = require("./useMenuList");
12
14
  const _renderMenuList = require("./renderMenuList");
13
15
  const _useMenuListContextValues = require("./useMenuListContextValues");
14
- const _useMenuListStylesStyles = require("./useMenuListStyles.styles");
15
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
16
+ const _useMenuListStylesstyles = require("./useMenuListStyles.styles");
17
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
16
18
  const MenuList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
19
  const state = (0, _useMenuList.useMenuList_unstable)(props, ref);
18
20
  const contextValues = (0, _useMenuListContextValues.useMenuListContextValues_unstable)(state);
19
- (0, _useMenuListStylesStyles.useMenuListStyles_unstable)(state);
20
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuListStyles_unstable')(state);
21
+ (0, _useMenuListStylesstyles.useMenuListStyles_unstable)(state);
22
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMenuListStyles_unstable')(state);
21
23
  return (0, _renderMenuList.renderMenuList_unstable)(state, contextValues);
22
24
  });
23
25
  MenuList.displayName = 'MenuList';
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */ export const MenuList = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n useMenuListStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n return renderMenuList_unstable(state, contextValues);\n});\nMenuList.displayName = 'MenuList';\n"],"names":["MenuList","React","forwardRef","props","ref","state","useMenuList_unstable","contextValues","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","renderMenuList_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;6BACc;gCACG;0CACU;yCACP;qCACC;AAGjC,MAAMA,WAAW,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACrE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,2DAAiC,EAACH;IACxDI,IAAAA,mDAA0B,EAACJ;IAC3BK,IAAAA,gDAA2B,EAAC,8BAA8BL;IAC1D,OAAOM,IAAAA,uCAAuB,EAACN,OAAOE;AAC1C;AACAP,SAASY,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */ export const MenuList = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n useMenuListStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n return renderMenuList_unstable(state, contextValues);\n});\nMenuList.displayName = 'MenuList';\n"],"names":["MenuList","React","forwardRef","props","ref","state","useMenuList_unstable","contextValues","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","renderMenuList_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;6BACc;gCACG;0CACU;yCACP;qCACC;AAGjC,MAAMA,WAAW,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/D,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,2DAAiC,EAACH;IACxDI,IAAAA,mDAA0B,EAACJ;IAC3BK,IAAAA,gDAA2B,EAAC,8BAA8BL;IAC1D,OAAOM,IAAAA,uCAAuB,EAACN,OAAOE;AAC1C;AACAP,SAASY,WAAW,GAAG"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
5
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuList.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
1
+ {"version":3,"sources":["MenuList.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./MenuList"), exports);
7
- _exportStar(require("./MenuList.types"), exports);
8
- _exportStar(require("./renderMenuList"), exports);
9
- _exportStar(require("./useMenuList"), exports);
10
- _exportStar(require("./useMenuListStyles.styles"), exports);
11
- _exportStar(require("./useMenuListContextValues"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./MenuList"), exports);
7
+ _export_star._(require("./MenuList.types"), exports);
8
+ _export_star._(require("./renderMenuList"), exports);
9
+ _export_star._(require("./useMenuList"), exports);
10
+ _export_star._(require("./useMenuListStyles.styles"), exports);
11
+ _export_star._(require("./useMenuListContextValues"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles.styles';\nexport * from './useMenuListContextValues';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles.styles';\nexport * from './useMenuListContextValues';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
@@ -1,17 +1,20 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderMenuList_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderMenuList_unstable
7
+ get: function() {
8
+ return renderMenuList_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const _menuListContext = require("../../contexts/menuListContext");
12
14
  const renderMenuList_unstable = (state, contextValues)=>{
13
- (0, _reactUtilities.assertSlots)(state);
14
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_menuListContext.MenuListProvider, {
15
- value: contextValues.menuList
16
- }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null));
15
+ (0, _reactutilities.assertSlots)(state);
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_menuListContext.MenuListProvider, {
17
+ value: contextValues.menuList,
18
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
19
+ });
17
20
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuList.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n/**\n * Function that renders the final JSX of the component\n */ export const renderMenuList_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(MenuListProvider, {\n value: contextValues.menuList\n }, /*#__PURE__*/ createElement(state.root, null));\n};\n"],"names":["renderMenuList_unstable","state","contextValues","assertSlots","createElement","MenuListProvider","value","menuList","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;iCACK;AAGtB,MAAMA,0BAA0B,CAACC,OAAOC,gBAAgB;IAC/DC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,iCAAgB,EAAE;QACjDC,OAAOJ,cAAcK,QAAQ;IACjC,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAE,IAAI;AACnD"}
1
+ {"version":3,"sources":["renderMenuList.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '../../contexts/menuListContext';\n/**\n * Function that renders the final JSX of the component\n */ export const renderMenuList_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(MenuListProvider, {\n value: contextValues.menuList,\n children: /*#__PURE__*/ _jsx(state.root, {})\n });\n};\n"],"names":["renderMenuList_unstable","state","contextValues","assertSlots","_jsx","MenuListProvider","value","menuList","children","root"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAK7DA;;;eAAAA;;;4BAL4F;gCACjF;iCACK;AAGtB,MAAMA,0BAA0B,CAACC,OAAOC;IAC/CC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,eAAI,EAACC,iCAAgB,EAAE;QACxCC,OAAOJ,cAAcK,QAAQ;QAC7BC,UAAU,WAAW,GAAGJ,IAAAA,eAAI,EAACH,MAAMQ,IAAI,EAAE,CAAC;IAC9C;AACJ"}
@@ -4,19 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useMenuList_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useMenuList_unstable
7
+ get: function() {
8
+ return useMenuList_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _reactTabster = require("@fluentui/react-tabster");
13
- const _reactContextSelector = require("@fluentui/react-context-selector");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _reacttabster = require("@fluentui/react-tabster");
15
+ const _reactcontextselector = require("@fluentui/react-context-selector");
14
16
  const _menuContext = require("../../contexts/menuContext");
15
17
  const useMenuList_unstable = (props, ref)=>{
16
- const { findAllFocusable } = (0, _reactTabster.useFocusFinders)();
18
+ const { findAllFocusable } = (0, _reacttabster.useFocusFinders)();
17
19
  const menuContext = useMenuContextSelectors();
18
- const hasMenuContext = (0, _reactContextSelector.useHasParentContext)(_menuContext.MenuContext);
19
- const focusAttributes = (0, _reactTabster.useArrowNavigationGroup)({
20
+ const hasMenuContext = (0, _reactcontextselector.useHasParentContext)(_menuContext.MenuContext);
21
+ const focusAttributes = (0, _reacttabster.useArrowNavigationGroup)({
20
22
  circular: true,
21
23
  ignoreDefaultKeydown: {
22
24
  Tab: hasMenuContext
@@ -70,15 +72,16 @@ const useMenuList_unstable = (props, ref)=>{
70
72
  findAllFocusable
71
73
  ]);
72
74
  var _props_checkedValues;
73
- const [checkedValues, setCheckedValues] = (0, _reactUtilities.useControllableState)({
75
+ const [checkedValues, setCheckedValues] = (0, _reactutilities.useControllableState)({
74
76
  state: (_props_checkedValues = props.checkedValues) !== null && _props_checkedValues !== void 0 ? _props_checkedValues : hasMenuContext ? menuContext.checkedValues : undefined,
75
77
  defaultState: props.defaultCheckedValues,
76
78
  initialState: {}
77
79
  });
78
80
  var _props_onCheckedValueChange;
79
81
  const handleCheckedValueChange = (_props_onCheckedValueChange = props.onCheckedValueChange) !== null && _props_onCheckedValueChange !== void 0 ? _props_onCheckedValueChange : hasMenuContext ? menuContext.onCheckedValueChange : undefined;
80
- const toggleCheckbox = (0, _reactUtilities.useEventCallback)((e, name, value, checked)=>{
81
- const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
82
+ const toggleCheckbox = (0, _reactutilities.useEventCallback)((e, name, value, checked)=>{
83
+ var _checkedValues, _handleCheckedValueChange;
84
+ const checkedItems = ((_checkedValues = checkedValues) === null || _checkedValues === void 0 ? void 0 : _checkedValues[name]) || [];
82
85
  const newCheckedItems = [
83
86
  ...checkedItems
84
87
  ];
@@ -87,7 +90,7 @@ const useMenuList_unstable = (props, ref)=>{
87
90
  } else {
88
91
  newCheckedItems.push(value);
89
92
  }
90
- handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
93
+ (_handleCheckedValueChange = handleCheckedValueChange) === null || _handleCheckedValueChange === void 0 ? void 0 : _handleCheckedValueChange(e, {
91
94
  name,
92
95
  checkedItems: newCheckedItems
93
96
  });
@@ -96,7 +99,8 @@ const useMenuList_unstable = (props, ref)=>{
96
99
  [name]: newCheckedItems
97
100
  }));
98
101
  });
99
- const selectRadio = (0, _reactUtilities.useEventCallback)((e, name, value)=>{
102
+ const selectRadio = (0, _reactutilities.useEventCallback)((e, name, value)=>{
103
+ var _handleCheckedValueChange;
100
104
  const newCheckedItems = [
101
105
  value
102
106
  ];
@@ -104,7 +108,7 @@ const useMenuList_unstable = (props, ref)=>{
104
108
  ...s,
105
109
  [name]: newCheckedItems
106
110
  }));
107
- handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {
111
+ (_handleCheckedValueChange = handleCheckedValueChange) === null || _handleCheckedValueChange === void 0 ? void 0 : _handleCheckedValueChange(e, {
108
112
  name,
109
113
  checkedItems: newCheckedItems
110
114
  });
@@ -113,8 +117,8 @@ const useMenuList_unstable = (props, ref)=>{
113
117
  components: {
114
118
  root: 'div'
115
119
  },
116
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
117
- ref: (0, _reactUtilities.useMergedRefs)(ref, innerRef),
120
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
121
+ ref: (0, _reactutilities.useMergedRefs)(ref, innerRef),
118
122
  role: 'menu',
119
123
  'aria-labelledby': menuContext.triggerId,
120
124
  ...focusAttributes,
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMergedRefs, useEventCallback, useControllableState, getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MenuContext } from '../../contexts/menuContext';\n/**\n * Returns the props and state required to render the component\n */ export const useMenuList_unstable = (props, ref)=>{\n const { findAllFocusable } = useFocusFinders();\n const menuContext = useMenuContextSelectors();\n const hasMenuContext = useHasParentContext(MenuContext);\n const focusAttributes = useArrowNavigationGroup({\n circular: true,\n ignoreDefaultKeydown: {\n Tab: hasMenuContext\n }\n });\n if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {\n // TODO throw warnings in development safely\n // eslint-disable-next-line no-console\n console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');\n }\n const innerRef = React.useRef(null);\n const setFocusByFirstCharacter = React.useCallback((e, itemEl)=>{\n // TODO use some kind of children registration to reduce dependency on DOM roles\n const acceptedRoles = [\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio'\n ];\n if (!innerRef.current) {\n return;\n }\n const menuItems = findAllFocusable(innerRef.current, (el)=>el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1);\n let startIndex = menuItems.indexOf(itemEl) + 1;\n if (startIndex === menuItems.length) {\n startIndex = 0;\n }\n const firstChars = menuItems.map((menuItem)=>{\n var _menuItem_textContent;\n return (_menuItem_textContent = menuItem.textContent) === null || _menuItem_textContent === void 0 ? void 0 : _menuItem_textContent.charAt(0).toLowerCase();\n });\n const char = e.key.toLowerCase();\n const getIndexFirstChars = (start, firstChar)=>{\n for(let i = start; i < firstChars.length; i++){\n if (char === firstChars[i]) {\n return i;\n }\n }\n return -1;\n };\n // Check remaining slots in the menu\n let index = getIndexFirstChars(startIndex, char);\n // If not found in remaining slots, check from beginning\n if (index === -1) {\n index = getIndexFirstChars(0, char);\n }\n // If match was found...\n if (index > -1) {\n menuItems[index].focus();\n }\n }, [\n findAllFocusable\n ]);\n var _props_checkedValues;\n const [checkedValues, setCheckedValues] = useControllableState({\n state: (_props_checkedValues = props.checkedValues) !== null && _props_checkedValues !== void 0 ? _props_checkedValues : hasMenuContext ? menuContext.checkedValues : undefined,\n defaultState: props.defaultCheckedValues,\n initialState: {}\n });\n var _props_onCheckedValueChange;\n const handleCheckedValueChange = (_props_onCheckedValueChange = props.onCheckedValueChange) !== null && _props_onCheckedValueChange !== void 0 ? _props_onCheckedValueChange : hasMenuContext ? menuContext.onCheckedValueChange : undefined;\n const toggleCheckbox = useEventCallback((e, name, value, checked)=>{\n const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];\n const newCheckedItems = [\n ...checkedItems\n ];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {\n name,\n checkedItems: newCheckedItems\n });\n setCheckedValues((s)=>({\n ...s,\n [name]: newCheckedItems\n }));\n });\n const selectRadio = useEventCallback((e, name, value)=>{\n const newCheckedItems = [\n value\n ];\n setCheckedValues((s)=>({\n ...s,\n [name]: newCheckedItems\n }));\n handleCheckedValueChange === null || handleCheckedValueChange === void 0 ? void 0 : handleCheckedValueChange(e, {\n name,\n checkedItems: newCheckedItems\n });\n });\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'menu',\n 'aria-labelledby': menuContext.triggerId,\n ...focusAttributes,\n ...props\n }), {\n elementType: 'div'\n }),\n hasIcons: menuContext.hasIcons || false,\n hasCheckmarks: menuContext.hasCheckmarks || false,\n checkedValues,\n hasMenuContext,\n setFocusByFirstCharacter,\n selectRadio,\n toggleCheckbox\n };\n};\n/**\n * Adds some sugar to fetching multiple context selector values\n */ const useMenuContextSelectors = ()=>{\n const checkedValues = useMenuContext_unstable((context)=>context.checkedValues);\n const onCheckedValueChange = useMenuContext_unstable((context)=>context.onCheckedValueChange);\n const triggerId = useMenuContext_unstable((context)=>context.triggerId);\n const hasIcons = useMenuContext_unstable((context)=>context.hasIcons);\n const hasCheckmarks = useMenuContext_unstable((context)=>context.hasCheckmarks);\n return {\n checkedValues,\n onCheckedValueChange,\n triggerId,\n hasIcons,\n hasCheckmarks\n };\n};\n/**\n * Helper function to detect if props and MenuContext values are both used\n */ const usingPropsAndMenuContext = (props, contextValue, hasMenuContext)=>{\n let isUsingPropsAndContext = false;\n for(const val in contextValue){\n if (props[val]) {\n isUsingPropsAndContext = true;\n }\n }\n return hasMenuContext && isUsingPropsAndContext;\n};\n"],"names":["useMenuList_unstable","props","ref","findAllFocusable","useFocusFinders","menuContext","useMenuContextSelectors","hasMenuContext","useHasParentContext","MenuContext","focusAttributes","useArrowNavigationGroup","circular","ignoreDefaultKeydown","Tab","usingPropsAndMenuContext","console","warn","innerRef","React","useRef","setFocusByFirstCharacter","useCallback","e","itemEl","acceptedRoles","current","menuItems","el","hasAttribute","indexOf","getAttribute","startIndex","length","firstChars","map","menuItem","_menuItem_textContent","textContent","charAt","toLowerCase","char","key","getIndexFirstChars","start","firstChar","i","index","focus","_props_checkedValues","checkedValues","setCheckedValues","useControllableState","state","undefined","defaultState","defaultCheckedValues","initialState","_props_onCheckedValueChange","handleCheckedValueChange","onCheckedValueChange","toggleCheckbox","useEventCallback","name","value","checked","checkedItems","newCheckedItems","splice","push","s","selectRadio","components","root","slot","always","getNativeElementProps","useMergedRefs","role","triggerId","elementType","hasIcons","hasCheckmarks","useMenuContext_unstable","context","contextValue","isUsingPropsAndContext","val"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;gCAC4E;8BAC1C;sCACrB;6BACI;AAI7B,MAAMA,uBAAuB,CAACC,OAAOC,MAAM;IAClD,MAAM,EAAEC,iBAAgB,EAAG,GAAGC,IAAAA,6BAAe;IAC7C,MAAMC,cAAcC;IACpB,MAAMC,iBAAiBC,IAAAA,yCAAmB,EAACC,wBAAW;IACtD,MAAMC,kBAAkBC,IAAAA,qCAAuB,EAAC;QAC5CC,UAAU,IAAI;QACdC,sBAAsB;YAClBC,KAAKP;QACT;IACJ;IACA,IAAIQ,yBAAyBd,OAAOI,aAAaE,iBAAiB;QAC9D,4CAA4C;QAC5C,sCAAsC;QACtCS,QAAQC,IAAI,CAAC;IACjB,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sourcesContent":["import * as React from 'react';\nimport { useMergedRefs, useEventCallback, useControllableState, getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MenuContext } from '../../contexts/menuContext';\n/**\n * Returns the props and state required to render the component\n */ export const useMenuList_unstable = (props, ref)=>{\n const { findAllFocusable } = useFocusFinders();\n const menuContext = useMenuContextSelectors();\n const hasMenuContext = useHasParentContext(MenuContext);\n const focusAttributes = useArrowNavigationGroup({\n circular: true,\n ignoreDefaultKeydown: {\n Tab: hasMenuContext\n }\n });\n if (usingPropsAndMenuContext(props, menuContext, hasMenuContext)) {\n // TODO throw warnings in development safely\n // eslint-disable-next-line no-console\n console.warn('You are using both MenuList and Menu props, we recommend you to use Menu props when available');\n }\n const innerRef = React.useRef(null);\n const setFocusByFirstCharacter = React.useCallback((e, itemEl)=>{\n // TODO use some kind of children registration to reduce dependency on DOM roles\n const acceptedRoles = [\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio'\n ];\n if (!innerRef.current) {\n return;\n }\n const menuItems = findAllFocusable(innerRef.current, (el)=>el.hasAttribute('role') && acceptedRoles.indexOf(el.getAttribute('role')) !== -1);\n let startIndex = menuItems.indexOf(itemEl) + 1;\n if (startIndex === menuItems.length) {\n startIndex = 0;\n }\n const firstChars = menuItems.map((menuItem)=>{\n var _menuItem_textContent;\n return (_menuItem_textContent = menuItem.textContent) === null || _menuItem_textContent === void 0 ? void 0 : _menuItem_textContent.charAt(0).toLowerCase();\n });\n const char = e.key.toLowerCase();\n const getIndexFirstChars = (start, firstChar)=>{\n for(let i = start; i < firstChars.length; i++){\n if (char === firstChars[i]) {\n return i;\n }\n }\n return -1;\n };\n // Check remaining slots in the menu\n let index = getIndexFirstChars(startIndex, char);\n // If not found in remaining slots, check from beginning\n if (index === -1) {\n index = getIndexFirstChars(0, char);\n }\n // If match was found...\n if (index > -1) {\n menuItems[index].focus();\n }\n }, [\n findAllFocusable\n ]);\n var _props_checkedValues;\n const [checkedValues, setCheckedValues] = useControllableState({\n state: (_props_checkedValues = props.checkedValues) !== null && _props_checkedValues !== void 0 ? _props_checkedValues : hasMenuContext ? menuContext.checkedValues : undefined,\n defaultState: props.defaultCheckedValues,\n initialState: {}\n });\n var _props_onCheckedValueChange;\n const handleCheckedValueChange = (_props_onCheckedValueChange = props.onCheckedValueChange) !== null && _props_onCheckedValueChange !== void 0 ? _props_onCheckedValueChange : hasMenuContext ? menuContext.onCheckedValueChange : undefined;\n const toggleCheckbox = useEventCallback((e, name, value, checked)=>{\n var _checkedValues, _handleCheckedValueChange;\n const checkedItems = ((_checkedValues = checkedValues) === null || _checkedValues === void 0 ? void 0 : _checkedValues[name]) || [];\n const newCheckedItems = [\n ...checkedItems\n ];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n (_handleCheckedValueChange = handleCheckedValueChange) === null || _handleCheckedValueChange === void 0 ? void 0 : _handleCheckedValueChange(e, {\n name,\n checkedItems: newCheckedItems\n });\n setCheckedValues((s)=>({\n ...s,\n [name]: newCheckedItems\n }));\n });\n const selectRadio = useEventCallback((e, name, value)=>{\n var _handleCheckedValueChange;\n const newCheckedItems = [\n value\n ];\n setCheckedValues((s)=>({\n ...s,\n [name]: newCheckedItems\n }));\n (_handleCheckedValueChange = handleCheckedValueChange) === null || _handleCheckedValueChange === void 0 ? void 0 : _handleCheckedValueChange(e, {\n name,\n checkedItems: newCheckedItems\n });\n });\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'menu',\n 'aria-labelledby': menuContext.triggerId,\n ...focusAttributes,\n ...props\n }), {\n elementType: 'div'\n }),\n hasIcons: menuContext.hasIcons || false,\n hasCheckmarks: menuContext.hasCheckmarks || false,\n checkedValues,\n hasMenuContext,\n setFocusByFirstCharacter,\n selectRadio,\n toggleCheckbox\n };\n};\n/**\n * Adds some sugar to fetching multiple context selector values\n */ const useMenuContextSelectors = ()=>{\n const checkedValues = useMenuContext_unstable((context)=>context.checkedValues);\n const onCheckedValueChange = useMenuContext_unstable((context)=>context.onCheckedValueChange);\n const triggerId = useMenuContext_unstable((context)=>context.triggerId);\n const hasIcons = useMenuContext_unstable((context)=>context.hasIcons);\n const hasCheckmarks = useMenuContext_unstable((context)=>context.hasCheckmarks);\n return {\n checkedValues,\n onCheckedValueChange,\n triggerId,\n hasIcons,\n hasCheckmarks\n };\n};\n/**\n * Helper function to detect if props and MenuContext values are both used\n */ const usingPropsAndMenuContext = (props, contextValue, hasMenuContext)=>{\n let isUsingPropsAndContext = false;\n for(const val in contextValue){\n if (props[val]) {\n isUsingPropsAndContext = true;\n }\n }\n return hasMenuContext && isUsingPropsAndContext;\n};\n"],"names":["useMenuList_unstable","props","ref","findAllFocusable","useFocusFinders","menuContext","useMenuContextSelectors","hasMenuContext","useHasParentContext","MenuContext","focusAttributes","useArrowNavigationGroup","circular","ignoreDefaultKeydown","Tab","usingPropsAndMenuContext","console","warn","innerRef","React","useRef","setFocusByFirstCharacter","useCallback","e","itemEl","acceptedRoles","current","menuItems","el","hasAttribute","indexOf","getAttribute","startIndex","length","firstChars","map","menuItem","_menuItem_textContent","textContent","charAt","toLowerCase","char","key","getIndexFirstChars","start","firstChar","i","index","focus","_props_checkedValues","checkedValues","setCheckedValues","useControllableState","state","undefined","defaultState","defaultCheckedValues","initialState","_props_onCheckedValueChange","handleCheckedValueChange","onCheckedValueChange","toggleCheckbox","useEventCallback","name","value","checked","_checkedValues","_handleCheckedValueChange","checkedItems","newCheckedItems","splice","push","s","selectRadio","components","root","slot","always","getNativeElementProps","useMergedRefs","role","triggerId","elementType","hasIcons","hasCheckmarks","useMenuContext_unstable","context","contextValue","isUsingPropsAndContext","val"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCAC4E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C,UAAUA,QAAQF,aAAa;IAC9E,OAAO;QACHlC;QACAU;QACAqB;QACAE;QACAC;IACJ;AACJ;AACA;;CAEC,GAAG,MAAMrE,2BAA2B,CAACd,OAAOsF,cAAchF;IACvD,IAAIiF,yBAAyB;IAC7B,IAAI,MAAMC,OAAOF,aAAa;QAC1B,IAAItF,KAAK,CAACwF,IAAI,EAAE;YACZD,yBAAyB;QAC7B;IACJ;IACA,OAAOjF,kBAAkBiF;AAC7B"}
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useMenuListContextValues_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useMenuListContextValues_unstable
7
+ get: function() {
8
+ return useMenuListContextValues_unstable;
9
+ }
8
10
  });
9
11
  function useMenuListContextValues_unstable(state) {
10
- const { checkedValues , hasCheckmarks , hasIcons , selectRadio , setFocusByFirstCharacter , toggleCheckbox } = state;
12
+ const { checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox } = state;
11
13
  // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
12
14
  const menuList = {
13
15
  checkedValues,
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuListContextValues.js"],"sourcesContent":["export function useMenuListContextValues_unstable(state) {\n const { checkedValues , hasCheckmarks , hasIcons , selectRadio , setFocusByFirstCharacter , toggleCheckbox } = state;\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menuList = {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n selectRadio,\n setFocusByFirstCharacter,\n toggleCheckbox\n };\n return {\n menuList\n };\n}\n"],"names":["useMenuListContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","selectRadio","setFocusByFirstCharacter","toggleCheckbox","menuList"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,kCAAkCC,KAAK,EAAE;IACrD,MAAM,EAAEC,cAAa,EAAGC,cAAa,EAAGC,SAAQ,EAAGC,YAAW,EAAGC,yBAAwB,EAAGC,eAAc,EAAG,GAAGN;IAChH,mGAAmG;IACnG,MAAMO,WAAW;QACbN;QACAC;QACAC;QACAC;QACAC;QACAC;IACJ;IACA,OAAO;QACHC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useMenuListContextValues.js"],"sourcesContent":["export function useMenuListContextValues_unstable(state) {\n const { checkedValues, hasCheckmarks, hasIcons, selectRadio, setFocusByFirstCharacter, toggleCheckbox } = state;\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menuList = {\n checkedValues,\n hasCheckmarks,\n hasIcons,\n selectRadio,\n setFocusByFirstCharacter,\n toggleCheckbox\n };\n return {\n menuList\n };\n}\n"],"names":["useMenuListContextValues_unstable","state","checkedValues","hasCheckmarks","hasIcons","selectRadio","setFocusByFirstCharacter","toggleCheckbox","menuList"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,kCAAkCC,KAAK;IACnD,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAE,GAAGN;IAC1G,mGAAmG;IACnG,MAAMO,WAAW;QACbN;QACAC;QACAC;QACAC;QACAC;QACAC;IACJ;IACA,OAAO;QACHC;IACJ;AACJ"}
@@ -9,14 +9,18 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- menuListClassNames: ()=>menuListClassNames,
13
- useMenuListStyles_unstable: ()=>useMenuListStyles_unstable
12
+ menuListClassNames: function() {
13
+ return menuListClassNames;
14
+ },
15
+ useMenuListStyles_unstable: function() {
16
+ return useMenuListStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const menuListClassNames = {
17
21
  root: 'fui-MenuList'
18
22
  };
19
- const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
23
+ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
20
24
  root: {
21
25
  mc9l5x: "f22iagw",
22
26
  Beiy3e4: "f1vx9l62",
@@ -1 +1 @@
1
- {"version":3,"sources":["useMenuListStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles, shorthands } from '@griffel/react';\nexport const menuListClassNames = {\n root: 'fui-MenuList'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Beiy3e4: \"f1vx9l62\",\n i8kkvl: \"f16mnhsx\",\n Belr9w4: \"fbi42co\"\n },\n hasMenuContext: {\n Bqenvij: \"f1l02sjl\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f1vx9l62{flex-direction:column;}\", \".f16mnhsx{column-gap:2px;}\", \".fbi42co{row-gap:2px;}\", \".f1l02sjl{height:100%;}\"]\n});\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuListClassNames.root, styles.root, state.hasMenuContext && styles.hasMenuContext, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuListStyles.styles.js.map"],"names":["menuListClassNames","useMenuListStyles_unstable","root","useStyles","__styles","mc9l5x","Beiy3e4","i8kkvl","Belr9w4","hasMenuContext","Bqenvij","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,kBAAkB,MAAlBA;IAmBAC,0BAA0B,MAA1BA;;uBApBsC;AAC5C,MAAMD,qBAAqB;IAChCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;IACAC,gBAAgB;QACdC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA2B;QAAqC;QAA8B;QAA0B;KAA0B;AACxJ;AAIO,MAAMV,6BAA6BW,CAAAA,QAAS;IACjD,MAAMC,SAASV;IACfS,MAAMV,IAAI,CAACY,SAAS,GAAGC,IAAAA,mBAAY,EAACf,mBAAmBE,IAAI,EAAEW,OAAOX,IAAI,EAAEU,MAAMH,cAAc,IAAII,OAAOJ,cAAc,EAAEG,MAAMV,IAAI,CAACY,SAAS;IAC7I,OAAOF;AACT,GACA,oDAAoD"}
1
+ {"version":3,"sources":["useMenuListStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles, shorthands } from '@griffel/react';\nexport const menuListClassNames = {\n root: 'fui-MenuList'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Beiy3e4: \"f1vx9l62\",\n i8kkvl: \"f16mnhsx\",\n Belr9w4: \"fbi42co\"\n },\n hasMenuContext: {\n Bqenvij: \"f1l02sjl\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f1vx9l62{flex-direction:column;}\", \".f16mnhsx{column-gap:2px;}\", \".fbi42co{row-gap:2px;}\", \".f1l02sjl{height:100%;}\"]\n});\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuListClassNames.root, styles.root, state.hasMenuContext && styles.hasMenuContext, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuListStyles.styles.js.map"],"names":["menuListClassNames","useMenuListStyles_unstable","root","useStyles","__styles","mc9l5x","Beiy3e4","i8kkvl","Belr9w4","hasMenuContext","Bqenvij","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,kBAAkB;eAAlBA;;IAmBAC,0BAA0B;eAA1BA;;;uBApBsC;AAC5C,MAAMD,qBAAqB;IAChCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;IACAC,gBAAgB;QACdC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA2B;QAAqC;QAA8B;QAA0B;KAA0B;AACxJ;AAIO,MAAMV,6BAA6BW,CAAAA;IACxC,MAAMC,SAASV;IACfS,MAAMV,IAAI,CAACY,SAAS,GAAGC,IAAAA,mBAAY,EAACf,mBAAmBE,IAAI,EAAEW,OAAOX,IAAI,EAAEU,MAAMH,cAAc,IAAII,OAAOJ,cAAc,EAAEG,MAAMV,IAAI,CAACY,SAAS;IAC7I,OAAOF;AACT,GACA,oDAAoD"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "MenuPopover", {
6
6
  enumerable: true,
7
- get: ()=>MenuPopover
7
+ get: function() {
8
+ return MenuPopover;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useMenuPopover = require("./useMenuPopover");
12
- const _useMenuPopoverStylesStyles = require("./useMenuPopoverStyles.styles");
14
+ const _useMenuPopoverStylesstyles = require("./useMenuPopoverStyles.styles");
13
15
  const _renderMenuPopover = require("./renderMenuPopover");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const MenuPopover = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useMenuPopover.useMenuPopover_unstable)(props, ref);
17
- (0, _useMenuPopoverStylesStyles.useMenuPopoverStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuPopoverStyles_unstable')(state);
19
+ (0, _useMenuPopoverStylesstyles.useMenuPopoverStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMenuPopoverStyles_unstable')(state);
19
21
  return (0, _renderMenuPopover.renderMenuPopover_unstable)(state);
20
22
  });
21
23
  MenuPopover.displayName = 'MenuPopover';
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuPopover.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */ export const MenuPopover = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuPopover_unstable(props, ref);\n useMenuPopoverStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);\n return renderMenuPopover_unstable(state);\n});\nMenuPopover.displayName = 'MenuPopover';\n"],"names":["MenuPopover","React","forwardRef","props","ref","state","useMenuPopover_unstable","useMenuPopoverStyles_unstable","useCustomStyleHook_unstable","renderMenuPopover_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACiB;4CACM;mCACH;qCACC;AAGjC,MAAMA,cAAc,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACxE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACtC;AACAL,YAAYU,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuPopover.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */ export const MenuPopover = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuPopover_unstable(props, ref);\n useMenuPopoverStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);\n return renderMenuPopover_unstable(state);\n});\nMenuPopover.displayName = 'MenuPopover';\n"],"names":["MenuPopover","React","forwardRef","props","ref","state","useMenuPopover_unstable","useMenuPopoverStyles_unstable","useCustomStyleHook_unstable","renderMenuPopover_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;gCACiB;4CACM;mCACH;qCACC;AAGjC,MAAMA,cAAc,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAClE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACtC;AACAL,YAAYU,WAAW,GAAG"}