@fluentui/react-portal-compat 9.0.21 → 9.0.23

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 CHANGED
@@ -2,7 +2,69 @@
2
2
  "name": "@fluentui/react-portal-compat",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 20 Dec 2022 14:55:58 GMT",
5
+ "date": "Wed, 04 Jan 2023 01:35:39 GMT",
6
+ "tag": "@fluentui/react-portal-compat_v9.0.23",
7
+ "version": "9.0.23",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-portal-compat",
13
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
14
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
15
+ },
16
+ {
17
+ "author": "martinhochel@microsoft.com",
18
+ "package": "@fluentui/react-portal-compat",
19
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
20
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
21
+ }
22
+ ],
23
+ "patch": [
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-portal-compat",
27
+ "comment": "Bump @fluentui/react-tabster to v9.3.5",
28
+ "commit": "3e322d15529451be153e97298873253e21af4082"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-portal-compat",
33
+ "comment": "Bump @fluentui/react-components to v9.8.0",
34
+ "commit": "3e322d15529451be153e97298873253e21af4082"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "date": "Wed, 21 Dec 2022 10:20:33 GMT",
41
+ "tag": "@fluentui/react-portal-compat_v9.0.22",
42
+ "version": "9.0.22",
43
+ "comments": {
44
+ "patch": [
45
+ {
46
+ "author": "beachball",
47
+ "package": "@fluentui/react-portal-compat",
48
+ "comment": "Bump @fluentui/react-tabster to v9.3.4",
49
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
50
+ },
51
+ {
52
+ "author": "beachball",
53
+ "package": "@fluentui/react-portal-compat",
54
+ "comment": "Bump @fluentui/react-components to v9.7.4",
55
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
56
+ },
57
+ {
58
+ "author": "beachball",
59
+ "package": "@fluentui/react-portal-compat",
60
+ "comment": "Bump @fluentui/react-shared-contexts to v9.1.4",
61
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "date": "Tue, 20 Dec 2022 14:59:34 GMT",
6
68
  "tag": "@fluentui/react-portal-compat_v9.0.21",
7
69
  "version": "9.0.21",
8
70
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @fluentui/react-portal-compat
2
2
 
3
- This log was last generated on Tue, 20 Dec 2022 14:55:58 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 04 Jan 2023 01:35:39 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.23)
8
+
9
+ Wed, 04 Jan 2023 01:35:39 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.22..@fluentui/react-portal-compat_v9.0.23)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-tabster to v9.3.5 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
15
+ - Bump @fluentui/react-components to v9.8.0 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
16
+
17
+ ## [9.0.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.22)
18
+
19
+ Wed, 21 Dec 2022 10:20:33 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.21..@fluentui/react-portal-compat_v9.0.22)
21
+
22
+ ### Patches
23
+
24
+ - Bump @fluentui/react-tabster to v9.3.4 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
25
+ - Bump @fluentui/react-components to v9.7.4 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
26
+ - Bump @fluentui/react-shared-contexts to v9.1.4 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
27
+
7
28
  ## [9.0.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.21)
8
29
 
9
- Tue, 20 Dec 2022 14:55:58 GMT
30
+ Tue, 20 Dec 2022 14:59:34 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.20..@fluentui/react-portal-compat_v9.0.21)
11
32
 
12
33
  ### Patches
@@ -6,35 +6,30 @@ var CLASS_NAME_REGEX = /*#__PURE__*/new RegExp("(" + fluentProviderClassNames.ro
6
6
  export var PortalCompatProvider = function (props) {
7
7
  var children = props.children;
8
8
  var themeClassName = useThemeClassName();
9
- var cssVariablesClassName = React.useMemo( // "themeClassName" may contain multiple classes while we want to add only a class that hosts CSS variables
9
+ var cssVariablesClassName = React.useMemo(
10
+ // "themeClassName" may contain multiple classes while we want to add only a class that hosts CSS variables
10
11
  // Keep in sync with "packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"
11
12
  function () {
12
13
  var _a;
13
-
14
14
  return (_a = themeClassName.match(CLASS_NAME_REGEX)) === null || _a === void 0 ? void 0 : _a[1];
15
15
  }, [themeClassName]);
16
16
  var registerPortalEl = React.useCallback(function (element) {
17
17
  var disposeFocusVisiblePolyfill = function () {
18
18
  return undefined;
19
19
  };
20
-
21
20
  if (cssVariablesClassName) {
22
21
  element.classList.add(cssVariablesClassName);
23
-
24
22
  if (element.ownerDocument.defaultView) {
25
23
  disposeFocusVisiblePolyfill = applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);
26
24
  }
27
25
  }
28
-
29
26
  return function () {
30
27
  if (cssVariablesClassName) {
31
28
  element.classList.remove(cssVariablesClassName);
32
29
  }
33
-
34
30
  disposeFocusVisiblePolyfill();
35
31
  };
36
32
  }, [cssVariablesClassName]);
37
-
38
33
  if (process.env.NODE_ENV !== 'production') {
39
34
  // This if statement technically breaks the rules of hooks, but ENV variables never change during app lifecycle
40
35
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -42,11 +37,10 @@ export var PortalCompatProvider = function (props) {
42
37
  if (themeClassName === '') {
43
38
  // eslint-disable-next-line no-console
44
39
  console.warn("\n PortalCompatProvider: \"useThemeClassName()\" hook returned an empty string\n =============================================\n Make sure that PortalCompatProvider is rendered inside FluentProvider as a child.\n ");
45
- } // eslint-disable-next-line react-hooks/exhaustive-deps
46
-
40
+ }
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
42
  }, []);
48
43
  }
