@fluentui/react-portal-compat 9.0.50 → 9.0.51
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 +24 -3
- package/CHANGELOG.md +14 -4
- package/dist/index.d.ts +3 -1
- package/lib/PortalCompatProvider.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@fluentui/react-portal-compat",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 06 Apr 2023 23:59:49 GMT",
|
|
6
|
+
"tag": "@fluentui/react-portal-compat_v9.0.51",
|
|
7
|
+
"version": "9.0.51",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "miroslav.stastny@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-portal-compat",
|
|
13
|
+
"commit": "ef38eed066906073d7b6e50b1d50afab1c62b3a5",
|
|
14
|
+
"comment": "fix: React 18 support in typings"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-portal-compat",
|
|
19
|
+
"comment": "Bump @fluentui/react-components to v9.18.8",
|
|
20
|
+
"commit": "7a46cab3d31a233b89b7188e994b24712af5393c"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Tue, 04 Apr 2023 18:44:50 GMT",
|
|
6
27
|
"tag": "@fluentui/react-portal-compat_v9.0.50",
|
|
7
28
|
"version": "9.0.50",
|
|
8
29
|
"comments": {
|
|
@@ -11,13 +32,13 @@
|
|
|
11
32
|
"author": "beachball",
|
|
12
33
|
"package": "@fluentui/react-portal-compat",
|
|
13
34
|
"comment": "Bump @fluentui/react-tabster to v9.6.3",
|
|
14
|
-
"commit": "
|
|
35
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
15
36
|
},
|
|
16
37
|
{
|
|
17
38
|
"author": "beachball",
|
|
18
39
|
"package": "@fluentui/react-portal-compat",
|
|
19
40
|
"comment": "Bump @fluentui/react-components to v9.18.7",
|
|
20
|
-
"commit": "
|
|
41
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
21
42
|
}
|
|
22
43
|
]
|
|
23
44
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-portal-compat
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 23:59:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.51](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.51)
|
|
8
|
+
|
|
9
|
+
Thu, 06 Apr 2023 23:59:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.50..@fluentui/react-portal-compat_v9.0.51)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: React 18 support in typings ([PR #27439](https://github.com/microsoft/fluentui/pull/27439) by miroslav.stastny@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-components to v9.18.8 ([PR #27420](https://github.com/microsoft/fluentui/pull/27420) by beachball)
|
|
16
|
+
|
|
7
17
|
## [9.0.50](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.50)
|
|
8
18
|
|
|
9
|
-
Tue, 04 Apr 2023 18:
|
|
19
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.49..@fluentui/react-portal-compat_v9.0.50)
|
|
11
21
|
|
|
12
22
|
### Patches
|
|
13
23
|
|
|
14
|
-
- Bump @fluentui/react-tabster to v9.6.3 ([PR #
|
|
15
|
-
- Bump @fluentui/react-components to v9.18.7 ([PR #
|
|
24
|
+
- Bump @fluentui/react-tabster to v9.6.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
25
|
+
- Bump @fluentui/react-components to v9.18.7 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
16
26
|
|
|
17
27
|
## [9.0.49](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.49)
|
|
18
28
|
|
package/dist/index.d.ts
CHANGED
|
@@ -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}\\\\d+)`);\n\nexport const PortalCompatProvider: React.FC = 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,
|
|
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}\\\\d+)`);\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,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,2BAAA;IAA4B8B,KAAA,EAAOjB;KAAmBN,QAAA;AAChE"}
|
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.51",
|
|
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,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
|
-
"@fluentui/react-components": "^9.18.
|
|
29
|
+
"@fluentui/react-components": "^9.18.8",
|
|
30
30
|
"@fluentui/react-shared-contexts": "^9.3.3",
|
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
|
32
32
|
"@fluentui/scripts-cypress": "*",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@swc/helpers": "^0.4.14"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@fluentui/react-components": "^9.18.
|
|
41
|
+
"@fluentui/react-components": "^9.18.8",
|
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
43
43
|
"react": ">=16.8.0 <19.0.0"
|
|
44
44
|
},
|