@fluentui-react-native/win32-theme 0.39.1 → 0.39.4

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 (99) hide show
  1. package/.cache/tsconfig.tsbuildinfo +1 -0
  2. package/CHANGELOG.md +48 -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 +25 -30
  22. package/babel.config.js +0 -1
  23. package/eslint.config.js +0 -3
  24. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts +0 -6
  25. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts.map +0 -1
  26. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +0 -11
  27. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js.map +0 -1
  28. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts +0 -5
  29. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts.map +0 -1
  30. package/lib-commonjs/NativeModule/fallbackOfficeModule.js +0 -173
  31. package/lib-commonjs/NativeModule/fallbackOfficeModule.js.map +0 -1
  32. package/lib-commonjs/NativeModule/getThemingModule.d.ts +0 -7
  33. package/lib-commonjs/NativeModule/getThemingModule.d.ts.map +0 -1
  34. package/lib-commonjs/NativeModule/getThemingModule.js +0 -11
  35. package/lib-commonjs/NativeModule/getThemingModule.js.map +0 -1
  36. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +0 -4
  37. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts.map +0 -1
  38. package/lib-commonjs/NativeModule/getThemingModule.native.js +0 -51
  39. package/lib-commonjs/NativeModule/getThemingModule.native.js.map +0 -1
  40. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts +0 -3
  41. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts.map +0 -1
  42. package/lib-commonjs/NativeModule/hostThemeSetting.js +0 -22
  43. package/lib-commonjs/NativeModule/hostThemeSetting.js.map +0 -1
  44. package/lib-commonjs/NativeModule/index.d.ts +0 -4
  45. package/lib-commonjs/NativeModule/index.d.ts.map +0 -1
  46. package/lib-commonjs/NativeModule/index.js +0 -9
  47. package/lib-commonjs/NativeModule/index.js.map +0 -1
  48. package/lib-commonjs/NativeModule/officeThemingModule.d.ts +0 -38
  49. package/lib-commonjs/NativeModule/officeThemingModule.d.ts.map +0 -1
  50. package/lib-commonjs/NativeModule/officeThemingModule.js +0 -3
  51. package/lib-commonjs/NativeModule/officeThemingModule.js.map +0 -1
  52. package/lib-commonjs/__tests__/win32-theme.test.d.ts +0 -2
  53. package/lib-commonjs/__tests__/win32-theme.test.d.ts.map +0 -1
  54. package/lib-commonjs/__tests__/win32-theme.test.js +0 -81
  55. package/lib-commonjs/__tests__/win32-theme.test.js.map +0 -1
  56. package/lib-commonjs/createAliasesFromPalette.d.ts +0 -3
  57. package/lib-commonjs/createAliasesFromPalette.d.ts.map +0 -1
  58. package/lib-commonjs/createAliasesFromPalette.js +0 -61
  59. package/lib-commonjs/createAliasesFromPalette.js.map +0 -1
  60. package/lib-commonjs/createBrandedThemeWithAlias.d.ts +0 -5
  61. package/lib-commonjs/createBrandedThemeWithAlias.d.ts.map +0 -1
  62. package/lib-commonjs/createBrandedThemeWithAlias.js +0 -73
  63. package/lib-commonjs/createBrandedThemeWithAlias.js.map +0 -1
  64. package/lib-commonjs/createFontAliasTokens.d.ts +0 -5
  65. package/lib-commonjs/createFontAliasTokens.d.ts.map +0 -1
  66. package/lib-commonjs/createFontAliasTokens.js +0 -12
  67. package/lib-commonjs/createFontAliasTokens.js.map +0 -1
  68. package/lib-commonjs/createOfficeAliasTokens.d.ts +0 -7
  69. package/lib-commonjs/createOfficeAliasTokens.d.ts.map +0 -1
  70. package/lib-commonjs/createOfficeAliasTokens.js +0 -17
  71. package/lib-commonjs/createOfficeAliasTokens.js.map +0 -1
  72. package/lib-commonjs/createOfficeTheme.d.ts +0 -13
  73. package/lib-commonjs/createOfficeTheme.d.ts.map +0 -1
  74. package/lib-commonjs/createOfficeTheme.js +0 -71
  75. package/lib-commonjs/createOfficeTheme.js.map +0 -1
  76. package/lib-commonjs/createPartialOfficeTheme.d.ts +0 -10
  77. package/lib-commonjs/createPartialOfficeTheme.d.ts.map +0 -1
  78. package/lib-commonjs/createPartialOfficeTheme.js +0 -33
  79. package/lib-commonjs/createPartialOfficeTheme.js.map +0 -1
  80. package/lib-commonjs/getOfficeTokens.d.ts +0 -479
  81. package/lib-commonjs/getOfficeTokens.d.ts.map +0 -1
  82. package/lib-commonjs/getOfficeTokens.js +0 -46
  83. package/lib-commonjs/getOfficeTokens.js.map +0 -1
  84. package/lib-commonjs/getThemeTypography.d.ts +0 -3
  85. package/lib-commonjs/getThemeTypography.d.ts.map +0 -1
  86. package/lib-commonjs/getThemeTypography.js +0 -39
  87. package/lib-commonjs/getThemeTypography.js.map +0 -1
  88. package/lib-commonjs/highContrast/tokens-alias.d.ts +0 -2
  89. package/lib-commonjs/highContrast/tokens-alias.d.ts.map +0 -1
  90. package/lib-commonjs/highContrast/tokens-alias.js +0 -23
  91. package/lib-commonjs/highContrast/tokens-alias.js.map +0 -1
  92. package/lib-commonjs/index.d.ts +0 -10
  93. package/lib-commonjs/index.d.ts.map +0 -1
  94. package/lib-commonjs/index.js +0 -23
  95. package/lib-commonjs/index.js.map +0 -1
  96. package/lib-commonjs/paletteFromOfficeColors.d.ts +0 -3
  97. package/lib-commonjs/paletteFromOfficeColors.d.ts.map +0 -1
  98. package/lib-commonjs/paletteFromOfficeColors.js +0 -119
  99. package/lib-commonjs/paletteFromOfficeColors.js.map +0 -1
