@uifabricshared/theming-react-native 0.20.19 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +97 -3
  2. package/README.md +1 -1
  3. package/etc/theming-react-native.api.md +12 -11
  4. package/lib/BaselinePlatformDefaults.d.ts +1 -1
  5. package/lib/BaselinePlatformDefaults.js +2 -2
  6. package/lib/BaselinePlatformDefaults.js.map +1 -1
  7. package/lib/Global.d.ts +1 -1
  8. package/lib/Global.js +11 -11
  9. package/lib/Global.js.map +1 -1
  10. package/lib/NativeModule/ThemingModule.d.ts +2 -2
  11. package/lib/NativeModule/ThemingModule.js +1 -1
  12. package/lib/NativeModule/ThemingModule.types.d.ts +13 -13
  13. package/lib/NativeModule/ThemingModule.types.js +1 -1
  14. package/lib/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  15. package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +1 -1
  16. package/lib/NativeModule/ThemingModuleHelpers.js +36 -36
  17. package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
  18. package/lib/NativeModule/getHostSettings.d.ts +1 -1
  19. package/lib/NativeModule/getHostSettings.js +2 -2
  20. package/lib/NativeModule/getHostSettings.js.map +1 -1
  21. package/lib/NativeModule/index.d.ts +1 -1
  22. package/lib/NativeModule/index.js +1 -1
  23. package/lib/Theme.types.d.ts +1 -1
  24. package/lib/Theme.types.js +1 -1
  25. package/lib/ThemeContext.d.ts +1 -1
  26. package/lib/ThemeContext.js +1 -1
  27. package/lib/ThemeLayer.d.ts +25 -24
  28. package/lib/ThemeLayer.d.ts.map +1 -1
  29. package/lib/ThemeLayer.js +42 -39
  30. package/lib/ThemeLayer.js.map +1 -1
  31. package/lib/ThemeProvider.d.ts +1 -1
  32. package/lib/ThemeProvider.js +21 -20
  33. package/lib/ThemeProvider.js.map +1 -1
  34. package/lib/ThemeProvider.types.d.ts +3 -3
  35. package/lib/ThemeProvider.types.js +1 -1
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.js +1 -1
  38. package/lib/platform/PlatformDefaults.d.ts +8 -2
  39. package/lib/platform/PlatformDefaults.d.ts.map +1 -1
  40. package/lib/platform/PlatformDefaults.js +2 -2
  41. package/lib/platform/PlatformDefaults.js.map +1 -1
  42. package/lib/platform/PlatformDefaults.native.d.ts +8 -2
  43. package/lib/platform/PlatformDefaults.native.d.ts.map +1 -1
  44. package/lib/platform/PlatformDefaults.native.js +6 -6
  45. package/lib/platform/PlatformDefaults.native.js.map +1 -1
  46. package/lib/platform/index.d.ts +1 -1
  47. package/lib/platform/index.js +1 -1
  48. package/lib-commonjs/BaselinePlatformDefaults.d.ts +1 -1
  49. package/lib-commonjs/BaselinePlatformDefaults.js +6 -7
  50. package/lib-commonjs/BaselinePlatformDefaults.js.map +1 -1
  51. package/lib-commonjs/Global.d.ts +1 -1
  52. package/lib-commonjs/Global.js +21 -22
  53. package/lib-commonjs/Global.js.map +1 -1
  54. package/lib-commonjs/NativeModule/ThemingModule.d.ts +2 -2
  55. package/lib-commonjs/NativeModule/ThemingModule.js +5 -5
  56. package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +13 -13
  57. package/lib-commonjs/NativeModule/ThemingModule.types.js +3 -3
  58. package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  59. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +46 -44
  60. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +1 -1
  61. package/lib-commonjs/NativeModule/getHostSettings.d.ts +1 -1
  62. package/lib-commonjs/NativeModule/getHostSettings.js +5 -6
  63. package/lib-commonjs/NativeModule/getHostSettings.js.map +1 -1
  64. package/lib-commonjs/NativeModule/index.d.ts +1 -1
  65. package/lib-commonjs/NativeModule/index.js +17 -7
  66. package/lib-commonjs/NativeModule/index.js.map +1 -1
  67. package/lib-commonjs/Theme.types.d.ts +1 -1
  68. package/lib-commonjs/Theme.types.js +3 -3
  69. package/lib-commonjs/ThemeContext.d.ts +1 -1
  70. package/lib-commonjs/ThemeContext.js +67 -30
  71. package/lib-commonjs/ThemeContext.js.map +1 -1
  72. package/lib-commonjs/ThemeLayer.d.ts +25 -24
  73. package/lib-commonjs/ThemeLayer.d.ts.map +1 -1
  74. package/lib-commonjs/ThemeLayer.js +97 -67
  75. package/lib-commonjs/ThemeLayer.js.map +1 -1
  76. package/lib-commonjs/ThemeProvider.d.ts +1 -1
  77. package/lib-commonjs/ThemeProvider.js +79 -49
  78. package/lib-commonjs/ThemeProvider.js.map +1 -1
  79. package/lib-commonjs/ThemeProvider.types.d.ts +3 -3
  80. package/lib-commonjs/ThemeProvider.types.js +3 -3
  81. package/lib-commonjs/index.d.ts +1 -1
  82. package/lib-commonjs/index.js +108 -24
  83. package/lib-commonjs/index.js.map +1 -1
  84. package/lib-commonjs/platform/PlatformDefaults.d.ts +8 -2
  85. package/lib-commonjs/platform/PlatformDefaults.js +11 -9
  86. package/lib-commonjs/platform/PlatformDefaults.js.map +1 -1
  87. package/lib-commonjs/platform/PlatformDefaults.native.d.ts +8 -2
  88. package/lib-commonjs/platform/PlatformDefaults.native.js +15 -13
  89. package/lib-commonjs/platform/PlatformDefaults.native.js.map +1 -1
  90. package/lib-commonjs/platform/index.d.ts +1 -1
  91. package/lib-commonjs/platform/index.js +29 -18
  92. package/package.json +58 -62
  93. package/src/ThemeLayer.tsx +3 -2
  94. package/babel.config.js +0 -1
