@fluentui/react-menu 9.0.0-alpha.77 → 9.0.0-alpha.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/CHANGELOG.json +116 -1
  2. package/CHANGELOG.md +38 -2
  3. package/Spec.md +138 -137
  4. package/dist/react-menu.d.ts +161 -136
  5. package/lib/components/Menu/Menu.d.ts +0 -1
  6. package/lib/components/Menu/Menu.js +0 -1
  7. package/lib/components/Menu/Menu.js.map +1 -1
  8. package/lib/components/Menu/Menu.types.d.ts +10 -14
  9. package/lib/components/Menu/Menu.types.js.map +1 -1
  10. package/lib/components/Menu/renderMenu.d.ts +0 -1
  11. package/lib/components/Menu/renderMenu.js +0 -1
  12. package/lib/components/Menu/renderMenu.js.map +1 -1
  13. package/lib/components/Menu/useMenu.d.ts +0 -2
  14. package/lib/components/Menu/useMenu.js +0 -2
  15. package/lib/components/Menu/useMenu.js.map +1 -1
  16. package/lib/components/MenuDivider/MenuDivider.d.ts +19 -3
  17. package/lib/components/MenuDivider/MenuDivider.js +0 -1
  18. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  19. package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -10
  20. package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
  21. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  22. package/lib/components/MenuGroup/MenuGroup.d.ts +19 -3
  23. package/lib/components/MenuGroup/MenuGroup.js +0 -1
  24. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  25. package/lib/components/MenuGroup/MenuGroup.types.d.ts +5 -12
  26. package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
  27. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +19 -3
  28. package/lib/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  29. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  30. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -10
  31. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  32. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  33. package/lib/components/MenuItem/MenuItem.d.ts +0 -1
  34. package/lib/components/MenuItem/MenuItem.js +0 -1
  35. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  36. package/lib/components/MenuItem/MenuItem.types.d.ts +4 -6
  37. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  38. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -1
  39. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  40. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  41. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +2 -10
  42. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  43. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -3
  44. package/lib/components/MenuItemRadio/MenuItemRadio.js +0 -1
  45. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  46. package/lib/components/MenuItemRadio/MenuItemRadio.types.d.ts +2 -10
  47. package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  48. package/lib/components/MenuList/MenuList.d.ts +19 -3
  49. package/lib/components/MenuList/MenuList.js +0 -1
  50. package/lib/components/MenuList/MenuList.js.map +1 -1
  51. package/lib/components/MenuList/MenuList.types.d.ts +8 -10
  52. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  53. package/lib/components/MenuPopover/MenuPopover.d.ts +19 -2
  54. package/lib/components/MenuPopover/MenuPopover.types.d.ts +3 -4
  55. package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
  56. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -1
  57. package/lib/components/MenuPopover/useMenuPopoverStyles.js +0 -1
  58. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  59. package/lib/components/MenuTrigger/MenuTrigger.d.ts +0 -1
  60. package/lib/components/MenuTrigger/MenuTrigger.js +0 -1
  61. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  62. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +10 -14
  63. package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  64. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +0 -1
  65. package/lib/components/MenuTrigger/renderMenuTrigger.js +0 -1
  66. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  67. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +0 -2
  68. package/lib/components/MenuTrigger/useMenuTrigger.js +0 -2
  69. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  70. package/lib/components/MenuTrigger/useTriggerElement.js +13 -14
  71. package/lib/components/MenuTrigger/useTriggerElement.js.map +1 -1
  72. package/lib/contexts/menuContext.d.ts +2 -2
  73. package/lib/contexts/menuContext.js.map +1 -1
  74. package/lib/contexts/menuGroupContext.d.ts +2 -2
  75. package/lib/contexts/menuGroupContext.js.map +1 -1
  76. package/lib/contexts/menuListContext.d.ts +2 -2
  77. package/lib/contexts/menuListContext.js.map +1 -1
  78. package/lib/selectable/types.d.ts +4 -4
  79. package/lib/selectable/types.js.map +1 -1
  80. package/lib-amd/components/Menu/Menu.d.ts +0 -1
  81. package/lib-amd/components/Menu/Menu.js +0 -1
  82. package/lib-amd/components/Menu/Menu.js.map +1 -1
  83. package/lib-amd/components/Menu/Menu.types.d.ts +10 -14
  84. package/lib-amd/components/Menu/Menu.types.js.map +1 -1
  85. package/lib-amd/components/Menu/renderMenu.d.ts +0 -1
  86. package/lib-amd/components/Menu/renderMenu.js +0 -1
  87. package/lib-amd/components/Menu/renderMenu.js.map +1 -1
  88. package/lib-amd/components/Menu/useMenu.d.ts +0 -2
  89. package/lib-amd/components/Menu/useMenu.js +0 -2
  90. package/lib-amd/components/Menu/useMenu.js.map +1 -1
  91. package/lib-amd/components/MenuDivider/MenuDivider.d.ts +19 -3
  92. package/lib-amd/components/MenuDivider/MenuDivider.js +0 -1
  93. package/lib-amd/components/MenuDivider/MenuDivider.js.map +1 -1
  94. package/lib-amd/components/MenuDivider/MenuDivider.types.d.ts +2 -10
  95. package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +1 -1
  96. package/lib-amd/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  97. package/lib-amd/components/MenuGroup/MenuGroup.d.ts +19 -3
  98. package/lib-amd/components/MenuGroup/MenuGroup.js +0 -1
  99. package/lib-amd/components/MenuGroup/MenuGroup.js.map +1 -1
  100. package/lib-amd/components/MenuGroup/MenuGroup.types.d.ts +5 -12
  101. package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +1 -1
  102. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.d.ts +19 -3
  103. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  104. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  105. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -10
  106. package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
  107. package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  108. package/lib-amd/components/MenuItem/MenuItem.d.ts +0 -1
  109. package/lib-amd/components/MenuItem/MenuItem.js +0 -1
  110. package/lib-amd/components/MenuItem/MenuItem.js.map +1 -1
  111. package/lib-amd/components/MenuItem/MenuItem.types.d.ts +4 -6
  112. package/lib-amd/components/MenuItem/MenuItem.types.js.map +1 -1
  113. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -1
  114. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  115. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  116. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +2 -10
  117. package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
  118. package/lib-amd/components/MenuItemRadio/MenuItemRadio.d.ts +1 -3
  119. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -1
  120. package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  121. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.d.ts +2 -10
  122. package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
  123. package/lib-amd/components/MenuList/MenuList.d.ts +19 -3
  124. package/lib-amd/components/MenuList/MenuList.js +0 -1
  125. package/lib-amd/components/MenuList/MenuList.js.map +1 -1
  126. package/lib-amd/components/MenuList/MenuList.types.d.ts +8 -10
  127. package/lib-amd/components/MenuList/MenuList.types.js.map +1 -1
  128. package/lib-amd/components/MenuPopover/MenuPopover.d.ts +19 -2
  129. package/lib-amd/components/MenuPopover/MenuPopover.types.d.ts +3 -4
  130. package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +1 -1
  131. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -1
  132. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -1
  133. package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  134. package/lib-amd/components/MenuTrigger/MenuTrigger.d.ts +0 -1
  135. package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -1
  136. package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +1 -1
  137. package/lib-amd/components/MenuTrigger/MenuTrigger.types.d.ts +10 -14
  138. package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
  139. package/lib-amd/components/MenuTrigger/renderMenuTrigger.d.ts +0 -1
  140. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -1
  141. package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  142. package/lib-amd/components/MenuTrigger/useMenuTrigger.d.ts +0 -2
  143. package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -2
  144. package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  145. package/lib-amd/components/MenuTrigger/useTriggerElement.js +10 -11
  146. package/lib-amd/components/MenuTrigger/useTriggerElement.js.map +1 -1
  147. package/lib-amd/contexts/menuContext.d.ts +2 -2
  148. package/lib-amd/contexts/menuContext.js.map +1 -1
  149. package/lib-amd/contexts/menuGroupContext.d.ts +2 -2
  150. package/lib-amd/contexts/menuGroupContext.js.map +1 -1
  151. package/lib-amd/contexts/menuListContext.d.ts +2 -2
  152. package/lib-amd/contexts/menuListContext.js.map +1 -1
  153. package/lib-amd/selectable/types.d.ts +4 -4
  154. package/lib-amd/selectable/types.js.map +1 -1
  155. package/lib-commonjs/components/Menu/Menu.d.ts +0 -1
  156. package/lib-commonjs/components/Menu/Menu.js +0 -1
  157. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  158. package/lib-commonjs/components/Menu/Menu.types.d.ts +10 -14
  159. package/lib-commonjs/components/Menu/renderMenu.d.ts +0 -1
  160. package/lib-commonjs/components/Menu/renderMenu.js +0 -1
  161. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  162. package/lib-commonjs/components/Menu/useMenu.d.ts +0 -2
  163. package/lib-commonjs/components/Menu/useMenu.js +0 -2
  164. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  165. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +19 -3
  166. package/lib-commonjs/components/MenuDivider/MenuDivider.js +0 -1
  167. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  168. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -10
  169. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  170. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +19 -3
  171. package/lib-commonjs/components/MenuGroup/MenuGroup.js +0 -1
  172. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  173. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +5 -12
  174. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +19 -3
  175. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +0 -1
  176. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  177. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -10
  178. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  179. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +0 -1
  180. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -1
  181. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  182. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +4 -6
  183. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -1
  184. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -1
  185. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  186. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +2 -10
  187. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -3
  188. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +0 -1
  189. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  190. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.d.ts +2 -10
  191. package/lib-commonjs/components/MenuList/MenuList.d.ts +19 -3
  192. package/lib-commonjs/components/MenuList/MenuList.js +0 -1
  193. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  194. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +8 -10
  195. package/lib-commonjs/components/MenuPopover/MenuPopover.d.ts +19 -2
  196. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +3 -4
  197. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -1
  198. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +0 -1
  199. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  200. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +0 -1
  201. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +0 -1
  202. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  203. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +10 -14
  204. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +0 -1
  205. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +0 -1
  206. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  207. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +0 -2
  208. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +0 -2
  209. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  210. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +12 -13
  211. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +1 -1
  212. package/lib-commonjs/contexts/menuContext.d.ts +2 -2
  213. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  214. package/lib-commonjs/contexts/menuGroupContext.d.ts +2 -2
  215. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  216. package/lib-commonjs/contexts/menuListContext.d.ts +2 -2
  217. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  218. package/lib-commonjs/selectable/types.d.ts +4 -4
  219. package/package.json +13 -13
