@fluentui/react-provider 0.0.0-nightly-20221115-0423.1 → 0.0.0-nightly-20221117-0420.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-provider",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 15 Nov 2022 04:28:26 GMT",
6
- "tag": "@fluentui/react-provider_v0.0.0-nightly-20221115-0423.1",
7
- "version": "0.0.0-nightly-20221115-0423.1",
5
+ "date": "Thu, 17 Nov 2022 04:26:51 GMT",
6
+ "tag": "@fluentui/react-provider_v0.0.0-nightly-20221117-0420.1",
7
+ "version": "0.0.0-nightly-20221117-0420.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,32 +16,32 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-provider",
19
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221115-0423.1",
20
- "commit": "af0df438f085c82c52bb47b551d2fda80d12ffc8"
19
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221117-0420.1",
20
+ "commit": "da504b67960d13c1434ef37a9868f5e2801f9522"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-provider",
25
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20221115-0423.1",
26
- "commit": "af0df438f085c82c52bb47b551d2fda80d12ffc8"
25
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20221117-0420.1",
26
+ "commit": "da504b67960d13c1434ef37a9868f5e2801f9522"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-provider",
31
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221115-0423.1",
32
- "commit": "af0df438f085c82c52bb47b551d2fda80d12ffc8"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221117-0420.1",
32
+ "commit": "da504b67960d13c1434ef37a9868f5e2801f9522"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-provider",
37
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221115-0423.1",
38
- "commit": "af0df438f085c82c52bb47b551d2fda80d12ffc8"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221117-0420.1",
38
+ "commit": "da504b67960d13c1434ef37a9868f5e2801f9522"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-provider",
43
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221115-0423.1",
44
- "commit": "af0df438f085c82c52bb47b551d2fda80d12ffc8"
43
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221117-0420.1",
44
+ "commit": "da504b67960d13c1434ef37a9868f5e2801f9522"
45
45
  }
46
46
  ]
47
47
  }
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-provider
2
2
 
3
- This log was last generated on Tue, 15 Nov 2022 04:28:26 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Nov 2022 04:26:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20221115-0423.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v0.0.0-nightly-20221115-0423.1)
7
+ ## [0.0.0-nightly-20221117-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v0.0.0-nightly-20221117-0420.1)
8
8
 
9
- Tue, 15 Nov 2022 04:28:26 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.1.7..@fluentui/react-provider_v0.0.0-nightly-20221115-0423.1)
9
+ Thu, 17 Nov 2022 04:26:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.1.7..@fluentui/react-provider_v0.0.0-nightly-20221117-0420.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221115-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/af0df438f085c82c52bb47b551d2fda80d12ffc8) by beachball)
16
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20221115-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/af0df438f085c82c52bb47b551d2fda80d12ffc8) by beachball)
17
- - Bump @fluentui/react-theme to v0.0.0-nightly-20221115-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/af0df438f085c82c52bb47b551d2fda80d12ffc8) by beachball)
18
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20221115-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/af0df438f085c82c52bb47b551d2fda80d12ffc8) by beachball)
19
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221115-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/af0df438f085c82c52bb47b551d2fda80d12ffc8) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221117-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/da504b67960d13c1434ef37a9868f5e2801f9522) by beachball)
16
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20221117-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/da504b67960d13c1434ef37a9868f5e2801f9522) by beachball)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20221117-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/da504b67960d13c1434ef37a9868f5e2801f9522) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20221117-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/da504b67960d13c1434ef37a9868f5e2801f9522) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221117-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/da504b67960d13c1434ef37a9868f5e2801f9522) by beachball)
20
20
 
