@fluentui-react-native/apple-theme 0.28.16 → 0.29.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 (119) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/lib/__tests__/apple-theme.test.d.ts +1 -1
  3. package/lib/__tests__/apple-theme.test.js +42 -41
  4. package/lib/__tests__/apple-theme.test.js.map +1 -1
  5. package/lib/appleColors.ios.d.ts +1 -1
  6. package/lib/appleColors.ios.js +174 -174
  7. package/lib/appleColors.ios.js.map +1 -1
  8. package/lib/appleColors.macos.d.ts +1 -1
  9. package/lib/appleColors.macos.js +367 -367
  10. package/lib/appleColors.macos.js.map +1 -1
  11. package/lib/appleColors.types.ios.d.ts +15 -15
  12. package/lib/appleColors.types.ios.js +1 -1
  13. package/lib/appleColors.types.macos.d.ts +146 -146
  14. package/lib/appleColors.types.macos.d.ts.map +1 -1
  15. package/lib/appleColors.types.macos.js +1 -1
  16. package/lib/appleHighContrast.macos.d.ts +1 -1
  17. package/lib/appleHighContrast.macos.js +3 -3
  18. package/lib/appleHighContrast.macos.js.map +1 -1
  19. package/lib/appleShadows.ios.d.ts +1 -1
  20. package/lib/appleShadows.ios.js +4 -4
  21. package/lib/appleShadows.ios.js.map +1 -1
  22. package/lib/appleShadows.macos.d.ts +1 -1
  23. package/lib/appleShadows.macos.js +2 -2
  24. package/lib/appleShadows.macos.js.map +1 -1
  25. package/lib/appleTheme.ios.d.ts +1 -1
  26. package/lib/appleTheme.ios.js +122 -122
  27. package/lib/appleTheme.ios.js.map +1 -1
  28. package/lib/appleTheme.macos.d.ts +53 -53
  29. package/lib/appleTheme.macos.js +68 -68
  30. package/lib/appleTheme.macos.js.map +1 -1
  31. package/lib/appleTypography.ios.d.ts +1 -1
  32. package/lib/appleTypography.ios.js +50 -50
  33. package/lib/appleTypography.ios.js.map +1 -1
  34. package/lib/appleTypography.macos.d.ts +1 -1
  35. package/lib/appleTypography.macos.js +62 -62
  36. package/lib/appleTypography.macos.js.map +1 -1
  37. package/lib/createAppleTheme.d.ts +1 -1
  38. package/lib/createAppleTheme.ios.d.ts +1 -1
  39. package/lib/createAppleTheme.ios.js +14 -14
  40. package/lib/createAppleTheme.ios.js.map +1 -1
  41. package/lib/createAppleTheme.js +3 -3
  42. package/lib/createAppleTheme.js.map +1 -1
  43. package/lib/createAppleTheme.macos.d.ts +1 -1
  44. package/lib/createAppleTheme.macos.js +23 -23
  45. package/lib/createAppleTheme.macos.js.map +1 -1
  46. package/lib/createFontAliasTokens.ios.d.ts +1 -1
  47. package/lib/createFontAliasTokens.ios.js +2 -2
  48. package/lib/createFontAliasTokens.ios.js.map +1 -1
  49. package/lib/createMacOSAliasTokens.d.ts +1 -1
  50. package/lib/createMacOSAliasTokens.js +5 -5
  51. package/lib/createMacOSAliasTokens.js.map +1 -1
  52. package/lib/createiOSAliasTokens.d.ts +1 -1
  53. package/lib/createiOSAliasTokens.js +5 -5
  54. package/lib/createiOSAliasTokens.js.map +1 -1
  55. package/lib/getMacOSTokens.d.ts +443 -435
  56. package/lib/getMacOSTokens.js +35 -45
  57. package/lib/getMacOSTokens.js.map +1 -1
  58. package/lib/index.d.ts +1 -1
  59. package/lib/index.js +1 -1
  60. package/lib-commonjs/__tests__/apple-theme.test.d.ts +1 -1
  61. package/lib-commonjs/__tests__/apple-theme.test.js +47 -46
  62. package/lib-commonjs/__tests__/apple-theme.test.js.map +1 -1
  63. package/lib-commonjs/appleColors.ios.d.ts +1 -1
  64. package/lib-commonjs/appleColors.ios.js +181 -182
  65. package/lib-commonjs/appleColors.ios.js.map +1 -1
  66. package/lib-commonjs/appleColors.macos.d.ts +1 -1
  67. package/lib-commonjs/appleColors.macos.js +379 -374
  68. package/lib-commonjs/appleColors.macos.js.map +1 -1
  69. package/lib-commonjs/appleColors.types.ios.d.ts +15 -15
  70. package/lib-commonjs/appleColors.types.ios.js +3 -3
  71. package/lib-commonjs/appleColors.types.macos.d.ts +146 -146
  72. package/lib-commonjs/appleColors.types.macos.d.ts.map +1 -1
  73. package/lib-commonjs/appleColors.types.macos.js +3 -3
  74. package/lib-commonjs/appleHighContrast.macos.d.ts +1 -1
  75. package/lib-commonjs/appleHighContrast.macos.js +8 -9
  76. package/lib-commonjs/appleHighContrast.macos.js.map +1 -1
  77. package/lib-commonjs/appleShadows.ios.d.ts +1 -1
  78. package/lib-commonjs/appleShadows.ios.js +10 -11
  79. package/lib-commonjs/appleShadows.ios.js.map +1 -1
  80. package/lib-commonjs/appleShadows.macos.d.ts +1 -1
  81. package/lib-commonjs/appleShadows.macos.js +7 -8
  82. package/lib-commonjs/appleShadows.macos.js.map +1 -1
  83. package/lib-commonjs/appleTheme.ios.d.ts +1 -1
  84. package/lib-commonjs/appleTheme.ios.js +128 -128
  85. package/lib-commonjs/appleTheme.ios.js.map +1 -1
  86. package/lib-commonjs/appleTheme.macos.d.ts +53 -53
  87. package/lib-commonjs/appleTheme.macos.js +76 -76
  88. package/lib-commonjs/appleTheme.macos.js.map +1 -1
  89. package/lib-commonjs/appleTypography.ios.d.ts +1 -1
  90. package/lib-commonjs/appleTypography.ios.js +54 -55
  91. package/lib-commonjs/appleTypography.ios.js.map +1 -1
  92. package/lib-commonjs/appleTypography.macos.d.ts +1 -1
  93. package/lib-commonjs/appleTypography.macos.js +65 -66
  94. package/lib-commonjs/appleTypography.macos.js.map +1 -1
  95. package/lib-commonjs/createAppleTheme.d.ts +1 -1
  96. package/lib-commonjs/createAppleTheme.ios.d.ts +1 -1
  97. package/lib-commonjs/createAppleTheme.ios.js +21 -22
  98. package/lib-commonjs/createAppleTheme.ios.js.map +1 -1
  99. package/lib-commonjs/createAppleTheme.js +8 -9
  100. package/lib-commonjs/createAppleTheme.js.map +1 -1
  101. package/lib-commonjs/createAppleTheme.macos.d.ts +1 -1
  102. package/lib-commonjs/createAppleTheme.macos.js +32 -33
  103. package/lib-commonjs/createAppleTheme.macos.js.map +1 -1
  104. package/lib-commonjs/createFontAliasTokens.ios.d.ts +1 -1
  105. package/lib-commonjs/createFontAliasTokens.ios.js +12 -10
  106. package/lib-commonjs/createFontAliasTokens.ios.js.map +1 -1
  107. package/lib-commonjs/createMacOSAliasTokens.d.ts +1 -1
  108. package/lib-commonjs/createMacOSAliasTokens.js +10 -10
  109. package/lib-commonjs/createMacOSAliasTokens.js.map +1 -1
  110. package/lib-commonjs/createiOSAliasTokens.d.ts +1 -1
  111. package/lib-commonjs/createiOSAliasTokens.js +10 -10
  112. package/lib-commonjs/createiOSAliasTokens.js.map +1 -1
  113. package/lib-commonjs/getMacOSTokens.d.ts +443 -435
  114. package/lib-commonjs/getMacOSTokens.js +53 -62
  115. package/lib-commonjs/getMacOSTokens.js.map +1 -1
  116. package/lib-commonjs/index.d.ts +1 -1
  117. package/lib-commonjs/index.js +30 -10
  118. package/lib-commonjs/index.js.map +1 -1
  119. package/package.json +60 -60
