@fluentui/react-provider 9.7.21 → 9.8.0
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 +34 -1
- package/CHANGELOG.md +14 -2
- package/dist/index.d.ts +4 -0
- package/lib/components/FluentProvider/FluentProvider.types.js.map +1 -1
- package/lib/components/FluentProvider/renderFluentProvider.js +4 -1
- package/lib/components/FluentProvider/renderFluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderContextValues.js +6 -0
- package/lib/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/renderFluentProvider.js +4 -1
- package/lib-commonjs/components/FluentProvider/renderFluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js +6 -0
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/package.json +5 -4
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,40 @@
|
|
2
2
|
"name": "@fluentui/react-provider",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Tue, 29 Aug 2023 12:53:34 GMT",
|
6
|
+
"tag": "@fluentui/react-provider_v9.8.0",
|
7
|
+
"version": "9.8.0",
|
8
|
+
"comments": {
|
9
|
+
"minor": [
|
10
|
+
{
|
11
|
+
"author": "ololubek@microsoft.com",
|
12
|
+
"package": "@fluentui/react-provider",
|
13
|
+
"commit": "ecaa08385bb0e25eafe87e3fb4424cb9139eea2d",
|
14
|
+
"comment": "feat: Add IconDirectionProvider to FluentProvider"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-provider",
|
19
|
+
"comment": "Bump @fluentui/react-tabster to v9.12.5",
|
20
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-provider",
|
25
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.0",
|
26
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-provider",
|
31
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.3",
|
32
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"date": "Thu, 24 Aug 2023 10:26:35 GMT",
|
6
39
|
"tag": "@fluentui/react-provider_v9.7.21",
|
7
40
|
"version": "9.7.21",
|
8
41
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
# Change Log - @fluentui/react-provider
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 29 Aug 2023 12:53:34 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.8.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.8.0)
|
8
|
+
|
9
|
+
Tue, 29 Aug 2023 12:53:34 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.7.21..@fluentui/react-provider_v9.8.0)
|
11
|
+
|
12
|
+
### Minor changes
|
13
|
+
|
14
|
+
- feat: Add IconDirectionProvider to FluentProvider ([PR #28803](https://github.com/microsoft/fluentui/pull/28803) by ololubek@microsoft.com)
|
15
|
+
- Bump @fluentui/react-tabster to v9.12.5 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
16
|
+
- Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.3 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
18
|
+
|
7
19
|
## [9.7.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.7.21)
|
8
20
|
|
9
|
-
Thu, 24 Aug 2023 10:
|
21
|
+
Thu, 24 Aug 2023 10:26:35 GMT
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.7.20..@fluentui/react-provider_v9.7.21)
|
11
23
|
|
12
24
|
### Patches
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
|
1
3
|
import { ComponentProps } from '@fluentui/react-utilities';
|
2
4
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
5
|
import type { CustomStyleHooksContextValue_unstable } from '@fluentui/react-shared-contexts';
|
6
|
+
import type { IconDirectionContextValue } from '@fluentui/react-icons';
|
4
7
|
import { OverridesContextValue_unstable } from '@fluentui/react-shared-contexts';
|
5
8
|
import type { PartialTheme } from '@fluentui/react-theme';
|
6
9
|
import type { ProviderContextValue_unstable } from '@fluentui/react-shared-contexts';
|
@@ -116,6 +119,7 @@ export declare type FluentProviderContextValues = Pick<FluentProviderState, 'cus
|
|
116
119
|
provider: ProviderContextValue_unstable;
|
117
120
|
themeClassName: ThemeClassNameContextValue_unstable;
|
118
121
|
textDirection: 'ltr' | 'rtl';
|
122
|
+
iconDirection: IconDirectionContextValue;
|
119
123
|
tooltip: TooltipVisibilityContextValue_unstable;
|
120
124
|
};
|
121
125
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["FluentProvider.types.ts"],"sourcesContent":["import type {\n OverridesContextValue_unstable as OverridesContextValue,\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\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\n// exported for callers to avoid referencing react-shared-context\n// and applying Partial<> when passing custom style hooks.\nexport type FluentProviderCustomStyleHooks = CustomStyleHooksContextValue;\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 hooks for custom styling components. */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable?: FluentProviderCustomStyleHooks;\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 // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable?: OverridesContextValue;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<\n Pick<FluentProviderProps, 'applyStylesToPortals' | 'customStyleHooks_unstable' | 'dir' | 'overrides_unstable'>\n > & {\n theme: ThemeContextValue;\n themeClassName: string;\n /**\n * Props used to render SSR theme variables style element\n */\n serverStyleProps: {\n /**\n * CSS rule containing CSS variables\n */\n cssRule: string;\n /**\n * Additional attributes applied to the style element\n */\n attributes: Record<string, string>;\n };\n };\n\nexport type FluentProviderContextValues = Pick<\n FluentProviderState,\n 'customStyleHooks_unstable' | 'theme' | 'overrides_unstable'\n> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n tooltip: TooltipVisibilityContextValue;\n};\n"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"sources":["FluentProvider.types.ts"],"sourcesContent":["import type { IconDirectionContextValue } from '@fluentui/react-icons';\nimport type {\n OverridesContextValue_unstable as OverridesContextValue,\n ProviderContextValue_unstable as ProviderContextValue,\n TooltipVisibilityContextValue_unstable as TooltipVisibilityContextValue,\n ThemeClassNameContextValue_unstable as ThemeClassNameContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\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\n// exported for callers to avoid referencing react-shared-context\n// and applying Partial<> when passing custom style hooks.\nexport type FluentProviderCustomStyleHooks = CustomStyleHooksContextValue;\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 hooks for custom styling components. */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable?: FluentProviderCustomStyleHooks;\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 // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable?: OverridesContextValue;\n};\n\nexport type FluentProviderState = ComponentState<FluentProviderSlots> &\n Pick<FluentProviderProps, 'targetDocument'> &\n Required<\n Pick<FluentProviderProps, 'applyStylesToPortals' | 'customStyleHooks_unstable' | 'dir' | 'overrides_unstable'>\n > & {\n theme: ThemeContextValue;\n themeClassName: string;\n /**\n * Props used to render SSR theme variables style element\n */\n serverStyleProps: {\n /**\n * CSS rule containing CSS variables\n */\n cssRule: string;\n /**\n * Additional attributes applied to the style element\n */\n attributes: Record<string, string>;\n };\n };\n\nexport type FluentProviderContextValues = Pick<\n FluentProviderState,\n 'customStyleHooks_unstable' | 'theme' | 'overrides_unstable'\n> & {\n provider: ProviderContextValue;\n themeClassName: ThemeClassNameContextValue;\n textDirection: 'ltr' | 'rtl';\n iconDirection: IconDirectionContextValue;\n tooltip: TooltipVisibilityContextValue;\n};\n"],"names":[],"mappings":"AAAA,WA2EE"}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { canUseDOM, assertSlots } from '@fluentui/react-utilities';
|
3
3
|
import { TextDirectionProvider } from '@griffel/react';
|
4
4
|
import { OverridesProvider_unstable as OverridesProvider, Provider_unstable as Provider, TooltipVisibilityProvider_unstable as TooltipVisibilityProvider, ThemeProvider_unstable as ThemeProvider, ThemeClassNameProvider_unstable as ThemeClassNameProvider, CustomStyleHooksProvider_unstable as CustomStyleHooksProvider } from '@fluentui/react-shared-contexts';
|
5
|
+
import { IconDirectionContextProvider } from '@fluentui/react-icons';
|
5
6
|
/**
|
6
7
|
* Render the final JSX of FluentProvider
|
7
8
|
*/ export const renderFluentProvider_unstable = (state, contextValues)=>{
|
@@ -21,6 +22,8 @@ import { OverridesProvider_unstable as OverridesProvider, Provider_unstable as P
|
|
21
22
|
value: contextValues.tooltip
|
22
23
|
}, /*#__PURE__*/ createElement(TextDirectionProvider, {
|
23
24
|
dir: contextValues.textDirection
|
25
|
+
}, /*#__PURE__*/ createElement(IconDirectionContextProvider, {
|
26
|
+
value: contextValues.iconDirection
|
24
27
|
}, /*#__PURE__*/ createElement(OverridesProvider, {
|
25
28
|
value: contextValues.overrides_unstable
|
26
29
|
}, /*#__PURE__*/ createElement(state.root, null, canUseDOM() ? null : /*#__PURE__*/ createElement("style", {
|
@@ -31,5 +34,5 @@ import { OverridesProvider_unstable as OverridesProvider, Provider_unstable as P
|
|
31
34
|
__html: state.serverStyleProps.cssRule
|
32
35
|
},
|
33
36
|
...state.serverStyleProps.attributes
|
34
|
-
}), state.root.children))))))));
|
37
|
+
}), state.root.children)))))))));
|
35
38
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderFluentProvider.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { canUseDOM, assertSlots } from '@fluentui/react-utilities';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n OverridesProvider_unstable as OverridesProvider,\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n CustomStyleHooksProvider_unstable as CustomStyleHooksProvider,\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { FluentProviderContextValues, FluentProviderState, FluentProviderSlots } from './FluentProvider.types';\n\n/**\n * Render the final JSX of FluentProvider\n */\nexport const renderFluentProvider_unstable = (\n state: FluentProviderState,\n contextValues: FluentProviderContextValues,\n) => {\n assertSlots<FluentProviderSlots>(state);\n\n // Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable\n // instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is\n // Partial<CustomStyleHooksContextValue>, so it needs to be cast to Required<CustomStyleHooksContextValue>\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <CustomStyleHooksProvider\n value={contextValues.customStyleHooks_unstable as Required<CustomStyleHooksContextValue>}\n >\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <OverridesProvider value={contextValues.overrides_unstable}>\n
|
1
|
+
{"version":3,"sources":["renderFluentProvider.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { canUseDOM, assertSlots } from '@fluentui/react-utilities';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n OverridesProvider_unstable as OverridesProvider,\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n CustomStyleHooksProvider_unstable as CustomStyleHooksProvider,\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n} from '@fluentui/react-shared-contexts';\nimport type { FluentProviderContextValues, FluentProviderState, FluentProviderSlots } from './FluentProvider.types';\nimport { IconDirectionContextProvider } from '@fluentui/react-icons';\n\n/**\n * Render the final JSX of FluentProvider\n */\nexport const renderFluentProvider_unstable = (\n state: FluentProviderState,\n contextValues: FluentProviderContextValues,\n) => {\n assertSlots<FluentProviderSlots>(state);\n\n // Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable\n // instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is\n // Partial<CustomStyleHooksContextValue>, so it needs to be cast to Required<CustomStyleHooksContextValue>\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <CustomStyleHooksProvider\n value={contextValues.customStyleHooks_unstable as Required<CustomStyleHooksContextValue>}\n >\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <IconDirectionContextProvider value={contextValues.iconDirection}>\n <OverridesProvider value={contextValues.overrides_unstable}>\n <state.root>\n {canUseDOM() ? null : (\n <style\n // Using dangerous HTML because react can escape characters\n // which can lead to invalid CSS.\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: state.serverStyleProps.cssRule }}\n {...state.serverStyleProps.attributes}\n />\n )}\n\n {state.root.children}\n </state.root>\n </OverridesProvider>\n </IconDirectionContextProvider>\n </TextDirectionProvider>\n </TooltipVisibilityProvider>\n </CustomStyleHooksProvider>\n </ThemeClassNameProvider>\n </ThemeProvider>\n </Provider>\n );\n};\n"],"names":["createElement","canUseDOM","assertSlots","TextDirectionProvider","OverridesProvider_unstable","OverridesProvider","Provider_unstable","Provider","TooltipVisibilityProvider_unstable","TooltipVisibilityProvider","ThemeProvider_unstable","ThemeProvider","ThemeClassNameProvider_unstable","ThemeClassNameProvider","CustomStyleHooksProvider_unstable","CustomStyleHooksProvider","IconDirectionContextProvider","renderFluentProvider_unstable","state","contextValues","value","provider","theme","themeClassName","customStyleHooks_unstable","tooltip","dir","textDirection","iconDirection","overrides_unstable","root","style","dangerouslySetInnerHTML","__html","serverStyleProps","cssRule","attributes","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,SAAS,EAAEC,WAAW,QAAQ,4BAA4B;AACnE,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SACEC,8BAA8BC,iBAAiB,EAC/CC,qBAAqBC,QAAQ,EAC7BC,sCAAsCC,yBAAyB,EAC/DC,0BAA0BC,aAAa,EACvCC,mCAAmCC,sBAAsB,EACzDC,qCAAqCC,wBAAwB,QAExD,kCAAkC;AAEzC,SAASC,4BAA4B,QAAQ,wBAAwB;AAErE;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC,gBACG;IACHjB,YAAiCgB;IAEjC,+FAA+F;IAC/F,oFAAoF;IACpF,0GAA0G;IAE1G,qBACE,AA/BJ,cA+BKX;QAASa,OAAOD,cAAcE,QAAQ;qBACrC,AAhCN,cAgCOV;QAAcS,OAAOD,cAAcG,KAAK;qBACvC,AAjCR,cAiCST;QAAuBO,OAAOD,cAAcI,cAAc;qBACzD,AAlCV,cAkCWR;QACCK,OAAOD,cAAcK,yBAAyB;qBAE9C,AArCZ,cAqCaf;QAA0BW,OAAOD,cAAcM,OAAO;qBACrD,AAtCd,cAsCetB;QAAsBuB,KAAKP,cAAcQ,aAAa;qBACrD,AAvChB,cAuCiBX;QAA6BI,OAAOD,cAAcS,aAAa;qBAC9D,AAxClB,cAwCmBvB;QAAkBe,OAAOD,cAAcU,kBAAkB;qBACxD,AAzCpB,cAyCqBX,MAAMY,IAAI,QACR7B,cAAc,IAAI,iBACjB,AA3CxB,cA2CyB8B;QACC,2DAA2D;QAC3D,iCAAiC;QACjC,2CAA2C;QAC3CC,yBAAyB;YAAEC,QAAQf,MAAMgB,gBAAgB,CAACC,OAAO;QAAC;QACjE,GAAGjB,MAAMgB,gBAAgB,CAACE,UAAU;MAExC,EAEAlB,MAAMY,IAAI,CAACO,QAAQ;AAW1C,EAAE"}
|
@@ -12,6 +12,11 @@ export function useFluentProviderContextValues_unstable(state) {
|
|
12
12
|
]);
|
13
13
|
// "Tooltip" component mutates an object in this context, instance should be stable
|
14
14
|
const [tooltip] = React.useState(()=>({}));
|
15
|
+
const iconDirection = React.useMemo(()=>({
|
16
|
+
textDirection: dir
|
17
|
+
}), [
|
18
|
+
dir
|
19
|
+
]);
|
15
20
|
return {
|
16
21
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
17
22
|
customStyleHooks_unstable,
|
@@ -19,6 +24,7 @@ export function useFluentProviderContextValues_unstable(state) {
|
|
19
24
|
overrides_unstable,
|
20
25
|
provider,
|
21
26
|
textDirection: dir,
|
27
|
+
iconDirection,
|
22
28
|
tooltip,
|
23
29
|
theme,
|
24
30
|
themeClassName: applyStylesToPortals ? root.className : themeClassName
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProviderContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';\n\nexport function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues {\n const {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir,\n root,\n targetDocument,\n theme,\n themeClassName,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n } = 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 // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n provider,\n textDirection: dir,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className! : themeClassName,\n };\n}\n"],"names":["React","useFluentProviderContextValues_unstable","state","applyStylesToPortals","customStyleHooks_unstable","dir","root","targetDocument","theme","themeClassName","overrides_unstable","provider","useMemo","tooltip","useState","textDirection","className"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,wCAAwCC,KAA0B,EAA+B;IAC/G,MAAM,EACJC,qBAAoB,EACpB,gEAAgE;IAChEC,0BAAyB,EACzBC,IAAG,EACHC,KAAI,EACJC,eAAc,EACdC,MAAK,EACLC,eAAc,EACd,gEAAgE;IAChEC,mBAAkB,EACnB,GAAGR;IAEJ,MAAMS,WAAWX,MAAMY,OAAO,CAAC,IAAO,CAAA;YAAEP;YAAKE;QAAe,CAAA,GAAI;QAACF;QAAKE;KAAe;IACrF,mFAAmF;IACnF,MAAM,CAACM,QAAQ,GAAGb,MAAMc,QAAQ,CAAC,IAAO,CAAA,CAAC,CAAA;
|
1
|
+
{"version":3,"sources":["useFluentProviderContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';\n\nexport function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues {\n const {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir,\n root,\n targetDocument,\n theme,\n themeClassName,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n } = 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 const iconDirection = React.useMemo(() => ({ textDirection: dir }), [dir]);\n\n return {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n provider,\n textDirection: dir,\n iconDirection,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className! : themeClassName,\n };\n}\n"],"names":["React","useFluentProviderContextValues_unstable","state","applyStylesToPortals","customStyleHooks_unstable","dir","root","targetDocument","theme","themeClassName","overrides_unstable","provider","useMemo","tooltip","useState","iconDirection","textDirection","className"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,wCAAwCC,KAA0B,EAA+B;IAC/G,MAAM,EACJC,qBAAoB,EACpB,gEAAgE;IAChEC,0BAAyB,EACzBC,IAAG,EACHC,KAAI,EACJC,eAAc,EACdC,MAAK,EACLC,eAAc,EACd,gEAAgE;IAChEC,mBAAkB,EACnB,GAAGR;IAEJ,MAAMS,WAAWX,MAAMY,OAAO,CAAC,IAAO,CAAA;YAAEP;YAAKE;QAAe,CAAA,GAAI;QAACF;QAAKE;KAAe;IACrF,mFAAmF;IACnF,MAAM,CAACM,QAAQ,GAAGb,MAAMc,QAAQ,CAAC,IAAO,CAAA,CAAC,CAAA;IACzC,MAAMC,gBAAgBf,MAAMY,OAAO,CAAC,IAAO,CAAA;YAAEI,eAAeX;QAAI,CAAA,GAAI;QAACA;KAAI;IAEzE,OAAO;QACL,gEAAgE;QAChED;QACA,gEAAgE;QAChEM;QACAC;QACAK,eAAeX;QACfU;QACAF;QACAL;QACAC,gBAAgBN,uBAAuBG,KAAKW,SAAS,GAAIR,cAAc;IACzE;AACF,CAAC"}
|
@@ -10,6 +10,7 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
10
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
11
11
|
const _react = require("@griffel/react");
|
12
12
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
13
|
+
const _reactIcons = require("@fluentui/react-icons");
|
13
14
|
const renderFluentProvider_unstable = (state, contextValues)=>{
|
14
15
|
(0, _reactUtilities.assertSlots)(state);
|
15
16
|
// Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable
|
@@ -27,6 +28,8 @@ const renderFluentProvider_unstable = (state, contextValues)=>{
|
|
27
28
|
value: contextValues.tooltip
|
28
29
|
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_react.TextDirectionProvider, {
|
29
30
|
dir: contextValues.textDirection
|
31
|
+
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactIcons.IconDirectionContextProvider, {
|
32
|
+
value: contextValues.iconDirection
|
30
33
|
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactSharedContexts.OverridesProvider_unstable, {
|
31
34
|
value: contextValues.overrides_unstable
|
32
35
|
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, (0, _reactUtilities.canUseDOM)() ? null : /*#__PURE__*/ (0, _reactJsxRuntime.createElement)("style", {
|
@@ -37,5 +40,5 @@ const renderFluentProvider_unstable = (state, contextValues)=>{
|
|
37
40
|
__html: state.serverStyleProps.cssRule
|
38
41
|
},
|
39
42
|
...state.serverStyleProps.attributes
|
40
|
-
}), state.root.children))))))));
|
43
|
+
}), state.root.children)))))))));
|
41
44
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderFluentProvider.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { canUseDOM, assertSlots } from '@fluentui/react-utilities';\nimport { TextDirectionProvider } from '@griffel/react';\nimport { OverridesProvider_unstable as OverridesProvider, Provider_unstable as Provider, TooltipVisibilityProvider_unstable as TooltipVisibilityProvider, ThemeProvider_unstable as ThemeProvider, ThemeClassNameProvider_unstable as ThemeClassNameProvider, CustomStyleHooksProvider_unstable as CustomStyleHooksProvider } from '@fluentui/react-shared-contexts';\n/**\n * Render the final JSX of FluentProvider\n */ export const renderFluentProvider_unstable = (state, contextValues)=>{\n assertSlots(state);\n // Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable\n // instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is\n // Partial<CustomStyleHooksContextValue>, so it needs to be cast to Required<CustomStyleHooksContextValue>\n return /*#__PURE__*/ createElement(Provider, {\n value: contextValues.provider\n }, /*#__PURE__*/ createElement(ThemeProvider, {\n value: contextValues.theme\n }, /*#__PURE__*/ createElement(ThemeClassNameProvider, {\n value: contextValues.themeClassName\n }, /*#__PURE__*/ createElement(CustomStyleHooksProvider, {\n value: contextValues.customStyleHooks_unstable\n }, /*#__PURE__*/ createElement(TooltipVisibilityProvider, {\n value: contextValues.tooltip\n }, /*#__PURE__*/ createElement(TextDirectionProvider, {\n dir: contextValues.textDirection\n }, /*#__PURE__*/ createElement(OverridesProvider, {\n value: contextValues.overrides_unstable\n }, /*#__PURE__*/ createElement(state.root, null, canUseDOM() ? null : /*#__PURE__*/ createElement(\"style\", {\n // Using dangerous HTML because react can escape characters\n // which can lead to invalid CSS.\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: state.serverStyleProps.cssRule\n },\n ...state.serverStyleProps.attributes\n }), state.root.children))))))));\n};\n"],"names":["renderFluentProvider_unstable","state","contextValues","assertSlots","createElement","Provider","value","provider","ThemeProvider","theme","ThemeClassNameProvider","themeClassName","CustomStyleHooksProvider","customStyleHooks_unstable","TooltipVisibilityProvider","tooltip","TextDirectionProvider","dir","textDirection","OverridesProvider","overrides_unstable","root","canUseDOM","dangerouslySetInnerHTML","__html","serverStyleProps","cssRule","attributes","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+
|
1
|
+
{"version":3,"sources":["renderFluentProvider.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { canUseDOM, assertSlots } from '@fluentui/react-utilities';\nimport { TextDirectionProvider } from '@griffel/react';\nimport { OverridesProvider_unstable as OverridesProvider, Provider_unstable as Provider, TooltipVisibilityProvider_unstable as TooltipVisibilityProvider, ThemeProvider_unstable as ThemeProvider, ThemeClassNameProvider_unstable as ThemeClassNameProvider, CustomStyleHooksProvider_unstable as CustomStyleHooksProvider } from '@fluentui/react-shared-contexts';\nimport { IconDirectionContextProvider } from '@fluentui/react-icons';\n/**\n * Render the final JSX of FluentProvider\n */ export const renderFluentProvider_unstable = (state, contextValues)=>{\n assertSlots(state);\n // Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable\n // instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is\n // Partial<CustomStyleHooksContextValue>, so it needs to be cast to Required<CustomStyleHooksContextValue>\n return /*#__PURE__*/ createElement(Provider, {\n value: contextValues.provider\n }, /*#__PURE__*/ createElement(ThemeProvider, {\n value: contextValues.theme\n }, /*#__PURE__*/ createElement(ThemeClassNameProvider, {\n value: contextValues.themeClassName\n }, /*#__PURE__*/ createElement(CustomStyleHooksProvider, {\n value: contextValues.customStyleHooks_unstable\n }, /*#__PURE__*/ createElement(TooltipVisibilityProvider, {\n value: contextValues.tooltip\n }, /*#__PURE__*/ createElement(TextDirectionProvider, {\n dir: contextValues.textDirection\n }, /*#__PURE__*/ createElement(IconDirectionContextProvider, {\n value: contextValues.iconDirection\n }, /*#__PURE__*/ createElement(OverridesProvider, {\n value: contextValues.overrides_unstable\n }, /*#__PURE__*/ createElement(state.root, null, canUseDOM() ? null : /*#__PURE__*/ createElement(\"style\", {\n // Using dangerous HTML because react can escape characters\n // which can lead to invalid CSS.\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: state.serverStyleProps.cssRule\n },\n ...state.serverStyleProps.attributes\n }), state.root.children)))))))));\n};\n"],"names":["renderFluentProvider_unstable","state","contextValues","assertSlots","createElement","Provider","value","provider","ThemeProvider","theme","ThemeClassNameProvider","themeClassName","CustomStyleHooksProvider","customStyleHooks_unstable","TooltipVisibilityProvider","tooltip","TextDirectionProvider","dir","textDirection","IconDirectionContextProvider","iconDirection","OverridesProvider","overrides_unstable","root","canUseDOM","dangerouslySetInnerHTML","__html","serverStyleProps","cssRule","attributes","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAOjCA;;aAAAA;;iCAPkE;gCAC5C;uBACD;qCAC6R;4BACtR;AAGlC,MAAMA,gCAAgC,CAACC,OAAOC,gBAAgB;IACrEC,IAAAA,2BAAW,EAACF;IACZ,+FAA+F;IAC/F,oFAAoF;IACpF,0GAA0G;IAC1G,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,sCAAQ,EAAE;QACzCC,OAAOJ,cAAcK,QAAQ;IACjC,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACI,2CAAa,EAAE;QAC1CF,OAAOJ,cAAcO,KAAK;IAC9B,GAAG,WAAW,GAAGL,IAAAA,8BAAa,EAACM,oDAAsB,EAAE;QACnDJ,OAAOJ,cAAcS,cAAc;IACvC,GAAG,WAAW,GAAGP,IAAAA,8BAAa,EAACQ,sDAAwB,EAAE;QACrDN,OAAOJ,cAAcW,yBAAyB;IAClD,GAAG,WAAW,GAAGT,IAAAA,8BAAa,EAACU,uDAAyB,EAAE;QACtDR,OAAOJ,cAAca,OAAO;IAChC,GAAG,WAAW,GAAGX,IAAAA,8BAAa,EAACY,4BAAqB,EAAE;QAClDC,KAAKf,cAAcgB,aAAa;IACpC,GAAG,WAAW,GAAGd,IAAAA,8BAAa,EAACe,wCAA4B,EAAE;QACzDb,OAAOJ,cAAckB,aAAa;IACtC,GAAG,WAAW,GAAGhB,IAAAA,8BAAa,EAACiB,+CAAiB,EAAE;QAC9Cf,OAAOJ,cAAcoB,kBAAkB;IAC3C,GAAG,WAAW,GAAGlB,IAAAA,8BAAa,EAACH,MAAMsB,IAAI,EAAE,IAAI,EAAEC,IAAAA,yBAAS,MAAK,IAAI,GAAG,WAAW,GAAGpB,IAAAA,8BAAa,EAAC,SAAS;QACvG,2DAA2D;QAC3D,iCAAiC;QACjC,2CAA2C;QAC3CqB,yBAAyB;YACrBC,QAAQzB,MAAM0B,gBAAgB,CAACC,OAAO;QAC1C;QACA,GAAG3B,MAAM0B,gBAAgB,CAACE,UAAU;IACxC,EAAE,EAAE5B,MAAMsB,IAAI,CAACO,QAAQ;AAC3B"}
|
@@ -19,6 +19,11 @@ function useFluentProviderContextValues_unstable(state) {
|
|
19
19
|
]);
|
20
20
|
// "Tooltip" component mutates an object in this context, instance should be stable
|
21
21
|
const [tooltip] = _react.useState(()=>({}));
|
22
|
+
const iconDirection = _react.useMemo(()=>({
|
23
|
+
textDirection: dir
|
24
|
+
}), [
|
25
|
+
dir
|
26
|
+
]);
|
22
27
|
return {
|
23
28
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
24
29
|
customStyleHooks_unstable,
|
@@ -26,6 +31,7 @@ function useFluentProviderContextValues_unstable(state) {
|
|
26
31
|
overrides_unstable,
|
27
32
|
provider,
|
28
33
|
textDirection: dir,
|
34
|
+
iconDirection,
|
29
35
|
tooltip,
|
30
36
|
theme,
|
31
37
|
themeClassName: applyStylesToPortals ? root.className : themeClassName
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFluentProviderContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport function useFluentProviderContextValues_unstable(state) {\n const { applyStylesToPortals , // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable , dir , root , targetDocument , theme , themeClassName , // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable } = state;\n const provider = React.useMemo(()=>({\n dir,\n targetDocument\n }), [\n dir,\n targetDocument\n ]);\n // \"Tooltip\" component mutates an object in this context, instance should be stable\n const [tooltip] = React.useState(()=>({}));\n return {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n provider,\n textDirection: dir,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className : themeClassName\n };\n}\n"],"names":["useFluentProviderContextValues_unstable","state","applyStylesToPortals","customStyleHooks_unstable","dir","root","targetDocument","theme","themeClassName","overrides_unstable","provider","React","useMemo","tooltip","useState","textDirection","className"],"mappings":";;;;+BACgBA;;aAAAA;;;6DADO;AAChB,SAASA,wCAAwCC,KAAK,EAAE;IAC3D,MAAM,EAAEC,qBAAoB,EAC5BC,0BAAyB,EAAGC,IAAG,EAAGC,KAAI,EAAGC,eAAc,EAAGC,MAAK,EAAGC,eAAc,EAChFC,mBAAkB,EAAG,GAAGR;IACxB,MAAMS,WAAWC,OAAMC,OAAO,CAAC,IAAK,CAAA;YAC5BR;YACAE;QACJ,CAAA,GAAI;QACJF;QACAE;KACH;IACD,mFAAmF;IACnF,MAAM,CAACO,QAAQ,GAAGF,OAAMG,QAAQ,CAAC,IAAK,CAAA,CAAC,CAAA;IACvC,OAAO;QACH,gEAAgE;
|
1
|
+
{"version":3,"sources":["useFluentProviderContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport function useFluentProviderContextValues_unstable(state) {\n const { applyStylesToPortals , // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable , dir , root , targetDocument , theme , themeClassName , // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable } = state;\n const provider = React.useMemo(()=>({\n dir,\n targetDocument\n }), [\n dir,\n targetDocument\n ]);\n // \"Tooltip\" component mutates an object in this context, instance should be stable\n const [tooltip] = React.useState(()=>({}));\n const iconDirection = React.useMemo(()=>({\n textDirection: dir\n }), [\n dir\n ]);\n return {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable,\n provider,\n textDirection: dir,\n iconDirection,\n tooltip,\n theme,\n themeClassName: applyStylesToPortals ? root.className : themeClassName\n };\n}\n"],"names":["useFluentProviderContextValues_unstable","state","applyStylesToPortals","customStyleHooks_unstable","dir","root","targetDocument","theme","themeClassName","overrides_unstable","provider","React","useMemo","tooltip","useState","iconDirection","textDirection","className"],"mappings":";;;;+BACgBA;;aAAAA;;;6DADO;AAChB,SAASA,wCAAwCC,KAAK,EAAE;IAC3D,MAAM,EAAEC,qBAAoB,EAC5BC,0BAAyB,EAAGC,IAAG,EAAGC,KAAI,EAAGC,eAAc,EAAGC,MAAK,EAAGC,eAAc,EAChFC,mBAAkB,EAAG,GAAGR;IACxB,MAAMS,WAAWC,OAAMC,OAAO,CAAC,IAAK,CAAA;YAC5BR;YACAE;QACJ,CAAA,GAAI;QACJF;QACAE;KACH;IACD,mFAAmF;IACnF,MAAM,CAACO,QAAQ,GAAGF,OAAMG,QAAQ,CAAC,IAAK,CAAA,CAAC,CAAA;IACvC,MAAMC,gBAAgBJ,OAAMC,OAAO,CAAC,IAAK,CAAA;YACjCI,eAAeZ;QACnB,CAAA,GAAI;QACJA;KACH;IACD,OAAO;QACH,gEAAgE;QAChED;QACA,gEAAgE;QAChEM;QACAC;QACAM,eAAeZ;QACfW;QACAF;QACAN;QACAC,gBAAgBN,uBAAuBG,KAAKY,SAAS,GAAGT,cAAc;IAC1E;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-provider",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.8.0",
|
4
4
|
"description": "Fluent UI React provider component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -33,11 +33,12 @@
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
+
"@fluentui/react-icons": "^2.0.207",
|
36
37
|
"@fluentui/react-shared-contexts": "^9.7.2",
|
37
|
-
"@fluentui/react-tabster": "^9.12.
|
38
|
+
"@fluentui/react-tabster": "^9.12.5",
|
38
39
|
"@fluentui/react-theme": "^9.1.11",
|
39
|
-
"@fluentui/react-utilities": "^9.
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
40
|
+
"@fluentui/react-utilities": "^9.13.0",
|
41
|
+
"@fluentui/react-jsx-runtime": "^9.0.3",
|
41
42
|
"@griffel/core": "^1.14.1",
|
42
43
|
"@griffel/react": "^1.5.14",
|
43
44
|
"@swc/helpers": "^0.4.14"
|