@fluentui/react-overflow 9.0.0-beta.1 → 9.0.0-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +330 -1
- package/CHANGELOG.md +113 -2
- package/dist/index.d.ts +4 -32
- package/lib/components/Overflow.js +4 -2
- package/lib/components/Overflow.js.map +1 -1
- package/lib/components/OverflowItem/OverflowItem.js.map +1 -1
- package/lib/components/OverflowItem/OverflowItem.types.js.map +1 -1
- package/lib/components/OverflowItem/index.js.map +1 -1
- package/lib/constants.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/overflowContext.js +6 -4
- package/lib/overflowContext.js.map +1 -1
- package/lib/types.js.map +1 -1
- package/lib/useIsOverflowGroupVisible.js.map +1 -1
- package/lib/useIsOverflowItemVisible.js.map +1 -1
- package/lib/useOverflowContainer.js +30 -19
- package/lib/useOverflowContainer.js.map +1 -1
- package/lib/useOverflowCount.js.map +1 -1
- package/lib/useOverflowItem.js +1 -0
- package/lib/useOverflowItem.js.map +1 -1
- package/lib/useOverflowMenu.js +4 -16
- package/lib/useOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Overflow.js +4 -2
- package/lib-commonjs/components/Overflow.js.map +1 -1
- package/lib-commonjs/components/OverflowItem/OverflowItem.js.map +1 -1
- package/lib-commonjs/components/OverflowItem/index.js.map +1 -1
- package/lib-commonjs/constants.js.map +1 -1
- package/lib-commonjs/index.js +1 -7
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/overflowContext.js +6 -4
- package/lib-commonjs/overflowContext.js.map +1 -1
- package/lib-commonjs/useIsOverflowGroupVisible.js.map +1 -1
- package/lib-commonjs/useIsOverflowItemVisible.js.map +1 -1
- package/lib-commonjs/useOverflowContainer.js +28 -17
- package/lib-commonjs/useOverflowContainer.js.map +1 -1
- package/lib-commonjs/useOverflowCount.js.map +1 -1
- package/lib-commonjs/useOverflowItem.js +1 -0
- package/lib-commonjs/useOverflowItem.js.map +1 -1
- package/lib-commonjs/useOverflowMenu.js +4 -17
- package/lib-commonjs/useOverflowMenu.js.map +1 -1
- package/package.json +13 -11
- package/dist/tsdoc-metadata.json +0 -11
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useOverflowMenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;
|
1
|
+
{"version":3,"sources":["packages/react-components/react-overflow/src/useOverflowMenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AAEA,SAAgB,eAAhB,CAA8D,EAA9D,EAAyE;EACvE,MAAM,SAAS,GAAG,iBAAA,CAAA,KAAA,CAAM,eAAN,EAAuB,EAAvB,CAAlB;EACA,MAAM,aAAa,GAAG,kBAAA,CAAA,gBAAA,EAAtB;EACA,MAAM,oBAAoB,GAAG,iBAAA,CAAA,kBAAA,CAAmB,CAAC,IAAI,CAAC,CAAC,oBAA1B,CAA7B;EACA,MAAM,cAAc,GAAG,iBAAA,CAAA,kBAAA,CAAmB,CAAC,IAAI,CAAC,CAAC,cAA1B,CAAvB;EACA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAN,CAAuB,IAAvB,CAAZ;EACA,MAAM,aAAa,GAAG,aAAa,GAAG,CAAtC;EAEA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;IAC7B,IAAI,GAAG,CAAC,OAAR,EAAiB;MACf,OAAO,oBAAoB,CAAC,GAAG,CAAC,OAAL,CAA3B;IACD;EACF,CAJD,EAIG,CAAC,oBAAD,EAAuB,aAAvB,EAAsC,SAAtC,CAJH;EAMA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;IAC7B,IAAI,aAAJ,EAAmB;MACjB,cAAc;IACf;EACF,CAJD,EAIG,CAAC,aAAD,EAAgB,cAAhB,EAAgC,GAAhC,CAJH;EAMA,OAAO;IAAE,GAAF;IAAO,aAAP;IAAsB;EAAtB,CAAP;AACD;;AArBD,OAAA,CAAA,eAAA,GAAA,eAAA","sourcesContent":["import * as React from 'react';\nimport { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useOverflowContext } from './overflowContext';\nimport { useOverflowCount } from './useOverflowCount';\n\nexport function useOverflowMenu<TElement extends HTMLElement>(id?: string) {\n const elementId = useId('overflow-menu', id);\n const overflowCount = useOverflowCount();\n const registerOverflowMenu = useOverflowContext(v => v.registerOverflowMenu);\n const updateOverflow = useOverflowContext(v => v.updateOverflow);\n const ref = React.useRef<TElement>(null);\n const isOverflowing = overflowCount > 0;\n\n useIsomorphicLayoutEffect(() => {\n if (ref.current) {\n return registerOverflowMenu(ref.current);\n }\n }, [registerOverflowMenu, isOverflowing, elementId]);\n\n useIsomorphicLayoutEffect(() => {\n if (isOverflowing) {\n updateOverflow();\n }\n }, [isOverflowing, updateOverflow, ref]);\n\n return { ref, overflowCount, isOverflowing };\n}\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-overflow",
|
3
|
-
"version": "9.0.0-beta.
|
3
|
+
"version": "9.0.0-beta.11",
|
4
4
|
"description": "React bindings for @fluentui/priority-overflow",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -16,32 +16,34 @@
|
|
16
16
|
"bundle-size": "bundle-size measure",
|
17
17
|
"clean": "just-scripts clean",
|
18
18
|
"code-style": "just-scripts code-style",
|
19
|
+
"e2e": "cypress run --component",
|
20
|
+
"e2e:local": "cypress open --component",
|
19
21
|
"just": "just-scripts",
|
20
22
|
"lint": "just-scripts lint",
|
21
23
|
"start": "yarn storybook",
|
22
24
|
"test": "jest --passWithNoTests",
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"type-check": "tsc -b tsconfig.json"
|
25
|
+
"storybook": "start-storybook",
|
26
|
+
"type-check": "tsc -b tsconfig.json",
|
27
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
27
28
|
},
|
28
29
|
"devDependencies": {
|
29
30
|
"@fluentui/eslint-plugin": "*",
|
30
31
|
"@fluentui/scripts": "^1.0.0"
|
31
32
|
},
|
32
33
|
"dependencies": {
|
33
|
-
"@fluentui/priority-overflow": "^9.0.0-beta.
|
34
|
-
"@fluentui/react-context-selector": "9.0.
|
35
|
-
"@fluentui/react-theme": "9.
|
36
|
-
"@fluentui/react-utilities": "9.
|
37
|
-
"@griffel/react": "1.0
|
34
|
+
"@fluentui/priority-overflow": "^9.0.0-beta.3",
|
35
|
+
"@fluentui/react-context-selector": "^9.0.4",
|
36
|
+
"@fluentui/react-theme": "^9.1.0",
|
37
|
+
"@fluentui/react-utilities": "^9.1.1",
|
38
|
+
"@griffel/react": "^1.4.0",
|
38
39
|
"tslib": "^2.1.0"
|
39
40
|
},
|
40
41
|
"peerDependencies": {
|
41
42
|
"@types/react": ">=16.8.0 <18.0.0",
|
42
43
|
"@types/react-dom": ">=16.8.0 <18.0.0",
|
43
44
|
"react": ">=16.8.0 <18.0.0",
|
44
|
-
"react-dom": ">=16.8.0 <18.0.0"
|
45
|
+
"react-dom": ">=16.8.0 <18.0.0",
|
46
|
+
"scheduler": "^0.19.0 || ^0.20.0"
|
45
47
|
},
|
46
48
|
"beachball": {
|
47
49
|
"disallowedChangeTypes": [
|
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
|
-
}
|