@fluentui-react-native/win32-theme 0.39.0 → 0.39.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 (78) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
  3. package/lib/NativeModule/_mocks_/getThemingModule.native.js +2 -2
  4. package/lib/NativeModule/fallbackOfficeModule.d.ts +1 -1
  5. package/lib/NativeModule/fallbackOfficeModule.js +163 -163
  6. package/lib/NativeModule/getThemingModule.d.ts +1 -1
  7. package/lib/NativeModule/getThemingModule.js +2 -2
  8. package/lib/NativeModule/getThemingModule.native.d.ts +1 -1
  9. package/lib/NativeModule/getThemingModule.native.js +30 -28
  10. package/lib/NativeModule/hostThemeSetting.d.ts +1 -1
  11. package/lib/NativeModule/hostThemeSetting.js +3 -3
  12. package/lib/NativeModule/index.d.ts +2 -10
  13. package/lib/NativeModule/index.js +1 -1
  14. package/lib/NativeModule/officeThemingModule.d.ts +21 -21
  15. package/lib/NativeModule/officeThemingModule.js +1 -1
  16. package/lib/__tests__/win32-theme.test.d.ts +1 -1
  17. package/lib/__tests__/win32-theme.test.js +47 -47
  18. package/lib/createAliasesFromPalette.d.ts +1 -1
  19. package/lib/createAliasesFromPalette.js +56 -56
  20. package/lib/createBrandedThemeWithAlias.d.ts +1 -1
  21. package/lib/createBrandedThemeWithAlias.js +61 -56
  22. package/lib/createFontAliasTokens.d.ts +1 -1
  23. package/lib/createFontAliasTokens.js +3 -3
  24. package/lib/createOfficeAliasTokens.d.ts +1 -1
  25. package/lib/createOfficeAliasTokens.js +5 -5
  26. package/lib/createOfficeTheme.d.ts +1 -1
  27. package/lib/createOfficeTheme.js +46 -53
  28. package/lib/createPartialOfficeTheme.d.ts +1 -1
  29. package/lib/createPartialOfficeTheme.js +19 -22
  30. package/lib/getOfficeTokens.d.ts +227 -229
  31. package/lib/getOfficeTokens.js +26 -20
  32. package/lib/getThemeTypography.d.ts +1 -1
  33. package/lib/getThemeTypography.js +32 -32
  34. package/lib/highContrast/tokens-alias.d.ts +1 -1
  35. package/lib/highContrast/tokens-alias.js +11 -11
  36. package/lib/index.d.ts +2 -10
  37. package/lib/index.js +1 -1
  38. package/lib/paletteFromOfficeColors.d.ts +1 -1
  39. package/lib/paletteFromOfficeColors.js +114 -114
  40. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
  41. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +5 -5
  42. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts +1 -1
  43. package/lib-commonjs/NativeModule/fallbackOfficeModule.js +165 -165
  44. package/lib-commonjs/NativeModule/getThemingModule.d.ts +1 -1
  45. package/lib-commonjs/NativeModule/getThemingModule.js +5 -5
  46. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +1 -1
  47. package/lib-commonjs/NativeModule/getThemingModule.native.js +35 -33
  48. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts +1 -1
  49. package/lib-commonjs/NativeModule/hostThemeSetting.js +5 -5
  50. package/lib-commonjs/NativeModule/index.d.ts +2 -10
  51. package/lib-commonjs/NativeModule/index.js +8 -23
  52. package/lib-commonjs/NativeModule/officeThemingModule.d.ts +21 -21
  53. package/lib-commonjs/NativeModule/officeThemingModule.js +3 -3
  54. package/lib-commonjs/__tests__/win32-theme.test.d.ts +1 -1
  55. package/lib-commonjs/__tests__/win32-theme.test.js +57 -57
  56. package/lib-commonjs/createAliasesFromPalette.d.ts +1 -1
  57. package/lib-commonjs/createAliasesFromPalette.js +58 -58
  58. package/lib-commonjs/createBrandedThemeWithAlias.d.ts +1 -1
  59. package/lib-commonjs/createBrandedThemeWithAlias.js +64 -59
  60. package/lib-commonjs/createFontAliasTokens.d.ts +1 -1
  61. package/lib-commonjs/createFontAliasTokens.js +8 -8
  62. package/lib-commonjs/createOfficeAliasTokens.d.ts +1 -1
  63. package/lib-commonjs/createOfficeAliasTokens.js +10 -10
  64. package/lib-commonjs/createOfficeTheme.d.ts +1 -1
  65. package/lib-commonjs/createOfficeTheme.js +57 -66
  66. package/lib-commonjs/createPartialOfficeTheme.d.ts +1 -1
  67. package/lib-commonjs/createPartialOfficeTheme.js +22 -25
  68. package/lib-commonjs/getOfficeTokens.d.ts +227 -229
  69. package/lib-commonjs/getOfficeTokens.js +39 -35
  70. package/lib-commonjs/getThemeTypography.d.ts +1 -1
  71. package/lib-commonjs/getThemeTypography.js +36 -36
  72. package/lib-commonjs/highContrast/tokens-alias.d.ts +1 -1
  73. package/lib-commonjs/highContrast/tokens-alias.js +18 -20
  74. package/lib-commonjs/index.d.ts +2 -10
  75. package/lib-commonjs/index.js +23 -89
  76. package/lib-commonjs/paletteFromOfficeColors.d.ts +1 -1
  77. package/lib-commonjs/paletteFromOfficeColors.js +116 -116
  78. package/package.json +19 -18