49
-
50
44
  return /*#__PURE__*/React.createElement(PortalCompatContextProvider, {
51
45
  value: registerPortalEl
52
46
  }, children);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-portal-compat/src/PortalCompatProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,wBAAT,EAAmC,iBAAnC,QAA4D,4BAA5D;AACA,SAAS,2BAAT,QAA4C,uCAA5C;AACA,SAAS,yBAAT,QAA0C,yBAA1C;AAIA,IAAM,gBAAgB,gBAAG,IAAI,MAAJ,CAAW,MAAI,wBAAwB,CAAC,IAA7B,GAAiC,OAA5C,CAAzB;AAEA,OAAO,IAAM,oBAAoB,GAAa,UAAA,KAAA,EAAK;EACzC,IAAA,QAAQ,GAAK,KAAK,CAAV,QAAR;EAER,IAAM,cAAc,GAAG,iBAAiB,EAAxC;EACA,IAAM,qBAAqB,GAAG,KAAK,CAAC,OAAN,EAC5B;EACA;EACA,YAAA;IAAA,IAAA,EAAA;;IAAM,OAAA,CAAA,EAAA,GAAA,cAAc,CAAC,KAAf,CAAqB,gBAArB,CAAA,MAAsC,IAAtC,IAAsC,EAAA,KAAA,KAAA,CAAtC,GAAsC,KAAA,CAAtC,GAAsC,EAAA,CAAG,CAAH,CAAtC;EAA2C,CAHrB,EAI5B,CAAC,cAAD,CAJ4B,CAA9B;EAOA,IAAM,gBAAgB,GAAG,KAAK,CAAC,WAAN,CACvB,UAAA,OAAA,EAAO;IACL,IAAI,2BAA2B,GAAe,YAAA;MAAM,OAAA,SAAA;IAAS,CAA7D;;IACA,IAAI,qBAAJ,EAA2B;MACzB,OAAO,CAAC,SAAR,CAAkB,GAAlB,CAAsB,qBAAtB;;MACA,IAAI,OAAO,CAAC,aAAR,CAAsB,WAA1B,EAAuC;QACrC,2BAA2B,GAAG,yBAAyB,CAAC,OAAD,EAAU,OAAO,CAAC,aAAR,CAAsB,WAAhC,CAAvD;MACD;IACF;;IAED,OAAO,YAAA;MACL,IAAI,qBAAJ,EAA2B;QACzB,OAAO,CAAC,SAAR,CAAkB,MAAlB,CAAyB,qBAAzB;MACD;;MACD,2BAA2B;IAC5B,CALD;EAMD,CAhBsB,EAiBvB,CAAC,qBAAD,CAjBuB,CAAzB;;EAoBA,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA7B,EAA2C;IACzC;IACA;IACA,KAAK,CAAC,SAAN,CAAgB,YAAA;MACd,IAAI,cAAc,KAAK,EAAvB,EAA2B;QACzB;QACA,OAAO,CAAC,IAAR,CAAa,uPAAb;MAKD,CARa,CASd;;IACD,CAVD,EAUG,EAVH;EAWD;;EAED,oBAAO,KAAA,CAAA,aAAA,CAAC,2BAAD,EAA4B;IAAC,KAAK,EAAE;EAAR,CAA5B,EAAuD,QAAvD,CAAP;AACD,CAhDM","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,wBAAwB,EAAEC,iBAAiB,QAAQ,4BAA4B;AACxF,SAASC,2BAA2B,QAA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gB,QAAQ,CAA+B;AACvG,CAAC","names":["React","fluentProviderClassNames","useThemeClassName","PortalCompatContextProvider","applyFocusVisiblePolyfill","CLASS_NAME_REGEX","RegExp","root","PortalCompatProvider","props","themeClassName","cssVariablesClassName","useMemo","match","registerPortalEl","useCallback","disposeFocusVisiblePolyfill","element","classList","add","ownerDocument","defaultView","remove","process","env","NODE_ENV","useEffect","console","warn","value","children"],"sourceRoot":"../src/","sources":["packages/react-components/react-portal-compat/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"]}