@@ -8,51 +8,41 @@ import macOSLightAliasTokens from '@fluentui-react-native/design-tokens-macos/li
8
8
  import macOSLightShadowTokens from '@fluentui-react-native/design-tokens-macos/light/tokens-shadow.json';
9
9
  import { assertNever } from 'assert-never';
10
10
  export function getMacOSAliasTokens(mode, isHighContrast) {
11
- if (mode === 'light') {
12
- if (isHighContrast) {
13
- return macOSLightHCAliasTokens;
14
- }
15
- else {
16
- return macOSLightAliasTokens;
17
- }
18
- }
19
- else if (mode === 'dark' || mode === 'darkElevated') {
20
- if (isHighContrast) {
21
- return macOSDarkHCAliasTokens;
22
- }
23
- else {
24
- return macOSDarkAliasTokens;
25
- }
26
- }
27
- else if (mode === 'highContrast') {
28
- throw new Error('highContrast is not a valid AppearanceOptions on macOS');
29
- }
30
- else {
31
- assertNever(mode);
32
- }
11
+ if (mode === 'light') {
12
+ if (isHighContrast) {
13
+ return macOSLightHCAliasTokens;
14
+ } else {
15
+ return macOSLightAliasTokens;
16
+ }
17
+ } else if (mode === 'dark' || mode === 'darkElevated') {
18
+ if (isHighContrast) {
19
+ return macOSDarkHCAliasTokens;
20
+ } else {
21
+ return macOSDarkAliasTokens;
22
+ }
23
+ } else if (mode === 'highContrast') {
24
+ throw new Error('highContrast is not a valid AppearanceOptions on macOS');
25
+ } else {
26
+ assertNever(mode);
27
+ }
33
28
  }
34
29
  export function getMacOSShadowTokens(mode, isHighContrast) {
35
- if (mode === 'light') {
36
- if (isHighContrast) {
37
- return macOSLightHCShadowTokens;
38
- }
39
- else {
40
- return macOSLightShadowTokens;
41
- }
42
- }
43
- else if (mode === 'dark' || mode === 'darkElevated') {
44
- if (isHighContrast) {
45
- return macOSDarkHCShadowTokens;
46
- }
47
- else {
48
- return macOSDarkShadowTokens;
49
- }
50
- }
51
- else if (mode === 'highContrast') {
52
- throw new Error('highContrast is not a valid AppearanceOptions on macOS');
53
- }
54
- else {
55
- assertNever(mode);
56
- }
30
+ if (mode === 'light') {
31
+ if (isHighContrast) {
32
+ return macOSLightHCShadowTokens;
33
+ } else {
34
+ return macOSLightShadowTokens;
35
+ }
36
+ } else if (mode === 'dark' || mode === 'darkElevated') {
37
+ if (isHighContrast) {
38
+ return macOSDarkHCShadowTokens;
39
+ } else {
40
+ return macOSDarkShadowTokens;
41
+ }
42
+ } else if (mode === 'highContrast') {
43
+ throw new Error('highContrast is not a valid AppearanceOptions on macOS');
44
+ } else {
45
+ assertNever(mode);
46
+ }
57
47
  }