@@ -5,7 +5,7 @@ import type { ITheme, IPartialTheme, OfficePalette as IOfficePalette } from '@ui
5
5
  * @deprecated
6
6
  */
7
7
  export interface IEventEmitter {
8
- addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
8
+ addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
9
9
  }
10
10
  /**
11
11
  * @deprecated
@@ -15,21 +15,21 @@ export type IPlatformThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPa
15
15
  * @deprecated
16
16
  */
17
17
  export interface IThemingModuleHelper {
18
- /**
19
- * Gets a complete platform theme suitable for using with a Theme Registry
20
- */
21
- getPlatformDefaults: (themeId?: string) => ITheme;
22
- /**
23
- * Gets a theme definition to register with a Theme Registry & use with the theme context to create a subtree with the
24
- * look & feel of a platform theme.
25
- */
26
- getPlatformThemeDefinition: (themeId?: string) => IPlatformThemeDefinition;
27
- addListener: (listener: PlatformDefaultsChangedCallback) => void;
18
+ /**
19
+ * Gets a complete platform theme suitable for using with a Theme Registry
20
+ */
21
+ getPlatformDefaults: (themeId?: string) => ITheme;
22
+ /**
23
+ * Gets a theme definition to register with a Theme Registry & use with the theme context to create a subtree with the
24
+ * look & feel of a platform theme.
25
+ */
26
+ getPlatformThemeDefinition: (themeId?: string) => IPlatformThemeDefinition;
27
+ addListener: (listener: PlatformDefaultsChangedCallback) => void;
28
28
  }
29
29
  /**
30
30
  * @deprecated
31
31
  */
32
32
  export type IHostSettingsWin32 = {
33
- palette: IOfficePalette;
33
+ palette: IOfficePalette;
34
34
  };
35
- //# sourceMappingURL=ThemingModule.types.d.ts.map
35
+ //# sourceMappingURL=ThemingModule.types.d.ts.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ThemingModule.types.js.map
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ //# sourceMappingURL=ThemingModule.types.js.map
@@ -2,15 +2,20 @@ import type { OfficeThemingModule } from '@fluentui-react-native/win32-theme';
2
2
  import type { OfficePalette } from '@uifabricshared/theming-ramp';
