@fluentui-react-native/win32-theme 0.39.3 → 0.39.5

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 (98) hide show
  1. package/.cache/tsconfig.tsbuildinfo +1 -0
  2. package/CHANGELOG.md +36 -0
  3. package/jest.config.cjs +1 -0
  4. package/lib/NativeModule/_mocks_/getThemingModule.native.js.map +1 -1
  5. package/lib/NativeModule/fallbackOfficeModule.js.map +1 -1
  6. package/lib/NativeModule/getThemingModule.js.map +1 -1
  7. package/lib/NativeModule/getThemingModule.native.js.map +1 -1
  8. package/lib/NativeModule/hostThemeSetting.d.ts.map +1 -1
  9. package/lib/NativeModule/hostThemeSetting.js.map +1 -1
  10. package/lib/__tests__/win32-theme.test.js.map +1 -1
  11. package/lib/createAliasesFromPalette.js.map +1 -1
  12. package/lib/createBrandedThemeWithAlias.js.map +1 -1
  13. package/lib/createFontAliasTokens.js.map +1 -1
  14. package/lib/createOfficeAliasTokens.js.map +1 -1
  15. package/lib/createOfficeTheme.js.map +1 -1
  16. package/lib/createPartialOfficeTheme.js.map +1 -1
  17. package/lib/getOfficeTokens.js.map +1 -1
  18. package/lib/getThemeTypography.js.map +1 -1
  19. package/lib/highContrast/tokens-alias.js.map +1 -1
  20. package/lib/paletteFromOfficeColors.js.map +1 -1
  21. package/package.json +18 -23
  22. package/babel.config.js +0 -1
  23. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts +0 -6
  24. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts.map +0 -1
  25. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +0 -11
  26. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js.map +0 -1
  27. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts +0 -5
  28. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts.map +0 -1
  29. package/lib-commonjs/NativeModule/fallbackOfficeModule.js +0 -173
  30. package/lib-commonjs/NativeModule/fallbackOfficeModule.js.map +0 -1
  31. package/lib-commonjs/NativeModule/getThemingModule.d.ts +0 -7
  32. package/lib-commonjs/NativeModule/getThemingModule.d.ts.map +0 -1
  33. package/lib-commonjs/NativeModule/getThemingModule.js +0 -11
  34. package/lib-commonjs/NativeModule/getThemingModule.js.map +0 -1
  35. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +0 -4
  36. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts.map +0 -1
  37. package/lib-commonjs/NativeModule/getThemingModule.native.js +0 -51
  38. package/lib-commonjs/NativeModule/getThemingModule.native.js.map +0 -1
  39. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts +0 -3
  40. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts.map +0 -1
  41. package/lib-commonjs/NativeModule/hostThemeSetting.js +0 -22
  42. package/lib-commonjs/NativeModule/hostThemeSetting.js.map +0 -1
  43. package/lib-commonjs/NativeModule/index.d.ts +0 -4
  44. package/lib-commonjs/NativeModule/index.d.ts.map +0 -1
  45. package/lib-commonjs/NativeModule/index.js +0 -9
  46. package/lib-commonjs/NativeModule/index.js.map +0 -1
  47. package/lib-commonjs/NativeModule/officeThemingModule.d.ts +0 -38
  48. package/lib-commonjs/NativeModule/officeThemingModule.d.ts.map +0 -1
  49. package/lib-commonjs/NativeModule/officeThemingModule.js +0 -3
  50. package/lib-commonjs/NativeModule/officeThemingModule.js.map +0 -1
  51. package/lib-commonjs/__tests__/win32-theme.test.d.ts +0 -2
  52. package/lib-commonjs/__tests__/win32-theme.test.d.ts.map +0 -1
  53. package/lib-commonjs/__tests__/win32-theme.test.js +0 -81
  54. package/lib-commonjs/__tests__/win32-theme.test.js.map +0 -1
  55. package/lib-commonjs/createAliasesFromPalette.d.ts +0 -3
  56. package/lib-commonjs/createAliasesFromPalette.d.ts.map +0 -1
  57. package/lib-commonjs/createAliasesFromPalette.js +0 -61
  58. package/lib-commonjs/createAliasesFromPalette.js.map +0 -1
  59. package/lib-commonjs/createBrandedThemeWithAlias.d.ts +0 -5
  60. package/lib-commonjs/createBrandedThemeWithAlias.d.ts.map +0 -1
  61. package/lib-commonjs/createBrandedThemeWithAlias.js +0 -73
  62. package/lib-commonjs/createBrandedThemeWithAlias.js.map +0 -1
  63. package/lib-commonjs/createFontAliasTokens.d.ts +0 -5
  64. package/lib-commonjs/createFontAliasTokens.d.ts.map +0 -1
  65. package/lib-commonjs/createFontAliasTokens.js +0 -12
  66. package/lib-commonjs/createFontAliasTokens.js.map +0 -1
  67. package/lib-commonjs/createOfficeAliasTokens.d.ts +0 -7
  68. package/lib-commonjs/createOfficeAliasTokens.d.ts.map +0 -1
  69. package/lib-commonjs/createOfficeAliasTokens.js +0 -17
  70. package/lib-commonjs/createOfficeAliasTokens.js.map +0 -1
  71. package/lib-commonjs/createOfficeTheme.d.ts +0 -13
  72. package/lib-commonjs/createOfficeTheme.d.ts.map +0 -1
  73. package/lib-commonjs/createOfficeTheme.js +0 -71
  74. package/lib-commonjs/createOfficeTheme.js.map +0 -1
  75. package/lib-commonjs/createPartialOfficeTheme.d.ts +0 -10
  76. package/lib-commonjs/createPartialOfficeTheme.d.ts.map +0 -1
  77. package/lib-commonjs/createPartialOfficeTheme.js +0 -33
  78. package/lib-commonjs/createPartialOfficeTheme.js.map +0 -1
  79. package/lib-commonjs/getOfficeTokens.d.ts +0 -479
  80. package/lib-commonjs/getOfficeTokens.d.ts.map +0 -1
  81. package/lib-commonjs/getOfficeTokens.js +0 -46
  82. package/lib-commonjs/getOfficeTokens.js.map +0 -1
  83. package/lib-commonjs/getThemeTypography.d.ts +0 -3
  84. package/lib-commonjs/getThemeTypography.d.ts.map +0 -1
  85. package/lib-commonjs/getThemeTypography.js +0 -39
  86. package/lib-commonjs/getThemeTypography.js.map +0 -1
  87. package/lib-commonjs/highContrast/tokens-alias.d.ts +0 -2
  88. package/lib-commonjs/highContrast/tokens-alias.d.ts.map +0 -1
  89. package/lib-commonjs/highContrast/tokens-alias.js +0 -23
  90. package/lib-commonjs/highContrast/tokens-alias.js.map +0 -1
  91. package/lib-commonjs/index.d.ts +0 -10
  92. package/lib-commonjs/index.d.ts.map +0 -1
  93. package/lib-commonjs/index.js +0 -23
  94. package/lib-commonjs/index.js.map +0 -1
  95. package/lib-commonjs/paletteFromOfficeColors.d.ts +0 -3
  96. package/lib-commonjs/paletteFromOfficeColors.d.ts.map +0 -1
  97. package/lib-commonjs/paletteFromOfficeColors.js +0 -119
  98. package/lib-commonjs/paletteFromOfficeColors.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/win32-theme",