58
- //# sourceMappingURL=getMacOSTokens.js.map
48
+ //# sourceMappingURL=getMacOSTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMacOSTokens.js","sourceRoot":"","sources":["../src/getMacOSTokens.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,qEAAqE,CAAC;AACvG,OAAO,qBAAqB,MAAM,oEAAoE,CAAC;AACvG,OAAO,sBAAsB,MAAM,uEAAuE,CAAC;AAC3G,OAAO,uBAAuB,MAAM,sEAAsE,CAAC;AAC3G,OAAO,uBAAuB,MAAM,wEAAwE,CAAC;AAC7G,OAAO,wBAAwB,MAAM,uEAAuE,CAAC;AAC7G,OAAO,qBAA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,EAAE,CAAC;QACtD,IAAI,cAAc,EAAE,CAAC;YACnB,OAAO,uBAAuB,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,qBAAqB,CAAC;QAC/B,CAAC;IACH,CAAC;SAAM,IAAI,IAAI,KAAK,cAAc,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;SAAM,CAAC;QACN,WAAW,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AAAA,CACF"}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { createAppleTheme } from './createAppleTheme';
2
2
  export { createMacOSColorAliasTokens as createMacOSAliasTokens } from './createMacOSAliasTokens';
3
3
  export { getIsHighContrast, setIsHighContrast } from './appleHighContrast.macos';
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { createAppleTheme } from './createAppleTheme';
2
2
  export { createMacOSColorAliasTokens as createMacOSAliasTokens } from './createMacOSAliasTokens';
3
3
  export { getIsHighContrast, setIsHighContrast } from './appleHighContrast.macos';
4
- //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=apple-theme.test.d.ts.map
2
+ //# sourceMappingURL=apple-theme.test.d.ts.map
@@ -1,58 +1,59 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const appleHighContrast_macos_1 = require("../appleHighContrast.macos");
4
- const createAppleTheme_1 = require("../createAppleTheme");
5
- const createMacOSAliasTokens_1 = require("../createMacOSAliasTokens");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ const appleHighContrast_macos_1 = require('../appleHighContrast.macos');
4
+ const createAppleTheme_1 = require('../createAppleTheme');
5
+ const createMacOSAliasTokens_1 = require('../createMacOSAliasTokens');
6
6
  jest.mock('react-native-macos/Libraries/Components/AccessibilityInfo/AccessibilityInfo', () => ({
7
- __esModule: true,
8
- default: {
9
- addEventListener: jest.fn(),
10
- announceForAccessibility: jest.fn(),
11
- isAccessibilityServiceEnabled: jest.fn(),
12
- isBoldTextEnabled: jest.fn(),
13
- isGrayscaleEnabled: jest.fn(),
14
- isInvertColorsEnabled: jest.fn(),
15
- isReduceMotionEnabled: jest.fn(),
16
- prefersCrossFadeTransitions: jest.fn(),
17
- isReduceTransparencyEnabled: jest.fn(),
18
- isScreenReaderEnabled: jest.fn(() => Promise.resolve(false)),
19
- setAccessibilityFocus: jest.fn(),
20
- sendAccessibilityEvent: jest.fn(),
21
- getRecommendedTimeoutMillis: jest.fn(),
22
- isHighContrastEnabled: () => Promise.resolve(false),
23
- },
7
+ __esModule: true,
8
+ default: {
9
+ addEventListener: jest.fn(),
10
+ announceForAccessibility: jest.fn(),
11
+ isAccessibilityServiceEnabled: jest.fn(),
12
+ isBoldTextEnabled: jest.fn(),
13
+ isGrayscaleEnabled: jest.fn(),
14
+ isInvertColorsEnabled: jest.fn(),
15
+ isReduceMotionEnabled: jest.fn(),
16
+ prefersCrossFadeTransitions: jest.fn(),
17
+ isReduceTransparencyEnabled: jest.fn(),
18
+ isScreenReaderEnabled: jest.fn(() => Promise.resolve(false)),
19
+ setAccessibilityFocus: jest.fn(),
20
+ sendAccessibilityEvent: jest.fn(),
21
+ getRecommendedTimeoutMillis: jest.fn(),
22
+ isHighContrastEnabled: () => Promise.resolve(false),
23
+ },
24
24
  }));
25
25
  const macOSAliasTokensTable = [
26
- ['light', true],
27
- ['light', false],
28
- ['dark', true],
29
- ['dark', false],
30
- ['highContrast', null],
26
+ ['light', true],
27
+ ['light', false],
28
+ ['dark', true],
29
+ ['dark', false],
30
+ ['highContrast', null],
31
31
  ];
32
32
  it('createAppleTheme test', () => {
33
- const appleTheme = (0, createAppleTheme_1.createAppleTheme)().theme;
34
- expect(appleTheme).toMatchSnapshot();
33
+ const appleTheme = (0, createAppleTheme_1.createAppleTheme)().theme;
34
+ expect(appleTheme).toMatchSnapshot();
35
35
  });
