@fluentui/react-provider 9.5.4 → 9.6.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.
Files changed (28) hide show
  1. package/CHANGELOG.json +116 -2
  2. package/CHANGELOG.md +35 -3
  3. package/dist/index.d.ts +89 -3
  4. package/lib/components/FluentProvider/FluentProvider.js +1 -1
  5. package/lib/components/FluentProvider/FluentProvider.js.map +1 -1
  6. package/lib/components/FluentProvider/FluentProvider.types.js.map +1 -1
  7. package/lib/components/FluentProvider/index.js +1 -1
  8. package/lib/components/FluentProvider/index.js.map +1 -1
  9. package/lib/components/FluentProvider/useFluentProvider.js +2 -3
  10. package/lib/components/FluentProvider/useFluentProvider.js.map +1 -1
  11. package/lib/components/FluentProvider/{useFluentProviderStyles.js → useFluentProviderStyles.styles.js} +1 -1
  12. package/lib/components/FluentProvider/useFluentProviderStyles.styles.js.map +1 -0
  13. package/lib/components/FluentProvider/useFluentProviderThemeStyleTag.js +1 -1
  14. package/lib/components/FluentProvider/useFluentProviderThemeStyleTag.js.map +1 -1
  15. package/lib-commonjs/components/FluentProvider/FluentProvider.js +2 -2
  16. package/lib-commonjs/components/FluentProvider/FluentProvider.js.map +1 -1
  17. package/lib-commonjs/components/FluentProvider/index.js +1 -1
  18. package/lib-commonjs/components/FluentProvider/index.js.map +1 -1
  19. package/lib-commonjs/components/FluentProvider/useFluentProvider.js +1 -2
  20. package/lib-commonjs/components/FluentProvider/useFluentProvider.js.map +1 -1
  21. package/lib-commonjs/components/FluentProvider/{useFluentProviderStyles.js → useFluentProviderStyles.styles.js} +2 -2
  22. package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.styles.js.map +1 -0
  23. package/lib-commonjs/components/FluentProvider/useFluentProviderThemeStyleTag.js +2 -2
  24. package/lib-commonjs/components/FluentProvider/useFluentProviderThemeStyleTag.js.map +1 -1
  25. package/package.json +9 -8
  26. package/.swcrc +0 -30
  27. package/lib/components/FluentProvider/useFluentProviderStyles.js.map +0 -1
  28. package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,121 @@
2
2
  "name": "@fluentui/react-provider",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 24 Apr 2023 08:09:15 GMT",