3
- "version": "0.39.3",
3
+ "version": "0.39.5",
4
4
  "description": "Win32 office theme that works with the theming native module",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,48 +10,42 @@
10
10
  "url": "https://github.com/microsoft/fluentui-react-native.git",
11
11
  "directory": "packages/theming/win32-theme"
12
12
  },
13
- "main": "lib-commonjs/index.js",
13
+ "type": "module",
14
+ "main": "lib/index.js",
14
15
  "module": "lib/index.js",
15
16
  "types": "lib/index.d.ts",
16
17
  "exports": {
17
18
  ".": {
18
19
  "types": "./lib/index.d.ts",
20
+ "react-native": "./src/index.ts",
19
21
  "import": "./lib/index.js",
20
- "require": "./lib-commonjs/index.js",
21
22
  "default": "./src/index.ts"
22
23
  }
23
24
  },
24
25
  "scripts": {
25
- "build": "fluentui-scripts build",
26
- "build-cjs": "tsgo --outDir lib-commonjs",
27
- "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
26
+ "build": "tsgo -b",
28
27
  "clean": "fluentui-scripts clean",
29
28
  "depcheck": "fluentui-scripts depcheck",
30
29
  "format": "fluentui-scripts format",
31
30
  "lint": "fluentui-scripts lint",
32
- "lint-package": "fluentui-scripts lint-package",
33
31
  "start": "fluentui-scripts dev",
34
32
  "start-test": "fluentui-scripts jest-watch",
35
33
  "test": "fluentui-scripts jest",
36
34
  "update-snapshots": "fluentui-scripts jest -u"
37
35
  },
38
36
  "dependencies": {
39
- "@fluentui-react-native/default-theme": "0.27.3",
37
+ "@fluentui-react-native/default-theme": "0.27.5",
40
38
  "@fluentui-react-native/design-tokens-win32": "^0.53.0",
41
- "@fluentui-react-native/framework-base": "0.3.3",
42
- "@fluentui-react-native/theme": "0.12.3",
43
- "@fluentui-react-native/theme-tokens": "0.28.3",
44
- "@fluentui-react-native/theme-types": "0.44.3",
45
- "@fluentui-react-native/theming-utils": "0.27.3"
39
+ "@fluentui-react-native/framework-base": "0.4.1",
40
+ "@fluentui-react-native/theme": "0.13.1",
41
+ "@fluentui-react-native/theme-tokens": "0.28.5",
42
+ "@fluentui-react-native/theme-types": "0.44.5",
43
+ "@fluentui-react-native/theming-utils": "0.27.5"
46
44
  },
47
45
  "devDependencies": {
48
46
  "@babel/core": "^7.20.0",
49
- "@fluentui-react-native/babel-config": "0.1.1",
50
- "@fluentui-react-native/jest-config": "0.1.0",
51
- "@fluentui-react-native/kit-config": "0.1.2",
52
- "@fluentui-react-native/lint-config-rules": "0.1.3",
53
47
  "@fluentui-react-native/scripts": "0.1.0",
54
- "@office-iss/react-native-win32": "^0.74.0",
48
+ "@office-iss/react-native-win32": "^0.81.8",
55
49
  "@react-native-community/cli": "^20.0.0",
56
50
  "@react-native-community/cli-platform-android": "^20.0.0",
57
51
  "@react-native-community/cli-platform-ios": "^20.0.0",
@@ -64,7 +58,7 @@
64
58
  "react-native-windows": "^0.81.0"
65
59
  },