3
3
  import type { IThemingModuleHelper, IEventEmitter } from './ThemingModule.types';
4
4
  type PaletteCache = {
5
- [key: string]: OfficePalette;
5
+ [key: string]: OfficePalette;
6
6
  };
7
7
  /**
8
8
  * @deprecated
9
9
  */
10
- export declare function translateOfficeTheme(module: OfficeThemingModule, cache: PaletteCache, id?: string, themeName?: string): import("@uifabricshared/theming-ramp").IPartialTheme;
10
+ export declare function translateOfficeTheme(
11
+ module: OfficeThemingModule,
12
+ cache: PaletteCache,
13
+ id?: string,
14
+ themeName?: string,
15
+ ): import('@uifabricshared/theming-ramp').IPartialTheme;
11
16
  /**
12
17
  * @deprecated
13
18
  */
14
19
  export declare function createThemingModuleHelper(themingModule?: OfficeThemingModule, emitter?: IEventEmitter): IThemingModuleHelper;
15
20
  export {};
16
- //# sourceMappingURL=ThemingModuleHelpers.d.ts.map
21
+ //# sourceMappingURL=ThemingModuleHelpers.d.ts.map
@@ -1,62 +1,64 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createThemingModuleHelper = exports.translateOfficeTheme = void 0;
4
- const win32_theme_1 = require("@fluentui-react-native/win32-theme");
5
- const theming_ramp_1 = require("@uifabricshared/theming-ramp");
6
- const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.translateOfficeTheme = translateOfficeTheme;
4
+ exports.createThemingModuleHelper = createThemingModuleHelper;
5
+ const win32_theme_1 = require('@fluentui-react-native/win32-theme');
6
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
7
+ const BaselinePlatformDefaults_1 = require('../BaselinePlatformDefaults');
7
8
  function isException(palette) {
8
- return palette.message !== undefined;
9
+ return palette.message !== undefined;
9
10
  }
10
11
  function updatePaletteInCache(module, cache, palette) {
11
- const paletteValue = module.getPalette(palette);
12
- if (!isException(paletteValue)) {
13
- cache[palette] = paletteValue;
14
- }
12
+ const paletteValue = module.getPalette(palette);
13
+ if (!isException(paletteValue)) {
14
+ cache[palette] = paletteValue;
15
+ }
15
16
  }
16
17
  const getPaletteCacheKey = (palette) => {
17
- return palette || 'WhiteColors';
18
+ return palette || 'WhiteColors';
18
19
  };
19
20
  function ensurePalette(module, paletteCache, palette) {
20
- const key = getPaletteCacheKey(palette);
21
- if (!paletteCache[key]) {
22
- updatePaletteInCache(module, paletteCache, key);
23
- }
24
- return paletteCache[key] || {};
21
+ const key = getPaletteCacheKey(palette);
22
+ if (!paletteCache[key]) {
23
+ updatePaletteInCache(module, paletteCache, key);
24
+ }
25
+ return paletteCache[key] || {};
25
26
  }
26
27
  /**
27
28
  * @deprecated
28
29
  */
29
30
  function translateOfficeTheme(module, cache, id, themeName) {
30
- const palette = ensurePalette(module, cache, id);
31
- return (0, win32_theme_1.createPartialOfficeTheme)(module, themeName, palette);
31
+ const palette = ensurePalette(module, cache, id);
32
+ return (0, win32_theme_1.createPartialOfficeTheme)(module, themeName, palette);
32
33
  }
33
- exports.translateOfficeTheme = translateOfficeTheme;
34
34
  /**
35
35
  * @deprecated
36
36
  */