21
21
  ## [9.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.1.7)
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"FluentProvider.js","sourceRoot":"","sources":["../src/FluentProvider.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './components/FluentProvider/index';\n"]}
1
+ {"version":3,"file":"FluentProvider.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-provider/src/FluentProvider.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './components/FluentProvider/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/FluentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AACA,SAAS,uCAAT,QAAwD,kCAAxD;AAGA,OAAO,MAAM,cAAc,gBAAG,KAAK,CAAC,UAAN,CAAmD,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;EACA,gCAAgC,CAAC,KAAD,CAAhC;EAEA,MAAM,aAAa,GAAG,uCAAuC,CAAC,KAAD,CAA7D;EAEA,OAAO,6BAA6B,CAAC,KAAD,EAAQ,aAAR,CAApC;AACD,CAP6B,CAAvB;AASP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles';\nimport { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';\nimport type { FluentProviderProps } from './FluentProvider.types';\n\nexport const FluentProvider = React.forwardRef<HTMLElement, FluentProviderProps>((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n\n const contextValues = useFluentProviderContextValues_unstable(state);\n\n return renderFluentProvider_unstable(state, contextValues);\n});\n\nFluentProvider.displayName = 'FluentProvider';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AACA,SAAS,uCAAT,QAAwD,kCAAxD;AAGA,OAAO,MAAM,cAAc,gBAAG,KAAK,CAAC,UAAN,CAAmD,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;EACA,gCAAgC,CAAC,KAAD,CAAhC;EAEA,MAAM,aAAa,GAAG,uCAAuC,CAAC,KAAD,CAA7D;EAEA,OAAO,6BAA6B,CAAC,KAAD,EAAQ,aAAR,CAApC;AACD,CAP6B,CAAvB;AASP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles';\nimport { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';\nimport type { FluentProviderProps } from './FluentProvider.types';\n\nexport const FluentProvider = React.forwardRef<HTMLElement, FluentProviderProps>((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n\n const contextValues = useFluentProviderContextValues_unstable(state);\n\n return renderFluentProvider_unstable(state, contextValues);\n});\n\nFluentProvider.displayName = 'FluentProvider';\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"FluentProvider.types.js","sourceRoot":"","sources":["../../../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 /** 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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FluentProvider/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/renderFluentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SACE,iBAAiB,IAAI,QADvB,EAEE,kCAAkC,IAAI,yBAFxC,EAGE,sBAAsB,IAAI,aAH5B,EAIE,+BAA+B,IAAI,sBAJrC,QAKO,iCALP;AAMA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAG,CAC3C,KAD2C,EAE3C,aAF2C,KAGzC;EACF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAsB,KAAtB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,QAAD,EAAS;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAT,eACE,KAAA,CAAA,aAAA,CAAC,aAAD,EAAc;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAd,eACE,KAAA,CAAA,aAAA,CAAC,sBAAD,EAAuB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAvB,eACE,KAAA,CAAA,aAAA,CAAC,yBAAD,EAA0B;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAA1B,eACE,KAAA,CAAA,aAAA,CAAC,qBAAD,EAAsB;IAAC,GAAG,EAAE,aAAa,CAAC;EAApB,CAAtB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,KAAK,CAAC,IAAN,CAAW,QAA5C,CADF,CADF,CADF,CADF,CADF,CADF;AAaD,CAnBM","sourcesContent":["import * as React from 'react';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n} from '@fluentui/react-shared-contexts';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { FluentProviderSlots, FluentProviderContextValues, FluentProviderState } 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 const { slots, slotProps } = getSlots<FluentProviderSlots>(state);\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <slots.root {...slotProps.root}>{state.root.children}</slots.root>\n </TextDirectionProvider>\n </TooltipVisibilityProvider>\n </ThemeClassNameProvider>\n </ThemeProvider>\n </Provider>\n );\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/renderFluentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SACE,iBAAiB,IAAI,QADvB,EAEE,kCAAkC,IAAI,yBAFxC,EAGE,sBAAsB,IAAI,aAH5B,EAIE,+BAA+B,IAAI,sBAJrC,QAKO,iCALP;AAMA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAG,CAC3C,KAD2C,EAE3C,aAF2C,KAGzC;EACF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAsB,KAAtB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,QAAD,EAAS;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAT,eACE,KAAA,CAAA,aAAA,CAAC,aAAD,EAAc;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAd,eACE,KAAA,CAAA,aAAA,CAAC,sBAAD,EAAuB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAvB,eACE,KAAA,CAAA,aAAA,CAAC,yBAAD,EAA0B;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAA1B,eACE,KAAA,CAAA,aAAA,CAAC,qBAAD,EAAsB;IAAC,GAAG,EAAE,aAAa,CAAC;EAApB,CAAtB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,KAAK,CAAC,IAAN,CAAW,QAA5C,CADF,CADF,CADF,CADF,CADF,CADF;AAaD,CAnBM","sourcesContent":["import * as React from 'react';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n} from '@fluentui/react-shared-contexts';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { FluentProviderSlots, FluentProviderContextValues, FluentProviderState } 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 const { slots, slotProps } = getSlots<FluentProviderSlots>(state);\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <slots.root {...slotProps.root}>{state.root.children}</slots.root>\n </TextDirectionProvider>\n </TooltipVisibilityProvider>\n </ThemeClassNameProvider>\n </ThemeProvider>\n </Provider>\n );\n};\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":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T,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 { dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme } = 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 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":""}
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;IAAE,GAAG,GAAG,aAAa,CAAC,GAAtB;IAA2B,cAAc,GAAG,aAAa,CAAC,cAA1D;IAA0E;EAA1E,IAAoF,KAA1F;EACA,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,GADK;IAEL,cAFK;IAGL,KAAK,EAAE,WAHF;IAIL,cAAc,EAAE,8BAA8B,CAAC;MAAE,KAAK,EAAE,WAAT;MAAsB;IAAtB,CAAD,CAJzC;IAML,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CANP;IAUL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ,EACjC,GAAG,KAD8B;MAEjC,GAFiC;MAGjC,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,eAAe,EAArB;IAHe,CAAR;EAVtB,CAAP;AAgBD,CA3CM;;AA6CP,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 { dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme } = 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 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":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,uCAAV,CAAkD,KAAlD,EAA4E;EAChF,MAAM;IAAE,IAAF;IAAQ,GAAR;IAAa,cAAb;IAA6B;EAA7B,IAAuC,KAA7C;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,IAAI,CAAC;EALhB,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 { root, dir, targetDocument, theme } = 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: root.className!,\n };\n}\n"],"sourceRoot":""}
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,IAAF;IAAQ,GAAR;IAAa,cAAb;IAA6B;EAA7B,IAAuC,KAA7C;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,IAAI,CAAC;EALhB,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 { root, dir, targetDocument, theme } = 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: root.className!,\n };\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,eAAzC;AACA,SAAS,oBAAT,QAAqC,gBAArC;AACA,SAAS,MAAT,EAAiB,gBAAjB,QAAyC,uBAAzC;AAIA,OAAO,MAAM,wBAAwB,GAAwC;EAC3E,IAAI,EAAE;AADqE,CAAtE;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;;AACA,OAAO,MAAM,gCAAgC,GAAI,KAAD,IAA+B;EAC7E,MAAM,QAAQ,GAAG,oBAAoB,EAArC;EACA,MAAM,MAAM,GAAG,SAAS,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC,GAAb;IAAkB;EAAlB,CAAD,CAAxB;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,wBAAwB,CAAC,IADQ,EAEjC,KAAK,CAAC,cAF2B,EAGjC,MAAM,CAAC,IAH0B,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAOA,OAAO,KAAP;AACD,CAZM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { FluentProviderSlots, FluentProviderState } from './FluentProvider.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const fluentProviderClassNames: SlotClassNames<FluentProviderSlots> = {\n root: 'fui-FluentProvider',\n};\n\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1,\n },\n});\n\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = (state: FluentProviderState) => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({ dir: state.dir, renderer });\n\n state.root.className = mergeClasses(\n fluentProviderClassNames.root,\n state.themeClassName,\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,eAAzC;AACA,SAAS,oBAAT,QAAqC,gBAArC;AACA,SAAS,MAAT,EAAiB,gBAAjB,QAAyC,uBAAzC;AAIA,OAAO,MAAM,wBAAwB,GAAwC;EAC3E,IAAI,EAAE;AADqE,CAAtE;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;;AACA,OAAO,MAAM,gCAAgC,GAAI,KAAD,IAA+B;EAC7E,MAAM,QAAQ,GAAG,oBAAoB,EAArC;EACA,MAAM,MAAM,GAAG,SAAS,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC,GAAb;IAAkB;EAAlB,CAAD,CAAxB;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,wBAAwB,CAAC,IADQ,EAEjC,KAAK,CAAC,cAF2B,EAGjC,MAAM,CAAC,IAH0B,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAOA,OAAO,KAAP;AACD,CAZM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { FluentProviderSlots, FluentProviderState } from './FluentProvider.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const fluentProviderClassNames: SlotClassNames<FluentProviderSlots> = {\n root: 'fui-FluentProvider',\n};\n\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1,\n },\n});\n\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = (state: FluentProviderState) => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({ dir: state.dir, renderer });\n\n state.root.className = mergeClasses(\n fluentProviderClassNames.root,\n state.themeClassName,\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,yBAAhB,QAAiD,2BAAjD;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,wBAAT,QAAyC,2BAAzC,C,CAEA;;AACA,MAAM,kBAAkB,GAAI,KAAe,CAAC,iBAAiB,QAAlB,CAAf,GACvB,KAAe,CAAC,iBAAiB,QAAlB,CADQ,GAExB,yBAFJ;;AAIA,MAAM,cAAc,GAAG,CAAC,MAAD,EAA+B,EAA/B,KAA6C;EAClE,IAAI,CAAC,MAAL,EAAa;IACX,OAAO,SAAP;EACD;;EACD,MAAM,GAAG,GAAG,MAAM,CAAC,aAAP,CAAqB,OAArB,CAAZ;EACA,GAAG,CAAC,YAAJ,CAAiB,IAAjB,EAAuB,EAAvB;EACA,MAAM,CAAC,IAAP,CA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MACpB,WAAW,CAAC,QAAQ,CAAC,OAAV,EAAmB,IAAnB,CAAX;MAEA,OAAO,MAAK;;;QACV,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAT,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,KAAA,CAAhB,GAAgB,EAAA,CAAE,MAAF,EAAhB;MACD,CAFD;IAGD;EACF,CAViB,EAUf,CAAC,UAAD,EAAa,cAAb,EAA6B,IAA7B,CAVe,CAAlB;EAYA,OAAO,UAAP;AACD,CA9BM","sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles';\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, id: string) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n tag.setAttribute('id', id);\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 *\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (options: Pick<FluentProviderState, 'theme' | 'targetDocument'>) => {\n const { targetDocument, theme } = options;\n const styleTag = React.useRef<HTMLStyleElement>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n\n const cssVarsAsString = React.useMemo(() => {\n return theme\n ? (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '')\n : '';\n }, [theme]);\n\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n\n useInsertionEffect(() => {\n styleTag.current = createStyleTag(targetDocument, styleTagId);\n\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n\n return () => {\n styleTag.current?.remove();\n };\n }\n }, [styleTagId, targetDocument, rule]);\n\n return styleTagId;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,yBAAhB,QAAiD,2BAAjD;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,wBAAT,QAAyC,2BAAzC,C,CAEA;;AACA,MAAM,kBAAkB,GAAI,KAAe,CAAC,iBAAiB,QAAlB,CAAf,GACvB,KAAe,CAAC,iBAAiB,QAAlB,CADQ,GAExB,yBAFJ;;AAIA,MAAM,cAAc,GAAG,CAAC,MAAD,EAA+B,EAA/B,KAA6C;EAClE,IAAI,CAAC,MAAL,EAAa;IACX,OAAO,SAAP;EACD;;EACD,MAAM,GAAG,GAAG,MAAM,CAAC,aAAP,CAAqB,OAArB,CAAZ;EACA,GAAG,CAAC,YAAJ,CAAiB,IAAjB,EAAuB,EAAvB;EACA,MAAM,CAAC,IAAP,CAAY,WAAZ,CAAwB,GAAxB;EACA,OAAO,GAAP;AACD,CARD;;AAUA,MAAM,WAAW,GAAG,CAAC,GAAD,EAAwB,IAAxB,KAAwC;EAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,KAAlB;;EAEA,IAAI,KAAJ,EAAW;IACT,IAAI,KAAK,CAAC,QAAN,CAAe,MAAf,GAAwB,CAA5B,EAA+B;MAC7B,KAAK,CAAC,UAAN,CAAiB,CAAjB;IACD;;IACD,KAAK,CAAC,UAAN,CAA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,UAAP;AACD,CA9BM","sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles';\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, id: string) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n tag.setAttribute('id', id);\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 *\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (options: Pick<FluentProviderState, 'theme' | 'targetDocument'>) => {\n const { targetDocument, theme } = options;\n const styleTag = React.useRef<HTMLStyleElement>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n\n const cssVarsAsString = React.useMemo(() => {\n return theme\n ? (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '')\n : '';\n }, [theme]);\n\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n\n useInsertionEffect(() => {\n styleTag.current = createStyleTag(targetDocument, styleTagId);\n\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n\n return () => {\n styleTag.current?.remove();\n };\n }\n }, [styleTagId, targetDocument, rule]);\n\n return styleTagId;\n};\n"],"sourceRoot":""}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SACE,wBADF,EAEE,cAFF,EAGE,6BAHF,EAIE,uCAJF,EAKE,0BALF,EAME,gCANF,EAOE,8BAPF,QAQO,kBARP","sourcesContent":["export {\n fluentProviderClassNames,\n FluentProvider,\n renderFluentProvider_unstable,\n useFluentProviderContextValues_unstable,\n useFluentProvider_unstable,\n useFluentProviderStyles_unstable,\n useFluentProviderThemeStyleTag,\n} from './FluentProvider';\nexport type {\n FluentProviderContextValues,\n FluentProviderProps,\n FluentProviderState,\n FluentProviderSlots,\n} from './FluentProvider';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-provider/src/index.ts"],"names":[],"mappings":"AAAA,SACE,wBADF,EAEE,cAFF,EAGE,6BAHF,EAIE,uCAJF,EAKE,0BALF,EAME,gCANF,EAOE,8BAPF,QAQO,kBARP","sourcesContent":["export {\n fluentProviderClassNames,\n FluentProvider,\n renderFluentProvider_unstable,\n useFluentProviderContextValues_unstable,\n useFluentProvider_unstable,\n useFluentProviderStyles_unstable,\n useFluentProviderThemeStyleTag,\n} from './FluentProvider';\nexport type {\n FluentProviderContextValues,\n FluentProviderProps,\n FluentProviderState,\n FluentProviderSlots,\n} from './FluentProvider';\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/FluentProvider.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/FluentProvider/index';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-provider/src/FluentProvider.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/FluentProvider/index';\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/FluentProvider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,gCAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAGa,OAAA,CAAA,cAAA,gBAAiB,KAAK,CAAC,UAAN,CAAmD,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EACA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EAEA,MAAM,aAAa,GAAG,gCAAA,CAAA,uCAAA,CAAwC,KAAxC,CAAtB;EAEA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,EAAqC,aAArC,CAAP;AACD,CAP6B,CAAjB;AASb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles';\nimport { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';\nimport type { FluentProviderProps } from './FluentProvider.types';\n\nexport const FluentProvider = React.forwardRef<HTMLElement, FluentProviderProps>((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n\n const contextValues = useFluentProviderContextValues_unstable(state);\n\n return renderFluentProvider_unstable(state, contextValues);\n});\n\nFluentProvider.displayName = 'FluentProvider';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/FluentProvider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,gCAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAGa,OAAA,CAAA,cAAA,gBAAiB,KAAK,CAAC,UAAN,CAAmD,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EACA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EAEA,MAAM,aAAa,GAAG,gCAAA,CAAA,uCAAA,CAAwC,KAAxC,CAAtB;EAEA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,EAAqC,aAArC,CAAP;AACD,CAP6B,CAAjB;AASb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles';\nimport { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';\nimport type { FluentProviderProps } from './FluentProvider.types';\n\nexport const FluentProvider = React.forwardRef<HTMLElement, FluentProviderProps>((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n\n const contextValues = useFluentProviderContextValues_unstable(state);\n\n return renderFluentProvider_unstable(state, contextValues);\n});\n\nFluentProvider.displayName = 'FluentProvider';\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/renderFluentProvider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAMA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAG,CAC3C,KAD2C,EAE3C,aAF2C,KAGzC;EACF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,iBAAD,EAAS;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAT,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,sBAAD,EAAc;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAd,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,+BAAD,EAAuB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAvB,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,kCAAD,EAA0B;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAA1B,EACE,KAAA,CAAA,aAAA,CAAC,OAAA,CAAA,qBAAD,EAAsB;IAAC,GAAG,EAAE,aAAa,CAAC;EAApB,CAAtB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,KAAK,CAAC,IAAN,CAAW,QAA5C,CADF,CADF,CADF,CADF,CADF,CADF;AAaD,CAnBM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import * as React from 'react';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n} from '@fluentui/react-shared-contexts';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { FluentProviderSlots, FluentProviderContextValues, FluentProviderState } 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 const { slots, slotProps } = getSlots<FluentProviderSlots>(state);\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <slots.root {...slotProps.root}>{state.root.children}</slots.root>\n </TextDirectionProvider>\n </TooltipVisibilityProvider>\n </ThemeClassNameProvider>\n </ThemeProvider>\n </Provider>\n );\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/renderFluentProvider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAMA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAG,CAC3C,KAD2C,EAE3C,aAF2C,KAGzC;EACF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,iBAAD,EAAS;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAT,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,sBAAD,EAAc;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAd,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,+BAAD,EAAuB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAvB,EACE,KAAA,CAAA,aAAA,CAAC,uBAAA,CAAA,kCAAD,EAA0B;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAA1B,EACE,KAAA,CAAA,aAAA,CAAC,OAAA,CAAA,qBAAD,EAAsB;IAAC,GAAG,EAAE,aAAa,CAAC;EAApB,CAAtB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,KAAK,CAAC,IAAN,CAAW,QAA5C,CADF,CADF,CADF,CADF,CADF,CADF;AAaD,CAnBM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import * as React from 'react';\nimport { TextDirectionProvider } from '@griffel/react';\nimport {\n Provider_unstable as Provider,\n TooltipVisibilityProvider_unstable as TooltipVisibilityProvider,\n ThemeProvider_unstable as ThemeProvider,\n ThemeClassNameProvider_unstable as ThemeClassNameProvider,\n} from '@fluentui/react-shared-contexts';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { FluentProviderSlots, FluentProviderContextValues, FluentProviderState } 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 const { slots, slotProps } = getSlots<FluentProviderSlots>(state);\n\n return (\n <Provider value={contextValues.provider}>\n <ThemeProvider value={contextValues.theme}>\n <ThemeClassNameProvider value={contextValues.themeClassName}>\n <TooltipVisibilityProvider value={contextValues.tooltip}>\n <TextDirectionProvider dir={contextValues.textDirection}>\n <slots.root {...slotProps.root}>{state.root.children}</slots.root>\n </TextDirectionProvider>\n </TooltipVisibilityProvider>\n </ThemeClassNameProvider>\n </ThemeProvider>\n </Provider>\n );\n};\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../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;IAAE,GAAG,GAAG,aAAa,CAAC,GAAtB;IAA2B,cAAc,GAAG,aAAa,CAAC,cAA1D;IAA0E;EAA1E,IAAoF,KAA1F;EACA,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,GADK;IAEL,cAFK;IAGL,KAAK,EAAE,WAHF;IAIL,cAAc,EAAE,gCAAA,CAAA,8BAAA,CAA+B;MAAE,KAAK,EAAE,WAAT;MAAsB;IAAtB,CAA/B,CAJX;IAML,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CANP;IAUL,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;EAVD,CAAP;AAgBD,CA3CM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B;;AA6Cb,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 { dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme } = 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 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":""}
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,K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,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 { dir = parentContext.dir, targetDocument = parentContext.targetDocument, theme } = 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 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":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,uCAAhB,CAAwD,KAAxD,EAAkF;EAChF,MAAM;IAAE,IAAF;IAAQ,GAAR;IAAa,cAAb;IAA6B;EAA7B,IAAuC,KAA7C;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,IAAI,CAAC;EALhB,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 { root, dir, targetDocument, theme } = 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: root.className!,\n };\n}\n"],"sourceRoot":""}
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,IAAF;IAAQ,GAAR;IAAa,cAAb;IAA6B;EAA7B,IAAuC,KAA7C;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,IAAI,CAAC;EALhB,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 { root, dir, targetDocument, theme } = 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: root.className!,\n };\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,MAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,wBAAA,GAAgE;EAC3E,IAAI,EAAE;AADqE,CAAhE;;AAIb,MAAM,SAAS,gBAAG,MAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;;AACO,MAAM,gCAAgC,GAAI,KAAD,IAA+B;EAC7E,MAAM,QAAQ,GAAG,OAAA,CAAA,oBAAA,EAAjB;EACA,MAAM,MAAM,GAAG,SAAS,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC,GAAb;IAAkB;EAAlB,CAAD,CAAxB;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,MAAA,CAAA,YAAA,CACrB,OAAA,CAAA,wBAAA,CAAyB,IADJ,EAErB,KAAK,CAAC,cAFe,EAGrB,MAAM,CAAC,IAHc,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAOA,OAAO,KAAP;AACD,CAZM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { FluentProviderSlots, FluentProviderState } from './FluentProvider.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const fluentProviderClassNames: SlotClassNames<FluentProviderSlots> = {\n root: 'fui-FluentProvider',\n};\n\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1,\n },\n});\n\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = (state: FluentProviderState) => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({ dir: state.dir, renderer });\n\n state.root.className = mergeClasses(\n fluentProviderClassNames.root,\n state.themeClassName,\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,MAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,wBAAA,GAAgE;EAC3E,IAAI,EAAE;AADqE,CAAhE;;AAIb,MAAM,SAAS,gBAAG,MAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;;AACO,MAAM,gCAAgC,GAAI,KAAD,IAA+B;EAC7E,MAAM,QAAQ,GAAG,OAAA,CAAA,oBAAA,EAAjB;EACA,MAAM,MAAM,GAAG,SAAS,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC,GAAb;IAAkB;EAAlB,CAAD,CAAxB;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,MAAA,CAAA,YAAA,CACrB,OAAA,CAAA,wBAAA,CAAyB,IADJ,EAErB,KAAK,CAAC,cAFe,EAGrB,MAAM,CAAC,IAHc,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAOA,OAAO,KAAP;AACD,CAZM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { FluentProviderSlots, FluentProviderState } from './FluentProvider.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const fluentProviderClassNames: SlotClassNames<FluentProviderSlots> = {\n root: 'fui-FluentProvider',\n};\n\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n textAlign: 'left',\n ...typographyStyles.body1,\n },\n});\n\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = (state: FluentProviderState) => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({ dir: state.dir, renderer });\n\n state.root.className = mergeClasses(\n fluentProviderClassNames.root,\n state.themeClassName,\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA,C,CAEA;;;AACA,MAAM,kBAAkB,GAAI,KAAe,CAAC,iBAAiB,QAAlB,CAAf,GACvB,KAAe,CAAC,iBAAiB,QAAlB,CADQ,GAExB,iBAAA,CAAA,yBAFJ;;AAIA,MAAM,cAAc,GAAG,CAAC,MAAD,EAA+B,EAA/B,KAA6C;EAClE,IAAI,CAAC,MAAL,EAAa;IACX,OAAO,SAAP;EACD;;EACD,MAAM,GAAG,GAAG,MAAM,CAAC,aAAP,CAAqB,OAArB,CAAZ;EACA,GAAG,CAAC,YAAJ,CAAiB,IAAjB,EAAuB,EAAvB;EACA,MAAM,CAAC,IAAP,CAAY,WAAZ,CAAwB,GAAxB;EACA,OAAO,GAAP;AACD,CARD;;AAUA,MAAM,WAAW,GAAG,CAAC,GAAD,EAAwB,IAAxB,KAAwC;EAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,KAAlB;;EAEA,IAAI,KAAJ,EAAW;IACT,IAAI,KAAK,CAAC,QAAN,CAAe,MAAf,GAAwB,CAA5B,EAA+B;MAC7B,KAAK,CAAC,UAAN,CAAiB,CAAjB;IACD;;IACD,KAAK,CAAC,UAAN,CAAiB,IAAjB,EAAuB,CAAvB;E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;AACD,CA9BM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles';\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, id: string) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n tag.setAttribute('id', id);\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 *\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (options: Pick<FluentProviderState, 'theme' | 'targetDocument'>) => {\n const { targetDocument, theme } = options;\n const styleTag = React.useRef<HTMLStyleElement>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n\n const cssVarsAsString = React.useMemo(() => {\n return theme\n ? (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '')\n : '';\n }, [theme]);\n\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n\n useInsertionEffect(() => {\n styleTag.current = createStyleTag(targetDocument, styleTagId);\n\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n\n return () => {\n styleTag.current?.remove();\n };\n }\n }, [styleTagId, targetDocument, rule]);\n\n return styleTagId;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-provider/src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA,C,CAEA;;;AACA,MAAM,kBAAkB,GAAI,KAAe,CAAC,iBAAiB,QAAlB,CAAf,GACvB,KAAe,CAAC,iBAAiB,QAAlB,CADQ,GAExB,iBAAA,CAAA,yBAFJ;;AAIA,MAAM,cAAc,GAAG,CAAC,MAAD,EAA+B,EAA/B,KAA6C;EAClE,IAAI,CAAC,MAAL,EAAa;IACX,OAAO,SAAP;EACD;;EACD,MAAM,GAAG,GAAG,MAAM,CAAC,aAAP,CAAqB,OAArB,CAAZ;EACA,GAAG,CAAC,YAAJ,CAAiB,IAAjB,EAAuB,EAAvB;EACA,MAAM,CAAC,IAAP,CAAY,WAAZ,CAAwB,GAAxB;EACA,OAAO,GAAP;AACD,CARD;;AAUA,MAAM,WAAW,GAAG,CAAC,GAAD,EAAwB,IAAxB,KAAwC;EAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,KAAlB;;EAEA,IAAI,KAAJ,EAAW;IACT,IAAI,KAAK,CAAC,QAAN,CAAe,MAAf,GAAwB,CAA5B,EAA+B;MAC7B,KAAK,CAAC,UAAN,CAAiB,CAAjB;IACD;;IACD,KAAK,CAAC,UAAN,CAAiB,IAAjB,EAAuB,CAAvB;EACD,CALD,MAKO,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA7B,EAA2C;IAChD;IACA,OAAO,CAAC,KAAR,CAAc,uFAAd;EACD;AACF,CAZD;AAcA;;;;AAIG;;;AACI,MAAM,8BAA8B,GAAI,OAAD,IAAmE;EAC/G,MAAM;IAAE,cAAF;IAAkB;EAAlB,IAA4B,OAAlC;EACA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,EAAjB;EAEA,MAAM,UAAU,GAAG,iBAAA,CAAA,KAAA,CAAM,yBAAA,CAAA,wBAAA,CAAyB,IAA/B,CAAnB;EAEA,MAAM,eAAe,GAAG,KAAK,CAAC,OAAN,CAAc,MAAK;IACzC,OAAO,KAAK,GACP,MAAM,CAAC,IAAP,CAAY,KAAZ,EAA8C,MAA9C,CAAqD,CAAC,UAAD,EAAa,MAAb,KAAuB;MAC3E,UAAU,IAAI,KAAK,MAAM,KAAK,KAAK,CAAC,MAAD,CAAQ,IAA3C;MACA,OAAO,UAAP;IACD,CAHA,EAGE,EAHF,CADO,GAKR,EALJ;EAMD,CAPuB,EAOrB,CAAC,KAAD,CAPqB,CAAxB;EASA,MAAM,IAAI,GAAG,IAAI,UAAU,MAAM,eAAe,IAAhD;EAEA,kBAAkB,CAAC,MAAK;IACtB,QAAQ,CAAC,OAAT,GAAmB,cAAc,CAAC,cAAD,EAAiB,UAAjB,CAAjC;;IAEA,IAAI,QAAQ,CAAC,OAAb,EAAsB;MACpB,WAAW,CAAC,QAAQ,CAAC,OAAV,EAAmB,IAAnB,CAAX;MAEA,OAAO,MAAK;;;QACV,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAT,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,KAAA,CAAhB,GAAgB,EAAA,CAAE,MAAF,EAAhB;MACD,CAFD;IAGD;EACF,CAViB,EAUf,CAAC,UAAD,EAAa,cAAb,EAA6B,IAA7B,CAVe,CAAlB;EAYA,OAAO,UAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles';\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, id: string) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n tag.setAttribute('id', id);\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 *\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (options: Pick<FluentProviderState, 'theme' | 'targetDocument'>) => {\n const { targetDocument, theme } = options;\n const styleTag = React.useRef<HTMLStyleElement>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n\n const cssVarsAsString = React.useMemo(() => {\n return theme\n ? (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '')\n : '';\n }, [theme]);\n\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n\n useInsertionEffect(() => {\n styleTag.current = createStyleTag(targetDocument, styleTagId);\n\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n\n return () => {\n styleTag.current?.remove();\n };\n }\n }, [styleTagId, targetDocument, rule]);\n\n return styleTagId;\n};\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,wBAAA;EAAwB;AAAxB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,cAAA;EAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,+BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,6BAAA;EAA6B;AAA7B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,uCAAA;EAAuC;AAAvC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,0BAAA;EAA0B;AAA1B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,gCAAA;EAAgC;AAAhC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,8BAAA;EAA8B;AAA9B,CAAA","sourcesContent":["export {\n fluentProviderClassNames,\n FluentProvider,\n renderFluentProvider_unstable,\n useFluentProviderContextValues_unstable,\n useFluentProvider_unstable,\n useFluentProviderStyles_unstable,\n useFluentProviderThemeStyleTag,\n} from './FluentProvider';\nexport type {\n FluentProviderContextValues,\n FluentProviderProps,\n FluentProviderState,\n FluentProviderSlots,\n} from './FluentProvider';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-provider/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,wBAAA;EAAwB;AAAxB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,cAAA;EAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,+BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,6BAAA;EAA6B;AAA7B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,uCAAA;EAAuC;AAAvC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,0BAAA;EAA0B;AAA1B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,gCAAA;EAAgC;AAAhC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,8BAAA;EAA8B;AAA9B,CAAA","sourcesContent":["export {\n fluentProviderClassNames,\n FluentProvider,\n renderFluentProvider_unstable,\n useFluentProviderContextValues_unstable,\n useFluentProvider_unstable,\n useFluentProviderStyles_unstable,\n useFluentProviderThemeStyleTag,\n} from './FluentProvider';\nexport type {\n FluentProviderContextValues,\n FluentProviderProps,\n FluentProviderState,\n FluentProviderSlots,\n} from './FluentProvider';\n"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-provider",
3
- "version": "0.0.0-nightly-20221115-0423.1",
3
+ "version": "0.0.0-nightly-20221117-0420.1",
4
4
  "description": "Fluent UI React provider component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -19,25 +19,24 @@
19
19
  "code-style": "just-scripts code-style",
20
20
  "just": "just-scripts",
21
21
  "lint": "just-scripts lint",
22
- "docs": "api-extractor run --config=config/api-extractor.local.json --local",
23
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-provider/src && yarn docs",
24
22
  "storybook": "start-storybook",
25
23
  "start": "yarn storybook",
26
- "type-check": "tsc -b tsconfig.json"
24
+ "type-check": "tsc -b tsconfig.json",
25
+ "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
27
26
  },
28
27
  "devDependencies": {
29
28
  "@fluentui/eslint-plugin": "*",
30
29
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20221115-0423.1",
30
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20221117-0420.1",
32
31
  "@fluentui/scripts": "^1.0.0"
33
32
  },
34
33
  "dependencies": {
35
34
  "@griffel/core": "^1.8.1",
36
35
  "@griffel/react": "^1.4.2",
37
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20221115-0423.1",
38
- "@fluentui/react-tabster": "0.0.0-nightly-20221115-0423.1",
39
- "@fluentui/react-theme": "0.0.0-nightly-20221115-0423.1",
40
- "@fluentui/react-utilities": "0.0.0-nightly-20221115-0423.1",
36
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20221117-0420.1",
37
+ "@fluentui/react-tabster": "0.0.0-nightly-20221117-0420.1",
38
+ "@fluentui/react-theme": "0.0.0-nightly-20221117-0420.1",
39
+ "@fluentui/react-utilities": "0.0.0-nightly-20221117-0420.1",
41
40
  "tslib": "^2.1.0"
42
41
  },
43
42
  "peerDependencies": {