@fluentui/react-shared-contexts 9.0.0-rc.9 → 9.0.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 (66) hide show
  1. package/CHANGELOG.json +134 -1
  2. package/CHANGELOG.md +47 -2
  3. package/dist/index.d.ts +32 -26
  4. package/lib/ProviderContext/ProviderContext.js +15 -3
  5. package/lib/ProviderContext/ProviderContext.js.map +1 -1
  6. package/lib/ProviderContext/index.js +0 -1
  7. package/lib/ProviderContext/index.js.map +1 -1
  8. package/lib/ThemeClassNameContext/ThemeClassNameContext.js +8 -2
  9. package/lib/ThemeClassNameContext/ThemeClassNameContext.js.map +1 -1
  10. package/lib/ThemeContext/ThemeContext.js +9 -3
  11. package/lib/ThemeContext/ThemeContext.js.map +1 -1
  12. package/lib/TooltipVisibilityContext/TooltipContext.js +23 -0
  13. package/lib/TooltipVisibilityContext/TooltipContext.js.map +1 -0
  14. package/lib/{TooltipContext → TooltipVisibilityContext}/index.js +0 -0
  15. package/lib/TooltipVisibilityContext/index.js.map +1 -0
  16. package/lib/TooltipVisibilityContext.js +2 -0
  17. package/lib/TooltipVisibilityContext.js.map +1 -0
  18. package/lib/index.js +4 -5
  19. package/lib/index.js.map +1 -1
  20. package/lib-commonjs/ProviderContext/ProviderContext.js +16 -4
  21. package/lib-commonjs/ProviderContext/ProviderContext.js.map +1 -1
  22. package/lib-commonjs/ProviderContext/index.js +0 -2
  23. package/lib-commonjs/ProviderContext/index.js.map +1 -1
  24. package/lib-commonjs/ThemeClassNameContext/ThemeClassNameContext.js +9 -3
  25. package/lib-commonjs/ThemeClassNameContext/ThemeClassNameContext.js.map +1 -1
  26. package/lib-commonjs/ThemeContext/ThemeContext.js +9 -6
  27. package/lib-commonjs/ThemeContext/ThemeContext.js.map +1 -1
  28. package/lib-commonjs/TooltipVisibilityContext/TooltipContext.js +33 -0
  29. package/lib-commonjs/TooltipVisibilityContext/TooltipContext.js.map +1 -0
  30. package/lib-commonjs/{TooltipContext → TooltipVisibilityContext}/index.js +0 -0
  31. package/lib-commonjs/TooltipVisibilityContext/index.js.map +1 -0
  32. package/lib-commonjs/{MenuContext.js → TooltipVisibilityContext.js} +2 -2
  33. package/lib-commonjs/TooltipVisibilityContext.js.map +1 -0
  34. package/lib-commonjs/index.js +19 -28
  35. package/lib-commonjs/index.js.map +1 -1
  36. package/package.json +3 -4
  37. package/dist/tsdoc-metadata.json +0 -11
  38. package/lib/MenuContext/MenuContext.js +0 -6
  39. package/lib/MenuContext/MenuContext.js.map +0 -1
  40. package/lib/MenuContext/index.js +0 -3
  41. package/lib/MenuContext/index.js.map +0 -1
  42. package/lib/MenuContext/types.js +0 -2
  43. package/lib/MenuContext/types.js.map +0 -1
  44. package/lib/MenuContext.js +0 -2
  45. package/lib/MenuContext.js.map +0 -1
  46. package/lib/ProviderContext/ProviderContext.types.js +0 -2
  47. package/lib/ProviderContext/ProviderContext.types.js.map +0 -1
  48. package/lib/TooltipContext/TooltipContext.js +0 -7
  49. package/lib/TooltipContext/TooltipContext.js.map +0 -1
  50. package/lib/TooltipContext/index.js.map +0 -1
  51. package/lib/TooltipContext.js +0 -2
  52. package/lib/TooltipContext.js.map +0 -1
  53. package/lib-commonjs/MenuContext/MenuContext.js +0 -17
  54. package/lib-commonjs/MenuContext/MenuContext.js.map +0 -1
  55. package/lib-commonjs/MenuContext/index.js +0 -12
  56. package/lib-commonjs/MenuContext/index.js.map +0 -1
  57. package/lib-commonjs/MenuContext/types.js +0 -6
  58. package/lib-commonjs/MenuContext/types.js.map +0 -1
  59. package/lib-commonjs/MenuContext.js.map +0 -1
  60. package/lib-commonjs/ProviderContext/ProviderContext.types.js +0 -6
  61. package/lib-commonjs/ProviderContext/ProviderContext.types.js.map +0 -1
  62. package/lib-commonjs/TooltipContext/TooltipContext.js +0 -15
  63. package/lib-commonjs/TooltipContext/TooltipContext.js.map +0 -1
  64. package/lib-commonjs/TooltipContext/index.js.map +0 -1
  65. package/lib-commonjs/TooltipContext.js +0 -10
  66. package/lib-commonjs/TooltipContext.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,140 @@
2
2
  "name": "@fluentui/react-shared-contexts",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 23 May 2022 18:54:56 GMT",
