@fluentui/react-provider 9.1.9 → 9.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +40 -1
- package/CHANGELOG.md +15 -2
- package/dist/index.d.ts +8 -1
- package/lib/components/FluentProvider/FluentProvider.types.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProvider.js +2 -0
- package/lib/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderContextValues.js +5 -3
- package/lib/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/lib-amd/components/FluentProvider/FluentProvider.types.js.map +1 -1
- package/lib-amd/components/FluentProvider/useFluentProvider.js +2 -1
- package/lib-amd/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib-amd/components/FluentProvider/useFluentProviderContextValues.js +2 -2
- package/lib-amd/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js +2 -0
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js +5 -3
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,46 @@
|
|
2
2
|
"name": "@fluentui/react-provider",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Tue, 20 Dec 2022 14:55:52 GMT",
|
6
|
+
"tag": "@fluentui/react-provider_v9.1.10",
|
7
|
+
"version": "9.1.10",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "olfedias@microsoft.com",
|
12
|
+
"package": "@fluentui/react-provider",
|
13
|
+
"commit": "15328c336f754535450e7190802b9ea4b948f5e6",
|
14
|
+
"comment": "add \"applyStylesToPortals\" prop"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-provider",
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.1.3",
|
20
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-provider",
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v9.3.3",
|
26
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-provider",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.1.4",
|
32
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-provider",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.3.0",
|
38
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"date": "Mon, 05 Dec 2022 18:29:28 GMT",
|
6
45
|
"tag": "@fluentui/react-provider_v9.1.9",
|
7
46
|
"version": "9.1.9",
|
8
47
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-provider
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 20 Dec 2022 14:55:52 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.1.10)
|
8
|
+
|
9
|
+
Tue, 20 Dec 2022 14:55:52 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.1.9..@fluentui/react-provider_v9.1.10)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- add "applyStylesToPortals" prop ([PR #25965](https://github.com/microsoft/fluentui/pull/25965) by olfedias@microsoft.com)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v9.3.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v9.1.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
19
|
+
|
7
20
|
## [9.1.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.1.9)
|
8
21
|
|
9
|
-
Mon, 05 Dec 2022 18:
|
22
|
+
Mon, 05 Dec 2022 18:29:28 GMT
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.1.8..@fluentui/react-provider_v9.1.9)
|
11
24
|
|
12
25
|
### Patches
|
package/dist/index.d.ts
CHANGED
@@ -11,6 +11,7 @@ import type { ThemeContextValue_unstable } from '@fluentui/react-shared-contexts
|
|
11
11
|
import type { TooltipVisibilityContextValue_unstable } from '@fluentui/react-shared-contexts';
|
12
12
|
|
13
13
|
export declare const FluentProvider: React_2.ForwardRefExoticComponent<Omit<ComponentProps<FluentProviderSlots, "root">, "dir"> & {
|
14
|
+
applyStylesToPortals?: boolean | undefined;
|
14
15
|
dir?: "ltr" | "rtl" | undefined;
|
15
16
|
targetDocument?: Document | undefined;
|
16
17
|
theme?: Partial<Theme> | undefined;
|
@@ -26,10 +27,16 @@ export declare type FluentProviderContextValues = Pick<FluentProviderState, 'the
|
|
26
27
|
};
|
27
28
|
|
28
29
|
export declare type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {
|
30
|
+
/**
|
31
|
+
* Passes styles applied to a component down to portals if enabled.
|
32
|
+
* @default true
|
33
|
+
*/
|
34
|
+
applyStylesToPortals?: boolean;
|
29
35
|
/** Sets the direction of text & generated styles. */
|
30
36
|
dir?: 'ltr' | 'rtl';
|
31
37
|
/** Provides the document, can be undefined during SSR render. */
|
32
38
|
targetDocument?: Document;
|
39
|
+
/** Sets the theme used in a scope. */
|
33
40
|
theme?: PartialTheme;
|
34
41
|
};
|
35
42
|
|
@@ -37,7 +44,7 @@ export declare type FluentProviderSlots = {
|
|
37
44
|
root: Slot<'div'>;
|
38
45
|
};
|
39
46
|
|
40
|
-
export declare type FluentProviderState = ComponentState<FluentProviderSlots> & Pick<FluentProviderProps, 'targetDocument'> & Required<Pick<FluentProviderProps, 'dir'>> & {
|
47
|
+
export declare type FluentProviderState = ComponentState<FluentProviderSlots> & Pick<FluentProviderProps, 'targetDocument'> & Required<Pick<FluentProviderProps, 'applyStylesToPortals' | 'dir'>> & {
|
41
48
|
theme: ThemeContextValue_unstable;
|
42
49
|
themeClassName: string;
|
43
50
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FluentProvider.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { PartialTheme } from '@fluentui/react-theme';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type FluentProviderSlots = {\n root: Slot<'div'>;\n};\n\nexport type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {\n /** Sets the direction of text & generated styles. */\n dir?: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n\n theme?: PartialTheme;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<Pick<FluentProviderProps, 'dir'>> & {\n theme: ThemeContextValue;\n themeClassName: string;\n };\n\nexport type FluentProviderContextValues = Pick<FluentProviderState, 'theme'> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n tooltip: TooltipVisibilityContextValue;\n};\n"]}
|
1
|
+
{"version":3,"file":"FluentProvider.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { PartialTheme } from '@fluentui/react-theme';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type FluentProviderSlots = {\n root: Slot<'div'>;\n};\n\nexport type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {\n /**\n * Passes styles applied to a component down to portals if enabled.\n * @default true\n */\n applyStylesToPortals?: boolean;\n\n /** Sets the direction of text & generated styles. */\n dir?: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n\n /** Sets the theme used in a scope. */\n theme?: PartialTheme;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<Pick<FluentProviderProps, 'applyStylesToPortals' | 'dir'>> & {\n theme: ThemeContextValue;\n themeClassName: string;\n };\n\nexport type FluentProviderContextValues = Pick<FluentProviderState, 'theme'> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n tooltip: TooltipVisibilityContextValue;\n};\n"]}
|
@@ -23,6 +23,7 @@ export const useFluentProvider_unstable = (props, ref) => {
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
const {
|
26
|
+
applyStylesToPortals = true,
|
26
27
|
dir = parentContext.dir,
|
27
28
|
targetDocument = parentContext.targetDocument,
|
28
29
|
theme
|
@@ -40,6 +41,7 @@ export const useFluentProvider_unstable = (props, ref) => {
|
|
40
41
|
|
41
42
|
}, []);
|
42
43
|
return {
|
44
|
+
applyStylesToPortals,
|
43
45
|
dir,
|
44
46
|
targetDocument,
|
45
47
|
theme: mergedTheme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":"AAAA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SACE,qBAAqB,IAAI,YAD3B,EAEE,kBAAkB,IAAI,SAFxB,QAGO,iCAHP;AAKA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,kCAA/C;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,aAAa,GAAG,SAAS,EAA/B;EACA,MAAM,WAAW,GAAG,QAAQ,EAA5B;EAEA;;;;AAIG;;EACH,MAAM;
|
1
|
+
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":"AAAA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SACE,qBAAqB,IAAI,YAD3B,EAEE,kBAAkB,IAAI,SAFxB,QAGO,iCAHP;AAKA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,kCAA/C;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,aAAa,GAAG,SAAS,EAA/B;EACA,MAAM,WAAW,GAAG,QAAQ,EAA5B;EAEA;;;;AAIG;;EACH,MAAM;IACJ,oBAAoB,GAAG,IADnB;IAEJ,GAAG,GAAG,aAAa,CAAC,GAFhB;IAGJ,cAAc,GAAG,aAAa,CAAC,cAH3B;IAIJ;EAJI,IAKF,KALJ;EAMA,MAAM,WAAW,GAAG,WAAW,CAAC,WAAD,EAAc,KAAd,CAA/B;EAEA,KAAK,CAAC,SAAN,CAAgB,MAAK;IACnB,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAAzB,IAAyC,WAAW,KAAK,SAA7D,EAAwE;MACtE;MACA,OAAO,CAAC,IAAR,CAAa;;;;AAIZ,OAJD;IAKD,CARkB,CASnB;;EACD,CAVD,EAUG,EAVH;EAYA,OAAO;IACL,oBADK;IAEL,GAFK;IAGL,cAHK;IAIL,KAAK,EAAE,WAJF;IAKL,cAAc,EAAE,8BAA8B,CAAC;MAAE,KAAK,EAAE,WAAT;MAAsB;IAAtB,CAAD,CALzC;IAOL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CAPP;IAWL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ,EACjC,GAAG,KAD8B;MAEjC,GAFiC;MAGjC,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,eAAe,EAArB;IAHe,CAAR;EAXtB,CAAP;AAiBD,CAjDM;;AAmDP,SAAS,WAAT,CAAqB,CAArB,EAA2C,CAA3C,EAA+D;EAC7D;EACA,IAAI,CAAC,IAAI,CAAT,EAAY;IACV,OAAO,EAAE,GAAG,CAAL;MAAQ,GAAG;IAAX,CAAP;EACD;;EAED,IAAI,CAAJ,EAAO;IACL,OAAO,CAAP;EACD;;EAED,OAAO,CAAP;AACD;;AAED,SAAS,QAAT,GAAiB;EACf,OAAO,KAAK,CAAC,UAAN,CAAiB,YAAjB,CAAP;AACD","sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport type { ThemeContextValue_unstable as ThemeContextValue } from '@fluentui/react-shared-contexts';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\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\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 dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n } = props;\n const mergedTheme = mergeThemes(parentTheme, theme);\n\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn(`\n FluentProvider: your \"theme\" is not defined !\n =============================================\n Make sure your root FluentProvider has set a theme or you're setting the theme in your child FluentProvider.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return {\n applyStylesToPortals,\n dir,\n targetDocument,\n theme: mergedTheme,\n themeClassName: useFluentProviderThemeStyleTag({ theme: mergedTheme, targetDocument }),\n\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>()),\n }),\n };\n};\n\nfunction mergeThemes(a: ThemeContextValue, b: ThemeContextValue): ThemeContextValue {\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"],"sourceRoot":"../src/"}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
export function useFluentProviderContextValues_unstable(state) {
|
3
3
|
const {
|
4
|
-
|
4
|
+
applyStylesToPortals,
|
5
5
|
dir,
|
6
|
+
root,
|
6
7
|
targetDocument,
|
7
|
-
theme
|
8
|
+
theme,
|
9
|
+
themeClassName
|
8
10
|
} = state;
|
9
11
|
const provider = React.useMemo(() => ({
|
10
12
|
dir,
|
@@ -17,7 +19,7 @@ export function useFluentProviderContextValues_unstable(state) {
|
|
17
19
|
textDirection: dir,
|
18
20
|
tooltip,
|
19
21
|
theme,
|
20
|
-
themeClassName: root.className
|
22
|
+
themeClassName: applyStylesToPortals ? root.className : themeClassName
|
21
23
|
};
|
22
24
|
}
|
23
25
|
//# sourceMappingURL=useFluentProviderContextValues.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,uCAAV,CAAkD,KAAlD,EAA4E;EAChF,MAAM;IAAE,
|
1
|
+
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,uCAAV,CAAkD,KAAlD,EAA4E;EAChF,MAAM;IAAE,oBAAF;IAAwB,GAAxB;IAA6B,IAA7B;IAAmC,cAAnC;IAAmD,KAAnD;IAA0D;EAA1D,IAA6E,KAAnF;EAEA,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;IAAE,GAAF;IAAO;EAAP,CAAP,CAAd,EAA+C,CAAC,GAAD,EAAM,cAAN,CAA/C,CAAjB,CAHgF,CAIhF;;EACA,MAAM,CAAC,OAAD,IAAY,KAAK,CAAC,QAAN,CAAe,OAAO,EAAP,CAAf,CAAlB;EAEA,OAAO;IACL,QADK;IAEL,aAAa,EAAE,GAFV;IAGL,OAHK;IAIL,KAJK;IAKL,cAAc,EAAE,oBAAoB,GAAG,IAAI,CAAC,SAAR,GAAqB;EALpD,CAAP;AAOD","sourcesContent":["import * as React from 'react';\nimport type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';\n\nexport function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues {\n const { applyStylesToPortals, dir, root, targetDocument, theme, themeClassName } = state;\n\n const provider = React.useMemo(() => ({ dir, targetDocument }), [dir, targetDocument]);\n // \"Tooltip\" component mutates an object in this context, instance should be stable\n const [tooltip] = React.useState(() => ({}));\n\n return {\n provider,\n textDirection: dir,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className! : themeClassName,\n };\n}\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FluentProvider.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { PartialTheme } from '@fluentui/react-theme';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type FluentProviderSlots = {\n root: Slot<'div'>;\n};\n\nexport type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {\n /** Sets the direction of text & generated styles. */\n dir?: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n\n theme?: PartialTheme;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<Pick<FluentProviderProps, 'dir'>> & {\n theme: ThemeContextValue;\n themeClassName: string;\n };\n\nexport type FluentProviderContextValues = Pick<FluentProviderState, 'theme'> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n tooltip: TooltipVisibilityContextValue;\n};\n"]}
|
1
|
+
{"version":3,"file":"FluentProvider.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { PartialTheme } from '@fluentui/react-theme';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type FluentProviderSlots = {\n root: Slot<'div'>;\n};\n\nexport type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {\n /**\n * Passes styles applied to a component down to portals if enabled.\n * @default true\n */\n applyStylesToPortals?: boolean;\n\n /** Sets the direction of text & generated styles. */\n dir?: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n\n /** Sets the theme used in a scope. */\n theme?: PartialTheme;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<Pick<FluentProviderProps, 'applyStylesToPortals' | 'dir'>> & {\n theme: ThemeContextValue;\n themeClassName: string;\n };\n\nexport type FluentProviderContextValues = Pick<FluentProviderState, 'theme'> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n tooltip: TooltipVisibilityContextValue;\n};\n"]}
|
@@ -19,7 +19,7 @@ define(["require", "exports", "tslib", "@fluentui/react-tabster", "@fluentui/rea
|
|
19
19
|
* nesting providers with the same "dir" should not add additional attributes to DOM
|
20
20
|
* see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93
|
21
21
|
*/
|
22
|
-
var _a = props.dir, dir =
|
22
|
+
var _a = props.applyStylesToPortals, applyStylesToPortals = _a === void 0 ? true : _a, _b = props.dir, dir = _b === void 0 ? parentContext.dir : _b, _c = props.targetDocument, targetDocument = _c === void 0 ? parentContext.targetDocument : _c, theme = props.theme;
|
23
23
|
var mergedTheme = mergeThemes(parentTheme, theme);
|
24
24
|
React.useEffect(function () {
|
25
25
|
if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {
|
@@ -29,6 +29,7 @@ define(["require", "exports", "tslib", "@fluentui/react-tabster", "@fluentui/rea
|
|
29
29
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
30
30
|
}, []);
|
31
31
|
return {
|
32
|
+
applyStylesToPortals: applyStylesToPortals,
|
32
33
|
dir: dir,
|
33
34
|
targetDocument: targetDocument,
|
34
35
|
theme: mergedTheme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFluentProvider.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":";;;;IAWA;;;;;;;;OAQG;IACI,IAAM,0BAA0B,GAAG,UACxC,KAA0B,EAC1B,GAA2B;QAE3B,IAAM,aAAa,GAAG,0CAAS,EAAE,CAAC;QAClC,IAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;QAE/B;;;;WAIG;
|
1
|
+
{"version":3,"file":"useFluentProvider.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":";;;;IAWA;;;;;;;;OAQG;IACI,IAAM,0BAA0B,GAAG,UACxC,KAA0B,EAC1B,GAA2B;QAE3B,IAAM,aAAa,GAAG,0CAAS,EAAE,CAAC;QAClC,IAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;QAE/B;;;;WAIG;QAED,IAAA,KAIE,KAAK,qBAJoB,EAA3B,oBAAoB,mBAAG,IAAI,KAAA,EAC3B,KAGE,KAAK,IAHgB,EAAvB,GAAG,mBAAG,aAAa,CAAC,GAAG,KAAA,EACvB,KAEE,KAAK,eAFsC,EAA7C,cAAc,mBAAG,aAAa,CAAC,cAAc,KAAA,EAC7C,KAAK,GACH,KAAK,MADF,CACG;QACV,IAAM,WAAW,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAEpD,KAAK,CAAC,SAAS,CAAC;YACd,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,WAAW,KAAK,SAAS,EAAE;gBACtE,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,0OAIZ,CAAC,CAAC;aACJ;YACD,uDAAuD;QACzD,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO;YACL,oBAAoB,sBAAA;YACpB,GAAG,KAAA;YACH,cAAc,gBAAA;YACd,KAAK,EAAE,WAAW;YAClB,cAAc,EAAE,+DAA8B,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,gBAAA,EAAE,CAAC;YAEtF,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YAED,IAAI,EAAE,uCAAqB,CAAC,KAAK,wCAC5B,KAAK,KACR,GAAG,KAAA,EACH,GAAG,EAAE,+BAAa,CAAC,GAAG,EAAE,+BAAe,EAAkB,CAAC,IAC1D;SACH,CAAC;IACJ,CAAC,CAAC;IAjDW,QAAA,0BAA0B,8BAiDrC;IAEF,SAAS,WAAW,CAAC,CAAoB,EAAE,CAAoB;QAC7D,kEAAkE;QAClE,IAAI,CAAC,IAAI,CAAC,EAAE;YACV,6CAAY,CAAC,GAAK,CAAC,EAAG;SACvB;QAED,IAAI,CAAC,EAAE;YACL,OAAO,CAAC,CAAC;SACV;QAED,OAAO,CAAC,CAAC;IACX,CAAC;IAED,SAAS,QAAQ;QACf,OAAO,KAAK,CAAC,UAAU,CAAC,6CAAY,CAAC,CAAC;IACxC,CAAC","sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport type { ThemeContextValue_unstable as ThemeContextValue } from '@fluentui/react-shared-contexts';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\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\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 dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n } = props;\n const mergedTheme = mergeThemes(parentTheme, theme);\n\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn(`\n FluentProvider: your \"theme\" is not defined !\n =============================================\n Make sure your root FluentProvider has set a theme or you're setting the theme in your child FluentProvider.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return {\n applyStylesToPortals,\n dir,\n targetDocument,\n theme: mergedTheme,\n themeClassName: useFluentProviderThemeStyleTag({ theme: mergedTheme, targetDocument }),\n\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>()),\n }),\n };\n};\n\nfunction mergeThemes(a: ThemeContextValue, b: ThemeContextValue): ThemeContextValue {\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"]}
|
@@ -3,7 +3,7 @@ define(["require", "exports", "react"], function (require, exports, React) {
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.useFluentProviderContextValues_unstable = void 0;
|
5
5
|
function useFluentProviderContextValues_unstable(state) {
|
6
|
-
var
|
6
|
+
var applyStylesToPortals = state.applyStylesToPortals, dir = state.dir, root = state.root, targetDocument = state.targetDocument, theme = state.theme, themeClassName = state.themeClassName;
|
7
7
|
var provider = React.useMemo(function () { return ({ dir: dir, targetDocument: targetDocument }); }, [dir, targetDocument]);
|
8
8
|
// "Tooltip" component mutates an object in this context, instance should be stable
|
9
9
|
var tooltip = React.useState(function () { return ({}); })[0];
|
@@ -12,7 +12,7 @@ define(["require", "exports", "react"], function (require, exports, React) {
|
|
12
12
|
textDirection: dir,
|
13
13
|
tooltip: tooltip,
|
14
14
|
theme: theme,
|
15
|
-
themeClassName: root.className,
|
15
|
+
themeClassName: applyStylesToPortals ? root.className : themeClassName,
|
16
16
|
};
|
17
17
|
}
|
18
18
|
exports.useFluentProviderContextValues_unstable = useFluentProviderContextValues_unstable;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFluentProviderContextValues.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;IAGA,SAAgB,uCAAuC,CAAC,KAA0B;QACxE,IAAA,
|
1
|
+
{"version":3,"file":"useFluentProviderContextValues.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;IAGA,SAAgB,uCAAuC,CAAC,KAA0B;QACxE,IAAA,oBAAoB,GAAuD,KAAK,qBAA5D,EAAE,GAAG,GAAkD,KAAK,IAAvD,EAAE,IAAI,GAA4C,KAAK,KAAjD,EAAE,cAAc,GAA4B,KAAK,eAAjC,EAAE,KAAK,GAAqB,KAAK,MAA1B,EAAE,cAAc,GAAK,KAAK,eAAV,CAAW;QAEzF,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,cAAM,OAAA,CAAC,EAAE,GAAG,KAAA,EAAE,cAAc,gBAAA,EAAE,CAAC,EAAzB,CAAyB,EAAE,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;QACvF,mFAAmF;QAC5E,IAAA,OAAO,GAAI,KAAK,CAAC,QAAQ,CAAC,cAAM,OAAA,CAAC,EAAE,CAAC,EAAJ,CAAI,CAAC,GAA9B,CAA+B;QAE7C,OAAO;YACL,QAAQ,UAAA;YACR,aAAa,EAAE,GAAG;YAClB,OAAO,SAAA;YACP,KAAK,OAAA;YACL,cAAc,EAAE,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAU,CAAC,CAAC,CAAC,cAAc;SACxE,CAAC;IACJ,CAAC;IAdD,0FAcC","sourcesContent":["import * as React from 'react';\nimport type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';\n\nexport function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues {\n const { applyStylesToPortals, dir, root, targetDocument, theme, themeClassName } = state;\n\n const provider = React.useMemo(() => ({ dir, targetDocument }), [dir, targetDocument]);\n // \"Tooltip\" component mutates an object in this context, instance should be stable\n const [tooltip] = React.useState(() => ({}));\n\n return {\n provider,\n textDirection: dir,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className! : themeClassName,\n };\n}\n"]}
|
@@ -35,6 +35,7 @@ const useFluentProvider_unstable = (props, ref) => {
|
|
35
35
|
*/
|
36
36
|
|
37
37
|
const {
|
38
|
+
applyStylesToPortals = true,
|
38
39
|
dir = parentContext.dir,
|
39
40
|
targetDocument = parentContext.targetDocument,
|
40
41
|
theme
|
@@ -52,6 +53,7 @@ const useFluentProvider_unstable = (props, ref) => {
|
|
52
53
|
|
53
54
|
}, []);
|
54
55
|
return {
|
56
|
+
applyStylesToPortals,
|
55
57
|
dir,
|
56
58
|
targetDocument,
|
57
59
|
theme: mergedTheme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAKA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gCAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,aAAa,GAAG,uBAAA,CAAA,kBAAA,EAAtB;EACA,MAAM,WAAW,GAAG,QAAQ,EAA5B;EAEA;;;;AAIG;;EACH,MAAM;
|
1
|
+
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAKA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gCAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,aAAa,GAAG,uBAAA,CAAA,kBAAA,EAAtB;EACA,MAAM,WAAW,GAAG,QAAQ,EAA5B;EAEA;;;;AAIG;;EACH,MAAM;IACJ,oBAAoB,GAAG,IADnB;IAEJ,GAAG,GAAG,aAAa,CAAC,GAFhB;IAGJ,cAAc,GAAG,aAAa,CAAC,cAH3B;IAIJ;EAJI,IAKF,KALJ;EAMA,MAAM,WAAW,GAAG,WAAW,CAAC,WAAD,EAAc,KAAd,CAA/B;EAEA,KAAK,CAAC,SAAN,CAAgB,MAAK;IACnB,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAAzB,IAAyC,WAAW,KAAK,SAA7D,EAAwE;MACtE;MACA,OAAO,CAAC,IAAR,CAAa;;;;AAIZ,OAJD;IAKD,CARkB,CASnB;;EACD,CAVD,EAUG,EAVH;EAYA,OAAO;IACL,oBADK;IAEL,GAFK;IAGL,cAHK;IAIL,KAAK,EAAE,WAJF;IAKL,cAAc,EAAE,gCAAA,CAAA,8BAAA,CAA+B;MAAE,KAAK,EAAE,WAAT;MAAsB;IAAtB,CAA/B,CALX;IAOL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CAPP;IAWL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,EACjC,GAAG,KAD8B;MAEjC,GAFiC;MAGjC,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,eAAA,CAAA,eAAA,EAAnB;IAH4B,CAA7B;EAXD,CAAP;AAiBD,CAjDM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B;;AAmDb,SAAS,WAAT,CAAqB,CAArB,EAA2C,CAA3C,EAA+D;EAC7D;EACA,IAAI,CAAC,IAAI,CAAT,EAAY;IACV,OAAO,EAAE,GAAG,CAAL;MAAQ,GAAG;IAAX,CAAP;EACD;;EAED,IAAI,CAAJ,EAAO;IACL,OAAO,CAAP;EACD;;EAED,OAAO,CAAP;AACD;;AAED,SAAS,QAAT,GAAiB;EACf,OAAO,KAAK,CAAC,UAAN,CAAiB,uBAAA,CAAA,qBAAjB,CAAP;AACD","sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport type { ThemeContextValue_unstable as ThemeContextValue } from '@fluentui/react-shared-contexts';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\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\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 dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n } = props;\n const mergedTheme = mergeThemes(parentTheme, theme);\n\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {\n // eslint-disable-next-line no-console\n console.warn(`\n FluentProvider: your \"theme\" is not defined !\n =============================================\n Make sure your root FluentProvider has set a theme or you're setting the theme in your child FluentProvider.\n `);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return {\n applyStylesToPortals,\n dir,\n targetDocument,\n theme: mergedTheme,\n themeClassName: useFluentProviderThemeStyleTag({ theme: mergedTheme, targetDocument }),\n\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>()),\n }),\n };\n};\n\nfunction mergeThemes(a: ThemeContextValue, b: ThemeContextValue): ThemeContextValue {\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"],"sourceRoot":"../src/"}
|
@@ -9,10 +9,12 @@ const React = /*#__PURE__*/require("react");
|
|
9
9
|
|
10
10
|
function useFluentProviderContextValues_unstable(state) {
|
11
11
|
const {
|
12
|
-
|
12
|
+
applyStylesToPortals,
|
13
13
|
dir,
|
14
|
+
root,
|
14
15
|
targetDocument,
|
15
|
-
theme
|
16
|
+
theme,
|
17
|
+
themeClassName
|
16
18
|
} = state;
|
17
19
|
const provider = React.useMemo(() => ({
|
18
20
|
dir,
|
@@ -25,7 +27,7 @@ function useFluentProviderContextValues_unstable(state) {
|
|
25
27
|
textDirection: dir,
|
26
28
|
tooltip,
|
27
29
|
theme,
|
28
|
-
themeClassName: root.className
|
30
|
+
themeClassName: applyStylesToPortals ? root.className : themeClassName
|
29
31
|
};
|
30
32
|
}
|
31
33
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,uCAAhB,CAAwD,KAAxD,EAAkF;EAChF,MAAM;IAAE,
|
1
|
+
{"version":3,"sources":["packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,uCAAhB,CAAwD,KAAxD,EAAkF;EAChF,MAAM;IAAE,oBAAF;IAAwB,GAAxB;IAA6B,IAA7B;IAAmC,cAAnC;IAAmD,KAAnD;IAA0D;EAA1D,IAA6E,KAAnF;EAEA,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;IAAE,GAAF;IAAO;EAAP,CAAP,CAAd,EAA+C,CAAC,GAAD,EAAM,cAAN,CAA/C,CAAjB,CAHgF,CAIhF;;EACA,MAAM,CAAC,OAAD,IAAY,KAAK,CAAC,QAAN,CAAe,OAAO,EAAP,CAAf,CAAlB;EAEA,OAAO;IACL,QADK;IAEL,aAAa,EAAE,GAFV;IAGL,OAHK;IAIL,KAJK;IAKL,cAAc,EAAE,oBAAoB,GAAG,IAAI,CAAC,SAAR,GAAqB;EALpD,CAAP;AAOD;;AAdD,OAAA,CAAA,uCAAA,GAAA,uCAAA","sourcesContent":["import * as React from 'react';\nimport type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';\n\nexport function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues {\n const { applyStylesToPortals, dir, root, targetDocument, theme, themeClassName } = state;\n\n const provider = React.useMemo(() => ({ dir, targetDocument }), [dir, targetDocument]);\n // \"Tooltip\" component mutates an object in this context, instance should be stable\n const [tooltip] = React.useState(() => ({}));\n\n return {\n provider,\n textDirection: dir,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className! : themeClassName,\n };\n}\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-provider",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.10",
|
4
4
|
"description": "Fluent UI React provider component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -33,10 +33,10 @@
|
|
33
33
|
"dependencies": {
|
34
34
|
"@griffel/core": "^1.8.1",
|
35
35
|
"@griffel/react": "^1.4.2",
|
36
|
-
"@fluentui/react-shared-contexts": "^9.1.
|
37
|
-
"@fluentui/react-tabster": "^9.3.
|
38
|
-
"@fluentui/react-theme": "^9.1.
|
39
|
-
"@fluentui/react-utilities": "^9.
|
36
|
+
"@fluentui/react-shared-contexts": "^9.1.3",
|
37
|
+
"@fluentui/react-tabster": "^9.3.3",
|
38
|
+
"@fluentui/react-theme": "^9.1.4",
|
39
|
+
"@fluentui/react-utilities": "^9.3.0",
|
40
40
|
"tslib": "^2.1.0"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|