@@ -4,49 +4,38 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PortalCompatProvider = void 0;
7
-
8
7
  var React = /*#__PURE__*/require("react");
9
-
10
8
  var react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
11
-
12
9
  var react_portal_compat_context_1 = /*#__PURE__*/require("@fluentui/react-portal-compat-context");
13
-
14
10
  var react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
-
16
11
  var CLASS_NAME_REGEX = /*#__PURE__*/new RegExp("(" + react_components_1.fluentProviderClassNames.root + "\\d+)");
17
-
18
12
  var PortalCompatProvider = function (props) {
19
13
  var children = props.children;
20
14
  var themeClassName = react_components_1.useThemeClassName();
21
- var cssVariablesClassName = React.useMemo( // "themeClassName" may contain multiple classes while we want to add only a class that hosts CSS variables
15
+ var cssVariablesClassName = React.useMemo(
16
+ // "themeClassName" may contain multiple classes while we want to add only a class that hosts CSS variables
22
17
  // Keep in sync with "packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"
23
18
  function () {
24
19
  var _a;
25
-
26
20
  return (_a = themeClassName.match(CLASS_NAME_REGEX)) === null || _a === void 0 ? void 0 : _a[1];
27
21
  }, [themeClassName]);
28
22
  var registerPortalEl = React.useCallback(function (element) {
29
23
  var disposeFocusVisiblePolyfill = function () {
30
24
  return undefined;
31
25
  };
32
-
33
26
  if (cssVariablesClassName) {
34
27
  element.classList.add(cssVariablesClassName);
35
-
36
28
  if (element.ownerDocument.defaultView) {
37
29
  disposeFocusVisiblePolyfill = react_tabster_1.applyFocusVisiblePolyfill(element, element.ownerDocument.defaultView);
38
30
  }
39
31
  }
40
-
41
32
  return function () {
42
33
  if (cssVariablesClassName) {
43
34
  element.classList.remove(cssVariablesClassName);
44
35
  }
45
-
46
36
  disposeFocusVisiblePolyfill();
47
37
  };
48
38
  }, [cssVariablesClassName]);
49
-
50
39
  if (process.env.NODE_ENV !== 'production') {
51
40
  // This if statement technically breaks the rules of hooks, but ENV variables never change during app lifecycle
52
41
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -54,15 +43,13 @@ var PortalCompatProvider = function (props) {
54
43
  if (themeClassName === '') {
55
44
  // eslint-disable-next-line no-console
56
45
  console.warn("\n PortalCompatProvider: \"useThemeClassName()\" hook returned an empty string\n =============================================\n Make sure that PortalCompatProvider is rendered inside FluentProvider as a child.\n ");
57
- } // eslint-disable-next-line react-hooks/exhaustive-deps
58
-
46
+ }
47
+ // eslint-disable-next-line react-hooks/exhaustive-deps
59
48
  }, []);
60
49
  }
61
-
62
50
  return React.createElement(react_portal_compat_context_1.PortalCompatContextProvider, {
63
51
  value: registerPortalEl
64
52
  }, children);
65
53
  };
66
-
67
54
  exports.PortalCompatProvider = PortalCompatProvider;
