@fluentui/react-menu 9.0.0-rc.7 → 9.0.0-rc.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/CHANGELOG.json +72 -1
  2. package/CHANGELOG.md +149 -132
  3. package/dist/{react-menu.d.ts → index.d.ts} +0 -0
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/package.json +12 -12
  6. package/lib/Menu.d.ts +0 -1
  7. package/lib/MenuDivider.d.ts +0 -1
  8. package/lib/MenuGroup.d.ts +0 -1
  9. package/lib/MenuGroupHeader.d.ts +0 -1
  10. package/lib/MenuItem.d.ts +0 -1
  11. package/lib/MenuItemCheckbox.d.ts +0 -1
  12. package/lib/MenuItemRadio.d.ts +0 -1
  13. package/lib/MenuList.d.ts +0 -1
  14. package/lib/MenuPopover.d.ts +0 -1
  15. package/lib/MenuSplitGroup.d.ts +0 -1
  16. package/lib/MenuTrigger.d.ts +0 -1
  17. package/lib/components/Menu/Menu.d.ts +0 -6
  18. package/lib/components/Menu/Menu.types.d.ts +0 -113
  19. package/lib/components/Menu/index.d.ts +0 -5
  20. package/lib/components/Menu/renderMenu.d.ts +0 -5
  21. package/lib/components/Menu/useMenu.d.ts +0 -10
  22. package/lib/components/Menu/useMenuContextValues.d.ts +0 -2
  23. package/lib/components/MenuDivider/MenuDivider.d.ts +0 -6
  24. package/lib/components/MenuDivider/MenuDivider.types.d.ts +0 -6
  25. package/lib/components/MenuDivider/index.d.ts +0 -5
  26. package/lib/components/MenuDivider/renderMenuDivider.d.ts +0 -6
  27. package/lib/components/MenuDivider/useMenuDivider.d.ts +0 -6
  28. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +0 -8
  29. package/lib/components/MenuGroup/MenuGroup.d.ts +0 -6
  30. package/lib/components/MenuGroup/MenuGroup.types.d.ts +0 -15
  31. package/lib/components/MenuGroup/index.d.ts +0 -6
  32. package/lib/components/MenuGroup/renderMenuGroup.d.ts +0 -6
  33. package/lib/components/MenuGroup/useMenuGroup.d.ts +0 -6
  34. package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
  35. package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +0 -8
  36. package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
  37. package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
  38. package/lib/components/MenuGroupHeader/index.d.ts +0 -5
  39. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
  40. package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
  41. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -8
  42. package/lib/components/MenuItem/MenuItem.d.ts +0 -6
  43. package/lib/components/MenuItem/MenuItem.types.d.ts +0 -43
  44. package/lib/components/MenuItem/index.d.ts +0 -5
  45. package/lib/components/MenuItem/renderMenuItem.d.ts +0 -5
  46. package/lib/components/MenuItem/useCharacterSearch.d.ts +0 -3
  47. package/lib/components/MenuItem/useMenuItem.d.ts +0 -6
  48. package/lib/components/MenuItem/useMenuItemStyles.d.ts +0 -9
  49. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
  50. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
  51. package/lib/components/MenuItemCheckbox/index.d.ts +0 -5
  52. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
  53. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
  54. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -9
  55. package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
  56. package/lib/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
  57. package/lib/components/MenuItemRadio/index.d.ts +0 -5
  58. package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
  59. package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
  60. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -9
  61. package/lib/components/MenuList/MenuList.d.ts +0 -6
  62. package/lib/components/MenuList/MenuList.types.d.ts +0 -55
  63. package/lib/components/MenuList/index.d.ts +0 -6
  64. package/lib/components/MenuList/renderMenuList.d.ts +0 -5
  65. package/lib/components/MenuList/useMenuList.d.ts +0 -6
  66. package/lib/components/MenuList/useMenuListContextValues.d.ts +0 -2
  67. package/lib/components/MenuList/useMenuListStyles.d.ts +0 -11
  68. package/lib/components/MenuPopover/MenuPopover.d.ts +0 -6
  69. package/lib/components/MenuPopover/MenuPopover.types.d.ts +0 -18
  70. package/lib/components/MenuPopover/index.d.ts +0 -5
  71. package/lib/components/MenuPopover/renderMenuPopover.d.ts +0 -5
  72. package/lib/components/MenuPopover/useMenuPopover.d.ts +0 -12
  73. package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -11
  74. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
  75. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
  76. package/lib/components/MenuSplitGroup/index.d.ts +0 -5
  77. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
  78. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
  79. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -11
  80. package/lib/components/MenuTrigger/MenuTrigger.d.ts +0 -8
  81. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +0 -20
  82. package/lib/components/MenuTrigger/index.d.ts +0 -4
  83. package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
  84. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
  85. package/lib/components/index.d.ts +0 -2
  86. package/lib/contexts/menuContext.d.ts +0 -16
  87. package/lib/contexts/menuGroupContext.d.ts +0 -13
  88. package/lib/contexts/menuListContext.d.ts +0 -15
  89. package/lib/contexts/menuTriggerContext.d.ts +0 -3
  90. package/lib/index.d.ts +0 -16
  91. package/lib/selectable/index.d.ts +0 -2
  92. package/lib/selectable/types.d.ts +0 -34
  93. package/lib/selectable/useCheckmarkStyles.d.ts +0 -8
  94. package/lib/utils/index.d.ts +0 -1
  95. package/lib/utils/useIsSubmenu.d.ts +0 -9
  96. package/lib/utils/useOnMenuEnter.d.ts +0 -23
  97. package/lib-commonjs/Menu.d.ts +0 -1
  98. package/lib-commonjs/MenuDivider.d.ts +0 -1
  99. package/lib-commonjs/MenuGroup.d.ts +0 -1
  100. package/lib-commonjs/MenuGroupHeader.d.ts +0 -1
  101. package/lib-commonjs/MenuItem.d.ts +0 -1
  102. package/lib-commonjs/MenuItemCheckbox.d.ts +0 -1
  103. package/lib-commonjs/MenuItemRadio.d.ts +0 -1
  104. package/lib-commonjs/MenuList.d.ts +0 -1
  105. package/lib-commonjs/MenuPopover.d.ts +0 -1
  106. package/lib-commonjs/MenuSplitGroup.d.ts +0 -1
  107. package/lib-commonjs/MenuTrigger.d.ts +0 -1
  108. package/lib-commonjs/components/Menu/Menu.d.ts +0 -6
  109. package/lib-commonjs/components/Menu/Menu.types.d.ts +0 -113
  110. package/lib-commonjs/components/Menu/index.d.ts +0 -5
  111. package/lib-commonjs/components/Menu/renderMenu.d.ts +0 -5
  112. package/lib-commonjs/components/Menu/useMenu.d.ts +0 -10
  113. package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +0 -2
  114. package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +0 -6
  115. package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +0 -6
  116. package/lib-commonjs/components/MenuDivider/index.d.ts +0 -5
  117. package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +0 -6
  118. package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +0 -6
  119. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +0 -8
  120. package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +0 -6
  121. package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +0 -15
  122. package/lib-commonjs/components/MenuGroup/index.d.ts +0 -6
  123. package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +0 -6
  124. package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +0 -6
  125. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
  126. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +0 -8
  127. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
  128. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
  129. package/lib-commonjs/components/MenuGroupHeader/index.d.ts +0 -5
  130. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
  131. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
  132. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -8
  133. package/lib-commonjs/components/MenuItem/MenuItem.d.ts +0 -6
  134. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +0 -43
  135. package/lib-commonjs/components/MenuItem/index.d.ts +0 -5
  136. package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +0 -5
  137. package/lib-commonjs/components/MenuItem/useCharacterSearch.d.ts +0 -3
  138. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +0 -6
  139. package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +0 -9
  140. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
  141. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
  142. package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +0 -5
  143. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
  144. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
  145. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -9
  146. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
  147. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
  148. package/lib-commonjs/components/MenuItemRadio/index.d.ts +0 -5
  149. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
  150. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
  151. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -9
  152. package/lib-commonjs/components/MenuList/MenuList.d.ts +0 -6
  153. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +0 -55
  154. package/lib-commonjs/components/MenuList/index.d.ts +0 -6
  155. package/lib-commonjs/components/MenuList/renderMenuList.d.ts +0 -5
  156. package/lib-commonjs/components/MenuList/useMenuList.d.ts +0 -6
  157. package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +0 -2
  158. package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +0 -11
  159. package/lib-commonjs/components/MenuPopover/MenuPopover.d.ts +0 -6
  160. package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +0 -18
  161. package/lib-commonjs/components/MenuPopover/index.d.ts +0 -5
  162. package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +0 -5
  163. package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +0 -12
  164. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -11
  165. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
  166. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
  167. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +0 -5
  168. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
  169. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
  170. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -11
  171. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +0 -8
  172. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +0 -20
  173. package/lib-commonjs/components/MenuTrigger/index.d.ts +0 -4
  174. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
  175. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
  176. package/lib-commonjs/components/index.d.ts +0 -2
  177. package/lib-commonjs/contexts/menuContext.d.ts +0 -16
  178. package/lib-commonjs/contexts/menuGroupContext.d.ts +0 -13
  179. package/lib-commonjs/contexts/menuListContext.d.ts +0 -15
  180. package/lib-commonjs/contexts/menuTriggerContext.d.ts +0 -3
  181. package/lib-commonjs/index.d.ts +0 -16
  182. package/lib-commonjs/selectable/index.d.ts +0 -2
  183. package/lib-commonjs/selectable/types.d.ts +0 -34
  184. package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +0 -8
  185. package/lib-commonjs/utils/index.d.ts +0 -1
  186. package/lib-commonjs/utils/useIsSubmenu.d.ts +0 -9
  187. package/lib-commonjs/utils/useOnMenuEnter.d.ts +0 -23
