@fluentui-react-native/win32-theme 0.16.2 → 0.17.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.
- package/CHANGELOG.json +124 -1
- package/CHANGELOG.md +39 -2
- package/lib/createOfficeAliasTokens.d.ts +5 -3
- package/lib/createOfficeAliasTokens.d.ts.map +1 -1
- package/lib/createOfficeAliasTokens.js +9 -4
- package/lib/createOfficeAliasTokens.js.map +1 -1
- package/lib/createOfficeTheme.d.ts.map +1 -1
- package/lib/createOfficeTheme.js +7 -2
- package/lib/createOfficeTheme.js.map +1 -1
- package/lib/getOfficeTokens.d.ts +379 -0
- package/lib/getOfficeTokens.d.ts.map +1 -0
- package/lib/getOfficeTokens.js +39 -0
- package/lib/getOfficeTokens.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/createOfficeAliasTokens.d.ts +5 -3
- package/lib-commonjs/createOfficeAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createOfficeAliasTokens.js +10 -5
- package/lib-commonjs/createOfficeAliasTokens.js.map +1 -1
- package/lib-commonjs/createOfficeTheme.d.ts.map +1 -1
- package/lib-commonjs/createOfficeTheme.js +6 -1
- package/lib-commonjs/createOfficeTheme.js.map +1 -1
- package/lib-commonjs/getOfficeTokens.d.ts +379 -0
- package/lib-commonjs/getOfficeTokens.d.ts.map +1 -0
- package/lib-commonjs/getOfficeTokens.js +45 -0
- package/lib-commonjs/getOfficeTokens.js.map +1 -0
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -7
- package/src/createOfficeAliasTokens.ts +12 -5
- package/src/createOfficeTheme.ts +9 -2
- package/src/getOfficeTokens.ts +36 -0
- package/src/index.ts +1 -1
- package/lib/getOfficeAliasTokens.d.ts +0 -2
- package/lib/getOfficeAliasTokens.d.ts.map +0 -1
- package/lib/getOfficeAliasTokens.js +0 -20
- package/lib/getOfficeAliasTokens.js.map +0 -1
- package/lib-commonjs/getOfficeAliasTokens.d.ts +0 -2
- package/lib-commonjs/getOfficeAliasTokens.d.ts.map +0 -1
- package/lib-commonjs/getOfficeAliasTokens.js +0 -25
- package/lib-commonjs/getOfficeAliasTokens.js.map +0 -1
- package/src/getOfficeAliasTokens.ts +0 -18
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import colorfulAliasTokens from '@fluentui-react-native/design-tokens-win32/colorful/tokens-aliases.json';
|
|
2
|
+
import darkGrayAliasTokens from '@fluentui-react-native/design-tokens-win32/darkgray/tokens-aliases.json';
|
|
3
|
+
import blackAliasTokens from '@fluentui-react-native/design-tokens-win32/black/tokens-aliases.json';
|
|
4
|
+
import { hcAliasTokens } from './highContrast/tokens-alias';
|
|
5
|
+
import colorfulShadowTokens from '@fluentui-react-native/design-tokens-win32/colorful/tokens-shadow.json';
|
|
6
|
+
import darkGrayShadowTokens from '@fluentui-react-native/design-tokens-win32/darkgray/tokens-shadow.json';
|
|
7
|
+
import blackShadowTokens from '@fluentui-react-native/design-tokens-win32/black/tokens-shadow.json';
|
|
8
|
+
import hcShadowTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-shadow.json';
|
|
9
|
+
|
|
10
|
+
export function getOfficeAliasTokens(officeTheme: string) {
|
|
11
|
+
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
12
|
+
return colorfulAliasTokens;
|
|
13
|
+
} else if (officeTheme === 'DarkGray') {
|
|
14
|
+
return darkGrayAliasTokens;
|
|
15
|
+
} else if (officeTheme === 'Black') {
|
|
16
|
+
return blackAliasTokens;
|
|
17
|
+
} else if (officeTheme === 'HighContrast') {
|
|
18
|
+
return hcAliasTokens;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return colorfulAliasTokens;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getOfficeShadowTokens(officeTheme: string) {
|
|
25
|
+
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
26
|
+
return colorfulShadowTokens.shadow;
|
|
27
|
+
} else if (officeTheme === 'DarkGray') {
|
|
28
|
+
return darkGrayShadowTokens.shadow;
|
|
29
|
+
} else if (officeTheme === 'Black') {
|
|
30
|
+
return blackShadowTokens.shadow;
|
|
31
|
+
} else if (officeTheme === 'HighContrast') {
|
|
32
|
+
return hcShadowTokens.shadow;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return colorfulAliasTokens;
|
|
36
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -11,5 +11,5 @@ export type {
|
|
|
11
11
|
PlatformDefaultsChangedCallback,
|
|
12
12
|
} from './NativeModule/index';
|
|
13
13
|
export { paletteFromOfficeColors } from './paletteFromOfficeColors';
|
|
14
|
-
export { createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
14
|
+
export { createOfficeColorAliasTokens as createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
15
15
|
export { createBrandedThemeWithAlias, getCurrentBrandAliasTokens } from './createBrandedThemeWithAlias';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOfficeAliasTokens.d.ts","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,OAYvD"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import colorfulAliasTokens from '@fluentui-react-native/design-tokens-win32/colorful/tokens-aliases.json';
|
|
2
|
-
import darkGrayAliasTokens from '@fluentui-react-native/design-tokens-win32/darkgray/tokens-aliases.json';
|
|
3
|
-
import blackAliasTokens from '@fluentui-react-native/design-tokens-win32/black/tokens-aliases.json';
|
|
4
|
-
import { hcAliasTokens } from './highContrast/tokens-alias';
|
|
5
|
-
export function getOfficeAliasTokens(officeTheme) {
|
|
6
|
-
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
7
|
-
return colorfulAliasTokens;
|
|
8
|
-
}
|
|
9
|
-
else if (officeTheme === 'DarkGray') {
|
|
10
|
-
return darkGrayAliasTokens;
|
|
11
|
-
}
|
|
12
|
-
else if (officeTheme === 'Black') {
|
|
13
|
-
return blackAliasTokens;
|
|
14
|
-
}
|
|
15
|
-
else if (officeTheme === 'HighContrast') {
|
|
16
|
-
return hcAliasTokens;
|
|
17
|
-
}
|
|
18
|
-
return colorfulAliasTokens;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=getOfficeAliasTokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOfficeAliasTokens.js","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,yEAAyE,CAAC;AAC1G,OAAO,mBAAmB,MAAM,yEAAyE,CAAC;AAC1G,OAAO,gBAAgB,MAAM,sEAAsE,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,IAAI,WAAW,KAAK,OAAO,IAAI,WAAW,KAAK,UAAU,EAAE;QACzD,OAAO,mBAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,UAAU,EAAE;QACrC,OAAO,mBAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,OAAO,EAAE;QAClC,OAAO,gBAAgB,CAAC;KACzB;SAAM,IAAI,WAAW,KAAK,cAAc,EAAE;QACzC,OAAO,aAAa,CAAC;KACtB;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOfficeAliasTokens.d.ts","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,OAYvD"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOfficeAliasTokens = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var tokens_aliases_json_1 = (0, tslib_1.__importDefault)(require("@fluentui-react-native/design-tokens-win32/colorful/tokens-aliases.json"));
|
|
6
|
-
var tokens_aliases_json_2 = (0, tslib_1.__importDefault)(require("@fluentui-react-native/design-tokens-win32/darkgray/tokens-aliases.json"));
|
|
7
|
-
var tokens_aliases_json_3 = (0, tslib_1.__importDefault)(require("@fluentui-react-native/design-tokens-win32/black/tokens-aliases.json"));
|
|
8
|
-
var tokens_alias_1 = require("./highContrast/tokens-alias");
|
|
9
|
-
function getOfficeAliasTokens(officeTheme) {
|
|
10
|
-
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
11
|
-
return tokens_aliases_json_1.default;
|
|
12
|
-
}
|
|
13
|
-
else if (officeTheme === 'DarkGray') {
|
|
14
|
-
return tokens_aliases_json_2.default;
|
|
15
|
-
}
|
|
16
|
-
else if (officeTheme === 'Black') {
|
|
17
|
-
return tokens_aliases_json_3.default;
|
|
18
|
-
}
|
|
19
|
-
else if (officeTheme === 'HighContrast') {
|
|
20
|
-
return tokens_alias_1.hcAliasTokens;
|
|
21
|
-
}
|
|
22
|
-
return tokens_aliases_json_1.default;
|
|
23
|
-
}
|
|
24
|
-
exports.getOfficeAliasTokens = getOfficeAliasTokens;
|
|
25
|
-
//# sourceMappingURL=getOfficeAliasTokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOfficeAliasTokens.js","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":";;;;AAAA,6IAA0G;AAC1G,6IAA0G;AAC1G,0IAAoG;AACpG,4DAA4D;AAE5D,SAAgB,oBAAoB,CAAC,WAAmB;IACtD,IAAI,WAAW,KAAK,OAAO,IAAI,WAAW,KAAK,UAAU,EAAE;QACzD,OAAO,6BAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,UAAU,EAAE;QACrC,OAAO,6BAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,OAAO,EAAE;QAClC,OAAO,6BAAgB,CAAC;KACzB;SAAM,IAAI,WAAW,KAAK,cAAc,EAAE;QACzC,OAAO,4BAAa,CAAC;KACtB;IAED,OAAO,6BAAmB,CAAC;AAC7B,CAAC;AAZD,oDAYC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import colorfulAliasTokens from '@fluentui-react-native/design-tokens-win32/colorful/tokens-aliases.json';
|
|
2
|
-
import darkGrayAliasTokens from '@fluentui-react-native/design-tokens-win32/darkgray/tokens-aliases.json';
|
|
3
|
-
import blackAliasTokens from '@fluentui-react-native/design-tokens-win32/black/tokens-aliases.json';
|
|
4
|
-
import { hcAliasTokens } from './highContrast/tokens-alias';
|
|
5
|
-
|
|
6
|
-
export function getOfficeAliasTokens(officeTheme: string) {
|
|
7
|
-
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
8
|
-
return colorfulAliasTokens;
|
|
9
|
-
} else if (officeTheme === 'DarkGray') {
|
|
10
|
-
return darkGrayAliasTokens;
|
|
11
|
-
} else if (officeTheme === 'Black') {
|
|
12
|
-
return blackAliasTokens;
|
|
13
|
-
} else if (officeTheme === 'HighContrast') {
|
|
14
|
-
return hcAliasTokens;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return colorfulAliasTokens;
|
|
18
|
-
}
|