@fluentui-react-native/apple-theme 0.28.2 → 0.28.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.
- package/CHANGELOG.json +66 -1
- package/CHANGELOG.md +18 -2
- package/eslint.config.js +3 -0
- package/lib/__tests__/apple-theme.test.js +24 -66
- package/lib/__tests__/apple-theme.test.js.map +1 -1
- package/lib/appleColors.ios.js +131 -20
- package/lib/appleColors.ios.js.map +1 -1
- package/lib/appleColors.macos.js +129 -18
- package/lib/appleColors.macos.js.map +1 -1
- package/lib/appleShadows.ios.js +2 -2
- package/lib/appleShadows.ios.js.map +1 -1
- package/lib/appleTheme.ios.js +2 -2
- package/lib/appleTheme.ios.js.map +1 -1
- package/lib/appleTheme.macos.js +2 -2
- package/lib/appleTheme.macos.js.map +1 -1
- package/lib/appleTypography.ios.js +18 -13
- package/lib/appleTypography.ios.js.map +1 -1
- package/lib/appleTypography.macos.js +1 -1
- package/lib/appleTypography.macos.js.map +1 -1
- package/lib/createAppleTheme.ios.js +6 -6
- package/lib/createAppleTheme.ios.js.map +1 -1
- package/lib/createAppleTheme.macos.js +7 -7
- package/lib/createAppleTheme.macos.js.map +1 -1
- package/lib/createFontAliasTokens.ios.js +1 -1
- package/lib/createFontAliasTokens.ios.js.map +1 -1
- package/lib/createMacOSAliasTokens.d.ts +1 -1
- package/lib/createMacOSAliasTokens.d.ts.map +1 -1
- package/lib/createMacOSAliasTokens.js +4 -4
- package/lib/createMacOSAliasTokens.js.map +1 -1
- package/lib/createiOSAliasTokens.d.ts +1 -1
- package/lib/createiOSAliasTokens.d.ts.map +1 -1
- package/lib/createiOSAliasTokens.js +4 -4
- package/lib/createiOSAliasTokens.js.map +1 -1
- package/lib-commonjs/__tests__/apple-theme.test.js +27 -69
- package/lib-commonjs/__tests__/apple-theme.test.js.map +1 -1
- package/lib-commonjs/appleColors.ios.js +135 -24
- package/lib-commonjs/appleColors.ios.js.map +1 -1
- package/lib-commonjs/appleColors.macos.js +132 -21
- package/lib-commonjs/appleColors.macos.js.map +1 -1
- package/lib-commonjs/appleHighContrast.macos.js +1 -1
- package/lib-commonjs/appleHighContrast.macos.js.map +1 -1
- package/lib-commonjs/appleShadows.ios.js +5 -5
- package/lib-commonjs/appleShadows.ios.js.map +1 -1
- package/lib-commonjs/appleShadows.macos.js +2 -2
- package/lib-commonjs/appleShadows.macos.js.map +1 -1
- package/lib-commonjs/appleTheme.ios.js +5 -5
- package/lib-commonjs/appleTheme.ios.js.map +1 -1
- package/lib-commonjs/appleTheme.macos.js +4 -4
- package/lib-commonjs/appleTheme.macos.js.map +1 -1
- package/lib-commonjs/appleTypography.ios.js +19 -14
- package/lib-commonjs/appleTypography.ios.js.map +1 -1
- package/lib-commonjs/appleTypography.macos.js +1 -1
- package/lib-commonjs/appleTypography.macos.js.map +1 -1
- package/lib-commonjs/createAppleTheme.ios.js +10 -10
- package/lib-commonjs/createAppleTheme.ios.js.map +1 -1
- package/lib-commonjs/createAppleTheme.js +2 -2
- package/lib-commonjs/createAppleTheme.js.map +1 -1
- package/lib-commonjs/createAppleTheme.macos.js +13 -13
- package/lib-commonjs/createAppleTheme.macos.js.map +1 -1
- package/lib-commonjs/createFontAliasTokens.ios.js +3 -3
- package/lib-commonjs/createFontAliasTokens.ios.js.map +1 -1
- package/lib-commonjs/createMacOSAliasTokens.d.ts +1 -1
- package/lib-commonjs/createMacOSAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createMacOSAliasTokens.js +5 -5
- package/lib-commonjs/createMacOSAliasTokens.js.map +1 -1
- package/lib-commonjs/createiOSAliasTokens.d.ts +1 -1
- package/lib-commonjs/createiOSAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createiOSAliasTokens.js +5 -5
- package/lib-commonjs/createiOSAliasTokens.js.map +1 -1
- package/lib-commonjs/getMacOSTokens.js +9 -9
- package/lib-commonjs/getMacOSTokens.js.map +1 -1
- package/package.json +35 -19
- package/src/createMacOSAliasTokens.ts +1 -1
- package/src/createiOSAliasTokens.ts +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,72 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/apple-theme",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 10 Jul 2025 20:30:46 GMT",
|
|
6
|
+
"version": "0.28.4",
|
|
7
|
+
"tag": "@fluentui-react-native/apple-theme_v0.28.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
12
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
13
|
+
"commit": "79bb06f6bbfd0a36f9d2ef371f4857be9660f027",
|
|
14
|
+
"comment": "Fixed `align-deps` warnings"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "jasonmo@microsoft.com",
|
|
18
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
19
|
+
"commit": "54087dca787180bbf34630470cd0d06e88366b30",
|
|
20
|
+
"comment": "update eslint to 9.x and use new flat config format with security rules"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "ruaraki@microsoft.com",
|
|
24
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
25
|
+
"commit": "a245202877ef7f2be9ab5f0e1356b2270957e693",
|
|
26
|
+
"comment": "Run bump-versions"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"patch": [
|
|
30
|
+
{
|
|
31
|
+
"author": "jasonmo@microsoft.com",
|
|
32
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
33
|
+
"commit": "479b93cea460a26df70c55b5d3335927ed374713",
|
|
34
|
+
"comment": "update builds to use node16 settings and modern export maps"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"date": "Thu, 10 Jul 2025 19:20:30 GMT",
|
|
41
|
+
"version": "0.28.3",
|
|
42
|
+
"tag": "@fluentui-react-native/apple-theme_v0.28.3",
|
|
43
|
+
"comments": {
|
|
44
|
+
"patch": [
|
|
45
|
+
{
|
|
46
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
47
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
48
|
+
"commit": "24b9abab3370f008afd2dbb304751fc9af6bec4a",
|
|
49
|
+
"comment": "Add support for React Native 0.74"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"date": "Wed, 11 Jun 2025 19:35:01 GMT",
|
|
56
|
+
"version": "0.28.2",
|
|
57
|
+
"tag": "@fluentui-react-native/apple-theme_v0.28.2",
|
|
58
|
+
"comments": {
|
|
59
|
+
"none": [
|
|
60
|
+
{
|
|
61
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
62
|
+
"package": "@fluentui-react-native/apple-theme",
|
|
63
|
+
"commit": "2342b87a20e5a584bd2073c8c5a266f0aa48c8bb",
|
|
64
|
+
"comment": "Added missing dev dependencies"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"date": "Wed, 29 Jan 2025 23:43:55 GMT",
|
|
6
71
|
"version": "0.28.2",
|
|
7
72
|
"tag": "@fluentui-react-native/apple-theme_v0.28.2",
|
|
8
73
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/apple-theme
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Thu, 10 Jul 2025 20:30:46 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.28.4
|
|
8
|
+
|
|
9
|
+
Thu, 10 Jul 2025 20:30:46 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- update builds to use node16 settings and modern export maps (jasonmo@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 0.28.3
|
|
16
|
+
|
|
17
|
+
Thu, 10 Jul 2025 19:20:30 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Add support for React Native 0.74 (4123478+tido64@users.noreply.github.com)
|
|
22
|
+
|
|
7
23
|
## 0.28.2
|
|
8
24
|
|
|
9
|
-
Wed, 29 Jan 2025 23:
|
|
25
|
+
Wed, 29 Jan 2025 23:43:55 GMT
|
|
10
26
|
|
|
11
27
|
### Patches
|
|
12
28
|
|
package/eslint.config.js
ADDED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
1
|
import { getIsHighContrast, setIsHighContrast } from '../appleHighContrast.macos';
|
|
38
2
|
import { createAppleTheme } from '../createAppleTheme';
|
|
39
3
|
import { createMacOSColorAliasTokens, createMacOSShadowAliasTokens } from '../createMacOSAliasTokens';
|
|
40
|
-
jest.mock('react-native-macos/Libraries/Components/AccessibilityInfo/AccessibilityInfo',
|
|
4
|
+
jest.mock('react-native-macos/Libraries/Components/AccessibilityInfo/AccessibilityInfo', () => ({
|
|
41
5
|
__esModule: true,
|
|
42
6
|
default: {
|
|
43
7
|
addEventListener: jest.fn(),
|
|
@@ -49,50 +13,44 @@ jest.mock('react-native-macos/Libraries/Components/AccessibilityInfo/Accessibili
|
|
|
49
13
|
isReduceMotionEnabled: jest.fn(),
|
|
50
14
|
prefersCrossFadeTransitions: jest.fn(),
|
|
51
15
|
isReduceTransparencyEnabled: jest.fn(),
|
|
52
|
-
isScreenReaderEnabled: jest.fn(
|
|
16
|
+
isScreenReaderEnabled: jest.fn(() => Promise.resolve(false)),
|
|
53
17
|
setAccessibilityFocus: jest.fn(),
|
|
54
18
|
sendAccessibilityEvent: jest.fn(),
|
|
55
19
|
getRecommendedTimeoutMillis: jest.fn(),
|
|
56
|
-
isHighContrastEnabled:
|
|
20
|
+
isHighContrastEnabled: () => Promise.resolve(false),
|
|
57
21
|
},
|
|
58
|
-
})
|
|
59
|
-
|
|
22
|
+
}));
|
|
23
|
+
const macOSAliasTokensTable = [
|
|
60
24
|
['light', true],
|
|
61
25
|
['light', false],
|
|
62
26
|
['dark', true],
|
|
63
27
|
['dark', false],
|
|
64
28
|
['highContrast', null],
|
|
65
29
|
];
|
|
66
|
-
it('createAppleTheme test',
|
|
67
|
-
|
|
30
|
+
it('createAppleTheme test', () => {
|
|
31
|
+
const appleTheme = createAppleTheme().theme;
|
|
68
32
|
expect(appleTheme).toMatchSnapshot();
|
|
69
33
|
});
|
|
70
|
-
it('IsHighContrast test',
|
|
34
|
+
it('IsHighContrast test', () => {
|
|
71
35
|
setIsHighContrast(false);
|
|
72
36
|
expect(getIsHighContrast()).toBe(false);
|
|
73
37
|
setIsHighContrast(true);
|
|
74
38
|
expect(getIsHighContrast()).toBe(true);
|
|
75
39
|
});
|
|
76
|
-
it.concurrent.each(macOSAliasTokensTable)('createMacOSColorAliasTokens test mode: %s, isHighContrast: %p',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
else {
|
|
93
|
-
expect(createMacOSShadowAliasTokens(mode, isHighContrast)).toMatchSnapshot();
|
|
94
|
-
}
|
|
95
|
-
return [2 /*return*/];
|
|
96
|
-
});
|
|
97
|
-
}); });
|
|
40
|
+
it.concurrent.each(macOSAliasTokensTable)('createMacOSColorAliasTokens test mode: %s, isHighContrast: %p', async (mode, isHighContrast) => {
|
|
41
|
+
if (mode === 'highContrast') {
|
|
42
|
+
expect(() => createMacOSColorAliasTokens(mode, isHighContrast)).toThrow();
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
expect(createMacOSColorAliasTokens(mode, isHighContrast)).toMatchSnapshot();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
it.concurrent.each(macOSAliasTokensTable)('createMacOSShadowAliasTokens test mode: %s, isHighContrast: %p', async (mode, isHighContrast) => {
|
|
49
|
+
if (mode === 'highContrast') {
|
|
50
|
+
expect(() => createMacOSShadowAliasTokens(mode, isHighContrast)).toThrow();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
expect(createMacOSShadowAliasTokens(mode, isHighContrast)).toMatchSnapshot();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
98
56
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"apple-theme.test.js","sourceRoot":"","sources":["../../src/__tests__/apple-theme.test.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAEtG,IAAI,CAAC,IAAI,CAAC,6EAA6E,EAA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C,qBAAqB,EAAE,GAAG,EAAE;IAC7B,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzB,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACxB,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CACvC,+DAA+D,EAC/D,KAAK,EAAE,IAAuB,EAAE,cAAuB,EAAE,EAAE;IACzD,IAAI,IAAI,KAAK,cAAc,EAAE;QAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;KAC3E;SAAM;QACL,MAAM,CAAC,2BAA2B,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;KAC7E;AACH,CAAC,CACF,CAAC;AAEF,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CACvC,gEAAgE,EAChE,KAAK,EAAE,IAAuB,EAAE,cAAuB,EAAE,EAAE;IACzD,IAAI,IAAI,KAAK,cAAc,EAAE;QAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;KAC5E;SAAM;QACL,MAAM,CAAC,4BAA4B,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;KAC9E;AACH,CAAC,CACF,CAAC"}
|
package/lib/appleColors.ios.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { Appearance } from 'react-native';
|
|
13
2
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
14
3
|
import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
|
|
@@ -53,24 +42,146 @@ function getFluentUIAppleDarkPalette() {
|
|
|
53
42
|
}
|
|
54
43
|
/** Creates a palette of colors for the apple theme, using the appropriate FluentUI Apple Palette based on appearance */
|
|
55
44
|
export function paletteFromAppleColors(isLightMode, isElevated) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
const fluentApple = isLightMode ? getFluentUIAppleLightPalette() : getFluentUIAppleDarkPalette();
|
|
46
|
+
const appearance = Appearance.getColorScheme();
|
|
47
|
+
let mode = getCurrentAppearance(appearance, 'light');
|
|
59
48
|
if (mode === 'dark' && isElevated) {
|
|
60
49
|
mode = 'darkElevated';
|
|
61
50
|
}
|
|
62
|
-
|
|
63
|
-
return
|
|
51
|
+
const fluent2AliasColorTokens = createiOSColorAliasTokens(mode);
|
|
52
|
+
return {
|
|
53
|
+
/* Color Alias Tokens */
|
|
54
|
+
...fluent2AliasColorTokens,
|
|
64
55
|
/* PaletteBackgroundColors & PaletteTextColors */
|
|
65
|
-
background: fluent2AliasColorTokens.neutralBackground1,
|
|
56
|
+
background: fluent2AliasColorTokens.neutralBackground1,
|
|
57
|
+
bodyStandoutBackground: fluent2AliasColorTokens.neutralBackground4,
|
|
58
|
+
bodyFrameBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
59
|
+
bodyFrameDivider: fluent2AliasColorTokens.neutralStroke2,
|
|
60
|
+
bodyText: fluent2AliasColorTokens.neutralForeground1,
|
|
61
|
+
bodyTextChecked: fluent2AliasColorTokens.neutralForeground1,
|
|
62
|
+
subText: fluent2AliasColorTokens.neutralForeground3,
|
|
63
|
+
bodyDivider: fluent2AliasColorTokens.neutralStroke1,
|
|
64
|
+
disabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
65
|
+
disabledText: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
66
|
+
disabledBodyText: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
67
|
+
focusBorder: 'transparent',
|
|
68
|
+
variantBorder: fluent2AliasColorTokens.neutralStroke2,
|
|
69
|
+
errorText: fluentApple.dangerPrimary,
|
|
70
|
+
inputBorder: fluent2AliasColorTokens.neutralStroke2,
|
|
71
|
+
inputBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
72
|
+
inputFocusBorderAlt: fluent2AliasColorTokens.neutralStroke1,
|
|
73
|
+
inputText: fluent2AliasColorTokens.neutralForeground1,
|
|
74
|
+
inputPlaceholderText: fluent2AliasColorTokens.neutralForeground3,
|
|
66
75
|
// Default values without any style
|
|
67
76
|
// on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
|
|
68
|
-
buttonBackground: 'transparent',
|
|
77
|
+
buttonBackground: 'transparent',
|
|
78
|
+
buttonBackgroundChecked: 'transparent',
|
|
79
|
+
buttonBackgroundHovered: 'transparent',
|
|
80
|
+
buttonBackgroundPressed: 'transparent',
|
|
81
|
+
buttonBackgroundDisabled: 'transparent',
|
|
82
|
+
buttonBorder: fluentApple.communicationBlueTint10,
|
|
83
|
+
buttonText: fluentApple.communicationBlue,
|
|
84
|
+
buttonTextHovered: fluentApple.communicationBlue,
|
|
85
|
+
buttonTextChecked: fluentApple.communicationBlue,
|
|
86
|
+
buttonTextPressed: fluentApple.communicationBlueTint20,
|
|
87
|
+
buttonTextDisabled: fluentApple.buttonTitleDisabled,
|
|
88
|
+
buttonBorderDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
89
|
+
buttonBorderFocused: fluentApple.communicationBlueTint10,
|
|
90
|
+
primaryButtonBackground: fluentApple.communicationBlue,
|
|
91
|
+
primaryButtonBackgroundHovered: fluentApple.communicationBlue,
|
|
92
|
+
primaryButtonBackgroundPressed: fluentApple.buttonBackgroundFilledPressed,
|
|
93
|
+
primaryButtonBackgroundDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
94
|
+
primaryButtonBorder: 'transparent',
|
|
95
|
+
primaryButtonBorderFocused: 'transparent',
|
|
96
|
+
primaryButtonText: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
97
|
+
primaryButtonTextHovered: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
98
|
+
primaryButtonTextPressed: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
99
|
+
primaryButtonTextDisabled: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
100
|
+
accentButtonBackground: fluentApple.communicationBlue,
|
|
101
|
+
menuBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
102
|
+
menuDivider: fluent2AliasColorTokens.neutralStroke2,
|
|
103
|
+
menuIcon: fluent2AliasColorTokens.neutralForeground3,
|
|
104
|
+
menuItemBackgroundHovered: fluent2AliasColorTokens.neutralBackground1,
|
|
105
|
+
menuItemBackgroundPressed: fluent2AliasColorTokens.neutralBackground1,
|
|
106
|
+
menuItemText: fluent2AliasColorTokens.neutralForeground1,
|
|
107
|
+
menuItemTextHovered: fluent2AliasColorTokens.neutralForeground1,
|
|
108
|
+
listHeaderBackgroundHovered: fluent2AliasColorTokens.neutralForeground1,
|
|
109
|
+
listHeaderBackgroundPressed: fluent2AliasColorTokens.neutralForeground1,
|
|
110
|
+
actionLink: fluentApple.communicationBlue,
|
|
111
|
+
link: fluentApple.communicationBlue,
|
|
112
|
+
linkHovered: fluentApple.communicationBlue,
|
|
113
|
+
linkPressed: fluentApple.communicationBlueTint10,
|
|
69
114
|
/* ControlColorTokens */
|
|
70
115
|
// Default values without any style
|
|
71
116
|
// on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
|
|
72
|
-
defaultBackground: 'transparent',
|
|
117
|
+
defaultBackground: 'transparent',
|
|
118
|
+
defaultBorder: fluentApple.communicationBlueTint10,
|
|
119
|
+
defaultContent: fluentApple.communicationBlue,
|
|
120
|
+
defaultIcon: fluentApple.communicationBlue,
|
|
121
|
+
defaultHoveredBackground: 'transparent',
|
|
122
|
+
defaultHoveredBorder: fluentApple.communicationBlueTint10,
|
|
123
|
+
defaultHoveredContent: fluentApple.communicationBlue,
|
|
124
|
+
defaultHoveredIcon: fluentApple.communicationBlue,
|
|
125
|
+
defaultFocusedBackground: 'transparent',
|
|
126
|
+
defaultFocusedBorder: fluentApple.communicationBlueTint10,
|
|
127
|
+
defaultFocusedContent: fluentApple.communicationBlue,
|
|
128
|
+
defaultFocusedIcon: fluentApple.communicationBlue,
|
|
129
|
+
defaultPressedBackground: 'transparent',
|
|
130
|
+
defaultPressedBorder: fluentApple.communicationBlueTint30,
|
|
131
|
+
defaultPressedContent: fluentApple.communicationBlueTint20,
|
|
132
|
+
defaultPressedIcon: fluentApple.communicationBlueTint20,
|
|
133
|
+
defaultDisabledBackground: 'transparent',
|
|
134
|
+
defaultDisabledBorder: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
135
|
+
defaultDisabledContent: fluentApple.buttonTitleDisabled,
|
|
136
|
+
defaultDisabledIcon: fluentApple.buttonTitleDisabled,
|
|
137
|
+
ghostBackground: 'transparent',
|
|
138
|
+
ghostBorder: 'transparent',
|
|
139
|
+
ghostContent: fluentApple.communicationBlue,
|
|
140
|
+
ghostIcon: fluentApple.communicationBlue,
|
|
141
|
+
ghostHoveredBackground: 'transparent',
|
|
142
|
+
ghostHoveredBorder: 'transparent',
|
|
143
|
+
ghostHoveredContent: fluentApple.communicationBlue,
|
|
144
|
+
ghostHoveredIcon: fluentApple.communicationBlue,
|
|
145
|
+
ghostFocusedBackground: 'transparent',
|
|
146
|
+
ghostFocusedBorder: 'transparent',
|
|
147
|
+
ghostFocusedContent: fluentApple.communicationBlue,
|
|
148
|
+
ghostFocusedIcon: fluentApple.communicationBlue,
|
|
149
|
+
ghostPressedBackground: 'transparent',
|
|
150
|
+
ghostPressedBorder: 'transparent',
|
|
151
|
+
ghostPressedContent: fluentApple.communicationBlueTint20,
|
|
152
|
+
ghostPressedIcon: fluentApple.communicationBlueTint20,
|
|
153
|
+
ghostDisabledBackground: 'transparent',
|
|
154
|
+
ghostDisabledBorder: 'transparent',
|
|
155
|
+
ghostDisabledContent: fluentApple.buttonTitleDisabled,
|
|
156
|
+
ghostDisabledIcon: fluentApple.buttonTitleDisabled,
|
|
157
|
+
brandedBackground: fluentApple.communicationBlue,
|
|
158
|
+
brandedDisabledBorder: 'transparent',
|
|
159
|
+
defaultCheckedBackground: 'transparent',
|
|
160
|
+
defaultCheckedContent: fluentApple.communicationBlue,
|
|
161
|
+
defaultCheckedHoveredBackground: 'transparent',
|
|
162
|
+
defaultCheckedHoveredContent: fluentApple.communicationBlue,
|
|
163
|
+
ghostCheckedBackground: 'transparent',
|
|
164
|
+
ghostCheckedContent: fluentApple.communicationBlue,
|
|
165
|
+
ghostCheckedHoveredBackground: 'transparent',
|
|
166
|
+
ghostCheckedHoveredContent: fluentApple.communicationBlue,
|
|
167
|
+
ghostCheckedHoveredBorder: 'transparent',
|
|
73
168
|
// Buttons on iOS don't have secondary text, so map these to be the same as the normal content
|
|
74
|
-
ghostSecondaryContent: fluentApple.communicationBlue,
|
|
169
|
+
ghostSecondaryContent: fluentApple.communicationBlue,
|
|
170
|
+
ghostFocusedSecondaryContent: fluentApple.communicationBlue,
|
|
171
|
+
ghostHoveredSecondaryContent: fluentApple.communicationBlue,
|
|
172
|
+
ghostPressedSecondaryContent: fluentApple.communicationBlueTint20,
|
|
173
|
+
brandedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
174
|
+
brandedFocusedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
175
|
+
brandedHoveredSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
176
|
+
brandedPressedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
177
|
+
defaultHoveredSecondaryContent: fluentApple.communicationBlue,
|
|
178
|
+
defaultPressedSecondaryContent: fluentApple.communicationBlueTint20,
|
|
179
|
+
checkboxBackground: fluentApple.communicationBlue,
|
|
180
|
+
checkboxBackgroundDisabled: fluent2AliasColorTokens.neutralBackground1,
|
|
181
|
+
checkboxBorderColor: globalTokens.color.grey26,
|
|
182
|
+
checkmarkColor: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
183
|
+
personaActivityGlow: 'transparent',
|
|
184
|
+
personaActivityRing: fluent2AliasColorTokens.neutralBackground1,
|
|
185
|
+
};
|
|
75
186
|
}
|
|
76
187
|
//# sourceMappingURL=appleColors.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appleColors.ios.js","sourceRoot":"","sources":["../src/appleColors.ios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appleColors.ios.js","sourceRoot":"","sources":["../src/appleColors.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,2DAA2D;AAC3D,SAAS,4BAA4B;IACnC,OAAO;QACL,iBAAiB,EAAE,SAAS;QAC5B,uBAAuB,EAAE,SAAS;QAClC,uBAAuB,EAAE,SAAS;QAClC,uBAAuB,EAAE,SAAS;QAClC,aAAa,EAAE,SAAS;QACxB,YAAY,EAAE,SAAS;QACvB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,SAAS;QACxB,cAAc,EAAE,SAAS;QACzB,aA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AW,CAAC,iBAAiB;QAE3D,sBAAsB,EAAE,aAAa;QACrC,mBAAmB,EAAE,WAAW,CAAC,iBAAiB;QAClD,6BAA6B,EAAE,aAAa;QAC5C,0BAA0B,EAAE,WAAW,CAAC,iBAAiB;QACzD,yBAAyB,EAAE,aAAa;QAExC,8FAA8F;QAC9F,qBAAqB,EAAE,WAAW,CAAC,iBAAiB;QACpD,4BAA4B,EAAE,WAAW,CAAC,iBAAiB;QAC3D,4BAA4B,EAAE,WAAW,CAAC,iBAAiB;QAC3D,4BAA4B,EAAE,WAAW,CAAC,uBAAuB;QAEjE,uBAAuB,EAAE,uBAAuB,CAAC,wBAAwB;QACzE,8BAA8B,EAAE,uBAAuB,CAAC,wBAAwB;QAChF,8BAA8B,EAAE,uBAAuB,CAAC,wBAAwB;QAChF,8BAA8B,EAAE,uBAAuB,CAAC,wBAAwB;QAEhF,8BAA8B,EAAE,WAAW,CAAC,iBAAiB;QAC7D,8BAA8B,EAAE,WAAW,CAAC,uBAAuB;QAEnE,kBAAkB,EAAE,WAAW,CAAC,iBAAiB;QACjD,0BAA0B,EAAE,uBAAuB,CAAC,kBAAkB;QACtE,mBAAmB,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM;QAC9C,cAAc,EAAE,uBAAuB,CAAC,wBAAwB;QAEhE,mBAAmB,EAAE,aAAa;QAClC,mBAAmB,EAAE,uBAAuB,CAAC,kBAAkB;KAChE,CAAC;AACJ,CAAC"}
|
package/lib/appleColors.macos.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
2
|
// @ts-ignore
|
|
14
3
|
import { PlatformColor, DynamicColorMacOS, ColorWithSystemEffectMacOS } from 'react-native-macos';
|
|
@@ -256,16 +245,138 @@ function getFluentUIApplePalette() {
|
|
|
256
245
|
* The fallback palette is loaded while we wait for the native theming module to load, or if the module is not found
|
|
257
246
|
*/
|
|
258
247
|
export function fallbackApplePalette(mode) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return
|
|
248
|
+
const fluentUIApple = getFluentUIApplePalette();
|
|
249
|
+
const applePlatform = getAppleSemanticPalette();
|
|
250
|
+
const macOSAliasColorTokens = createMacOSColorAliasTokens(mode, getIsHighContrast());
|
|
251
|
+
return {
|
|
252
|
+
...macOSAliasColorTokens,
|
|
263
253
|
/* PaletteBackgroundColors & PaletteTextColors */
|
|
264
|
-
background: applePlatform.windowBackgroundColor,
|
|
254
|
+
background: applePlatform.windowBackgroundColor,
|
|
255
|
+
bodyStandoutBackground: applePlatform.underPageBackgroundColor,
|
|
256
|
+
bodyFrameBackground: applePlatform.windowBackgroundColor,
|
|
257
|
+
bodyFrameDivider: applePlatform.separatorColor,
|
|
258
|
+
bodyText: applePlatform.labelColor,
|
|
259
|
+
bodyTextChecked: applePlatform.labelColor,
|
|
260
|
+
subText: applePlatform.secondaryLabelColor,
|
|
261
|
+
bodyDivider: applePlatform.separatorColor,
|
|
262
|
+
disabledBackground: fluentUIApple.gray100,
|
|
263
|
+
disabledText: applePlatform.tertiaryLabelColor,
|
|
264
|
+
disabledBodyText: applePlatform.tertiaryLabelColor,
|
|
265
|
+
focusBorder: 'transparent',
|
|
266
|
+
variantBorder: applePlatform.separatorColor,
|
|
267
|
+
errorText: fluentUIApple.dangerPrimary,
|
|
268
|
+
inputBorder: applePlatform.separatorColor,
|
|
269
|
+
inputBackground: applePlatform.textBackgroundColor,
|
|
270
|
+
inputFocusBorderAlt: applePlatform.keyboardFocusIndicatorColor,
|
|
271
|
+
inputText: applePlatform.textColor,
|
|
272
|
+
inputPlaceholderText: applePlatform.placeholderTextColor,
|
|
265
273
|
// Set the default button tokens to match the Acrylic Button style
|
|
266
|
-
buttonBackground: macOSAliasColorTokens.neutralBackground1,
|
|
274
|
+
buttonBackground: macOSAliasColorTokens.neutralBackground1,
|
|
275
|
+
buttonBackgroundChecked: macOSAliasColorTokens.neutralBackground3,
|
|
276
|
+
buttonBackgroundHovered: macOSAliasColorTokens.neutralBackground3,
|
|
277
|
+
buttonBackgroundPressed: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralBackground3, 'pressed'),
|
|
278
|
+
buttonBackgroundDisabled: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralBackground3, 'disabled'),
|
|
279
|
+
buttonBorder: macOSAliasColorTokens.transparentStroke,
|
|
280
|
+
buttonText: macOSAliasColorTokens.neutralForeground3,
|
|
281
|
+
buttonTextHovered: macOSAliasColorTokens.neutralForeground3,
|
|
282
|
+
buttonTextChecked: macOSAliasColorTokens.neutralForeground3,
|
|
283
|
+
buttonTextPressed: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralForeground3, 'pressed'),
|
|
284
|
+
buttonTextDisabled: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralForeground3, 'disabled'),
|
|
285
|
+
buttonBorderDisabled: macOSAliasColorTokens.transparentBackground,
|
|
286
|
+
buttonBorderFocused: macOSAliasColorTokens.transparentBackground,
|
|
287
|
+
primaryButtonBackground: fluentUIApple.communicationBlue,
|
|
288
|
+
primaryButtonBackgroundHovered: fluentUIApple.communicationBlue,
|
|
289
|
+
primaryButtonBackgroundPressed: macOSAliasColorTokens.brandBackgroundPressed,
|
|
290
|
+
primaryButtonBackgroundDisabled: macOSAliasColorTokens.neutralBackgroundDisabled,
|
|
291
|
+
primaryButtonBorder: 'transparent',
|
|
292
|
+
primaryButtonBorderFocused: 'transparent',
|
|
293
|
+
primaryButtonText: macOSAliasColorTokens.neutralForegroundInverted,
|
|
294
|
+
primaryButtonTextHovered: macOSAliasColorTokens.neutralForegroundInverted,
|
|
295
|
+
primaryButtonTextPressed: macOSAliasColorTokens.neutralForegroundInverted,
|
|
296
|
+
primaryButtonTextDisabled: macOSAliasColorTokens.brandForeground1Disabled,
|
|
297
|
+
accentButtonBackground: fluentUIApple.communicationBlue,
|
|
298
|
+
menuBackground: 'transparent',
|
|
299
|
+
menuDivider: applePlatform.separatorColor,
|
|
300
|
+
menuIcon: macOSAliasColorTokens.neutralForeground3,
|
|
301
|
+
menuItemBackgroundHovered: applePlatform.controlAccentColor,
|
|
302
|
+
menuItemBackgroundPressed: ColorWithSystemEffectMacOS(applePlatform.controlAccentColor, 'pressed'),
|
|
303
|
+
menuItemText: applePlatform.labelColor,
|
|
304
|
+
menuItemTextHovered: 'white',
|
|
305
|
+
listHeaderBackgroundHovered: applePlatform.headerTextColor,
|
|
306
|
+
listHeaderBackgroundPressed: applePlatform.headerTextColor,
|
|
307
|
+
actionLink: applePlatform.linkColor,
|
|
308
|
+
link: applePlatform.linkColor,
|
|
309
|
+
linkHovered: applePlatform.linkColor,
|
|
310
|
+
linkPressed: applePlatform.selectedControlColor,
|
|
267
311
|
/* ControlColorTokens */
|
|
268
312
|
// Set the default button tokens to match the Acrylic Button style
|
|
269
|
-
defaultBackground: macOSAliasColorTokens.neutralBackground2,
|
|
313
|
+
defaultBackground: macOSAliasColorTokens.neutralBackground2,
|
|
314
|
+
defaultBorder: macOSAliasColorTokens.neutralStroke2,
|
|
315
|
+
defaultContent: macOSAliasColorTokens.neutralForeground2,
|
|
316
|
+
defaultIcon: macOSAliasColorTokens.neutralForeground3,
|
|
317
|
+
defaultHoveredBackground: macOSAliasColorTokens.neutralBackground3,
|
|
318
|
+
defaultHoveredBorder: macOSAliasColorTokens.neutralStroke2,
|
|
319
|
+
defaultHoveredContent: macOSAliasColorTokens.neutralForeground3,
|
|
320
|
+
defaultHoveredIcon: macOSAliasColorTokens.neutralForeground3,
|
|
321
|
+
defaultFocusedBackground: macOSAliasColorTokens.neutralBackground2,
|
|
322
|
+
defaultFocusedBorder: macOSAliasColorTokens.neutralStroke2,
|
|
323
|
+
defaultFocusedContent: macOSAliasColorTokens.neutralForeground2,
|
|
324
|
+
defaultFocusedIcon: macOSAliasColorTokens.neutralForeground3,
|
|
325
|
+
defaultPressedBackground: macOSAliasColorTokens.neutralBackground2Pressed,
|
|
326
|
+
defaultPressedBorder: macOSAliasColorTokens.neutralStroke2,
|
|
327
|
+
defaultPressedContent: macOSAliasColorTokens.neutralForeground2,
|
|
328
|
+
defaultPressedIcon: macOSAliasColorTokens.neutralForeground3,
|
|
329
|
+
defaultDisabledBackground: macOSAliasColorTokens.neutralBackground2,
|
|
330
|
+
defaultDisabledBorder: macOSAliasColorTokens.neutralStroke2,
|
|
331
|
+
defaultDisabledContent: macOSAliasColorTokens.neutralForegroundDisabled,
|
|
332
|
+
defaultDisabledIcon: macOSAliasColorTokens.neutralForeground3,
|
|
333
|
+
ghostBackground: 'transparent',
|
|
334
|
+
ghostBorder: 'transparent',
|
|
335
|
+
ghostContent: fluentUIApple.communicationBlue,
|
|
336
|
+
ghostIcon: fluentUIApple.communicationBlue,
|
|
337
|
+
ghostHoveredBackground: 'transparent',
|
|
338
|
+
ghostHoveredBorder: 'transparent',
|
|
339
|
+
ghostHoveredContent: fluentUIApple.communicationBlue,
|
|
340
|
+
ghostHoveredIcon: fluentUIApple.communicationBlue,
|
|
341
|
+
ghostFocusedBackground: 'transparent',
|
|
342
|
+
ghostFocusedBorder: 'transparent',
|
|
343
|
+
ghostFocusedContent: fluentUIApple.communicationBlue,
|
|
344
|
+
ghostFocusedIcon: fluentUIApple.communicationBlue,
|
|
345
|
+
ghostPressedBackground: 'transparent',
|
|
346
|
+
ghostPressedBorder: 'transparent',
|
|
347
|
+
ghostPressedContent: macOSAliasColorTokens.brandForeground1Pressed,
|
|
348
|
+
ghostPressedIcon: macOSAliasColorTokens.neutralForeground3,
|
|
349
|
+
ghostDisabledBackground: 'transparent',
|
|
350
|
+
ghostDisabledBorder: 'transparent',
|
|
351
|
+
ghostDisabledContent: macOSAliasColorTokens.brandForeground1Disabled,
|
|
352
|
+
ghostDisabledIcon: macOSAliasColorTokens.brandForeground1Disabled,
|
|
353
|
+
brandedBackground: macOSAliasColorTokens.brandBackground,
|
|
354
|
+
brandedDisabledBorder: 'transparent',
|
|
355
|
+
defaultCheckedBackground: fluentUIApple.communicationBlue,
|
|
356
|
+
defaultCheckedContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
357
|
+
defaultCheckedHoveredBackground: fluentUIApple.communicationBlue,
|
|
358
|
+
defaultCheckedHoveredContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
359
|
+
ghostCheckedBackground: 'transparent',
|
|
360
|
+
ghostCheckedContent: fluentUIApple.communicationBlue,
|
|
361
|
+
ghostCheckedHoveredBackground: 'transparent',
|
|
362
|
+
ghostCheckedHoveredContent: fluentUIApple.communicationBlue,
|
|
363
|
+
ghostCheckedHoveredBorder: 'transparent',
|
|
364
|
+
ghostSecondaryContent: fluentUIApple.communicationBlue,
|
|
365
|
+
ghostFocusedSecondaryContent: fluentUIApple.communicationBlue,
|
|
366
|
+
ghostHoveredSecondaryContent: fluentUIApple.communicationBlue,
|
|
367
|
+
ghostPressedSecondaryContent: ColorWithSystemEffectMacOS(fluentUIApple.communicationBlue, 'deepPressed'),
|
|
368
|
+
brandedSecondaryContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
369
|
+
brandedFocusedSecondaryContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
370
|
+
brandedHoveredSecondaryContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
371
|
+
brandedPressedSecondaryContent: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralForegroundInverted, 'pressed'),
|
|
372
|
+
defaultHoveredSecondaryContent: macOSAliasColorTokens.neutralForeground3,
|
|
373
|
+
defaultPressedSecondaryContent: macOSAliasColorTokens.neutralForegroundInverted,
|
|
374
|
+
checkboxBackground: fluentUIApple.communicationBlue,
|
|
375
|
+
checkboxBackgroundDisabled: macOSAliasColorTokens.neutralBackgroundDisabled,
|
|
376
|
+
checkboxBorderColor: fluentUIApple.gray600,
|
|
377
|
+
checkmarkColor: macOSAliasColorTokens.neutralForegroundInverted,
|
|
378
|
+
personaActivityRing: macOSAliasColorTokens.neutralForegroundInverted,
|
|
379
|
+
personaActivityGlow: fluentUIApple.red10,
|
|
380
|
+
};
|
|
270
381
|
}
|
|
271
382
|
//# sourceMappingURL=appleColors.macos.js.map
|