@@ -3,7 +3,7 @@ import { ComponentProps, ComponentState } from '@fluentui/react-utilities';
3
3
  import { usePopperMouseTarget, PositioningShorthand } from '@fluentui/react-positioning';
4
4
  import { MenuListCommons } from '../MenuList/index';
5
5
  import { MenuContextValue } from '../../contexts/menuContext';
6
- interface MenuCommons extends MenuListCommons {
6
+ declare type MenuCommons = MenuListCommons & {
7
7
  /**
8
8
  * Whether the popup is open
9
9
  */
@@ -35,13 +35,12 @@ interface MenuCommons extends MenuListCommons {
35
35
  * Sets the delay for mouse open/close for the popover one mouse enter/leave
36
36
  */
37
37
  hoverDelay?: number;
38
- }
38
+ };
39
39
  export declare type MenuSlots = {};
40
40
  /**
41
41
  * Extends and drills down Menulist props to simplify API
42
- * {@docCategory Menu }
43
42
  */
44
- export interface MenuProps extends Partial<MenuCommons>, ComponentProps<MenuSlots> {
43
+ export declare type MenuProps = Partial<MenuCommons> & ComponentProps<MenuSlots> & {
45
44
  /**
46
45
  * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.
47
46
  * Alternatively can only contain {@link MenuPopover} if using a custom `target`.
@@ -51,11 +50,8 @@ export interface MenuProps extends Partial<MenuCommons>, ComponentProps<MenuSlot
51
50
  * Configures the positioned menu
52
51
  */
53
52
  positioning?: PositioningShorthand;
54
- }
55
- /**
56
- * {@docCategory Menu }
57
- */
58
- export interface MenuState extends MenuCommons, ComponentState<MenuSlots> {
53
+ };
54
+ export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
59
55
  /**
60
56
  * Callback to open/close the popup
61
57
  */
@@ -92,11 +88,11 @@ export interface MenuState extends MenuCommons, ComponentState<MenuSlots> {
92
88
  * A callback to set the target of the popper to the mouse click for context events
93
89
  */
94
90
  setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];
95
- }
91
+ };
96
92
  /**
97
93
  * Data attached to open/close events
98
94
  */
