@fluentui/react-menu 9.0.0-rc.6 → 9.0.0-rc.9
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +170 -9
- package/CHANGELOG.md +184 -139
- package/dist/{react-menu.d.ts → index.d.ts} +0 -0
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/lib/index.js +25 -16
- package/lib/index.js.map +1 -1
- package/lib-commonjs/index.js +486 -17
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +13 -13
- package/lib/Menu.d.ts +0 -1
- package/lib/MenuDivider.d.ts +0 -1
- package/lib/MenuGroup.d.ts +0 -1
- package/lib/MenuGroupHeader.d.ts +0 -1
- package/lib/MenuItem.d.ts +0 -1
- package/lib/MenuItemCheckbox.d.ts +0 -1
- package/lib/MenuItemRadio.d.ts +0 -1
- package/lib/MenuList.d.ts +0 -1
- package/lib/MenuPopover.d.ts +0 -1
- package/lib/MenuSplitGroup.d.ts +0 -1
- package/lib/MenuTrigger.d.ts +0 -1
- package/lib/components/Menu/Menu.d.ts +0 -6
- package/lib/components/Menu/Menu.types.d.ts +0 -113
- package/lib/components/Menu/index.d.ts +0 -5
- package/lib/components/Menu/renderMenu.d.ts +0 -5
- package/lib/components/Menu/useMenu.d.ts +0 -10
- package/lib/components/Menu/useMenuContextValues.d.ts +0 -2
- package/lib/components/MenuDivider/MenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/MenuDivider.types.d.ts +0 -6
- package/lib/components/MenuDivider/index.d.ts +0 -5
- package/lib/components/MenuDivider/renderMenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/useMenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +0 -8
- package/lib/components/MenuGroup/MenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/MenuGroup.types.d.ts +0 -15
- package/lib/components/MenuGroup/index.d.ts +0 -6
- package/lib/components/MenuGroup/renderMenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/useMenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
- package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +0 -8
- package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
- package/lib/components/MenuGroupHeader/index.d.ts +0 -5
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -8
- package/lib/components/MenuItem/MenuItem.d.ts +0 -6
- package/lib/components/MenuItem/MenuItem.types.d.ts +0 -43
- package/lib/components/MenuItem/index.d.ts +0 -5
- package/lib/components/MenuItem/renderMenuItem.d.ts +0 -5
- package/lib/components/MenuItem/useCharacterSearch.d.ts +0 -3
- package/lib/components/MenuItem/useMenuItem.d.ts +0 -6
- package/lib/components/MenuItem/useMenuItemStyles.d.ts +0 -9
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
- package/lib/components/MenuItemCheckbox/index.d.ts +0 -5
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -9
- package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
- package/lib/components/MenuItemRadio/index.d.ts +0 -5
- package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -9
- package/lib/components/MenuList/MenuList.d.ts +0 -6
- package/lib/components/MenuList/MenuList.types.d.ts +0 -55
- package/lib/components/MenuList/index.d.ts +0 -6
- package/lib/components/MenuList/renderMenuList.d.ts +0 -5
- package/lib/components/MenuList/useMenuList.d.ts +0 -6
- package/lib/components/MenuList/useMenuListContextValues.d.ts +0 -2
- package/lib/components/MenuList/useMenuListStyles.d.ts +0 -11
- package/lib/components/MenuPopover/MenuPopover.d.ts +0 -6
- package/lib/components/MenuPopover/MenuPopover.types.d.ts +0 -18
- package/lib/components/MenuPopover/index.d.ts +0 -5
- package/lib/components/MenuPopover/renderMenuPopover.d.ts +0 -5
- package/lib/components/MenuPopover/useMenuPopover.d.ts +0 -12
- package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -11
- package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
- package/lib/components/MenuSplitGroup/index.d.ts +0 -5
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -11
- package/lib/components/MenuTrigger/MenuTrigger.d.ts +0 -8
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +0 -20
- package/lib/components/MenuTrigger/index.d.ts +0 -4
- package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
- package/lib/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
- package/lib/components/index.d.ts +0 -2
- package/lib/contexts/menuContext.d.ts +0 -16
- package/lib/contexts/menuGroupContext.d.ts +0 -13
- package/lib/contexts/menuListContext.d.ts +0 -15
- package/lib/contexts/menuTriggerContext.d.ts +0 -3
- package/lib/index.d.ts +0 -16
- package/lib/selectable/index.d.ts +0 -2
- package/lib/selectable/types.d.ts +0 -34
- package/lib/selectable/useCheckmarkStyles.d.ts +0 -8
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/useIsSubmenu.d.ts +0 -9
- package/lib/utils/useOnMenuEnter.d.ts +0 -23
- package/lib-commonjs/Menu.d.ts +0 -1
- package/lib-commonjs/MenuDivider.d.ts +0 -1
- package/lib-commonjs/MenuGroup.d.ts +0 -1
- package/lib-commonjs/MenuGroupHeader.d.ts +0 -1
- package/lib-commonjs/MenuItem.d.ts +0 -1
- package/lib-commonjs/MenuItemCheckbox.d.ts +0 -1
- package/lib-commonjs/MenuItemRadio.d.ts +0 -1
- package/lib-commonjs/MenuList.d.ts +0 -1
- package/lib-commonjs/MenuPopover.d.ts +0 -1
- package/lib-commonjs/MenuSplitGroup.d.ts +0 -1
- package/lib-commonjs/MenuTrigger.d.ts +0 -1
- package/lib-commonjs/components/Menu/Menu.d.ts +0 -6
- package/lib-commonjs/components/Menu/Menu.types.d.ts +0 -113
- package/lib-commonjs/components/Menu/index.d.ts +0 -5
- package/lib-commonjs/components/Menu/renderMenu.d.ts +0 -5
- package/lib-commonjs/components/Menu/useMenu.d.ts +0 -10
- package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/index.d.ts +0 -5
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +0 -8
- package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +0 -15
- package/lib-commonjs/components/MenuGroup/index.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +0 -8
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/index.d.ts +0 -5
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -8
- package/lib-commonjs/components/MenuItem/MenuItem.d.ts +0 -6
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +0 -43
- package/lib-commonjs/components/MenuItem/index.d.ts +0 -5
- package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +0 -5
- package/lib-commonjs/components/MenuItem/useCharacterSearch.d.ts +0 -3
- package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +0 -6
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +0 -9
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
- package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +0 -5
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -9
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
- package/lib-commonjs/components/MenuItemRadio/index.d.ts +0 -5
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -9
- package/lib-commonjs/components/MenuList/MenuList.d.ts +0 -6
- package/lib-commonjs/components/MenuList/MenuList.types.d.ts +0 -55
- package/lib-commonjs/components/MenuList/index.d.ts +0 -6
- package/lib-commonjs/components/MenuList/renderMenuList.d.ts +0 -5
- package/lib-commonjs/components/MenuList/useMenuList.d.ts +0 -6
- package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +0 -11
- package/lib-commonjs/components/MenuPopover/MenuPopover.d.ts +0 -6
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +0 -18
- package/lib-commonjs/components/MenuPopover/index.d.ts +0 -5
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +0 -5
- package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +0 -12
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -11
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +0 -14
- package/lib-commonjs/components/MenuSplitGroup/index.d.ts +0 -5
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +0 -5
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +0 -12
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +0 -11
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +0 -8
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +0 -20
- package/lib-commonjs/components/MenuTrigger/index.d.ts +0 -4
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
- package/lib-commonjs/components/index.d.ts +0 -2
- package/lib-commonjs/contexts/menuContext.d.ts +0 -16
- package/lib-commonjs/contexts/menuGroupContext.d.ts +0 -13
- package/lib-commonjs/contexts/menuListContext.d.ts +0 -15
- package/lib-commonjs/contexts/menuTriggerContext.d.ts +0 -3
- package/lib-commonjs/index.d.ts +0 -16
- package/lib-commonjs/selectable/index.d.ts +0 -2
- package/lib-commonjs/selectable/types.d.ts +0 -34
- package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +0 -8
- package/lib-commonjs/utils/index.d.ts +0 -1
- package/lib-commonjs/utils/useIsSubmenu.d.ts +0 -9
- package/lib-commonjs/utils/useOnMenuEnter.d.ts +0 -23
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.0.0-rc.
|
3
|
+
"version": "9.0.0-rc.9",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
7
|
-
"typings": "
|
7
|
+
"typings": "dist/index.d.ts",
|
8
8
|
"sideEffects": false,
|
9
9
|
"repository": {
|
10
10
|
"type": "git",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"license": "MIT",
|
14
14
|
"scripts": {
|
15
15
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
16
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node
|
16
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-menu/src && yarn docs",
|
17
17
|
"build": "just-scripts build",
|
18
18
|
"bundle-size": "bundle-size measure",
|
19
19
|
"clean": "just-scripts clean",
|
@@ -22,27 +22,27 @@
|
|
22
22
|
"just": "just-scripts",
|
23
23
|
"lint": "just-scripts lint",
|
24
24
|
"start": "yarn storybook",
|
25
|
-
"storybook": "node
|
25
|
+
"storybook": "node ../../../scripts/storybook/runner",
|
26
26
|
"test": "jest --passWithNoTests",
|
27
27
|
"type-check": "tsc -b tsconfig.json"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
31
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.5",
|
33
33
|
"@fluentui/scripts": "^1.0.0"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@fluentui/keyboard-keys": "9.0.0-rc.
|
37
|
-
"@fluentui/react-context-selector": "9.0.0-rc.
|
36
|
+
"@fluentui/keyboard-keys": "9.0.0-rc.6",
|
37
|
+
"@fluentui/react-context-selector": "9.0.0-rc.8",
|
38
38
|
"@fluentui/react-icons": "^2.0.166-rc.3",
|
39
39
|
"@griffel/react": "1.0.3",
|
40
|
-
"@fluentui/react-portal": "9.0.0-rc.
|
41
|
-
"@fluentui/react-positioning": "9.0.0-rc.
|
42
|
-
"@fluentui/react-shared-contexts": "9.0.0-rc.
|
43
|
-
"@fluentui/react-tabster": "9.0.0-rc.
|
44
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
45
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
40
|
+
"@fluentui/react-portal": "9.0.0-rc.9",
|
41
|
+
"@fluentui/react-positioning": "9.0.0-rc.8",
|
42
|
+
"@fluentui/react-shared-contexts": "9.0.0-rc.7",
|
43
|
+
"@fluentui/react-tabster": "9.0.0-rc.9",
|
44
|
+
"@fluentui/react-theme": "9.0.0-rc.7",
|
45
|
+
"@fluentui/react-utilities": "9.0.0-rc.8",
|
46
46
|
"tslib": "^2.1.0"
|
47
47
|
},
|
48
48
|
"peerDependencies": {
|
package/lib/Menu.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/Menu/index';
|
package/lib/MenuDivider.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuDivider/index';
|
package/lib/MenuGroup.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuGroup/index';
|
package/lib/MenuGroupHeader.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuGroupHeader/index';
|
package/lib/MenuItem.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuItem/index';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuItemCheckbox/index';
|
package/lib/MenuItemRadio.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuItemRadio/index';
|
package/lib/MenuList.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuList/index';
|
package/lib/MenuPopover.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuPopover/index';
|
package/lib/MenuSplitGroup.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuSplitGroup/index';
|
package/lib/MenuTrigger.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/MenuTrigger/index';
|
@@ -1,113 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { ComponentProps, ComponentState } from '@fluentui/react-utilities';
|
3
|
-
import { usePopperMouseTarget, PositioningShorthand } from '@fluentui/react-positioning';
|
4
|
-
import { MenuListCommons } from '../MenuList/MenuList.types';
|
5
|
-
import { MenuContextValue } from '../../contexts/menuContext';
|
6
|
-
declare type MenuCommons = MenuListCommons & {
|
7
|
-
/**
|
8
|
-
* Whether the popup is open
|
9
|
-
*/
|
10
|
-
open: boolean;
|
11
|
-
/**
|
12
|
-
* Call back when the component requests to change value
|
13
|
-
* The `open` value is used as a hint when directly controlling the component
|
14
|
-
*/
|
15
|
-
onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
16
|
-
/**
|
17
|
-
* Whether the popup is open by default
|
18
|
-
*/
|
19
|
-
defaultOpen?: boolean;
|
20
|
-
openOnHover: boolean;
|
21
|
-
/**
|
22
|
-
* Opens the menu on right click (context menu), removes all other menu open interactions
|
23
|
-
*/
|
24
|
-
openOnContext?: boolean;
|
25
|
-
/**
|
26
|
-
* Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
|
27
|
-
* This option is disregarded for submenus
|
28
|
-
*/
|
29
|
-
inline?: boolean;
|
30
|
-
/**
|
31
|
-
* Do not dismiss the menu when a menu item is clicked
|
32
|
-
*/
|
33
|
-
persistOnItemClick?: boolean;
|
34
|
-
/**
|
35
|
-
* Sets the delay for mouse open/close for the popover one mouse enter/leave
|
36
|
-
*/
|
37
|
-
hoverDelay?: number;
|
38
|
-
};
|
39
|
-
export declare type MenuSlots = {};
|
40
|
-
/**
|
41
|
-
* Extends and drills down Menulist props to simplify API
|
42
|
-
*/
|
43
|
-
export declare type MenuProps = Partial<MenuCommons> & ComponentProps<MenuSlots> & {
|
44
|
-
/**
|
45
|
-
* Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.
|
46
|
-
* Alternatively can only contain {@link MenuPopover} if using a custom `target`.
|
47
|
-
*/
|
48
|
-
children: [JSX.Element, JSX.Element] | JSX.Element;
|
49
|
-
/**
|
50
|
-
* Configures the positioned menu
|
51
|
-
*/
|
52
|
-
positioning?: PositioningShorthand;
|
53
|
-
};
|
54
|
-
export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
|
55
|
-
/**
|
56
|
-
* Callback to open/close the popup
|
57
|
-
*/
|
58
|
-
setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
59
|
-
/**
|
60
|
-
* Internal react node that just simplifies handling children
|
61
|
-
*/
|
62
|
-
menuPopover: React.ReactNode;
|
63
|
-
/**
|
64
|
-
* Internal react node that just simplifies handling children
|
65
|
-
*/
|
66
|
-
menuTrigger: React.ReactNode;
|
67
|
-
/**
|
68
|
-
* The ref for the popup
|
69
|
-
*/
|
70
|
-
menuPopoverRef: React.MutableRefObject<HTMLElement>;
|
71
|
-
/**
|
72
|
-
* The ref for the MenuTrigger, used for popup positioning
|
73
|
-
*/
|
74
|
-
triggerRef: React.MutableRefObject<HTMLElement>;
|
75
|
-
/**
|
76
|
-
* Id for the MenuTrigger element for aria relationship
|
77
|
-
*/
|
78
|
-
triggerId: string;
|
79
|
-
/**
|
80
|
-
* Whether this menu is a submenu
|
81
|
-
*/
|
82
|
-
isSubmenu: boolean;
|
83
|
-
/**
|
84
|
-
* Anchors the popper to the mouse click for context events
|
85
|
-
*/
|
86
|
-
contextTarget: ReturnType<typeof usePopperMouseTarget>[0];
|
87
|
-
/**
|
88
|
-
* A callback to set the target of the popper to the mouse click for context events
|
89
|
-
*/
|
90
|
-
setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];
|
91
|
-
};
|
92
|
-
/**
|
93
|
-
* Data attached to open/close events
|
94
|
-
*/
|
95
|
-
export declare type MenuOpenChangeData = {
|
96
|
-
open: boolean;
|
97
|
-
/**
|
98
|
-
* Indicates whether the change of state was a keyboard interaction
|
99
|
-
*/
|
100
|
-
keyboard?: boolean;
|
101
|
-
/**
|
102
|
-
* indicates whether the request for the open state was bubbled from a nested menu
|
103
|
-
*/
|
104
|
-
bubble?: boolean;
|
105
|
-
};
|
106
|
-
export declare type MenuContextValues = {
|
107
|
-
menu: MenuContextValue;
|
108
|
-
};
|
109
|
-
/**
|
110
|
-
* The supported events that will trigger open/close of the menu
|
111
|
-
*/
|
112
|
-
export declare type MenuOpenEvents = MouseEvent | TouchEvent | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement> | React.FocusEvent<HTMLElement>;
|
113
|
-
export {};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { MenuProps, MenuState } from './Menu.types';
|
2
|
-
/**
|
3
|
-
* Create the state required to render Menu.
|
4
|
-
*
|
5
|
-
* The returned state can be modified with hooks such as useMenuStyles,
|
6
|
-
* before being passed to renderMenu_unstable.
|
7
|
-
*
|
8
|
-
* @param props - props from this instance of Menu
|
9
|
-
*/
|
10
|
-
export declare const useMenu_unstable: (props: MenuProps) => MenuState;
|
@@ -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,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
|
-
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,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,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,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,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,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>;
|