@fluentui-react-native/apple-theme 0.29.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/lib/__tests__/apple-theme.test.d.ts +1 -1
- package/lib/__tests__/apple-theme.test.js +41 -42
- package/lib/appleColors.ios.d.ts +1 -1
- package/lib/appleColors.ios.js +174 -174
- package/lib/appleColors.macos.d.ts +1 -1
- package/lib/appleColors.macos.js +367 -367
- package/lib/appleColors.types.ios.d.ts +15 -15
- package/lib/appleColors.types.ios.js +1 -1
- package/lib/appleColors.types.macos.d.ts +146 -146
- package/lib/appleColors.types.macos.js +1 -1
- package/lib/appleHighContrast.macos.d.ts +1 -1
- package/lib/appleHighContrast.macos.js +3 -3
- package/lib/appleShadows.ios.d.ts +1 -1
- package/lib/appleShadows.ios.js +4 -4
- package/lib/appleShadows.macos.d.ts +1 -1
- package/lib/appleShadows.macos.js +2 -2
- package/lib/appleTheme.ios.d.ts +1 -1
- package/lib/appleTheme.ios.js +122 -122
- package/lib/appleTheme.macos.d.ts +53 -53
- package/lib/appleTheme.macos.js +68 -68
- package/lib/appleTypography.ios.d.ts +1 -1
- package/lib/appleTypography.ios.js +50 -50
- package/lib/appleTypography.macos.d.ts +2 -2
- package/lib/appleTypography.macos.js +63 -63
- package/lib/createAppleTheme.d.ts +1 -1
- package/lib/createAppleTheme.ios.d.ts +1 -1
- package/lib/createAppleTheme.ios.js +14 -14
- package/lib/createAppleTheme.js +3 -3
- package/lib/createAppleTheme.macos.d.ts +1 -1
- package/lib/createAppleTheme.macos.js +23 -23
- package/lib/createFontAliasTokens.ios.d.ts +1 -1
- package/lib/createFontAliasTokens.ios.js +2 -2
- package/lib/createMacOSAliasTokens.d.ts +1 -1
- package/lib/createMacOSAliasTokens.js +5 -5
- package/lib/createiOSAliasTokens.d.ts +1 -1
- package/lib/createiOSAliasTokens.js +5 -5
- package/lib/getMacOSTokens.d.ts +435 -443
- package/lib/getMacOSTokens.js +45 -35
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib-commonjs/__tests__/apple-theme.test.d.ts +1 -1
- package/lib-commonjs/__tests__/apple-theme.test.js +46 -47
- package/lib-commonjs/appleColors.ios.d.ts +1 -1
- package/lib-commonjs/appleColors.ios.js +180 -180
- package/lib-commonjs/appleColors.macos.d.ts +1 -1
- package/lib-commonjs/appleColors.macos.js +372 -378
- package/lib-commonjs/appleColors.types.ios.d.ts +15 -15
- package/lib-commonjs/appleColors.types.ios.js +3 -3
- package/lib-commonjs/appleColors.types.macos.d.ts +146 -146
- package/lib-commonjs/appleColors.types.macos.js +3 -3
- package/lib-commonjs/appleHighContrast.macos.d.ts +1 -1
- package/lib-commonjs/appleHighContrast.macos.js +6 -6
- package/lib-commonjs/appleShadows.ios.d.ts +1 -1
- package/lib-commonjs/appleShadows.ios.js +9 -9
- package/lib-commonjs/appleShadows.macos.d.ts +1 -1
- package/lib-commonjs/appleShadows.macos.js +6 -6
- package/lib-commonjs/appleTheme.ios.d.ts +1 -1
- package/lib-commonjs/appleTheme.ios.js +128 -128
- package/lib-commonjs/appleTheme.macos.d.ts +53 -53
- package/lib-commonjs/appleTheme.macos.js +74 -74
- package/lib-commonjs/appleTypography.ios.d.ts +1 -1
- package/lib-commonjs/appleTypography.ios.js +53 -53
- package/lib-commonjs/appleTypography.macos.d.ts +2 -2
- package/lib-commonjs/appleTypography.macos.js +65 -65
- package/lib-commonjs/createAppleTheme.d.ts +1 -1
- package/lib-commonjs/createAppleTheme.ios.d.ts +1 -1
- package/lib-commonjs/createAppleTheme.ios.js +20 -20
- package/lib-commonjs/createAppleTheme.js +7 -7
- package/lib-commonjs/createAppleTheme.macos.d.ts +1 -1
- package/lib-commonjs/createAppleTheme.macos.js +31 -31
- package/lib-commonjs/createFontAliasTokens.ios.d.ts +1 -1
- package/lib-commonjs/createFontAliasTokens.ios.js +10 -12
- package/lib-commonjs/createMacOSAliasTokens.d.ts +1 -1
- package/lib-commonjs/createMacOSAliasTokens.js +10 -10
- package/lib-commonjs/createiOSAliasTokens.d.ts +1 -1
- package/lib-commonjs/createiOSAliasTokens.js +10 -10
- package/lib-commonjs/getMacOSTokens.d.ts +435 -443
- package/lib-commonjs/getMacOSTokens.js +59 -51
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.js +10 -30
- package/package.json +20 -19
- package/src/appleTypography.macos.ts +1 -1
|
@@ -1,57 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
6
|
exports.getMacOSAliasTokens = getMacOSAliasTokens;
|
|
9
7
|
exports.getMacOSShadowTokens = getMacOSShadowTokens;
|
|
10
|
-
const tokens_aliases_json_1 = __importDefault(require(
|
|
11
|
-
const tokens_shadow_json_1 = __importDefault(require(
|
|
12
|
-
const tokens_aliases_json_2 = __importDefault(require(
|
|
13
|
-
const tokens_shadow_json_2 = __importDefault(require(
|
|
14
|
-
const tokens_aliases_json_3 = __importDefault(require(
|
|
15
|
-
const tokens_shadow_json_3 = __importDefault(require(
|
|
16
|
-
const tokens_aliases_json_4 = __importDefault(require(
|
|
17
|
-
const tokens_shadow_json_4 = __importDefault(require(
|
|
18
|
-
const assert_never_1 = require(
|
|
8
|
+
const tokens_aliases_json_1 = __importDefault(require("@fluentui-react-native/design-tokens-macos/dark/tokens-aliases.json"));
|
|
9
|
+
const tokens_shadow_json_1 = __importDefault(require("@fluentui-react-native/design-tokens-macos/dark/tokens-shadow.json"));
|
|
10
|
+
const tokens_aliases_json_2 = __importDefault(require("@fluentui-react-native/design-tokens-macos/hcdark/tokens-aliases.json"));
|
|
11
|
+
const tokens_shadow_json_2 = __importDefault(require("@fluentui-react-native/design-tokens-macos/hcdark/tokens-shadow.json"));
|
|
12
|
+
const tokens_aliases_json_3 = __importDefault(require("@fluentui-react-native/design-tokens-macos/hclight/tokens-aliases.json"));
|
|
13
|
+
const tokens_shadow_json_3 = __importDefault(require("@fluentui-react-native/design-tokens-macos/hclight/tokens-shadow.json"));
|
|
14
|
+
const tokens_aliases_json_4 = __importDefault(require("@fluentui-react-native/design-tokens-macos/light/tokens-aliases.json"));
|
|
15
|
+
const tokens_shadow_json_4 = __importDefault(require("@fluentui-react-native/design-tokens-macos/light/tokens-shadow.json"));
|
|
16
|
+
const assert_never_1 = require("assert-never");
|
|
19
17
|
function getMacOSAliasTokens(mode, isHighContrast) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
if (mode === 'light') {
|
|
19
|
+
if (isHighContrast) {
|
|
20
|
+
return tokens_aliases_json_3.default;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return tokens_aliases_json_4.default;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else if (mode === 'dark' || mode === 'darkElevated') {
|
|
27
|
+
if (isHighContrast) {
|
|
28
|
+
return tokens_aliases_json_2.default;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return tokens_aliases_json_1.default;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else if (mode === 'highContrast') {
|
|
35
|
+
throw new Error('highContrast is not a valid AppearanceOptions on macOS');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
(0, assert_never_1.assertNever)(mode);
|
|
39
|
+
}
|
|
37
40
|
}
|
|
38
41
|
function getMacOSShadowTokens(mode, isHighContrast) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
if (mode === 'light') {
|
|
43
|
+
if (isHighContrast) {
|
|
44
|
+
return tokens_shadow_json_3.default;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return tokens_shadow_json_4.default;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (mode === 'dark' || mode === 'darkElevated') {
|
|
51
|
+
if (isHighContrast) {
|
|
52
|
+
return tokens_shadow_json_2.default;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return tokens_shadow_json_1.default;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if (mode === 'highContrast') {
|
|
59
|
+
throw new Error('highContrast is not a valid AppearanceOptions on macOS');
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
(0, assert_never_1.assertNever)(mode);
|
|
63
|
+
}
|
|
56
64
|
}
|
|
57
|
-
//# sourceMappingURL=getMacOSTokens.js.map
|
|
65
|
+
//# sourceMappingURL=getMacOSTokens.js.map
|
package/lib-commonjs/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-commonjs/index.js
CHANGED
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setIsHighContrast = exports.getIsHighContrast = exports.createMacOSAliasTokens = exports.createAppleTheme = void 0;
|
|
4
|
-
const createAppleTheme_1 = require(
|
|
5
|
-
Object.defineProperty(exports,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(exports, 'createMacOSAliasTokens', {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return createMacOSAliasTokens_1.createMacOSColorAliasTokens;
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const appleHighContrast_macos_1 = require('./appleHighContrast.macos');
|
|
19
|
-
Object.defineProperty(exports, 'getIsHighContrast', {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return appleHighContrast_macos_1.getIsHighContrast;
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, 'setIsHighContrast', {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return appleHighContrast_macos_1.setIsHighContrast;
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
+
const createAppleTheme_1 = require("./createAppleTheme");
|
|
5
|
+
Object.defineProperty(exports, "createAppleTheme", { enumerable: true, get: function () { return createAppleTheme_1.createAppleTheme; } });
|
|
6
|
+
const createMacOSAliasTokens_1 = require("./createMacOSAliasTokens");
|
|
7
|
+
Object.defineProperty(exports, "createMacOSAliasTokens", { enumerable: true, get: function () { return createMacOSAliasTokens_1.createMacOSColorAliasTokens; } });
|
|
8
|
+
const appleHighContrast_macos_1 = require("./appleHighContrast.macos");
|
|
9
|
+
Object.defineProperty(exports, "getIsHighContrast", { enumerable: true, get: function () { return appleHighContrast_macos_1.getIsHighContrast; } });
|
|
10
|
+
Object.defineProperty(exports, "setIsHighContrast", { enumerable: true, get: function () { return appleHighContrast_macos_1.setIsHighContrast; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/apple-theme",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "A FluentUI React Native theme that pulls constants from FluentUI Apple",
|
|
5
5
|
"homepage": "https://github.com/microsoft/fluentui-react-native",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Microsoft <fluentuinativeowners@microsoft.com>",
|
|
6
8
|
"repository": {
|
|
7
9
|
"type": "git",
|
|
8
10
|
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
9
11
|
"directory": "packages/theming/apple-theme"
|
|
10
12
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
+
"main": "lib-commonjs/index.js",
|
|
14
|
+
"module": "lib/index.js",
|
|
15
|
+
"types": "lib/index.d.ts",
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
15
18
|
"types": "./lib/index.d.ts",
|
|
16
19
|
"import": "./lib/index.js",
|
|
17
|
-
"require": "./lib-commonjs/index.js"
|
|
20
|
+
"require": "./lib-commonjs/index.js",
|
|
21
|
+
"default": "./src/index.ts"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
|
-
"main": "lib-commonjs/index.js",
|
|
21
|
-
"module": "lib/index.js",
|
|
22
|
-
"types": "lib/index.d.ts",
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "fluentui-scripts build",
|
|
25
26
|
"build-cjs": "tsgo --outDir lib-commonjs",
|
|
26
|
-
"build-
|
|
27
|
+
"build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
|
|
27
28
|
"clean": "fluentui-scripts clean",
|
|
28
29
|
"depcheck": "fluentui-scripts depcheck",
|
|
29
30
|
"lint": "fluentui-scripts eslint",
|
|
30
31
|
"lint-package": "fluentui-scripts lint-package",
|
|
31
|
-
"
|
|
32
|
+
"format": "fluentui-scripts format",
|
|
32
33
|
"start": "fluentui-scripts dev",
|
|
33
34
|
"start-test": "fluentui-scripts jest-watch",
|
|
34
35
|
"test": "fluentui-scripts jest",
|
|
35
36
|
"update-snapshots": "fluentui-scripts jest -u"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@fluentui-react-native/default-theme": "0.27.
|
|
39
|
+
"@fluentui-react-native/default-theme": "0.27.1",
|
|
39
40
|
"@fluentui-react-native/design-tokens-ios": "^0.53.0",
|
|
40
41
|
"@fluentui-react-native/design-tokens-macos": "^0.53.0",
|
|
41
|
-
"@fluentui-react-native/experimental-appearance-additions": "0.8.
|
|
42
|
-
"@fluentui-react-native/framework-base": "0.3.
|
|
43
|
-
"@fluentui-react-native/theme": "0.12.
|
|
44
|
-
"@fluentui-react-native/theme-tokens": "0.28.
|
|
45
|
-
"@fluentui-react-native/theme-types": "0.44.
|
|
46
|
-
"@fluentui-react-native/theming-utils": "0.27.
|
|
42
|
+
"@fluentui-react-native/experimental-appearance-additions": "0.8.1",
|
|
43
|
+
"@fluentui-react-native/framework-base": "0.3.1",
|
|
44
|
+
"@fluentui-react-native/theme": "0.12.1",
|
|
45
|
+
"@fluentui-react-native/theme-tokens": "0.28.1",
|
|
46
|
+
"@fluentui-react-native/theme-types": "0.44.1",
|
|
47
|
+
"@fluentui-react-native/theming-utils": "0.27.1",
|
|
47
48
|
"assert-never": "^1.2.1"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@babel/core": "^7.20.0",
|
|
51
52
|
"@fluentui-react-native/babel-config": "0.1.1",
|
|
52
|
-
"@fluentui-react-native/eslint-config-rules": "0.1.
|
|
53
|
-
"@fluentui-react-native/jest-config": "0.1.
|
|
53
|
+
"@fluentui-react-native/eslint-config-rules": "0.1.2",
|
|
54
|
+
"@fluentui-react-native/jest-config": "0.1.0",
|
|
54
55
|
"@fluentui-react-native/kit-config": "0.1.2",
|
|
55
|
-
"@fluentui-react-native/scripts": "0.1.
|
|
56
|
+
"@fluentui-react-native/scripts": "0.1.0",
|
|
56
57
|
"@react-native-community/cli": "^20.0.0",
|
|
57
58
|
"@react-native-community/cli-platform-android": "^20.0.0",
|
|
58
59
|
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
@@ -2,7 +2,7 @@ import type { FontSize, FontSizes, FontWeightValue, Typography, Variants } from
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The Typography is designed to match the styles defined in the Apple HIG:
|
|
5
|
-
* https://developer.apple.com/design/human-interface-guidelines/
|
|
5
|
+
* https://developer.apple.com/design/human-interface-guidelines/typography
|
|
6
6
|
* These mappings and variants are subject to change as we moved to a unified cross platform Fluent typography ramp
|
|
7
7
|
* Github #598 also tracks pulling these values from a Native Module rather than hardcoding the numbers in JS.
|
|
8
8
|
*/
|