99
- export interface MenuOpenChangeData extends Pick<MenuState, 'open'> {
95
+ export declare type MenuOpenChangeData = Pick<MenuState, 'open'> & {
100
96
  /**
101
97
  * Indicates whether the change of state was a keyboard interaction
102
98
  */
@@ -105,10 +101,10 @@ export interface MenuOpenChangeData extends Pick<MenuState, 'open'> {
105
101
  * indicates whether the request for the open state was bubbled from a nested menu
106
102
  */
107
103
  bubble?: boolean;
108
- }
109
- export interface MenuContextValues {
104
+ };
105
+ export declare type MenuContextValues = {
110
106
  menu: MenuContextValue;
111
- }
107
+ };
112
108
  /**
113
109
  * The supported events that will trigger open/close of the menu
114
110
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.types.js","sourceRoot":"../src/","sources":["components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { usePopperMouseTarget, PositioningShorthand } from '@fluentui/react-positioning';\nimport { MenuListCommons } from '../MenuList/index';\nimport { MenuContextValue } from '../../contexts/menuContext';\n\ninterface MenuCommons extends MenuListCommons {\n /**\n * Whether the popup is open\n */\n open: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open by default\n */\n defaultOpen?: boolean;\n\n /*\n * Opens the menu on hover\n */\n openOnHover: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n */\n openOnContext?: boolean;\n\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n */\n persistOnItemClick?: boolean;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n}\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n * {@docCategory Menu }\n */\nexport interface MenuProps extends Partial<MenuCommons>, ComponentProps<MenuSlots> {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n}\n\n/**\n * {@docCategory Menu }\n */\nexport interface MenuState extends MenuCommons, ComponentState<MenuSlots> {\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: ReturnType<typeof usePopperMouseTarget>[0];\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];\n}\n\n/**\n * Data attached to open/close events\n */\nexport interface MenuOpenChangeData extends Pick<MenuState, 'open'> {\n /**\n * Indicates whether the change of state was a keyboard interaction\n */\n keyboard?: boolean;\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n}\n\nexport interface MenuContextValues {\n menu: MenuContextValue;\n}\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvents =\n | MouseEvent\n | TouchEvent\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.FocusEvent<HTMLElement>;\n"]}
1
+ {"version":3,"file":"Menu.types.js","sourceRoot":"../src/","sources":["components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { usePopperMouseTarget, PositioningShorthand } from '@fluentui/react-positioning';\nimport { MenuListCommons } from '../MenuList/index';\nimport { MenuContextValue } from '../../contexts/menuContext';\n\ntype MenuCommons = MenuListCommons & {\n /**\n * Whether the popup is open\n */\n open: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open by default\n */\n defaultOpen?: boolean;\n\n /*\n * Opens the menu on hover\n */\n openOnHover: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n */\n openOnContext?: boolean;\n\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n */\n inline?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n */\n persistOnItemClick?: boolean;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n};\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = Partial<MenuCommons> &\n ComponentProps<MenuSlots> & {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n };\n\nexport type MenuState = MenuCommons &\n ComponentState<MenuSlots> & {\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: ReturnType<typeof usePopperMouseTarget>[0];\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];\n };\n\n/**\n * Data attached to open/close events\n */\nexport type MenuOpenChangeData = Pick<MenuState, 'open'> & {\n /**\n * Indicates whether the change of state was a keyboard interaction\n */\n keyboard?: boolean;\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n};\n\nexport type MenuContextValues = {\n menu: MenuContextValue;\n};\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvents =\n | MouseEvent\n | TouchEvent\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.FocusEvent<HTMLElement>;\n"]}
@@ -1,6 +1,5 @@
1
1
  import type { MenuContextValues, MenuState } from './Menu.types';
