@fluentui-react-native/win32-theme 0.19.1 → 0.20.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.json +76 -1
- package/CHANGELOG.md +31 -2
- package/lib/NativeModule/getThemingModule.native.d.ts +0 -6
- package/lib/NativeModule/getThemingModule.native.d.ts.map +1 -1
- package/lib/NativeModule/getThemingModule.native.js +1 -6
- package/lib/NativeModule/getThemingModule.native.js.map +1 -1
- package/lib/createAliasesFromPalette.d.ts.map +1 -1
- package/lib/createAliasesFromPalette.js +1 -12
- package/lib/createAliasesFromPalette.js.map +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +0 -6
- package/lib-commonjs/NativeModule/getThemingModule.native.d.ts.map +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.native.js +1 -6
- package/lib-commonjs/NativeModule/getThemingModule.native.js.map +1 -1
- package/lib-commonjs/createAliasesFromPalette.d.ts.map +1 -1
- package/lib-commonjs/createAliasesFromPalette.js +1 -12
- package/lib-commonjs/createAliasesFromPalette.js.map +1 -1
- package/package.json +11 -11
- package/src/NativeModule/getThemingModule.native.ts +5 -11
- package/src/createAliasesFromPalette.ts +1 -12
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,82 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/win32-theme",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 28 Jul 2022 23:55:32 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/win32-theme_v0.20.1",
|
|
7
|
+
"version": "0.20.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "ruaraki@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
13
|
+
"commit": "4e4ecc84bcfda713e9a2c422174a4236a89c75d4",
|
|
14
|
+
"comment": "Delete workaround"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 14 Jul 2022 18:09:50 GMT",
|
|
21
|
+
"tag": "@fluentui-react-native/win32-theme_v0.20.0",
|
|
22
|
+
"version": "0.20.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"minor": [
|
|
25
|
+
{
|
|
26
|
+
"author": "sanajmi@microsoft.com",
|
|
27
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
28
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b",
|
|
29
|
+
"comment": "Update to React Native 0.66"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
34
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.14.0",
|
|
35
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
40
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.19.0",
|
|
41
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
46
|
+
"comment": "Bump @fluentui-react-native/theme-types to v0.18.0",
|
|
47
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
52
|
+
"comment": "Bump @fluentui-react-native/theme to v0.7.0",
|
|
53
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
58
|
+
"comment": "Bump @fluentui-react-native/theming-utils to v0.14.0",
|
|
59
|
+
"commit": "155145b496a51b06bba73f8f9c6b89dc7b348c4b"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Tue, 28 Jun 2022 16:48:37 GMT",
|
|
66
|
+
"tag": "@fluentui-react-native/win32-theme_v0.19.2",
|
|
67
|
+
"version": "0.19.2",
|
|
68
|
+
"comments": {
|
|
69
|
+
"patch": [
|
|
70
|
+
{
|
|
71
|
+
"author": "vkozlova@microsoft.com",
|
|
72
|
+
"package": "@fluentui-react-native/win32-theme",
|
|
73
|
+
"commit": "85f6d8488877d86b6ca30801600ca449a90ae67d",
|
|
74
|
+
"comment": "Fixed absence of icon in HC"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"date": "Fri, 24 Jun 2022 18:52:57 GMT",
|
|
6
81
|
"tag": "@fluentui-react-native/win32-theme_v0.19.1",
|
|
7
82
|
"version": "0.19.1",
|
|
8
83
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/win32-theme
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 28 Jul 2022 23:55:32 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.20.1
|
|
8
|
+
|
|
9
|
+
Thu, 28 Jul 2022 23:55:32 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Delete workaround (ruaraki@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 0.20.0
|
|
16
|
+
|
|
17
|
+
Thu, 14 Jul 2022 18:09:50 GMT
|
|
18
|
+
|
|
19
|
+
### Minor changes
|
|
20
|
+
|
|
21
|
+
- Update to React Native 0.66 (sanajmi@microsoft.com)
|
|
22
|
+
- Bump @fluentui-react-native/default-theme to v0.14.0
|
|
23
|
+
- Bump @fluentui-react-native/theme-tokens to v0.19.0
|
|
24
|
+
- Bump @fluentui-react-native/theme-types to v0.18.0
|
|
25
|
+
- Bump @fluentui-react-native/theme to v0.7.0
|
|
26
|
+
- Bump @fluentui-react-native/theming-utils to v0.14.0
|
|
27
|
+
|
|
28
|
+
## 0.19.2
|
|
29
|
+
|
|
30
|
+
Tue, 28 Jun 2022 16:48:37 GMT
|
|
31
|
+
|
|
32
|
+
### Patches
|
|
33
|
+
|
|
34
|
+
- Fixed absence of icon in HC (vkozlova@microsoft.com)
|
|
35
|
+
|
|
7
36
|
## 0.19.1
|
|
8
37
|
|
|
9
|
-
Fri, 24 Jun 2022 18:52:
|
|
38
|
+
Fri, 24 Jun 2022 18:52:57 GMT
|
|
10
39
|
|
|
11
40
|
### Patches
|
|
12
41
|
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { OfficeThemingModule } from './officeThemingModule';
|
|
2
2
|
import { NativeEventEmitter } from 'react-native';
|
|
3
|
-
declare module 'react-native' {
|
|
4
|
-
interface ITurboModuleRegistry {
|
|
5
|
-
get: (name: 'Theming') => OfficeThemingModule & EventSubscriptionVendor;
|
|
6
|
-
}
|
|
7
|
-
const TurboModuleRegistry: ITurboModuleRegistry;
|
|
8
|
-
}
|
|
9
3
|
export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
|
|
10
4
|
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAA6D,MAAM,cAAc,CAAC;AAgB7G,wBAAgB,gBAAgB,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAUxF"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter, TurboModuleRegistry } from 'react-native';
|
|
3
3
|
import { fallbackGetPalette, fallbackOfficeModule } from './fallbackOfficeModule';
|
|
4
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
5
|
-
/**
|
|
6
|
-
* If we have a userAgent string, let's assume we're web debugging. __DEV__ is for developer bundles. Currently,
|
|
7
|
-
* react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
|
|
8
|
-
*/
|
|
9
4
|
function disableGetPalette() {
|
|
10
5
|
var disabled = __DEV__ && navigator && navigator.userAgent !== undefined;
|
|
11
6
|
disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAwC,MAAM,cAAc,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AASlF,SAAS,iBAAiB;IACxB,IAAM,QAAQ,GAAG,OAAO,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC;IAC3E,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC,CAAC;IACvH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,IAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAuB,SAAS,CAAC,CAAC;IACxE,oEAAoE;IACpE,IAAI,MAAM,EAAE;QACV,iFAAiF;QACjF,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,uBAAM,MAAM,KAAE,UAAU,EAAE,kBAAkB,IAAG,CAAC,CAAC,MAAM,EAAE,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;KACvH;IAED,oCAAoC;IACpC,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAliasesFromPalette.d.ts","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAErF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"createAliasesFromPalette.d.ts","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAErF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkEnH"}
|
|
@@ -2,18 +2,7 @@ export function createAliasesFromPalette(palette, isHighContrast) {
|
|
|
2
2
|
// Workaround for getting checkmark to have correct color in HC
|
|
3
3
|
// while native code doesn't support PlatformColor
|
|
4
4
|
if (isHighContrast) {
|
|
5
|
-
return {
|
|
6
|
-
neutralForeground1: palette.Text,
|
|
7
|
-
neutralForeground1Hover: palette.TextHover,
|
|
8
|
-
neutralForeground1Pressed: palette.TextPressed,
|
|
9
|
-
neutralForeground1Selected: palette.TextSelected,
|
|
10
|
-
neutralForeground2: palette.TextSecondary,
|
|
11
|
-
neutralForeground4: palette.TextCtlSubtlePlaceholder,
|
|
12
|
-
neutralForegroundDisabled: palette.TextDisabled,
|
|
13
|
-
neutralForegroundOnBrand: palette.TextCtlEmphasis,
|
|
14
|
-
neutralForegroundOnBrandHover: palette.TextCtlEmphasisHover,
|
|
15
|
-
neutralForegroundOnBrandPressed: palette.TextCtlEmphasisPressed,
|
|
16
|
-
};
|
|
5
|
+
return {};
|
|
17
6
|
}
|
|
18
7
|
return {
|
|
19
8
|
neutralForeground1: palette.Text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAliasesFromPalette.js","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,OAAsB,EAAE,cAAuB;IACtF,+DAA+D;IAC/D,kDAAkD;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO
|
|
1
|
+
{"version":3,"file":"createAliasesFromPalette.js","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,OAAsB,EAAE,cAAuB;IACtF,+DAA+D;IAC/D,kDAAkD;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;IAED,OAAO;QACL,kBAAkB,EAAE,OAAO,CAAC,IAAI;QAChC,uBAAuB,EAAE,OAAO,CAAC,SAAS;QAC1C,yBAAyB,EAAE,OAAO,CAAC,WAAW;QAC9C,0BAA0B,EAAE,OAAO,CAAC,YAAY;QAChD,kBAAkB,EAAE,OAAO,CAAC,aAAa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O,CAAC,wBAAwB;QAEjE,uBAAuB,EAAE,OAAO,CAAC,kBAAkB;QACnD,4BAA4B,EAAE,OAAO,CAAC,eAAe;QACrD,8BAA8B,EAAE,OAAO,CAAC,iBAAiB;QACzD,cAAc,EAAE,OAAO,CAAC,SAAS;QACjC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;QAChD,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAChD,cAAc,EAAE,OAAO,CAAC,YAAY;QACpC,YAAY,EAAE,OAAO,CAAC,cAAc;QACpC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,yBAAyB,EAAE,OAAO,CAAC,yBAAyB;QAC5D,2BAA2B,EAAE,OAAO,CAAC,2BAA2B;QAChE,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAEhD,YAAY,EAAE,OAAO,CAAC,cAAc;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { OfficeThemingModule } from './officeThemingModule';
|
|
2
2
|
import { NativeEventEmitter } from 'react-native';
|
|
3
|
-
declare module 'react-native' {
|
|
4
|
-
interface ITurboModuleRegistry {
|
|
5
|
-
get: (name: 'Theming') => OfficeThemingModule & EventSubscriptionVendor;
|
|
6
|
-
}
|
|
7
|
-
const TurboModuleRegistry: ITurboModuleRegistry;
|
|
8
|
-
}
|
|
9
3
|
export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
|
|
10
4
|
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"getThemingModule.native.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAA6D,MAAM,cAAc,CAAC;AAgB7G,wBAAgB,gBAAgB,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAUxF"}
|
|
@@ -4,18 +4,13 @@ exports.getThemingModule = void 0;
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_native_1 = require("react-native");
|
|
6
6
|
var fallbackOfficeModule_1 = require("./fallbackOfficeModule");
|
|
7
|
-
var react_native_2 = require("react-native");
|
|
8
|
-
/**
|
|
9
|
-
* If we have a userAgent string, let's assume we're web debugging. __DEV__ is for developer bundles. Currently,
|
|
10
|
-
* react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
|
|
11
|
-
*/
|
|
12
7
|
function disableGetPalette() {
|
|
13
8
|
var disabled = __DEV__ && navigator && navigator.userAgent !== undefined;
|
|
14
9
|
disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
|
|
15
10
|
return disabled;
|
|
16
11
|
}
|
|
17
12
|
function getThemingModule() {
|
|
18
|
-
var module =
|
|
13
|
+
var module = react_native_1.TurboModuleRegistry.get('Theming');
|
|
19
14
|
// if the native module exists return the module + an emitter for it
|
|
20
15
|
if (module) {
|
|
21
16
|
// mock getPalette if it should be disabled, otherwise return the module directly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"getThemingModule.native.js","sourceRoot":"","sources":["../../src/NativeModule/getThemingModule.native.ts"],"names":[],"mappings":";;;;AACA,6CAA6G;AAC7G,+DAAkF;AASlF,SAAS,iBAAiB;IACxB,IAAM,QAAQ,GAAG,OAAO,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC;IAC3E,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC,CAAC;IACvH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,gBAAgB;IAC9B,IAAM,MAAM,GAAG,kCAAmB,CAAC,GAAG,CAAuB,SAAS,CAAC,CAAC;IACxE,oEAAoE;IACpE,IAAI,MAAM,EAAE;QACV,iFAAiF;QACjF,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,iDAAM,MAAM,KAAE,UAAU,EAAE,yCAAkB,IAAG,CAAC,CAAC,MAAM,EAAE,IAAI,iCAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;KACvH;IAED,oCAAoC;IACpC,OAAO,CAAC,2CAAoB,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC;AAVD,4CAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAliasesFromPalette.d.ts","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAErF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"createAliasesFromPalette.d.ts","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAErF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkEnH"}
|
|
@@ -5,18 +5,7 @@ function createAliasesFromPalette(palette, isHighContrast) {
|
|
|
5
5
|
// Workaround for getting checkmark to have correct color in HC
|
|
6
6
|
// while native code doesn't support PlatformColor
|
|
7
7
|
if (isHighContrast) {
|
|
8
|
-
return {
|
|
9
|
-
neutralForeground1: palette.Text,
|
|
10
|
-
neutralForeground1Hover: palette.TextHover,
|
|
11
|
-
neutralForeground1Pressed: palette.TextPressed,
|
|
12
|
-
neutralForeground1Selected: palette.TextSelected,
|
|
13
|
-
neutralForeground2: palette.TextSecondary,
|
|
14
|
-
neutralForeground4: palette.TextCtlSubtlePlaceholder,
|
|
15
|
-
neutralForegroundDisabled: palette.TextDisabled,
|
|
16
|
-
neutralForegroundOnBrand: palette.TextCtlEmphasis,
|
|
17
|
-
neutralForegroundOnBrandHover: palette.TextCtlEmphasisHover,
|
|
18
|
-
neutralForegroundOnBrandPressed: palette.TextCtlEmphasisPressed,
|
|
19
|
-
};
|
|
8
|
+
return {};
|
|
20
9
|
}
|
|
21
10
|
return {
|
|
22
11
|
neutralForeground1: palette.Text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAliasesFromPalette.js","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB,CAAC,OAAsB,EAAE,cAAuB;IACtF,+DAA+D;IAC/D,kDAAkD;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO
|
|
1
|
+
{"version":3,"file":"createAliasesFromPalette.js","sourceRoot":"","sources":["../src/createAliasesFromPalette.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB,CAAC,OAAsB,EAAE,cAAuB;IACtF,+DAA+D;IAC/D,kDAAkD;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;IAED,OAAO;QACL,kBAAkB,EAAE,OAAO,CAAC,IAAI;QAChC,uBAAuB,EAAE,OAAO,CAAC,SAAS;QAC1C,yBAAyB,EAAE,OAAO,CAAC,WAAW;QAC9C,0BAA0B,EAAE,OAAO,CAAC,YAAY;QAChD,kBAAkB,EAAE,OAAO,CAAC,aAAa;QACzC,uBAAuB,EAAE,OAAO,CAAC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EAAE,OAAO,CAAC,kBAAkB;QACnD,4BAA4B,EAAE,OAAO,CAAC,eAAe;QACrD,8BAA8B,EAAE,OAAO,CAAC,iBAAiB;QACzD,cAAc,EAAE,OAAO,CAAC,SAAS;QACjC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;QAChD,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAChD,cAAc,EAAE,OAAO,CAAC,YAAY;QACpC,YAAY,EAAE,OAAO,CAAC,cAAc;QACpC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,yBAAyB,EAAE,OAAO,CAAC,yBAAyB;QAC5D,2BAA2B,EAAE,OAAO,CAAC,2BAA2B;QAChE,qBAAqB,EAAE,OAAO,CAAC,iBAAiB;QAEhD,YAAY,EAAE,OAAO,CAAC,cAAc;KACrC,CAAC;AACJ,CAAC;AAlED,4DAkEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/win32-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Win32 office theme that works with the theming native module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,25 +27,25 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fluentui-react-native/default-theme": ">=0.
|
|
30
|
+
"@fluentui-react-native/default-theme": ">=0.14.0 <1.0.0",
|
|
31
31
|
"@fluentui-react-native/design-tokens-win32": "^0.13.0",
|
|
32
32
|
"@fluentui-react-native/memo-cache": "^1.1.7",
|
|
33
|
-
"@fluentui-react-native/theme-tokens": ">=0.
|
|
34
|
-
"@fluentui-react-native/theme-types": ">=0.
|
|
35
|
-
"@fluentui-react-native/theme": ">=0.
|
|
36
|
-
"@fluentui-react-native/theming-utils": ">=0.
|
|
33
|
+
"@fluentui-react-native/theme-tokens": ">=0.19.0 <1.0.0",
|
|
34
|
+
"@fluentui-react-native/theme-types": ">=0.18.0 <1.0.0",
|
|
35
|
+
"@fluentui-react-native/theme": ">=0.7.0 <1.0.0",
|
|
36
|
+
"@fluentui-react-native/theming-utils": ">=0.14.0 <1.0.0",
|
|
37
37
|
"tslib": "^2.3.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
41
41
|
"@types/react": "^17.0.2",
|
|
42
|
-
"@types/react-native": "^0.
|
|
42
|
+
"@types/react-native": "^0.66.0",
|
|
43
43
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
44
|
-
"react": "17.0.
|
|
45
|
-
"react-native": "^0.
|
|
44
|
+
"react": "17.0.2",
|
|
45
|
+
"react-native": "^0.66.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"react": ">=17.0.
|
|
49
|
-
"react-native": ">=0.
|
|
48
|
+
"react": ">=17.0.2",
|
|
49
|
+
"react-native": ">=0.66.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { OfficeThemingModule } from './officeThemingModule';
|
|
2
|
-
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter, TurboModuleRegistry, EventSubscriptionVendor, TurboModule } from 'react-native';
|
|
3
3
|
import { fallbackGetPalette, fallbackOfficeModule } from './fallbackOfficeModule';
|
|
4
4
|
|
|
5
|
-
declare module 'react-native' {
|
|
6
|
-
interface ITurboModuleRegistry {
|
|
7
|
-
get: (name: 'Theming') => OfficeThemingModule & EventSubscriptionVendor;
|
|
8
|
-
}
|
|
9
|
-
const TurboModuleRegistry: ITurboModuleRegistry;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
13
|
-
|
|
14
5
|
/**
|
|
15
6
|
* If we have a userAgent string, let's assume we're web debugging. __DEV__ is for developer bundles. Currently,
|
|
16
7
|
* react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
|
|
17
8
|
*/
|
|
9
|
+
|
|
10
|
+
type ITurboModuleRegistry = TurboModule & OfficeThemingModule & EventSubscriptionVendor;
|
|
11
|
+
|
|
18
12
|
function disableGetPalette(): boolean {
|
|
19
13
|
const disabled = __DEV__ && navigator && navigator.userAgent !== undefined;
|
|
20
14
|
disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
|
|
@@ -22,7 +16,7 @@ function disableGetPalette(): boolean {
|
|
|
22
16
|
}
|
|
23
17
|
|
|
24
18
|
export function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined] {
|
|
25
|
-
const module = TurboModuleRegistry.get('Theming');
|
|
19
|
+
const module = TurboModuleRegistry.get<ITurboModuleRegistry>('Theming');
|
|
26
20
|
// if the native module exists return the module + an emitter for it
|
|
27
21
|
if (module) {
|
|
28
22
|
// mock getPalette if it should be disabled, otherwise return the module directly
|
|
@@ -4,18 +4,7 @@ export function createAliasesFromPalette(palette: OfficePalette, isHighContrast:
|
|
|
4
4
|
// Workaround for getting checkmark to have correct color in HC
|
|
5
5
|
// while native code doesn't support PlatformColor
|
|
6
6
|
if (isHighContrast) {
|
|
7
|
-
return {
|
|
8
|
-
neutralForeground1: palette.Text,
|
|
9
|
-
neutralForeground1Hover: palette.TextHover,
|
|
10
|
-
neutralForeground1Pressed: palette.TextPressed,
|
|
11
|
-
neutralForeground1Selected: palette.TextSelected,
|
|
12
|
-
neutralForeground2: palette.TextSecondary,
|
|
13
|
-
neutralForeground4: palette.TextCtlSubtlePlaceholder,
|
|
14
|
-
neutralForegroundDisabled: palette.TextDisabled,
|
|
15
|
-
neutralForegroundOnBrand: palette.TextCtlEmphasis,
|
|
16
|
-
neutralForegroundOnBrandHover: palette.TextCtlEmphasisHover,
|
|
17
|
-
neutralForegroundOnBrandPressed: palette.TextCtlEmphasisPressed,
|
|
18
|
-
};
|
|
7
|
+
return {};
|
|
19
8
|
}
|
|
20
9
|
|
|
21
10
|
return {
|