@fluentui-react-native/win32-theme 0.14.14 → 0.16.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 +115 -4
- package/CHANGELOG.md +37 -2
- package/lib/createOfficeAliasTokens.js +1 -1
- package/lib/createOfficeAliasTokens.js.map +1 -1
- package/lib/getOfficeAliasTokens.d.ts +2 -0
- package/lib/getOfficeAliasTokens.d.ts.map +1 -0
- package/lib/getOfficeAliasTokens.js +20 -0
- package/lib/getOfficeAliasTokens.js.map +1 -0
- package/lib/highContrast/tokens-alias.d.ts +2 -0
- package/lib/highContrast/tokens-alias.d.ts.map +1 -0
- package/lib/highContrast/tokens-alias.js +16 -0
- package/lib/highContrast/tokens-alias.js.map +1 -0
- package/lib/index.d.ts +7 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -6
- package/lib/index.js.map +1 -1
- package/lib-commonjs/createOfficeAliasTokens.js +2 -2
- package/lib-commonjs/createOfficeAliasTokens.js.map +1 -1
- package/lib-commonjs/getOfficeAliasTokens.d.ts +2 -0
- package/lib-commonjs/getOfficeAliasTokens.d.ts.map +1 -0
- package/lib-commonjs/getOfficeAliasTokens.js +25 -0
- package/lib-commonjs/getOfficeAliasTokens.js.map +1 -0
- package/lib-commonjs/highContrast/tokens-alias.d.ts +2 -0
- package/lib-commonjs/highContrast/tokens-alias.d.ts.map +1 -0
- package/lib-commonjs/highContrast/tokens-alias.js +20 -0
- package/lib-commonjs/highContrast/tokens-alias.js.map +1 -0
- package/lib-commonjs/index.d.ts +7 -6
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +16 -7
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -6
- package/src/createOfficeAliasTokens.ts +1 -1
- package/src/getOfficeAliasTokens.ts +18 -0
- package/src/highContrast/tokens-alias.ts +18 -0
- package/src/index.ts +15 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,118 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/win32-theme",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed,
|
|
5
|
+
"date": "Wed, 06 Apr 2022 22:56:55 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/win32-theme_v0.16.0",
|
|
7
|
+
"version": "0.16.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "ruaraki@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
13
|
+
"commit": "bcd4ac6dc74295095a0564905024ef32d6450cff",
|
|
14
|
+
"comment": "Hook up design tokens"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.9.15",
|
|
20
|
+
"commit": "bcd4ac6dc74295095a0564905024ef32d6450cff"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.15.0",
|
|
26
|
+
"commit": "bcd4ac6dc74295095a0564905024ef32d6450cff"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
31
|
+
"comment": "Bump @fluentui-react-native/theming-utils to v0.9.4",
|
|
32
|
+
"commit": "bcd4ac6dc74295095a0564905024ef32d6450cff"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Tue, 05 Apr 2022 20:05:50 GMT",
|
|
39
|
+
"tag": "@fluentui-react-native/win32-theme_v0.15.0",
|
|
40
|
+
"version": "0.15.0",
|
|
41
|
+
"comments": {
|
|
42
|
+
"minor": [
|
|
43
|
+
{
|
|
44
|
+
"author": "ruaraki@microsoft.com",
|
|
45
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
46
|
+
"commit": "c183b7eb02925bf1d1284ad1b3c80c0f2e0c442f",
|
|
47
|
+
"comment": "Move win32 alias tokens out"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
52
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.9.14",
|
|
53
|
+
"commit": "c183b7eb02925bf1d1284ad1b3c80c0f2e0c442f"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
58
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.14.0",
|
|
59
|
+
"commit": "c183b7eb02925bf1d1284ad1b3c80c0f2e0c442f"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
64
|
+
"comment": "Bump @fluentui-react-native/theming-utils to v0.9.3",
|
|
65
|
+
"commit": "c183b7eb02925bf1d1284ad1b3c80c0f2e0c442f"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"date": "Thu, 31 Mar 2022 07:27:48 GMT",
|
|
72
|
+
"tag": "@fluentui-react-native/win32-theme_v0.14.15",
|
|
73
|
+
"version": "0.14.15",
|
|
74
|
+
"comments": {
|
|
75
|
+
"patch": [
|
|
76
|
+
{
|
|
77
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
78
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
79
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed",
|
|
80
|
+
"comment": "Ban `export *` in index files for better tree-shakeability"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"author": "beachball",
|
|
84
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
85
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.9.13",
|
|
86
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"author": "beachball",
|
|
90
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
91
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.13.2",
|
|
92
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "beachball",
|
|
96
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
97
|
+
"comment": "Bump @fluentui-react-native/theme-types to v0.14.1",
|
|
98
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "beachball",
|
|
102
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
103
|
+
"comment": "Bump @fluentui-react-native/theme to v0.6.6",
|
|
104
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "beachball",
|
|
108
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
109
|
+
"comment": "Bump @fluentui-react-native/theming-utils to v0.9.2",
|
|
110
|
+
"commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"date": "Wed, 23 Mar 2022 17:24:05 GMT",
|
|
6
117
|
"tag": "@fluentui-react-native/win32-theme_v0.14.14",
|
|
7
118
|
"version": "0.14.14",
|
|
8
119
|
"comments": {
|
|
@@ -17,19 +128,19 @@
|
|
|
17
128
|
"author": "beachball",
|
|
18
129
|
"package": "@fluentui-react-native/win32-theme",
|
|
19
130
|
"comment": "Bump @fluentui-react-native/default-theme to v0.9.12",
|
|
20
|
-
"commit": "
|
|
131
|
+
"commit": "0a18d2f8bb6505c6c6e2445ff3ba62ac79334872"
|
|
21
132
|
},
|
|
22
133
|
{
|
|
23
134
|
"author": "beachball",
|
|
24
135
|
"package": "@fluentui-react-native/win32-theme",
|
|
25
136
|
"comment": "Bump @fluentui-react-native/theme-tokens to v0.13.1",
|
|
26
|
-
"commit": "
|
|
137
|
+
"commit": "0a18d2f8bb6505c6c6e2445ff3ba62ac79334872"
|
|
27
138
|
},
|
|
28
139
|
{
|
|
29
140
|
"author": "beachball",
|
|
30
141
|
"package": "@fluentui-react-native/win32-theme",
|
|
31
142
|
"comment": "Bump @fluentui-react-native/theming-utils to v0.9.1",
|
|
32
|
-
"commit": "
|
|
143
|
+
"commit": "0a18d2f8bb6505c6c6e2445ff3ba62ac79334872"
|
|
33
144
|
}
|
|
34
145
|
]
|
|
35
146
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/win32-theme
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 06 Apr 2022 22:56:55 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.16.0
|
|
8
|
+
|
|
9
|
+
Wed, 06 Apr 2022 22:56:55 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Hook up design tokens (ruaraki@microsoft.com)
|
|
14
|
+
- Bump @fluentui-react-native/default-theme to v0.9.15
|
|
15
|
+
- Bump @fluentui-react-native/theme-tokens to v0.15.0
|
|
16
|
+
- Bump @fluentui-react-native/theming-utils to v0.9.4
|
|
17
|
+
|
|
18
|
+
## 0.15.0
|
|
19
|
+
|
|
20
|
+
Tue, 05 Apr 2022 20:05:50 GMT
|
|
21
|
+
|
|
22
|
+
### Minor changes
|
|
23
|
+
|
|
24
|
+
- Move win32 alias tokens out (ruaraki@microsoft.com)
|
|
25
|
+
- Bump @fluentui-react-native/default-theme to v0.9.14
|
|
26
|
+
- Bump @fluentui-react-native/theme-tokens to v0.14.0
|
|
27
|
+
- Bump @fluentui-react-native/theming-utils to v0.9.3
|
|
28
|
+
|
|
29
|
+
## 0.14.15
|
|
30
|
+
|
|
31
|
+
Thu, 31 Mar 2022 07:27:48 GMT
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- Ban `export *` in index files for better tree-shakeability (4123478+tido64@users.noreply.github.com)
|
|
36
|
+
- Bump @fluentui-react-native/default-theme to v0.9.13
|
|
37
|
+
- Bump @fluentui-react-native/theme-tokens to v0.13.2
|
|
38
|
+
- Bump @fluentui-react-native/theme-types to v0.14.1
|
|
39
|
+
- Bump @fluentui-react-native/theme to v0.6.6
|
|
40
|
+
- Bump @fluentui-react-native/theming-utils to v0.9.2
|
|
41
|
+
|
|
7
42
|
## 0.14.14
|
|
8
43
|
|
|
9
|
-
Wed, 23 Mar 2022 17:
|
|
44
|
+
Wed, 23 Mar 2022 17:24:05 GMT
|
|
10
45
|
|
|
11
46
|
### Patches
|
|
12
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getOfficeAliasTokens } from '
|
|
1
|
+
import { getOfficeAliasTokens } from './getOfficeAliasTokens';
|
|
2
2
|
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
3
3
|
import { mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
4
4
|
function createOfficeAliasTokensWorker(officeTheme) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOfficeAliasTokens.js","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createOfficeAliasTokens.js","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,SAAS,6BAA6B,CAAC,WAAmB;IACxD,IAAM,WAAW,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,IAAM,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOfficeAliasTokens.d.ts","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,OAYvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens-alias.d.ts","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,KAAkC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PlatformColor } from 'react-native';
|
|
2
|
+
import aliasTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-aliases.json';
|
|
3
|
+
export var hcAliasTokens = processAliasTokens(aliasTokens);
|
|
4
|
+
function processAliasTokens(aliasTokens) {
|
|
5
|
+
for (var key in aliasTokens) {
|
|
6
|
+
for (var innerKey in aliasTokens[key]) {
|
|
7
|
+
var entry = aliasTokens[key][innerKey];
|
|
8
|
+
if (typeof entry === 'string' && entry.includes('PlatformColor')) {
|
|
9
|
+
var color = entry.substring(14, entry.length - 1);
|
|
10
|
+
aliasTokens[key][innerKey] = PlatformColor(color);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return aliasTokens;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tokens-alias.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens-alias.js","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,WAAW,MAAM,mEAAmE,CAAC;AAE5F,MAAM,CAAC,IAAM,aAAa,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAE7D,SAAS,kBAAkB,CAAC,WAAgB;IAC1C,KAAK,IAAM,GAAG,IAAI,WAAW,EAAE;QAC7B,KAAK,IAAM,QAAQ,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;YACvC,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAChE,IAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACpD,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;aACnD;SACF;KACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export { createOfficeTheme } from './createOfficeTheme';
|
|
2
|
+
export { createPartialOfficeTheme } from './createPartialOfficeTheme';
|
|
3
|
+
export { fallbackGetPalette, fallbackOfficeModule, getThemingModule } from './NativeModule/index';
|
|
4
|
+
export type { CxxException, IEventEmitter, NativeColorNames, NativeColorRamps, OfficeThemingModule, PlatformDefaultsChangedArgs, PlatformDefaultsChangedCallback, } from './NativeModule/index';
|
|
5
|
+
export { paletteFromOfficeColors } from './paletteFromOfficeColors';
|
|
6
|
+
export { createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
7
|
+
export { createBrandedThemeWithAlias, getCurrentBrandAliasTokens } from './createBrandedThemeWithAlias';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClG,YAAY,EACV,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export { createOfficeTheme } from './createOfficeTheme';
|
|
2
|
+
export { createPartialOfficeTheme } from './createPartialOfficeTheme';
|
|
3
|
+
export { fallbackGetPalette, fallbackOfficeModule, getThemingModule } from './NativeModule/index';
|
|
4
|
+
export { paletteFromOfficeColors } from './paletteFromOfficeColors';
|
|
5
|
+
export { createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
6
|
+
export { createBrandedThemeWithAlias, getCurrentBrandAliasTokens } from './createBrandedThemeWithAlias';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAUlG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createOfficeAliasTokens = void 0;
|
|
4
|
-
var
|
|
4
|
+
var getOfficeAliasTokens_1 = require("./getOfficeAliasTokens");
|
|
5
5
|
var memo_cache_1 = require("@fluentui-react-native/memo-cache");
|
|
6
6
|
var theming_utils_1 = require("@fluentui-react-native/theming-utils");
|
|
7
7
|
function createOfficeAliasTokensWorker(officeTheme) {
|
|
8
|
-
var aliasTokens = (0,
|
|
8
|
+
var aliasTokens = (0, getOfficeAliasTokens_1.getOfficeAliasTokens)(officeTheme);
|
|
9
9
|
return (0, theming_utils_1.mapPipelineToTheme)(aliasTokens);
|
|
10
10
|
}
|
|
11
11
|
exports.createOfficeAliasTokens = (0, memo_cache_1.memoize)(createOfficeAliasTokensWorker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOfficeAliasTokens.js","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"createOfficeAliasTokens.js","sourceRoot":"","sources":["../src/createOfficeAliasTokens.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAE9D,gEAA4D;AAC5D,sEAA0E;AAE1E,SAAS,6BAA6B,CAAC,WAAmB;IACxD,IAAM,WAAW,GAAG,IAAA,2CAAoB,EAAC,WAAW,CAAC,CAAC;IACtD,OAAO,IAAA,kCAAkB,EAAC,WAAW,CAAC,CAAC;AACzC,CAAC;AAEY,QAAA,uBAAuB,GAAG,IAAA,oBAAO,EAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOfficeAliasTokens.d.ts","sourceRoot":"","sources":["../src/getOfficeAliasTokens.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,OAYvD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens-alias.d.ts","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,KAAkC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hcAliasTokens = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_native_1 = require("react-native");
|
|
6
|
+
var tokens_aliases_json_1 = (0, tslib_1.__importDefault)(require("@fluentui-react-native/design-tokens-win32/hc/tokens-aliases.json"));
|
|
7
|
+
exports.hcAliasTokens = processAliasTokens(tokens_aliases_json_1.default);
|
|
8
|
+
function processAliasTokens(aliasTokens) {
|
|
9
|
+
for (var key in aliasTokens) {
|
|
10
|
+
for (var innerKey in aliasTokens[key]) {
|
|
11
|
+
var entry = aliasTokens[key][innerKey];
|
|
12
|
+
if (typeof entry === 'string' && entry.includes('PlatformColor')) {
|
|
13
|
+
var color = entry.substring(14, entry.length - 1);
|
|
14
|
+
aliasTokens[key][innerKey] = (0, react_native_1.PlatformColor)(color);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return aliasTokens;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=tokens-alias.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens-alias.js","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":";;;;AAAA,6CAA6C;AAC7C,uIAA4F;AAE/E,QAAA,aAAa,GAAG,kBAAkB,CAAC,6BAAW,CAAC,CAAC;AAE7D,SAAS,kBAAkB,CAAC,WAAgB;IAC1C,KAAK,IAAM,GAAG,IAAI,WAAW,EAAE;QAC7B,KAAK,IAAM,QAAQ,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;YACvC,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAChE,IAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACpD,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAA,4BAAa,EAAC,KAAK,CAAC,CAAC;aACnD;SACF;KACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export { createOfficeTheme } from './createOfficeTheme';
|
|
2
|
+
export { createPartialOfficeTheme } from './createPartialOfficeTheme';
|
|
3
|
+
export { fallbackGetPalette, fallbackOfficeModule, getThemingModule } from './NativeModule/index';
|
|
4
|
+
export type { CxxException, IEventEmitter, NativeColorNames, NativeColorRamps, OfficeThemingModule, PlatformDefaultsChangedArgs, PlatformDefaultsChangedCallback, } from './NativeModule/index';
|
|
5
|
+
export { paletteFromOfficeColors } from './paletteFromOfficeColors';
|
|
6
|
+
export { createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
7
|
+
export { createBrandedThemeWithAlias, getCurrentBrandAliasTokens } from './createBrandedThemeWithAlias';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClG,YAAY,EACV,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(
|
|
6
|
-
|
|
7
|
-
(
|
|
8
|
-
|
|
9
|
-
(
|
|
3
|
+
exports.getCurrentBrandAliasTokens = exports.createBrandedThemeWithAlias = exports.createOfficeAliasTokens = exports.paletteFromOfficeColors = exports.getThemingModule = exports.fallbackOfficeModule = exports.fallbackGetPalette = exports.createPartialOfficeTheme = exports.createOfficeTheme = void 0;
|
|
4
|
+
var createOfficeTheme_1 = require("./createOfficeTheme");
|
|
5
|
+
Object.defineProperty(exports, "createOfficeTheme", { enumerable: true, get: function () { return createOfficeTheme_1.createOfficeTheme; } });
|
|
6
|
+
var createPartialOfficeTheme_1 = require("./createPartialOfficeTheme");
|
|
7
|
+
Object.defineProperty(exports, "createPartialOfficeTheme", { enumerable: true, get: function () { return createPartialOfficeTheme_1.createPartialOfficeTheme; } });
|
|
8
|
+
var index_1 = require("./NativeModule/index");
|
|
9
|
+
Object.defineProperty(exports, "fallbackGetPalette", { enumerable: true, get: function () { return index_1.fallbackGetPalette; } });
|
|
10
|
+
Object.defineProperty(exports, "fallbackOfficeModule", { enumerable: true, get: function () { return index_1.fallbackOfficeModule; } });
|
|
11
|
+
Object.defineProperty(exports, "getThemingModule", { enumerable: true, get: function () { return index_1.getThemingModule; } });
|
|
12
|
+
var paletteFromOfficeColors_1 = require("./paletteFromOfficeColors");
|
|
13
|
+
Object.defineProperty(exports, "paletteFromOfficeColors", { enumerable: true, get: function () { return paletteFromOfficeColors_1.paletteFromOfficeColors; } });
|
|
14
|
+
var createOfficeAliasTokens_1 = require("./createOfficeAliasTokens");
|
|
15
|
+
Object.defineProperty(exports, "createOfficeAliasTokens", { enumerable: true, get: function () { return createOfficeAliasTokens_1.createOfficeAliasTokens; } });
|
|
16
|
+
var createBrandedThemeWithAlias_1 = require("./createBrandedThemeWithAlias");
|
|
17
|
+
Object.defineProperty(exports, "createBrandedThemeWithAlias", { enumerable: true, get: function () { return createBrandedThemeWithAlias_1.createBrandedThemeWithAlias; } });
|
|
18
|
+
Object.defineProperty(exports, "getCurrentBrandAliasTokens", { enumerable: true, get: function () { return createBrandedThemeWithAlias_1.getCurrentBrandAliasTokens; } });
|
|
10
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,8CAAkG;AAAzF,2GAAA,kBAAkB,OAAA;AAAE,6GAAA,oBAAoB,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAUnE,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6EAAwG;AAA/F,0IAAA,2BAA2B,OAAA;AAAE,yIAAA,0BAA0B,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/win32-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Win32 office theme that works with the theming native module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fluentui-react-native/default-theme": ">=0.9.
|
|
30
|
+
"@fluentui-react-native/default-theme": ">=0.9.15 <1.0.0",
|
|
31
|
+
"@fluentui-react-native/design-tokens-win32": "^0.5.0-test",
|
|
31
32
|
"@fluentui-react-native/memo-cache": "^1.1.7",
|
|
32
|
-
"@fluentui-react-native/theme-tokens": ">=0.
|
|
33
|
-
"@fluentui-react-native/theme-types": ">=0.14.
|
|
34
|
-
"@fluentui-react-native/theme": ">=0.6.
|
|
35
|
-
"@fluentui-react-native/theming-utils": ">=0.9.
|
|
33
|
+
"@fluentui-react-native/theme-tokens": ">=0.15.0 <1.0.0",
|
|
34
|
+
"@fluentui-react-native/theme-types": ">=0.14.1 <1.0.0",
|
|
35
|
+
"@fluentui-react-native/theme": ">=0.6.6 <1.0.0",
|
|
36
|
+
"@fluentui-react-native/theming-utils": ">=0.9.4 <1.0.0",
|
|
36
37
|
"tslib": "^2.3.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getOfficeAliasTokens } from '
|
|
1
|
+
import { getOfficeAliasTokens } from './getOfficeAliasTokens';
|
|
2
2
|
import { AliasColorTokens } from '@fluentui-react-native/theme-types';
|
|
3
3
|
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
4
4
|
import { mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PlatformColor } from 'react-native';
|
|
2
|
+
import aliasTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-aliases.json';
|
|
3
|
+
|
|
4
|
+
export const hcAliasTokens = processAliasTokens(aliasTokens);
|
|
5
|
+
|
|
6
|
+
function processAliasTokens(aliasTokens: any) {
|
|
7
|
+
for (const key in aliasTokens) {
|
|
8
|
+
for (const innerKey in aliasTokens[key]) {
|
|
9
|
+
const entry = aliasTokens[key][innerKey];
|
|
10
|
+
if (typeof entry === 'string' && entry.includes('PlatformColor')) {
|
|
11
|
+
const color = entry.substring(14, entry.length - 1);
|
|
12
|
+
aliasTokens[key][innerKey] = PlatformColor(color);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return aliasTokens;
|
|
18
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export { createOfficeTheme } from './createOfficeTheme';
|
|
2
|
+
export { createPartialOfficeTheme } from './createPartialOfficeTheme';
|
|
3
|
+
export { fallbackGetPalette, fallbackOfficeModule, getThemingModule } from './NativeModule/index';
|
|
4
|
+
export type {
|
|
5
|
+
CxxException,
|
|
6
|
+
IEventEmitter,
|
|
7
|
+
NativeColorNames,
|
|
8
|
+
NativeColorRamps,
|
|
9
|
+
OfficeThemingModule,
|
|
10
|
+
PlatformDefaultsChangedArgs,
|
|
11
|
+
PlatformDefaultsChangedCallback,
|
|
12
|
+
} from './NativeModule/index';
|
|
13
|
+
export { paletteFromOfficeColors } from './paletteFromOfficeColors';
|
|
14
|
+
export { createOfficeAliasTokens } from './createOfficeAliasTokens';
|
|
15
|
+
export { createBrandedThemeWithAlias, getCurrentBrandAliasTokens } from './createBrandedThemeWithAlias';
|