2
2
  /**
3
3
  * Render the final JSX of Menu
4
- * {@docCategory Menu }
5
4
  */
6
5
  export declare const renderMenu: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
@@ -4,7 +4,6 @@ define(["require", "exports", "react", "../../contexts/menuContext"], function (
4
4
  exports.renderMenu = void 0;
5
5
  /**
6
6
  * Render the final JSX of Menu
7
- * {@docCategory Menu }
8
7
  */
9
8
  var renderMenu = function (state, contextValues) {
10
9
  return (React.createElement(menuContext_1.MenuProvider, { value: contextValues.menu },
@@ -1 +1 @@
1
- {"version":3,"file":"renderMenu.js","sourceRoot":"../src/","sources":["components/Menu/renderMenu.tsx"],"names":[],"mappings":";;;;IAIA;;;OAGG;IACI,IAAM,UAAU,GAAG,UAAC,KAAgB,EAAE,aAAgC;QAC3E,OAAO,CACL,oBAAC,0BAAY,IAAC,KAAK,EAAE,aAAa,CAAC,IAAI;YACpC,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,WAAW,CACnB,CAChB,CAAC;IACJ,CAAC,CAAC;IAPW,QAAA,UAAU,cAOrB","sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n * {@docCategory Menu }\n */\nexport const renderMenu = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"]}
1
+ {"version":3,"file":"renderMenu.js","sourceRoot":"../src/","sources":["components/Menu/renderMenu.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,UAAU,GAAG,UAAC,KAAgB,EAAE,aAAgC;QAC3E,OAAO,CACL,oBAAC,0BAAY,IAAC,KAAK,EAAE,aAAa,CAAC,IAAI;YACpC,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,WAAW,CACnB,CAChB,CAAC;IACJ,CAAC,CAAC;IAPW,QAAA,UAAU,cAOrB","sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n */\nexport const renderMenu = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"]}
@@ -6,7 +6,5 @@ import type { MenuProps, MenuState } from './Menu.types';
6
6
  * before being passed to renderMenu.
7
7
  *
8
8
  * @param props - props from this instance of Menu
9
- *
10
- * {@docCategory Menu }
11
9
  */
12
10
  export declare const useMenu: (props: MenuProps) => MenuState;
@@ -9,8 +9,6 @@ define(["require", "exports", "tslib", "react", "@fluentui/react-positioning", "
9
9
  * before being passed to renderMenu.
10
10
  *
11
11
  * @param props - props from this instance of Menu
12
- *
13
- * {@docCategory Menu }
14
12
  */
15
13
  var useMenu = function (props) {
16
14
  var triggerId = react_utilities_1.useId('menu');
@@ -1 +1 @@
1
- {"version":3,"file":"useMenu.js","sourceRoot":"../src/","sources":["components/Menu/useMenu.tsx"],"names":[],"mappings":";;;;IAYA;;;;;;;;;OASG;IACI,IAAM,OAAO,GAAG,UAAC,KAAgB;QACtC,IAAM,SAAS,GAAG,uBAAK,CAAC,MAAM,CAAC,CAAC;QAChC,IAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;QAC3B,IAAA,KAAoC,wCAAo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AAC,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,CAAC,CAAC;QAEzG,OAAO,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,KAAK,EAAE,OAAO,CAAU,CAAC;IAC3C,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { usePopperMouseTarget, usePopper, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport { useControllableState, useId, useOnClickOutside, useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-provider';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { MenuTrigger } from '../MenuTrigger/index';\nimport { useMenuContext } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuState } from './Menu.types';\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu.\n *\n * @param props - props from this instance of Menu\n *\n * {@docCategory Menu }\n */\nexport const useMenu = (props: MenuProps): MenuState => {\n const triggerId = useId('menu');\n const isSubmenu = useIsSubmenu();\n const [contextTarget, setContextTarget] = usePopperMouseTarget();\n\n const popperState = {\n position: isSubmenu ? ('after' as const) : ('below' as const),\n align: isSubmenu ? ('top' as const) : ('start' as const),\n target: props.openOnContext ? contextTarget : undefined,\n ...resolvePositioningShorthand(props.positioning),\n };\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (children.length !== 2 && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('Menu can only take one MenuTrigger and one MenuList as children');\n }\n\n const { menuTrigger, menuPopover } = children.reduce((acc, child) => {\n if (child.type === MenuTrigger) {\n acc.menuTrigger = child;\n } else {\n acc.menuPopover = child;\n }\n\n return acc;\n }, {} as Pick<MenuState, 'menuTrigger' | 'menuPopover'>);\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePopper(popperState);\n\n const initialState = {\n hoverDelay: 500,\n triggerId,\n isSubmenu: !!isSubmenu,\n openOnHover: !!isSubmenu,\n contextTarget,\n setContextTarget,\n ...props,\n menuTrigger,\n menuPopover,\n triggerRef,\n menuPopoverRef,\n } as const;\n\n // TODO Better way to narrow types ?\n\n const [open, setOpen] = useMenuOpenState(initialState);\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState(initialState);\n\n return {\n ...initialState,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n state: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: state.checkedValues,\n defaultState: state.defaultCheckedValues,\n initialState: {},\n });\n const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n if (onCheckedValueChangeOriginal) {\n onCheckedValueChangeOriginal(e, { name, checkedItems });\n }\n\n setCheckedValues(s => {\n return s ? { ...s, [name]: checkedItems } : { [name]: checkedItems };\n });\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<MenuState, 'onOpenChange' | 'setContextTarget' | 'triggerRef' | 'menuPopoverRef' | 'isSubmenu'> &\n Pick<MenuProps, 'open' | 'defaultOpen'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext(context => context.setOpen);\n const onOpenChange: MenuState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const shouldHandleKeyboardRef = React.useRef(false);\n const shouldHandleTabRef = React.useRef(false);\n const pressedShiftRef = React.useRef(false);\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.keyboard) {\n shouldHandleKeyboardRef.current = true;\n shouldHandleTabRef.current = (e as React.KeyboardEvent).key === 'Tab';\n pressedShiftRef.current = (e as React.KeyboardEvent).shiftKey;\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, state.triggerRef],\n callback: e => setOpen(e, { open: false }),\n });\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: e => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(e, { open: false });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable, findNextFocusable, findPrevFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n const focusAfterMenuTrigger = React.useCallback(() => {\n const nextFocusable = findNextFocusable(state.triggerRef.current);\n nextFocusable?.focus();\n }, [findNextFocusable, state.triggerRef]);\n\n const focusBeforeMenuTrigger = React.useCallback(() => {\n const prevFocusable = findPrevFocusable(state.triggerRef.current);\n prevFocusable?.focus();\n }, [findPrevFocusable, state.triggerRef]);\n\n React.useEffect(() => {\n if (!shouldHandleKeyboardRef.current) {\n return;\n }\n\n if (open) {\n focusFirst();\n } else {\n if (shouldHandleTabRef.current && !state.isSubmenu) {\n pressedShiftRef.current ? focusBeforeMenuTrigger() : focusAfterMenuTrigger();\n } else {\n state.triggerRef.current?.focus();\n }\n }\n\n shouldHandleKeyboardRef.current = false;\n shouldHandleTabRef.current = false;\n pressedShiftRef.current = false;\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, focusAfterMenuTrigger, focusBeforeMenuTrigger]);\n\n return [open ?? false, setOpen] as const;\n};\n"]}
1
+ {"version":3,"file":"useMenu.js","sourceRoot":"../src/","sources":["components/Menu/useMenu.tsx"],"names":[],"mappings":";;;;IAYA;;;;;;;OAOG;IACI,IAAM,OAAO,GAAG,UAAC,KAAgB;QACtC,IAAM,SAAS,GAAG,uBAAK,CAAC,MAAM,CAAC,CAAC;QAChC,IAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;QAC3B,IAAA,KAAoC,wCAAoB,EAAE,EAAzD,aAAa,QAAA,EAAE,gBAAgB,QAA0B,CAAC;QAEjE,I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,IAAI,EAAE,UAAU,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,CAAC,CAAC;QAEzG,OAAO,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,KAAK,EAAE,OAAO,CAAU,CAAC;IAC3C,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { usePopperMouseTarget, usePopper, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport { useControllableState, useId, useOnClickOutside, useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-provider';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { MenuTrigger } from '../MenuTrigger/index';\nimport { useMenuContext } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuState } from './Menu.types';\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu = (props: MenuProps): MenuState => {\n const triggerId = useId('menu');\n const isSubmenu = useIsSubmenu();\n const [contextTarget, setContextTarget] = usePopperMouseTarget();\n\n const popperState = {\n position: isSubmenu ? ('after' as const) : ('below' as const),\n align: isSubmenu ? ('top' as const) : ('start' as const),\n target: props.openOnContext ? contextTarget : undefined,\n ...resolvePositioningShorthand(props.positioning),\n };\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (children.length !== 2 && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('Menu can only take one MenuTrigger and one MenuList as children');\n }\n\n const { menuTrigger, menuPopover } = children.reduce((acc, child) => {\n if (child.type === MenuTrigger) {\n acc.menuTrigger = child;\n } else {\n acc.menuPopover = child;\n }\n\n return acc;\n }, {} as Pick<MenuState, 'menuTrigger' | 'menuPopover'>);\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePopper(popperState);\n\n const initialState = {\n hoverDelay: 500,\n triggerId,\n isSubmenu: !!isSubmenu,\n openOnHover: !!isSubmenu,\n contextTarget,\n setContextTarget,\n ...props,\n menuTrigger,\n menuPopover,\n triggerRef,\n menuPopoverRef,\n } as const;\n\n // TODO Better way to narrow types ?\n\n const [open, setOpen] = useMenuOpenState(initialState);\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState(initialState);\n\n return {\n ...initialState,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n state: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: state.checkedValues,\n defaultState: state.defaultCheckedValues,\n initialState: {},\n });\n const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n if (onCheckedValueChangeOriginal) {\n onCheckedValueChangeOriginal(e, { name, checkedItems });\n }\n\n setCheckedValues(s => {\n return s ? { ...s, [name]: checkedItems } : { [name]: checkedItems };\n });\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<MenuState, 'onOpenChange' | 'setContextTarget' | 'triggerRef' | 'menuPopoverRef' | 'isSubmenu'> &\n Pick<MenuProps, 'open' | 'defaultOpen'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext(context => context.setOpen);\n const onOpenChange: MenuState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const shouldHandleKeyboardRef = React.useRef(false);\n const shouldHandleTabRef = React.useRef(false);\n const pressedShiftRef = React.useRef(false);\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.keyboard) {\n shouldHandleKeyboardRef.current = true;\n shouldHandleTabRef.current = (e as React.KeyboardEvent).key === 'Tab';\n pressedShiftRef.current = (e as React.KeyboardEvent).shiftKey;\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, state.triggerRef],\n callback: e => setOpen(e, { open: false }),\n });\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: e => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(e, { open: false });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable, findNextFocusable, findPrevFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n const focusAfterMenuTrigger = React.useCallback(() => {\n const nextFocusable = findNextFocusable(state.triggerRef.current);\n nextFocusable?.focus();\n }, [findNextFocusable, state.triggerRef]);\n\n const focusBeforeMenuTrigger = React.useCallback(() => {\n const prevFocusable = findPrevFocusable(state.triggerRef.current);\n prevFocusable?.focus();\n }, [findPrevFocusable, state.triggerRef]);\n\n React.useEffect(() => {\n if (!shouldHandleKeyboardRef.current) {\n return;\n }\n\n if (open) {\n focusFirst();\n } else {\n if (shouldHandleTabRef.current && !state.isSubmenu) {\n pressedShiftRef.current ? focusBeforeMenuTrigger() : focusAfterMenuTrigger();\n } else {\n state.triggerRef.current?.focus();\n }\n }\n\n shouldHandleKeyboardRef.current = false;\n shouldHandleTabRef.current = false;\n pressedShiftRef.current = false;\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, focusAfterMenuTrigger, focusBeforeMenuTrigger]);\n\n return [open ?? false, setOpen] as const;\n};\n"]}
@@ -1,7 +1,23 @@
1
1
  import * as React from 'react';
2
- import type { MenuDividerProps } from './MenuDivider.types';
3
2
  /**
4
3
  * Define a styled MenuDivider, using the `useMenuDivider` hook.
5
- * {@docCategory MenuDivider }
6
4
  */
7
- export declare const MenuDivider: React.ForwardRefExoticComponent<MenuDividerProps & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const MenuDivider: React.ForwardRefExoticComponent<Pick<{
6
+ root?: import("@fluentui/react-utilities").ShorthandProps<{
7
+ as?: "div" | undefined;
8
+ } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
10
+ } & {
11
+ children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
13
+ }> | null | undefined;
14
+ }>;
15
+ }, never> & Pick<{
16
+ as?: "div" | undefined;
17
+ } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
18
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
19
+ } & {
20
+ children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
21
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
22
+ }> | null | undefined;
23
+ }, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as"> & React.RefAttributes<HTMLDivElement>>;
@@ -4,7 +4,6 @@ define(["require", "exports", "react", "./useMenuDivider", "./useMenuDividerStyl
4
4
  exports.MenuDivider = void 0;
5
5
  /**
6
6
  * Define a styled MenuDivider, using the `useMenuDivider` hook.
7
- * {@docCategory MenuDivider }
8
7
  */
9
8
  exports.MenuDivider = React.forwardRef(function (props, ref) {
10
9
  var state = useMenuDivider_1.useMenuDivider(props, ref);
@@ -1 +1 @@
1
- {"version":3,"file":"MenuDivider.js","sourceRoot":"../src/","sources":["components/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":";;;;IAMA;;;OAGG;IACU,QAAA,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,UAAC,KAAK,EAAE,GAAG;QACvF,IAAM,KAAK,GAAG,+BAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACzC,2CAAoB,CAAC,KAAK,CAAC,CAAC;QAE5B,OAAO,qCAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenuDivider } from './useMenuDivider';\nimport { useMenuDividerStyles } from './useMenuDividerStyles';\nimport { renderMenuDivider } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider` hook.\n * {@docCategory MenuDivider }\n */\nexport const MenuDivider = React.forwardRef<HTMLDivElement, MenuDividerProps>((props, ref) => {\n const state = useMenuDivider(props, ref);\n useMenuDividerStyles(state);\n\n return renderMenuDivider(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
1
+ {"version":3,"file":"MenuDivider.js","sourceRoot":"../src/","sources":["components/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,UAAC,KAAK,EAAE,GAAG;QACvF,IAAM,KAAK,GAAG,+BAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACzC,2CAAoB,CAAC,KAAK,CAAC,CAAC;QAE5B,OAAO,qCAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenuDivider } from './useMenuDivider';\nimport { useMenuDividerStyles } from './useMenuDividerStyles';\nimport { renderMenuDivider } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider` hook.\n */\nexport const MenuDivider = React.forwardRef<HTMLDivElement, MenuDividerProps>((props, ref) => {\n const state = useMenuDivider(props, ref);\n useMenuDividerStyles(state);\n\n return renderMenuDivider(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
@@ -2,13 +2,5 @@ import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluent
2
2
  export declare type MenuDividerSlots = {
3
3
  root: IntrinsicShorthandProps<'div'>;
4
4
  };
5
- /**
6
- * {@docCategory MenuDivider}
7
- */
8
- export interface MenuDividerProps extends ComponentProps<MenuDividerSlots> {
9
- }
10
- /**
11
- * {@docCategory MenuDivider}
12
- */
13
- export interface MenuDividerState extends ComponentState<MenuDividerSlots> {
14
- }
5
+ export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
6
+ export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
@@ -1 +1 @@
1
- {"version":3,"file":"MenuDivider.types.js","sourceRoot":"../src/","sources":["components/MenuDivider/MenuDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';\n\nexport type MenuDividerSlots = {\n root: IntrinsicShorthandProps<'div'>;\n};\n\n/**\n * {@docCategory MenuDivider}\n */\nexport interface MenuDividerProps extends ComponentProps<MenuDividerSlots> {}\n\n/**\n * {@docCategory MenuDivider}\n */\nexport interface MenuDividerState extends ComponentState<MenuDividerSlots> {}\n"]}
1
+ {"version":3,"file":"MenuDivider.types.js","sourceRoot":"../src/","sources":["components/MenuDivider/MenuDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';\n\nexport type MenuDividerSlots = {\n root: IntrinsicShorthandProps<'div'>;\n};\n\nexport type MenuDividerProps = ComponentProps<MenuDividerSlots>;\n\nexport type MenuDividerState = ComponentState<MenuDividerSlots>;\n"]}
@@ -1,2 +1,2 @@
1
1
  import type { MenuDividerState } from './MenuDivider.types';
2
- export declare const useMenuDividerStyles: (state: MenuDividerState) => MenuDividerState;
2
+ export declare const useMenuDividerStyles: (state: MenuDividerState) => import("@fluentui/react-utilities").ComponentState<import("./MenuDivider.types").MenuDividerSlots>;
@@ -1,7 +1,23 @@
1
1
  import * as React from 'react';
2
- import type { MenuGroupProps } from './MenuGroup.types';
3
2
  /**
4
3
  * Define a styled MenuGroup, using the `useMenuGroup` hook.
5
- * {@docCategory MenuGroup }
6
4
  */
7
- export declare const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const MenuGroup: React.ForwardRefExoticComponent<Pick<{
6
+ root?: import("@fluentui/react-utilities").ShorthandProps<{
7
+ as?: "div" | undefined;
8
+ } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
10
+ } & {
11
+ children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
13
+ }> | null | undefined;
14
+ }>;
15
+ }, never> & Pick<{
16
+ as?: "div" | undefined;
17
+ } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
18
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
19
+ } & {
20
+ children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
21
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
22
+ }> | null | undefined;
23
+ }, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as"> & React.RefAttributes<HTMLDivElement>>;
@@ -4,7 +4,6 @@ define(["require", "exports", "react", "./useMenuGroup", "./renderMenuGroup", ".
4
4
  exports.MenuGroup = void 0;
5
5
  /**
6
6
  * Define a styled MenuGroup, using the `useMenuGroup` hook.
7
- * {@docCategory MenuGroup }
8
7
  */
9
8
  exports.MenuGroup = React.forwardRef(function (props, ref) {
10
9
  var state = useMenuGroup_1.useMenuGroup(props, ref);
@@ -1 +1 @@
1
- {"version":3,"file":"MenuGroup.js","sourceRoot":"../src/","sources":["components/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":";;;;IAMA;;;OAGG;IACU,QAAA,SAAS,GAAG,KAAK,CAAC,UAAU,CAAiC,UAAC,KAAK,EAAE,GAAG;QACnF,IAAM,KAAK,GAAG,2BAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvC,IAAM,aAAa,GAAG,qDAAyB,CAAC,KAAK,CAAC,CAAC;QAEvD,OAAO,iCAAe,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenuGroup } from './useMenuGroup';\nimport { renderMenuGroup } from './renderMenuGroup';\nimport { useMenuGroupContextValues } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup` hook.\n * {@docCategory MenuGroup }\n */\nexport const MenuGroup = React.forwardRef<HTMLDivElement, MenuGroupProps>((props, ref) => {\n const state = useMenuGroup(props, ref);\n const contextValues = useMenuGroupContextValues(state);\n\n return renderMenuGroup(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"]}
1
+ {"version":3,"file":"MenuGroup.js","sourceRoot":"../src/","sources":["components/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,SAAS,GAAG,KAAK,CAAC,UAAU,CAAiC,UAAC,KAAK,EAAE,GAAG;QACnF,IAAM,KAAK,GAAG,2BAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvC,IAAM,aAAa,GAAG,qDAAyB,CAAC,KAAK,CAAC,CAAC;QAEvD,OAAO,iCAAe,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenuGroup } from './useMenuGroup';\nimport { renderMenuGroup } from './renderMenuGroup';\nimport { useMenuGroupContextValues } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup` hook.\n */\nexport const MenuGroup = React.forwardRef<HTMLDivElement, MenuGroupProps>((props, ref) => {\n const state = useMenuGroup(props, ref);\n const contextValues = useMenuGroupContextValues(state);\n\n return renderMenuGroup(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"]}
@@ -3,20 +3,13 @@ import { MenuGroupContextValue } from '../../contexts/menuGroupContext';
3
3
  export declare type MenuGroupSlots = {
4
4
  root: IntrinsicShorthandProps<'div'>;
5
5
  };
6
- /**
7
- * {@docCategory MenuGroup}
8
- */
9
- export interface MenuGroupProps extends ComponentProps<MenuGroupSlots> {
10
- }
11
- /**
12
- * {@docCategory MenuGroup}
13
- */
14
- export interface MenuGroupState extends ComponentState<MenuGroupSlots> {
6
+ export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
7
+ export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
15
8
  /**
16
9
  * id applied to the DOM element of `MenuGroupHeader`
17
10
  */
18
11
  headerId: string;
19
- }
20
- export interface MenuGroupContextValues {
12
+ };
13
+ export declare type MenuGroupContextValues = {
21
14
  menuGroup: MenuGroupContextValue;
22
- }
15
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"MenuGroup.types.js","sourceRoot":"../src/","sources":["components/MenuGroup/MenuGroup.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';\nimport { MenuGroupContextValue } from '../../contexts/menuGroupContext';\n\nexport type MenuGroupSlots = {\n root: IntrinsicShorthandProps<'div'>;\n};\n\n/**\n * {@docCategory MenuGroup}\n */\nexport interface MenuGroupProps extends ComponentProps<MenuGroupSlots> {}\n\n/**\n * {@docCategory MenuGroup}\n */\nexport interface MenuGroupState extends ComponentState<MenuGroupSlots> {\n /**\n * id applied to the DOM element of `MenuGroupHeader`\n */\n headerId: string;\n}\n\nexport interface MenuGroupContextValues {\n menuGroup: MenuGroupContextValue;\n}\n"]}
1
+ {"version":3,"file":"MenuGroup.types.js","sourceRoot":"../src/","sources":["components/MenuGroup/MenuGroup.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';\nimport { MenuGroupContextValue } from '../../contexts/menuGroupContext';\n\nexport type MenuGroupSlots = {\n root: IntrinsicShorthandProps<'div'>;\n};\n\nexport type MenuGroupProps = ComponentProps<MenuGroupSlots>;\n\nexport type MenuGroupState = ComponentState<MenuGroupSlots> & {\n /**\n * id applied to the DOM element of `MenuGroupHeader`\n */\n headerId: string;\n};\n\nexport type MenuGroupContextValues = {\n menuGroup: MenuGroupContextValue;\n};\n"]}