5
+ "date": "Thu, 18 May 2023 00:35:43 GMT",
6
+ "tag": "@fluentui/react-provider_v9.6.1",
7
+ "version": "9.6.1",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-provider",
13
+ "commit": "06cd515eda59a3078bfe32f9cc7c1f281cd20208",
14
+ "comment": "chore: add test-ssr script to v9 packages"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-provider",
21
+ "comment": "Bump @fluentui/react-tabster to v9.7.1",
22
+ "commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-provider",
27
+ "comment": "Bump @fluentui/react-utilities to v9.9.0",
28
+ "commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-provider",
33
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.4",
34
+ "commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "date": "Fri, 12 May 2023 20:27:37 GMT",
41
+ "tag": "@fluentui/react-provider_v9.6.0",
42
+ "version": "9.6.0",
43
+ "comments": {
44
+ "patch": [
45
+ {
46
+ "author": "olfedias@microsoft.com",
47
+ "package": "@fluentui/react-provider",
48
+ "commit": "9d6394b6c751092fd1d4e26ccc618b5ba05086ec",
49
+ "comment": "chore: move makeStyles() calls to .styles.ts files"
50
+ },
51
+ {
52
+ "author": "gcox@microsoft.com",
53
+ "package": "@fluentui/react-provider",
54
+ "commit": "ee977e20d359922798949a4f18af7a036ca36ca3",
55
+ "comment": "Update to use single hook selector"
56
+ },
57
+ {
58
+ "author": "olfedias@microsoft.com",
59
+ "package": "@fluentui/react-provider",
60
+ "commit": "c28decb23d191a0daaaf6d5d1832429715102129",
61
+ "comment": "chore: exclude .swcrc from being published"
62
+ }
63
+ ],
64
+ "none": [
65
+ {
66
+ "author": "martinhochel@microsoft.com",
67
+ "package": "@fluentui/react-provider",
68
+ "commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
69
+ "comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
70
+ }
71
+ ],
72
+ "minor": [
73
+ {
74
+ "author": "marcosvmmoura@gmail.com",
75
+ "package": "@fluentui/react-provider",
76
+ "commit": "3a9044346aced02d96e8cde65b46e88e8d9d32ec",
77
+ "comment": "feat: add style overrides for drawer components"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-provider",
82
+ "comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
83
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-provider",
88
+ "comment": "Bump @fluentui/react-tabster to v9.7.0",
89
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-provider",
94
+ "comment": "Bump @fluentui/react-theme to v9.1.8",
95
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-provider",
100
+ "comment": "Bump @fluentui/react-utilities to v9.8.1",
101
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-provider",
106
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3",
107
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-provider",
112
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21",
113
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ {
119
+ "date": "Mon, 24 Apr 2023 08:12:40 GMT",
6
120
  "tag": "@fluentui/react-provider_v9.5.4",
7
121
  "version": "9.5.4",
8
122
  "comments": {
@@ -17,7 +131,7 @@
17
131
  "author": "beachball",
18
132
  "package": "@fluentui/react-provider",
19
133
  "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2",
20
- "commit": "948b5bf9871303d1742f1b9a17a3bd4006ce2fea"
134
+ "commit": "505433ac64f144c9cca456097413d6af4582e5ee"
21
135
  }
22
136
  ]
23
137
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,50 @@
1
1
  # Change Log - @fluentui/react-provider
2
2
 
3
- This log was last generated on Mon, 24 Apr 2023 08:09:15 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 18 May 2023 00:35:43 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.6.1)
8
+
9
+ Thu, 18 May 2023 00:35:43 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.6.0..@fluentui/react-provider_v9.6.1)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-tabster to v9.7.1 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.9.0 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.4 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
17
+
18
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.6.0)
19
+
20
+ Fri, 12 May 2023 20:27:37 GMT
21
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.5.4..@fluentui/react-provider_v9.6.0)
22
+
23
+ ### Minor changes
24
+
25
+ - feat: add style overrides for drawer components ([PR #27581](https://github.com/microsoft/fluentui/pull/27581) by marcosvmmoura@gmail.com)
26
+ - Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
27
+ - Bump @fluentui/react-tabster to v9.7.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
28
+ - Bump @fluentui/react-theme to v9.1.8 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
29
+ - Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
31
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
32
+
33
+ ### Patches
34
+
35
+ - chore: move makeStyles() calls to .styles.ts files ([PR #27698](https://github.com/microsoft/fluentui/pull/27698) by olfedias@microsoft.com)
36
+ - Update to use single hook selector ([PR #27491](https://github.com/microsoft/fluentui/pull/27491) by gcox@microsoft.com)
37
+ - chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
38
+
7
39
  ## [9.5.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.5.4)
8
40
 
9
- Mon, 24 Apr 2023 08:09:15 GMT
41
+ Mon, 24 Apr 2023 08:12:40 GMT
10
42
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.5.3..@fluentui/react-provider_v9.5.4)
11
43
 
12
44
  ### Patches
13
45
 
14
46
  - bugfix: remove caret from react-jsx-runtime prerelease dependency ([PR #27588](https://github.com/microsoft/fluentui/pull/27588) by bernardo.sunderhus@gmail.com)
15
- - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([PR #27632](https://github.com/microsoft/fluentui/pull/27632) by beachball)
47
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
16
48
 
17
49
  ## [9.5.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.5.3)
18
50
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from '@fluentui/react-utilities';
2
2
  import type { ComponentState } from '@fluentui/react-utilities';
3
- import { CustomStyleHooksContextValue_unstable } from '@fluentui/react-shared-contexts';
3
+ import type { CustomStyleHooksContextValue_unstable } from '@fluentui/react-shared-contexts';
4
4
  import { OverridesContextValue_unstable } from '@fluentui/react-shared-contexts';
5
5
  import type { PartialTheme } from '@fluentui/react-theme';
6
6
  import type { ProviderContextValue_unstable } from '@fluentui/react-shared-contexts';
@@ -14,7 +14,93 @@ import type { TooltipVisibilityContextValue_unstable } from '@fluentui/react-sha
14
14
 
15
15
  export declare const FluentProvider: React_2.ForwardRefExoticComponent<Omit<ComponentProps<FluentProviderSlots, "root">, "dir"> & {
16
16
  applyStylesToPortals?: boolean | undefined;
17
- customStyleHooks_unstable?: Partial<CustomStyleHooksContextValue_unstable> | undefined;
17
+ customStyleHooks_unstable?: Partial<{
18
+ useAccordionHeaderStyles_unstable: (state: unknown) => void;
19
+ useAccordionItemStyles_unstable: (state: unknown) => void;
20
+ useAccordionPanelStyles_unstable: (state: unknown) => void;
21
+ useAccordionStyles_unstable: (state: unknown) => void;
22
+ useAvatarStyles_unstable: (state: unknown) => void;
23
+ useAvatarGroupStyles_unstable: (state: unknown) => void;
24
+ useAvatarGroupItemStyles_unstable: (state: unknown) => void;
25
+ useAvatarGroupPopoverStyles_unstable: (state: unknown) => void;
26
+ useBadgeStyles_unstable: (state: unknown) => void;
27
+ useCounterBadgeStyles_unstable: (state: unknown) => void;
28
+ useCardHeaderStyles_unstable: (state: unknown) => void;
29
+ useCardStyles_unstable: (state: unknown) => void;
30
+ useCardFooterStyles_unstable: (state: unknown) => void;
31
+ useCardPreviewStyles_unstable: (state: unknown) => void;
32
+ usePresenceBadgeStyles_unstable: (state: unknown) => void;
33
+ useButtonStyles_unstable: (state: unknown) => void;
34
+ useCompoundButtonStyles_unstable: (state: unknown) => void;
35
+ useMenuButtonStyles_unstable: (state: unknown) => void;
36
+ useSplitButtonStyles_unstable: (state: unknown) => void;
37
+ useToggleButtonStyles_unstable: (state: unknown) => void;
38
+ useCheckboxStyles_unstable: (state: unknown) => void;
39
+ useComboboxStyles_unstable: (state: unknown) => void;
40
+ useDropdownStyles_unstable: (state: unknown) => void;
41
+ useListboxStyles_unstable: (state: unknown) => void;
42
+ useOptionStyles_unstable: (state: unknown) => void;
43
+ useOptionGroupStyles_unstable: (state: unknown) => void;
44
+ useDividerStyles_unstable: (state: unknown) => void;
45
+ useInputStyles_unstable: (state: unknown) => void;
46
+ useImageStyles_unstable: (state: unknown) => void;
47
+ useLabelStyles_unstable: (state: unknown) => void;
48
+ useLinkStyles_unstable: (state: unknown) => void;
49
+ useMenuDividerStyles_unstable: (state: unknown) => void;
50
+ useMenuGroupHeaderStyles_unstable: (state: unknown) => void;
51
+ useMenuGroupStyles_unstable: (state: unknown) => void;
52
+ useMenuItemCheckboxStyles_unstable: (state: unknown) => void;
53
+ useMenuItemRadioStyles_unstable: (state: unknown) => void;
54
+ useMenuItemStyles_unstable: (state: unknown) => void;
55
+ useMenuListStyles_unstable: (state: unknown) => void;
56
+ useMenuPopoverStyles_unstable: (state: unknown) => void;
57
+ useMenuSplitGroupStyles_unstable: (state: unknown) => void;
58
+ usePersonaStyles_unstable: (state: unknown) => void;
59
+ usePopoverSurfaceStyles_unstable: (state: unknown) => void;
60
+ useRadioGroupStyles_unstable: (state: unknown) => void;
61
+ useRadioStyles_unstable: (state: unknown) => void;
62
+ useSelectStyles_unstable: (state: unknown) => void;
63
+ useSliderStyles_unstable: (state: unknown) => void;
64
+ useSpinButtonStyles_unstable: (state: unknown) => void;
65
+ useSpinnerStyles_unstable: (state: unknown) => void;
66
+ useSwitchStyles_unstable: (state: unknown) => void;
67
+ useTabStyles_unstable: (state: unknown) => void;
68
+ useTabListStyles_unstable: (state: unknown) => void;
69
+ useTextStyles_unstable: (state: unknown) => void;
70
+ useTextareaStyles_unstable: (state: unknown) => void;
71
+ useTooltipStyles_unstable: (state: unknown) => void;
72
+ useDialogTitleStyles_unstable: (state: unknown) => void;
73
+ useDialogBodyStyles_unstable: (state: unknown) => void;
74
+ useDialogActionsStyles_unstable: (state: unknown) => void;
75
+ useDialogSurfaceStyles_unstable: (state: unknown) => void;
76
+ useDialogContentStyles_unstable: (state: unknown) => void;
77
+ useProgressBarStyles_unstable: (state: unknown) => void;
78
+ useToolbarButtonStyles_unstable: (state: unknown) => void;
79
+ useToolbarRadioButtonStyles_unstable: (state: unknown) => void;
80
+ useToolbarGroupStyles_unstable: (state: unknown) => void;
81
+ useToolbarToggleButtonStyles_unstable: (state: unknown) => void;
82
+ useToolbarDividerStyles_unstable: (state: unknown) => void;
83
+ useToolbarStyles_unstable: (state: unknown) => void;
84
+ useTableCellStyles_unstable: (state: unknown) => void;
85
+ useTableRowStyles_unstable: (state: unknown) => void;
86
+ useTableBodyStyles_unstable: (state: unknown) => void;
87
+ useTableStyles_unstable: (state: unknown) => void;
88
+ useTableHeaderStyles_unstable: (state: unknown) => void;
89
+ useTableHeaderCellStyles_unstable: (state: unknown) => void;
90
+ useTableResizeHandleStyles_unstable: (state: unknown) => void;
91
+ useTableSelectionCellStyles_unstable: (state: unknown) => void;
92
+ useTableCellActionsStyles_unstable: (state: unknown) => void;
93
+ useTableCellLayoutStyles_unstable: (state: unknown) => void;
94
+ useDataGridCellStyles_unstable: (state: unknown) => void;
95
+ useDataGridRowStyles_unstable: (state: unknown) => void;
96
+ useDataGridBodyStyles_unstable: (state: unknown) => void;
97
+ useDataGridStyles_unstable: (state: unknown) => void;
98
+ useDataGridHeaderStyles_unstable: (state: unknown) => void;
99
+ useDataGridHeaderCellStyles_unstable: (state: unknown) => void;
100
+ useDataGridSelectionCellStyles_unstable: (state: unknown) => void;
101
+ useDrawerStyles_unstable: (state: unknown) => void;
102
+ useDrawerBodyStyles_unstable: (state: unknown) => void;
103
+ }> | undefined;
18
104
  dir?: "ltr" | "rtl" | undefined;
19
105
  targetDocument?: Document | undefined;
20
106
  theme?: Partial<Theme> | undefined;
@@ -30,7 +116,7 @@ export declare type FluentProviderContextValues = Pick<FluentProviderState, 'cus
30
116
  tooltip: TooltipVisibilityContextValue_unstable;
31
117
  };
32
118
 
33
- export declare type FluentProviderCustomStyleHooks = Partial<CustomStyleHooksContextValue_unstable>;
119
+ export declare type FluentProviderCustomStyleHooks = CustomStyleHooksContextValue_unstable;
34
120
 
35
121
  export declare type FluentProviderProps = Omit<ComponentProps<FluentProviderSlots>, 'dir'> & {
36
122
  /**
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { renderFluentProvider_unstable } from './renderFluentProvider';
3
3
  import { useFluentProvider_unstable } from './useFluentProvider';
4
- import { useFluentProviderStyles_unstable } from './useFluentProviderStyles';
4
+ import { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styles';
5
5
  import { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';
6
6
  export const FluentProvider = /*#__PURE__*/React.forwardRef((props, ref) => {
7
7
  const state = useFluentProvider_unstable(props, ref);
@@ -1 +1 @@
1
- {"version":3,"names":["React","renderFluentProvider_unstable","useFluentProvider_unstable","useFluentProviderStyles_unstable","useFluentProviderContextValues_unstable","FluentProvider","forwardRef","props","ref","state","contextValues","displayName"],"sources":["../../../src/components/FluentProvider/FluentProvider.tsx"],"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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,uCAAuC,QAAQ;AAGxD,OAAO,MAAMC,cAAA,gBAAiBL,KAAA,CAAMM,UAAU,CAAmC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQP,0BAAA,CAA2BK,KAAA,EAAOC,GAAA;EAChDL,gCAAA,CAAiCM,KAAA;EAEjC,MAAMC,aAAA,GAAgBN,uCAAA,CAAwCK,KAAA;EAE9D,OAAOR,6BAAA,CAA8BQ,KAAA,EAAOC,aAAA;AAC9C;AAEAL,cAAA,CAAeM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","renderFluentProvider_unstable","useFluentProvider_unstable","useFluentProviderStyles_unstable","useFluentProviderContextValues_unstable","FluentProvider","forwardRef","props","ref","state","contextValues","displayName"],"sources":["../../../src/components/FluentProvider/FluentProvider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styles';\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,uCAAuC,QAAQ;AAGxD,OAAO,MAAMC,cAAA,gBAAiBL,KAAA,CAAMM,UAAU,CAAmC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQP,0BAAA,CAA2BK,KAAA,EAAOC,GAAA;EAChDL,gCAAA,CAAiCM,KAAA;EAEjC,MAAMC,aAAA,GAAgBN,uCAAA,CAAwCK,KAAA;EAE9D,OAAOR,6BAAA,CAA8BQ,KAAA,EAAOC,aAAA;AAC9C;AAEAL,cAAA,CAAeM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/FluentProvider/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 = Partial<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"],"mappings":"AAAA"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/FluentProvider/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"],"mappings":"AAAA"}
@@ -2,7 +2,7 @@ export * from './FluentProvider';
2
2
  export * from './FluentProvider.types';
3
3
  export * from './renderFluentProvider';
4
4
  export * from './useFluentProvider';
5
- export * from './useFluentProviderStyles';
5
+ export * from './useFluentProviderStyles.styles';
6
6
  export * from './useFluentProviderContextValues';
7
7
  export * from './useFluentProviderThemeStyleTag';
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/FluentProvider/index.ts"],"sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/FluentProvider/index.ts"],"sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles.styles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -1,5 +1,5 @@
1
1
  import { useFocusVisible } from '@fluentui/react-tabster';
2
- import { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, useCustomStyleHooks_unstable as useCustomStyleHooks } from '@fluentui/react-shared-contexts';
2
+ import { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, CustomStyleHooksContext_unstable as CustomStyleHooksContext } from '@fluentui/react-shared-contexts';
3
3
  import { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';
4
4
  import * as React from 'react';
5
5
  import { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';
@@ -17,7 +17,7 @@ export const useFluentProvider_unstable = (props, ref) => {
17
17
  const parentContext = useFluent();
18
18
  const parentTheme = useTheme();
19
19
  const parentOverrides = useOverrides();
20
- const parentCustomStyleHooks = useCustomStyleHooks();
20
+ const parentCustomStyleHooks = React.useContext(CustomStyleHooksContext) || {};
21
21
  /**
22
22
  * TODO: add merge functions to "dir" merge,
23
23
  * nesting providers with the same "dir" should not add additional attributes to DOM
@@ -34,7 +34,6 @@ export const useFluentProvider_unstable = (props, ref) => {
34
34
  } = props;
35
35
  const mergedTheme = shallowMerge(parentTheme, theme);
36
36
  const mergedOverrides = shallowMerge(parentOverrides, overrides);
37
- // parentCustomStyleHooks will not be a partial
38
37
  const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);
39
38
  React.useEffect(() => {
40
39
  if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {
@@ -1 +1 @@
1
- {"version":3,"names":["useFocusVisible","ThemeContext_unstable","ThemeContext","useFluent_unstable","useFluent","useOverrides_unstable","useOverrides","useCustomStyleHooks_unstable","useCustomStyleHooks","getNativeElementProps","useMergedRefs","React","useFluentProviderThemeStyleTag","useRenderer_unstable","useFluentProvider_unstable","props","ref","parentContext","parentTheme","useTheme","parentOverrides","parentCustomStyleHooks","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","useEffect","process","env","NODE_ENV","undefined","console","warn","renderer","_renderer_styleElementAttributes","styleTagId","rule","rendererAttributes","styleElementAttributes","themeClassName","components","root","serverStyleProps","cssRule","attributes","id","a","b","useContext"],"sources":["../../../src/components/FluentProvider/useFluentProvider.ts"],"sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n useOverrides_unstable as useOverrides,\n useCustomStyleHooks_unstable as useCustomStyleHooks,\n} from '@fluentui/react-shared-contexts';\nimport type {\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\n\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\nimport { useRenderer_unstable } from '@griffel/react';\n\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */\nexport const useFluentProvider_unstable = (\n props: FluentProviderProps,\n ref: React.Ref<HTMLElement>,\n): FluentProviderState => {\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks = useCustomStyleHooks();\n\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {},\n } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n\n // parentCustomStyleHooks will not be a partial\n const mergedCustomStyleHooks = shallowMerge(\n parentCustomStyleHooks,\n customStyleHooks_unstable,\n ) as CustomStyleHooksContextValue;\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 const renderer = useRenderer_unstable();\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: renderer.styleElementAttributes ?? {},\n });\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>({ targetDocument })),\n }),\n\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId,\n },\n },\n };\n};\n\nfunction shallowMerge<T>(a: T, b: T): T {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return { ...a, ...b };\n }\n\n if (a) {\n return a;\n }\n\n return b;\n}\n\nfunction useTheme(): ThemeContextValue {\n return React.useContext(ThemeContext);\n}\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ;AAChC,SACEC,qBAAA,IAAyBC,YAAY,EACrCC,kBAAA,IAAsBC,SAAS,EAC/BC,qBAAA,IAAyBC,YAAY,EACrCC,4BAAA,IAAgCC,mBAAmB,QAC9C;AAMP,SAASC,qBAAqB,EAAEC,aAAa,QAAQ;AACrD,YAAYC,KAAA,MAAW;AACvB,SAASC,8BAA8B,QAAQ;AAE/C,SAASC,oBAAoB,QAAQ;AAErC;;;;;;;;;AASA,OAAO,MAAMC,0BAAA,GAA6BA,CACxCC,KAAA,EACAC,GAAA,KACwB;EACxB,MAAMC,aAAA,GAAgBb,SAAA;EACtB,MAAMc,WAAA,GAAcC,QAAA;EACpB,MAAMC,eAAA,GAAkBd,YAAA;EACxB,MAAMe,sBAAA,GAAyBb,mBAAA;EAE/B;;;;;EAKA,MAAM;IACJc,oBAAA,GAAuB,IAAI;IAC3B;IACAC,yBAAA;IACAC,GAAA,GAAMP,aAAA,CAAcO,G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,EAAY;QACV,GAAGX,QAAA,CAASK,sBAAsB;QAClCO,EAAA,EAAIV;MACN;IACF;EACF;AACF;AAEA,SAASZ,aAAgBuB,CAAI,EAAEC,CAAI,EAAK;EACtC;EACA,IAAID,CAAA,IAAKC,CAAA,EAAG;IACV,OAAO;MAAE,GAAGD,CAAC;MAAE,GAAGC;IAAE;EACtB;EAEA,IAAID,CAAA,EAAG;IACL,OAAOA,CAAA;EACT;EAEA,OAAOC,CAAA;AACT;AAEA,SAASnC,SAAA,EAA8B;EACrC,OAAOR,KAAA,CAAM4C,UAAU,CAACrD,YAAA;AAC1B"}
1
+ {"version":3,"names":["useFocusVisible","ThemeContext_unstable","ThemeContext","useFluent_unstable","useFluent","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","getNativeElementProps","useMergedRefs","React","useFluentProviderThemeStyleTag","useRenderer_unstable","useFluentProvider_unstable","props","ref","parentContext","parentTheme","useTheme","parentOverrides","parentCustomStyleHooks","useContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","useEffect","process","env","NODE_ENV","undefined","console","warn","renderer","_renderer_styleElementAttributes","styleTagId","rule","rendererAttributes","styleElementAttributes","themeClassName","components","root","serverStyleProps","cssRule","attributes","id","a","b"],"sources":["../../../src/components/FluentProvider/useFluentProvider.ts"],"sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport {\n ThemeContext_unstable as ThemeContext,\n useFluent_unstable as useFluent,\n useOverrides_unstable as useOverrides,\n CustomStyleHooksContext_unstable as CustomStyleHooksContext,\n} from '@fluentui/react-shared-contexts';\nimport type {\n CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,\n ThemeContextValue_unstable as ThemeContextValue,\n} from '@fluentui/react-shared-contexts';\n\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport type { FluentProviderProps, FluentProviderState } from './FluentProvider.types';\nimport { useRenderer_unstable } from '@griffel/react';\n\n/**\n * Create the state required to render FluentProvider.\n *\n * The returned state can be modified with hooks such as useFluentProviderStyles_unstable,\n * before being passed to renderFluentProvider_unstable.\n *\n * @param props - props from this instance of FluentProvider\n * @param ref - reference to root HTMLElement of FluentProvider\n */\nexport const useFluentProvider_unstable = (\n props: FluentProviderProps,\n ref: React.Ref<HTMLElement>,\n): FluentProviderState => {\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks: CustomStyleHooksContextValue = React.useContext(CustomStyleHooksContext) || {};\n\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {},\n } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n\n const mergedCustomStyleHooks = shallowMerge(\n parentCustomStyleHooks,\n customStyleHooks_unstable,\n ) as CustomStyleHooksContextValue;\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 const renderer = useRenderer_unstable();\n const { styleTagId, rule } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: renderer.styleElementAttributes ?? {},\n });\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible<HTMLDivElement>({ targetDocument })),\n }),\n\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId,\n },\n },\n };\n};\n\nfunction shallowMerge<T>(a: T, b: T): T {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return { ...a, ...b };\n }\n\n if (a) {\n return a;\n }\n\n return b;\n}\n\nfunction useTheme(): ThemeContextValue {\n return React.useContext(ThemeContext);\n}\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ;AAChC,SACEC,qBAAA,IAAyBC,YAAY,EACrCC,kBAAA,IAAsBC,SAAS,EAC/BC,qBAAA,IAAyBC,YAAY,EACrCC,gCAAA,IAAoCC,uBAAuB,QACtD;AAMP,SAASC,qBAAqB,EAAEC,aAAa,QAAQ;AACrD,YAAYC,KAAA,MAAW;AACvB,SAASC,8BAA8B,QAAQ;AAE/C,SAASC,oBAAoB,QAAQ;AAErC;;;;;;;;;AASA,OAAO,MAAMC,0BAAA,GAA6BA,CACxCC,KAAA,EACAC,GAAA,KACwB;EACxB,MAAMC,aAAA,GAAgBb,SAAA;EACtB,MAAMc,WAAA,GAAcC,QAAA;EACpB,MAAMC,eAAA,GAAkBd,YAAA;EACxB,MAAMe,sBAAA,GAAuDV,KAAA,CAAMW,UAAU,CAACd,uBAAA,KAA4B,CAAC;EAE3G;;;;;EAKA,MAAM;IACJe,oBAAA,GAAuB,IAAI;IAC3B;IACAC,yBAAA;IACAC,GAAA,GAAMR,aAAA,CAAcQ,GAAG;IACvBC,cAAA,G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AAsB;QAClCO,EAAA,EAAIV;MACN;IACF;EACF;AACF;AAEA,SAASZ,aAAgBuB,CAAI,EAAEC,CAAI,EAAK;EACtC;EACA,IAAID,CAAA,IAAKC,CAAA,EAAG;IACV,OAAO;MAAE,GAAGD,CAAC;MAAE,GAAGC;IAAE;EACtB;EAEA,IAAID,CAAA,EAAG;IACL,OAAOA,CAAA;EACT;EAEA,OAAOC,CAAA;AACT;AAEA,SAASpC,SAAA,EAA8B;EACrC,OAAOR,KAAA,CAAMW,UAAU,CAACpB,YAAA;AAC1B"}
@@ -27,4 +27,4 @@ export const useFluentProviderStyles_unstable = state => {
27
27
  state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);
28
28
  return state;
29
29
  };
30
- //# sourceMappingURL=useFluentProviderStyles.js.map
30
+ //# sourceMappingURL=useFluentProviderStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","useRenderer_unstable","tokens","typographyStyles","fluentProviderClassNames","root","useStyles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useFluentProviderStyles_unstable","state","renderer","styles","dir","className","themeClassName"],"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.styles.ts"],"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"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AACzC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,wBAAA,GAAgE;EAC3EC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAOlB;AAEA;AACA,OAAO,MAAMC,gCAAA,GAAoCC,KAAA,IAA+B;EAC9E,MAAMC,QAAA,GAAWhB,oBAAA;EACjB,MAAMiB,MAAA,GAASZ,SAAA,CAAU;IAAEa,GAAA,EAAKH,KAAA,CAAMG,GAAG;IAAEF;EAAS;EAEpDD,KAAA,CAAMX,IAAI,CAACe,SAAS,GAAGpB,YAAA,CACrBI,wBAAA,CAAyBC,IAAI,EAC7BW,KAAA,CAAMK,cAAc,EACpBH,MAAA,CAAOb,IAAI,EACXW,KAAA,CAAMX,IAAI,CAACe,SAAS;EAGtB,OAAOJ,KAAA;AACT"}
@@ -1,6 +1,6 @@
1
1
  import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';
2
2
  import * as React from 'react';
3
- import { fluentProviderClassNames } from './useFluentProviderStyles';
3
+ import { fluentProviderClassNames } from './useFluentProviderStyles.styles';
4
4
  // String concatenation is used to prevent bundlers to complain with older versions of React
5
5
  const useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useIsomorphicLayoutEffect;
6
6
  const createStyleTag = (target, elementAttributes) => {
@@ -1 +1 @@
1
- {"version":3,"names":["useId","useIsomorphicLayoutEffect","React","fluentProviderClassNames","useInsertionEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","useFluentProviderThemeStyleTag","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","root","styleElementAttributes","cssVarsAsString","useMemo","reduce","cssVarRule","cssVar","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"sources":["../../../src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\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, elementAttributes: Record<string, string>) => {\n if (!target) {\n return undefined;\n }\n\n const tag = target.createElement('style');\n\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n\n target.head.appendChild(tag);\n return tag;\n};\n\nconst insertSheet = (tag: HTMLStyleElement, rule: string) => {\n const sheet = tag.sheet;\n\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (\n options: Pick<FluentProviderState, 'theme' | 'targetDocument'> & { rendererAttributes: Record<string, string> },\n) => {\n const { targetDocument, theme, rendererAttributes } = options;\n\n const styleTag = React.useRef<HTMLStyleElement | undefined | null>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n\n const 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 useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument?.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement as HTMLStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, { ...styleElementAttributes, id: styleTagId });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n\n return () => {\n styleTag.current?.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n\n return { styleTagId, rule };\n};\n\nfunction useHandleSSRStyleElements(targetDocument: Document | undefined | null, styleTagId: string) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,yBAAyB,QAAQ;AACjD,YAAYC,KAAA,MAAW;AAGvB,SAASC,wBAAwB,QAAQ;AAEzC;AACA,MAAMC,kBAAA,GAAqBF,KAAgB,CAAC,iBAAiB,SAAS,GAClEA,KAAgB,CAAC,iBAAiB,SAAS,GAC3CD,yBAAyB;AAE7B,MAAMI,cAAA,GAAiBA,CAACC,MAAA,EAA8BC,iBAAA,KAA8C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ertionEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","useFluentProviderThemeStyleTag","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","root","styleElementAttributes","cssVarsAsString","useMemo","reduce","cssVarRule","cssVar","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"sources":["../../../src/components/FluentProvider/useFluentProviderThemeStyleTag.ts"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type { FluentProviderState } from './FluentProvider.types';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = (React as never)['useInsertion' + 'Effect']\n ? (React as never)['useInsertion' + 'Effect']\n : useIsomorphicLayoutEffect;\n\nconst createStyleTag = (target: Document | undefined, elementAttributes: Record<string, string>) => {\n if (!target) {\n return undefined;\n }\n\n const tag = target.createElement('style');\n\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n\n target.head.appendChild(tag);\n return tag;\n};\n\nconst insertSheet = (tag: HTMLStyleElement, rule: string) => {\n const sheet = tag.sheet;\n\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = (\n options: Pick<FluentProviderState, 'theme' | 'targetDocument'> & { rendererAttributes: Record<string, string> },\n) => {\n const { targetDocument, theme, rendererAttributes } = options;\n\n const styleTag = React.useRef<HTMLStyleElement | undefined | null>();\n\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n\n const 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 useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument?.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement as HTMLStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, { ...styleElementAttributes, id: styleTagId });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n\n return () => {\n styleTag.current?.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n\n return { styleTagId, rule };\n};\n\nfunction useHandleSSRStyleElements(targetDocument: Document | undefined | null, styleTagId: string) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,yBAAyB,QAAQ;AACjD,YAAYC,KAAA,MAAW;AAGvB,SAASC,wBAAwB,QAAQ;AAEzC;AACA,MAAMC,kBAAA,GAAqBF,KAAgB,CAAC,iBAAiB,SAAS,GAClEA,KAAgB,CAAC,iBAAiB,SAAS,GAC3CD,yBAAyB;AAE7B,MAAMI,cAAA,GAAiBA,CAACC,MAAA,EAA8BC,iBAAA,KAA8C;E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
10
10
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
11
  const _renderFluentProvider = require("./renderFluentProvider");
12
12
  const _useFluentProvider = require("./useFluentProvider");
13
- const _useFluentProviderStyles = require("./useFluentProviderStyles");
13
+ const _useFluentProviderStylesStyles = require("./useFluentProviderStyles.styles");
14
14
  const _useFluentProviderContextValues = require("./useFluentProviderContextValues");
15
15
  const FluentProvider = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
16
  const state = (0, _useFluentProvider.useFluentProvider_unstable)(props, ref);
17
- (0, _useFluentProviderStyles.useFluentProviderStyles_unstable)(state);
17
+ (0, _useFluentProviderStylesStyles.useFluentProviderStyles_unstable)(state);
18
18
  const contextValues = (0, _useFluentProviderContextValues.useFluentProviderContextValues_unstable)(state);
19
19
  return (0, _renderFluentProvider.renderFluentProvider_unstable)(state, contextValues);
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/FluentProvider/FluentProvider.js"],"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';\nexport const FluentProvider = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n const contextValues = useFluentProviderContextValues_unstable(state);\n return renderFluentProvider_unstable(state, contextValues);\n});\nFluentProvider.displayName = 'FluentProvider';\n//# sourceMappingURL=FluentProvider.js.map"],"names":["FluentProvider","React","forwardRef","props","ref","state","useFluentProvider_unstable","useFluentProviderStyles_unstable","contextValues","useFluentProviderContextValues_unstable","renderFluentProvider_unstable","displayName"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;sCACuB;mCACH;yCACM;gDACO;AACjD,MAAMA,iBAAiB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC1E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,yDAAgC,EAACF;IACjC,MAAMG,gBAAgBC,IAAAA,uEAAuC,EAACJ;IAC9D,OAAOK,IAAAA,mDAA6B,EAACL,OAAOG;AAC9C;AACAR,eAAeW,WAAW,GAAG,kBAC7B,0CAA0C"}
1
+ {"version":3,"sources":["../../../lib/components/FluentProvider/FluentProvider.js"],"sourcesContent":["import * as React from 'react';\nimport { renderFluentProvider_unstable } from './renderFluentProvider';\nimport { useFluentProvider_unstable } from './useFluentProvider';\nimport { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styles';\nimport { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues';\nexport const FluentProvider = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useFluentProvider_unstable(props, ref);\n useFluentProviderStyles_unstable(state);\n const contextValues = useFluentProviderContextValues_unstable(state);\n return renderFluentProvider_unstable(state, contextValues);\n});\nFluentProvider.displayName = 'FluentProvider';\n//# sourceMappingURL=FluentProvider.js.map"],"names":["FluentProvider","React","forwardRef","props","ref","state","useFluentProvider_unstable","useFluentProviderStyles_unstable","contextValues","useFluentProviderContextValues_unstable","renderFluentProvider_unstable","displayName"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;sCACuB;mCACH;+CACM;gDACO;AACjD,MAAMA,iBAAiB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC1E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjC,MAAMG,gBAAgBC,IAAAA,uEAAuC,EAACJ;IAC9D,OAAOK,IAAAA,mDAA6B,EAACL,OAAOG;AAC9C;AACAR,eAAeW,WAAW,GAAG,kBAC7B,0CAA0C"}
@@ -7,7 +7,7 @@ _exportStar(require("./FluentProvider"), exports);
7
7
  _exportStar(require("./FluentProvider.types"), exports);
8
8
  _exportStar(require("./renderFluentProvider"), exports);
9
9
  _exportStar(require("./useFluentProvider"), exports);
10
- _exportStar(require("./useFluentProviderStyles"), exports);
10
+ _exportStar(require("./useFluentProviderStyles.styles"), exports);
11
11
  _exportStar(require("./useFluentProviderContextValues"), exports);
12
12
  _exportStar(require("./useFluentProviderThemeStyleTag"), exports);
13
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/FluentProvider/index.js"],"sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/FluentProvider/index.js"],"sourcesContent":["export * from './FluentProvider';\nexport * from './FluentProvider.types';\nexport * from './renderFluentProvider';\nexport * from './useFluentProvider';\nexport * from './useFluentProviderStyles.styles';\nexport * from './useFluentProviderContextValues';\nexport * from './useFluentProviderThemeStyleTag';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -17,7 +17,7 @@ const useFluentProvider_unstable = (props, ref)=>{
17
17
  const parentContext = (0, _reactSharedContexts.useFluent_unstable)();
18
18
  const parentTheme = useTheme();
19
19
  const parentOverrides = (0, _reactSharedContexts.useOverrides_unstable)();
20
- const parentCustomStyleHooks = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
20
+ const parentCustomStyleHooks = _react.useContext(_reactSharedContexts.CustomStyleHooksContext_unstable) || {};
21
21
  /**
22
22
  * TODO: add merge functions to "dir" merge,
23
23
  * nesting providers with the same "dir" should not add additional attributes to DOM
@@ -26,7 +26,6 @@ const useFluentProvider_unstable = (props, ref)=>{
26
26
  customStyleHooks_unstable , dir =parentContext.dir , targetDocument =parentContext.targetDocument , theme , overrides_unstable: overrides = {} } = props;
27
27
  const mergedTheme = shallowMerge(parentTheme, theme);
28
28
  const mergedOverrides = shallowMerge(parentOverrides, overrides);
29
- // parentCustomStyleHooks will not be a partial
30
29
  const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);
31
30
  _react.useEffect(()=>{
32
31
  if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProvider.js"],"sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, useCustomStyleHooks_unstable as useCustomStyleHooks } from '@fluentui/react-shared-contexts';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport { useRenderer_unstable } from '@griffel/react';\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 = (props, ref) => {\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks = useCustomStyleHooks();\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {}\n } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n // parentCustomStyleHooks will not be a partial\n const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);\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 const renderer = useRenderer_unstable();\n var _renderer_styleElementAttributes;\n const {\n styleTagId,\n rule\n } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !== void 0 ? _renderer_styleElementAttributes : {}\n });\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible({\n targetDocument\n }))\n }),\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId\n }\n }\n };\n};\nfunction shallowMerge(a, b) {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return {\n ...a,\n ...b\n };\n }\n if (a) {\n return a;\n }\n return b;\n}\nfunction useTheme() {\n return React.useContext(ThemeContext);\n}\n//# sourceMappingURL=useFluentProvider.js.map"],"names":["useFluentProvider_unstable","props","ref","parentContext","useFluent","parentTheme","useTheme","parentOverrides","useOverrides","parentCustomStyleHooks","useCustomStyleHooks","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","React","useEffect","process","env","NODE_ENV","undefined","console","warn","renderer","useRenderer_unstable","_renderer_styleElementAttributes","styleTagId","rule","useFluentProviderThemeStyleTag","rendererAttributes","styleElementAttributes","themeClassName","components","root","getNativeElementProps","useMergedRefs","useFocusVisible","serverStyleProps","cssRule","attributes","id","a","b","useContext","ThemeContext"],"mappings":";;;;+BAeaA;;aAAAA;;;8BAfmB;qCACmJ;gCAC9H;6DAC9B;gDACwB;wBACV;AAU9B,MAAMA,6BAA6B,CAACC,OAAOC,MAAQ;IACxD,MAAMC,gBAAgBC,IAAAA,uCAAS;IAC/B,MAAMC,cAAcC;IACpB,MAAMC,kBAAkBC,IAAAA,0CAAY;IACpC,MAAMC,yBAAyBC,IAAAA,iDAAmB;IAClD;;;;EAIA,GACA,MAAM,EACJC,sBAAuB,IAAI,CAAA,EAC3B,gEAAgE;IAChEC,0BAAyB,EACzBC,KAAMV,cAAcU,GAAG,CAAA,EACvBC,gBAAiBX,cAAcW,cAAc,CAAA,EAC7CC,MAAK,EACLC,oBAAoBC,YAAY,CAAC,CAAC,CAAA,EACnC,GAAGhB;IACJ,MAAMiB,cAAcC,aAAad,aAAaU;IAC9C,MAAMK,kBAAkBD,aAAaZ,iBAAiBU;IACtD,+CAA+C;IAC/C,MAAMI,yBAAyBF,aAAaV,wBAAwBG;IACpEU,OAAMC,SAAS,CAAC,IAAM;QACpB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAgBR,gBAAgBS,WAAW;YACtE,sCAAsC;YACtCC,QAAQC,IAAI,CAAC,CAAC;;;;MAId,CAAC;QACH,CAAC;IACD,uDAAuD;IACzD,GAAG,EAAE;IACL,MAAMC,WAAWC,IAAAA,4BAAoB;IACrC,IAAIC;IACJ,MAAM,EACJC,WAAU,EACVC,KAAI,EACL,GAAGC,IAAAA,8DAA8B,EAAC;QACjCpB,OAAOG;QACPJ;QACAsB,oBAAoB,AAACJ,CAAAA,mCAAmCF,SAASO,sBAAsB,AAAD,MAAO,IAAI,IAAIL,qCAAqC,KAAK,IAAIA,mCAAmC,CAAC,CAAC;IAC1L;IACA,OAAO;QACLrB;QACA,gEAAgE;QAChEC,2BAA2BS;QAC3BR;QACAC;QACAC,OAAOG;QACP,gEAAgE;QAChEF,oBAAoBI;QACpBkB,gBAAgBL;QAChBM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YACjC,GAAGxC,KAAK;YACRY;YACAX,KAAKwC,IAAAA,6BAAa,EAACxC,KAAKyC,IAAAA,6BAAe,EAAC;gBACtC7B;YACF;QACF;QACA8B,kBAAkB;YAChBC,SAASX;YACTY,YAAY;gBACV,GAAGhB,SAASO,sBAAsB;gBAClCU,IAAId;YACN;QACF;IACF;AACF;AACA,SAASd,aAAa6B,CAAC,EAAEC,CAAC,EAAE;IAC1B,kEAAkE;IAClE,IAAID,KAAKC,GAAG;QACV,OAAO;YACL,GAAGD,CAAC;YACJ,GAAGC,CAAC;QACN;IACF,CAAC;IACD,IAAID,GAAG;QACL,OAAOA;IACT,CAAC;IACD,OAAOC;AACT;AACA,SAAS3C,WAAW;IAClB,OAAOgB,OAAM4B,UAAU,CAACC,0CAAY;AACtC,EACA,6CAA6C"}
1
+ {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProvider.js"],"sourcesContent":["import { useFocusVisible } from '@fluentui/react-tabster';\nimport { ThemeContext_unstable as ThemeContext, useFluent_unstable as useFluent, useOverrides_unstable as useOverrides, CustomStyleHooksContext_unstable as CustomStyleHooksContext } from '@fluentui/react-shared-contexts';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluentProviderThemeStyleTag } from './useFluentProviderThemeStyleTag';\nimport { useRenderer_unstable } from '@griffel/react';\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 = (props, ref) => {\n const parentContext = useFluent();\n const parentTheme = useTheme();\n const parentOverrides = useOverrides();\n const parentCustomStyleHooks = React.useContext(CustomStyleHooksContext) || {};\n /**\n * TODO: add merge functions to \"dir\" merge,\n * nesting providers with the same \"dir\" should not add additional attributes to DOM\n * see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93\n */\n const {\n applyStylesToPortals = true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable,\n dir = parentContext.dir,\n targetDocument = parentContext.targetDocument,\n theme,\n overrides_unstable: overrides = {}\n } = props;\n const mergedTheme = shallowMerge(parentTheme, theme);\n const mergedOverrides = shallowMerge(parentOverrides, overrides);\n const mergedCustomStyleHooks = shallowMerge(parentCustomStyleHooks, customStyleHooks_unstable);\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 const renderer = useRenderer_unstable();\n var _renderer_styleElementAttributes;\n const {\n styleTagId,\n rule\n } = useFluentProviderThemeStyleTag({\n theme: mergedTheme,\n targetDocument,\n rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !== void 0 ? _renderer_styleElementAttributes : {}\n });\n return {\n applyStylesToPortals,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customStyleHooks_unstable: mergedCustomStyleHooks,\n dir,\n targetDocument,\n theme: mergedTheme,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n overrides_unstable: mergedOverrides,\n themeClassName: styleTagId,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ...props,\n dir,\n ref: useMergedRefs(ref, useFocusVisible({\n targetDocument\n }))\n }),\n serverStyleProps: {\n cssRule: rule,\n attributes: {\n ...renderer.styleElementAttributes,\n id: styleTagId\n }\n }\n };\n};\nfunction shallowMerge(a, b) {\n // Merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return {\n ...a,\n ...b\n };\n }\n if (a) {\n return a;\n }\n return b;\n}\nfunction useTheme() {\n return React.useContext(ThemeContext);\n}\n//# sourceMappingURL=useFluentProvider.js.map"],"names":["useFluentProvider_unstable","props","ref","parentContext","useFluent","parentTheme","useTheme","parentOverrides","useOverrides","parentCustomStyleHooks","React","useContext","CustomStyleHooksContext","applyStylesToPortals","customStyleHooks_unstable","dir","targetDocument","theme","overrides_unstable","overrides","mergedTheme","shallowMerge","mergedOverrides","mergedCustomStyleHooks","useEffect","process","env","NODE_ENV","undefined","console","warn","renderer","useRenderer_unstable","_renderer_styleElementAttributes","styleTagId","rule","useFluentProviderThemeStyleTag","rendererAttributes","styleElementAttributes","themeClassName","components","root","getNativeElementProps","useMergedRefs","useFocusVisible","serverStyleProps","cssRule","attributes","id","a","b","ThemeContext"],"mappings":";;;;+BAeaA;;aAAAA;;;8BAfmB;qCAC2J;gCACtI;6DAC9B;gDACwB;wBACV;AAU9B,MAAMA,6BAA6B,CAACC,OAAOC,MAAQ;IACxD,MAAMC,gBAAgBC,IAAAA,uCAAS;IAC/B,MAAMC,cAAcC;IACpB,MAAMC,kBAAkBC,IAAAA,0CAAY;IACpC,MAAMC,yBAAyBC,OAAMC,UAAU,CAACC,qDAAuB,KAAK,CAAC;IAC7E;;;;EAIA,GACA,MAAM,EACJC,sBAAuB,IAAI,CAAA,EAC3B,gEAAgE;IAChEC,0BAAyB,EACzBC,KAAMZ,cAAcY,GAAG,CAAA,EACvBC,gBAAiBb,cAAca,cAAc,CAAA,EAC7CC,MAAK,EACLC,oBA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CAAC;IACD,OAAOC;AACT;AACA,SAAS5C,WAAW;IAClB,OAAOI,OAAMC,UAAU,CAACwC,0CAAY;AACtC,EACA,6CAA6C"}
@@ -50,6 +50,6 @@ const useFluentProviderStyles_unstable = (state)=>{
50
50
  });
51
51
  state.root.className = (0, _core.mergeClasses)(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);
52
52
  return state;
53
- }; //# sourceMappingURL=useFluentProviderStyles.js.map
53
+ }; //# sourceMappingURL=useFluentProviderStyles.styles.js.map
54
54
 
55
- //# sourceMappingURL=useFluentProviderStyles.js.map
55
+ //# sourceMappingURL=useFluentProviderStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProviderStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n fsow6f: [\"f1o700av\", \"fes3tcz\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1o700av{text-align:left;}\", \".fes3tcz{text-align:right;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = state => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useFluentProviderStyles.styles.js.map"],"names":["fluentProviderClassNames","useFluentProviderStyles_unstable","root","useStyles","__styles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","renderer","useRenderer_unstable","styles","dir","className","mergeClasses","themeClassName"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB,MAAxBA;IAiBAC,gCAAgC,MAAhCA;;sBApB0B;uBACF;AAE9B,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,iBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAmD;QAA8D;QAA+B;QAA+B;QAAgD;QAA+C;QAAmD;KAAmD;AAC1X;AAEO,MAAMX,mCAAmCY,CAAAA,QAAS;IACvD,MAAMC,WAAWC,IAAAA,2BAAoB;IACrC,MAAMC,SAASb,UAAU;QACvBc,KAAKJ,MAAMI,GAAG;QACdH;IACF;IACAD,MAAMX,IAAI,CAACgB,SAAS,GAAGC,IAAAA,kBAAY,EAACnB,yBAAyBE,IAAI,EAAEW,MAAMO,cAAc,EAAEJ,OAAOd,IAAI,EAAEW,MAAMX,IAAI,CAACgB,SAAS;IAC1H,OAAOL;AACT,GACA,0DAA0D"}
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "useFluentProviderThemeStyleTag", {
9
9
  const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
12
- const _useFluentProviderStyles = require("./useFluentProviderStyles");
12
+ const _useFluentProviderStylesStyles = require("./useFluentProviderStyles.styles");
13
13
  // String concatenation is used to prevent bundlers to complain with older versions of React
14
14
  const useInsertionEffect = _react['useInsertion' + 'Effect'] ? _react['useInsertion' + 'Effect'] : _reactUtilities.useIsomorphicLayoutEffect;
15
15
  const createStyleTag = (target, elementAttributes)=>{
@@ -38,7 +38,7 @@ const insertSheet = (tag, rule)=>{
38
38
  const useFluentProviderThemeStyleTag = (options)=>{
39
39
  const { targetDocument , theme , rendererAttributes } = options;
40
40
  const styleTag = _react.useRef();
41
- const styleTagId = (0, _reactUtilities.useId)(_useFluentProviderStyles.fluentProviderClassNames.root);
41
+ const styleTagId = (0, _reactUtilities.useId)(_useFluentProviderStylesStyles.fluentProviderClassNames.root);
42
42
  const styleElementAttributes = rendererAttributes;
43
43
  const cssVarsAsString = _react.useMemo(()=>{
44
44
  return theme ? Object.keys(theme).reduce((cssVarRule, cssVar)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProviderThemeStyleTag.js"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { fluentProviderClassNames } from './useFluentProviderStyles';\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useIsomorphicLayoutEffect;\nconst createStyleTag = (target, elementAttributes) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n target.head.appendChild(tag);\n return tag;\n};\nconst insertSheet = (tag, rule) => {\n const sheet = tag.sheet;\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = options => {\n const {\n targetDocument,\n theme,\n rendererAttributes\n } = options;\n const styleTag = React.useRef();\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n const cssVarsAsString = React.useMemo(() => {\n return theme ? Object.keys(theme).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '') : '';\n }, [theme]);\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, {\n ...styleElementAttributes,\n id: styleTagId\n });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n return () => {\n var _styleTag_current;\n (_styleTag_current = styleTag.current) === null || _styleTag_current === void 0 ? void 0 : _styleTag_current.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n return {\n styleTagId,\n rule\n };\n};\nfunction useHandleSSRStyleElements(targetDocument, styleTagId) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n//# sourceMappingURL=useFluentProviderThemeStyleTag.js.map"],"names":["useFluentProviderThemeStyleTag","useInsertionEffect","React","useIsomorphicLayoutEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","useId","fluentProviderClassNames","root","styleElementAttributes","cssVarsAsString","useMemo","reduce","cssVarRule","cssVar","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"mappings":";;;;+BAiCaA;;aAAAA;;;gCAjCoC;6DAC1B;yCACkB;AACzC,4FAA4F;AAC5F,MAAMC,qBAAqBC,MAAK,CAAC,iBAAiB,SAAS,GAAGA,MAAK,CAAC,iBAAiB,SAAS,GAAGC,yCAAyB;AAC1H,MAAMC,iBAAiB,CAACC,QAAQC,oBAAsB;IACpD,IAAI,CAACD,QAAQ;QACX,OAAOE;IACT,CAAC;IACD,MAAMC,MAAMH,OAAOI,aAAa,CAAC;IACjCC,OAAOC,IAAI,CAACL,mBAAmBM,OAAO,CAACC,CAAAA,WAAY;QACjDL,IAAIM,YAAY,CAACD,UAAUP,iBAAiB,CAACO,SAAS;IACxD;IACAR,OAAOU,IAAI,CAACC,WAAW,CAACR;IACxB,OAAOA;AACT;AACA,MAAMS,cAAc,CAACT,KAAKU,OAAS;IACjC,MAAMC,QAAQX,IAAIW,KAAK;IACvB,IAAIA,OAAO;QACT,IAAIA,MAAMC,QAAQ,CAACC,MAAM,GAAG,GAAG;YAC7BF,MAAMG,UAAU,CAAC;QACnB,CAAC;QACDH,MAAMI,UAAU,CAACL,MAAM;IACzB,OAAO,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QAChD,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;IAChB,CAAC;AACH;AAMO,MAAM5B,iCAAiC6B,CAAAA,UAAW;IACvD,MAAM,EACJC,eAAc,EACdC,MAAK,EACLC,mBAAkB,EACnB,GAAGH;IACJ,MAAMI,WAAW/B,OAAMgC,MAAM;IAC7B,MAAMC,aAAaC,IAAAA,qBAAK,EAACC,iDAAwB,CAACC,IAAI;IACtD,MAAMC,yBAAyBP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,eAAeiB,cAAc,CAACZ;QACxD,IAAIkB,mBAAmB;YACrBvB,eAAef,IAAI,CAACuC,MAAM,CAACD;QAC7B,CAAC;IACH;AACF,EACA,0DAA0D"}
1
+ {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProviderThemeStyleTag.js"],"sourcesContent":["import { useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { fluentProviderClassNames } from './useFluentProviderStyles.styles';\n// String concatenation is used to prevent bundlers to complain with older versions of React\nconst useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useIsomorphicLayoutEffect;\nconst createStyleTag = (target, elementAttributes) => {\n if (!target) {\n return undefined;\n }\n const tag = target.createElement('style');\n Object.keys(elementAttributes).forEach(attrName => {\n tag.setAttribute(attrName, elementAttributes[attrName]);\n });\n target.head.appendChild(tag);\n return tag;\n};\nconst insertSheet = (tag, rule) => {\n const sheet = tag.sheet;\n if (sheet) {\n if (sheet.cssRules.length > 0) {\n sheet.deleteRule(0);\n }\n sheet.insertRule(rule, 0);\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('FluentProvider: No sheet available on styleTag, styles will not be inserted into DOM.');\n }\n};\n/**\n * Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class\n * @internal\n * @returns CSS class to apply the rule\n */\nexport const useFluentProviderThemeStyleTag = options => {\n const {\n targetDocument,\n theme,\n rendererAttributes\n } = options;\n const styleTag = React.useRef();\n const styleTagId = useId(fluentProviderClassNames.root);\n const styleElementAttributes = rendererAttributes;\n const cssVarsAsString = React.useMemo(() => {\n return theme ? Object.keys(theme).reduce((cssVarRule, cssVar) => {\n cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;\n return cssVarRule;\n }, '') : '';\n }, [theme]);\n const rule = `.${styleTagId} { ${cssVarsAsString} }`;\n useHandleSSRStyleElements(targetDocument, styleTagId);\n useInsertionEffect(() => {\n // The style element could already have been created during SSR - no need to recreate it\n const ssrStyleElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.getElementById(styleTagId);\n if (ssrStyleElement) {\n styleTag.current = ssrStyleElement;\n } else {\n styleTag.current = createStyleTag(targetDocument, {\n ...styleElementAttributes,\n id: styleTagId\n });\n if (styleTag.current) {\n insertSheet(styleTag.current, rule);\n }\n }\n return () => {\n var _styleTag_current;\n (_styleTag_current = styleTag.current) === null || _styleTag_current === void 0 ? void 0 : _styleTag_current.remove();\n };\n }, [styleTagId, targetDocument, rule, styleElementAttributes]);\n return {\n styleTagId,\n rule\n };\n};\nfunction useHandleSSRStyleElements(targetDocument, styleTagId) {\n // Using a state factory so that this logic only runs once per render\n // Each FluentProvider can create its own style element during SSR as a slot\n // Moves all theme style elements to document head during render to avoid hydration errors.\n // Should be strict mode safe since the logic is idempotent.\n React.useState(() => {\n if (!targetDocument) {\n return;\n }\n const themeStyleElement = targetDocument.getElementById(styleTagId);\n if (themeStyleElement) {\n targetDocument.head.append(themeStyleElement);\n }\n });\n}\n//# sourceMappingURL=useFluentProviderThemeStyleTag.js.map"],"names":["useFluentProviderThemeStyleTag","useInsertionEffect","React","useIsomorphicLayoutEffect","createStyleTag","target","elementAttributes","undefined","tag","createElement","Object","keys","forEach","attrName","setAttribute","head","appendChild","insertSheet","rule","sheet","cssRules","length","deleteRule","insertRule","process","env","NODE_ENV","console","error","options","targetDocument","theme","rendererAttributes","styleTag","useRef","styleTagId","useId","fluentProviderClassNames","root","styleElementAttributes","cssVarsAsString","useMemo","reduce","cssVarRule","cssVar","useHandleSSRStyleElements","ssrStyleElement","getElementById","current","id","_styleTag_current","remove","useState","themeStyleElement","append"],"mappings":";;;;+BAiCaA;;aAAAA;;;gCAjCoC;6DAC1B;+CACkB;AACzC,4FAA4F;AAC5F,MAAMC,qBAAqBC,MAAK,CAAC,iBAAiB,SAAS,GAAGA,MAAK,CAAC,iBAAiB,SAAS,GAAGC,yCAAyB;AAC1H,MAAMC,iBAAiB,CAACC,Q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AAmB,IAAM;QACvB,wFAAwF;QACxF,MAAM6C,kBAAkBhB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeiB,cAAc,CAACZ,WAAW;QACjI,IAAIW,iBAAiB;YACnBb,SAASe,OAAO,GAAGF;QACrB,OAAO;YACLb,SAASe,OAAO,GAAG5C,eAAe0B,gBAAgB;gBAChD,GAAGS,sBAAsB;gBACzBU,IAAId;YACN;YACA,IAAIF,SAASe,OAAO,EAAE;gBACpB/B,YAAYgB,SAASe,OAAO,EAAE9B;YAChC,CAAC;QACH,CAAC;QACD,OAAO,IAAM;YACX,IAAIgC;YACHA,CAAAA,oBAAoBjB,SAASe,OAAO,AAAD,MAAO,IAAI,IAAIE,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBC,MAAM,EAAE;QACvH;IACF,GAAG;QAAChB;QAAYL;QAAgBZ;QAAMqB;KAAuB;IAC7D,OAAO;QACLJ;QACAjB;IACF;AACF;AACA,SAAS2B,0BAA0Bf,cAAc,EAAEK,UAAU,EAAE;IAC7D,qEAAqE;IACrE,4EAA4E;IAC5E,2FAA2F;IAC3F,4DAA4D;IAC5DjC,OAAMkD,QAAQ,CAAC,IAAM;QACnB,IAAI,CAACtB,gBAAgB;YACnB;QACF,CAAC;QACD,MAAMuB,oBAAoBvB,eAAeiB,cAAc,CAACZ;QACxD,IAAIkB,mBAAmB;YACrBvB,eAAef,IAAI,CAACuC,MAAM,CAACD;QAC7B,CAAC;IACH;AACF,EACA,0DAA0D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-provider",
3
- "version": "9.5.4",
3
+ "version": "9.6.1",
4
4
  "description": "Fluent UI React provider component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,23 +22,24 @@
22
22
  "storybook": "start-storybook",
23
23
  "start": "yarn storybook",
24
24
  "type-check": "tsc -b tsconfig.json",
25
- "generate-api": "just-scripts generate-api"
25
+ "generate-api": "just-scripts generate-api",
26
+ "test-ssr": "test-ssr ./stories/**/*.stories.tsx"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@fluentui/eslint-plugin": "*",
29
30
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.20",
31
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.21",
31
32
  "@fluentui/scripts-api-extractor": "*",
32
33
  "@fluentui/scripts-tasks": "*"
33
34
  },
34
35
  "dependencies": {
35
36
  "@griffel/core": "^1.9.0",
36
37
  "@griffel/react": "^1.5.2",
37
- "@fluentui/react-shared-contexts": "^9.3.3",
38
- "@fluentui/react-tabster": "^9.6.5",
39
- "@fluentui/react-theme": "^9.1.7",
40
- "@fluentui/react-utilities": "^9.8.0",
41
- "@fluentui/react-jsx-runtime": "9.0.0-alpha.2",
38
+ "@fluentui/react-shared-contexts": "^9.4.0",
39
+ "@fluentui/react-tabster": "^9.7.1",
40
+ "@fluentui/react-theme": "^9.1.8",
41
+ "@fluentui/react-utilities": "^9.9.0",
42
+ "@fluentui/react-jsx-runtime": "9.0.0-alpha.4",
42
43
  "@swc/helpers": "^0.4.14"
43
44
  },
44
45
  "peerDependencies": {
package/.swcrc DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/swcrc",
3
- "exclude": [
4
- "/testing",
5
- "/**/*.cy.ts",
6
- "/**/*.cy.tsx",
7
- "/**/*.spec.ts",
8
- "/**/*.spec.tsx",
9
- "/**/*.test.ts",
10
- "/**/*.test.tsx"
11
- ],
12
- "jsc": {
13
- "parser": {
14
- "syntax": "typescript",
15
- "tsx": true,
16
- "decorators": false,
17
- "dynamicImport": false
18
- },
19
- "externalHelpers": true,
20
- "transform": {
21
- "react": {
22
- "runtime": "classic",
23
- "useSpread": true
24
- }
25
- },
26
- "target": "es2019"
27
- },
28
- "minify": false,
29
- "sourceMaps": true
30
- }
@@ -1 +0,0 @@
1
- {"version":3,"names":["__styles","mergeClasses","useRenderer_unstable","tokens","typographyStyles","fluentProviderClassNames","root","useStyles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useFluentProviderStyles_unstable","state","renderer","styles","dir","className","themeClassName"],"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.ts"],"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"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AACzC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,wBAAA,GAAgE;EAC3EC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAOlB;AAEA;AACA,OAAO,MAAMC,gCAAA,GAAoCC,KAAA,IAA+B;EAC9E,MAAMC,QAAA,GAAWhB,oBAAA;EACjB,MAAMiB,MAAA,GAASZ,SAAA,CAAU;IAAEa,GAAA,EAAKH,KAAA,CAAMG,GAAG;IAAEF;EAAS;EAEpDD,KAAA,CAAMX,IAAI,CAACe,SAAS,GAAGpB,YAAA,CACrBI,wBAAA,CAAyBC,IAAI,EAC7BW,KAAA,CAAMK,cAAc,EACpBH,MAAA,CAAOb,IAAI,EACXW,KAAA,CAAMX,IAAI,CAACe,SAAS;EAGtB,OAAOJ,KAAA;AACT"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../lib/components/FluentProvider/useFluentProviderStyles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/core';\nimport { useRenderer_unstable } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const fluentProviderClassNames = {\n root: 'fui-FluentProvider'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n fsow6f: [\"f1o700av\", \"fes3tcz\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1o700av{text-align:left;}\", \".fes3tcz{text-align:right;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/** Applies style classnames to slots */\nexport const useFluentProviderStyles_unstable = state => {\n const renderer = useRenderer_unstable();\n const styles = useStyles({\n dir: state.dir,\n renderer\n });\n state.root.className = mergeClasses(fluentProviderClassNames.root, state.themeClassName, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useFluentProviderStyles.js.map"],"names":["fluentProviderClassNames","useFluentProviderStyles_unstable","root","useStyles","__styles","sj55zd","De3pzq","fsow6f","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","renderer","useRenderer_unstable","styles","dir","className","mergeClasses","themeClassName"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB,MAAxBA;IAiBAC,gCAAgC,MAAhCA;;sBApB0B;uBACF;AAE9B,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,iBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAmD;QAA8D;QAA+B;QAA+B;QAAgD;QAA+C;QAAmD;KAAmD;AAC1X;AAEO,MAAMX,mCAAmCY,CAAAA,QAAS;IACvD,MAAMC,WAAWC,IAAAA,2BAAoB;IACrC,MAAMC,SAASb,UAAU;QACvBc,KAAKJ,MAAMI,GAAG;QACdH;IACF;IACAD,MAAMX,IAAI,CAACgB,SAAS,GAAGC,IAAAA,kBAAY,EAACnB,yBAAyBE,IAAI,EAAEW,MAAMO,cAAc,EAAEJ,OAAOd,IAAI,EAAEW,MAAMX,IAAI,CAACgB,SAAS;IAC1H,OAAOL;AACT,GACA,mDAAmD"}