36
36
  it('IsHighContrast test', () => {
37
- (0, appleHighContrast_macos_1.setIsHighContrast)(false);
38
- expect((0, appleHighContrast_macos_1.getIsHighContrast)()).toBe(false);
39
- (0, appleHighContrast_macos_1.setIsHighContrast)(true);
40
- expect((0, appleHighContrast_macos_1.getIsHighContrast)()).toBe(true);
37
+ (0, appleHighContrast_macos_1.setIsHighContrast)(false);
38
+ expect((0, appleHighContrast_macos_1.getIsHighContrast)()).toBe(false);
39
+ (0, appleHighContrast_macos_1.setIsHighContrast)(true);
40
+ expect((0, appleHighContrast_macos_1.getIsHighContrast)()).toBe(true);
41
41
  });
42
42
  it.concurrent.each(macOSAliasTokensTable)('createMacOSColorAliasTokens test mode: %s, isHighContrast: %p', async (mode, isHighContrast) => {
43
- if (mode === 'highContrast') {
44
- expect(() => (0, createMacOSAliasTokens_1.createMacOSColorAliasTokens)(mode, isHighContrast)).toThrow();
45
- }
46
- else {
47
- expect((0, createMacOSAliasTokens_1.createMacOSColorAliasTokens)(mode, isHighContrast)).toMatchSnapshot();
48
- }
43
+ if (mode === 'highContrast') {
44
+ expect(() => (0, createMacOSAliasTokens_1.createMacOSColorAliasTokens)(mode, isHighContrast)).toThrow();
45
+ } else {
46
+ expect((0, createMacOSAliasTokens_1.createMacOSColorAliasTokens)(mode, isHighContrast)).toMatchSnapshot();
47
+ }
49
48
  });
50
- it.concurrent.each(macOSAliasTokensTable)('createMacOSShadowAliasTokens test mode: %s, isHighContrast: %p', async (mode, isHighContrast) => {
49
+ it.concurrent.each(macOSAliasTokensTable)(
50
+ 'createMacOSShadowAliasTokens test mode: %s, isHighContrast: %p',
51
+ async (mode, isHighContrast) => {
51
52
  if (mode === 'highContrast') {
52
- expect(() => (0, createMacOSAliasTokens_1.createMacOSShadowAliasTokens)(mode, isHighContrast)).toThrow();
53
+ expect(() => (0, createMacOSAliasTokens_1.createMacOSShadowAliasTokens)(mode, isHighContrast)).toThrow();
54
+ } else {
55
+ expect((0, createMacOSAliasTokens_1.createMacOSShadowAliasTokens)(mode, isHighContrast)).toMatchSnapshot();
53
56
  }
54
- else {
55
- expect((0, createMacOSAliasTokens_1.createMacOSShadowAliasTokens)(mode, isHighContrast)).toMatchSnapshot();
56
- }
57
- });
58
- //# sourceMappingURL=apple-theme.test.js.map
57
+ },
58
+ );
59
+ //# sourceMappingURL=apple-theme.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple-theme.test.js","sourceRoot":"","sources":["../../src/__tests__/apple-theme.test.ts"],"names":[],"mappings":";;AAEA,wEAAkF;AAClF,0DAAuD;AACvD,sEAAsG;AAEtG,IAAI,CAAC,IAAI,CAAC,6EAA6E,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9F,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC3B,wBAAwB,EAAE,IAAI,CAAC,EAAE,EAAE;QACnC,6BAA6B,EAAE,IAAI,CAAC,EAAE,EAAE;QACxC,iBAAiB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC5B,kBAAkB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC7B,qBAAqB,EAAE,IAAI,CAAC,EAAE,EAAE;QAChC,qBAAqB,EAAE,IAAI,CAAC,EAAE,EAAE;QAChC,2BAA2B,EAAE,IAAI,CAAC,EAAE,EAAE;QACtC,2BAA2B,EAAE,IAAI,CAAC,EAAE,EAAE;QACtC,qBAAqB,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,qBAAqB,EAAE,IAAI,CAAC,EAAE,EAAE;QAChC,sBAAsB,EAAE,IAAI,CAAC,EAAE,EAAE;QACjC,2BAA2B,EAAE,IAAI,CAAC,EAAE,EAAE;QACtC,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,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CAAC;IAC9E,CAAC;AAAA,CACF,CACF,CAAC;AAEF,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CACvC,gEAAgE,EAChE,KAAK,EAAE,IAAuB,EAAE,cAAuB,EAAE,EAAE,CAAC;IAC1D,IAAI,IAAI,KAAK,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,qDAA4B,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC7E,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAA,qDAA4B,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;IAC/E,CAAC;AAAA,CACF,CACF,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { ThemeColorDefinition } from '@fluentui-react-native/theme-types';
2
2
  /** Creates a palette of colors for the apple theme, using the appropriate FluentUI Apple Palette based on appearance */
3
3
  export declare function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean): ThemeColorDefinition;
4
- //# sourceMappingURL=appleColors.ios.d.ts.map
4
+ //# sourceMappingURL=appleColors.ios.d.ts.map
@@ -1,191 +1,190 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paletteFromAppleColors = void 0;
4
- const react_native_1 = require("react-native");
5
- const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
6
- const theming_utils_1 = require("@fluentui-react-native/theming-utils");
7
- const createiOSAliasTokens_1 = require("./createiOSAliasTokens");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.paletteFromAppleColors = paletteFromAppleColors;
4
+ const react_native_1 = require('react-native');
5
+ const theme_tokens_1 = require('@fluentui-react-native/theme-tokens');
6
+ const theming_utils_1 = require('@fluentui-react-native/theming-utils');
7
+ const createiOSAliasTokens_1 = require('./createiOSAliasTokens');
8
8
  //TODO: remove and replace with Fluent 2 alias color tokens
