@fluentui/react-portal-compat 9.0.167 → 9.0.169
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 +23 -2
- package/lib/PortalCompatProvider.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-amd/PortalCompatProvider.js +2 -1
- package/lib-amd/PortalCompatProvider.js.map +1 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-commonjs/PortalCompatProvider.js +2 -1
- package/lib-commonjs/PortalCompatProvider.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +5 -20
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,
|
|
3
|
+
This log was last generated on Tue, 12 Nov 2024 09:30:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.169](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.169)
|
|
8
|
+
|
|
9
|
+
Tue, 12 Nov 2024 09:30:43 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.168..@fluentui/react-portal-compat_v9.0.169)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-components to v9.56.1 ([commit](https://github.com/microsoft/fluentui/commit/fc7240b48f7441d9fbf62d600c41c25c57ebac3b) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.0.168](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.168)
|
|
17
|
+
|
|
18
|
+
Mon, 11 Nov 2024 10:00:50 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.167..@fluentui/react-portal-compat_v9.0.168)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- chore: replace npm-scripts and just-scrtips with nx inferred tasks ([PR #33074](https://github.com/microsoft/fluentui/pull/33074) by martinhochel@microsoft.com)
|
|
24
|
+
- Bump @fluentui/react-portal-compat-context to v9.0.13 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
|
|
25
|
+
- Bump @fluentui/react-tabster to v9.23.0 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
|
|
26
|
+
- Bump @fluentui/react-components to v9.56.0 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
|
|
27
|
+
|
|
7
28
|
## [9.0.167](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat_v9.0.167)
|
|
8
29
|
|
|
9
|
-
Tue, 15 Oct 2024 17:
|
|
30
|
+
Tue, 15 Oct 2024 17:17:53 GMT
|
|
10
31
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat_v9.0.166..@fluentui/react-portal-compat_v9.0.167)
|
|
11
32
|
|
|
12
33
|
### Patches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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(`([^\\\\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,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;IAAD,GACjD;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"}
|
|
1
|
+
{"version":3,"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(`([^\\\\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,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;IAAD,GACjD;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"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":"","mappings":"AAAA,SAASA,oBAAoB,QAAQ,yBAAyB"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":"","mappings":"AAAA,SAASA,oBAAoB,QAAQ,yBAAyB"}
|
|
@@ -30,7 +30,8 @@ define([
|
|
|
30
30
|
function useProviderThemeClasses() {
|
|
31
31
|
'use no memo';
|
|
32
32
|
const themeClassName = (0, _reactcomponents.useThemeClassName)();
|
|
33
|
-
const cssVariablesClasses = _react.useMemo(//
|
|
33
|
+
const cssVariablesClasses = _react.useMemo(// "themeClassName" may contain multiple classes while we want to add only classes that host CSS variables
|
|
34
|
+
// Keep in sync with "packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"
|
|
34
35
|
()=>{
|
|
35
36
|
var _themeClassName_match;
|
|
36
37
|
return (_themeClassName_match = themeClassName.match(CLASS_NAME_REGEX)) !== null && _themeClassName_match !== void 0 ? _themeClassName_match : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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(`([^\\\\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","
|
|
1
|
+
{"version":3,"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(`([^\\\\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;IAAuB;IACqC;IAChB;IACF;;;;;;;;;;;;;QAoC7BA,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;QAAD,GACjD;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"}
|
package/lib-amd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;IAAqC;;;;;;mCAA5BA;;;mBAAAA,0CAAoB"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;IAAqC;;;;;;mCAA5BA;;;mBAAAA,0CAAoB"}
|
|
@@ -25,7 +25,8 @@ const CLASS_NAME_REGEX = new RegExp(`([^\\s]*${_reactcomponents.fluentProviderCl
|
|
|
25
25
|
function useProviderThemeClasses() {
|
|
26
26
|
'use no memo';
|
|
27
27
|
const themeClassName = (0, _reactcomponents.useThemeClassName)();
|
|
28
|
-
const cssVariablesClasses = _react.useMemo(//
|
|
28
|
+
const cssVariablesClasses = _react.useMemo(// "themeClassName" may contain multiple classes while we want to add only classes that host CSS variables
|
|
29
|
+
// Keep in sync with "packages/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"
|
|
29
30
|
()=>{
|
|
30
31
|
var _themeClassName_match;
|
|
31
32
|
return (_themeClassName_match = themeClassName.match(CLASS_NAME_REGEX)) !== null && _themeClassName_match !== void 0 ? _themeClassName_match : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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(`([^\\\\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","
|
|
1
|
+
{"version":3,"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(`([^\\\\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAuCaA,oBAAoB;eAApBA;;IA9BGC,uBAAuB;eAAvBA;;;;iEATO;iCACqC;0CAChB;8BACF;AAI1C,MAAMC,mBAAmB,IAAIC,OAAO,CAAC,QAAQ,EAAEC,yCAAwB,CAACC,IAAI,CAAC,KAAK,CAAC,EAAE;AAE9E,SAASJ;IACd;IAEA,MAAMK,iBAAiBC,IAAAA,kCAAiB;IACxC,MAAMC,sBAAsBC,OAAMC,OAAO,CACvC,0GAA0G;IAC1G,8GAA8G;IAC9G;YAAMJ;eAAAA,CAAAA,wBAAAA,eAAeK,KAAK,CAACT,+BAArBI,mCAAAA,wBAA0C,EAAE;IAAD,GACjD;QAACA;KAAe;IAGlB,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,+GAA+G;QAC/G,sDAAsD;QACtDL,OAAMM,SAAS,CAAC;YACd,IAAIT,mBAAmB,IAAI;gBACzB,sCAAsC;gBACtCU,QAAQC,IAAI,CAAC,CAAC;;;;MAIhB,CAAC;YACD;QACA,uDAAuD;QACzD,GAAG,EAAE;IACP;IAEA,OAAOT;AACT;AAEO,MAAMR,uBAAiEkB,CAAAA;IAC5E,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAMV,sBAAsBP;IAE5B,MAAMmB,mBAAmBX,OAAMY,WAAW,CACxCC,CAAAA;QACE,IAAIC,8BAA0C,IAAMC;QAEpDF,QAAQG,SAAS,CAACC,GAAG,IAAIlB;QACzB,IAAIc,QAAQK,aAAa,CAACC,WAAW,EAAE;YACrCL,8BAA8BM,IAAAA,uCAAyB,EAACP,SAASA,QAAQK,aAAa,CAACC,WAAW;QACpG;QAEA,OAAO;YACLN,QAAQG,SAAS,CAACK,MAAM,IAAItB;YAC5Be;QACF;IACF,GACA;QAACf;KAAoB;IAGvB,qBAAO,qBAACuB,qDAA2B;QAACC,OAAOZ;OAAmBD;AAChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BAASA;;;eAAAA,0CAAoB;;;sCAAQ"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatProvider } from './PortalCompatProvider';\n"],"names":["PortalCompatProvider"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BAASA;;;eAAAA,0CAAoB;;;sCAAQ"}
|
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.169",
|
|
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",
|
|
@@ -11,20 +11,6 @@
|
|
|
11
11
|
"url": "https://github.com/microsoft/fluentui"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "just-scripts build --module esm,cjs,amd",
|
|
16
|
-
"bundle-size": "monosize measure",
|
|
17
|
-
"clean": "just-scripts clean",
|
|
18
|
-
"code-style": "just-scripts code-style",
|
|
19
|
-
"e2e": "cypress run --component",
|
|
20
|
-
"e2e:local": "cypress open --component",
|
|
21
|
-
"just": "just-scripts",
|
|
22
|
-
"lint": "just-scripts lint",
|
|
23
|
-
"test": "jest --passWithNoTests",
|
|
24
|
-
"type-check": "just-scripts type-check",
|
|
25
|
-
"generate-api": "just-scripts generate-api",
|
|
26
|
-
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
|
|
27
|
-
},
|
|
28
14
|
"devDependencies": {
|
|
29
15
|
"@fluentui/react-provider": "*",
|
|
30
16
|
"@fluentui/react-theme": "*",
|
|
@@ -33,16 +19,15 @@
|
|
|
33
19
|
"@fluentui/eslint-plugin": "*",
|
|
34
20
|
"@fluentui/react-components": "*",
|
|
35
21
|
"@fluentui/scripts-api-extractor": "*",
|
|
36
|
-
"@fluentui/scripts-cypress": "*"
|
|
37
|
-
"@fluentui/scripts-tasks": "*"
|
|
22
|
+
"@fluentui/scripts-cypress": "*"
|
|
38
23
|
},
|
|
39
24
|
"dependencies": {
|
|
40
|
-
"@fluentui/react-portal-compat-context": "^9.0.
|
|
41
|
-
"@fluentui/react-tabster": "^9.
|
|
25
|
+
"@fluentui/react-portal-compat-context": "^9.0.13",
|
|
26
|
+
"@fluentui/react-tabster": "^9.23.0",
|
|
42
27
|
"@swc/helpers": "^0.5.1"
|
|
43
28
|
},
|
|
44
29
|
"peerDependencies": {
|
|
45
|
-
"@fluentui/react-components": "^9.
|
|
30
|
+
"@fluentui/react-components": "^9.56.1",
|
|
46
31
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
47
32
|
"react": ">=16.14.0 <19.0.0"
|
|
48
33
|
},
|