@@ -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,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;AAChF,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAExF,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC;IAC/B,MAAM,CAAC,oCAAe,CAAC,CAAC,eAAe,EAAE,CAAC;AAAA,CAC3C,CAAC,CAAC;AAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE,CAAC;IACpC,MAAM,CAAC,4BAAoB,CAAC,CAAC,eAAe,EAAE,CAAC;IAC/C,MA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,CAAC,CAAC;AAEH,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC;IAChD,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,kCAAkC,EAAE,KAAK,EAAE,UAAkB,EAAE,EAAE,CAAC;QACjG,MAAM,gBAAgB,GAAG,IAAA,wDAA0B,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACzE,MAAM,CAAC,gBAAgB,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC5C,CAAC,CAAC;IAEH,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,qCAAqC,EAAE,KAAK,EAAE,UAAkB,EAAE,EAAE,CAAC;QACpG,MAAM,gBAAgB,GAAG,IAAA,wDAA0B,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC5E,MAAM,CAAC,gBAAgB,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC5C,CAAC,CAAC;IAEH,sFAAsF;IACtF,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,iCAAiC,EAAE,KAAK,EAAE,UAAkB,EAAE,EAAE,CAAC;QAChG,MAAM,gBAAgB,GAAG,IAAA,wDAA0B,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACtE,MAAM,CAAC,gBAAgB,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC5C,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { AliasColorTokens, OfficePalette } from '@fluentui-react-native/theme-types';
2
- export declare function createAliasesFromPalette(palette: OfficePalette, isHighContrast: boolean): Partial<AliasColorTokens>;
3
- //# sourceMappingURL=createAliasesFromPalette.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createAliasesFromPalette.d.ts","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAE1F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiEnH"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createAliasesFromPalette = createAliasesFromPalette;
4
- function createAliasesFromPalette(palette, isHighContrast) {
5
- // Workaround for getting checkmark to have correct color in HC
6
- // while native code doesn't support PlatformColor
7
- if (isHighContrast) {
8
- return {};
9
- }
10
- return {
11
- neutralForeground1: palette.Text,
12
- neutralForeground1Hover: palette.TextHover,
13
- neutralForeground1Pressed: palette.TextPressed,
14
- neutralForeground1Selected: palette.TextSelected,
15
- neutralForeground2: palette.TextSecondary,
16
- neutralForeground2Hover: palette.TextSecondaryHover,
17
- neutralForeground2Pressed: palette.TextSecondaryPressed,
18
- neutralForeground2Selected: palette.TextSecondarySelected,
19
- neutralForeground4: palette.TextTextBoxPlaceholder,
20
- neutralForegroundDisabled: palette.TextDisabled,
21
- compoundBrandForeground1: palette.TextEmphasis,
22
- compoundBrandForeground1Hover: palette.TextEmphasisHover,
23
- compoundBrandForeground1Pressed: palette.TextEmphasisPressed,
24
- neutralForegroundOnBrand: palette.TextCtlEmphasis,
25
- neutralForegroundOnBrandHover: palette.TextCtlEmphasisHover,
26
- neutralForegroundOnBrandPressed: palette.TextCtlEmphasisPressed,
27
- neutralForegroundInvertedLink: palette.BkgToggleSwitchOff,
28
- neutralForegroundInvertedLinkHover: palette.BkgToggleSwitchOffHover,
29
- neutralForegroundInvertedLinkPressed: palette.BkgToggleSwitchOffPressed,
30
- neutralBackground1: palette.Bkg,
31
- neutralBackground1Hover: palette.BkgHover,
32
- neutralBackground1Pressed: palette.BkgPressed,
33
- neutralBackground1Selected: palette.BkgSelected,
34
- neutralBackground2: palette.BkgHeader,
35
- neutralBackground2Hover: palette.BkgSubtle,
36
- neutralBackground3: palette.BkgSubtle,
37
- neutralBackgroundInverted: palette.BkgSelectionHighlight,
38
- neutralBackgroundDisabled: palette.BkgCtlDisabled,
39
- neutralStencil1: palette.SliderBuffer,
40
- brandBackground: palette.BkgCtlEmphasis,
41
- brandBackgroundHover: palette.BkgCtlEmphasisHover,
42
- brandBackgroundPressed: palette.BkgCtlEmphasisPressed,
43
- compoundBrandBackground1: palette.BkgToggleSwitchOn,
44
- compoundBrandBackground1Hover: palette.BkgToggleSwitchOnHover,
45
- compoundBrandBackground1Pressed: palette.BkgToggleSwitchOnPressed,
46
- neutralStrokeAccessible: palette.StrokeOnlySelected,
47
- neutralStrokeAccessibleHover: palette.StrokeOnlyHover,
48
- neutralStrokeAccessiblePressed: palette.StrokeOnlyPressed,
49
- neutralStroke1: palette.StrokeCtl,
50
- neutralStroke1Hover: palette.StrokeSelectedHover,
51
- neutralStroke1Pressed: palette.StrokeOverPressed,
52
- neutralStroke2: palette.SliderBuffer,
53
- brandStroke1: palette.AccentEmphasis,
54
- compoundBrandStroke1: palette.StrokeToggleSwitchOn,
55
- compoundBrandStroke1Hover: palette.StrokeToggleSwitchOnHover,
56
- compoundBrandStroke1Pressed: palette.StrokeToggleSwitchOnPressed,
57
- neutralStrokeDisabled: palette.StrokeCtlDisabled,
58
- strokeFocus2: palette.StrokeKeyboard,
59
- };
60
- }
61
- //# sourceMappingURL=createAliasesFromPalette.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createAliasesFromPalette.js","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":";;;AAEA,kCAAyC,OAAsB,EAAE,cAAuB,EAA6B;IACnH,+DAA+D;IAC/D,kDAAkD;IAClD,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL,kBAAkB,EAAE,OAAO,CAAC,IAAI;QAChC,uBAAuB,EAAE,OAAO,CAAC,SAAS;QAC1C,yBAAyB,EAAE,OAAO,CAAC,WAAW;QAC9C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AsB;QAC7D,+BAA+B,EAAE,OAAO,CAAC,wBAAwB;QAEjE,uBAAuB,EAAE,OAAO,CAAC,kBAAkB;QACnD,4BAA4B,EAAE,OAAO,CAAC,eAAe;QACrD,8BAA8B,EAAE,OAAO,CAAC,iBAAiB;QACzD,cAAc,EAAE,OAAO,CAAC,SAAS;QACjC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;QAChD,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAChD,cAAc,EAAE,OAAO,CAAC,YAAY;QACpC,YAAY,EAAE,OAAO,CAAC,cAAc;QACpC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,yBAAyB,EAAE,OAAO,CAAC,yBAAyB;QAC5D,2BAA2B,EAAE,OAAO,CAAC,2BAA2B;QAChE,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAEhD,YAAY,EAAE,OAAO,CAAC,cAAc;KACrC,CAAC;AAAA,CACH"}
@@ -1,5 +0,0 @@
1
- import type { ColorValue } from 'react-native';
2
- import type { Theme, PartialTheme, AliasColorTokens } from '@fluentui-react-native/theme-types';
3
- export declare function createBrandedThemeWithAlias(themeName: string, theme: Theme): PartialTheme;
4
- export declare function getCurrentBrandAliasTokens(themeName: string, appPrimary: ColorValue): Partial<AliasColorTokens>;
5
- //# sourceMappingURL=createBrandedThemeWithAlias.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createBrandedThemeWithAlias.d.ts","sourceRoot":"","sources":["../src/createBrandedThemeWithAlias.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEhG,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,YAAY,CAQzF;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoC/G"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createBrandedThemeWithAlias = createBrandedThemeWithAlias;
4
- exports.getCurrentBrandAliasTokens = getCurrentBrandAliasTokens;
5
- const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
6
- function createBrandedThemeWithAlias(themeName, theme) {
7
- if (themeName === 'HighContrast' || !theme.host.colors) {
8
- return {};
9
- }
10
- return {
11
- colors: getCurrentBrandAliasTokens(themeName, theme.host.colors.AppPrimary),
12
- };
13
- }
14
- function getCurrentBrandAliasTokens(themeName, appPrimary) {
15
- const appColors = getAppColors(appPrimary);
16
- const isWhiteOrColorfulTheme = themeName === 'White' || themeName === 'Colorful';
17
- return {
18
- neutralForeground2BrandHover: isWhiteOrColorfulTheme ? appColors.shade10 : appColors.tint40,
19
- neutralForeground2BrandPressed: isWhiteOrColorfulTheme ? appColors.shade30 : appColors.tint10,
20
- neutralForeground2BrandSelected: isWhiteOrColorfulTheme ? appColors.shade20 : appColors.tint40,
21
- neutralForeground3BrandHover: isWhiteOrColorfulTheme ? appColors.shade10 : appColors.tint40,
22
- neutralForeground3BrandPressed: isWhiteOrColorfulTheme ? appColors.shade30 : appColors.tint10,
23
- neutralForeground3BrandSelected: isWhiteOrColorfulTheme ? appColors.shade20 : appColors.tint40,
24
- brandForegroundLink: isWhiteOrColorfulTheme ? appColors.primary : appColors.tint30,
25
- brandForegroundLinkHover: isWhiteOrColorfulTheme ? appColors.shade10 : appColors.tint40,
26
- brandForegroundLinkPressed: isWhiteOrColorfulTheme ? appColors.shade30 : appColors.tint10,
27
- brandForegroundLinkSelected: isWhiteOrColorfulTheme ? appColors.shade20 : appColors.tint40,
28
- compoundBrandForeground1: isWhiteOrColorfulTheme ? appColors.primary : appColors.tint30,
29
- compoundBrandForeground1Hover: isWhiteOrColorfulTheme ? appColors.shade10 : appColors.tint40,
30
- compoundBrandForeground1Pressed: isWhiteOrColorfulTheme ? appColors.shade30 : appColors.tint10,
31
- brandForeground1: isWhiteOrColorfulTheme ? appColors.primary : appColors.tint30,
32
- brandForeground2: isWhiteOrColorfulTheme ? appColors.shade10 : appColors.tint40,
33
- brandBackground: appColors.primary,
34
- brandBackgroundHover: appColors.shade10,
35
- brandBackgroundPressed: appColors.shade30,
36
- brandBackgroundSelected: appColors.shade20,
37
- compoundBrandBackground1: appColors.primary,
38
- compoundBrandBackground1Hover: appColors.shade10,
39
- compoundBrandBackground1Pressed: appColors.shade20,
40
- brandBackgroundStatic: appColors.primary,
41
- brandBackground2: appColors.tint40,
42
- neutralStrokeAccessibleSelected: appColors.primary,
43
- brandStroke1: appColors.primary,
44
- brandStroke2: appColors.tint40,
45
- compoundBrandStroke1: appColors.primary,
46
- compoundBrandStroke1Hover: appColors.shade10,
47
- compoundBrandStroke1Pressed: appColors.shade20,
48
- };
49
- }
50
- function getAppColors(primaryColor) {
51
- if (typeof primaryColor === 'string') {
52
- if (primaryColor.toLowerCase() === '#185abd') {
53
- return theme_tokens_1.globalTokens.color.word;
54
- }
55
- else if (primaryColor.toLowerCase() === '#107c41') {
56
- return theme_tokens_1.globalTokens.color.excel;
57
- }
58
- else if (primaryColor.toLowerCase() === '#d83b01') {
59
- return theme_tokens_1.globalTokens.color.office;
60
- }
61
- else if (primaryColor.toLowerCase() === '#80397b' || primaryColor.toLowerCase() === '#7719aa') {
62
- return theme_tokens_1.globalTokens.color.oneNote;
63
- }
64
- else if (primaryColor.toLowerCase() === '#0078d4') {
65
- return theme_tokens_1.globalTokens.color.outlook;
66
- }
67
- else if (primaryColor.toLowerCase() === '#c43e1c') {
68
- return theme_tokens_1.globalTokens.color.powerPoint;
69
- }
70
- }
71
- return theme_tokens_1.globalTokens.color.brand;
72
- }
73
- //# sourceMappingURL=createBrandedThemeWithAlias.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createBrandedThemeWithAlias.js","sourceRoot":"","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E,SAAS,CAAC,OAAO;QAC/B,YAAY,EAAE,SAAS,CAAC,MAAM;QAC9B,oBAAoB,EAAE,SAAS,CAAC,OAAO;QACvC,yBAAyB,EAAE,SAAS,CAAC,OAAO;QAC5C,2BAA2B,EAAE,SAAS,CAAC,OAAO;KAC/C,CAAC;AAAA,CACH;AAED,SAAS,YAAY,CAAC,YAAwB,EAAE;IAC9C,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;QACrC,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YAC7C,OAAO,2BAAY,CAAC,KAAK,CAAC,IAAI,CAAC;QACjC,CAAC;aAAM,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,2BAAY,CAAC,KAAK,CAAC,KAAK,CAAC;QAClC,CAAC;aAAM,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,2BAAY,CAAC,KAAK,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YAChG,OAAO,2BAAY,CAAC,KAAK,CAAC,OAAO,CAAC;QACpC,CAAC;aAAM,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,2BAAY,CAAC,KAAK,CAAC,OAAO,CAAC;QACpC,CAAC;aAAM,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,2BAAY,CAAC,KAAK,CAAC,UAAU,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,2BAAY,CAAC,KAAK,CAAC,KAAK,CAAC;AAAA,CACjC"}
@@ -1,5 +0,0 @@
1
- import type { Variants } from '@fluentui-react-native/theme-types';
2
- declare function createFontAliasTokensWorker(): Partial<Variants>;
3
- export declare const createFontAliasTokens: typeof createFontAliasTokensWorker;
4
- export {};
5
- //# sourceMappingURL=createFontAliasTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createFontAliasTokens.d.ts","sourceRoot":"","sources":["../src/createFontAliasTokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAKnE,iBAAS,2BAA2B,IAAI,OAAO,CAAC,QAAQ,CAAC,CAGxD;AAED,eAAO,MAAM,qBAAqB,oCAAuC,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFontAliasTokens = void 0;
4
- const framework_base_1 = require("@fluentui-react-native/framework-base");
5
- const theming_utils_1 = require("@fluentui-react-native/theming-utils");
6
- const getOfficeTokens_1 = require("./getOfficeTokens");
7
- function createFontAliasTokensWorker() {
8
- const aliasTokens = (0, getOfficeTokens_1.getOfficeAliasTokens)('Colorful');
9
- return (0, theming_utils_1.mapFontPipelineToTheme)(aliasTokens);
10
- }
11
- exports.createFontAliasTokens = (0, framework_base_1.memoize)(createFontAliasTokensWorker);
12
- //# sourceMappingURL=createFontAliasTokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createFontAliasTokens.js","sourceRoot":"","sources":["../src/createFontAliasTokens.ts"],"names":[],"mappings":";;;AAAA,0EAAgE;AAEhE,wEAA8E;AAE9E,uDAAyD;AAEzD,SAAS,2BAA2B,GAAsB;IACxD,MAAM,WAAW,GAAG,IAAA,sCAAoB,EAAC,UAAU,CAAC,CAAC;IACrD,OAAO,IAAA,sCAAsB,EAAC,WAAW,CAAC,CAAC;AAAA,CAC5C;AAEY,QAAA,qBAAqB,GAAG,IAAA,wBAAO,EAAC,2BAA2B,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { AliasColorTokens, ThemeShadowDefinition } from '@fluentui-react-native/theme-types';
2
- declare function createOfficeColorAliasTokensWorker(officeTheme: string): AliasColorTokens;
3
- export declare const createOfficeColorAliasTokens: typeof createOfficeColorAliasTokensWorker;
4
- declare function createOfficeShadowAliasTokensWorker(officeTheme: string): ThemeShadowDefinition;
5
- export declare const createOfficeShadowAliasTokens: typeof createOfficeShadowAliasTokensWorker;
6
- export {};
7
- //# sourceMappingURL=createOfficeAliasTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOfficeAliasTokens.d.ts","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAKlG,iBAAS,kCAAkC,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAGjF;AAED,eAAO,MAAM,4BAA4B,2CAA8C,CAAC;AAExF,iBAAS,mCAAmC,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAGvF;AAED,eAAO,MAAM,6BAA6B,4CAA+C,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createOfficeShadowAliasTokens = exports.createOfficeColorAliasTokens = void 0;
4
- const framework_base_1 = require("@fluentui-react-native/framework-base");
5
- const theming_utils_1 = require("@fluentui-react-native/theming-utils");
6
- const getOfficeTokens_1 = require("./getOfficeTokens");
7
- function createOfficeColorAliasTokensWorker(officeTheme) {
8
- const aliasTokens = (0, getOfficeTokens_1.getOfficeAliasTokens)(officeTheme);
9
- return (0, theming_utils_1.mapPipelineToTheme)(aliasTokens);
10
- }
11
- exports.createOfficeColorAliasTokens = (0, framework_base_1.memoize)(createOfficeColorAliasTokensWorker);
12
- function createOfficeShadowAliasTokensWorker(officeTheme) {
13
- const aliasTokens = (0, getOfficeTokens_1.getOfficeShadowTokens)(officeTheme);
14
- return (0, theming_utils_1.mapPipelineToShadow)(aliasTokens);
15
- }
16
- exports.createOfficeShadowAliasTokens = (0, framework_base_1.memoize)(createOfficeShadowAliasTokensWorker);
17
- //# sourceMappingURL=createOfficeAliasTokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOfficeAliasTokens.js","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":";;;AAAA,0EAAgE;AAEhE,wEAA+F;AAE/F,uDAAgF;AAEhF,SAAS,kCAAkC,CAAC,WAAmB,EAAoB;IACjF,MAAM,WAAW,GAAG,IAAA,sCAAoB,EAAC,WAAW,CAAC,CAAC;IACtD,OAAO,IAAA,kCAAkB,EAAC,WAAW,CAAC,CAAC;AAAA,CACxC;AAEY,QAAA,4BAA4B,GAAG,IAAA,wBAAO,EAAC,kCAAkC,CAAC,CAAC;AAExF,SAAS,mCAAmC,CAAC,WAAmB,EAAyB;IACvF,MAAM,WAAW,GAAG,IAAA,uCAAqB,EAAC,WAAW,CAAC,CAAC;IACvD,OAAO,IAAA,mCAAmB,EAAC,WAAW,CAAC,CAAC;AAAA,CACzC;AAEY,QAAA,6BAA6B,GAAG,IAAA,wBAAO,EAAC,mCAAmC,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- import { ThemeReference } from '@fluentui-react-native/theme';
2
- import type { ThemeOptions } from '@fluentui-react-native/theme-types';
3
- /**
4
- * create a theme reference for an Office win32 theme. This will be based upon the standard
5
- * fluent defaults but will attempt to use the theming native module to get information about
6
- * the office palette.
7
- *
8
- * This theme will also listen for native changes and reload itself when things change on the native side of things
9
- *
10
- * @param paletteName - optional specifier for the currently active office palette
11
- */
12
- export declare function createOfficeTheme(options?: ThemeOptions): ThemeReference;
13
- //# sourceMappingURL=createOfficeTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOfficeTheme.d.ts","sourceRoot":"","sources":["../src/createOfficeTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAgB7F;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,YAAiB,GAAG,cAAc,CAyD5E"}
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createOfficeTheme = createOfficeTheme;
4
- const default_theme_1 = require("@fluentui-react-native/default-theme");
5
- const theme_1 = require("@fluentui-react-native/theme");
6
- const createAliasesFromPalette_1 = require("./createAliasesFromPalette");
7
- const createBrandedThemeWithAlias_1 = require("./createBrandedThemeWithAlias");
8
- const createOfficeAliasTokens_1 = require("./createOfficeAliasTokens");
9
- const createPartialOfficeTheme_1 = require("./createPartialOfficeTheme");
10
- const getThemeTypography_1 = require("./getThemeTypography");
11
- const getThemingModule_1 = require("./NativeModule/getThemingModule");
12
- const hostThemeSetting_1 = require("./NativeModule/hostThemeSetting");
13
- function handlePaletteCall(palette) {
14
- const exception = palette;
15
- return exception && exception.message !== undefined ? undefined : palette;
16
- }
17
- /**
18
- * create a theme reference for an Office win32 theme. This will be based upon the standard
19
- * fluent defaults but will attempt to use the theming native module to get information about
20
- * the office palette.
21
- *
22
- * This theme will also listen for native changes and reload itself when things change on the native side of things
23
- *
24
- * @param paletteName - optional specifier for the currently active office palette
25
- */
26
- function createOfficeTheme(options = {}) {
27
- const [module, emitter] = (0, getThemingModule_1.getThemingModule)();
28
- const ref = { module, emitter, themeName: (0, hostThemeSetting_1.getCurrentHostThemeSetting)() || '' };
29
- const { paletteName } = options;
30
- const themeRef = new theme_1.ThemeReference((0, default_theme_1.createDefaultTheme)(options), () => {
31
- const name = paletteName || 'WhiteColors';
32
- const palette = handlePaletteCall(ref.module.getPalette(name));
33
- return (0, createPartialOfficeTheme_1.createPartialOfficeTheme)(module, ref.themeName, palette);
34
- }, () => {
35
- if (!ref.themeName || ref.themeName === '') {
36
- return {};
37
- }
38
- return {
39
- shadows: { ...(0, createOfficeAliasTokens_1.createOfficeShadowAliasTokens)(ref.themeName) },
40
- typography: (0, getThemeTypography_1.win32Typography)(),
41
- };
42
- }, () => {
43
- if (!ref.themeName || ref.themeName === '') {
44
- return {};
45
- }
46
- return {
47
- colors: { ...(0, createOfficeAliasTokens_1.createOfficeColorAliasTokens)(ref.themeName) },
48
- typography: (0, getThemeTypography_1.win32Typography)(),
49
- };
50
- }, (theme) => {
51
- return (0, createBrandedThemeWithAlias_1.createBrandedThemeWithAlias)(ref.themeName, theme);
52
- }, (theme) => {
53
- if (!theme.host.palette) {
54
- return {};
55
- }
56
- return {
57
- ...(paletteName !== undefined && { colors: (0, createAliasesFromPalette_1.createAliasesFromPalette)(theme.host.palette, ref.themeName === 'HighContrast') }),
58
- typography: (0, getThemeTypography_1.win32Typography)(),
59
- };
60
- });
61
- // set up the callback for theme changes on the native side
62
- const onPlatformDefaultsChanged = (args) => {
63
- ref.themeName = (args && args.hostThemeSetting) || ref.themeName;
64
- (0, hostThemeSetting_1.setCurrentHostThemeSetting)(ref.themeName);
65
- themeRef.invalidate();
66
- };
67
- emitter && emitter.addListener('onPlatformDefaultsChanged', onPlatformDefaultsChanged);
68
- // now return the theme reference
69
- return themeRef;
70
- }
71
- //# sourceMappingURL=createOfficeTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOfficeTheme.js","sourceRoot":"","sources":["../src/createOfficeTheme.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAC1E,wDAA8D;AAG9D,yEAAsE;AACtE,+EAA4E;AAC5E,uEAAwG;AACxG,yEAAsE;AACtE,6DAAuD;AACvD,sEAAmE;AACnE,sEAAyG;AAGzG,SAAS,iBAAiB,CAAC,OAAqC,EAA6B;IAC3F,MAAM,SAAS,GAAG,OAAuB,CAAC;IAC1C,OAAO,SAAS,IAAI,SAAS,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,OAAyB,CAAC;AAAA,CAC9F;AAED;;;;;;;;GAQG;AACH,2BAAkC,OAAO,GAAiB,EAAE,EAAkB;IAC5E,MAAM,CAAC,MAAM,EAAE,OA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S,EAAE,KAAK,CAAC,CAAC;IAAA,CAC1D,EACD,CAAC,KAAY,EAAE,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO;YACL,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,IAAA,mDAAwB,EAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,KAAK,cAAc,CAAC,EAAE,CAAC;YAC5H,UAAU,EAAE,IAAA,oCAAe,GAAE;SAC9B,CAAC;IAAA,CACH,CACF,CAAC;IAEF,2DAA2D;IAC3D,MAAM,yBAAyB,GAAG,CAAC,IAAiC,EAAE,EAAE,CAAC;QACvE,GAAG,CAAC,SAAS,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC;QACjE,IAAA,6CAA0B,EAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC;IAAA,CACvB,CAAC;IACF,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,yBAAyB,CAAC,CAAC;IAEvF,iCAAiC;IACjC,OAAO,QAAQ,CAAC;AAAA,CACjB"}
@@ -1,10 +0,0 @@
1
- import type { OfficePalette, PartialTheme } from '@fluentui-react-native/theme-types';
2
- import type { OfficeThemingModule } from './NativeModule/officeThemingModule';
3
- /**
4
- * create a partial theme with overrides from the office native module
5
- *
6
- * @param module - theming native module, either the real one or a mock implementation
7
- * @param palette - Office palette colors, if they have been successfully retrieved
8
- */
9
- export declare function createPartialOfficeTheme(module: OfficeThemingModule, themeName?: string, palette?: OfficePalette): PartialTheme;
10
- //# sourceMappingURL=createPartialOfficeTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createPartialOfficeTheme.d.ts","sourceRoot":"","sources":["../src/createPartialOfficeTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAgB9E;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,YAAY,CAc/H"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPartialOfficeTheme = createPartialOfficeTheme;
4
- const paletteFromOfficeColors_1 = require("./paletteFromOfficeColors");
5
- const getRamps = (module) => {
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
- }, {});
11
- };
12
- /**
13
- * create a partial theme with overrides from the office native module
14
- *
15
- * @param module - theming native module, either the real one or a mock implementation
16
- * @param palette - Office palette colors, if they have been successfully retrieved
17
- */
18
- function createPartialOfficeTheme(module, themeName, palette) {
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
- };
32
- }
33
- //# sourceMappingURL=createPartialOfficeTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createPartialOfficeTheme.js","sourceRoot":"","sources":["../src/createPartialOfficeTheme.ts"],"names":[],"mappings":";;;AAGA,uEAAoE;AAIpE,MAAM,QAAQ,GAAG,CAAC,MAA2B,EAAU,EAAE,CAAC;IACxD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAS,CAAC,KAAa,EAAE,SAAiB,EAAE,EAAE,CAAC;QACnG,OAAO,MAAM,CAAC,MAAM,CAClB,KAAK,EACL,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,aAAqB,EAAE,KAAa,EAAE,EAAE,CAAC;YAC1F,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QAAA,CAC3E,CAAC,CACH,CAAC;IAAA,CACH,EAAE,EAAE,CAAC,CAAC;AAAA,CACR,CAAC;AAEF;;;;;GAKG;AACH,kCAAyC,MAA2B,EAAE,SAAkB,EAAE,OAAuB,EAAgB;IAC/H,OAAO;QACL,MAAM,EAAE;YACN,GAAG,CAAC,OAAO,IAAI,IAAA,iDAAuB,EAAC,OAAO,CAAC,CAAC;SACjD;QACD,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,gBAAgB;QAClD,IAAI,EAAE;YACJ,yBAAyB;YACzB,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,yBAAyB;YACzB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;SACzB;QACD,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACjD,CAAC;AAAA,CACH"}