37
37
  function createThemingModuleHelper(themingModule, emitter) {
38
- themingModule || console.error('No NativeModule for Theming found');
39
- const paletteCache = {};
40
- let _hostTheme = themingModule.getConstants().initialHostThemeSetting || '';
41
- emitter &&
42
- emitter.addListener('onPlatformDefaultsChanged', (args) => {
43
- _hostTheme = (args && args.hostThemeSetting) || _hostTheme;
44
- Object.keys(paletteCache).forEach((key) => delete paletteCache[key]);
45
- });
46
- return {
47
- getPlatformDefaults: (themeId) => {
48
- return (0, theming_ramp_1.resolvePartialTheme)((0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(), translateOfficeTheme(themingModule, paletteCache, themeId, _hostTheme));
49
- },
50
- getPlatformThemeDefinition: (themeId) => {
51
- return (_parent) => {
52
- updatePaletteInCache(themingModule, paletteCache, themeId);
53
- return translateOfficeTheme(themingModule, paletteCache, themeId);
54
- };
55
- },
56
- addListener: (callback) => {
57
- emitter && emitter.addListener('onPlatformDefaultsChanged', callback);
58
- },
59
- };
38
+ themingModule || console.error('No NativeModule for Theming found');
39
+ const paletteCache = {};
40
+ let _hostTheme = themingModule.getConstants().initialHostThemeSetting || '';
41
+ emitter &&
42
+ emitter.addListener('onPlatformDefaultsChanged', (args) => {
43
+ _hostTheme = (args && args.hostThemeSetting) || _hostTheme;
44
+ Object.keys(paletteCache).forEach((key) => delete paletteCache[key]);
45
+ });
46
+ return {
47
+ getPlatformDefaults: (themeId) => {
48
+ return (0, theming_ramp_1.resolvePartialTheme)(
49
+ (0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(),
50
+ translateOfficeTheme(themingModule, paletteCache, themeId, _hostTheme),
51
+ );
52
+ },
53
+ getPlatformThemeDefinition: (themeId) => {
54
+ return (_parent) => {
55
+ updatePaletteInCache(themingModule, paletteCache, themeId);
56
+ return translateOfficeTheme(themingModule, paletteCache, themeId);
57
+ };
58
+ },
59
+ addListener: (callback) => {
60
+ emitter && emitter.addListener('onPlatformDefaultsChanged', callback);
61
+ },
62
+ };
60
63
  }
61
- exports.createThemingModuleHelper = createThemingModuleHelper;
62
- //# sourceMappingURL=ThemingModuleHelpers.js.map
64
+ //# sourceMappingURL=ThemingModuleHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemingModuleHelpers.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModuleHelpers.ts"],"names":[],"mappings":";;;AAMA,oEAA8E;AAE9E,+DAAmE;AAGnE,0EAAuE;AAIvE,SAAS,WAAW,CAAC,OAAqC;IACxD,OAAQ,OAAwB,CAAC,OAAO,KAAK,SAAS,CAAC;AACzD,CAAC;AAED,SAAS,oBAAoB,CAAC,MAA2B,EAAE,KAAmB,EAAE,OAAe;IAC7F,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;QAC9B,KAAK,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;KAC/B;AACH,CAAC;AAED,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC9C,OAAO,OAAO,IAAI,aAAa,CAAC;AAClC,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B,EAAE,YAA0B,EAAE,OAAgB;IAC9F,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,CAAC,YAAY,C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CAAC;gBAC3D,OAAO,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;YAAA,CACnE,CAAC;QAAA,CACH;QACD,WAAW,EAAE,CAAC,QAAyC,EAAE,EAAE,CAAC;YAC1D,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAAA,CACvE;KACF,CAAC;AAAA,CACH"}
@@ -3,4 +3,4 @@ import type { ITheme } from '../Theme.types';
3
3
  * @deprecated
4
4
  */
5
5
  export declare function getHostSettingsWin32(theme: ITheme): ITheme['host'] | undefined;
6
- //# sourceMappingURL=getHostSettings.d.ts.map
6
+ //# sourceMappingURL=getHostSettings.d.ts.map
@@ -1,11 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHostSettingsWin32 = void 0;
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.getHostSettingsWin32 = getHostSettingsWin32;
4
4
  /**
5
5
  * @deprecated
6
6
  */
7
7
  function getHostSettingsWin32(theme) {
8
- return theme.host?.palette ? theme.host : undefined;
8
+ return theme.host?.palette ? theme.host : undefined;
9
9
  }
10
- exports.getHostSettingsWin32 = getHostSettingsWin32;
11
- //# sourceMappingURL=getHostSettings.js.map
10
+ //# sourceMappingURL=getHostSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,8BAAqC,KAAa,EAA8B;IAC9E,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CACrD"}
@@ -1,4 +1,4 @@
1
1
  export { ThemingModuleHelper } from './ThemingModule';
2
2
  export type { IEventEmitter, IPlatformThemeDefinition, IThemingModuleHelper, IHostSettingsWin32 } from './ThemingModule.types';
3
3
  export { getHostSettingsWin32 } from './getHostSettings';
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.getHostSettingsWin32 = exports.ThemingModuleHelper = void 0;
4
- var ThemingModule_1 = require("./ThemingModule");
5
- Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return ThemingModule_1.ThemingModuleHelper; } });
6
- var getHostSettings_1 = require("./getHostSettings");
7
- Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return getHostSettings_1.getHostSettingsWin32; } });
8
- //# sourceMappingURL=index.js.map
4
+ const ThemingModule_1 = require('./ThemingModule');
5
+ Object.defineProperty(exports, 'ThemingModuleHelper', {
6
+ enumerable: true,
7
+ get: function () {
8
+ return ThemingModule_1.ThemingModuleHelper;
9
+ },
10
+ });
11
+ const getHostSettings_1 = require('./getHostSettings');
12
+ Object.defineProperty(exports, 'getHostSettingsWin32', {
13
+ enumerable: true,
14
+ get: function () {
15
+ return getHostSettings_1.getHostSettingsWin32;
16
+ },
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":";;;AAAA,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAE5B,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAE5B,uDAAyD;AAAhD,uHAAA,oBAAoB,OAAA"}
@@ -12,4 +12,4 @@ export type IThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPartialThe
12
12
  * @deprecated
13
13
  */
14
14
  export type ThemeRegistry = IThemeRegistry<ITheme, IPartialTheme>;
15
- //# sourceMappingURL=Theme.types.d.ts.map
15
+ //# sourceMappingURL=Theme.types.d.ts.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Theme.types.js.map
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ //# sourceMappingURL=Theme.types.js.map
@@ -12,4 +12,4 @@ export declare const ThemeRegistryContext: React.Context<ThemeRegistry>;
12
12
  * @deprecated
13
13
  */
14
14
  export declare const useThemeRegistry: () => ThemeRegistry;
15
- //# sourceMappingURL=ThemeContext.d.ts.map
15
+ //# sourceMappingURL=ThemeContext.d.ts.map
@@ -1,36 +1,73 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __setModuleDefault =
23
+ (this && this.__setModuleDefault) ||
24
+ (Object.create
25
+ ? function (o, v) {
26
+ Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
+ }
28
+ : function (o, v) {
29
+ o['default'] = v;
30
+ });
31
+ var __importStar =
32
+ (this && this.__importStar) ||
33
+ (function () {
34
+ var ownKeys = function (o) {
35
+ ownKeys =
36
+ Object.getOwnPropertyNames ||
37
+ function (o) {
38
+ var ar = [];
39
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
+ return ar;
41
+ };
42
+ return ownKeys(o);
43
+ };
44
+ return function (mod) {
45
+ if (mod && mod.__esModule) return mod;
46
+ var result = {};
47
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
+ __setModuleDefault(result, mod);
49
+ return result;
50
+ };
51
+ })();
52
+ Object.defineProperty(exports, '__esModule', { value: true });
26
53
  exports.useThemeRegistry = exports.ThemeRegistryContext = exports.useTheme = exports.ThemeContext = void 0;
27
- const React = __importStar(require("react"));
54
+ const React = __importStar(require('react'));
28
55
  /**
29
56
  * @deprecated
30
57
  */
31
- var theming_ramp_1 = require("@uifabricshared/theming-ramp");
32
- Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return theming_ramp_1.ThemeContext; } });
33
- Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theming_ramp_1.useTheme; } });
58
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
59
+ Object.defineProperty(exports, 'ThemeContext', {
60
+ enumerable: true,
61
+ get: function () {
62
+ return theming_ramp_1.ThemeContext;
63
+ },
64
+ });
65
+ Object.defineProperty(exports, 'useTheme', {
66
+ enumerable: true,
67
+ get: function () {
68
+ return theming_ramp_1.useTheme;
69
+ },
70
+ });
34
71
  /**
35
72
  * @deprecated
36
73
  */
