@fluentui/react-provider 9.16.3 → 9.16.4
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 +15 -2
- package/lib/components/FluentProvider/useFluentProvider.js +1 -0
- package/lib/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderStyles.styles.js +2 -0
- package/lib/components/FluentProvider/useFluentProviderStyles.styles.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderThemeStyleTag.js +1 -0
- package/lib/components/FluentProvider/useFluentProviderThemeStyleTag.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js +1 -0
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.styles.js +1 -0
- package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderThemeStyleTag.js +1 -0
- package/lib-commonjs/components/FluentProvider/useFluentProviderThemeStyleTag.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-provider
|
2
2
|
|
3
|
-
This log was last generated on Mon,
|
3
|
+
This log was last generated on Mon, 01 Jul 2024 20:25:40 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.16.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.16.4)
|
8
|
+
|
9
|
+
Mon, 01 Jul 2024 20:25:40 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.16.3..@fluentui/react-provider_v9.16.4)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore: Update react-icons package to ^2.0.245 ([PR #31802](https://github.com/microsoft/fluentui/pull/31802) by ololubek@microsoft.com)
|
15
|
+
- chore: add eslint react-compiler ([PR #31457](https://github.com/microsoft/fluentui/pull/31457) by seanmonahan@microsoft.com)
|
16
|
+
- Bump @fluentui/react-tabster to v9.22.1 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.18.11 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.40 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
19
|
+
|
7
20
|
## [9.16.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.16.3)
|
8
21
|
|
9
|
-
Mon, 17 Jun 2024 07:
|
22
|
+
Mon, 17 Jun 2024 07:34:17 GMT
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.16.2..@fluentui/react-provider_v9.16.3)
|
11
24
|
|
12
25
|
### Patches
|
@@ -16,6 +16,7 @@ const DEFAULT_RENDERER_ATTRIBUTES = {};
|
|
16
16
|
* @param props - props from this instance of FluentProvider
|
17
17
|
* @param ref - reference to root HTMLElement of FluentProvider
|
18
18
|
*/ export const useFluentProvider_unstable = (props, ref)=>{
|
19
|
+
'use no memo';
|
19
20
|
const parentContext = useFluent();
|
20
21
|
const parentTheme = useTheme();
|
21
22
|
const parentOverrides = useOverrides();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProvider.ts"],"sourcesContent":["import { useRenderer_unstable } from '@griffel/react';\nimport { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n useOverrides_unstable as useOverrides,\n CustomStyleHooksContext_unstable as CustomStyleHooksContext,\n} from '@fluentui/react-shared-contexts';\nimport type {\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\n\n// Meomizing empty objects to avoid unnecessary rerenders.\nconst DEFAULT_STYLE_HOOKS = {};\nconst DEFAULT_RENDERER_ATTRIBUTES = {};\n\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */\nexport const useFluentProvider_unstable = (\n props: FluentProviderProps,\n ref: React.Ref<HTMLElement>,\n): FluentProviderState => {\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks: CustomStyleHooksContextValue =\n React.useContext(CustomStyleHooksContext) || DEFAULT_STYLE_HOOKS;\n\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {},\n } = props;\n\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n\n const mergedCustomStyleHooks = shallowMerge(\n parentCustomStyleHooks,\n customStyleHooks_unstable,\n ) as CustomStyleHooksContextValue;\n\n const renderer = useRenderer_unstable();\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: renderer.styleElementAttributes ?? DEFAULT_RENDERER_ATTRIBUTES,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn(\n [\n '@fluentui/react-provider: FluentProvider does not have your \"theme\" defined.',\n \"Make sure that your top-level FluentProvider has set a `theme` prop or you're setting the theme in your child FluentProvider.\",\n ].join(' '),\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ...props,\n dir,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>({ targetDocument })) as React.Ref<HTMLDivElement>,\n }),\n { elementType: 'div' },\n ),\n\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId,\n },\n },\n };\n};\n\nfunction shallowMerge<T>(a: T, b: T): T {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return { ...a, ...b };\n }\n\n if (a) {\n return a;\n }\n\n return b;\n}\n\nfunction useTheme(): ThemeContextValue {\n return React.useContext(ThemeContext);\n}\n"],"names":["useRenderer_unstable","useFocusVisible","ThemeContext_unstable","ThemeContext","useFluent_unstable","useFluent","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","getIntrinsicElementProps","useMergedRefs","slot","React","useFluentProviderThemeStyleTag","DEFAULT_STYLE_HOOKS","DEFAULT_RENDERER_ATTRIBUTES","useFluentProvider_unstable","props","ref","parentContext","parentTheme","useTheme","parentOverrides","parentCustomStyleHooks","useContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","renderer","styleTagId","rule","rendererAttributes","styleElementAttributes","process","env","NODE_ENV","useEffect","undefined","console","warn","join","themeClassName","components","root","always","elementType","serverStyleProps","cssRule","attributes","id","a","b"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,iBAAiB;AACtD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SACEC,yBAAyBC,YAAY,EACrCC,sBAAsBC,SAAS,EAC/BC,yBAAyBC,YAAY,EACrCC,oCAAoCC,uBAAuB,QACtD,kCAAkC;AAKzC,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,YAAYC,WAAW,QAAQ;AAE/B,SAASC,8BAA8B,QAAQ,mCAAmC;AAGlF,0DAA0D;AAC1D,MAAMC,sBAAsB,CAAC;AAC7B,MAAMC,8BAA8B,CAAC;AAErC;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,gBAAgBf;IACtB,MAAMgB,cAAcC;IACpB,MAAMC,kBAAkBhB;IACxB,MAAMiB,yBACJX,MAAMY,UAAU,CAAChB,4BAA4BM;IAE/C;;;;GAIC,GACD,MAAM,EACJW,uBAAuB,IAAI,EAC3B,gEAAgE;IAChEC,yBAAyB,EACzBC,MAAMR,cAAcQ,GAAG,EACvBC,iBAAiBT,cAAcS,cAAc,EAC7CC,KAAK,EACLC,oBAAoBC,YAAY,CAAC,CAAC,EACnC,GAAGd;IAEJ,MAAMe,cAAcC,aAAab,aAAaS;IAC9C,MAAMK,kBAAkBD,aAAaX,iBAAiBS;IAEtD,MAAMI,yBAAyBF,aAC7BV,wBACAG;IAGF,MAAMU,WAAWrC;QAIKqC;IAHtB,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAE,GAAGzB,+BAA+B;QAC1DgB,OAAOG;QACPJ;QACAW,oBAAoBH,CAAAA,mCAAAA,SAASI,sBAAsB,cAA/BJ,8CAAAA,mCAAmCrB;IACzD;IAEA,IAAI0B,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sDAAsD;QACtD/B,MAAMgC,SAAS,CAAC;YACd,IAAIZ,gBAAgBa,WAAW;gBAC7B,sCAAsC;gBACtCC,QAAQC,IAAI,CACV;oBACE;oBACA;iBACD,CAACC,IAAI,CAAC;YAEX;QACA,uDAAuD;QACzD,GAAG,EAAE;IACP;IAEA,OAAO;QACLvB;QACA,gEAAgE;QAChEC,2BAA2BS;QAC3BR;QACAC;QACAC,OAAOG;QACP,gEAAgE;QAChEF,oBAAoBI;QACpBe,gBAAgBZ;QAEhBa,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMxC,KAAKyC,MAAM,CACf3C,yBAAyB,OAAO;YAC9B,GAAGQ,KAAK;YACRU;YACA,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FT,KAAKR,cAAcQ,KAAKlB,gBAAgC;gBAAE4B;YAAe;QAC3E,IACA;YAAEyB,aAAa;QAAM;QAGvBC,kBAAkB;YAChBC,SAASjB;YACTkB,YAAY;gBACV,GAAGpB,SAASI,sBAAsB;gBAClCiB,IAAIpB;YACN;QACF;IACF;AACF,EAAE;AAEF,SAASJ,aAAgByB,CAAI,EAAEC,CAAI;IACjC,kEAAkE;IAClE,IAAID,KAAKC,GAAG;QACV,OAAO;YAAE,GAAGD,CAAC;YAAE,GAAGC,CAAC;QAAC;IACtB;IAEA,IAAID,GAAG;QACL,OAAOA;IACT;IAEA,OAAOC;AACT;AAEA,SAAStC;IACP,OAAOT,MAAMY,UAAU,CAACtB;AAC1B"}
|
1
|
+
{"version":3,"sources":["useFluentProvider.ts"],"sourcesContent":["import { useRenderer_unstable } from '@griffel/react';\nimport { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n useOverrides_unstable as useOverrides,\n CustomStyleHooksContext_unstable as CustomStyleHooksContext,\n} from '@fluentui/react-shared-contexts';\nimport type {\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\n\n// Meomizing empty objects to avoid unnecessary rerenders.\nconst DEFAULT_STYLE_HOOKS = {};\nconst DEFAULT_RENDERER_ATTRIBUTES = {};\n\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */\nexport const useFluentProvider_unstable = (\n props: FluentProviderProps,\n ref: React.Ref<HTMLElement>,\n): FluentProviderState => {\n 'use no memo';\n\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks: CustomStyleHooksContextValue =\n React.useContext(CustomStyleHooksContext) || DEFAULT_STYLE_HOOKS;\n\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {},\n } = props;\n\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n\n const mergedCustomStyleHooks = shallowMerge(\n parentCustomStyleHooks,\n customStyleHooks_unstable,\n ) as CustomStyleHooksContextValue;\n\n const renderer = useRenderer_unstable();\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: renderer.styleElementAttributes ?? DEFAULT_RENDERER_ATTRIBUTES,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn(\n [\n '@fluentui/react-provider: FluentProvider does not have your \"theme\" defined.',\n \"Make sure that your top-level FluentProvider has set a `theme` prop or you're setting the theme in your child FluentProvider.\",\n ].join(' '),\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ...props,\n dir,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>({ targetDocument })) as React.Ref<HTMLDivElement>,\n }),\n { elementType: 'div' },\n ),\n\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId,\n },\n },\n };\n};\n\nfunction shallowMerge<T>(a: T, b: T): T {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return { ...a, ...b };\n }\n\n if (a) {\n return a;\n }\n\n return b;\n}\n\nfunction useTheme(): ThemeContextValue {\n return React.useContext(ThemeContext);\n}\n"],"names":["useRenderer_unstable","useFocusVisible","ThemeContext_unstable","ThemeContext","useFluent_unstable","useFluent","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","getIntrinsicElementProps","useMergedRefs","slot","React","useFluentProviderThemeStyleTag","DEFAULT_STYLE_HOOKS","DEFAULT_RENDERER_ATTRIBUTES","useFluentProvider_unstable","props","ref","parentContext","parentTheme","useTheme","parentOverrides","parentCustomStyleHooks","useContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","renderer","styleTagId","rule","rendererAttributes","styleElementAttributes","process","env","NODE_ENV","useEffect","undefined","console","warn","join","themeClassName","components","root","always","elementType","serverStyleProps","cssRule","attributes","id","a","b"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,iBAAiB;AACtD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SACEC,yBAAyBC,YAAY,EACrCC,sBAAsBC,SAAS,EAC/BC,yBAAyBC,YAAY,EACrCC,oCAAoCC,uBAAuB,QACtD,kCAAkC;AAKzC,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,YAAYC,WAAW,QAAQ;AAE/B,SAASC,8BAA8B,QAAQ,mCAAmC;AAGlF,0DAA0D;AAC1D,MAAMC,sBAAsB,CAAC;AAC7B,MAAMC,8BAA8B,CAAC;AAErC;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA;IAEA,MAAMC,gBAAgBf;IACtB,MAAMgB,cAAcC;IACpB,MAAMC,kBAAkBhB;IACxB,MAAMiB,yBACJX,MAAMY,UAAU,CAAChB,4BAA4BM;IAE/C;;;;GAIC,GACD,MAAM,EACJW,uBAAuB,IAAI,EAC3B,gEAAgE;IAChEC,yBAAyB,EACzBC,MAAMR,cAAcQ,GAAG,EACvBC,iBAAiBT,cAAcS,cAAc,EAC7CC,KAAK,EACLC,oBAAoBC,YAAY,CAAC,CAAC,EACnC,GAAGd;IAEJ,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A,SAAStC;IACP,OAAOT,MAAMY,UAAU,CAACtB;AAC1B"}
|
@@ -19,6 +19,8 @@ const useStyles = /*#__PURE__*/__styles({
|
|
19
19
|
});
|
20
20
|
/** Applies style classnames to slots */
|
21
21
|
export const useFluentProviderStyles_unstable = state => {
|
22
|
+
'use no memo';
|
23
|
+
|
22
24
|
const renderer = useRenderer_unstable();
|
23
25
|
const styles = useStyles({
|
24
26
|
dir: state.dir,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","useRenderer_unstable","tokens","typographyStyles","fluentProviderClassNames","root","useStyles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useFluentProviderStyles_unstable","state","renderer","styles","dir","className","themeClassName"],"sources":["useFluentProviderStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1\n }\n});\n/** Applies style classnames to slots */ export const useFluentProviderStyles_unstable = (state)=>{\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,eAAe;AACxD,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAOjB,CAAC;AACF;AAAyC,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EAC9F,MAAMC,QAAQ,GAAGhB,oBAAoB,CAAC,CAAC;EACvC,MAAMiB,MAAM,GAAGZ,SAAS,CAAC;IACrBa,GAAG,EAAEH,KAAK,CAACG,GAAG;IACdF;EACJ,CAAC,CAAC;EACFD,KAAK,CAACX,IAAI,CAACe,SAAS,GAAGpB,YAAY,CAACI,wBAAwB,CAACC,IAAI,EAAEW,KAAK,CAACK,cAAc,EAAEH,MAAM,CAACb,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACe,SAAS,CAAC;EAC3H,OAAOJ,KAAK;AAChB,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","useRenderer_unstable","tokens","typographyStyles","fluentProviderClassNames","root","useStyles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useFluentProviderStyles_unstable","state","renderer","styles","dir","className","themeClassName"],"sources":["useFluentProviderStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1\n }\n});\n/** Applies style classnames to slots */ export const useFluentProviderStyles_unstable = (state)=>{\n 'use no memo';\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,eAAe;AACxD,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAOjB,CAAC;AACF;AAAyC,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EAC9F,aAAa;;EACb,MAAMC,QAAQ,GAAGhB,oBAAoB,CAAC,CAAC;EACvC,MAAMiB,MAAM,GAAGZ,SAAS,CAAC;IACrBa,GAAG,EAAEH,KAAK,CAACG,GAAG;IACdF;EACJ,CAAC,CAAC;EACFD,KAAK,CAACX,IAAI,CAACe,SAAS,GAAGpB,YAAY,CAACI,wBAAwB,CAACC,IAAI,EAAEW,KAAK,CAACK,cAAc,EAAEH,MAAM,CAACb,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACe,SAAS,CAAC;EAC3H,OAAOJ,KAAK;AAChB,CAAC","ignoreList":[]}
|
@@ -32,6 +32,7 @@ const insertSheet = (tag, rule)=>{
|
|
32
32
|
* @internal
|
33
33
|
* @returns CSS class to apply the rule
|
34
34
|
*/ export const useFluentProviderThemeStyleTag = (options)=>{
|
35
|
+
'use no memo';
|
35
36
|
const { targetDocument, theme, rendererAttributes } = options;
|
36
37
|
const styleTag = React.useRef();
|
37
38
|
const styleTagId = useId(fluentProviderClassNames.root);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProviderThemeStyleTag.ts"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { createCSSRuleFromTheme } from './createCSSRuleFromTheme';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = (React as never)['useInsertion' + 'Effect']\n ? (React as never)['useInsertion' + 'Effect']\n : useIsomorphicLayoutEffect;\n\nconst createStyleTag = (target: Document | undefined, elementAttributes: Record<string, string>) => {\n if (!target) {\n return undefined;\n }\n\n const tag = target.createElement('style');\n\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n\n target.head.appendChild(tag);\n return tag;\n};\n\nconst insertSheet = (tag: HTMLStyleElement, rule: string) => {\n const sheet = tag.sheet;\n\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (\n options: Pick<FluentProviderState, 'theme' | 'targetDocument'> & { rendererAttributes: Record<string, string> },\n) => {\n const { targetDocument, theme, rendererAttributes } = options;\n\n const styleTag = React.useRef<HTMLStyleElement | undefined | null>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n\n const rule = React.useMemo(() => createCSSRuleFromTheme(`.${styleTagId}`, theme), [theme, styleTagId]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useMemo(() => {\n // Heads up!\n // .useMemo() is used because it is called during render and DOM for _current_ component is not mounted yet. Also,\n // this allows to do checks with strict mode enabled as .useEffect() will be called with incremented IDs because\n // of double render.\n\n if (targetDocument) {\n const providerSelector = `.${fluentProviderClassNames.root}.${styleTagId}`;\n const providerElements = targetDocument.querySelectorAll(providerSelector);\n\n // In SSR, we will have DOM upfront. To avoid false positives the check on nested style tag is performed\n const isSSR = targetDocument.querySelector(`${providerSelector} > style[id=\"${styleTagId}\"]`) !== null;\n const elementsCount = isSSR ? 1 : 0;\n\n if (providerElements.length > elementsCount) {\n // eslint-disable-next-line no-console\n console.error(\n [\n '@fluentui/react-provider: There are conflicting ids in your DOM.',\n 'Please make sure that you configured your application properly.',\n '\\n',\n '\\n',\n 'Configuration guide: https://aka.ms/fluentui-conflicting-ids',\n ].join(' '),\n );\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument?.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement as HTMLStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, { ...styleElementAttributes, id: styleTagId });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n\n return () => {\n styleTag.current?.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n\n return { styleTagId, rule };\n};\n\nfunction useHandleSSRStyleElements(targetDocument: Document | undefined | null, styleTagId: string) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"names":["useId","useIsomorphicLayoutEffect","React","createCSSRuleFromTheme","fluentProviderClassNames","useInsertionEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","useFluentProviderThemeStyleTag","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","root","styleElementAttributes","useMemo","providerSelector","providerElements","querySelectorAll","isSSR","querySelector","elementsCount","join","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","remove","useState","themeStyleElement","append"],"mappings":"AAAA,SAASA,KAAK,EAAEC,yBAAyB,QAAQ,4BAA4B;AAC7E,YAAYC,WAAW,QAAQ;AAE/B,SAASC,sBAAsB,QAAQ,2BAA2B;AAElE,SAASC,wBAAwB,QAAQ,mCAAmC;AAE5E,4FAA4F;AAC5F,MAAMC,qBAAqB,AAACH,KAAe,CAAC,iBAAiB,SAAS,GAClE,AAACA,KAAe,CAAC,iBAAiB,SAAS,GAC3CD;AAEJ,MAAMK,iBAAiB,CAACC,QAA8BC;IACpD,IAAI,CAACD,QAAQ;QACX,OAAOE;IACT;IAEA,MAAMC,MAAMH,OAAOI,aAAa,CAAC;IAEjCC,OAAOC,IAAI,CAACL,mBAAmBM,OAAO,CAACC,CAAAA;QACrCL,IAAIM,YAAY,CAACD,UAAUP,iBAAiB,CAACO,SAAS;IACxD;IAEAR,OAAOU,IAAI,CAACC,WAAW,CAACR;IACxB,OAAOA;AACT;AAEA,MAAMS,cAAc,CAACT,KAAuBU;IAC1C,MAAMC,QAAQX,IAAIW,KAAK;IAEvB,IAAIA,OAAO;QACT,IAAIA,MAAMC,QAAQ,CAACC,MAAM,GAAG,GAAG;YAC7BF,MAAMG,UAAU,CAAC;QACnB;QACAH,MAAMI,UAAU,CAACL,MAAM;IACzB,OAAO,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QAChD,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;IAChB;AACF;AAEA;;;;CAIC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC;IAEA,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAEC,kBAAkB,EAAE,GAAGH;IAEtD,MAAMI,WAAWlC,MAAMmC,MAAM;IAE7B,MAAMC,aAAatC,MAAMI,yBAAyBmC,IAAI;IACtD,MAAMC,yBAAyBL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QAC1B;IACF,GAAG;QAAChB;QAAYL;QAAgBb;QAAMoB;KAAuB;IAE7D,OAAO;QAAEF;QAAYlB;IAAK;AAC5B,EAAE;AAEF,SAAS6B,0BAA0BhB,cAA2C,EAAEK,UAAkB;IAChG,qEAAqE;IACrE,4EAA4E;IAC5E,2FAA2F;IAC3F,4DAA4D;IAC5DpC,MAAMqD,QAAQ,CAAC;QACb,IAAI,CAACtB,gBAAgB;YACnB;QACF;QAEA,MAAMuB,oBAAoBvB,eAAekB,cAAc,CAACb;QACxD,IAAIkB,mBAAmB;YACrBvB,eAAehB,IAAI,CAACwC,MAAM,CAACD;QAC7B;IACF;AACF"}
|
1
|
+
{"version":3,"sources":["useFluentProviderThemeStyleTag.ts"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { createCSSRuleFromTheme } from './createCSSRuleFromTheme';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = (React as never)['useInsertion' + 'Effect']\n ? (React as never)['useInsertion' + 'Effect']\n : useIsomorphicLayoutEffect;\n\nconst createStyleTag = (target: Document | undefined, elementAttributes: Record<string, string>) => {\n if (!target) {\n return undefined;\n }\n\n const tag = target.createElement('style');\n\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n\n target.head.appendChild(tag);\n return tag;\n};\n\nconst insertSheet = (tag: HTMLStyleElement, rule: string) => {\n const sheet = tag.sheet;\n\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (\n options: Pick<FluentProviderState, 'theme' | 'targetDocument'> & { rendererAttributes: Record<string, string> },\n) => {\n 'use no memo';\n\n const { targetDocument, theme, rendererAttributes } = options;\n\n const styleTag = React.useRef<HTMLStyleElement | undefined | null>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n\n const rule = React.useMemo(() => createCSSRuleFromTheme(`.${styleTagId}`, theme), [theme, styleTagId]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useMemo(() => {\n // Heads up!\n // .useMemo() is used because it is called during render and DOM for _current_ component is not mounted yet. Also,\n // this allows to do checks with strict mode enabled as .useEffect() will be called with incremented IDs because\n // of double render.\n\n if (targetDocument) {\n const providerSelector = `.${fluentProviderClassNames.root}.${styleTagId}`;\n const providerElements = targetDocument.querySelectorAll(providerSelector);\n\n // In SSR, we will have DOM upfront. To avoid false positives the check on nested style tag is performed\n const isSSR = targetDocument.querySelector(`${providerSelector} > style[id=\"${styleTagId}\"]`) !== null;\n const elementsCount = isSSR ? 1 : 0;\n\n if (providerElements.length > elementsCount) {\n // eslint-disable-next-line no-console\n console.error(\n [\n '@fluentui/react-provider: There are conflicting ids in your DOM.',\n 'Please make sure that you configured your application properly.',\n '\\n',\n '\\n',\n 'Configuration guide: https://aka.ms/fluentui-conflicting-ids',\n ].join(' '),\n );\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument?.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement as HTMLStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, { ...styleElementAttributes, id: styleTagId });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n\n return () => {\n styleTag.current?.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n\n return { styleTagId, rule };\n};\n\nfunction useHandleSSRStyleElements(targetDocument: Document | undefined | null, styleTagId: string) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"names":["useId","useIsomorphicLayoutEffect","React","createCSSRuleFromTheme","fluentProviderClassNames","useInsertionEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","useFluentProviderThemeStyleTag","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","root","styleElementAttributes","useMemo","providerSelector","providerElements","querySelectorAll","isSSR","querySelector","elementsCount","join","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","remove","useState","themeStyleElement","append"],"mappings":"AAAA,SAASA,KAAK,EAAEC,yBAAyB,QAAQ,4BAA4B;AAC7E,YAAYC,WAAW,QAAQ;AAE/B,SAASC,sBAAsB,QAAQ,2BAA2B;AAElE,SAASC,wBAAwB,QAAQ,mCAAmC;AAE5E,4FAA4F;AAC5F,MAAMC,qBAAqB,AAACH,KAAe,CAAC,iBAAiB,SAAS,GAClE,AAACA,KAAe,CAAC,iBAAiB,SAAS,GAC3CD;AAEJ,MAAMK,iBAAiB,CAACC,QAA8BC;IACpD,IAAI,CAACD,QAAQ;QACX,OAAOE;IACT;IAEA,MAAMC,MAAMH,OAAOI,aAAa,CAAC;IAEjCC,OAAOC,IAAI,CAACL,mBAAmBM,OAAO,CAACC,CAAAA;QACrCL,IAAIM,YAAY,CAACD,UAAUP,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AIF,iBAAiBpB,MAAM,GAAGwB,eAAe;oBAC3C,sCAAsC;oBACtClB,QAAQC,KAAK,CACX;wBACE;wBACA;wBACA;wBACA;wBACA;qBACD,CAACkB,IAAI,CAAC;gBAEX;YACF;QACA,uDAAuD;QACzD,GAAG,EAAE;IACP;IAEAC,0BAA0BhB,gBAAgBK;IAC1CjC,mBAAmB;QACjB,wFAAwF;QACxF,MAAM6C,kBAAkBjB,2BAAAA,qCAAAA,eAAgBkB,cAAc,CAACb;QACvD,IAAIY,iBAAiB;YACnBd,SAASgB,OAAO,GAAGF;QACrB,OAAO;YACLd,SAASgB,OAAO,GAAG9C,eAAe2B,gBAAgB;gBAAE,GAAGO,sBAAsB;gBAAEa,IAAIf;YAAW;YAC9F,IAAIF,SAASgB,OAAO,EAAE;gBACpBjC,YAAYiB,SAASgB,OAAO,EAAEhC;YAChC;QACF;QAEA,OAAO;gBACLgB;aAAAA,oBAAAA,SAASgB,OAAO,cAAhBhB,wCAAAA,kBAAkBkB,MAAM;QAC1B;IACF,GAAG;QAAChB;QAAYL;QAAgBb;QAAMoB;KAAuB;IAE7D,OAAO;QAAEF;QAAYlB;IAAK;AAC5B,EAAE;AAEF,SAAS6B,0BAA0BhB,cAA2C,EAAEK,UAAkB;IAChG,qEAAqE;IACrE,4EAA4E;IAC5E,2FAA2F;IAC3F,4DAA4D;IAC5DpC,MAAMqD,QAAQ,CAAC;QACb,IAAI,CAACtB,gBAAgB;YACnB;QACF;QAEA,MAAMuB,oBAAoBvB,eAAekB,cAAc,CAACb;QACxD,IAAIkB,mBAAmB;YACrBvB,eAAehB,IAAI,CAACwC,MAAM,CAACD;QAC7B;IACF;AACF"}
|
@@ -19,6 +19,7 @@ const _useFluentProviderThemeStyleTag = require("./useFluentProviderThemeStyleTa
|
|
19
19
|
const DEFAULT_STYLE_HOOKS = {};
|
20
20
|
const DEFAULT_RENDERER_ATTRIBUTES = {};
|
21
21
|
const useFluentProvider_unstable = (props, ref)=>{
|
22
|
+
'use no memo';
|
22
23
|
const parentContext = (0, _reactsharedcontexts.useFluent_unstable)();
|
23
24
|
const parentTheme = useTheme();
|
24
25
|
const parentOverrides = (0, _reactsharedcontexts.useOverrides_unstable)();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProvider.js"],"sourcesContent":["import { useRenderer_unstable } from '@griffel/react';\nimport { useFocusVisible } from '@fluentui/react-tabster';\nimport { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, CustomStyleHooksContext_unstable as CustomStyleHooksContext } from '@fluentui/react-shared-contexts';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\n// Meomizing empty objects to avoid unnecessary rerenders.\nconst DEFAULT_STYLE_HOOKS = {};\nconst DEFAULT_RENDERER_ATTRIBUTES = {};\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */ export const useFluentProvider_unstable = (props, ref)=>{\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks = React.useContext(CustomStyleHooksContext) || DEFAULT_STYLE_HOOKS;\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */ const { applyStylesToPortals = true, // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable, dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme, overrides_unstable: overrides = {} } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);\n const renderer = useRenderer_unstable();\n var _renderer_styleElementAttributes;\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !== void 0 ? _renderer_styleElementAttributes : DEFAULT_RENDERER_ATTRIBUTES\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(()=>{\n if (mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn([\n '@fluentui/react-provider: FluentProvider does not have your \"theme\" defined.',\n \"Make sure that your top-level FluentProvider has set a `theme` prop or you're setting the theme in your child FluentProvider.\"\n ].join(' '));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n ...props,\n dir,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusVisible({\n targetDocument\n }))\n }), {\n elementType: 'div'\n }),\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId\n }\n }\n };\n};\nfunction shallowMerge(a, b) {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return {\n ...a,\n ...b\n };\n }\n if (a) {\n return a;\n }\n return b;\n}\nfunction useTheme() {\n return React.useContext(ThemeContext);\n}\n"],"names":["useFluentProvider_unstable","DEFAULT_STYLE_HOOKS","DEFAULT_RENDERER_ATTRIBUTES","props","ref","parentContext","useFluent","parentTheme","useTheme","parentOverrides","useOverrides","parentCustomStyleHooks","React","useContext","CustomStyleHooksContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","renderer","useRenderer_unstable","_renderer_styleElementAttributes","styleTagId","rule","useFluentProviderThemeStyleTag","rendererAttributes","styleElementAttributes","process","env","NODE_ENV","useEffect","undefined","console","warn","join","themeClassName","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","useFocusVisible","elementType","serverStyleProps","cssRule","attributes","id","a","b","ThemeContext"],"mappings":";;;;+BAiBiBA;;;eAAAA;;;;uBAjBoB;8BACL;qCAC2J;gCAC7H;kEACvC;gDACwB;AAC/C,0DAA0D;AAC1D,MAAMC,sBAAsB,CAAC;AAC7B,MAAMC,8BAA8B,CAAC;AAS1B,MAAMF,6BAA6B,CAACG,OAAOC;IAClD,MAAMC,gBAAgBC,IAAAA,uCAAS;IAC/B,MAAMC,cAAcC;IACpB,MAAMC,kBAAkBC,IAAAA,0CAAY;IACpC,MAAMC,yBAAyBC,QAAMC,UAAU,CAACC,qDAAuB,KAAKb;IAC5E;;;;GAID,GAAG,MAAM,EAAEc,uBAAuB,IAAI,EACrCC,yBAAyB,EAAEC,MAAMZ,cAAcY,GAAG,EAAEC,iBAAiBb,cAAca,cAAc,EAAEC,KAAK,EAAEC,oBAAoBC,YAAY,CAAC,CAAC,EAAE,GAAGlB;IACjJ,MAAMmB,cAAcC,aAAahB,aAAaY;IAC9C,MAAMK,kBAAkBD,aAAad,iBAAiBY;IACtD,MAAMI,yBAAyBF,aAAaZ,wBAAwBK;IACpE,MAAMU,WAAWC,IAAAA,2BAAoB;IACrC,IAAIC;IACJ,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAE,GAAGC,IAAAA,8DAA8B,EAAC;QACxDZ,OAAOG;QACPJ;QACAc,oBAAoB,AAACJ,CAAAA,mCAAmCF,SAASO,sBAAsB,AAAD,MAAO,QAAQL,qCAAqC,KAAK,IAAIA,mCAAmC1B;IAC1L;IACA,IAAIgC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sDAAsD;QACtDxB,QAAMyB,SAAS,CAAC;YACZ,IAAIf,gBAAgBgB,WAAW;gBAC3B,sCAAsC;gBACtCC,QAAQC,IAAI,CAAC;oBACT;oBACA;iBACH,CAACC,IAAI,CAAC;YACX;QACJ,uDAAuD;QACvD,GAAG,EAAE;IACT;IACA,OAAO;QACH1B;QACA,gEAAgE;QAChEC,2BAA2BS;QAC3BR;QACAC;QACAC,OAAOG;QACP,gEAAgE;QAChEF,oBAAoBI;QACpBkB,gBAAgBb;QAChBc,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,GAAG5C,KAAK;YACRc;YACA,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5Fb,KAAK4C,IAAAA,6BAAa,EAAC5C,KAAK6C,IAAAA,6BAAe,EAAC;gBACpC/B;YACJ;QACJ,IAAI;YACAgC,aAAa;QACjB;QACAC,kBAAkB;YACdC,SAAStB;YACTuB,YAAY;gBACR,GAAG3B,SAASO,sBAAsB;gBAClCqB,IAAIzB;YACR;QACJ;IACJ;AACJ;AACA,SAASN,aAAagC,CAAC,EAAEC,CAAC;IACtB,kEAAkE;IAClE,IAAID,KAAKC,GAAG;QACR,OAAO;YACH,GAAGD,CAAC;YACJ,GAAGC,CAAC;QACR;IACJ;IACA,IAAID,GAAG;QACH,OAAOA;IACX;IACA,OAAOC;AACX;AACA,SAAShD;IACL,OAAOI,QAAMC,UAAU,CAAC4C,0CAAY;AACxC"}
|
1
|
+
{"version":3,"sources":["useFluentProvider.js"],"sourcesContent":["import { useRenderer_unstable } from '@griffel/react';\nimport { useFocusVisible } from '@fluentui/react-tabster';\nimport { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, CustomStyleHooksContext_unstable as CustomStyleHooksContext } from '@fluentui/react-shared-contexts';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\n// Meomizing empty objects to avoid unnecessary rerenders.\nconst DEFAULT_STYLE_HOOKS = {};\nconst DEFAULT_RENDERER_ATTRIBUTES = {};\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */ export const useFluentProvider_unstable = (props, ref)=>{\n 'use no memo';\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks = React.useContext(CustomStyleHooksContext) || DEFAULT_STYLE_HOOKS;\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */ const { applyStylesToPortals = true, // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable, dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme, overrides_unstable: overrides = {} } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);\n const renderer = useRenderer_unstable();\n var _renderer_styleElementAttributes;\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !== void 0 ? _renderer_styleElementAttributes : DEFAULT_RENDERER_ATTRIBUTES\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(()=>{\n if (mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn([\n '@fluentui/react-provider: FluentProvider does not have your \"theme\" defined.',\n \"Make sure that your top-level FluentProvider has set a `theme` prop or you're setting the theme in your child FluentProvider.\"\n ].join(' '));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n ...props,\n dir,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusVisible({\n targetDocument\n }))\n }), {\n elementType: 'div'\n }),\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId\n }\n }\n };\n};\nfunction shallowMerge(a, b) {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return {\n ...a,\n ...b\n };\n }\n if (a) {\n return a;\n }\n return b;\n}\nfunction useTheme() {\n return React.useContext(ThemeContext);\n}\n"],"names":["useFluentProvider_unstable","DEFAULT_STYLE_HOOKS","DEFAULT_RENDERER_ATTRIBUTES","props","ref","parentContext","useFluent","parentTheme","useTheme","parentOverrides","useOverrides","parentCustomStyleHooks","React","useContext","CustomStyleHooksContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","renderer","useRenderer_unstable","_renderer_styleElementAttributes","styleTagId","rule","useFluentProviderThemeStyleTag","rendererAttributes","styleElementAttributes","process","env","NODE_ENV","useEffect","undefined","console","warn","join","themeClassName","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","useFocusVisible","elementType","serverStyleProps","cssRule","attributes","id","a","b","ThemeContext"],"mappings":";;;;+BAiBiBA;;;eAAAA;;;;uBAjBoB;8BACL;qCAC2J;gCAC7H;kEACvC;gDACwB;AAC/C,0DAA0D;AAC1D,MAAMC,sBAAsB,CAAC;AAC7B,MAAMC,8BAA8B,CAAC;AAS1B,MAAMF,6BAA6B,CAACG,OAAOC;IAClD;IACA,MAAMC,gBAAgBC,IAAAA,uCAAS;IAC/B,MAAMC,cAAcC;IACpB,MAAMC,kBAAkBC,IAAAA,0CAAY;IACpC,MAAMC,yBAAyBC,QAAMC,UAAU,CAACC,qDAAuB,KAAKb;IAC5E;;;;GAID,GAAG,MAAM,EAAEc,uBAAuB,IAAI,EACrCC,yBAAyB,EAAEC,MAAMZ,cAAcY,GAAG,EAAEC,iBAAiBb,cAAca,cAAc,EAAEC,KAAK,EAAEC,oBAAoBC,YAAY,CAAC,CAAC,EAAE,GAAGlB;IACjJ,MAAMmB,cAAcC,aAAahB,aAAaY;IAC9C,MAAMK,kBAAkBD,aAAad,iBAAiBY;IACtD,MAAMI,yBAAyBF,aAAaZ,wBAAwBK;IACpE,MAAMU,WAAWC,IAAAA,2BAAoB;IACrC,IAAIC;IACJ,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAE,GAAGC,IAAAA,8DAA8B,EAAC;QACxDZ,OAAOG;QACPJ;QACAc,oBAAoB,AAACJ,CAAAA,mCAAmCF,SAASO,sBAAsB,AAAD,MAAO,QAAQL,qCAAqC,KAAK,IAAIA,mCAAmC1B;IAC1L;IACA,IAAIgC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sDAAsD;QACtDxB,QAAMyB,SAAS,CAAC;YACZ,IAAIf,gBAAgBgB,WAAW;gBAC3B,sCAAsC;gBACtCC,QAAQC,IAAI,CAAC;oBACT;oBACA;iBACH,CAACC,IAAI,CAAC;YACX;QACJ,uDAAuD;QACvD,GAAG,EAAE;IACT;IACA,OAAO;QACH1B;QACA,gEAAgE;QAChEC,2BAA2BS;QAC3BR;QACAC;QACAC,OAAOG;QACP,gEAAgE;QAChEF,oBAAoBI;QACpBkB,gBAAgBb;QAChBc,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,GAAG5C,KAAK;YACRc;YACA,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5Fb,KAAK4C,IAAAA,6BAAa,EAAC5C,KAAK6C,IAAAA,6BAAe,EAAC;gBACpC/B;YACJ;QACJ,IAAI;YACAgC,aAAa;QACjB;QACAC,kBAAkB;YACdC,SAAStB;YACTuB,YAAY;gBACR,GAAG3B,SAASO,sBAAsB;gBAClCqB,IAAIzB;YACR;QACJ;IACJ;AACJ;AACA,SAASN,aAAagC,CAAC,EAAEC,CAAC;IACtB,kEAAkE;IAClE,IAAID,KAAKC,GAAG;QACR,OAAO;YACH,GAAGD,CAAC;YACJ,GAAGC,CAAC;QACR;IACJ;IACA,IAAID,GAAG;QACH,OAAOA;IACX;IACA,OAAOC;AACX;AACA,SAAShD;IACL,OAAOI,QAAMC,UAAU,CAAC4C,0CAAY;AACxC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProviderStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n fsow6f: [\"f1o700av\", \"fes3tcz\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1o700av{text-align:left;}\", \".fes3tcz{text-align:right;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = state => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useFluentProviderStyles.styles.js.map"],"names":["fluentProviderClassNames","useFluentProviderStyles_unstable","root","useStyles","__styles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","renderer","useRenderer_unstable","styles","dir","className","mergeClasses","themeClassName"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB;eAAxBA;;IAiBAC,gCAAgC;eAAhCA;;;sBApB0B;uBACF;AAE9B,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,cAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAmD;QAA8D;QAA+B;QAA+B;QAAgD;QAA+C;QAAmD;KAAmD;AAC1X;AAEO,MAAMX,mCAAmCY,CAAAA;IAC9C,MAAMC,WAAWC,IAAAA,2BAAoB;IACrC,MAAMC,SAASb,UAAU;QACvBc,KAAKJ,MAAMI,GAAG;QACdH;IACF;IACAD,MAAMX,IAAI,CAACgB,SAAS,GAAGC,IAAAA,kBAAY,EAACnB,yBAAyBE,IAAI,EAAEW,MAAMO,cAAc,EAAEJ,OAAOd,IAAI,EAAEW,MAAMX,IAAI,CAACgB,SAAS;IAC1H,OAAOL;AACT,GACA,0DAA0D"}
|
1
|
+
{"version":3,"sources":["useFluentProviderStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n fsow6f: [\"f1o700av\", \"fes3tcz\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1o700av{text-align:left;}\", \".fes3tcz{text-align:right;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = state => {\n 'use no memo';\n\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useFluentProviderStyles.styles.js.map"],"names":["fluentProviderClassNames","useFluentProviderStyles_unstable","root","useStyles","__styles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","renderer","useRenderer_unstable","styles","dir","className","mergeClasses","themeClassName"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB;eAAxBA;;IAiBAC,gCAAgC;eAAhCA;;;sBApB0B;uBACF;AAE9B,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,cAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAmD;QAA8D;QAA+B;QAA+B;QAAgD;QAA+C;QAAmD;KAAmD;AAC1X;AAEO,MAAMX,mCAAmCY,CAAAA;IAC9C;IAEA,MAAMC,WAAWC,IAAAA,2BAAoB;IACrC,MAAMC,SAASb,UAAU;QACvBc,KAAKJ,MAAMI,GAAG;QACdH;IACF;IACAD,MAAMX,IAAI,CAACgB,SAAS,GAAGC,IAAAA,kBAAY,EAACnB,yBAAyBE,IAAI,EAAEW,MAAMO,cAAc,EAAEJ,OAAOd,IAAI,EAAEW,MAAMX,IAAI,CAACgB,SAAS;IAC1H,OAAOL;AACT,GACA,0DAA0D"}
|
@@ -39,6 +39,7 @@ const insertSheet = (tag, rule)=>{
|
|
39
39
|
}
|
40
40
|
};
|
41
41
|
const useFluentProviderThemeStyleTag = (options)=>{
|
42
|
+
'use no memo';
|
42
43
|
const { targetDocument, theme, rendererAttributes } = options;
|
43
44
|
const styleTag = _react.useRef();
|
44
45
|
const styleTagId = (0, _reactutilities.useId)(_useFluentProviderStylesstyles.fluentProviderClassNames.root);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProviderThemeStyleTag.js"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCSSRuleFromTheme } from './createCSSRuleFromTheme';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useIsomorphicLayoutEffect;\nconst createStyleTag = (target, elementAttributes)=>{\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n Object.keys(elementAttributes).forEach((attrName)=>{\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n target.head.appendChild(tag);\n return tag;\n};\nconst insertSheet = (tag, rule)=>{\n const sheet = tag.sheet;\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */ export const useFluentProviderThemeStyleTag = (options)=>{\n const { targetDocument, theme, rendererAttributes } = options;\n const styleTag = React.useRef();\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n const rule = React.useMemo(()=>createCSSRuleFromTheme(`.${styleTagId}`, theme), [\n theme,\n styleTagId\n ]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useMemo(()=>{\n // Heads up!\n // .useMemo() is used because it is called during render and DOM for _current_ component is not mounted yet. Also,\n // this allows to do checks with strict mode enabled as .useEffect() will be called with incremented IDs because\n // of double render.\n if (targetDocument) {\n const providerSelector = `.${fluentProviderClassNames.root}.${styleTagId}`;\n const providerElements = targetDocument.querySelectorAll(providerSelector);\n // In SSR, we will have DOM upfront. To avoid false positives the check on nested style tag is performed\n const isSSR = targetDocument.querySelector(`${providerSelector} > style[id=\"${styleTagId}\"]`) !== null;\n const elementsCount = isSSR ? 1 : 0;\n if (providerElements.length > elementsCount) {\n // eslint-disable-next-line no-console\n console.error([\n '@fluentui/react-provider: There are conflicting ids in your DOM.',\n 'Please make sure that you configured your application properly.',\n '\\n',\n '\\n',\n 'Configuration guide: https://aka.ms/fluentui-conflicting-ids'\n ].join(' '));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(()=>{\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, {\n ...styleElementAttributes,\n id: styleTagId\n });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n return ()=>{\n var _styleTag_current;\n (_styleTag_current = styleTag.current) === null || _styleTag_current === void 0 ? void 0 : _styleTag_current.remove();\n };\n }, [\n styleTagId,\n targetDocument,\n rule,\n styleElementAttributes\n ]);\n return {\n styleTagId,\n rule\n };\n};\nfunction useHandleSSRStyleElements(targetDocument, styleTagId) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(()=>{\n if (!targetDocument) {\n return;\n }\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"names":["useFluentProviderThemeStyleTag","useInsertionEffect","React","useIsomorphicLayoutEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","useId","fluentProviderClassNames","root","styleElementAttributes","useMemo","createCSSRuleFromTheme","providerSelector","providerElements","querySelectorAll","isSSR","querySelector","elementsCount","join","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"mappings":";;;;+BAiCiBA;;;eAAAA;;;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AC3F,4DAA4D;IAC5DjC,OAAMsD,QAAQ,CAAC;QACX,IAAI,CAAC1B,gBAAgB;YACjB;QACJ;QACA,MAAM2B,oBAAoB3B,eAAeqB,cAAc,CAAChB;QACxD,IAAIsB,mBAAmB;YACnB3B,eAAef,IAAI,CAAC2C,MAAM,CAACD;QAC/B;IACJ;AACJ"}
|
1
|
+
{"version":3,"sources":["useFluentProviderThemeStyleTag.js"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCSSRuleFromTheme } from './createCSSRuleFromTheme';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useIsomorphicLayoutEffect;\nconst createStyleTag = (target, elementAttributes)=>{\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n Object.keys(elementAttributes).forEach((attrName)=>{\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n target.head.appendChild(tag);\n return tag;\n};\nconst insertSheet = (tag, rule)=>{\n const sheet = tag.sheet;\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */ export const useFluentProviderThemeStyleTag = (options)=>{\n 'use no memo';\n const { targetDocument, theme, rendererAttributes } = options;\n const styleTag = React.useRef();\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n const rule = React.useMemo(()=>createCSSRuleFromTheme(`.${styleTagId}`, theme), [\n theme,\n styleTagId\n ]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useMemo(()=>{\n // Heads up!\n // .useMemo() is used because it is called during render and DOM for _current_ component is not mounted yet. Also,\n // this allows to do checks with strict mode enabled as .useEffect() will be called with incremented IDs because\n // of double render.\n if (targetDocument) {\n const providerSelector = `.${fluentProviderClassNames.root}.${styleTagId}`;\n const providerElements = targetDocument.querySelectorAll(providerSelector);\n // In SSR, we will have DOM upfront. To avoid false positives the check on nested style tag is performed\n const isSSR = targetDocument.querySelector(`${providerSelector} > style[id=\"${styleTagId}\"]`) !== null;\n const elementsCount = isSSR ? 1 : 0;\n if (providerElements.length > elementsCount) {\n // eslint-disable-next-line no-console\n console.error([\n '@fluentui/react-provider: There are conflicting ids in your DOM.',\n 'Please make sure that you configured your application properly.',\n '\\n',\n '\\n',\n 'Configuration guide: https://aka.ms/fluentui-conflicting-ids'\n ].join(' '));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(()=>{\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, {\n ...styleElementAttributes,\n id: styleTagId\n });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n return ()=>{\n var _styleTag_current;\n (_styleTag_current = styleTag.current) === null || _styleTag_current === void 0 ? void 0 : _styleTag_current.remove();\n };\n }, [\n styleTagId,\n targetDocument,\n rule,\n styleElementAttributes\n ]);\n return {\n styleTagId,\n rule\n };\n};\nfunction useHandleSSRStyleElements(targetDocument, styleTagId) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(()=>{\n if (!targetDocument) {\n return;\n }\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"names":["useFluentProviderThemeStyleTag","useInsertionEffect","React","useIsomorphicLayoutEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","useId","fluentProviderClassNames","root","styleElementAttributes","useMemo","createCSSRuleFromTheme","providerSelector","providerElements","querySelectorAll","isSSR","querySelector","elementsCount","join","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"mappings":";;;;+BAiCiBA;;;eAAAA;;;;gCAjCgC;iEAC1B;wCACgB;+CACE;AACzC,4FAA4F;AAC5F,MAAMC,qBAAqBC,MAAK,CAAC,iBAAiB,SAAS,GAAGA,MAAK,CAAC,iBAAiB,SAAS,GAAGC,yCAAyB;AAC1H,MAAMC,iBAAiB,CAACC,QAAQC;IAC5B,IAAI,CAACD,QAAQ;QACT,OAAOE;IACX;IACA,MAAMC,MAAMH,OAAOI,aAAa,CAAC;IACjCC,OAAOC,IAAI,CAACL,mBAAmBM,OAAO,CAAC,CAACC;QACpCL,IAAIM,YAAY,CAACD,UAAUP,iBAAiB,CAACO,SAAS;IAC1D;IACAR,OAAOU,IAAI,CAACC,WAAW,CAACR;IACxB,OAAOA;AACX;AACA,MAAMS,cAAc,CAACT,KAAKU;IACtB,MAAMC,QAAQX,IAAIW,KAAK;IACvB,IAAIA,OAAO;QACP,IAAIA,MAAMC,QAAQ,CAACC,MAAM,GAAG,GAAG;YAC3BF,MAAMG,UAAU,CAAC;QACrB;QACAH,MAAMI,UAAU,CAACL,MAAM;IAC3B,OAAO,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QAC9C,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;IACl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AGF;QACvB,OAAO;YACHjB,SAASmB,OAAO,GAAGhD,eAAe0B,gBAAgB;gBAC9C,GAAGS,sBAAsB;gBACzBc,IAAIlB;YACR;YACA,IAAIF,SAASmB,OAAO,EAAE;gBAClBnC,YAAYgB,SAASmB,OAAO,EAAElC;YAClC;QACJ;QACA,OAAO;YACH,IAAIoC;YACHA,CAAAA,oBAAoBrB,SAASmB,OAAO,AAAD,MAAO,QAAQE,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBC,MAAM;QACvH;IACJ,GAAG;QACCpB;QACAL;QACAZ;QACAqB;KACH;IACD,OAAO;QACHJ;QACAjB;IACJ;AACJ;AACA,SAAS+B,0BAA0BnB,cAAc,EAAEK,UAAU;IACzD,qEAAqE;IACrE,4EAA4E;IAC5E,2FAA2F;IAC3F,4DAA4D;IAC5DjC,OAAMsD,QAAQ,CAAC;QACX,IAAI,CAAC1B,gBAAgB;YACjB;QACJ;QACA,MAAM2B,oBAAoB3B,eAAeqB,cAAc,CAAChB;QACxD,IAAIsB,mBAAmB;YACnB3B,eAAef,IAAI,CAAC2C,MAAM,CAACD;QAC/B;IACJ;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-provider",
|
3
|
-
"version": "9.16.
|
3
|
+
"version": "9.16.4",
|
4
4
|
"description": "Fluent UI React provider component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -32,12 +32,12 @@
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-icons": "^2.0.
|
35
|
+
"@fluentui/react-icons": "^2.0.245",
|
36
36
|
"@fluentui/react-shared-contexts": "^9.19.0",
|
37
|
-
"@fluentui/react-tabster": "^9.22.
|
37
|
+
"@fluentui/react-tabster": "^9.22.1",
|
38
38
|
"@fluentui/react-theme": "^9.1.19",
|
39
|
-
"@fluentui/react-utilities": "^9.18.
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
39
|
+
"@fluentui/react-utilities": "^9.18.11",
|
40
|
+
"@fluentui/react-jsx-runtime": "^9.0.40",
|
41
41
|
"@griffel/core": "^1.16.0",
|
42
42
|
"@griffel/react": "^1.5.22",
|
43
43
|
"@swc/helpers": "^0.5.1"
|