@@ -7,4 +7,4 @@ import type { OfficeThemingModule } from './NativeModule/officeThemingModule';
7
7
  * @param palette - Office palette colors, if they have been successfully retrieved
8
8
  */
9
9
  export declare function createPartialOfficeTheme(module: OfficeThemingModule, themeName?: string, palette?: OfficePalette): PartialTheme;
10
- //# sourceMappingURL=createPartialOfficeTheme.d.ts.map
10
+ //# sourceMappingURL=createPartialOfficeTheme.d.ts.map
@@ -1,16 +1,13 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createPartialOfficeTheme = createPartialOfficeTheme;
4
- const paletteFromOfficeColors_1 = require('./paletteFromOfficeColors');
4
+ const paletteFromOfficeColors_1 = require("./paletteFromOfficeColors");
5
5
  const getRamps = (module) => {
6
- return Object.keys(module.getConstants().ramps).reduce((total, colorRamp) => {
7
- return Object.assign(
8
- total,
9
- ...module.getConstants().rampNames[colorRamp].map((rampValueName, index) => {
10
- return { [rampValueName]: module.getConstants().ramps[colorRamp][index] };
11
- }),
12
- );
13
- }, {});
6
+ return Object.keys(module.getConstants().ramps).reduce((total, colorRamp) => {
7
+ return Object.assign(total, ...module.getConstants().rampNames[colorRamp].map((rampValueName, index) => {
8
+ return { [rampValueName]: module.getConstants().ramps[colorRamp][index] };
9
+ }));
10
+ }, {});
14
11
  };
15
12
  /**
16
13
  * create a partial theme with overrides from the office native module
@@ -19,18 +16,18 @@ const getRamps = (module) => {
19
16
  * @param palette - Office palette colors, if they have been successfully retrieved
20
17
  */
21
18
  function createPartialOfficeTheme(module, themeName, palette) {
22
- return {
23
- colors: {
24
- ...(palette && (0, paletteFromOfficeColors_1.paletteFromOfficeColors)(palette)),
25
- },
26
- typography: module.getConstants().fluentTypography,
27
- host: {
28
- // Office Semantic Colors
29
- palette: palette || {},
30
- // Office Branding Colors
31
- colors: getRamps(module),
32
- },
33
- ...(themeName ? { name: themeName } : undefined),
34
- };
19
+ return {
20
+ colors: {
21
+ ...(palette && (0, paletteFromOfficeColors_1.paletteFromOfficeColors)(palette)),
22
+ },
23
+ typography: module.getConstants().fluentTypography,
24
+ host: {
25
+ // Office Semantic Colors
26
+ palette: palette || {},
27
+ // Office Branding Colors
28
+ colors: getRamps(module),
29
+ },
30
+ ...(themeName ? { name: themeName } : undefined),
31
+ };
35
32
  }
36
- //# sourceMappingURL=createPartialOfficeTheme.js.map
33
+ //# sourceMappingURL=createPartialOfficeTheme.js.map