@fluentui/react-positioning 9.4.3 → 9.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +11 -2
- package/lib/middleware/maxSize.js +4 -2
- package/lib/middleware/maxSize.js.map +1 -1
- package/lib-amd/middleware/maxSize.js +2 -0
- package/lib-amd/middleware/maxSize.js.map +1 -1
- package/lib-commonjs/middleware/maxSize.js +4 -2
- package/lib-commonjs/middleware/maxSize.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,22 @@
|
|
2
2
|
"name": "@fluentui/react-positioning",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Wed,
|
5
|
+
"date": "Wed, 22 Feb 2023 23:04:47 GMT",
|
6
|
+
"tag": "@fluentui/react-positioning_v9.5.0",
|
7
|
+
"version": "9.5.0",
|
8
|
+
"comments": {
|
9
|
+
"minor": [
|
10
|
+
{
|
11
|
+
"author": "lingfangao@hotmail.com",
|
12
|
+
"package": "@fluentui/react-positioning",
|
13
|
+
"commit": "9231f2bdb426a3f8223335cccac171a68ecbb485",
|
14
|
+
"comment": "feat: Set overflow on positioned element when `autosize` is applied"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"date": "Wed, 15 Feb 2023 11:44:52 GMT",
|
6
21
|
"tag": "@fluentui/react-positioning_v9.4.3",
|
7
22
|
"version": "9.4.3",
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
# Change Log - @fluentui/react-positioning
|
2
2
|
|
3
|
-
This log was last generated on Wed,
|
3
|
+
This log was last generated on Wed, 22 Feb 2023 23:04:47 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.5.0)
|
8
|
+
|
9
|
+
Wed, 22 Feb 2023 23:04:47 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.4.3..@fluentui/react-positioning_v9.5.0)
|
11
|
+
|
12
|
+
### Minor changes
|
13
|
+
|
14
|
+
- feat: Set overflow on positioned element when `autosize` is applied ([PR #26868](https://github.com/microsoft/fluentui/pull/26868) by lingfangao@hotmail.com)
|
15
|
+
|
7
16
|
## [9.4.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.4.3)
|
8
17
|
|
9
|
-
Wed, 15 Feb 2023 11:
|
18
|
+
Wed, 15 Feb 2023 11:44:52 GMT
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.4.2..@fluentui/react-positioning_v9.4.3)
|
11
20
|
|
12
21
|
### Patches
|
@@ -21,13 +21,15 @@ export function maxSize(autoSize, options) {
|
|
21
21
|
if (applyMaxHeight) {
|
22
22
|
Object.assign(elements.floating.style, {
|
23
23
|
maxHeight: `${availableHeight}px`,
|
24
|
-
boxSizing: 'border-box'
|
24
|
+
boxSizing: 'border-box',
|
25
|
+
overflowY: 'auto'
|
25
26
|
});
|
26
27
|
}
|
27
28
|
if (applyMaxWidth) {
|
28
29
|
Object.assign(elements.floating.style, {
|
29
30
|
maxWidth: `${availableWidth}px`,
|
30
|
-
boxSizing: 'border-box'
|
31
|
+
boxSizing: 'border-box',
|
32
|
+
overflowX: 'auto'
|
31
33
|
});
|
32
34
|
}
|
33
35
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,SAASA,IAAI,QAAQ,kBAAkB;AAGvC,SAASC,WAAW,QAAQ,sBAAsB;AAKlD,OAAM,SAAUC,OAAO,CAACC,QAAwC,EAAEC,OAAiC;EACjG,MAAM;IAAEC,SAAS;IAAEC;EAAgB,CAAE,GAAGF,OAAO;EAC/C,OAAOJ,IAAI,CAAC;IACV,IAAIM,gBAAgB,IAAI;MAAEC,WAAW,EAAE,IAAI;MAAEC,QAAQ,E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IACrBA,QAAQ,KAAK,eAAe,IAC3BU,KAAK,CAACE,QAAQ,CAACG,MAAM,GAAGR,eAAe,KAAKP,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAK,QAAQ,CAAE;MAE3F,IAAIc,cAAc,EAAE;QAClBE,MAAM,CAACC,MAAM,CAAoDR,QAAQ,CAACG,QAAQ,CAACM,KAAK,EAAE;UACxFC,SAAS,EAAE,GAAGZ,eAAe,IAAI;UACjCa,SAAS,EAAE,YAAY;UACvBC,SAAS,EAAE;SACZ,CAAC;;MAGJ,IAAIV,aAAa,EAAE;QACjBK,MAAM,CAACC,MAAM,CAAoDR,QAAQ,CAACG,QAAQ,CAACM,KAAK,EAAE;UACxFI,QAAQ,EAAE,GAAGd,cAAc,IAAI;UAC/BY,SAAS,EAAE,YAAY;UACvBG,SAAS,EAAE;SACZ,CAAC;;IAEN;GACD,CAAC;AACJ","names":["size","getBoundary","maxSize","autoSize","options","container","overflowBoundary","altBoundary","boundary","apply","availableHeight","availableWidth","elements","rects","applyMaxWidth","floating","width","applyMaxHeight","height","Object","assign","style","maxHeight","boxSizing","overflowY","maxWidth","overflowX"],"sourceRoot":"../src/","sources":["packages/react-components/react-positioning/src/middleware/maxSize.ts"],"sourcesContent":["import { size } from '@floating-ui/dom';\nimport type { Middleware } from '@floating-ui/dom';\nimport type { PositioningOptions } from '../types';\nimport { getBoundary } from '../utils/getBoundary';\nexport interface MaxSizeMiddlewareOptions extends Pick<PositioningOptions, 'overflowBoundary'> {\n container: HTMLElement | null;\n}\n\nexport function maxSize(autoSize: PositioningOptions['autoSize'], options: MaxSizeMiddlewareOptions): Middleware {\n const { container, overflowBoundary } = options;\n return size({\n ...(overflowBoundary && { altBoundary: true, boundary: getBoundary(container, overflowBoundary) }),\n apply({ availableHeight, availableWidth, elements, rects }) {\n const applyMaxWidth =\n autoSize === 'always' ||\n autoSize === 'width-always' ||\n (rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width'));\n\n const applyMaxHeight =\n autoSize === 'always' ||\n autoSize === 'height-always' ||\n (rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height'));\n\n if (applyMaxHeight) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto',\n });\n }\n\n if (applyMaxWidth) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto',\n });\n }\n },\n });\n}\n"]}
|
@@ -16,12 +16,14 @@ define(["require", "exports", "tslib", "@floating-ui/dom", "../utils/getBoundary
|
|
16
16
|
Object.assign(elements.floating.style, {
|
17
17
|
maxHeight: availableHeight + "px",
|
18
18
|
boxSizing: 'border-box',
|
19
|
+
overflowY: 'auto',
|
19
20
|
});
|
20
21
|
}
|
21
22
|
if (applyMaxWidth) {
|
22
23
|
Object.assign(elements.floating.style, {
|
23
24
|
maxWidth: availableWidth + "px",
|
24
25
|
boxSizing: 'border-box',
|
26
|
+
overflowX: 'auto',
|
25
27
|
});
|
26
28
|
}
|
27
29
|
} }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"maxSize.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/middleware/maxSize.ts"],"names":[],"mappings":";;;;IAQA,SAAgB,OAAO,CAAC,QAAwC,EAAE,OAAiC;QACzF,IAAA,SAAS,GAAuB,OAAO,UAA9B,EAAE,gBAAgB,GAAK,OAAO,iBAAZ,CAAa;QAChD,OAAO,UAAI,uCACN,CAAC,gBAAgB,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,yBAAW,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAClG,KAAK,
|
1
|
+
{"version":3,"file":"maxSize.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/middleware/maxSize.ts"],"names":[],"m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CAAC;IAhCD,0BAgCC","sourcesContent":["import { size } from '@floating-ui/dom';\nimport type { Middleware } from '@floating-ui/dom';\nimport type { PositioningOptions } from '../types';\nimport { getBoundary } from '../utils/getBoundary';\nexport interface MaxSizeMiddlewareOptions extends Pick<PositioningOptions, 'overflowBoundary'> {\n container: HTMLElement | null;\n}\n\nexport function maxSize(autoSize: PositioningOptions['autoSize'], options: MaxSizeMiddlewareOptions): Middleware {\n const { container, overflowBoundary } = options;\n return size({\n ...(overflowBoundary && { altBoundary: true, boundary: getBoundary(container, overflowBoundary) }),\n apply({ availableHeight, availableWidth, elements, rects }) {\n const applyMaxWidth =\n autoSize === 'always' ||\n autoSize === 'width-always' ||\n (rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width'));\n\n const applyMaxHeight =\n autoSize === 'always' ||\n autoSize === 'height-always' ||\n (rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height'));\n\n if (applyMaxHeight) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto',\n });\n }\n\n if (applyMaxWidth) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto',\n });\n }\n },\n });\n}\n"]}
|
@@ -27,13 +27,15 @@ function maxSize(autoSize, options) {
|
|
27
27
|
if (applyMaxHeight) {
|
28
28
|
Object.assign(elements.floating.style, {
|
29
29
|
maxHeight: `${availableHeight}px`,
|
30
|
-
boxSizing: 'border-box'
|
30
|
+
boxSizing: 'border-box',
|
31
|
+
overflowY: 'auto'
|
31
32
|
});
|
32
33
|
}
|
33
34
|
if (applyMaxWidth) {
|
34
35
|
Object.assign(elements.floating.style, {
|
35
36
|
maxWidth: `${availableWidth}px`,
|
36
|
-
boxSizing: 'border-box'
|
37
|
+
boxSizing: 'border-box',
|
38
|
+
overflowX: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MAAEC;IAAK,CAAE;MACxD,MAAMC,aAAa,GACjBb,QAAQ,KAAK,QAAQ,IACrBA,QAAQ,KAAK,cAAc,IAC1BY,KAAK,CAACE,QAAQ,CAACC,KAAK,GAAGL,cAAc,KAAKV,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAK,OAAO,CAAE;MAExF,MAAMgB,cAAc,GAClBhB,QAAQ,KAAK,QAAQ,IACrBA,QAAQ,KAAK,eAAe,IAC3BY,KAAK,CAACE,QAAQ,CAACG,MAAM,GAAGR,eAAe,KAAKT,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAK,QAAQ,CAAE;MAE3F,IAAIgB,cAAc,EAAE;QAClBE,MAAM,CAACC,MAAM,CAAoDR,QAAQ,CAACG,QAAQ,CAACM,KAAK,EAAE;UACxFC,SAAS,EAAE,GAAGZ,eAAe,IAAI;UACjCa,SAAS,EAAE,YAAY;UACvBC,SAAS,EAAE;SACZ,CAAC;;MAGJ,IAAIV,aAAa,EAAE;QACjBK,MAAM,CAACC,MAAM,CAAoDR,QAAQ,CAACG,QAAQ,CAACM,KAAK,EAAE;UACxFI,QAAQ,EAAE,GAAGd,cAAc,IAAI;UAC/BY,SAAS,EAAE,YAAY;UACvBG,SAAS,EAAE;SACZ,CAAC;;IAEN;GACD,CAAC;AACJ;AAhCAC","names":["maxSize","autoSize","options","container","overflowBoundary","dom_1","altBoundary","boundary","getBoundary_1","apply","availableHeight","availableWidth","elements","rects","applyMaxWidth","floating","width","applyMaxHeight","height","Object","assign","style","maxHeight","boxSizing","overflowY","maxWidth","overflowX","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-positioning/src/middleware/maxSize.ts"],"sourcesContent":["import { size } from '@floating-ui/dom';\nimport type { Middleware } from '@floating-ui/dom';\nimport type { PositioningOptions } from '../types';\nimport { getBoundary } from '../utils/getBoundary';\nexport interface MaxSizeMiddlewareOptions extends Pick<PositioningOptions, 'overflowBoundary'> {\n container: HTMLElement | null;\n}\n\nexport function maxSize(autoSize: PositioningOptions['autoSize'], options: MaxSizeMiddlewareOptions): Middleware {\n const { container, overflowBoundary } = options;\n return size({\n ...(overflowBoundary && { altBoundary: true, boundary: getBoundary(container, overflowBoundary) }),\n apply({ availableHeight, availableWidth, elements, rects }) {\n const applyMaxWidth =\n autoSize === 'always' ||\n autoSize === 'width-always' ||\n (rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width'));\n\n const applyMaxHeight =\n autoSize === 'always' ||\n autoSize === 'height-always' ||\n (rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height'));\n\n if (applyMaxHeight) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto',\n });\n }\n\n if (applyMaxWidth) {\n Object.assign<CSSStyleDeclaration, Partial<CSSStyleDeclaration>>(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto',\n });\n }\n },\n });\n}\n"]}
|