5
+ "date": "Thu, 15 Sep 2022 09:44:42 GMT",
6
+ "tag": "@fluentui/react-shared-contexts_v9.0.1",
7
+ "version": "9.0.1",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-shared-contexts",
13
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
14
+ "comment": "chore: update package scaffold"
15
+ },
16
+ {
17
+ "author": "martinhochel@microsoft.com",
18
+ "package": "@fluentui/react-shared-contexts",
19
+ "commit": "16aa65dcae8f75c6a221225fd0eb43800650ac66",
20
+ "comment": "docs(react-shared-contexts): re-generate api.md"
21
+ }
22
+ ],
23
+ "patch": [
24
+ {
25
+ "author": "lingfangao@hotmail.com",
26
+ "package": "@fluentui/react-shared-contexts",
27
+ "commit": "a0cfab0e5f74e3a3bfa9c269fff574295042d7f2",
28
+ "comment": "chore: fix no-context-default-value lint violations"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-shared-contexts",
33
+ "comment": "Bump @fluentui/react-theme to v9.1.0",
34
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "date": "Wed, 03 Aug 2022 16:03:59 GMT",
41
+ "tag": "@fluentui/react-shared-contexts_v9.0.0",
42
+ "version": "9.0.0",
43
+ "comments": {
44
+ "none": [
45
+ {
46
+ "author": "bernardo.sunderhus@gmail.com",
47
+ "package": "@fluentui/react-shared-contexts",
48
+ "commit": "d966ea3d9169f2e8d69f0d2a4daf86fe4ca328d6",
49
+ "comment": "disables eslint rule @fluentui/no-context-default-value for local component context"
50
+ },
51
+ {
52
+ "author": "lingfangao@hotmail.com",
53
+ "package": "@fluentui/react-shared-contexts",
54
+ "commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
55
+ "comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
56
+ }
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "date": "Tue, 28 Jun 2022 15:13:58 GMT",
62
+ "tag": "@fluentui/react-shared-contexts_v9.0.0",
63
+ "version": "9.0.0",
64
+ "comments": {
65
+ "patch": [
66
+ {
67
+ "author": "lingfangao@hotmail.com",
68
+ "package": "@fluentui/react-shared-contexts",
69
+ "commit": "c7b1348bdad7aa883c29bfbc96ef2a32e6ebc7dd",
70
+ "comment": "feat: Initial 9.0.0 release"
71
+ },
72
+ {
73
+ "author": "beachball",
74
+ "package": "@fluentui/react-shared-contexts",
75
+ "comment": "Bump @fluentui/react-theme to v9.0.0",
76
+ "commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
77
+ }
78
+ ],
79
+ "prerelease": [
80
+ {
81
+ "author": "lingfangao@hotmail.com",
82
+ "package": "@fluentui/react-shared-contexts",
83
+ "commit": "2da4428ae7d6e464c538b7ed10e425ce0e531144",
84
+ "comment": "chore: Mark teams-prg owned APIs with @internal"
85
+ },
86
+ {
87
+ "author": "lingfangao@hotmail.com",
88
+ "package": "@fluentui/react-shared-contexts",
89
+ "commit": "e0aabd850b15adf9c151ebd4e332f7c50ad6cfdf",
90
+ "comment": "Update 9.0.0-rc dependencies to use caret range"
91
+ }
92
+ ]
93
+ }
94
+ },
95
+ {
96
+ "date": "Thu, 23 Jun 2022 14:25:31 GMT",
97
+ "tag": "@fluentui/react-shared-contexts_v9.0.0-rc.11",
98
+ "version": "9.0.0-rc.11",
99
+ "comments": {
100
+ "prerelease": [
101
+ {
102
+ "author": "beachball",
103
+ "package": "@fluentui/react-shared-contexts",
104
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.10",
105
+ "commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
106
+ }
107
+ ]
108
+ }
109
+ },
110
+ {
111
+ "date": "Tue, 31 May 2022 21:28:45 GMT",
112
+ "tag": "@fluentui/react-shared-contexts_v9.0.0-rc.10",
113
+ "version": "9.0.0-rc.10",
114
+ "comments": {
115
+ "prerelease": [
116
+ {
117
+ "author": "olfedias@microsoft.com",
118
+ "package": "@fluentui/react-shared-contexts",
119
+ "commit": "5a92ebd3f8687a1cd40e8233cacdb91d324b742a",
120
+ "comment": "remove unused MenuContext"
121
+ },
122
+ {
123
+ "author": "me@levithomason.com",
124
+ "package": "@fluentui/react-shared-contexts",
125
+ "commit": "4ed24c29ddf8de037e4402d67c820b7398eaa265",
126
+ "comment": "remove useTheme from exports"
127
+ },
128
+ {
129
+ "author": "bernardo.sunderhus@gmail.com",
130
+ "package": "@fluentui/react-shared-contexts",
131
+ "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd",
132
+ "comment": "mark context hooks and providers to unstable"
133
+ }
134
+ ]
135
+ }
136
+ },
137
+ {
138
+ "date": "Mon, 23 May 2022 18:56:51 GMT",
6
139
  "tag": "@fluentui/react-shared-contexts_v9.0.0-rc.9",
7
140
  "version": "9.0.0-rc.9",
8
141
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,57 @@
1
1
  # Change Log - @fluentui/react-shared-contexts
2
2
 
3
- This log was last generated on Mon, 23 May 2022 18:54:56 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Sep 2022 09:44:42 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.0.1)
8
+
9
+ Thu, 15 Sep 2022 09:44:42 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.0.0..@fluentui/react-shared-contexts_v9.0.1)
11
+
12
+ ### Patches
13
+
14
+ - chore: fix no-context-default-value lint violations ([PR #24276](https://github.com/microsoft/fluentui/pull/24276) by lingfangao@hotmail.com)
15
+ - Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
16
+
17
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.0.0)
18
+
19
+ Tue, 28 Jun 2022 15:13:58 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.0.0-rc.11..@fluentui/react-shared-contexts_v9.0.0)
21
+
22
+ ### Patches
23
+
24
+ - feat: Initial 9.0.0 release ([PR #23733](https://github.com/microsoft/fluentui/pull/23733) by lingfangao@hotmail.com)
25
+ - Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
26
+
27
+ ### Changes
28
+
29
+ - chore: Mark teams-prg owned APIs with @internal ([PR #23689](https://github.com/microsoft/fluentui/pull/23689) by lingfangao@hotmail.com)
30
+ - Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
31
+
32
+ ## [9.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.0.0-rc.11)
33
+
34
+ Thu, 23 Jun 2022 14:25:31 GMT
35
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.0.0-rc.10..@fluentui/react-shared-contexts_v9.0.0-rc.11)
36
+
37
+ ### Changes
38
+
39
+ - Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
40
+
41
+ ## [9.0.0-rc.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.0.0-rc.10)
42
+
43
+ Tue, 31 May 2022 21:28:45 GMT
44
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.0.0-rc.9..@fluentui/react-shared-contexts_v9.0.0-rc.10)
45
+
46
+ ### Changes
47
+
48
+ - remove unused MenuContext ([PR #23277](https://github.com/microsoft/fluentui/pull/23277) by olfedias@microsoft.com)
49
+ - remove useTheme from exports ([PR #23335](https://github.com/microsoft/fluentui/pull/23335) by me@levithomason.com)
50
+ - mark context hooks and providers to unstable ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by bernardo.sunderhus@gmail.com)
51
+
7
52
  ## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.0.0-rc.9)
8
53
 
9
- Mon, 23 May 2022 18:54:56 GMT
54
+ Mon, 23 May 2022 18:56:51 GMT
10
55
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.0.0-rc.8..@fluentui/react-shared-contexts_v9.0.0-rc.9)
11
56
 
12
57
  ### Changes
package/dist/index.d.ts CHANGED
@@ -1,43 +1,42 @@
1
1
  import * as React_2 from 'react';
2
2
  import type { Theme } from '@fluentui/react-theme';
3
3
 
4
- export declare const MenuContext: React_2.Context<MinimalMenuProps>;
5
-
6
- export declare type MinimalMenuProps = {
7
- hidden?: boolean;
8
- onDismiss?: () => void;
9
- target?: React_2.Ref<HTMLElement>;
10
- };
11
-
12
- export declare const ProviderContext: React_2.Context<ProviderContextValue>;
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const Provider_unstable: React_2.Provider<ProviderContextValue_unstable>;
13
8
 
14
- export declare interface ProviderContextValue {
9
+ export declare type ProviderContextValue_unstable = {
15
10
  /** Sets the direction of text & generated styles. */
16
11
  dir: 'ltr' | 'rtl';
17
12
  /** Provides the document, can be undefined during SSR render. */
18
13
  targetDocument?: Document;
19
- }
14
+ };
15
+
16
+ export declare type ThemeClassNameContextValue_unstable = string;
17
+
18
+ export declare const ThemeClassNameProvider_unstable: React_2.Provider<string>;
20
19
 
21
20
  /**
22
- * Used to provide a CSS class that applies theme css variables
23
- *
24
- * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals
21
+ * @internal
25
22
  */
26
- export declare const ThemeClassNameContext: React_2.Context<string>;
27
-
28
- export declare type ThemeClassNameContextValue = string;
23
+ export declare const ThemeContext_unstable: React_2.Context<ThemeContextValue_unstable>;
29
24
 
30
- export declare const ThemeContext: React_2.Context<Theme | Partial<Theme> | undefined>;
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare type ThemeContextValue_unstable = Theme | Partial<Theme> | undefined;
31
29
 
32
30
  /**
33
- * Context shared by all of the tooltips in the app
31
+ * @internal
34
32
  */
35
- export declare const TooltipContext: React_2.Context<TooltipContextType>;
33
+ export declare const ThemeProvider_unstable: React_2.Provider<ThemeContextValue_unstable>;
36
34
 
37
35
  /**
36
+ * @internal
38
37
  * The context provided by TooltipProvider
39
38
  */
40
- export declare type TooltipContextType = {
39
+ export declare type TooltipVisibilityContextValue_unstable = {
41
40
  /**
42
41
  * When a tooltip is shown, it sets itself as the visibleTooltip.
43
42
  * The next tooltip to become visible can use it to hide the previous tooltip immediately.
@@ -47,15 +46,22 @@ export declare type TooltipContextType = {
47
46
  };
48
47
  };
49
48
 
50
- export declare function useFluent(): ProviderContextValue;
51
-
52
- export declare const useMenuContext: () => MinimalMenuProps;
49
+ /**
50
+ * @internal
51
+ */
52
+ export declare const TooltipVisibilityProvider_unstable: React_2.Provider<TooltipVisibilityContextValue_unstable>;
53
53
 
54
- export declare function useTheme(): Theme | Partial<Theme> | undefined;
54
+ export declare function useFluent_unstable(): ProviderContextValue_unstable;
55
55
 
56
56
  /**
57
+ * @internal
57
58
  * @returns CSS class that applies css variables
58
59
  */
59
- export declare function useThemeClassName(): ThemeClassNameContextValue;
60
+ export declare function useThemeClassName_unstable(): ThemeClassNameContextValue_unstable;
61
+
62
+ /**
63
+ * @internal
64
+ */
65
+ export declare function useTooltipVisibility_unstable(): TooltipVisibilityContextValue_unstable;
60
66
 
61
67
  export { }
@@ -1,9 +1,21 @@
1
1
  import * as React from 'react';
2
- export const ProviderContext = /*#__PURE__*/React.createContext({
2
+ /**
3
+ * @internal
4
+ */
5
+
6
+ const ProviderContext = /*#__PURE__*/React.createContext(undefined);
7
+ const providerContextDefaultValue = {
3
8
  targetDocument: typeof document === 'object' ? document : undefined,
4
9
  dir: 'ltr'
5
- });
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+
15
+ export const Provider = ProviderContext.Provider;
6
16
  export function useFluent() {
7
- return React.useContext(ProviderContext);
17
+ var _a;
18
+
19
+ return (_a = React.useContext(ProviderContext)) !== null && _a !== void 0 ? _a : providerContextDefaultValue;
8
20
  }
9
21
  //# sourceMappingURL=ProviderContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ProviderContext/ProviderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAO,MAAM,eAAe,gBAAG,KAAK,CAAC,aAAN,CAA0C;AACvE,EAAA,cAAc,EAAE,OAAO,QAAP,KAAoB,QAApB,GAA+B,QAA/B,GAA0C,SADa;AAEvE,EAAA,GAAG,EAAE;AAFkE,CAA1C,CAAxB;AAKP,OAAM,SAAU,SAAV,GAAmB;AACvB,SAAO,KAAK,CAAC,UAAN,CAAiB,eAAjB,CAAP;AACD","sourcesContent":["import * as React from 'react';\nimport type { ProviderContextValue } from './ProviderContext.types';\n\nexport const ProviderContext = React.createContext<ProviderContextValue>({\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr',\n});\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ProviderContext/ProviderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAUA;;AAEG;;AACH,MAAM,eAAe,gBAAG,KAAK,CAAC,aAAN,CACtB,SADsB,CAAxB;AAIA,MAAM,2BAA2B,GAAyB;EACxD,cAAc,EAAE,OAAO,QAAP,KAAoB,QAApB,GAA+B,QAA/B,GAA0C,SADF;EAExD,GAAG,EAAE;AAFmD,CAA1D;AAKA;;AAEG;;AACH,OAAO,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAjC;AAEP,OAAM,SAAU,SAAV,GAAmB;;;EACvB,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,eAAjB,CAAA,MAAiC,IAAjC,IAAiC,EAAA,KAAA,KAAA,CAAjC,GAAiC,EAAjC,GAAqC,2BAA5C;AACD","sourcesContent":["import * as React from 'react';\n\nexport type ProviderContextValue = {\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\n/**\n * @internal\n */\nconst ProviderContext = React.createContext<ProviderContextValue | undefined>(\n undefined,\n) as React.Context<ProviderContextValue>;\n\nconst providerContextDefaultValue: ProviderContextValue = {\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr' as const,\n};\n\n/**\n * @internal\n */\nexport const Provider = ProviderContext.Provider;\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext) ?? providerContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
@@ -1,3 +1,2 @@
1
1
  export * from './ProviderContext';
2
- export * from './ProviderContext.types';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["ProviderContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './ProviderContext';\nexport * from './ProviderContext.types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["ProviderContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './ProviderContext';\n"]}
@@ -1,16 +1,22 @@
1
1
  import * as React from 'react';
2
2
  /**
3
+ * @internal
3
4
  * Used to provide a CSS class that applies theme css variables
4
5
  *
5
6
  * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals
6
7
  */
7
8
 
8
- export const ThemeClassNameContext = /*#__PURE__*/React.createContext('');
9
+ const ThemeClassNameContext = /*#__PURE__*/React.createContext(undefined);
10
+ const themeClassNameContextDefaultVaue = '';
11
+ export const ThemeClassNameProvider = ThemeClassNameContext.Provider;
9
12
  /**
13
+ * @internal
10
14
  * @returns CSS class that applies css variables
11
15
  */
12
16
 
13
17
  export function useThemeClassName() {
14
- return React.useContext(ThemeClassNameContext);
18
+ var _a;
19
+
20
+ return (_a = React.useContext(ThemeClassNameContext)) !== null && _a !== void 0 ? _a : themeClassNameContextDefaultVaue;
15
21
  }
16
22
  //# sourceMappingURL=ThemeClassNameContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ThemeClassNameContext/ThemeClassNameContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAIA;;;;AAIG;;AACH,OAAO,MAAM,qBAAqB,gBAAG,KAAK,CAAC,aAAN,CAAgD,EAAhD,CAA9B;AAEP;;AAEG;;AACH,OAAM,SAAU,iBAAV,GAA2B;AAC/B,SAAO,KAAK,CAAC,UAAN,CAAiB,qBAAjB,CAAP;AACD","sourcesContent":["import * as React from 'react';\n\nexport type ThemeClassNameContextValue = string;\n\n/**\n * Used to provide a CSS class that applies theme css variables\n *\n * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals\n */\nexport const ThemeClassNameContext = React.createContext<ThemeClassNameContextValue>('');\n\n/**\n * @returns CSS class that applies css variables\n */\nexport function useThemeClassName(): ThemeClassNameContextValue {\n return React.useContext(ThemeClassNameContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ThemeClassNameContext/ThemeClassNameContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAIA;;;;;AAKG;;AACH,MAAM,qBAAqB,gBAAG,KAAK,CAAC,aAAN,CAC5B,SAD4B,CAA9B;AAIA,MAAM,gCAAgC,GAAG,EAAzC;AAEA,OAAO,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,QAArD;AAEP;;;AAGG;;AACH,OAAM,SAAU,iBAAV,GAA2B;;;EAC/B,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,qBAAjB,CAAA,MAAuC,IAAvC,IAAuC,EAAA,KAAA,KAAA,CAAvC,GAAuC,EAAvC,GAA2C,gCAAlD;AACD","sourcesContent":["import * as React from 'react';\n\nexport type ThemeClassNameContextValue = string;\n\n/**\n * @internal\n * Used to provide a CSS class that applies theme css variables\n *\n * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals\n */\nconst ThemeClassNameContext = React.createContext<ThemeClassNameContextValue | undefined>(\n undefined,\n) as React.Context<ThemeClassNameContextValue>;\n\nconst themeClassNameContextDefaultVaue = '';\n\nexport const ThemeClassNameProvider = ThemeClassNameContext.Provider;\n\n/**\n * @internal\n * @returns CSS class that applies css variables\n */\nexport function useThemeClassName(): ThemeClassNameContextValue {\n return React.useContext(ThemeClassNameContext) ?? themeClassNameContextDefaultVaue;\n}\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,12 @@
1
1
  import * as React from 'react';
2
+ /**
3
+ * @internal
4
+ */
5
+
2
6
  export const ThemeContext = /*#__PURE__*/React.createContext(undefined);
3
- export function useTheme() {
4
- return React.useContext(ThemeContext);
5
- }
7
+ /**
8
+ * @internal
9
+ */
10
+
11
+ export const ThemeProvider = ThemeContext.Provider;
6
12
  //# sourceMappingURL=ThemeContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ThemeContext/ThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAO,MAAM,YAAY,gBAAG,KAAK,CAAC,aAAN,CAAwD,SAAxD,CAArB;AAEP,OAAM,SAAU,QAAV,GAAkB;AACtB,SAAO,KAAK,CAAC,UAAN,CAAiB,YAAjB,CAAP;AACD","sourcesContent":["import * as React from 'react';\nimport type { Theme } from '@fluentui/react-theme';\n\nexport const ThemeContext = React.createContext<Theme | Partial<Theme> | undefined>(undefined);\n\nexport function useTheme(): Theme | Partial<Theme> | undefined {\n return React.useContext(ThemeContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ThemeContext/ThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAQA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAAG,KAAK,CAAC,aAAN,CAAuC,SAAvC,CAArB;AAEP;;AAEG;;AACH,OAAO,MAAM,aAAa,GAAG,YAAY,CAAC,QAAnC","sourcesContent":["import * as React from 'react';\nimport type { Theme } from '@fluentui/react-theme';\n\n/**\n * @internal\n */\nexport type ThemeContextValue = Theme | Partial<Theme> | undefined;\n\n/**\n * @internal\n */\nexport const ThemeContext = React.createContext<ThemeContextValue>(undefined);\n\n/**\n * @internal\n */\nexport const ThemeProvider = ThemeContext.Provider;\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * @internal
4
+ * Context shared by all of the tooltips in the app
5
+ */
6
+
7
+ const TooltipVisibilityContext = /*#__PURE__*/React.createContext(undefined);
8
+ const tooltipVisibilityContextDefaultValue = {};
9
+ /**
10
+ * @internal
11
+ */
12
+
13
+ export const TooltipVisibilityProvider = TooltipVisibilityContext.Provider;
14
+ /**
15
+ * @internal
16
+ */
17
+
18
+ export function useTooltipVisibility() {
19
+ var _a;
20
+
21
+ return (_a = React.useContext(TooltipVisibilityContext)) !== null && _a !== void 0 ? _a : tooltipVisibilityContextDefaultValue;
22
+ }
23
+ //# sourceMappingURL=TooltipContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TooltipVisibilityContext/TooltipContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAgBA;;;AAGG;;AACH,MAAM,wBAAwB,gBAAG,KAAK,CAAC,aAAN,CAC/B,SAD+B,CAAjC;AAIA,MAAM,oCAAoC,GAAkC,EAA5E;AAEA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,QAA3D;AAEP;;AAEG;;AACH,OAAM,SAAU,oBAAV,GAA8B;;;EAClC,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,wBAAjB,CAAA,MAA0C,IAA1C,IAA0C,EAAA,KAAA,KAAA,CAA1C,GAA0C,EAA1C,GAA8C,oCAArD;AACD","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * The context provided by TooltipProvider\n */\nexport type TooltipVisibilityContextValue = {\n /**\n * When a tooltip is shown, it sets itself as the visibleTooltip.\n * The next tooltip to become visible can use it to hide the previous tooltip immediately.\n */\n visibleTooltip?: {\n hide: () => void;\n };\n};\n\n/**\n * @internal\n * Context shared by all of the tooltips in the app\n */\nconst TooltipVisibilityContext = React.createContext<TooltipVisibilityContextValue | undefined>(\n undefined,\n) as React.Context<TooltipVisibilityContextValue>;\n\nconst tooltipVisibilityContextDefaultValue: TooltipVisibilityContextValue = {};\n\n/**\n * @internal\n */\nexport const TooltipVisibilityProvider = TooltipVisibilityContext.Provider;\n\n/**\n * @internal\n */\nexport function useTooltipVisibility(): TooltipVisibilityContextValue {\n return React.useContext(TooltipVisibilityContext) ?? tooltipVisibilityContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["TooltipVisibilityContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './TooltipContext';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './TooltipVisibilityContext/index';
2
+ //# sourceMappingURL=TooltipVisibilityContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipVisibilityContext.js","sourceRoot":"../src/","sources":["TooltipVisibilityContext.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './TooltipVisibilityContext/index';\n"]}
package/lib/index.js CHANGED
@@ -1,6 +1,5 @@
1
- export { MenuContext, useMenuContext } from './MenuContext';
2
- export { ThemeContext, useTheme } from './ThemeContext';
3
- export { ThemeClassNameContext, useThemeClassName } from './ThemeClassNameContext';
4
- export { TooltipContext } from './TooltipContext';
5
- export { ProviderContext, useFluent } from './ProviderContext';
1
+ export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';
2
+ export { ThemeClassNameProvider as ThemeClassNameProvider_unstable, useThemeClassName as useThemeClassName_unstable } from './ThemeClassNameContext';
3
+ export { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useTooltipVisibility as useTooltipVisibility_unstable } from './TooltipVisibilityContext';
4
+ export { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';
6
5
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { MenuContext, useMenuContext } from './MenuContext';\nexport type { MinimalMenuProps } from './MenuContext';\nexport { ThemeContext, useTheme } from './ThemeContext';\nexport { ThemeClassNameContext, useThemeClassName } from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue } from './ThemeClassNameContext';\nexport { TooltipContext } from './TooltipContext';\nexport type { TooltipContextType } from './TooltipContext';\nexport { ProviderContext, useFluent } from './ProviderContext';\nexport type { ProviderContextValue } from './ProviderContext';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,qBAAzB,EAAgD,aAAa,IAAI,sBAAjE,QAA+F,gBAA/F;AAGA,SACE,sBAAsB,IAAI,+BAD5B,EAEE,iBAAiB,IAAI,0BAFvB,QAGO,yBAHP;AAMA,SACE,yBAAyB,IAAI,kCAD/B,EAEE,oBAAoB,IAAI,6BAF1B,QAGO,4BAHP;AAMA,SAAS,QAAQ,IAAI,iBAArB,EAAwC,SAAS,IAAI,kBAArD,QAA+E,mBAA/E","sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n"],"sourceRoot":"../src/"}
@@ -3,17 +3,29 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useFluent = exports.ProviderContext = void 0;
6
+ exports.useFluent = exports.Provider = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
+ /**
10
+ * @internal
11
+ */
9
12
 
10
- exports.ProviderContext = /*#__PURE__*/React.createContext({
13
+
14
+ const ProviderContext = /*#__PURE__*/React.createContext(undefined);
15
+ const providerContextDefaultValue = {
11
16
  targetDocument: typeof document === 'object' ? document : undefined,
12
17
  dir: 'ltr'
13
- });
18
+ };
19
+ /**
20
+ * @internal
21
+ */
22
+
23
+ exports.Provider = ProviderContext.Provider;
14
24
 
15
25
  function useFluent() {
16
- return React.useContext(exports.ProviderContext);
26
+ var _a;
27
+
28
+ return (_a = React.useContext(ProviderContext)) !== null && _a !== void 0 ? _a : providerContextDefaultValue;
17
29
  }
18
30
 
19
31
  exports.useFluent = useFluent;
@@ -1 +1 @@
1
- {"version":3,"sources":["ProviderContext/ProviderContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGa,OAAA,CAAA,eAAA,gBAAkB,KAAK,CAAC,aAAN,CAA0C;AACvE,EAAA,cAAc,EAAE,OAAO,QAAP,KAAoB,QAApB,GAA+B,QAA/B,GAA0C,SADa;AAEvE,EAAA,GAAG,EAAE;AAFkE,CAA1C,CAAlB;;AAKb,SAAgB,SAAhB,GAAyB;AACvB,SAAO,KAAK,CAAC,UAAN,CAAiB,OAAA,CAAA,eAAjB,CAAP;AACD;;AAFD,OAAA,CAAA,SAAA,GAAA,SAAA","sourcesContent":["import * as React from 'react';\nimport type { ProviderContextValue } from './ProviderContext.types';\n\nexport const ProviderContext = React.createContext<ProviderContextValue>({\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr',\n});\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ProviderContext/ProviderContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAUA;;AAEG;;;AACH,MAAM,eAAe,gBAAG,KAAK,CAAC,aAAN,CACtB,SADsB,CAAxB;AAIA,MAAM,2BAA2B,GAAyB;EACxD,cAAc,EAAE,OAAO,QAAP,KAAoB,QAApB,GAA+B,QAA/B,GAA0C,SADF;EAExD,GAAG,EAAE;AAFmD,CAA1D;AAKA;;AAEG;;AACU,OAAA,CAAA,QAAA,GAAW,eAAe,CAAC,QAA3B;;AAEb,SAAgB,SAAhB,GAAyB;;;EACvB,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,eAAjB,CAAA,MAAiC,IAAjC,IAAiC,EAAA,KAAA,KAAA,CAAjC,GAAiC,EAAjC,GAAqC,2BAA5C;AACD;;AAFD,OAAA,CAAA,SAAA,GAAA,SAAA","sourcesContent":["import * as React from 'react';\n\nexport type ProviderContextValue = {\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\n/**\n * @internal\n */\nconst ProviderContext = React.createContext<ProviderContextValue | undefined>(\n undefined,\n) as React.Context<ProviderContextValue>;\n\nconst providerContextDefaultValue: ProviderContextValue = {\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr' as const,\n};\n\n/**\n * @internal\n */\nexport const Provider = ProviderContext.Provider;\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext) ?? providerContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
@@ -7,6 +7,4 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./ProviderContext"), exports);
10
-
11
- tslib_1.__exportStar(require("./ProviderContext.types"), exports);
12
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ProviderContext/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ProviderContext';\nexport * from './ProviderContext.types';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ProviderContext/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ProviderContext';\n"],"sourceRoot":"../src/"}
@@ -3,23 +3,29 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useThemeClassName = exports.ThemeClassNameContext = void 0;
6
+ exports.useThemeClassName = exports.ThemeClassNameProvider = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
  /**
10
+ * @internal
10
11
  * Used to provide a CSS class that applies theme css variables
11
12
  *
12
13
  * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals
13
14
  */
14
15
 
15
16
 
16
- exports.ThemeClassNameContext = /*#__PURE__*/React.createContext('');
17
+ const ThemeClassNameContext = /*#__PURE__*/React.createContext(undefined);
18
+ const themeClassNameContextDefaultVaue = '';
19
+ exports.ThemeClassNameProvider = ThemeClassNameContext.Provider;
17
20
  /**
21
+ * @internal
18
22
  * @returns CSS class that applies css variables
19
23
  */
20
24
 
21
25
  function useThemeClassName() {
22
- return React.useContext(exports.ThemeClassNameContext);
26
+ var _a;
27
+
28
+ return (_a = React.useContext(ThemeClassNameContext)) !== null && _a !== void 0 ? _a : themeClassNameContextDefaultVaue;
23
29
  }
24
30
 
25
31
  exports.useThemeClassName = useThemeClassName;
@@ -1 +1 @@
1
- {"version":3,"sources":["ThemeClassNameContext/ThemeClassNameContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAIA;;;;AAIG;;;AACU,OAAA,CAAA,qBAAA,gBAAwB,KAAK,CAAC,aAAN,CAAgD,EAAhD,CAAxB;AAEb;;AAEG;;AACH,SAAgB,iBAAhB,GAAiC;AAC/B,SAAO,KAAK,CAAC,UAAN,CAAiB,OAAA,CAAA,qBAAjB,CAAP;AACD;;AAFD,OAAA,CAAA,iBAAA,GAAA,iBAAA","sourcesContent":["import * as React from 'react';\n\nexport type ThemeClassNameContextValue = string;\n\n/**\n * Used to provide a CSS class that applies theme css variables\n *\n * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals\n */\nexport const ThemeClassNameContext = React.createContext<ThemeClassNameContextValue>('');\n\n/**\n * @returns CSS class that applies css variables\n */\nexport function useThemeClassName(): ThemeClassNameContextValue {\n return React.useContext(ThemeClassNameContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ThemeClassNameContext/ThemeClassNameContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAIA;;;;;AAKG;;;AACH,MAAM,qBAAqB,gBAAG,KAAK,CAAC,aAAN,CAC5B,SAD4B,CAA9B;AAIA,MAAM,gCAAgC,GAAG,EAAzC;AAEa,OAAA,CAAA,sBAAA,GAAyB,qBAAqB,CAAC,QAA/C;AAEb;;;AAGG;;AACH,SAAgB,iBAAhB,GAAiC;;;EAC/B,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,qBAAjB,CAAA,MAAuC,IAAvC,IAAuC,EAAA,KAAA,KAAA,CAAvC,GAAuC,EAAvC,GAA2C,gCAAlD;AACD;;AAFD,OAAA,CAAA,iBAAA,GAAA,iBAAA","sourcesContent":["import * as React from 'react';\n\nexport type ThemeClassNameContextValue = string;\n\n/**\n * @internal\n * Used to provide a CSS class that applies theme css variables\n *\n * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals\n */\nconst ThemeClassNameContext = React.createContext<ThemeClassNameContextValue | undefined>(\n undefined,\n) as React.Context<ThemeClassNameContextValue>;\n\nconst themeClassNameContextDefaultVaue = '';\n\nexport const ThemeClassNameProvider = ThemeClassNameContext.Provider;\n\n/**\n * @internal\n * @returns CSS class that applies css variables\n */\nexport function useThemeClassName(): ThemeClassNameContextValue {\n return React.useContext(ThemeClassNameContext) ?? themeClassNameContextDefaultVaue;\n}\n"],"sourceRoot":"../src/"}
@@ -3,15 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useTheme = exports.ThemeContext = void 0;
6
+ exports.ThemeProvider = exports.ThemeContext = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
+ /**
10
+ * @internal
11
+ */
9
12
 
10
- exports.ThemeContext = /*#__PURE__*/React.createContext(undefined);
11
13
 
12
- function useTheme() {
13
- return React.useContext(exports.ThemeContext);
14
- }
14
+ exports.ThemeContext = /*#__PURE__*/React.createContext(undefined);
15
+ /**
16
+ * @internal
17
+ */
15
18
 
16
- exports.useTheme = useTheme;
19
+ exports.ThemeProvider = exports.ThemeContext.Provider;
17
20
  //# sourceMappingURL=ThemeContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ThemeContext/ThemeContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGa,OAAA,CAAA,YAAA,gBAAe,KAAK,CAAC,aAAN,CAAwD,SAAxD,CAAf;;AAEb,SAAgB,QAAhB,GAAwB;AACtB,SAAO,KAAK,CAAC,UAAN,CAAiB,OAAA,CAAA,YAAjB,CAAP;AACD;;AAFD,OAAA,CAAA,QAAA,GAAA,QAAA","sourcesContent":["import * as React from 'react';\nimport type { Theme } from '@fluentui/react-theme';\n\nexport const ThemeContext = React.createContext<Theme | Partial<Theme> | undefined>(undefined);\n\nexport function useTheme(): Theme | Partial<Theme> | undefined {\n return React.useContext(ThemeContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["ThemeContext/ThemeContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAQA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAe,KAAK,CAAC,aAAN,CAAuC,SAAvC,CAAf;AAEb;;AAEG;;AACU,OAAA,CAAA,aAAA,GAAgB,OAAA,CAAA,YAAA,CAAa,QAA7B","sourcesContent":["import * as React from 'react';\nimport type { Theme } from '@fluentui/react-theme';\n\n/**\n * @internal\n */\nexport type ThemeContextValue = Theme | Partial<Theme> | undefined;\n\n/**\n * @internal\n */\nexport const ThemeContext = React.createContext<ThemeContextValue>(undefined);\n\n/**\n * @internal\n */\nexport const ThemeProvider = ThemeContext.Provider;\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTooltipVisibility = exports.TooltipVisibilityProvider = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+ /**
10
+ * @internal
11
+ * Context shared by all of the tooltips in the app
12
+ */
13
+
14
+
15
+ const TooltipVisibilityContext = /*#__PURE__*/React.createContext(undefined);
16
+ const tooltipVisibilityContextDefaultValue = {};
17
+ /**
18
+ * @internal
19
+ */
20
+
21
+ exports.TooltipVisibilityProvider = TooltipVisibilityContext.Provider;
22
+ /**
23
+ * @internal
24
+ */
25
+
26
+ function useTooltipVisibility() {
27
+ var _a;
28
+
29
+ return (_a = React.useContext(TooltipVisibilityContext)) !== null && _a !== void 0 ? _a : tooltipVisibilityContextDefaultValue;
30
+ }
31
+
32
+ exports.useTooltipVisibility = useTooltipVisibility;
33
+ //# sourceMappingURL=TooltipContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TooltipVisibilityContext/TooltipContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAgBA;;;AAGG;;;AACH,MAAM,wBAAwB,gBAAG,KAAK,CAAC,aAAN,CAC/B,SAD+B,CAAjC;AAIA,MAAM,oCAAoC,GAAkC,EAA5E;AAEA;;AAEG;;AACU,OAAA,CAAA,yBAAA,GAA4B,wBAAwB,CAAC,QAArD;AAEb;;AAEG;;AACH,SAAgB,oBAAhB,GAAoC;;;EAClC,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,wBAAjB,CAAA,MAA0C,IAA1C,IAA0C,EAAA,KAAA,KAAA,CAA1C,GAA0C,EAA1C,GAA8C,oCAArD;AACD;;AAFD,OAAA,CAAA,oBAAA,GAAA,oBAAA","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * The context provided by TooltipProvider\n */\nexport type TooltipVisibilityContextValue = {\n /**\n * When a tooltip is shown, it sets itself as the visibleTooltip.\n * The next tooltip to become visible can use it to hide the previous tooltip immediately.\n */\n visibleTooltip?: {\n hide: () => void;\n };\n};\n\n/**\n * @internal\n * Context shared by all of the tooltips in the app\n */\nconst TooltipVisibilityContext = React.createContext<TooltipVisibilityContextValue | undefined>(\n undefined,\n) as React.Context<TooltipVisibilityContextValue>;\n\nconst tooltipVisibilityContextDefaultValue: TooltipVisibilityContextValue = {};\n\n/**\n * @internal\n */\nexport const TooltipVisibilityProvider = TooltipVisibilityContext.Provider;\n\n/**\n * @internal\n */\nexport function useTooltipVisibility(): TooltipVisibilityContextValue {\n return React.useContext(TooltipVisibilityContext) ?? tooltipVisibilityContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TooltipVisibilityContext/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TooltipContext';\n"],"sourceRoot":"../src/"}
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
- tslib_1.__exportStar(require("./MenuContext/index"), exports);
10
- //# sourceMappingURL=MenuContext.js.map
9
+ tslib_1.__exportStar(require("./TooltipVisibilityContext/index"), exports);
10
+ //# sourceMappingURL=TooltipVisibilityContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TooltipVisibilityContext.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TooltipVisibilityContext/index';\n"],"sourceRoot":"../src/"}
@@ -3,71 +3,62 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useFluent = exports.ProviderContext = exports.TooltipContext = exports.useThemeClassName = exports.ThemeClassNameContext = exports.useTheme = exports.ThemeContext = exports.useMenuContext = exports.MenuContext = void 0;
7
-
8
- var MenuContext_1 = /*#__PURE__*/require("./MenuContext");
9
-
10
- Object.defineProperty(exports, "MenuContext", {
11
- enumerable: true,
12
- get: function () {
13
- return MenuContext_1.MenuContext;
14
- }
15
- });
16
- Object.defineProperty(exports, "useMenuContext", {
17
- enumerable: true,
18
- get: function () {
19
- return MenuContext_1.useMenuContext;
20
- }
21
- });
6
+ exports.useFluent_unstable = exports.Provider_unstable = exports.useTooltipVisibility_unstable = exports.TooltipVisibilityProvider_unstable = exports.useThemeClassName_unstable = exports.ThemeClassNameProvider_unstable = exports.ThemeProvider_unstable = exports.ThemeContext_unstable = void 0;
22
7
 
23
8
  var ThemeContext_1 = /*#__PURE__*/require("./ThemeContext");
24
9
 
25
- Object.defineProperty(exports, "ThemeContext", {
10
+ Object.defineProperty(exports, "ThemeContext_unstable", {
26
11
  enumerable: true,
27
12
  get: function () {
28
13
  return ThemeContext_1.ThemeContext;
29
14
  }
30
15
  });
31
- Object.defineProperty(exports, "useTheme", {
16
+ Object.defineProperty(exports, "ThemeProvider_unstable", {
32
17
  enumerable: true,
33
18
  get: function () {
34
- return ThemeContext_1.useTheme;
19
+ return ThemeContext_1.ThemeProvider;
35
20
  }
36
21
  });
37
22
 
38
23
  var ThemeClassNameContext_1 = /*#__PURE__*/require("./ThemeClassNameContext");
39
24
 
40
- Object.defineProperty(exports, "ThemeClassNameContext", {
25
+ Object.defineProperty(exports, "ThemeClassNameProvider_unstable", {
41
26
  enumerable: true,
42
27
  get: function () {
43
- return ThemeClassNameContext_1.ThemeClassNameContext;
28
+ return ThemeClassNameContext_1.ThemeClassNameProvider;
44
29
  }
45
30
  });
46
- Object.defineProperty(exports, "useThemeClassName", {
31
+ Object.defineProperty(exports, "useThemeClassName_unstable", {
47
32
  enumerable: true,
48
33
  get: function () {
49
34
  return ThemeClassNameContext_1.useThemeClassName;
50
35
  }
51
36
  });
52
37
 
53
- var TooltipContext_1 = /*#__PURE__*/require("./TooltipContext");
38
+ var TooltipVisibilityContext_1 = /*#__PURE__*/require("./TooltipVisibilityContext");
54
39
 
55
- Object.defineProperty(exports, "TooltipContext", {
40
+ Object.defineProperty(exports, "TooltipVisibilityProvider_unstable", {
41
+ enumerable: true,
42
+ get: function () {
43
+ return TooltipVisibilityContext_1.TooltipVisibilityProvider;
44
+ }
45
+ });
46
+ Object.defineProperty(exports, "useTooltipVisibility_unstable", {
56
47
  enumerable: true,
57
48
  get: function () {
58
- return TooltipContext_1.TooltipContext;
49
+ return TooltipVisibilityContext_1.useTooltipVisibility;
59
50
  }
60
51
  });
61
52
 
62
53
  var ProviderContext_1 = /*#__PURE__*/require("./ProviderContext");
63
54
 
64
- Object.defineProperty(exports, "ProviderContext", {
55
+ Object.defineProperty(exports, "Provider_unstable", {
65
56
  enumerable: true,
66
57
  get: function () {
67
- return ProviderContext_1.ProviderContext;
58
+ return ProviderContext_1.Provider;
68
59
  }
69
60
  });
70
- Object.defineProperty(exports, "useFluent", {
61
+ Object.defineProperty(exports, "useFluent_unstable", {
71
62
  enumerable: true,
72
63
  get: function () {
73
64
  return ProviderContext_1.useFluent;
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,WAAA;AAAW;AAAX,CAAA;AAAa,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,cAAA;AAAc;AAAd,CAAA;;AAEtB,IAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,cAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,cAAA,CAAA,YAAA;AAAY;AAAZ,CAAA;AAAc,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,UAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,cAAA,CAAA,QAAA;AAAQ;AAAR,CAAA;;AACvB,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA;AAAuB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,iBAAA;AAAiB;AAAjB,CAAA;;AAEhC,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,gBAAA,CAAA,cAAA;AAAc;AAAd,CAAA;;AAET,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,eAAA;AAAe;AAAf,CAAA;AAAiB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,WAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,SAAA;AAAS;AAAT,CAAA","sourcesContent":["export { MenuContext, useMenuContext } from './MenuContext';\nexport type { MinimalMenuProps } from './MenuContext';\nexport { ThemeContext, useTheme } from './ThemeContext';\nexport { ThemeClassNameContext, useThemeClassName } from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue } from './ThemeClassNameContext';\nexport { TooltipContext } from './TooltipContext';\nexport type { TooltipContextType } from './TooltipContext';\nexport { ProviderContext, useFluent } from './ProviderContext';\nexport type { ProviderContextValue } from './ProviderContext';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,cAAA,CAAA,YAAA;EAAY;AAAZ,CAAA;AAAuC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,cAAA,CAAA,aAAA;EAAa;AAAb,CAAA;;AAGhD,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,uBAAA,CAAA,sBAAA;EAAsB;AAAtB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,uBAAA,CAAA,iBAAA;EAAiB;AAAjB,CAAA;;AAIF,IAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,0BAAA,CAAA,yBAAA;EAAyB;AAAzB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,+BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,0BAAA,CAAA,oBAAA;EAAoB;AAApB,CAAA;;AAIF,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,QAAA;EAAQ;AAAR,CAAA;AAA+B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,SAAA;EAAS;AAAT,CAAA","sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-shared-contexts",
3
- "version": "9.0.0-rc.9",
3
+ "version": "9.0.1",
4
4
  "description": "Fluent UI React Contexts shared by multiple components.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,7 +27,7 @@
27
27
  "@fluentui/scripts": "^1.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@fluentui/react-theme": "9.0.0-rc.9",
30
+ "@fluentui/react-theme": "^9.1.0",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
33
  "peerDependencies": {
@@ -37,8 +37,7 @@
37
37
  "beachball": {
38
38
  "disallowedChangeTypes": [
39
39
  "major",
40
- "minor",
41
- "patch"
40
+ "prerelease"
42
41
  ]
43
42
  },
44
43
  "exports": {
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.1"
9
- }
10
- ]
11
- }
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export const MenuContext = /*#__PURE__*/React.createContext({});
3
- export const useMenuContext = () => {
4
- return React.useContext(MenuContext);
5
- };
6
- //# sourceMappingURL=MenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["MenuContext/MenuContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAO,MAAM,WAAW,gBAAG,KAAK,CAAC,aAAN,CAAsC,EAAtC,CAApB;AAEP,OAAO,MAAM,cAAc,GAAG,MAAK;AACjC,SAAO,KAAK,CAAC,UAAN,CAAiB,WAAjB,CAAP;AACD,CAFM","sourcesContent":["import * as React from 'react';\nimport type { MinimalMenuProps } from './types';\n\nexport const MenuContext = React.createContext<MinimalMenuProps>({});\n\nexport const useMenuContext = () => {\n return React.useContext(MenuContext);\n};\n"],"sourceRoot":"../src/"}
@@ -1,3 +0,0 @@
1
- export * from './MenuContext';
2
- export * from './types';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["MenuContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC","sourcesContent":["export * from './MenuContext';\nexport * from './types';\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["MenuContext/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type MinimalMenuProps = {\n hidden?: boolean;\n onDismiss?: () => void;\n target?: React.Ref<HTMLElement>;\n};\n"]}
@@ -1,2 +0,0 @@
1
- export * from './MenuContext/index';
2
- //# sourceMappingURL=MenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuContext.js","sourceRoot":"../src/","sources":["MenuContext.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './MenuContext/index';\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ProviderContext.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProviderContext.types.js","sourceRoot":"../src/","sources":["ProviderContext/ProviderContext.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface ProviderContextValue {\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"]}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Context shared by all of the tooltips in the app
4
- */
5
-
6
- export const TooltipContext = /*#__PURE__*/React.createContext({});
7
- //# sourceMappingURL=TooltipContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["TooltipContext/TooltipContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAeA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAAG,KAAK,CAAC,aAAN,CAAwC,EAAxC,CAAvB","sourcesContent":["import * as React from 'react';\n\n/**\n * The context provided by TooltipProvider\n */\nexport type TooltipContextType = {\n /**\n * When a tooltip is shown, it sets itself as the visibleTooltip.\n * The next tooltip to become visible can use it to hide the previous tooltip immediately.\n */\n visibleTooltip?: {\n hide: () => void;\n };\n};\n\n/**\n * Context shared by all of the tooltips in the app\n */\nexport const TooltipContext = React.createContext<TooltipContextType>({});\n"],"sourceRoot":"../src/"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["TooltipContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './TooltipContext';\n"]}
@@ -1,2 +0,0 @@
1
- export * from './TooltipContext/index';
2
- //# sourceMappingURL=TooltipContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooltipContext.js","sourceRoot":"../src/","sources":["TooltipContext.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './TooltipContext/index';\n"]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useMenuContext = exports.MenuContext = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
-
10
- exports.MenuContext = /*#__PURE__*/React.createContext({});
11
-
12
- const useMenuContext = () => {
13
- return React.useContext(exports.MenuContext);
14
- };
15
-
16
- exports.useMenuContext = useMenuContext;
17
- //# sourceMappingURL=MenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["MenuContext/MenuContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGa,OAAA,CAAA,WAAA,gBAAc,KAAK,CAAC,aAAN,CAAsC,EAAtC,CAAd;;AAEN,MAAM,cAAc,GAAG,MAAK;AACjC,SAAO,KAAK,CAAC,UAAN,CAAiB,OAAA,CAAA,WAAjB,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourcesContent":["import * as React from 'react';\nimport type { MinimalMenuProps } from './types';\n\nexport const MenuContext = React.createContext<MinimalMenuProps>({});\n\nexport const useMenuContext = () => {\n return React.useContext(MenuContext);\n};\n"],"sourceRoot":"../src/"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
- tslib_1.__exportStar(require("./MenuContext"), exports);
10
-
11
- tslib_1.__exportStar(require("./types"), exports);
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["MenuContext/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuContext';\nexport * from './types';\n"],"sourceRoot":"../src/"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["MenuContext.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './MenuContext/index';\n"],"sourceRoot":"../src/"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=ProviderContext.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TooltipContext = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
- /**
10
- * Context shared by all of the tooltips in the app
11
- */
12
-
13
-
14
- exports.TooltipContext = /*#__PURE__*/React.createContext({});
15
- //# sourceMappingURL=TooltipContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["TooltipContext/TooltipContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAeA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAAiB,KAAK,CAAC,aAAN,CAAwC,EAAxC,CAAjB","sourcesContent":["import * as React from 'react';\n\n/**\n * The context provided by TooltipProvider\n */\nexport type TooltipContextType = {\n /**\n * When a tooltip is shown, it sets itself as the visibleTooltip.\n * The next tooltip to become visible can use it to hide the previous tooltip immediately.\n */\n visibleTooltip?: {\n hide: () => void;\n };\n};\n\n/**\n * Context shared by all of the tooltips in the app\n */\nexport const TooltipContext = React.createContext<TooltipContextType>({});\n"],"sourceRoot":"../src/"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["TooltipContext/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TooltipContext';\n"],"sourceRoot":"../src/"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
- tslib_1.__exportStar(require("./TooltipContext/index"), exports);
10
- //# sourceMappingURL=TooltipContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["TooltipContext.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TooltipContext/index';\n"],"sourceRoot":"../src/"}