9
9
  function getFluentUIAppleLightPalette() {
10
- return {
11
- communicationBlue: '#0078D4',
12
- communicationBlueTint10: '#2B88D8',
13
- communicationBlueTint20: '#C7E0F4',
14
- communicationBlueTint30: '#DEECF9',
15
- dangerPrimary: '#D92C2C',
16
- dangerTint10: '#DD4242',
17
- gray20: '#69797E',
18
- gray30: '#7A7574',
19
- gray40: '#393939',
20
- successTint10: '#27AC22',
21
- warningPrimary: '#FFD335',
22
- warningTint10: '#FFD94E',
23
- buttonBackgroundFilledPressed: '#2B88D8',
24
- buttonTitleDisabled: '#ACACAC', //textDisabled
25
- };
10
+ return {
11
+ communicationBlue: '#0078D4',
12
+ communicationBlueTint10: '#2B88D8',
13
+ communicationBlueTint20: '#C7E0F4',
14
+ communicationBlueTint30: '#DEECF9',
15
+ dangerPrimary: '#D92C2C',
16
+ dangerTint10: '#DD4242',
17
+ gray20: '#69797E',
18
+ gray30: '#7A7574',
19
+ gray40: '#393939',
20
+ successTint10: '#27AC22',
21
+ warningPrimary: '#FFD335',
22
+ warningTint10: '#FFD94E',
23
+ buttonBackgroundFilledPressed: '#2B88D8', //UIColor(light: Colors.primaryTint10(for: window), dark: Colors.primaryTint20(for: window))
24
+ buttonTitleDisabled: '#ACACAC', //textDisabled
25
+ };
26
26
  }
27
27
  //TODO: remove and replace with Fluent 2 alias color tokens
28
28
  function getFluentUIAppleDarkPalette() {
29
- return {
30
- communicationBlue: '#0086F0',
31
- communicationBlueTint10: '#0078D4',
32
- communicationBlueTint20: '#004C87',
33
- communicationBlueTint30: '#043862',
34
- dangerPrimary: '#E83A3A',
35
- dangerTint10: '#CC3333',
36
- gray20: '#69797E',
37
- gray30: '#7A7574',
38
- gray40: '#393939',
39
- successTint10: '#0D9D3D',
40
- warningPrimary: '#FFC328',
41
- warningTint10: '#E0AB24',
42
- buttonBackgroundFilledPressed: '#004C87',
43
- buttonTitleDisabled: '#404040', //textDisabled
44
- };
29
+ return {
30
+ communicationBlue: '#0086F0',
31
+ communicationBlueTint10: '#0078D4',
32
+ communicationBlueTint20: '#004C87',
33
+ communicationBlueTint30: '#043862',
34
+ dangerPrimary: '#E83A3A',
35
+ dangerTint10: '#CC3333',
36
+ gray20: '#69797E',
37
+ gray30: '#7A7574',
38
+ gray40: '#393939',
39
+ successTint10: '#0D9D3D',
40
+ warningPrimary: '#FFC328',
41
+ warningTint10: '#E0AB24',
42
+ buttonBackgroundFilledPressed: '#004C87', //UIColor(light: Colors.primaryTint10(for: window), dark: Colors.primaryTint20(for: window))
43
+ buttonTitleDisabled: '#404040', //textDisabled
44
+ };
45
45
  }
46
46
  /** Creates a palette of colors for the apple theme, using the appropriate FluentUI Apple Palette based on appearance */
