@fluentui/react-portal-compat 9.0.54 → 9.0.55
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.json +55 -2
- package/CHANGELOG.md +17 -3
- package/lib/PortalCompatProvider.js +1 -1
- package/lib/PortalCompatProvider.js.map +1 -1
- package/lib-amd/PortalCompatProvider.js +1 -1
- package/lib-amd/PortalCompatProvider.js.map +1 -1
- package/lib-commonjs/PortalCompatProvider.js +1 -1
- package/lib-commonjs/PortalCompatProvider.js.map +1 -1
- package/package.json +6 -6
- package/.swcrc +0 -30
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,60 @@
|
|
|
2
2
|
"name": "@fluentui/react-portal-compat",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 12 May 2023 20:22:03 GMT",
|
|
6
|
+
"tag": "@fluentui/react-portal-compat_v9.0.55",
|
|
7
|
+
"version": "9.0.55",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "olfedias@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-portal-compat",
|
|
13
|
+
"commit": "c28decb23d191a0daaaf6d5d1832429715102129",
|
|
14
|
+
"comment": "chore: exclude .swcrc from being published"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "hanj@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-portal-compat",
|
|
19
|
+
"commit": "51767fd6bcd9fedcfe6e4b4735fdf13a1f1174bb",
|
|
20
|
+
"comment": "fix: Class ID detection compatible with React 18"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-portal-compat",
|
|
25
|
+
"comment": "Bump @fluentui/react-portal-compat-context to v9.0.6",
|
|
26
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-portal-compat",
|
|
31
|
+
"comment": "Bump @fluentui/react-tabster to v9.7.0",
|
|
32
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-portal-compat",
|
|
37
|
+
"comment": "Bump @fluentui/react-components to v9.20.0",
|
|
38
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-portal-compat",
|
|
43
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
|
|
44
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"none": [
|
|
48
|
+
{
|
|
49
|
+
"author": "martinhochel@microsoft.com",
|
|
50
|
+
"package": "@fluentui/react-portal-compat",
|
|
51
|
+
"commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
|
|
52
|
+
"comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"date": "Mon, 24 Apr 2023 08:12:46 GMT",
|
|
6
59
|
"tag": "@fluentui/react-portal-compat_v9.0.54",
|
|
7
60
|
"version": "9.0.54",
|
|
8
61
|
"comments": {
|
|
@@ -11,7 +64,7 @@
|
|
|
11
64
|
"author": "beachball",
|
|
12
65
|
"package": "@fluentui/react-portal-compat",
|
|
13
66
|
"comment": "Bump @fluentui/react-components to v9.19.1",
|
|
14
|
-
"commit": "
|
|
67
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
|
15
68
|
}
|
|
16
69
|
]
|
|
17
70
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-portal-compat
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 12 May 2023 20:22:03 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.55](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.55)
|
|
8
|
+
|
|
9
|
+
Fri, 12 May 2023 20:22:03 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.54..@fluentui/react-portal-compat_v9.0.55)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
|
|
15
|
+
- fix: Class ID detection compatible with React 18 ([PR #27577](https://github.com/microsoft/fluentui/pull/27577) by hanj@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-portal-compat-context to v9.0.6 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.7.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
18
|
+
- Bump @fluentui/react-components to v9.20.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
20
|
+
|
|
7
21
|
## [9.0.54](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.54)
|
|
8
22
|
|
|
9
|
-
Mon, 24 Apr 2023 08:
|
|
23
|
+
Mon, 24 Apr 2023 08:12:46 GMT
|
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.53..@fluentui/react-portal-compat_v9.0.54)
|
|
11
25
|
|
|
12
26
|
### Patches
|
|
13
27
|
|
|
14
|
-
- Bump @fluentui/react-components to v9.19.1 ([
|
|
28
|
+
- Bump @fluentui/react-components to v9.19.1 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
|
15
29
|
|
|
16
30
|
## [9.0.53](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.53)
|
|
17
31
|
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { fluentProviderClassNames, useThemeClassName } from '@fluentui/react-components';
|
|
3
3
|
import { PortalCompatContextProvider } from '@fluentui/react-portal-compat-context';
|
|
4
4
|
import { applyFocusVisiblePolyfill } from '@fluentui/react-tabster';
|
|
5
|
-
const CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\
|
|
5
|
+
const CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\w+)`);
|
|
6
6
|
export const PortalCompatProvider = props => {
|
|
7
7
|
const {
|
|
8
8
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","fluentProviderClassNames","useThemeClassName","PortalCompatContextProvider","applyFocusVisiblePolyfill","CLASS_NAME_REGEX","RegExp","root","PortalCompatProvider","props","children","themeClassName","cssVariablesClassName","useMemo","_themeClassName_match","match","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","remove","process","env","NODE_ENV","useEffect","console","warn","createElement","value"],"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["import * 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(`(${fluentProviderClassNames.root}\\\\
|
|
1
|
+
{"version":3,"names":["React","fluentProviderClassNames","useThemeClassName","PortalCompatContextProvider","applyFocusVisiblePolyfill","CLASS_NAME_REGEX","RegExp","root","PortalCompatProvider","props","children","themeClassName","cssVariablesClassName","useMemo","_themeClassName_match","match","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","remove","process","env","NODE_ENV","useEffect","console","warn","createElement","value"],"sources":["../src/PortalCompatProvider.tsx"],"sourcesContent":["import * 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(`(${fluentProviderClassNames.root}\\\\w+)`);\n\nexport const PortalCompatProvider: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n\n const themeClassName = useThemeClassName();\n const cssVariablesClassName = React.useMemo<string | undefined>(\n // \"themeClassName\" may contain multiple classes while we want to add only a class that hosts CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => themeClassName.match(CLASS_NAME_REGEX)?.[1],\n [themeClassName],\n );\n\n const registerPortalEl = React.useCallback<RegisterPortalFn>(\n element => {\n let disposeFocusVisiblePolyfill: () => void = () => undefined;\n if (cssVariablesClassName) {\n element.classList.add(cssVariablesClassName);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n }\n\n return () => {\n if (cssVariablesClassName) {\n element.classList.remove(cssVariablesClassName);\n }\n disposeFocusVisiblePolyfill();\n };\n },\n [cssVariablesClassName],\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 <PortalCompatContextProvider value={registerPortalEl}>{children}</PortalCompatContextProvider>;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,wBAAwB,EAAEC,iBAAiB,QAAQ;AAC5D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,yBAAyB,QAAQ;AAI1C,MAAMC,gBAAA,gBAAmB,IAAIC,MAAA,CAAQ,IAAGL,wBAAA,CAAyBM,IAAK,OAAM;AAE5E,OAAO,MAAMC,oBAAA,GAAiEC,KAAA,IAAS;EACrF,MAAM;IAAEC;EAAQ,CAAE,GAAGD,KAAA;EAErB,MAAME,cAAA,GAAiBT,iBAAA;EACvB,MAAMU,qBAAA,GAAwBZ,KAAA,CAAMa,OAAO;EACzC;EACA;EACA;QAAMC,qBAAA;IAAA,QAAAA,qBAAA,GAAAH,cAAA,CAAeI,KAAK,CAACV,gBAAA,eAArBS,qBAAA,uBAAAA,qBAAwC,CAAC,EAAE;KACjD,CAACH,cAAA,CAAe;EAGlB,MAAMK,gBAAA,GAAmBhB,KAAA,CAAMiB,WAAW,CACxCC,OAAA,IAAW;IACT,IAAIC,2BAAA,GAA0CA,CAAA,KAAMC,SAAA;IACpD,IAAIR,qBAAA,EAAuB;MACzBM,OAAA,CAAQG,SAAS,CAACC,GAAG,CAACV,qBAAA;MACtB,IAAIM,OAAA,CAAQK,aAAa,CAACC,WAAW,EAAE;QACrCL,2BAAA,GAA8Bf,yBAAA,CAA0Bc,OAAA,EAASA,OAAA,CAAQK,aAAa,CAACC,WAAW;MACpG;IACF;IAEA,OAAO,MAAM;MACX,IAAIZ,qBAAA,EAAuB;QACzBM,OAAA,CAAQG,SAAS,CAACI,MAAM,CAACb,qBAAA;MAC3B;MACAO,2BAAA;IACF;EACF,GACA,CAACP,qBAAA,CAAsB;EAGzB,IAAIc,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC;IACA;IACA5B,KAAA,CAAM6B,SAAS,CAAC,MAAM;MACpB,IAAIlB,cAAA,KAAmB,IAAI;QACzB;QACAmB,OAAA,CAAQC,IAAI,CAAE;;;;OAIf;MACD;MACA;IACF,GAAG,EAAE;EACP;EAEA,oBAAO/B,KAAA,CAAAgC,aAAA,CAAC7B,2BAAA;IAA4B8B,KAAA,EAAOjB;KAAmBN,QAAA;AAChE"}
|
|
@@ -17,7 +17,7 @@ define([
|
|
|
17
17
|
});
|
|
18
18
|
_interopRequireWildcard = _interopRequireWildcard.default;
|
|
19
19
|
_react = /*#__PURE__*/ _interopRequireWildcard(_react);
|
|
20
|
-
const CLASS_NAME_REGEX = /*#__PURE__*/ new RegExp(`(${_reactComponents.fluentProviderClassNames.root}\\
|
|
20
|
+
const CLASS_NAME_REGEX = /*#__PURE__*/ new RegExp(`(${_reactComponents.fluentProviderClassNames.root}\\w+)`);
|
|
21
21
|
const PortalCompatProvider = (props)=>{
|
|
22
22
|
const { children } = props;
|
|
23
23
|
const themeClassName = (0, _reactComponents.useThemeClassName)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../lib/PortalCompatProvider.js"],"sourcesContent":["import * 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';\nconst CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\\\
|
|
1
|
+
{"version":3,"sources":["../lib/PortalCompatProvider.js"],"sourcesContent":["import * 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';\nconst CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\\\w+)`);\nexport const PortalCompatProvider = props => {\n const {\n children\n } = props;\n const themeClassName = useThemeClassName();\n const cssVariablesClassName = React.useMemo(\n // \"themeClassName\" may contain multiple classes while we want to add only a class that hosts CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => {\n var _themeClassName_match;\n return (_themeClassName_match = themeClassName.match(CLASS_NAME_REGEX)) === null || _themeClassName_match === void 0 ? void 0 : _themeClassName_match[1];\n }, [themeClassName]);\n const registerPortalEl = React.useCallback(element => {\n let disposeFocusVisiblePolyfill = () => undefined;\n if (cssVariablesClassName) {\n element.classList.add(cssVariablesClassName);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n }\n return () => {\n if (cssVariablesClassName) {\n element.classList.remove(cssVariablesClassName);\n }\n disposeFocusVisiblePolyfill();\n };\n }, [cssVariablesClassName]);\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 return /*#__PURE__*/React.createElement(PortalCompatContextProvider, {\n value: registerPortalEl\n }, children);\n};\n//# sourceMappingURL=PortalCompatProvider.js.map"],"names":["PortalCompatProvider","CLASS_NAME_REGEX","RegExp","fluentProviderClassNames","root","props","children","themeClassName","useThemeClassName","cssVariablesClassName","React","useMemo","_themeClassName_match","match","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","applyFocusVisiblePolyfill","remove","process","env","NODE_ENV","useEffect","console","warn","createElement","PortalCompatContextProvider","value"],"mappings":";;;;IAAuB;IACqC;IAChB;IACF;;;;;;mCAE7BA;;iBAAAA;;;;IADb,MAAMC,mBAAmB,WAAW,GAAE,IAAIC,OAAO,CAAC,CAAC,EAAEC,yCAAwB,CAACC,IAAI,CAAC,KAAK,CAAC;IAClF,MAAMJ,uBAAuBK,CAAAA,QAAS;QAC3C,MAAM,EACJC,SAAQ,EACT,GAAGD;QACJ,MAAME,iBAAiBC,IAAAA,kCAAiB;QACxC,MAAMC,wBAAwBC,OAAMC,OAAO,CAC3C,2GAA2G;QAC3G,8GAA8G;QAC9G,IAAM;YACJ,IAAIC;YACJ,OAAO,AAACA,CAAAA,wBAAwBL,eAAeM,KAAK,CAACZ,iBAAgB,MAAO,IAAI,IAAIW,0BAA0B,KAAK,IAAI,KAAK,IAAIA,qBAAqB,CAAC,EAAE;QAC1J,GAAG;YAACL;SAAe;QACnB,MAAMO,mBAAmBJ,OAAMK,WAAW,CAACC,CAAAA,UAAW;YACpD,IAAIC,8BAA8B,IAAMC;YACxC,IAAIT,uBAAuB;gBACzBO,QAAQG,SAAS,CAACC,GAAG,CAACX;gBACtB,IAAIO,QAAQK,aAAa,CAACC,WAAW,EAAE;oBACrCL,8BAA8BM,IAAAA,uCAAyB,EAACP,SAASA,QAAQK,aAAa,CAACC,WAAW;gBACpG,CAAC;YACH,CAAC;YACD,OAAO,IAAM;gBACX,IAAIb,uBAAuB;oBACzBO,QAAQG,SAAS,CAACK,MAAM,CAACf;gBAC3B,CAAC;gBACDQ;YACF;QACF,GAAG;YAACR;SAAsB;QAC1B,IAAIgB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,+GAA+G;YAC/G,sDAAsD;YACtDjB,OAAMkB,SAAS,CAAC,IAAM;gBACpB,IAAIrB,mBAAmB,IAAI;oBACzB,sCAAsC;oBACtCsB,QAAQC,IAAI,CAAC,CAAC;;;;MAIhB,CAAC;gBACD,CAAC;YACD,uDAAuD;YACzD,GAAG,EAAE;QACP,CAAC;QACD,OAAO,WAAW,GAAEpB,OAAMqB,aAAa,CAACC,qDAA2B,EAAE;YACnEC,OAAOnB;QACT,GAAGR;IACL,GACA,gDAAgD"}
|
|
@@ -11,7 +11,7 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
|
11
11
|
const _reactComponents = require("@fluentui/react-components");
|
|
12
12
|
const _reactPortalCompatContext = require("@fluentui/react-portal-compat-context");
|
|
13
13
|
const _reactTabster = require("@fluentui/react-tabster");
|
|
14
|
-
const CLASS_NAME_REGEX = /*#__PURE__*/ new RegExp(`(${_reactComponents.fluentProviderClassNames.root}\\
|
|
14
|
+
const CLASS_NAME_REGEX = /*#__PURE__*/ new RegExp(`(${_reactComponents.fluentProviderClassNames.root}\\w+)`);
|
|
15
15
|
const PortalCompatProvider = (props)=>{
|
|
16
16
|
const { children } = props;
|
|
17
17
|
const themeClassName = (0, _reactComponents.useThemeClassName)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../lib/PortalCompatProvider.js"],"sourcesContent":["import * 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';\nconst CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\\\
|
|
1
|
+
{"version":3,"sources":["../lib/PortalCompatProvider.js"],"sourcesContent":["import * 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';\nconst CLASS_NAME_REGEX = /*#__PURE__*/new RegExp(`(${fluentProviderClassNames.root}\\\\w+)`);\nexport const PortalCompatProvider = props => {\n const {\n children\n } = props;\n const themeClassName = useThemeClassName();\n const cssVariablesClassName = React.useMemo(\n // \"themeClassName\" may contain multiple classes while we want to add only a class that hosts CSS variables\n // Keep in sync with \"packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts\"\n () => {\n var _themeClassName_match;\n return (_themeClassName_match = themeClassName.match(CLASS_NAME_REGEX)) === null || _themeClassName_match === void 0 ? void 0 : _themeClassName_match[1];\n }, [themeClassName]);\n const registerPortalEl = React.useCallback(element => {\n let disposeFocusVisiblePolyfill = () => undefined;\n if (cssVariablesClassName) {\n element.classList.add(cssVariablesClassName);\n if (element.ownerDocument.defaultView) {\n disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);\n }\n }\n return () => {\n if (cssVariablesClassName) {\n element.classList.remove(cssVariablesClassName);\n }\n disposeFocusVisiblePolyfill();\n };\n }, [cssVariablesClassName]);\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 return /*#__PURE__*/React.createElement(PortalCompatContextProvider, {\n value: registerPortalEl\n }, children);\n};\n//# sourceMappingURL=PortalCompatProvider.js.map"],"names":["PortalCompatProvider","CLASS_NAME_REGEX","RegExp","fluentProviderClassNames","root","props","children","themeClassName","useThemeClassName","cssVariablesClassName","React","useMemo","_themeClassName_match","match","registerPortalEl","useCallback","element","disposeFocusVisiblePolyfill","undefined","classList","add","ownerDocument","defaultView","applyFocusVisiblePolyfill","remove","process","env","NODE_ENV","useEffect","console","warn","createElement","PortalCompatContextProvider","value"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;iCACqC;0CAChB;8BACF;AAC1C,MAAMC,mBAAmB,WAAW,GAAE,IAAIC,OAAO,CAAC,CAAC,EAAEC,yCAAwB,CAACC,IAAI,CAAC,KAAK,CAAC;AAClF,MAAMJ,uBAAuBK,CAAAA,QAAS;IAC3C,MAAM,EACJC,SAAQ,EACT,GAAGD;IACJ,MAAME,iBAAiBC,IAAAA,kCAAiB;IACxC,MAAMC,wBAAwBC,OAAMC,OAAO,CAC3C,2GAA2G;IAC3G,8GAA8G;IAC9G,IAAM;QACJ,IAAIC;QACJ,OAAO,AAACA,CAAAA,wBAAwBL,eAAeM,KAAK,CAACZ,iBAAgB,MAAO,IAAI,IAAIW,0BAA0B,KAAK,IAAI,KAAK,IAAIA,qBAAqB,CAAC,EAAE;IAC1J,GAAG;QAACL;KAAe;IACnB,MAAMO,mBAAmBJ,OAAMK,WAAW,CAACC,CAAAA,UAAW;QACpD,IAAIC,8BAA8B,IAAMC;QACxC,IAAIT,uBAAuB;YACzBO,QAAQG,SAAS,CAACC,GAAG,CAACX;YACtB,IAAIO,QAAQK,aAAa,CAACC,WAAW,EAAE;gBACrCL,8BAA8BM,IAAAA,uCAAyB,EAACP,SAASA,QAAQK,aAAa,CAACC,WAAW;YACpG,CAAC;QACH,CAAC;QACD,OAAO,IAAM;YACX,IAAIb,uBAAuB;gBACzBO,QAAQG,SAAS,CAACK,MAAM,CAACf;YAC3B,CAAC;YACDQ;QACF;IACF,GAAG;QAACR;KAAsB;IAC1B,IAAIgB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,+GAA+G;QAC/G,sDAAsD;QACtDjB,OAAMkB,SAAS,CAAC,IAAM;YACpB,IAAIrB,mBAAmB,IAAI;gBACzB,sCAAsC;gBACtCsB,QAAQC,IAAI,CAAC,CAAC;;;;MAIhB,CAAC;YACD,CAAC;QACD,uDAAuD;QACzD,GAAG,EAAE;IACP,CAAC;IACD,OAAO,WAAW,GAAEpB,OAAMqB,aAAa,CAACC,qDAA2B,EAAE;QACnEC,OAAOnB;IACT,GAAGR;AACL,GACA,gDAAgD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-portal-compat",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.55",
|
|
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",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
|
-
"@fluentui/react-components": "^9.
|
|
30
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
29
|
+
"@fluentui/react-components": "^9.20.0",
|
|
30
|
+
"@fluentui/react-shared-contexts": "^9.4.0",
|
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
|
32
32
|
"@fluentui/scripts-cypress": "*",
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-portal-compat-context": "^9.0.
|
|
37
|
-
"@fluentui/react-tabster": "^9.
|
|
36
|
+
"@fluentui/react-portal-compat-context": "^9.0.6",
|
|
37
|
+
"@fluentui/react-tabster": "^9.7.0",
|
|
38
38
|
"@swc/helpers": "^0.4.14"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@fluentui/react-components": "^9.
|
|
41
|
+
"@fluentui/react-components": "^9.20.0",
|
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
43
43
|
"react": ">=16.8.0 <19.0.0"
|
|
44
44
|
},
|
package/.swcrc
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
-
"exclude": [
|
|
4
|
-
"/testing",
|
|
5
|
-
"/**/*.cy.ts",
|
|
6
|
-
"/**/*.cy.tsx",
|
|
7
|
-
"/**/*.spec.ts",
|
|
8
|
-
"/**/*.spec.tsx",
|
|
9
|
-
"/**/*.test.ts",
|
|
10
|
-
"/**/*.test.tsx"
|
|
11
|
-
],
|
|
12
|
-
"jsc": {
|
|
13
|
-
"parser": {
|
|
14
|
-
"syntax": "typescript",
|
|
15
|
-
"tsx": true,
|
|
16
|
-
"decorators": false,
|
|
17
|
-
"dynamicImport": false
|
|
18
|
-
},
|
|
19
|
-
"externalHelpers": true,
|
|
20
|
-
"transform": {
|
|
21
|
-
"react": {
|
|
22
|
-
"runtime": "classic",
|
|
23
|
-
"useSpread": true
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"target": "es2019"
|
|
27
|
-
},
|
|
28
|
-
"minify": false,
|
|
29
|
-
"sourceMaps": true
|
|
30
|
-
}
|