@@ -40,4 +77,4 @@ exports.ThemeRegistryContext = React.createContext(undefined);
40
77
  */
41
78
  const useThemeRegistry = () => React.useContext(exports.ThemeRegistryContext);
42
79
  exports.useThemeRegistry = useThemeRegistry;
43
- //# sourceMappingURL=ThemeContext.js.map
80
+ //# sourceMappingURL=ThemeContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B;;GAEG;AACH,6DAAsE;AAA7D,4GAAA,YAAY,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAE/B;;GAEG;AACU,QAAA,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,SAAS,CAAC,CAAC;AAClF;;GAEG;AACI,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,4BAAoB,CAAC,CAAC;AAAhE,QAAA,gBAAgB,oBAAgD"}
1
+ {"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B;;GAEG;AACH,+DAAsE;AAA7D,4GAAA,YAAY,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAE/B;;GAEG;AACU,QAAA,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,SAAS,CAAC,CAAC;AAClF;;GAEG;AACI,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,QAAA,oBAAoB,CAAC,CAAC;AAAhE,QAAA,gBAAgB,GAAhB,gBAAgB,CAAgD"}
@@ -1,22 +1,23 @@
1
1
  import * as React from 'react';
2
2
  import type { IThemeEventListener } from '@uifabricshared/theme-registry';