@@ -1,6 +0,0 @@
1
- import type { MenuDividerProps } from './MenuDivider.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
5
- */
6
- export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
@@ -1,6 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type MenuDividerSlots = {
3
- root: Slot<'div'>;
4
- };
5
- export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
6
- export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
@@ -1,5 +0,0 @@
1
- export * from './MenuDivider.types';
2
- export * from './MenuDivider';
3
- export * from './renderMenuDivider';
4
- export * from './useMenuDivider';
5
- export * from './useMenuDividerStyles';
@@ -1,6 +0,0 @@
1
- import { MenuDividerState } from './MenuDivider.types';
2
- /**
3
- * Redefine the render function to add slots. Reuse the menudivider structure but add
4
- * slots to children.
5
- */
6
- export declare const renderMenuDivider_unstable: (state: MenuDividerState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';
3
- /**
4
- * Given user props, returns state and render function for a MenuDivider.
5
- */
6
- export declare const useMenuDivider_unstable: (props: MenuDividerProps, ref: React.Ref<HTMLElement>) => MenuDividerState;
@@ -1,8 +0,0 @@
1
- import type { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `menuDividerClassNames.root` instead.
5
- */
6
- export declare const menuDividerClassName = "fui-MenuDivider";
7
- export declare const menuDividerClassNames: SlotClassNames<MenuDividerSlots>;
8
- export declare const useMenuDividerStyles_unstable: (state: MenuDividerState) => MenuDividerState;
@@ -1,6 +0,0 @@
1
- import type { MenuGroupProps } from './MenuGroup.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
5
- */
6
- export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
@@ -1,15 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- import type { MenuGroupContextValue } from '../../contexts/menuGroupContext';
3
- export declare type MenuGroupSlots = {
4
- root: Slot<'div'>;
5
- };
6
- export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
7
- export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
8
- /**
9
- * id applied to the DOM element of `MenuGroupHeader`
10
- */
11
- headerId: string;
12
- };
13
- export declare type MenuGroupContextValues = {
14
- menuGroup: MenuGroupContextValue;
15
- };
@@ -1,6 +0,0 @@
1
- export * from './MenuGroup.types';
2
- export * from './MenuGroup';
3
- export * from './renderMenuGroup';
4
- export * from './useMenuGroup';
5
- export * from './useMenuGroupContextValues';
6
- export * from './useMenuGroupStyles';
@@ -1,6 +0,0 @@
1
- import { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';
2
- /**
3
- * Redefine the render function to add slots. Reuse the menugroup structure but add
4
- * slots to children.
5
- */
6
- export declare const renderMenuGroup_unstable: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import { MenuGroupProps, MenuGroupState } from './MenuGroup.types';
3
- /**
4
- * Given user props, returns state and render function for a MenuGroup.
5
- */
6
- export declare function useMenuGroup_unstable(props: MenuGroupProps, ref: React.Ref<HTMLElement>): MenuGroupState;
@@ -1,2 +0,0 @@
1
- import type { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';
2
- export declare function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues;
@@ -1,8 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { MenuGroupSlots, MenuGroupState } from './MenuGroup.types';
3
- /**
4
- * @deprecated Use `menuGroupClassNames.root` instead.
5
- */
6
- export declare const menuGroupClassName = "fui-MenuGroup";
7
- export declare const menuGroupClassNames: SlotClassNames<MenuGroupSlots>;
8
- export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => MenuGroupState;
@@ -1,6 +0,0 @@
1
- import type { MenuGroupHeaderProps } from './MenuGroupHeader.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
5
- */
6
- export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
@@ -1,6 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type MenuGroupHeaderSlots = {
3
- root: Slot<'div'>;
4
- };
5
- export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
6
- export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
@@ -1,5 +0,0 @@
1
- export * from './MenuGroupHeader.types';
2
- export * from './MenuGroupHeader';
3
- export * from './renderMenuGroupHeader';
4
- export * from './useMenuGroupHeader';
5
- export * from './useMenuGroupHeaderStyles';
@@ -1,6 +0,0 @@
1
- import { MenuGroupHeaderState } from './MenuGroupHeader.types';
2
- /**
3
- * Redefine the render function to add slots. Reuse the menugroupheader structure but add
4
- * slots to children.
5
- */
6
- export declare const renderMenuGroupHeader_unstable: (state: MenuGroupHeaderState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import { MenuGroupHeaderProps, MenuGroupHeaderState } from './MenuGroupHeader.types';
3
- /**
4
- * Given user props, returns state and render function for a MenuGroupHeader.
5
- */
6
- export declare function useMenuGroupHeader_unstable(props: MenuGroupHeaderProps, ref: React.Ref<HTMLElement>): MenuGroupHeaderState;
@@ -1,8 +0,0 @@
1
- import type { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `menuGroupHeaderClassNames.root` instead.
5
- */
6
- export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
7
- export declare const menuGroupHeaderClassNames: SlotClassNames<MenuGroupHeaderSlots>;
8
- export declare const useMenuGroupHeaderStyles_unstable: (state: MenuGroupHeaderState) => MenuGroupHeaderState;
@@ -1,6 +0,0 @@
1
- import type { MenuItemProps } from './MenuItem.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
5
- */
6
- export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
@@ -1,43 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type MenuItemSlots = {
3
- root: Slot<'div'>;
4
- /**
5
- * Icon slot rendered before children content
6
- */
7
- icon?: Slot<'span'>;
8
- /**
9
- * A helper slot for alignment when a menu item is used with selectable menuitems
10
- * Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components
11
- */
12
- checkmark?: Slot<'span'>;
13
- /**
14
- * Icon slot that shows the indicator for a submenu
15
- */
16
- submenuIndicator?: Slot<'span'>;
17
- /**
18
- * Component children are placed in this slot
19
- * Avoid using the `children` property in this slot in favour of Component children whenever possible
20
- */
21
- content?: Slot<'span'>;
22
- /**
23
- * Secondary content rendered opposite the primary content (e.g Shortcut text)
24
- */
25
- secondaryContent?: Slot<'span'>;
26
- };
27
- declare type MenuItemCommons = {
28
- /**
29
- * If the menu item is a trigger for a submenu
30
- */
31
- hasSubmenu?: boolean;
32
- /**
33
- * Applies disabled styles to menu item but remains focusable
34
- */
35
- disabled?: boolean;
36
- /**
37
- * Clicking on the menu item will not dismiss an open menu
38
- */
39
- persistOnClick?: boolean;
40
- };
41
- export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & MenuItemCommons;
42
- export declare type MenuItemState = ComponentState<MenuItemSlots> & MenuItemCommons;
43
- export {};
@@ -1,5 +0,0 @@
1
- export * from './MenuItem';
2
- export * from './MenuItem.types';
3
- export * from './renderMenuItem';
4
- export * from './useMenuItem';
5
- export * from './useMenuItemStyles';
@@ -1,5 +0,0 @@
1
- import type { MenuItemState } from './MenuItem.types';
2
- /**
3
- * Function that renders the final JSX of the component
4
- */
5
- export declare const renderMenuItem_unstable: (state: MenuItemState) => JSX.Element;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuItemState } from '../../components/index';
3
- export declare const useCharacterSearch: (state: MenuItemState, ref: React.RefObject<HTMLElement>) => MenuItemState;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuItemProps, MenuItemState } from './MenuItem.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React.Ref<HTMLElement>) => MenuItemState;
@@ -1,9 +0,0 @@
1
- import type { MenuItemSlots, MenuItemState } from './MenuItem.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `menuItemClassNames.root` instead.
5
- */
6
- export declare const menuItemClassName = "fui-MenuItem";
7
- export declare const menuItemClassNames: SlotClassNames<MenuItemSlots>;
8
- /** Applies style classnames to slots */
9
- export declare const useMenuItemStyles_unstable: (state: MenuItemState) => void;
@@ -1,6 +0,0 @@
1
- import type { MenuItemCheckboxProps } from './MenuItemCheckbox.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
5
- */
6
- export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
@@ -1,4 +0,0 @@
1
- import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';
2
- import type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';
3
- export declare type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;
4
- export declare type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;
@@ -1,5 +0,0 @@
1
- export * from './MenuItemCheckbox.types';
2
- export * from './MenuItemCheckbox';
3
- export * from './renderMenuItemCheckbox';
4
- export * from './useMenuItemCheckbox';
5
- export * from './useMenuItemCheckboxStyles';
@@ -1,3 +0,0 @@
1
- import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';
2
- /** Function that renders the final JSX of the component */
3
- export declare const renderMenuItemCheckbox_unstable: (state: MenuItemCheckboxState) => JSX.Element;
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox.types';
3
- /** Returns the props and state required to render the component */
4
- export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React.Ref<HTMLElement>) => MenuItemCheckboxState;
@@ -1,9 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import { MenuItemSlots } from '../index';
3
- import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';
4
- /**
5
- * @deprecated Use `menuItemCheckboxClassNames.root` instead.
6
- */
7
- export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
8
- export declare const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
9
- export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => void;
@@ -1,6 +0,0 @@
1
- import type { MenuItemRadioProps } from './MenuItemRadio.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
5
- */
6
- export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
@@ -1,4 +0,0 @@
1
- import type { MenuItemSelectableProps, MenuItemSelectableState } from '../../selectable/index';
2
- import type { MenuItemProps, MenuItemState } from '../MenuItem/MenuItem.types';
3
- export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
4
- export declare type MenuItemRadioState = MenuItemState & MenuItemSelectableState;
@@ -1,5 +0,0 @@
1
- export * from './MenuItemRadio.types';
2
- export * from './MenuItemRadio';
3
- export * from './renderMenuItemRadio';
4
- export * from './useMenuItemRadio';
5
- export * from './useMenuItemRadioStyles';
@@ -1,6 +0,0 @@
1
- import type { MenuItemRadioState } from './MenuItemRadio.types';
2
- /**
3
- * Redefine the render function to add slots. Reuse the menuitemradio structure but add
4
- * slots to children.
5
- */
6
- export declare const renderMenuItemRadio_unstable: (state: MenuItemRadioState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio.types';
3
- /**
4
- * Given user props, returns state and render function for a MenuItemRadio.
5
- */
6
- export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React.Ref<HTMLElement>) => MenuItemRadioState;
@@ -1,9 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import { MenuItemSlots } from '../index';
3
- import type { MenuItemRadioState } from './MenuItemRadio.types';
4
- /**
5
- * @deprecated Use `menuItemRadioClassNames.root` instead.
6
- */
7
- export declare const menuItemRadioClassName = "fui-MenuItemRadio";
8
- export declare const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
9
- export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => void;
@@ -1,6 +0,0 @@
1
- import type { MenuListProps } from './MenuList.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled MenuList, using the `useMenuList_unstable` hook.
5
- */
6
- export declare const MenuList: ForwardRefComponent<MenuListProps>;
@@ -1,55 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
- import type { MenuListContextValue } from '../../contexts/menuListContext';
4
- import type { SelectableHandler } from '../../selectable/index';
5
- export declare type MenuCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;
6
- export declare type MenuCheckedValueChangeData = {
7
- /** The name of the value */
8
- name: string;
9
- /** The items for this value that are checked */
10
- checkedItems: string[];
11
- };
12
- export declare type MenuListCommons = {
13
- /**
14
- * Callback when checked items change for value with a name
15
- *
16
- * @param event - React's original SyntheticEvent
17
- * @param data - A data object with relevant information
18
- */
19
- onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
20
- /**
21
- * Map of all checked values
22
- */
23
- checkedValues: Record<string, string[]>;
24
- /**
25
- * Default values to be checked on mount
26
- */
27
- defaultCheckedValues?: Record<string, string[]>;
28
- /**
29
- * States that menu items can contain icons and reserve slots for item alignment
30
- */
31
- hasIcons?: boolean;
32
- /**
33
- * States that menu items can contain selectable items and reserve slots for item alignment
34
- */
35
- hasCheckmarks?: boolean;
36
- };
37
- export declare type MenuListSlots = {
38
- root: Slot<'div'>;
39
- };
40
- export declare type MenuListProps = ComponentProps<MenuListSlots> & Partial<MenuListCommons>;
41
- export declare type MenuListState = ComponentState<MenuListSlots> & MenuListCommons & {
42
- /**
43
- * Callback to set focus on the next menu item by first character
44
- */
45
- setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;
46
- toggleCheckbox: SelectableHandler;
47
- /**
48
- * Selects a radio item, will de-select the currently selected ratio item
49
- */
50
- selectRadio: SelectableHandler;
51
- };
52
- export declare type MenuListContextValues = {
53
- menuList: MenuListContextValue;
54
- };
55
- export declare type UninitializedMenuListState = Omit<MenuListState, 'setFocusByFirstCharacter' | 'toggleCheckbox' | 'selectRadio' | 'checkedValues'> & Partial<Pick<MenuListState, 'checkedValues'>>;
@@ -1,6 +0,0 @@
1
- export * from './MenuList';
2
- export type { MenuCheckedValueChangeData, MenuCheckedValueChangeEvent, MenuListContextValues, MenuListProps, MenuListSlots, MenuListState, UninitializedMenuListState, } from './MenuList.types';
3
- export * from './renderMenuList';
4
- export * from './useMenuList';
5
- export * from './useMenuListStyles';
6
- export * from './useMenuListContextValues';
@@ -1,5 +0,0 @@
1
- import { MenuListContextValues, MenuListState } from './MenuList.types';
2
- /**
3
- * Function that renders the final JSX of the component
4
- */
5
- export declare const renderMenuList_unstable: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuListProps, MenuListState } from './MenuList.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useMenuList_unstable: (props: MenuListProps, ref: React.Ref<HTMLElement>) => MenuListState;
@@ -1,2 +0,0 @@
1
- import type { MenuListContextValues, MenuListState } from './MenuList.types';
2
- export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { MenuListSlots, MenuListState } from './MenuList.types';
3
- /**
4
- * @deprecated Use `menuListClassNames.root` instead.
5
- */
6
- export declare const menuListClassName = "fui-MenuList";
7
- export declare const menuListClassNames: SlotClassNames<MenuListSlots>;
8
- /**
9
- * Apply styling to the Menu slots based on the state
10
- */
11
- export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuListState;
@@ -1,6 +0,0 @@
1
- import type { MenuPopoverProps } from './MenuPopover.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
5
- */
6
- export declare const MenuPopover: ForwardRefComponent<MenuPopoverProps>;
@@ -1,18 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type MenuPopoverSlots = {
3
- root: Slot<'div'>;
4
- };
5
- /**
6
- * MenuPopover Props
7
- */
8
- export declare type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;
9
- /**
10
- * State used in rendering MenuPopover
11
- */
12
- export declare type MenuPopoverState = ComponentState<MenuPopoverSlots> & {
13
- /**
14
- * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
15
- * This option is disregarded for submenus
16
- */
17
- inline: boolean;
18
- };
@@ -1,5 +0,0 @@
1
- export * from './MenuPopover';
2
- export * from './MenuPopover.types';
3
- export * from './renderMenuPopover';
4
- export * from './useMenuPopover';
5
- export * from './useMenuPopoverStyles';
@@ -1,5 +0,0 @@
1
- import { MenuPopoverState } from './MenuPopover.types';
2
- /**
3
- * Render the final JSX of MenuPopover
4
- */
5
- export declare const renderMenuPopover_unstable: (state: MenuPopoverState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { MenuPopoverProps, MenuPopoverState } from './MenuPopover.types';
3
- /**
4
- * Create the state required to render MenuPopover.
5
- *
6
- * The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,
7
- * before being passed to renderMenuPopover_unstable.
8
- *
9
- * @param props - props from this instance of MenuPopover
10
- * @param ref - reference to root HTMLElement of MenuPopover
11
- */
12
- export declare const useMenuPopover_unstable: (props: MenuPopoverProps, ref: React.Ref<HTMLElement>) => MenuPopoverState;
@@ -1,11 +0,0 @@
1
- import type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `menuPopoverClassNames.root` instead.
5
- */
6
- export declare const menuPopoverClassName = "fui-MenuPopover";
7
- export declare const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots>;
8
- /**
9
- * Apply styling to the Menu slots based on the state
10
- */
11
- export declare const useMenuPopoverStyles_unstable: (state: MenuPopoverState) => MenuPopoverState;
@@ -1,6 +0,0 @@
1
- import type { MenuSplitGroupProps } from './MenuSplitGroup.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
5
- */
6
- export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
@@ -1,14 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type MenuSplitGroupSlots = {
3
- root: Slot<'div'>;
4
- };
5
- declare type MenuSplitGroupCommons = {};
6
- /**
7
- * MenuSplitGroup Props
8
- */
9
- export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots> & MenuSplitGroupCommons;
10
- /**
11
- * State used in rendering MenuSplitGroup
12
- */
13
- export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots> & MenuSplitGroupCommons;
14
- export {};
@@ -1,5 +0,0 @@
1
- export * from './MenuSplitGroup';
2
- export * from './MenuSplitGroup.types';
3
- export * from './renderMenuSplitGroup';
4
- export * from './useMenuSplitGroup';
5
- export * from './useMenuSplitGroupStyles';
@@ -1,5 +0,0 @@
1
- import type { MenuSplitGroupState } from './MenuSplitGroup.types';
2
- /**
3
- * Render the final JSX of MenuSplitGroup
4
- */
5
- export declare const renderMenuSplitGroup_unstable: (state: MenuSplitGroupState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.types';
3
- /**
4
- * Create the state required to render MenuSplitGroup.
5
- *
6
- * The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
7
- * before being passed to renderMenuSplitGroup_unstable.
8
- *
9
- * @param props - props from this instance of MenuSplitGroup
10
- * @param ref - reference to root HTMLElement of MenuSplitGroup
11
- */
12
- export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
@@ -1,11 +0,0 @@
1
- import type { MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `menuSplitGroupClassNames.root` instead.
5
- */
6
- export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
7
- export declare const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots>;
8
- /**
9
- * Apply styling to the MenuSplitGroup slots based on the state
10
- */
11
- export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuTriggerProps } from './MenuTrigger.types';
3
- import type { FluentTriggerComponent } from '@fluentui/react-utilities';
4
- /**
5
- * Wraps a trigger element as an only child
6
- * and adds the necessary event handling to open a popup menu
7
- */
8
- export declare const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent;
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- export declare type MenuTriggerProps = {
3
- /**
4
- * Explicitly require single child or render function
5
- */
6
- children: (React.ReactElement & {
7
- ref?: React.Ref<unknown>;
8
- }) | ((props: MenuTriggerChildProps) => React.ReactElement | null);
9
- };
10
- /**
11
- * Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
12
- */
13
- export declare type MenuTriggerChildProps = Required<Pick<React.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
14
- ref?: React.Ref<never>;
15
- 'aria-expanded': boolean | undefined;
16
- };
17
- export declare type MenuTriggerState = {
18
- children: React.ReactElement | null;
19
- isSubmenu: boolean;
20
- };
@@ -1,4 +0,0 @@
1
- export * from './MenuTrigger';
2
- export * from './MenuTrigger.types';
3
- export * from './renderMenuTrigger';
4
- export * from './useMenuTrigger';