@fluentui/react-portal-compat 9.2.15 → 9.2.17
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 +26 -2
- package/lib/PortalCompatProvider.js +1 -0
- package/lib/PortalCompatProvider.js.map +1 -1
- package/lib-amd/PortalCompatProvider.js +1 -0
- package/lib-amd/PortalCompatProvider.js.map +1 -1
- package/lib-commonjs/PortalCompatProvider.js +1 -0
- package/lib-commonjs/PortalCompatProvider.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-portal-compat
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 02 Oct 2025 15:07:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.2.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.2.17)
|
|
8
|
+
|
|
9
|
+
Thu, 02 Oct 2025 15:07:19 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.2.16..@fluentui/react-portal-compat_v9.2.17)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- feat: enforce usage of use client directive for files with client-only features ([PR #35173](https://github.com/microsoft/fluentui/pull/35173) by dmytrokirpa@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-portal-compat-context to v9.0.15 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
|
16
|
+
- Bump @fluentui/react-tabster to v9.26.6 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
|
17
|
+
- Bump @fluentui/react-components to v9.71.0 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.2.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.2.16)
|
|
20
|
+
|
|
21
|
+
Mon, 08 Sep 2025 12:51:15 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.2.15..@fluentui/react-portal-compat_v9.2.16)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- chore: extend peer dependencies versions to support React 19 ([PR #35145](https://github.com/microsoft/fluentui/pull/35145) by dmytrokirpa@microsoft.com)
|
|
27
|
+
- Bump @fluentui/react-portal-compat-context to v9.0.14 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
|
28
|
+
- Bump @fluentui/react-tabster to v9.26.5 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
|
29
|
+
- Bump @fluentui/react-components to v9.70.0 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
|
30
|
+
|
|
7
31
|
## [9.2.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.2.15)
|
|
8
32
|
|
|
9
|
-
Thu, 21 Aug 2025 17:40:
|
|
33
|
+
Thu, 21 Aug 2025 17:40:37 GMT
|
|
10
34
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.2.14..@fluentui/react-portal-compat_v9.2.15)
|
|
11
35
|
|
|
12
36
|
### Patches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { fluentProviderClassNames, useThemeClassName } from '@fluentui/react-components';\nimport { PortalCompatContextProvider } from '@fluentui/react-portal-compat-context';\nimport { applyFocusVisiblePolyfill } from '@fluentui/react-tabster';\n\nimport type { RegisterPortalFn } from '@fluentui/react-portal-compat-context';\n\nconst CLASS_NAME_REGEX = new RegExp(`([^\\\\s]*${fluentProviderClassNames.root}\\\\w+)`, 'g');\n\nexport function useProviderThemeClasses(): string[] {\n 'use no memo';\n\n const themeClassName = useThemeClassName();\n const cssVariablesClasses = React.useMemo<string[]>(\n // \"themeClassName\" may contain multiple classes while we want to add only classes that host CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => themeClassName.match(CLASS_NAME_REGEX) ?? [],\n [themeClassName],\n );\n\n if (process.env.NODE_ENV !== 'production') {\n // This if statement technically breaks the rules of hooks, but ENV variables never change during app lifecycle\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (themeClassName === '') {\n // eslint-disable-next-line no-console\n console.warn(`\n PortalCompatProvider: \"useThemeClassName()\" hook returned an empty string\n =============================================\n Make sure that PortalCompatProvider is rendered inside FluentProvider as a child.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n return cssVariablesClasses;\n}\n\nexport const PortalCompatProvider: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n const cssVariablesClasses = useProviderThemeClasses();\n\n const registerPortalEl = React.useCallback<RegisterPortalFn>(\n element => {\n let disposeFocusVisiblePolyfill: () => void = () => undefined;\n\n element.classList.add(...cssVariablesClasses);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n\n return () => {\n element.classList.remove(...cssVariablesClasses);\n disposeFocusVisiblePolyfill();\n };\n },\n [cssVariablesClasses],\n );\n\n return <PortalCompatContextProvider value={registerPortalEl}>{children}</PortalCompatContextProvider>;\n};\n"],"names":["React","fluentProviderClassNames","useThemeClassName","PortalCompatContextProvider","applyFocusVisiblePolyfill","CLASS_NAME_REGEX","RegExp","root","useProviderThemeClasses","themeClassName","cssVariablesClasses","useMemo","match","process","env","NODE_ENV","useEffect","console","warn","PortalCompatProvider","props","children","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","remove","value"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,iBAAiB,QAAQ,6BAA6B;AACzF,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,yBAAyB,QAAQ,0BAA0B;AAIpE,MAAMC,mBAAmB,IAAIC,OAAO,CAAC,QAAQ,EAAEL,yBAAyBM,IAAI,CAAC,KAAK,CAAC,EAAE;AAErF,OAAO,SAASC;IACd;IAEA,MAAMC,iBAAiBP;IACvB,MAAMQ,sBAAsBV,MAAMW,OAAO,CACvC,0GAA0G;IAC1G,8GAA8G;IAC9G;YAAMF;eAAAA,CAAAA,wBAAAA,eAAeG,KAAK,CAACP,+BAArBI,mCAAAA,wBAA0C,EAAE;OAClD;QAACA;KAAe;IAGlB,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,+GAA+G;QAC/G,sDAAsD;QACtDf,MAAMgB,SAAS,CAAC;YACd,IAAIP,mBAAmB,IAAI;gBACzB,sCAAsC;gBACtCQ,QAAQC,IAAI,CAAC,CAAC;;;;MAIhB,CAAC;YACD;QACA,uDAAuD;QACzD,GAAG,EAAE;IACP;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMS,uBAAiEC,CAAAA;IAC5E,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAMV,sBAAsBF;IAE5B,MAAMc,mBAAmBtB,MAAMuB,WAAW,CACxCC,CAAAA;QACE,IAAIC,8BAA0C,IAAMC;QAEpDF,QAAQG,SAAS,CAACC,GAAG,IAAIlB;QACzB,IAAIc,QAAQK,aAAa,CAACC,WAAW,EAAE;YACrCL,8BAA8BrB,0BAA0BoB,SAASA,QAAQK,aAAa,CAACC,WAAW;QACpG;QAEA,OAAO;YACLN,QAAQG,SAAS,CAACI,MAAM,IAAIrB;YAC5Be;QACF;IACF,GACA;QAACf;KAAoB;IAGvB,qBAAO,oBAACP;QAA4B6B,OAAOV;OAAmBD;AAChE,EAAE"}
|
|
@@ -7,6 +7,7 @@ define([
|
|
|
7
7
|
"@fluentui/react-portal-compat-context",
|
|
8
8
|
"@fluentui/react-tabster"
|
|
9
9
|
], function(require, exports, _interop_require_wildcard, _react, _reactcomponents, _reactportalcompatcontext, _reacttabster) {
|
|
10
|
+
'use client';
|
|
10
11
|
"use strict";
|
|
11
12
|
Object.defineProperty(exports, "__esModule", {
|
|
12
13
|
value: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { fluentProviderClassNames, useThemeClassName } from '@fluentui/react-components';\nimport { PortalCompatContextProvider } from '@fluentui/react-portal-compat-context';\nimport { applyFocusVisiblePolyfill } from '@fluentui/react-tabster';\n\nimport type { RegisterPortalFn } from '@fluentui/react-portal-compat-context';\n\nconst CLASS_NAME_REGEX = new RegExp(`([^\\\\s]*${fluentProviderClassNames.root}\\\\w+)`, 'g');\n\nexport function useProviderThemeClasses(): string[] {\n 'use no memo';\n\n const themeClassName = useThemeClassName();\n const cssVariablesClasses = React.useMemo<string[]>(\n // \"themeClassName\" may contain multiple classes while we want to add only classes that host CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => themeClassName.match(CLASS_NAME_REGEX) ?? [],\n [themeClassName],\n );\n\n if (process.env.NODE_ENV !== 'production') {\n // This if statement technically breaks the rules of hooks, but ENV variables never change during app lifecycle\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (themeClassName === '') {\n // eslint-disable-next-line no-console\n console.warn(`\n PortalCompatProvider: \"useThemeClassName()\" hook returned an empty string\n =============================================\n Make sure that PortalCompatProvider is rendered inside FluentProvider as a child.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n return cssVariablesClasses;\n}\n\nexport const PortalCompatProvider: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n const cssVariablesClasses = useProviderThemeClasses();\n\n const registerPortalEl = React.useCallback<RegisterPortalFn>(\n element => {\n let disposeFocusVisiblePolyfill: () => void = () => undefined;\n\n element.classList.add(...cssVariablesClasses);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n\n return () => {\n element.classList.remove(...cssVariablesClasses);\n disposeFocusVisiblePolyfill();\n };\n },\n [cssVariablesClasses],\n );\n\n return <PortalCompatContextProvider value={registerPortalEl}>{children}</PortalCompatContextProvider>;\n};\n"],"names":["PortalCompatProvider","useProviderThemeClasses","CLASS_NAME_REGEX","RegExp","fluentProviderClassNames","root","themeClassName","useThemeClassName","cssVariablesClasses","React","useMemo","match","process","env","NODE_ENV","useEffect","console","warn","props","children","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","applyFocusVisiblePolyfill","remove","PortalCompatContextProvider","value"],"mappings":";;;;IAEuB;IACqC;IAChB;IACF;;IAL1C;;;;;;;;;;;;QAyCaA,oBAAoB;mBAApBA;;QA9BGC,uBAAuB;mBAAvBA;;;;IAFhB,MAAMC,mBAAmB,IAAIC,OAAO,CAAC,QAAQ,EAAEC,yCAAwB,CAACC,IAAI,CAAC,KAAK,CAAC,EAAE;IAE9E,SAASJ;QACd;QAEA,MAAMK,iBAAiBC,IAAAA,kCAAiB;QACxC,MAAMC,sBAAsBC,OAAMC,OAAO,CACvC,0GAA0G;QAC1G,8GAA8G;QAC9G;gBAAMJ;mBAAAA,CAAAA,wBAAAA,eAAeK,KAAK,CAACT,+BAArBI,mCAAAA,wBAA0C,EAAE;WAClD;YAACA;SAAe;QAGlB,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,+GAA+G;YAC/G,sDAAsD;YACtDL,OAAMM,SAAS,CAAC;gBACd,IAAIT,mBAAmB,IAAI;oBACzB,sCAAsC;oBACtCU,QAAQC,IAAI,CAAC,CAAC;;;;MAIhB,CAAC;gBACD;YACA,uDAAuD;YACzD,GAAG,EAAE;QACP;QAEA,OAAOT;IACT;IAEO,MAAMR,uBAAiEkB,CAAAA;QAC5E,MAAM,EAAEC,QAAQ,EAAE,GAAGD;QACrB,MAAMV,sBAAsBP;QAE5B,MAAMmB,mBAAmBX,OAAMY,WAAW,CACxCC,CAAAA;YACE,IAAIC,8BAA0C,IAAMC;YAEpDF,QAAQG,SAAS,CAACC,GAAG,IAAIlB;YACzB,IAAIc,QAAQK,aAAa,CAACC,WAAW,EAAE;gBACrCL,8BAA8BM,IAAAA,uCAAyB,EAACP,SAASA,QAAQK,aAAa,CAACC,WAAW;YACpG;YAEA,OAAO;gBACLN,QAAQG,SAAS,CAACK,MAAM,IAAItB;gBAC5Be;YACF;QACF,GACA;YAACf;SAAoB;QAGvB,qBAAO,qBAACuB,qDAA2B;YAACC,OAAOZ;WAAmBD;IAChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { fluentProviderClassNames, useThemeClassName } from '@fluentui/react-components';\nimport { PortalCompatContextProvider } from '@fluentui/react-portal-compat-context';\nimport { applyFocusVisiblePolyfill } from '@fluentui/react-tabster';\n\nimport type { RegisterPortalFn } from '@fluentui/react-portal-compat-context';\n\nconst CLASS_NAME_REGEX = new RegExp(`([^\\\\s]*${fluentProviderClassNames.root}\\\\w+)`, 'g');\n\nexport function useProviderThemeClasses(): string[] {\n 'use no memo';\n\n const themeClassName = useThemeClassName();\n const cssVariablesClasses = React.useMemo<string[]>(\n // \"themeClassName\" may contain multiple classes while we want to add only classes that host CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => themeClassName.match(CLASS_NAME_REGEX) ?? [],\n [themeClassName],\n );\n\n if (process.env.NODE_ENV !== 'production') {\n // This if statement technically breaks the rules of hooks, but ENV variables never change during app lifecycle\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (themeClassName === '') {\n // eslint-disable-next-line no-console\n console.warn(`\n PortalCompatProvider: \"useThemeClassName()\" hook returned an empty string\n =============================================\n Make sure that PortalCompatProvider is rendered inside FluentProvider as a child.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n return cssVariablesClasses;\n}\n\nexport const PortalCompatProvider: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n const cssVariablesClasses = useProviderThemeClasses();\n\n const registerPortalEl = React.useCallback<RegisterPortalFn>(\n element => {\n let disposeFocusVisiblePolyfill: () => void = () => undefined;\n\n element.classList.add(...cssVariablesClasses);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n\n return () => {\n element.classList.remove(...cssVariablesClasses);\n disposeFocusVisiblePolyfill();\n };\n },\n [cssVariablesClasses],\n );\n\n return <PortalCompatContextProvider value={registerPortalEl}>{children}</PortalCompatContextProvider>;\n};\n"],"names":["PortalCompatProvider","useProviderThemeClasses","CLASS_NAME_REGEX","RegExp","fluentProviderClassNames","root","themeClassName","useThemeClassName","cssVariablesClasses","React","useMemo","match","process","env","NODE_ENV","useEffect","console","warn","props","children","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","applyFocusVisiblePolyfill","remove","PortalCompatContextProvider","value"],"mappings":"AAAA;;;;;;;;;;;;IAyCaA,oBAAoB;eAApBA;;IA9BGC,uBAAuB;eAAvBA;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
+
"version": "9.2.17",
|
|
4
4
|
"description": "A package that contains compatibility layer for React Portals",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"@fluentui/scripts-cypress": "*"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluentui/react-portal-compat-context": "^9.0.
|
|
26
|
-
"@fluentui/react-tabster": "^9.26.
|
|
25
|
+
"@fluentui/react-portal-compat-context": "^9.0.15",
|
|
26
|
+
"@fluentui/react-tabster": "^9.26.6",
|
|
27
27
|
"@swc/helpers": "^0.5.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@fluentui/react-components": "^9.
|
|
31
|
-
"@types/react": ">=16.14.0 <
|
|
32
|
-
"react": ">=16.14.0 <
|
|
30
|
+
"@fluentui/react-components": "^9.71.0",
|
|
31
|
+
"@types/react": ">=16.14.0 <20.0.0",
|
|
32
|
+
"react": ">=16.14.0 <20.0.0"
|
|
33
33
|
},
|
|
34
34
|
"beachball": {
|
|
35
35
|
"disallowedChangeTypes": [
|