68
55
  //# sourceMappingURL=PortalCompatProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-portal-compat/src/PortalCompatProvider.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,IAAA,6BAAA,gBAAA,OAAA,CAAA,uCAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAIA,IAAM,gBAAgB,gBAAG,IAAI,MAAJ,CAAW,MAAI,kBAAA,CAAA,wBAAA,CAAyB,IAA7B,GAAiC,OAA5C,CAAzB;;AAEO,IAAM,oBAAoB,GAAa,UAAA,KAAA,EAAK;EACzC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CAAA,2BAAD,EAA4B;IAAC,KAAK,EAAE;EAAR,CAA5B,EAAuD,QAAvD,CAAP;AACD,CAhDM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA,IAAMA,gBAAgB,gBAAG,IAAIC,MAAM,CAAC,MAAIC,2CAAwB,CAACC,IAAI,UAAO,CAAC;AAEtE,IAAMC,oBAAoB,GAAa,eAAK;EACzC,YAAQ,GAAKC,KAAK,SAAV;EAEhB,IAAMC,cAAc,GAAGJ,oCAAiB,EAAE;EAC1C,IAAMK,qBAAqB,GAAGC,KAAK,CAACC,OAAO;EACzC;EACA;EACA;IAAA;IAAM,2BAAc,CAACC,KAAK,CAACV,gBAAgB,CAAC,0CAAG,CAAC,CAAC;EAAA,GACjD,CAACM,cAAc,CAAC,CACjB;EAED,IAAMK,gBAAgB,GAAGH,KAAK,CAACI,WAAW,CACxC,iBAAO;IACL,IAAIC,2BAA2B,GAAe;MAAM,gBAAS;IAAT,CAAS;IAC7D,IAAIN,qBAAqB,EAAE;MACzBO,OAAO,CAACC,SAAS,CAACC,GAAG,CAACT,qBAAqB,CAAC;MAC5C,IAAIO,OAAO,CAACG,aAAa,CAACC,WAAW,EAAE;QACrCL,2BAA2B,GAAGM,yCAAyB,CAACL,OAAO,EAAEA,OAAO,CAACG,aAAa,CAACC,WAAW,CAAC;;;IAIvG,OAAO;MACL,IAAIX,qBAAqB,EAAE;QACzBO,OAAO,CAACC,SAAS,CAACK,MAAM,CAACb,qBAAqB,CAAC;;MAEjDM,2BAA2B,EAAE;IAC/B,CAAC;EACH,CAAC,EACD,CAACN,qBAAqB,CAAC,CACxB;EAED,IAAIc,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC;IACA;IACAf,KAAK,CAACgB,SAAS,CAAC;MACd,IAAIlB,cAAc,KAAK,EAAE,EAAE;QACzB;QACAmB,OAAO,CAACC,IAAI,CAAC,uPAId,CAAC;;MAEF;IACF,CAAC,EAAE,EAAE,CAAC;;EAGR,OAAOlB,oBAACmB,yDAA2B;IAACC,KAAK,EAAEjB;EAAgB,GAAGkB,QAAQ,CAA+B;AACvG,CAAC;AAhDYC,4BAAoB","names":["CLASS_NAME_REGEX","RegExp","react_components_1","root","PortalCompatProvider","props","themeClassName","cssVariablesClassName","React","useMemo","match","registerPortalEl","useCallback","disposeFocusVisiblePolyfill","element","classList","add","ownerDocument","defaultView","react_tabster_1","remove","process","env","NODE_ENV","useEffect","console","warn","react_portal_compat_context_1","value","children","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-portal-compat/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"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PortalCompatProvider = void 0;
7
-
8
7
  var PortalCompatProvider_1 = /*#__PURE__*/require("./PortalCompatProvider");
9
-
10
8
  Object.defineProperty(exports, "PortalCompatProvider", {
11
9
  enumerable: true,
12
10
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-portal-compat/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,sBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,sBAAA,CAAA,oBAAA;EAAoB;AAApB,CAAA","sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,kDAAoB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-portal-compat/src/index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal-compat",
3
- "version": "9.0.21",
3
+ "version": "9.0.23",
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,17 +26,17 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
- "@fluentui/react-components": "^9.7.3",
30
- "@fluentui/react-shared-contexts": "^9.1.3",
31
- "@fluentui/scripts": "^1.0.0"
29
+ "@fluentui/react-components": "^9.8.0",
30
+ "@fluentui/react-shared-contexts": "^9.1.4",
31
+ "@fluentui/scripts": "*"
32
32
  },
33
33
  "dependencies": {
34
34
  "@fluentui/react-portal-compat-context": "^9.0.4",
35
- "@fluentui/react-tabster": "^9.3.3",
35
+ "@fluentui/react-tabster": "^9.3.5",
36
36
  "tslib": "^2.1.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@fluentui/react-components": "^9.7.3",
39
+ "@fluentui/react-components": "^9.8.0",
40
40
  "@types/react": ">=16.8.0 <19.0.0",
41
41
  "react": ">=16.8.0 <19.0.0"
42
42
  },