66
60
  "peerDependencies": {
67
- "@office-iss/react-native-win32": "^0.74.0",
61
+ "@office-iss/react-native-win32": "^0.74.0 || ^0.81.0",
68
62
  "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4",
69
63
  "react": "18.2.0 || 19.0.0 || 19.1.4",
70
64
  "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6",
@@ -85,6 +79,9 @@
85
79
  "optional": true
86
80
  }
87
81
  },
82
+ "furn": {
83
+ "jestPlatform": "win32"
84
+ },
88
85
  "rnx-kit": {
89
86
  "kitType": "library",
90
87
  "alignDeps": {
@@ -95,11 +92,9 @@
95
92
  "core-ios",
96
93
  "core-macos",
97
94
  "core-windows",
98
- "react",
99
- "tools-core",
100
- "tools-jest"
95
+ "react"
101
96
  ]
102
97
  },
103
- "extends": "@fluentui-react-native/kit-config"
98
+ "extends": "@fluentui-react-native/scripts/kit-config"
104
99
  }
105
100
  }
package/babel.config.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('@fluentui-react-native/babel-config');
@@ -1,6 +0,0 @@
1
- import type { OfficeThemingModule } from '../officeThemingModule';
2
- /**
3
- * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
4
- */
5
- export declare function getThemingModule(): [OfficeThemingModule, undefined];
6
- //# sourceMappingURL=getThemingModule.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../../src/NativeModule/_mocks_/getThemingModule.native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAEnE"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getThemingModule = getThemingModule;
4
- const fallbackOfficeModule_1 = require("../fallbackOfficeModule");
5
- /**
6
- * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
7
- */
8
- function getThemingModule() {
9
- return [fallbackOfficeModule_1.fallbackOfficeModule, undefined];
10
- }
11
- //# sourceMappingURL=getThemingModule.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../../src/NativeModule/_mocks_/getThemingModule.native.ts"],"names":[],"mappings":";;;AAAA,kEAA+D;AAG/D;;GAEG;AACH,4BAAqE;IACnE,OAAO,CAAC,2CAAoB,EAAE,SAAS,CAAC,CAAC;AAAA,CAC1C"}
@@ -1,5 +0,0 @@
1
- import type { OfficePalette } from '@fluentui-react-native/theme-types';
2
- import type { OfficeThemingModule } from './officeThemingModule';
3
- export declare function fallbackGetPalette(pal?: string): OfficePalette;
4
- export declare const fallbackOfficeModule: OfficeThemingModule;
5
- //# sourceMappingURL=fallbackOfficeModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fallbackOfficeModule.d.ts","sourceRoot":"","sources":["../../src/NativeModule/fallbackOfficeModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA8IjE,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,aAAa,CAO9D;AAED,eAAO,MAAM,oBAAoB,EAAE,mBAoBX,CAAC"}
@@ -1,173 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fallbackOfficeModule = void 0;
4
- exports.fallbackGetPalette = fallbackGetPalette;
5
- const whiteColorsPalette = {
6
- Bkg: '#FFFFFF',
7
- BkgHover: '#D2D2D2',
8
- BkgPressed: '#B1B1B1',
9
- BkgSelected: '#C6C6C6',
10
- BkgSubtle: '#F3F3F3',
11
- BkgSelectionHighlight: '#737373',
12
- Text: '#262626',
13
- TextRest: '#262626',
14
- TextHover: '#262626',
15
- TextPressed: '#262626',
16
- TextSelected: '#262626',
17
- TextDisabled: '#B1B1B1',
18
- TextSelectionHighlight: '#FFFFFF',
19
- TextSecondary: '#666666',
20
- TextSecondaryRest: '#666666',
21
- TextSecondaryHover: '#505050',
22
- TextSecondaryPressed: '#666666',
23
- TextSecondarySelected: '#666666',
24
- TextEmphasis: '#D83B01',
25
- TextEmphasisRest: '#D83B01',
26
- TextEmphasisHover: '#EA6115',
27
- TextEmphasisPressed: '#A22C01',
28
- TextEmphasisSelected: '#D83B01',
29
- StrokeSelectedHover: '#969696',
30
- StrokeKeyboard: '#969696',
31
- StrokeOverRest: '#00000000',
32
- StrokeOverHover: '#00000000',
33
- StrokeOverPressed: '#00000000',
34
- StrokeOverSelectedRest: '#00000000',
35
- StrokeOverSelectedHover: '#969696',
36
- StrokeOverSelectedPressed: '#00000000',
37
- BkgCtl: '#E6E6E6',
38
- BkgCtlHover: '#FFF7F0',
39
- BkgCtlPressed: '#FBDFD0',
40
- BkgCtlSelected: '#E6E6E6',
41
- BkgCtlDisabled: '#E6E6E6',
42
- TextCtl: '#262626',
43
- TextCtlHover: '#262626',
44
- TextCtlPressed: '#262626',
45
- TextCtlSelected: '#262626',
46
- TextCtlDisabled: '#B1B1B1',
47
- StrokeCtl: '#969696',
48
- StrokeCtlHover: '#FBDFD0',
49
- StrokeCtlPressed: '#EA6115',
50
- StrokeCtlSelected: '#969696',
51
- StrokeCtlDisabled: '#D2D2D2',
52
- StrokeCtlKeyboard: '#FBDFD0',
53
- BkgCtlEmphasis: '#D83B01',
54
- BkgCtlEmphasisHover: '#F29F71',
55
- BkgCtlEmphasisPressed: '#A22C01',
56
- BkgCtlEmphasisDisabled: '#E6E6E6',
57
- TextCtlEmphasis: '#FFFFFF',
58
- TextCtlEmphasisHover: '#FFFFFF',
59
- TextCtlEmphasisPressed: '#FFFFFF',
60
- TextCtlEmphasisDisabled: '#B1B1B1',
61
- StrokeCtlEmphasis: '#A22C01',
62
- StrokeCtlEmphasisHover: '#D83B01',
63
- StrokeCtlEmphasisPressed: '#A22C01',
64
- StrokeCtlEmphasisDisabled: '#D2D2D2',
65
- StrokeCtlEmphasisKeyboard: '#A22C01',
66
- BkgCtlSubtle: '#FFFFFF',
67
- BkgCtlSubtleHover: '#FFFFFF',
68
- BkgCtlSubtlePressed: '#FFFFFF',
69
- BkgCtlSubtleDisabled: '#F3F3F3',
70
- TextCtlSubtle: '#262626',
71
- TextCtlSubtleHover: '#262626',
72
- TextCtlSubtlePressed: '#262626',
73
- TextCtlSubtleDisabled: '#B1B1B1',
74
- StrokeCtlSubtle: '#C6C6C6',
75
- StrokeCtlSubtleHover: '#969696',
76
- StrokeCtlSubtlePressed: '#969696',
77
- StrokeCtlSubtleDisabled: '#C6C6C6',
78
- StrokeCtlSubtleKeyboard: '#969696',
79
- TextHyperlink: '#D83B01',
80
- TextHyperlinkHover: '#A22C01',
81
- TextHyperlinkPressed: '#6C1E01',
82
- TextActive: '#262626',
83
- TextActiveHover: '#EA6115',
84
- TextActivePressed: '#A22C01',
85
- TextActiveSelected: '#D83B01',
86
- StrokeOnlyHover: '#B1B1B1',
87
- StrokeOnlyPressed: '#737373',
88
- StrokeOnlySelected: '#969696',
89
- TextError: '#A50000',
90
- TextErrorHover: '#A50000',
91
- TextErrorPressed: '#A50000',
92
- TextErrorSelected: '#A50000',
93
- ThumbToggleSwitchOff: '#505050',
94
- ThumbToggleSwitchOffHover: '#505050',
95
- ThumbToggleSwitchOffPressed: '#505050',
96
- ThumbToggleSwitchOffDisabled: '#D2D2D2',
97
- ThumbToggleSwitchOn: '#FFFFFF',
98
- ThumbToggleSwitchOnHover: '#FFFFFF',
99
- ThumbToggleSwitchOnPressed: '#FFFFFF',
100
- ThumbToggleSwitchOnDisabled: '#FFFFFF',
101
- BkgToggleSwitchOff: '#FFFFFF',
102
- BkgToggleSwitchOffHover: '#D2D2D2',
103
- BkgToggleSwitchOffPressed: '#B1B1B1',
104
- BkgToggleSwitchOffDisabled: '#FFFFFF',
105
- BkgToggleSwitchOn: '#D83B01',
106
- BkgToggleSwitchOnHover: '#EA6115',
107
- BkgToggleSwitchOnPressed: '#A22C01',
108
- BkgToggleSwitchOnDisabled: '#D2D2D2',
109
- StrokeToggleSwitchOff: '#505050',
110
- StrokeToggleSwitchOffHover: '#505050',
111
- StrokeToggleSwitchOffPressed: '#505050',
112
- StrokeToggleSwitchOffDisabled: '#D2D2D2',
113
- StrokeToggleSwitchOn: '#D83B01',
114
- StrokeToggleSwitchOnHover: '#EA6115',
115
- StrokeToggleSwitchOnPressed: '#A22C01',
116
- StrokeToggleSwitchOnDisabled: '#D2D2D2',
117
- SliderPrimary: '#444444',
118
- SliderPrimaryHover: '#D2D2D2',
119
- SliderPrimaryPressed: '#262626',
120
- SliderPrimaryDisabled: '#969696',
121
- SliderSecondary: '#D2D2D2',
122
- SliderBuffer: '#262626',
123
- SliderKeyboard: '#444444',
124
- SliderToolTipBorder: '#C6C6C6',
125
- SliderToolTipLabel: '#262626',
126
- SliderToolTipBkg: '#FFFFFF',
127
- AccentDark: '#C6C6C6',
128
- AccentLight: '#E6E6E6',
129
- AccentEmphasis: '#D83B01',
130
- AccentOutline: '#000000',
131
- BkgAccentTint: '#D2E0F4',
132
- TextAccentTint: '#242424',
133
- TextEmphasis2: '#D83B01',
134
- BkgCtlSubtleSelected: '#F3F3F3',
135
- TextCtlSubtleSelected: '#262626',
136
- BkgCtlEmphasisFocus: '#F3F3F3',
137
- BkgCtlSubtleFocus: '#F3F3F3',
138
- BkgCtlSubtleHoverDisabled: '#F3F3F3',
139
- BkgCtlSubtleSelectedDisabled: '#F3F3F3',
140
- BkgHeader: '#E6E6E6',
141
- TextHeader: '#262626',
142
- TextTextBoxPlaceholder: '#666666',
143
- };
144
- function fallbackGetPalette(pal) {
145
- return pal === 'TaskPane'
146
- ? {
147
- ...whiteColorsPalette,
148
- Bkg: 'antiquewhite',
149
- }
150
- : whiteColorsPalette;
151
- }
152
- exports.fallbackOfficeModule = {
153
- getPalette: fallbackGetPalette,
154
- getConstants() {
155
- return {
156
- ramps: {
157
- App: ['#F8F8F8', '#EFF6FC', '#BBDAF3', '#55A4E2', '#359EDD', '#0078d7', '#283E4A', '#030C13'],
158
- FluentGrays: ['#FAF9F8', '#797775', '#11100F'],
159
- ClassicGrays: ['#FFFFFF', '#737373', '#000000'],
160
- Sepias: ['#ECE6DE'],
161
- },
162
- typography: {},
163
- fluentTypography: {},
164
- rampNames: {
165
- App: ['FakeApp1', 'App2', 'App3', 'App4', 'App5', 'App6', 'App7', 'App8'],
166
- FluentGrays: ['FakeGray1', 'Gray2', 'Gray3'],
167
- ClassicGrays: ['FakeGray4', 'Gray5', 'Gray6'],
168
- Sepias: ['FakeSepia'],
169
- },
170
- };
171
- },
172
- };
173
- //# sourceMappingURL=fallbackOfficeModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fallbackOfficeModule.js","sourceRoot":"","sources":["../../src/NativeModule/fallbackOfficeModule.ts"],"names":[],"mappings":";;;;AAIA,MAAM,kBAAkB,GAAkB;IACxC,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,qBAAqB,EAAE,SAAS;IAChC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE,SAAS;IACvB,sBAAsB,EAAE,SAAS;IACjC,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,kBAAkB,EAAE,SAAS;IAC7B,oBAAoB,EAAE,SAAS;IAC/B,qBAAqB,EAAE,SAAS;IAChC,YAAY,EAAE,SAAS;IACvB,gBAAgB,EAAE,SAAS;IAC3B,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,oBAAoB,EAAE,SAAS;IAC/B,mBAAmB,EAAE,SAAS;IAC9B,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,WAAW;IAC3B,eAAe,EAAE,WAAW;IAC5B,iBAAiB,EAAE,WAAW;IAC9B,sBAAsB,EAAE,WAAW;IACnC,uBAAuB,EAAE,SAAS;IAClC,yBAAyB,EAAE,WAAW;IACtC,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,SAAS;IACzB,OAAO,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mB,EAAE,SAAS;IAC9B,iBAAiB,EAAE,SAAS;IAC5B,yBAAyB,EAAE,SAAS;IACpC,4BAA4B,EAAE,SAAS;IACvC,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,sBAAsB,EAAE,SAAS;CAClC,CAAC;AAEF,4BAAmC,GAAY,EAAiB;IAC9D,OAAO,GAAG,KAAK,UAAU;QACvB,CAAC,CAAC;YACE,GAAG,kBAAkB;YACrB,GAAG,EAAE,cAAc;SACpB;QACH,CAAC,CAAC,kBAAkB,CAAC;AAAA,CACxB;AAEY,QAAA,oBAAoB,GAAwB;IACvD,UAAU,EAAE,kBAAkB;IAC9B,YAAY,GAAG;QACb,OAAO;YACL,KAAK,EAAE;gBACL,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;gBAC7F,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;gBAC9C,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;gBAC/C,MAAM,EAAE,CAAC,SAAS,CAAC;aACpB;YACD,UAAU,EAAE,EAAE;YACd,gBAAgB,EAAE,EAAE;YACpB,SAAS,EAAE;gBACT,GAAG,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;gBACzE,WAAW,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;gBAC5C,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;gBAC7C,MAAM,EAAE,CAAC,WAAW,CAAC;aACtB;SACF,CAAC;IAAA,CACH;CACqB,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { NativeEventEmitter } from 'react-native';
2
- import type { OfficeThemingModule } from './officeThemingModule';
3
- /**
4
- * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
5
- */
6
- export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
7
- //# sourceMappingURL=getThemingModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAExF"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getThemingModule = getThemingModule;
4
- const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
5
- /**
6
- * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
7
- */
8
- function getThemingModule() {
9
- return [fallbackOfficeModule_1.fallbackOfficeModule, undefined];
10
- }
11
- //# sourceMappingURL=getThemingModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.ts"],"names":[],"mappings":";;;AAEA,iEAA8D;AAG9D;;GAEG;AACH,4BAA0F;IACxF,OAAO,CAAC,2CAAoB,EAAE,SAAS,CAAC,CAAC;AAAA,CAC1C"}
@@ -1,4 +0,0 @@
1
- import { NativeEventEmitter } from 'react-native';
2
- import type { OfficeThemingModule } from './officeThemingModule';
3
- export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
4
- //# sourceMappingURL=getThemingModule.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,cAAc,CAAC;AAIvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAoBjE,wBAAgB,gBAAgB,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,SAAS,CAAC,CA4BxF"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getThemingModule = getThemingModule;
4
- const react_native_1 = require("react-native");
5
- const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
6
- const hostThemeSetting_1 = require("./hostThemeSetting");
7
- /**
8
- * If we have a userAgent string, let's assume we're web debugging. __DEV__ is for developer bundles. Currently,
9
- * react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
10
- */
11
- function disableGetPalette() {
12
- const disabled = __DEV__ && typeof globalThis.navigator !== 'undefined' && globalThis.navigator.userAgent !== undefined;
13
- disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
14
- return disabled;
15
- }
16
- function themeGetConstants() {
17
- return themingModuleConstants;
18
- }
19
- let themingModule = undefined;
20
- let themingModuleConstants = undefined;
21
- let themingModuleEmitter = undefined;
22
- function getThemingModule() {
23
- if (!themingModule) {
24
- const module = react_native_1.TurboModuleRegistry.get('Theming');
25
- // if the native module exists return the module + an emitter for it
26
- if (module) {
27
- if (!isInstantiated) {
28
- // We need to store the host theme so that when themes are created
29
- // they can use this information.
30
- (0, hostThemeSetting_1.setCurrentHostThemeSetting)(module.getConstants().initialHostThemeSetting);
31
- isInstantiated = true;
32
- }
33
- // Cache the result of getConstants to avoid continuous Native->JS marshalling
34
- themingModuleConstants = module.getConstants();
35
- // mock getPalette if it should be disabled
36
- if (disableGetPalette()) {
37
- themingModule = { ...module, getPalette: fallbackOfficeModule_1.fallbackGetPalette, getConstants: themeGetConstants };
38
- }
39
- else {
40
- themingModule = { ...module, getPalette: module.getPalette, getConstants: themeGetConstants };
41
- }
42
- themingModuleEmitter = new react_native_1.NativeEventEmitter(module);
43
- }
44
- else {
45
- themingModule = fallbackOfficeModule_1.fallbackOfficeModule;
46
- }
47
- }
48
- return [themingModule, themingModuleEmitter];
49
- }
50
- let isInstantiated = false;
51
- //# sourceMappingURL=getThemingModule.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":";;;AAAA,+CAAuE;AAEvE,iEAAkF;AAClF,yDAAgE;AAGhE;;;GAGG;AAEH,SAAS,iBAAiB,GAAY;IACpC,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,UAAU,CAAC,SAAS,KAAK,WAAW,IAAI,UAAU,CAAC,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC;IACxH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC,CAAC;IACvH,OAAO,QAAQ,CAAC;AAAA,CACjB;AAED,SAAS,iBAAiB,GAAoD;IAC5E,OAAO,sBAAsB,CAAC;AAAA,CAC/B;AAED,IAAI,aAAa,GAAwB,SAAS,CAAC;AACnD,IAAI,sBAAsB,GAAoD,SAAS,CAAC;AACxF,IAAI,oBAAoB,GAAuB,SAAS,CAAC;AACzD,4BAA0F;IACxF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,kCAAmB,CAAC,GAAG,CAAsB,SAAS,CAAC,CAAC;QACvE,oEAAoE;QACpE,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,cAAc,EAAE,CAAC;gBACpB,kEAAkE;gBAClE,iCAAiC;gBACjC,IAAA,6CAA0B,EAAC,MAAM,CAAC,YAAY,EAAE,CAAC,uBAAuB,CAAC,CAAC;gBAC1E,cAAc,GAAG,IAAI,CAAC;YACxB,CAAC;YAED,8EAA8E;YAC9E,sBAAsB,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;YAE/C,2CAA2C;YAC3C,IAAI,iBAAiB,EAAE,EAAE,CAAC;gBACxB,aAAa,GAAG,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,yCAAkB,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;YACjG,CAAC;iBAAM,CAAC;gBACN,aAAa,GAAG,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;YAChG,CAAC;YACD,oBAAoB,GAAG,IAAI,iCAAkB,CAAC,MAAM,CAAC,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,aAAa,GAAG,2CAAoB,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;AAAA,CAC9C;AAED,IAAI,cAAc,GAAG,KAAK,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const getCurrentHostThemeSetting: () => string;
2
- export declare const setCurrentHostThemeSetting: (newHostThemeSetting: string) => void;
3
- //# sourceMappingURL=hostThemeSetting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hostThemeSetting.d.ts","sourceRoot":"","sources":["../../src/NativeModule/hostThemeSetting.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B,cAEtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,uCAEtC,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setCurrentHostThemeSetting = exports.getCurrentHostThemeSetting = void 0;
4
- // The ThemingModule currently only stores its initial host theme state
5
- // This state is never updated (it's a constant on the native module)
6
- // This can cause issues if the host theme has changed and you want to
7
- // query for the current state of the host theme. (i.e. you're spinning up
8
- // a new instance of a theme and don't have something already keeping track
9
- // of changes to the theme).
10
- // Unfortunately, native changes take a long time to roundtrip,
11
- // so as a workaround we store a copy of that information instead to last the
12
- // entire lifetime of the instance.
13
- let currentHostThemeSetting = '';
14
- const getCurrentHostThemeSetting = () => {
15
- return currentHostThemeSetting;
16
- };
17
- exports.getCurrentHostThemeSetting = getCurrentHostThemeSetting;
18
- const setCurrentHostThemeSetting = (newHostThemeSetting) => {
19
- currentHostThemeSetting = newHostThemeSetting;
20
- };
21
- exports.setCurrentHostThemeSetting = setCurrentHostThemeSetting;
22
- //# sourceMappingURL=hostThemeSetting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hostThemeSetting.js","sourceRoot":"","sources":["../../src/NativeModule/hostThemeSetting.ts"],"names":[],"mappings":";;;AAAA,uEAAuE;AACvE,qEAAqE;AACrE,sEAAsE;AACtE,0EAA0E;AAC1E,2EAA2E;AAC3E,4BAA4B;AAC5B,+DAA+D;AAC/D,6EAA6E;AAC7E,mCAAmC;AACnC,IAAI,uBAAuB,GAAW,EAAE,CAAC;AAElC,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAAC;IAC9C,OAAO,uBAAuB,CAAC;AAAA,CAChC,CAAC;AAFW,QAAA,0BAA0B,GAA1B,0BAA0B,CAErC;AAEK,MAAM,0BAA0B,GAAG,CAAC,mBAA2B,EAAE,EAAE,CAAC;IACzE,uBAAuB,GAAG,mBAAmB,CAAC;AAAA,CAC/C,CAAC;AAFW,QAAA,0BAA0B,GAA1B,0BAA0B,CAErC"}
@@ -1,4 +0,0 @@
1
- export { fallbackOfficeModule, fallbackGetPalette } from './fallbackOfficeModule';
2
- export { getThemingModule } from './getThemingModule';
3
- export type { PlatformDefaultsChangedArgs, PlatformDefaultsChangedCallback, CxxException, NativeColorRamps, NativeColorNames, OfficeThemingModule, IEventEmitter, } from './officeThemingModule';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,uBAAuB,CAAC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getThemingModule = exports.fallbackGetPalette = exports.fallbackOfficeModule = void 0;
4
- const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
5
- Object.defineProperty(exports, "fallbackOfficeModule", { enumerable: true, get: function () { return fallbackOfficeModule_1.fallbackOfficeModule; } });
6
- Object.defineProperty(exports, "fallbackGetPalette", { enumerable: true, get: function () { return fallbackOfficeModule_1.fallbackGetPalette; } });
7
- const getThemingModule_1 = require("./getThemingModule");
8
- Object.defineProperty(exports, "getThemingModule", { enumerable: true, get: function () { return getThemingModule_1.getThemingModule; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":";;;AAAA,iEAAkF;AAAzE,4HAAA,oBAAoB,OAAA;AAAE,0HAAA,kBAAkB,OAAA;AACjD,yDAAsD;AAA7C,oHAAA,gBAAgB,OAAA"}
@@ -1,38 +0,0 @@
1
- import type { NativeModule, ColorValue } from 'react-native';
2
- import type { OfficePalette, Typography } from '@fluentui-react-native/theme-types';
3
- type ObjectBase = {};
4
- export type PlatformDefaultsChangedArgs = {
5
- hostThemeSetting: string;
6
- };
7
- export type PlatformDefaultsChangedCallback = (args?: PlatformDefaultsChangedArgs) => void;
8
- export interface CxxException {
9
- message: string;
10
- }
11
- export interface NativeColorRamps {
12
- FluentGrays: ColorValue[];
13
- ClassicGrays: ColorValue[];
14
- App: ColorValue[];
15
- Sepias: ColorValue[];
16
- [key: string]: ColorValue[];
17
- }
18
- export interface NativeColorNames {
19
- FluentGrays: string[];
20
- ClassicGrays: string[];
21
- App: string[];
22
- Sepias: string[];
23
- }
24
- export interface OfficeThemingModule extends NativeModule {
25
- getPalette(palette?: string): OfficePalette | CxxException;
26
- getConstants(): {
27
- typography: ObjectBase;
28
- fluentTypography: Typography;
29
- ramps: NativeColorRamps;
30
- rampNames: NativeColorNames;
31
- initialHostThemeSetting?: string;
32
- };
33
- }
34
- export interface IEventEmitter {
35
- addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
36
- }
37
- export {};
38
- //# sourceMappingURL=officeThemingModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"officeThemingModule.d.ts","sourceRoot":"","sources":["../../src/NativeModule/officeThemingModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAGpF,KAAK,UAAU,GAAG,EAAE,CAAC;AAErB,MAAM,MAAM,2BAA2B,GAAG;IAAE,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC;AACvE,MAAM,MAAM,+BAA+B,GAAG,CAAC,IAAI,CAAC,EAAE,2BAA2B,KAAK,IAAI,CAAC;AAE3F,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,GAAG,EAAE,UAAU,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,YAAY,CAAC;IAC3D,YAAY,IAAI;QACd,UAAU,EAAE,UAAU,CAAC;QACvB,gBAAgB,EAAE,UAAU,CAAC;QAC7B,KAAK,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,gBAAgB,CAAC;QAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,+BAA+B,KAAA,KAAK,IAAI,CAAC;CACvE"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=officeThemingModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"officeThemingModule.js","sourceRoot":"","sources":["../../src/NativeModule/officeThemingModule.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=win32-theme.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"win32-theme.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/win32-theme.test.ts"],"names":[],"mappings":""}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const createBrandedThemeWithAlias_1 = require("../createBrandedThemeWithAlias");
4
- const createFontAliasTokens_1 = require("../createFontAliasTokens");
5
- const createOfficeAliasTokens_1 = require("../createOfficeAliasTokens");
6
- const createOfficeTheme_1 = require("../createOfficeTheme");
7
- const createPartialOfficeTheme_1 = require("../createPartialOfficeTheme");
8
- const getThemeTypography_1 = require("../getThemeTypography");
9
- const hostThemeSetting_1 = require("../NativeModule/hostThemeSetting");
10
- const index_1 = require("../NativeModule/index");
11
- const officeThemes = ['White', 'Colorful', 'DarkGray', 'Black', 'HighContrast'];
12
- const appPrimaries = ['#185abd', '#107c41', '#d83b01', '#80397b', '#0078d4', '#c43e1c'];
13
- it('win32Typography test', () => {
14
- expect(getThemeTypography_1.win32Typography).toMatchSnapshot();
15
- });
16
- it('fallbackOfficeModule test', () => {
17
- expect(index_1.fallbackOfficeModule).toMatchSnapshot();
18
- expect(index_1.fallbackOfficeModule.getConstants()).toMatchSnapshot();
19
- });
20
- it('getThemingModule test', () => {
21
- const themingModule = (0, index_1.getThemingModule)();
22
- expect(themingModule).toMatchSnapshot();
23
- expect(themingModule[0].getConstants()).toMatchSnapshot();
24
- });
25
- it('createPartialOfficeTheme test', () => {
26
- const themingModule = (0, index_1.getThemingModule)();
27
- const partialOfficeTheme = (0, createPartialOfficeTheme_1.createPartialOfficeTheme)(themingModule[0]);
28
- expect(partialOfficeTheme).toMatchSnapshot;
29
- });
30
- it('createFontAliasTokens test', () => {
31
- const fontAliasToken = (0, createFontAliasTokens_1.createFontAliasTokens)();
32
- expect(fontAliasToken).toMatchSnapshot();
33
- });
34
- it('createOfficeTheme test', () => {
35
- const officeTheme = (0, createOfficeTheme_1.createOfficeTheme)({ paletteName: 'TaskPane', appearance: 'light' }).theme;
36
- expect(officeTheme).toMatchSnapshot();
37
- });
38
- it.concurrent.each(officeThemes)('createBrandedThemeWithAlias test themeName: %s', async (themeName) => {
39
- (0, hostThemeSetting_1.setCurrentHostThemeSetting)('Colorful');
40
- const officeTheme = (0, createOfficeTheme_1.createOfficeTheme)({ paletteName: 'TaskPane', appearance: 'light' }).theme;
41
- const brandedTheme = (0, createBrandedThemeWithAlias_1.createBrandedThemeWithAlias)(themeName, officeTheme);
42
- expect(brandedTheme).toMatchSnapshot();
43
- });
44
- it.concurrent.each(officeThemes)('createOfficeColorAliasTokens test officeTheme: %s', async (themeName) => {
45
- const colorAliasToken = (0, createOfficeAliasTokens_1.createOfficeColorAliasTokens)(themeName);
46
- expect(colorAliasToken).toMatchSnapshot();
47
- });
48
- it.concurrent.each(officeThemes)('createOfficeShadowAliasTokens test officeTheme: %s', async (themeName) => {
49
- const shadowAliasToken = (0, createOfficeAliasTokens_1.createOfficeShadowAliasTokens)(themeName);
50
- expect(shadowAliasToken).toMatchSnapshot();
51
- });
52
- describe('fallbackGetPalette test', () => {
53
- it('TaskPane palette', () => {
54
- const fallbackPalette = (0, index_1.fallbackGetPalette)('TaskPane');
55
- expect(fallbackPalette).toMatchSnapshot();
56
- });
57
- it('Random palette', () => {
58
- /**
59
- * RedColors is just a random pallette, we're just testing to see what happens
60
- * if we use anything other than the TaskPane palette.
61
- * */
62
- const fallbackPalette = (0, index_1.fallbackGetPalette)('RedColors');
63
- expect(fallbackPalette).toMatchSnapshot();
64
- });
65
- });
66
- describe('getCurrentBrandAliasTokens test', () => {
67
- it.concurrent.each(appPrimaries)('themeName: White, appPrimary: %s', async (appPrimary) => {
68
- const brandAliasTokens = (0, createBrandedThemeWithAlias_1.getCurrentBrandAliasTokens)('White', appPrimary);
69
- expect(brandAliasTokens).toMatchSnapshot();
70
- });
71
- it.concurrent.each(appPrimaries)('themeName: Colorful, appPrimary: %s', async (appPrimary) => {
72
- const brandAliasTokens = (0, createBrandedThemeWithAlias_1.getCurrentBrandAliasTokens)('Colorful', appPrimary);
73
- expect(brandAliasTokens).toMatchSnapshot();
74
- });
75
- // Tests the variation of the alias tokens for when isWhiteOrColorfulTheme is not true
76
- it.concurrent.each(appPrimaries)('themeName: null, appPrimary: %s', async (appPrimary) => {
77
- const brandAliasTokens = (0, createBrandedThemeWithAlias_1.getCurrentBrandAliasTokens)(null, appPrimary);
78
- expect(brandAliasTokens).toMatchSnapshot();
79
- });
80
- });
81
- //# sourceMappingURL=win32-theme.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"win32-theme.test.js","sourceRoot":"","sources":["../../src/__tests__/win32-theme.test.ts"],"names":[],"mappings":";;AAAA,gFAAyG;AACzG,oEAAiE;AACjE,wEAAyG;AACzG,4DAAyD;AACzD,0EAAuE;AACvE,8DAAwD;AACxD,uEAA8E;AAC9E,iDAAmG;AAEnG,MAAM,YAAY,GAAG,CAAC,OA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