47
47
  function paletteFromAppleColors(isLightMode, isElevated) {
48
- const fluentApple = isLightMode ? getFluentUIAppleLightPalette() : getFluentUIAppleDarkPalette();
49
- const appearance = react_native_1.Appearance.getColorScheme();
50
- let mode = (0, theming_utils_1.getCurrentAppearance)(appearance, 'light');
51
- if (mode === 'dark' && isElevated) {
52
- mode = 'darkElevated';
53
- }
54
- const fluent2AliasColorTokens = (0, createiOSAliasTokens_1.createiOSColorAliasTokens)(mode);
55
- return {
56
- /* Color Alias Tokens */
57
- ...fluent2AliasColorTokens,
58
- /* PaletteBackgroundColors & PaletteTextColors */
59
- background: fluent2AliasColorTokens.neutralBackground1,
60
- bodyStandoutBackground: fluent2AliasColorTokens.neutralBackground4,
61
- bodyFrameBackground: fluent2AliasColorTokens.neutralBackground1,
62
- bodyFrameDivider: fluent2AliasColorTokens.neutralStroke2,
63
- bodyText: fluent2AliasColorTokens.neutralForeground1,
64
- bodyTextChecked: fluent2AliasColorTokens.neutralForeground1,
65
- subText: fluent2AliasColorTokens.neutralForeground3,
66
- bodyDivider: fluent2AliasColorTokens.neutralStroke1,
67
- disabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled,
68
- disabledText: fluent2AliasColorTokens.neutralForegroundDisabled1,
69
- disabledBodyText: fluent2AliasColorTokens.neutralForegroundDisabled1,
70
- focusBorder: 'transparent',
71
- variantBorder: fluent2AliasColorTokens.neutralStroke2,
72
- errorText: fluentApple.dangerPrimary,
73
- inputBorder: fluent2AliasColorTokens.neutralStroke2,
74
- inputBackground: fluent2AliasColorTokens.neutralBackground1,
75
- inputFocusBorderAlt: fluent2AliasColorTokens.neutralStroke1,
76
- inputText: fluent2AliasColorTokens.neutralForeground1,
77
- inputPlaceholderText: fluent2AliasColorTokens.neutralForeground3,
78
- // Default values without any style
79
- // on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
80
- buttonBackground: 'transparent',
81
- buttonBackgroundChecked: 'transparent',
82
- buttonBackgroundHovered: 'transparent',
83
- buttonBackgroundPressed: 'transparent',
84
- buttonBackgroundDisabled: 'transparent',
85
- buttonBorder: fluentApple.communicationBlueTint10,
86
- buttonText: fluentApple.communicationBlue,
87
- buttonTextHovered: fluentApple.communicationBlue,
88
- buttonTextChecked: fluentApple.communicationBlue,
89
- buttonTextPressed: fluentApple.communicationBlueTint20,
90
- buttonTextDisabled: fluentApple.buttonTitleDisabled,
91
- buttonBorderDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
92
- buttonBorderFocused: fluentApple.communicationBlueTint10,
93
- primaryButtonBackground: fluentApple.communicationBlue,
94
- primaryButtonBackgroundHovered: fluentApple.communicationBlue,
95
- primaryButtonBackgroundPressed: fluentApple.buttonBackgroundFilledPressed,
96
- primaryButtonBackgroundDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
97
- primaryButtonBorder: 'transparent',
98
- primaryButtonBorderFocused: 'transparent',
99
- primaryButtonText: fluent2AliasColorTokens.neutralForegroundOnColor,
100
- primaryButtonTextHovered: fluent2AliasColorTokens.neutralForegroundOnColor,
101
- primaryButtonTextPressed: fluent2AliasColorTokens.neutralForegroundOnColor,
102
- primaryButtonTextDisabled: fluent2AliasColorTokens.neutralForegroundOnColor,
103
- accentButtonBackground: fluentApple.communicationBlue,
104
- menuBackground: fluent2AliasColorTokens.neutralBackground1,
105
- menuDivider: fluent2AliasColorTokens.neutralStroke2,
106
- menuIcon: fluent2AliasColorTokens.neutralForeground3,
107
- menuItemBackgroundHovered: fluent2AliasColorTokens.neutralBackground1,
108
- menuItemBackgroundPressed: fluent2AliasColorTokens.neutralBackground1,
109
- menuItemText: fluent2AliasColorTokens.neutralForeground1,
110
- menuItemTextHovered: fluent2AliasColorTokens.neutralForeground1,
111
- listHeaderBackgroundHovered: fluent2AliasColorTokens.neutralForeground1,
112
- listHeaderBackgroundPressed: fluent2AliasColorTokens.neutralForeground1,
113
- actionLink: fluentApple.communicationBlue,
114
- link: fluentApple.communicationBlue,
115
- linkHovered: fluentApple.communicationBlue,
116
- linkPressed: fluentApple.communicationBlueTint10,
117
- /* ControlColorTokens */
118
- // Default values without any style
119
- // on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
120
- defaultBackground: 'transparent',
121
- defaultBorder: fluentApple.communicationBlueTint10,
122
- defaultContent: fluentApple.communicationBlue,
123
- defaultIcon: fluentApple.communicationBlue,
124
- defaultHoveredBackground: 'transparent',
125
- defaultHoveredBorder: fluentApple.communicationBlueTint10,
126
- defaultHoveredContent: fluentApple.communicationBlue,
127
- defaultHoveredIcon: fluentApple.communicationBlue,
128
- defaultFocusedBackground: 'transparent',
129
- defaultFocusedBorder: fluentApple.communicationBlueTint10,
130
- defaultFocusedContent: fluentApple.communicationBlue,
131
- defaultFocusedIcon: fluentApple.communicationBlue,
132
- defaultPressedBackground: 'transparent',
133
- defaultPressedBorder: fluentApple.communicationBlueTint30,
134
- defaultPressedContent: fluentApple.communicationBlueTint20,
135
- defaultPressedIcon: fluentApple.communicationBlueTint20,
136
- defaultDisabledBackground: 'transparent',
137
- defaultDisabledBorder: fluent2AliasColorTokens.neutralBackgroundDisabled,
138
- defaultDisabledContent: fluentApple.buttonTitleDisabled,
139
- defaultDisabledIcon: fluentApple.buttonTitleDisabled,
140
- ghostBackground: 'transparent',
141
- ghostBorder: 'transparent',
142
- ghostContent: fluentApple.communicationBlue,
143
- ghostIcon: fluentApple.communicationBlue,
144
- ghostHoveredBackground: 'transparent',
145
- ghostHoveredBorder: 'transparent',
146
- ghostHoveredContent: fluentApple.communicationBlue,
147
- ghostHoveredIcon: fluentApple.communicationBlue,
148
- ghostFocusedBackground: 'transparent',
149
- ghostFocusedBorder: 'transparent',
150
- ghostFocusedContent: fluentApple.communicationBlue,
151
- ghostFocusedIcon: fluentApple.communicationBlue,
152
- ghostPressedBackground: 'transparent',
153
- ghostPressedBorder: 'transparent',
154
- ghostPressedContent: fluentApple.communicationBlueTint20,
155
- ghostPressedIcon: fluentApple.communicationBlueTint20,
156
- ghostDisabledBackground: 'transparent',
157
- ghostDisabledBorder: 'transparent',
158
- ghostDisabledContent: fluentApple.buttonTitleDisabled,
159
- ghostDisabledIcon: fluentApple.buttonTitleDisabled,
160
- brandedBackground: fluentApple.communicationBlue,
161
- brandedDisabledBorder: 'transparent',
162
- defaultCheckedBackground: 'transparent',
163
- defaultCheckedContent: fluentApple.communicationBlue,
164
- defaultCheckedHoveredBackground: 'transparent',
165
- defaultCheckedHoveredContent: fluentApple.communicationBlue,
166
- ghostCheckedBackground: 'transparent',
167
- ghostCheckedContent: fluentApple.communicationBlue,
168
- ghostCheckedHoveredBackground: 'transparent',
169
- ghostCheckedHoveredContent: fluentApple.communicationBlue,
170
- ghostCheckedHoveredBorder: 'transparent',
171
- // Buttons on iOS don't have secondary text, so map these to be the same as the normal content
172
- ghostSecondaryContent: fluentApple.communicationBlue,
173
- ghostFocusedSecondaryContent: fluentApple.communicationBlue,
174
- ghostHoveredSecondaryContent: fluentApple.communicationBlue,
175
- ghostPressedSecondaryContent: fluentApple.communicationBlueTint20,
176
- brandedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
177
- brandedFocusedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
178
- brandedHoveredSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
179
- brandedPressedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
180
- defaultHoveredSecondaryContent: fluentApple.communicationBlue,
181
- defaultPressedSecondaryContent: fluentApple.communicationBlueTint20,
182
- checkboxBackground: fluentApple.communicationBlue,
183
- checkboxBackgroundDisabled: fluent2AliasColorTokens.neutralBackground1,
184
- checkboxBorderColor: theme_tokens_1.globalTokens.color.grey26,
185
- checkmarkColor: fluent2AliasColorTokens.neutralForegroundOnColor,
186
- personaActivityGlow: 'transparent',
187
- personaActivityRing: fluent2AliasColorTokens.neutralBackground1,
188
- };
48
+ const fluentApple = isLightMode ? getFluentUIAppleLightPalette() : getFluentUIAppleDarkPalette();
49
+ const appearance = react_native_1.Appearance.getColorScheme();
50
+ let mode = (0, theming_utils_1.getCurrentAppearance)(appearance, 'light');
51
+ if (mode === 'dark' && isElevated) {
52
+ mode = 'darkElevated';
53
+ }
54
+ const fluent2AliasColorTokens = (0, createiOSAliasTokens_1.createiOSColorAliasTokens)(mode);
55
+ return {
56
+ /* Color Alias Tokens */
57
+ ...fluent2AliasColorTokens,
58
+ /* PaletteBackgroundColors & PaletteTextColors */
59
+ background: fluent2AliasColorTokens.neutralBackground1,
60
+ bodyStandoutBackground: fluent2AliasColorTokens.neutralBackground4,
61
+ bodyFrameBackground: fluent2AliasColorTokens.neutralBackground1,
62
+ bodyFrameDivider: fluent2AliasColorTokens.neutralStroke2,
63
+ bodyText: fluent2AliasColorTokens.neutralForeground1,
64
+ bodyTextChecked: fluent2AliasColorTokens.neutralForeground1,
65
+ subText: fluent2AliasColorTokens.neutralForeground3,
66
+ bodyDivider: fluent2AliasColorTokens.neutralStroke1,
67
+ disabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled,
68
+ disabledText: fluent2AliasColorTokens.neutralForegroundDisabled1,
69
+ disabledBodyText: fluent2AliasColorTokens.neutralForegroundDisabled1,
70
+ focusBorder: 'transparent',
71
+ variantBorder: fluent2AliasColorTokens.neutralStroke2,
72
+ errorText: fluentApple.dangerPrimary,
73
+ inputBorder: fluent2AliasColorTokens.neutralStroke2,
74
+ inputBackground: fluent2AliasColorTokens.neutralBackground1,
75
+ inputFocusBorderAlt: fluent2AliasColorTokens.neutralStroke1,
76
+ inputText: fluent2AliasColorTokens.neutralForeground1,
77
+ inputPlaceholderText: fluent2AliasColorTokens.neutralForeground3,
78
+ // Default values without any style
79
+ // on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
80
+ buttonBackground: 'transparent',
81
+ buttonBackgroundChecked: 'transparent',
82
+ buttonBackgroundHovered: 'transparent',
83
+ buttonBackgroundPressed: 'transparent',
84
+ buttonBackgroundDisabled: 'transparent',
85
+ buttonBorder: fluentApple.communicationBlueTint10,
86
+ buttonText: fluentApple.communicationBlue,
87
+ buttonTextHovered: fluentApple.communicationBlue,
88
+ buttonTextChecked: fluentApple.communicationBlue,
89
+ buttonTextPressed: fluentApple.communicationBlueTint20,
90
+ buttonTextDisabled: fluentApple.buttonTitleDisabled,
91
+ buttonBorderDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
92
+ buttonBorderFocused: fluentApple.communicationBlueTint10,
93
+ primaryButtonBackground: fluentApple.communicationBlue,
94
+ primaryButtonBackgroundHovered: fluentApple.communicationBlue,
95
+ primaryButtonBackgroundPressed: fluentApple.buttonBackgroundFilledPressed,
96
+ primaryButtonBackgroundDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
97
+ primaryButtonBorder: 'transparent',
98
+ primaryButtonBorderFocused: 'transparent',
99
+ primaryButtonText: fluent2AliasColorTokens.neutralForegroundOnColor,
100
+ primaryButtonTextHovered: fluent2AliasColorTokens.neutralForegroundOnColor,
101
+ primaryButtonTextPressed: fluent2AliasColorTokens.neutralForegroundOnColor,
102
+ primaryButtonTextDisabled: fluent2AliasColorTokens.neutralForegroundOnColor,
103
+ accentButtonBackground: fluentApple.communicationBlue,
104
+ menuBackground: fluent2AliasColorTokens.neutralBackground1,
105
+ menuDivider: fluent2AliasColorTokens.neutralStroke2,
106
+ menuIcon: fluent2AliasColorTokens.neutralForeground3,
107
+ menuItemBackgroundHovered: fluent2AliasColorTokens.neutralBackground1,
108
+ menuItemBackgroundPressed: fluent2AliasColorTokens.neutralBackground1,
109
+ menuItemText: fluent2AliasColorTokens.neutralForeground1,
110
+ menuItemTextHovered: fluent2AliasColorTokens.neutralForeground1,
111
+ listHeaderBackgroundHovered: fluent2AliasColorTokens.neutralForeground1,
112
+ listHeaderBackgroundPressed: fluent2AliasColorTokens.neutralForeground1,
113
+ actionLink: fluentApple.communicationBlue,
114
+ link: fluentApple.communicationBlue,
115
+ linkHovered: fluentApple.communicationBlue,
116
+ linkPressed: fluentApple.communicationBlueTint10,
117
+ /* ControlColorTokens */
118
+ // Default values without any style
119
+ // on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
120
+ defaultBackground: 'transparent',
121
+ defaultBorder: fluentApple.communicationBlueTint10,
122
+ defaultContent: fluentApple.communicationBlue,
123
+ defaultIcon: fluentApple.communicationBlue,
124
+ defaultHoveredBackground: 'transparent',
125
+ defaultHoveredBorder: fluentApple.communicationBlueTint10,
126
+ defaultHoveredContent: fluentApple.communicationBlue,
127
+ defaultHoveredIcon: fluentApple.communicationBlue,
128
+ defaultFocusedBackground: 'transparent',
129
+ defaultFocusedBorder: fluentApple.communicationBlueTint10,
130
+ defaultFocusedContent: fluentApple.communicationBlue,
131
+ defaultFocusedIcon: fluentApple.communicationBlue,
132
+ defaultPressedBackground: 'transparent',
133
+ defaultPressedBorder: fluentApple.communicationBlueTint30,
134
+ defaultPressedContent: fluentApple.communicationBlueTint20,
135
+ defaultPressedIcon: fluentApple.communicationBlueTint20,
136
+ defaultDisabledBackground: 'transparent',
137
+ defaultDisabledBorder: fluent2AliasColorTokens.neutralBackgroundDisabled,
138
+ defaultDisabledContent: fluentApple.buttonTitleDisabled,
139
+ defaultDisabledIcon: fluentApple.buttonTitleDisabled,
140
+ ghostBackground: 'transparent',
141
+ ghostBorder: 'transparent',
142
+ ghostContent: fluentApple.communicationBlue,
143
+ ghostIcon: fluentApple.communicationBlue,
144
+ ghostHoveredBackground: 'transparent',
145
+ ghostHoveredBorder: 'transparent',
146
+ ghostHoveredContent: fluentApple.communicationBlue,
147
+ ghostHoveredIcon: fluentApple.communicationBlue,
148
+ ghostFocusedBackground: 'transparent',
149
+ ghostFocusedBorder: 'transparent',
150
+ ghostFocusedContent: fluentApple.communicationBlue,
151
+ ghostFocusedIcon: fluentApple.communicationBlue,
152
+ ghostPressedBackground: 'transparent',
153
+ ghostPressedBorder: 'transparent',
154
+ ghostPressedContent: fluentApple.communicationBlueTint20,
155
+ ghostPressedIcon: fluentApple.communicationBlueTint20,
156
+ ghostDisabledBackground: 'transparent',
157
+ ghostDisabledBorder: 'transparent',
158
+ ghostDisabledContent: fluentApple.buttonTitleDisabled,
159
+ ghostDisabledIcon: fluentApple.buttonTitleDisabled,
160
+ brandedBackground: fluentApple.communicationBlue,
161
+ brandedDisabledBorder: 'transparent',
162
+ defaultCheckedBackground: 'transparent',
163
+ defaultCheckedContent: fluentApple.communicationBlue,
164
+ defaultCheckedHoveredBackground: 'transparent',
165
+ defaultCheckedHoveredContent: fluentApple.communicationBlue,
166
+ ghostCheckedBackground: 'transparent',
167
+ ghostCheckedContent: fluentApple.communicationBlue,
168
+ ghostCheckedHoveredBackground: 'transparent',
169
+ ghostCheckedHoveredContent: fluentApple.communicationBlue,
170
+ ghostCheckedHoveredBorder: 'transparent',
171
+ // Buttons on iOS don't have secondary text, so map these to be the same as the normal content
172
+ ghostSecondaryContent: fluentApple.communicationBlue,
173
+ ghostFocusedSecondaryContent: fluentApple.communicationBlue,
174
+ ghostHoveredSecondaryContent: fluentApple.communicationBlue,
175
+ ghostPressedSecondaryContent: fluentApple.communicationBlueTint20,
176
+ brandedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
177
+ brandedFocusedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
178
+ brandedHoveredSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
179
+ brandedPressedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
180
+ defaultHoveredSecondaryContent: fluentApple.communicationBlue,
181
+ defaultPressedSecondaryContent: fluentApple.communicationBlueTint20,
182
+ checkboxBackground: fluentApple.communicationBlue,
183
+ checkboxBackgroundDisabled: fluent2AliasColorTokens.neutralBackground1,
184
+ checkboxBorderColor: theme_tokens_1.globalTokens.color.grey26,
185
+ checkmarkColor: fluent2AliasColorTokens.neutralForegroundOnColor,
186
+ personaActivityGlow: 'transparent',
187
+ personaActivityRing: fluent2AliasColorTokens.neutralBackground1,
188
+ };
189
189
  }
190
- exports.paletteFromAppleColors = paletteFromAppleColors;
191
- //# sourceMappingURL=appleColors.ios.js.map
190
+ //# sourceMappingURL=appleColors.ios.js.map