@fluentui/react-positioning 9.10.2 → 9.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,23 @@
|
|
1
1
|
# Change Log - @fluentui/react-positioning
|
2
2
|
|
3
|
-
This log was last generated on Thu,
|
3
|
+
This log was last generated on Thu, 14 Dec 2023 09:51:35 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.10.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.10.3)
|
8
|
+
|
9
|
+
Thu, 14 Dec 2023 09:51:35 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.10.2..@fluentui/react-positioning_v9.10.3)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: Allows matchTargetSize middleware to be overidden with inline style ([PR #30028](https://github.com/microsoft/fluentui/pull/30028) by lingfan.gao@microsoft.com)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.13.1 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
|
16
|
+
- Bump @fluentui/react-utilities to v9.15.3 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
|
17
|
+
|
7
18
|
## [9.10.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.10.2)
|
8
19
|
|
9
|
-
Thu, 30 Nov 2023 13:
|
20
|
+
Thu, 30 Nov 2023 13:42:07 GMT
|
10
21
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.10.1..@fluentui/react-positioning_v9.10.2)
|
11
22
|
|
12
23
|
### Patches
|
@@ -1,3 +1,4 @@
|
|
1
|
+
export const matchTargetSizeCssVar = '--fui-match-target-size';
|
1
2
|
export function matchTargetSize() {
|
2
3
|
return {
|
3
4
|
name: 'matchTargetSize',
|
@@ -7,8 +8,10 @@ export function matchTargetSize() {
|
|
7
8
|
return {};
|
8
9
|
}
|
9
10
|
const { width } = referenceRect;
|
10
|
-
floatingElement.style.
|
11
|
-
floatingElement.style.
|
11
|
+
floatingElement.style.setProperty(matchTargetSizeCssVar, `${width}px`);
|
12
|
+
if (!floatingElement.style.width) {
|
13
|
+
floatingElement.style.width = `var(${matchTargetSizeCssVar})`;
|
14
|
+
}
|
12
15
|
return {
|
13
16
|
data: {
|
14
17
|
matchTargetSizeAttempt: true
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["matchTargetSize.ts"],"sourcesContent":["import type { Middleware } from '@floating-ui/dom';\n\nexport function matchTargetSize(): Middleware {\n return {\n name: 'matchTargetSize',\n fn: async middlewareArguments => {\n const {\n rects: { reference: referenceRect, floating: floatingRect },\n elements: { floating: floatingElement },\n middlewareData: { matchTargetSize: { matchTargetSizeAttempt = false } = {} },\n } = middlewareArguments;\n\n if (referenceRect.width === floatingRect.width || matchTargetSizeAttempt) {\n return {};\n }\n\n const { width } = referenceRect;\n floatingElement.style.
|
1
|
+
{"version":3,"sources":["matchTargetSize.ts"],"sourcesContent":["import type { Middleware } from '@floating-ui/dom';\n\nexport const matchTargetSizeCssVar = '--fui-match-target-size';\n\nexport function matchTargetSize(): Middleware {\n return {\n name: 'matchTargetSize',\n fn: async middlewareArguments => {\n const {\n rects: { reference: referenceRect, floating: floatingRect },\n elements: { floating: floatingElement },\n middlewareData: { matchTargetSize: { matchTargetSizeAttempt = false } = {} },\n } = middlewareArguments;\n\n if (referenceRect.width === floatingRect.width || matchTargetSizeAttempt) {\n return {};\n }\n\n const { width } = referenceRect;\n floatingElement.style.setProperty(matchTargetSizeCssVar, `${width}px`);\n if (!floatingElement.style.width) {\n floatingElement.style.width = `var(${matchTargetSizeCssVar})`;\n }\n\n return {\n data: { matchTargetSizeAttempt: true },\n reset: {\n rects: true,\n },\n };\n },\n };\n}\n"],"names":["matchTargetSizeCssVar","matchTargetSize","name","fn","middlewareArguments","rects","reference","referenceRect","floating","floatingRect","elements","floatingElement","middlewareData","matchTargetSizeAttempt","width","style","setProperty","data","reset"],"mappings":"AAEA,OAAO,MAAMA,wBAAwB,0BAA0B;AAE/D,OAAO,SAASC;IACd,OAAO;QACLC,MAAM;QACNC,IAAI,OAAMC;YACR,MAAM,EACJC,OAAO,EAAEC,WAAWC,aAAa,EAAEC,UAAUC,YAAY,EAAE,EAC3DC,UAAU,EAAEF,UAAUG,eAAe,EAAE,EACvCC,gBAAgB,EAAEX,iBAAiB,EAAEY,yBAAyB,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,EAC7E,GAAGT;YAEJ,IAAIG,cAAcO,KAAK,KAAKL,aAAaK,KAAK,IAAID,wBAAwB;gBACxE,OAAO,CAAC;YACV;YAEA,MAAM,EAAEC,KAAK,EAAE,GAAGP;YAClBI,gBAAgBI,KAAK,CAACC,WAAW,CAAChB,uBAAuB,CAAC,EAAEc,MAAM,EAAE,CAAC;YACrE,IAAI,CAACH,gBAAgBI,KAAK,CAACD,KAAK,EAAE;gBAChCH,gBAAgBI,KAAK,CAACD,KAAK,GAAG,CAAC,IAAI,EAAEd,sBAAsB,CAAC,CAAC;YAC/D;YAEA,OAAO;gBACLiB,MAAM;oBAAEJ,wBAAwB;gBAAK;gBACrCK,OAAO;oBACLb,OAAO;gBACT;YACF;QACF;IACF;AACF"}
|
@@ -2,12 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
matchTargetSizeCssVar: function() {
|
13
|
+
return matchTargetSizeCssVar;
|
14
|
+
},
|
15
|
+
matchTargetSize: function() {
|
8
16
|
return matchTargetSize;
|
9
17
|
}
|
10
18
|
});
|
19
|
+
const matchTargetSizeCssVar = '--fui-match-target-size';
|
11
20
|
function matchTargetSize() {
|
12
21
|
return {
|
13
22
|
name: 'matchTargetSize',
|
@@ -17,8 +26,10 @@ function matchTargetSize() {
|
|
17
26
|
return {};
|
18
27
|
}
|
19
28
|
const { width } = referenceRect;
|
20
|
-
floatingElement.style.
|
21
|
-
floatingElement.style.
|
29
|
+
floatingElement.style.setProperty(matchTargetSizeCssVar, `${width}px`);
|
30
|
+
if (!floatingElement.style.width) {
|
31
|
+
floatingElement.style.width = `var(${matchTargetSizeCssVar})`;
|
32
|
+
}
|
22
33
|
return {
|
23
34
|
data: {
|
24
35
|
matchTargetSizeAttempt: true
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["matchTargetSize.js"],"sourcesContent":["export function matchTargetSize() {\n return {\n name: 'matchTargetSize',\n fn: async (middlewareArguments)=>{\n const { rects: { reference: referenceRect, floating: floatingRect }, elements: { floating: floatingElement }, middlewareData: { matchTargetSize: { matchTargetSizeAttempt = false } = {} } } = middlewareArguments;\n if (referenceRect.width === floatingRect.width || matchTargetSizeAttempt) {\n return {};\n }\n const { width } = referenceRect;\n floatingElement.style.
|
1
|
+
{"version":3,"sources":["matchTargetSize.js"],"sourcesContent":["export const matchTargetSizeCssVar = '--fui-match-target-size';\nexport function matchTargetSize() {\n return {\n name: 'matchTargetSize',\n fn: async (middlewareArguments)=>{\n const { rects: { reference: referenceRect, floating: floatingRect }, elements: { floating: floatingElement }, middlewareData: { matchTargetSize: { matchTargetSizeAttempt = false } = {} } } = middlewareArguments;\n if (referenceRect.width === floatingRect.width || matchTargetSizeAttempt) {\n return {};\n }\n const { width } = referenceRect;\n floatingElement.style.setProperty(matchTargetSizeCssVar, `${width}px`);\n if (!floatingElement.style.width) {\n floatingElement.style.width = `var(${matchTargetSizeCssVar})`;\n }\n return {\n data: {\n matchTargetSizeAttempt: true\n },\n reset: {\n rects: true\n }\n };\n }\n };\n}\n"],"names":["matchTargetSizeCssVar","matchTargetSize","name","fn","middlewareArguments","rects","reference","referenceRect","floating","floatingRect","elements","floatingElement","middlewareData","matchTargetSizeAttempt","width","style","setProperty","data","reset"],"mappings":";;;;;;;;;;;IAAaA,qBAAqB;eAArBA;;IACGC,eAAe;eAAfA;;;AADT,MAAMD,wBAAwB;AAC9B,SAASC;IACZ,OAAO;QACHC,MAAM;QACNC,IAAI,OAAOC;YACP,MAAM,EAAEC,OAAO,EAAEC,WAAWC,aAAa,EAAEC,UAAUC,YAAY,EAAE,EAAEC,UAAU,EAAEF,UAAUG,eAAe,EAAE,EAAEC,gBAAgB,EAAEX,iBAAiB,EAAEY,yBAAyB,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,GAAGT;YAC/L,IAAIG,cAAcO,KAAK,KAAKL,aAAaK,KAAK,IAAID,wBAAwB;gBACtE,OAAO,CAAC;YACZ;YACA,MAAM,EAAEC,KAAK,EAAE,GAAGP;YAClBI,gBAAgBI,KAAK,CAACC,WAAW,CAAChB,uBAAuB,CAAC,EAAEc,MAAM,EAAE,CAAC;YACrE,IAAI,CAACH,gBAAgBI,KAAK,CAACD,KAAK,EAAE;gBAC9BH,gBAAgBI,KAAK,CAACD,KAAK,GAAG,CAAC,IAAI,EAAEd,sBAAsB,CAAC,CAAC;YACjE;YACA,OAAO;gBACHiB,MAAM;oBACFJ,wBAAwB;gBAC5B;gBACAK,OAAO;oBACHb,OAAO;gBACX;YACJ;QACJ;IACJ;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-positioning",
|
3
|
-
"version": "9.10.
|
3
|
+
"version": "9.10.3",
|
4
4
|
"description": "A react wrapper around Popper.js for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -30,9 +30,9 @@
|
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
32
|
"@floating-ui/dom": "^1.2.0",
|
33
|
-
"@fluentui/react-shared-contexts": "^9.13.
|
33
|
+
"@fluentui/react-shared-contexts": "^9.13.1",
|
34
34
|
"@fluentui/react-theme": "^9.1.16",
|
35
|
-
"@fluentui/react-utilities": "^9.15.
|
35
|
+
"@fluentui/react-utilities": "^9.15.3",
|
36
36
|
"@griffel/react": "^1.5.14",
|
37
37
|
"@swc/helpers": "^0.5.1",
|
38
38
|
"floating-ui-devtools": "0.1.2"
|