3
3
  import type { ITheme } from './Theme.types';
4
+ import type { FurnJSX } from '@fluentui-react-native/framework-base';
4
5
  /**
5
6
  * props for the ThemeLayer
6
7
  * @deprecated
7
8
  */
8
9
  export interface IThemeLayerProps {
9
- /**
10
- * If `themeName` is specified this layer will set that theme as the active theme. Setting the value
11
- * to '' will explicitly set the default theme as active in the context. If `themeName` is unspecified
12
- * the theme layer will act as a consumer and pick up the currently active theme in the context
13
- */
14
- themeName?: string;
15
- /**
16
- * children function that allows passing of the theme to children. This is a standard pattern for
17
- * consumers.
18
- */
19
- children: (theme: ITheme) => JSX.Element | null;
10
+ /**
11
+ * If `themeName` is specified this layer will set that theme as the active theme. Setting the value
12
+ * to '' will explicitly set the default theme as active in the context. If `themeName` is unspecified
13
+ * the theme layer will act as a consumer and pick up the currently active theme in the context
14
+ */
15
+ themeName?: string;
16
+ /**
17
+ * children function that allows passing of the theme to children. This is a standard pattern for
18
+ * consumers.
19
+ */
20
+ children: (theme: ITheme) => FurnJSX.Element | null;
20
21
  }
21
22
  /**
22
23
  * Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
@@ -45,17 +46,17 @@ export interface IThemeLayerProps {
45
46
  * @deprecated
46
47
  */
47
48
  export declare class ThemeLayer extends React.Component<IThemeLayerProps> {
48
- /**
49
- * stores the name of the theme if in provider mode. Existence of this string is tied to registration
50
- * and is used to signal registration and unregistration
51
- */
52
- private _registeredTheme;
53
- /** handler for theme changes, conditionally will force update */
54
- onInvalidate: IThemeEventListener['onInvalidate'];
55
- /** standard cleanup handler to ensure we unregister */
56
- componentWillUnmount(): void;
57
- render(): JSX.Element;
58
- /** helper to register if this is the first time and to update the filter if necessary */
59
- private _ensureCallbackRegistration;
49
+ /**
50
+ * stores the name of the theme if in provider mode. Existence of this string is tied to registration
51
+ * and is used to signal registration and unregistration
52
+ */
53
+ private _registeredTheme;
54
+ /** handler for theme changes, conditionally will force update */
55
+ onInvalidate: IThemeEventListener['onInvalidate'];
56
+ /** standard cleanup handler to ensure we unregister */
57
+ componentWillUnmount(): void;
58
+ render(): FurnJSX.Element;
59
+ /** helper to register if this is the first time and to update the filter if necessary */
60
+ private _ensureCallbackRegistration;
60
61
  }
61
- //# sourceMappingURL=ThemeLayer.d.ts.map
62
+ //# sourceMappingURL=ThemeLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeLayer.d.ts","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY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