@fluentui/react-menu 9.0.3 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +180 -6
- package/CHANGELOG.md +46 -7
- package/dist/index.d.ts +15 -9
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/useMenu.js +42 -16
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +31 -29
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js +4 -1
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +6 -2
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js +18 -23
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/contexts/menuContext.js +7 -4
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js +8 -3
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js +4 -3
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.js +7 -2
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.js +42 -16
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +31 -29
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +4 -1
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +6 -2
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +17 -22
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js +7 -4
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +8 -3
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js +4 -3
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +7 -2
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/package.json +17 -15
- package/dist/tsdoc-metadata.json +0 -11
@@ -11,10 +11,15 @@ const React = /*#__PURE__*/require("react");
|
|
11
11
|
*/
|
12
12
|
|
13
13
|
|
14
|
-
const MenuTriggerContext = /*#__PURE__*/React.createContext(
|
14
|
+
const MenuTriggerContext = /*#__PURE__*/React.createContext(undefined);
|
15
|
+
const menuTriggerContextDefaultValue = false;
|
15
16
|
exports.MenuTriggerContextProvider = MenuTriggerContext.Provider;
|
16
17
|
|
17
|
-
const useMenuTriggerContext_unstable = () =>
|
18
|
+
const useMenuTriggerContext_unstable = () => {
|
19
|
+
var _a;
|
20
|
+
|
21
|
+
return (_a = React.useContext(MenuTriggerContext)) !== null && _a !== void 0 ? _a : menuTriggerContextDefaultValue;
|
22
|
+
};
|
18
23
|
|
19
24
|
exports.useMenuTriggerContext_unstable = useMenuTriggerContext_unstable;
|
20
25
|
//# sourceMappingURL=menuTriggerContext.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAEA;;AAEG;;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,
|
1
|
+
{"version":3,"sources":["contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAEA;;AAEG;;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAAyC,SAAzC,CAA3B;AAEA,MAAM,8BAA8B,GAAG,KAAvC;AAEa,OAAA,CAAA,0BAAA,GAA6B,kBAAkB,CAAC,QAAhD;;AACN,MAAM,8BAA8B,GAAG,MAAK;EAAA,IAAA,EAAA;;EACjD,OAAA,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,kBAAjB,CAAA,MAAoC,IAApC,IAAoC,EAAA,KAAA,KAAA,CAApC,GAAoC,EAApC,GAAwC,8BAAxC;AAAsE,CADjE;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\n\n/**\n * Context used communicate with a child menu item that it is a trigger for a submenu\n */\nconst MenuTriggerContext = React.createContext<boolean | undefined>(undefined) as React.Context<boolean>;\n\nconst menuTriggerContextDefaultValue = false;\n\nexport const MenuTriggerContextProvider = MenuTriggerContext.Provider;\nexport const useMenuTriggerContext_unstable = () =>\n React.useContext(MenuTriggerContext) ?? menuTriggerContextDefaultValue;\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.0
|
3
|
+
"version": "9.1.0",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -13,37 +13,38 @@
|
|
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 ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-menu/src && yarn docs",
|
16
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/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",
|
20
20
|
"code-style": "just-scripts code-style",
|
21
|
-
"e2e": "
|
22
|
-
"e2e:local": "
|
21
|
+
"e2e": "cypress run --component",
|
22
|
+
"e2e:local": "cypress open --component",
|
23
23
|
"just": "just-scripts",
|
24
24
|
"lint": "just-scripts lint",
|
25
25
|
"start": "yarn storybook",
|
26
|
-
"storybook": "
|
26
|
+
"storybook": "start-storybook",
|
27
27
|
"test": "jest --passWithNoTests",
|
28
28
|
"type-check": "tsc -b tsconfig.json"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"@fluentui/eslint-plugin": "*",
|
32
32
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
33
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.13",
|
34
34
|
"@fluentui/scripts": "^1.0.0"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
+
"@fluentui/react-aria": "^9.2.0",
|
37
38
|
"@fluentui/keyboard-keys": "^9.0.0",
|
38
|
-
"@fluentui/react-context-selector": "^9.0.
|
39
|
+
"@fluentui/react-context-selector": "^9.0.3",
|
39
40
|
"@fluentui/react-icons": "^2.0.175",
|
40
|
-
"@fluentui/react-portal": "^9.0.
|
41
|
-
"@fluentui/react-positioning": "^9.
|
42
|
-
"@fluentui/react-shared-contexts": "^9.0.
|
43
|
-
"@fluentui/react-tabster": "^9.
|
44
|
-
"@fluentui/react-theme": "^9.
|
45
|
-
"@fluentui/react-utilities": "^9.0
|
46
|
-
"@griffel/react": "^1.
|
41
|
+
"@fluentui/react-portal": "^9.0.5",
|
42
|
+
"@fluentui/react-positioning": "^9.2.0",
|
43
|
+
"@fluentui/react-shared-contexts": "^9.0.1",
|
44
|
+
"@fluentui/react-tabster": "^9.1.1",
|
45
|
+
"@fluentui/react-theme": "^9.1.0",
|
46
|
+
"@fluentui/react-utilities": "^9.1.0",
|
47
|
+
"@griffel/react": "^1.3.0",
|
47
48
|
"tslib": "^2.1.0"
|
48
49
|
},
|
49
50
|
"peerDependencies": {
|
@@ -55,7 +56,8 @@
|
|
55
56
|
},
|
56
57
|
"beachball": {
|
57
58
|
"disallowedChangeTypes": [
|
58
|
-
"major"
|
59
|
+
"major",
|
60
|
+
"prerelease"
|
59
61
|
]
|
60
62
|
},
|
61
63
|
"exports": {
|
package/dist/tsdoc-metadata.json
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
3
|
-
{
|
4
|
-
"tsdocVersion": "0.12",
|
5
|
-
"toolPackages": [
|
6
|
-
{
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
8
|
-
"packageVersion": "7.18.1"
|
9
|
-
}
|
10
|
-
]
|
11
|
-
}
|