@uifabricshared/theming-react-native 0.20.20 → 0.21.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 +110 -3
- package/README.md +1 -1
- package/etc/theming-react-native.api.md +12 -11
- package/lib/BaselinePlatformDefaults.js.map +1 -1
- package/lib/Global.js.map +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.d.ts +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
- package/lib/NativeModule/getHostSettings.js.map +1 -1
- package/lib/ThemeLayer.d.ts +3 -2
- package/lib/ThemeLayer.d.ts.map +1 -1
- package/lib/ThemeLayer.js +13 -12
- package/lib/ThemeLayer.js.map +1 -1
- package/lib/ThemeProvider.js +3 -2
- package/lib/ThemeProvider.js.map +1 -1
- package/lib/platform/PlatformDefaults.d.ts +1 -1
- package/lib/platform/PlatformDefaults.d.ts.map +1 -1
- package/lib/platform/PlatformDefaults.js.map +1 -1
- package/lib/platform/PlatformDefaults.native.d.ts +1 -1
- package/lib/platform/PlatformDefaults.native.d.ts.map +1 -1
- package/lib/platform/PlatformDefaults.native.js.map +1 -1
- package/lib-commonjs/BaselinePlatformDefaults.js +1 -2
- package/lib-commonjs/BaselinePlatformDefaults.js.map +1 -1
- package/lib-commonjs/Global.js +7 -8
- package/lib-commonjs/Global.js.map +1 -1
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +2 -3
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +1 -1
- package/lib-commonjs/NativeModule/getHostSettings.js +1 -2
- package/lib-commonjs/NativeModule/getHostSettings.js.map +1 -1
- package/lib-commonjs/NativeModule/index.js +2 -2
- package/lib-commonjs/NativeModule/index.js.map +1 -1
- package/lib-commonjs/ThemeContext.js +18 -8
- package/lib-commonjs/ThemeContext.js.map +1 -1
- package/lib-commonjs/ThemeLayer.d.ts +3 -2
- package/lib-commonjs/ThemeLayer.d.ts.map +1 -1
- package/lib-commonjs/ThemeLayer.js +30 -19
- package/lib-commonjs/ThemeLayer.js.map +1 -1
- package/lib-commonjs/ThemeProvider.js +20 -9
- package/lib-commonjs/ThemeProvider.js.map +1 -1
- package/lib-commonjs/index.js +6 -6
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/platform/PlatformDefaults.js +1 -2
- package/lib-commonjs/platform/PlatformDefaults.js.map +1 -1
- package/lib-commonjs/platform/PlatformDefaults.native.js +1 -2
- package/lib-commonjs/platform/PlatformDefaults.native.js.map +1 -1
- package/package.json +57 -60
- package/src/ThemeLayer.tsx +3 -2
- package/babel.config.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.translateOfficeTheme = translateOfficeTheme;
|
|
4
|
+
exports.createThemingModuleHelper = createThemingModuleHelper;
|
|
4
5
|
const win32_theme_1 = require("@fluentui-react-native/win32-theme");
|
|
5
6
|
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
6
7
|
const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
|
|
@@ -30,7 +31,6 @@ function translateOfficeTheme(module, cache, id, themeName) {
|
|
|
30
31
|
const palette = ensurePalette(module, cache, id);
|
|
31
32
|
return (0, win32_theme_1.createPartialOfficeTheme)(module, themeName, palette);
|
|
32
33
|
}
|
|
33
|
-
exports.translateOfficeTheme = translateOfficeTheme;
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated
|
|
36
36
|
*/
|
|
@@ -58,5 +58,4 @@ function createThemingModuleHelper(themingModule, emitter) {
|
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
exports.createThemingModuleHelper = createThemingModuleHelper;
|
|
62
61
|
//# sourceMappingURL=ThemingModuleHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemingModuleHelpers.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModuleHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemingModuleHelpers.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModuleHelpers.ts"],"names":[],"mappings":";;;;AAMA,oEAA8E;AAE9E,+DAAmE;AAGnE,0EAAuE;AAIvE,SAAS,WAAW,CAAC,OAAqC,EAA2B;IACnF,OAAQ,OAAwB,CAAC,OAAO,KAAK,SAAS,CAAC;AAAA,CACxD;AAED,SAAS,oBAAoB,CAAC,MAA2B,EAAE,KAAmB,EAAE,OAAe,EAAE;IAC/F,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;IAChC,CAAC;AAAA,CACF;AAED,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC;IAC/C,OAAO,OAAO,IAAI,aAAa,CAAC;AAAA,CACjC,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B,EAAE,YAA0B,EAAE,OAAgB,EAAiB;IAC/G,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAK,EAAoB,CAAC;AAAA,CACnD;AAED;;GAEG;AACH,8BAAqC,MAA2B,EAAE,KAAmB,EAAE,EAAW,EAAE,SAAkB,EAAE;IACtH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACjD,OAAO,IAAA,sCAAwB,EAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAAA,CAC7D;AAED;;GAEG;AACH,mCAA0C,aAAmC,EAAE,OAAuB,EAAwB;IAC5H,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACpE,MAAM,YAAY,GAAiB,EAAE,CAAC;IACtC,IAAI,UAAU,GAAG,aAAa,CAAC,YAAY,EAAE,CAAC,uBAAuB,IAAI,EAAE,CAAC;IAC5E,OAAO;QACL,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,IAAiC,EAAE,EAAE,CAAC;YACtF,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QAAA,CAC9E,CAAC,CAAC;IACL,OAAO;QACL,mBAAmB,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC;YACzC,OAAO,IAAA,kCAAmB,EAAC,IAAA,mDAAwB,GAAE,EAAE,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;QAAA,CAChI;QACD,0BAA0B,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC;YAChD,OAAO,CAAC,OAAe,EAAE,EAAE,CAAC;gBAC1B,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC3D,OAAO,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;YAAA,CACnE,CAAC;QAAA,CACH;QACD,WAAW,EAAE,CAAC,QAAyC,EAAE,EAAE,CAAC;YAC1D,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAAA,CACvE;KACF,CAAC;AAAA,CACH"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHostSettingsWin32 =
|
|
3
|
+
exports.getHostSettingsWin32 = getHostSettingsWin32;
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
function getHostSettingsWin32(theme) {
|
|
8
8
|
return theme.host?.palette ? theme.host : undefined;
|
|
9
9
|
}
|
|
10
|
-
exports.getHostSettingsWin32 = getHostSettingsWin32;
|
|
11
10
|
//# sourceMappingURL=getHostSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,8BAAqC,KAAa,EAA8B;IAC9E,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CACrD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHostSettingsWin32 = exports.ThemingModuleHelper = void 0;
|
|
4
|
-
|
|
4
|
+
const ThemingModule_1 = require("./ThemingModule");
|
|
5
5
|
Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return ThemingModule_1.ThemingModuleHelper; } });
|
|
6
|
-
|
|
6
|
+
const getHostSettings_1 = require("./getHostSettings");
|
|
7
7
|
Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return getHostSettings_1.getHostSettingsWin32; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAE5B,uDAAyD;AAAhD,uHAAA,oBAAoB,OAAA"}
|
|
@@ -15,20 +15,30 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.useThemeRegistry = exports.ThemeRegistryContext = exports.useTheme = exports.ThemeContext = void 0;
|
|
27
37
|
const React = __importStar(require("react"));
|
|
28
38
|
/**
|
|
29
39
|
* @deprecated
|
|
30
40
|
*/
|
|
31
|
-
|
|
41
|
+
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
32
42
|
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return theming_ramp_1.ThemeContext; } });
|
|
33
43
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theming_ramp_1.useTheme; } });
|
|
34
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B;;GAEG;AACH,+DAAsE;AAA7D,4GAAA,YAAY,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAE/B;;GAEG;AACU,QAAA,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,SAAS,CAAC,CAAC;AAClF;;GAEG;AACI,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,QAAA,oBAAoB,CAAC,CAAC;AAAhE,QAAA,gBAAgB,GAAhB,gBAAgB,CAAgD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IThemeEventListener } from '@uifabricshared/theme-registry';
|
|
3
3
|
import type { ITheme } from './Theme.types';
|
|
4
|
+
import type { FurnJSX } from '@fluentui-react-native/framework-base';
|
|
4
5
|
/**
|
|
5
6
|
* props for the ThemeLayer
|
|
6
7
|
* @deprecated
|
|
@@ -16,7 +17,7 @@ export interface IThemeLayerProps {
|
|
|
16
17
|
* children function that allows passing of the theme to children. This is a standard pattern for
|
|
17
18
|
* consumers.
|
|
18
19
|
*/
|
|
19
|
-
children: (theme: ITheme) =>
|
|
20
|
+
children: (theme: ITheme) => FurnJSX.Element | null;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
|
|
@@ -54,7 +55,7 @@ export declare class ThemeLayer extends React.Component<IThemeLayerProps> {
|
|
|
54
55
|
onInvalidate: IThemeEventListener['onInvalidate'];
|
|
55
56
|
/** standard cleanup handler to ensure we unregister */
|
|
56
57
|
componentWillUnmount(): void;
|
|
57
|
-
render():
|
|
58
|
+
render(): FurnJSX.Element;
|
|
58
59
|
/** helper to register if this is the first time and to update the filter if necessary */
|
|
59
60
|
private _ensureCallbackRegistration;
|
|
60
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeLayer.d.ts","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeLayer.d.ts","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAKtD;IAEF,uDAAuD;IAChD,oBAAoB,IAAI,IAAI,CAKlC;IAEM,MAAM,IAAI,OAAO,CAAC,OAAO,CAkB/B;IAED,yFAAyF;IACzF,OAAO,CAAC,2BAA2B,CAKjC;CACH"}
|
|
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.ThemeLayer = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
38
|
const React = __importStar(require("react"));
|
|
28
39
|
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
29
40
|
const Global_1 = require("./Global");
|
|
@@ -75,18 +86,18 @@ class ThemeLayer extends React.Component {
|
|
|
75
86
|
}
|
|
76
87
|
render() {
|
|
77
88
|
let themeName = this.props.themeName;
|
|
78
|
-
return (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
return (jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Consumer, { children: (theme) => {
|
|
90
|
+
// go to provider mode if a themeName is specified or if this is the first consumer and the context
|
|
91
|
+
// is undefined.
|
|
92
|
+
if (themeName !== undefined || theme === undefined) {
|
|
93
|
+
themeName = themeName || '';
|
|
94
|
+
this._ensureCallbackRegistration(themeName);
|
|
95
|
+
theme = (0, Global_1.getTheme)(themeName);
|
|
96
|
+
return jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: this.props.children(theme) });
|
|
97
|
+
}
|
|
98
|
+
// otherwise in consumer mode just push the current theme to the children
|
|
99
|
+
return this.props.children(theme);
|
|
100
|
+
} }));
|
|
90
101
|
}
|
|
91
102
|
/** helper to register if this is the first time and to update the filter if necessary */
|
|
92
103
|
_ensureCallbackRegistration = (themeName) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeLayer.js","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeLayer.js","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B,+DAA4D;AAE5D,qCAA2F;AAuB3F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,gBAAwB,SAAQ,KAAK,CAAC,SAA2B;IAC/D;;;OAGG;IACK,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,GAAwC,CAAC,IAAY,EAAE,EAAE,CAAC;QAC3E,2DAA2D;QAC3D,IAAI,IAAI,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACnC,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;IAAA,CACF,CAAC;IAEF,uDAAuD;IAChD,oBAAoB,GAAS;QAClC,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,oCAA2B,EAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC;IAAA,CACF;IAEM,MAAM,GAAoB;QAC/B,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,OAAO,CACL,kBAAC,2BAAY,CAAC,QAAQ,cACnB,CAAC,KAAc,EAAE,EAAE,CAAC;gBACnB,mGAAmG;gBACnG,gBAAgB;gBAChB,IAAI,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACnD,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;oBAC5B,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;oBAC5C,KAAK,GAAG,IAAA,iBAAQ,EAAC,SAAS,CAAC,CAAC;oBAC5B,OAAO,kBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAyB,CAAC;gBACnG,CAAC;gBACD,yEAAyE;gBACzE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAAA,CACnC,GACqB,CACzB,CAAC;IAAA,CACH;IAED,yFAAyF;IACjF,2BAA2B,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC;QAC3D,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,iCAAwB,EAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAAA,CACnC,CAAC;CACH"}
|
|
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.ThemeProvider = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
38
|
const React = __importStar(require("react"));
|
|
28
39
|
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
29
40
|
const Global_1 = require("./Global");
|
|
@@ -49,9 +60,9 @@ const ThemeProvider = (props) => {
|
|
|
49
60
|
registryToUse.removeEventListener(themeInvalidater);
|
|
50
61
|
};
|
|
51
62
|
}, [registryToUse, themeName, setThemeState]);
|
|
52
|
-
const themeProvider =
|
|
63
|
+
const themeProvider = jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: children });
|
|
53
64
|
// note `registryFromProps` came from props and it's not the same as `registryToUse`
|
|
54
|
-
return registryFromProps ? (
|
|
65
|
+
return registryFromProps ? (jsx_runtime_1.jsx(ThemeContext_1.ThemeRegistryContext.Provider, { value: registryFromProps, children: themeProvider })) : (themeProvider);
|
|
55
66
|
};
|
|
56
67
|
exports.ThemeProvider = ThemeProvider;
|
|
57
68
|
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B,+DAA4D;AAE5D,qCAA4C;AAC5C,iDAAwE;AAGxE;;;GAGG;AACI,MAAM,aAAa,GAAiD,CAAC,KAA0B,EAAE,EAAE,CAAC;IACzG,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/E,MAAM,eAAe,GAAG,IAAA,+BAAgB,GAAE,CAAC;IAC3C,MAAM,aAAa,GAAG,iBAAiB,IAAI,eAAe,IAAI,IAAA,yBAAgB,GAAE,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACpB,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,MAAM,gBAAgB,GAAwB;YAC5C,YAAY,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC;gBAC9B,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAAA,CACxE;SACF,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,GAAG,EAAE,CAAC;YACX,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;QAAA,CACrD,CAAC;IAAA,CACH,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9C,MAAM,aAAa,GAAG,kBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,kBAAC,mCAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,YAAG,aAAa,GAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AAAA,CACH,CAAC;AA7BW,QAAA,aAAa,GAAb,aAAa,CA6BxB"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -4,28 +4,28 @@ exports.getHostSettingsWin32 = exports.ThemingModuleHelper = exports.useThemeReg
|
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
const Global_1 = require("./Global");
|
|
8
8
|
Object.defineProperty(exports, "addThemeRegistryListener", { enumerable: true, get: function () { return Global_1.addThemeRegistryListener; } });
|
|
9
9
|
Object.defineProperty(exports, "removeThemeRegistryListener", { enumerable: true, get: function () { return Global_1.removeThemeRegistryListener; } });
|
|
10
10
|
Object.defineProperty(exports, "setTheme", { enumerable: true, get: function () { return Global_1.setTheme; } });
|
|
11
11
|
Object.defineProperty(exports, "getTheme", { enumerable: true, get: function () { return Global_1.getTheme; } });
|
|
12
12
|
Object.defineProperty(exports, "augmentPlatformTheme", { enumerable: true, get: function () { return Global_1.augmentPlatformTheme; } });
|
|
13
|
-
|
|
13
|
+
const ThemeLayer_1 = require("./ThemeLayer");
|
|
14
14
|
Object.defineProperty(exports, "ThemeLayer", { enumerable: true, get: function () { return ThemeLayer_1.ThemeLayer; } });
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
const platform_1 = require("./platform");
|
|
19
19
|
Object.defineProperty(exports, "createPlatformThemeRegistry", { enumerable: true, get: function () { return platform_1.createPlatformThemeRegistry; } });
|
|
20
20
|
/**
|
|
21
21
|
* @deprecated
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const ThemeProvider_1 = require("./ThemeProvider");
|
|
24
24
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
const ThemeContext_1 = require("./ThemeContext");
|
|
29
29
|
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeContext; } });
|
|
30
30
|
Object.defineProperty(exports, "ThemeRegistryContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeRegistryContext; } });
|
|
31
31
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
|
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "useThemeRegistry", { enumerable: true, get: func
|
|
|
33
33
|
/**
|
|
34
34
|
* @deprecated
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
const NativeModule_1 = require("./NativeModule");
|
|
37
37
|
Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return NativeModule_1.ThemingModuleHelper; } });
|
|
38
38
|
Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return NativeModule_1.getHostSettingsWin32; } });
|
|
39
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,qCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAaxG,6CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB;;GAEG;AACH,yCAAyD;AAAhD,uHAAA,2BAA2B,OAAA;AACpC;;GAEG;AACH,mDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAKtB;;GAEG;AACH,iDAAgG;AAAvF,4GAAA,YAAY,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACvE;;GAEG;AACH,iDAA2E;AAAlE,mHAAA,mBAAmB,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPlatformThemeRegistry =
|
|
3
|
+
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
4
4
|
const theme_registry_1 = require("@uifabricshared/theme-registry");
|
|
5
5
|
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
6
6
|
const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
|
|
@@ -10,5 +10,4 @@ const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
|
|
|
10
10
|
function createPlatformThemeRegistry(_themeId, _module) {
|
|
11
11
|
return (0, theme_registry_1.createThemeRegistry)((0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(), theming_ramp_1.resolvePartialTheme);
|
|
12
12
|
}
|
|
13
|
-
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
14
13
|
//# sourceMappingURL=PlatformDefaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAEnE,0EAAuE;AAGvE;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAEnE,0EAAuE;AAGvE;;GAEG;AACH,qCAA4C,QAAiB,EAAE,OAA8B,EAAE;IAC7F,OAAO,IAAA,oCAAmB,EAAC,IAAA,mDAAwB,GAAE,EAAE,kCAAmB,CAAC,CAAC;AAAA,CAC7E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPlatformThemeRegistry =
|
|
3
|
+
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
4
4
|
const theme_registry_1 = require("@uifabricshared/theme-registry");
|
|
5
5
|
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
6
6
|
const NativeModule_1 = require("../NativeModule");
|
|
@@ -14,5 +14,4 @@ function createPlatformThemeRegistry(platformThemeId, module = NativeModule_1.Th
|
|
|
14
14
|
});
|
|
15
15
|
return registry;
|
|
16
16
|
}
|
|
17
|
-
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
18
17
|
//# sourceMappingURL=PlatformDefaults.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAGnE,kDAAsD;AAEtD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAGnE,kDAAsD;AAEtD;;GAEG;AACH,qCAA4C,eAAwB,EAAE,MAAM,GAAyB,kCAAmB,EAAE;IACxH,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,kCAAmB,CAAC,CAAC;IACvG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QACvB,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAAA,CAC9E,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAAA,CACjB"}
|
package/package.json
CHANGED
|
@@ -1,101 +1,98 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uifabricshared/theming-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "A library of functions which produce React Native styles from a Theme",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
11
|
+
"directory": "packages/deprecated/theming-react-native"
|
|
12
|
+
},
|
|
5
13
|
"main": "lib-commonjs/index.js",
|
|
6
14
|
"module": "lib/index.js",
|
|
7
|
-
"
|
|
8
|
-
"typings": "lib/index.d.ts",
|
|
15
|
+
"types": "lib/index.d.ts",
|
|
9
16
|
"exports": {
|
|
10
17
|
".": {
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
11
19
|
"import": "./lib/index.js",
|
|
12
20
|
"require": "./lib-commonjs/index.js",
|
|
13
|
-
"
|
|
21
|
+
"default": "./src/index.ts"
|
|
14
22
|
}
|
|
15
23
|
},
|
|
16
24
|
"scripts": {
|
|
17
25
|
"build": "fluentui-scripts build",
|
|
18
|
-
"
|
|
26
|
+
"build-cjs": "tsgo --outDir lib-commonjs",
|
|
27
|
+
"build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
|
|
19
28
|
"clean": "fluentui-scripts clean",
|
|
20
29
|
"depcheck": "fluentui-scripts depcheck",
|
|
21
30
|
"lint": "fluentui-scripts eslint",
|
|
31
|
+
"lint-package": "fluentui-scripts lint-package",
|
|
32
|
+
"format": "fluentui-scripts format",
|
|
22
33
|
"start": "fluentui-scripts dev",
|
|
23
34
|
"start-test": "fluentui-scripts jest-watch",
|
|
24
35
|
"test": "fluentui-scripts jest",
|
|
25
|
-
"update-snapshots": "fluentui-scripts jest -u"
|
|
26
|
-
"prettier": "fluentui-scripts prettier",
|
|
27
|
-
"prettier-fix": "fluentui-scripts prettier --fix true"
|
|
28
|
-
},
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
32
|
-
"directory": "packages/deprecated/theming-react-native"
|
|
36
|
+
"update-snapshots": "fluentui-scripts jest -u"
|
|
33
37
|
},
|
|
34
|
-
"keywords": [],
|
|
35
|
-
"author": "",
|
|
36
|
-
"license": "MIT",
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@fluentui-react-native/default-theme": "0.
|
|
39
|
-
"@fluentui-react-native/win32-theme": "0.
|
|
40
|
-
"@uifabricshared/theme-registry": "0.
|
|
41
|
-
"@uifabricshared/theming-ramp": "0.
|
|
39
|
+
"@fluentui-react-native/default-theme": "0.27.1",
|
|
40
|
+
"@fluentui-react-native/win32-theme": "0.39.1",
|
|
41
|
+
"@uifabricshared/theme-registry": "0.13.1",
|
|
42
|
+
"@uifabricshared/theming-ramp": "0.21.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@babel/core": "^7.20.0",
|
|
45
46
|
"@fluentui-react-native/babel-config": "0.1.1",
|
|
46
|
-
"@fluentui-react-native/eslint-config-rules": "0.1.
|
|
47
|
-
"@fluentui-react-native/
|
|
48
|
-
"@react-native/
|
|
49
|
-
"@react-native/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"react": "
|
|
53
|
-
"react-native": "^0.
|
|
54
|
-
"react
|
|
55
|
-
"react
|
|
56
|
-
"
|
|
47
|
+
"@fluentui-react-native/eslint-config-rules": "0.1.2",
|
|
48
|
+
"@fluentui-react-native/framework-base": "0.3.1",
|
|
49
|
+
"@fluentui-react-native/kit-config": "0.1.2",
|
|
50
|
+
"@fluentui-react-native/scripts": "0.1.0",
|
|
51
|
+
"@react-native-community/cli": "^20.0.0",
|
|
52
|
+
"@react-native-community/cli-platform-android": "^20.0.0",
|
|
53
|
+
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
54
|
+
"@react-native/metro-config": "^0.81.0",
|
|
55
|
+
"@types/react": "~19.1.0",
|
|
56
|
+
"react": "19.1.0",
|
|
57
|
+
"react-native": "^0.81.0",
|
|
58
|
+
"react-native-macos": "^0.81.0",
|
|
59
|
+
"react-native-windows": "^0.81.0"
|
|
57
60
|
},
|
|
58
61
|
"peerDependencies": {
|
|
59
62
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
60
|
-
"react": "18.2.0",
|
|
61
|
-
"react
|
|
62
|
-
"react-native
|
|
63
|
-
"react-native-
|
|
63
|
+
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0",
|
|
64
|
+
"react": "18.2.0 || 19.0.0 || 19.1.0",
|
|
65
|
+
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
|
|
66
|
+
"react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
|
|
67
|
+
"react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@office-iss/react-native-win32": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"@types/react": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"react-native-macos": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"react-native-windows": {
|
|
80
|
+
"optional": true
|
|
81
|
+
}
|
|
64
82
|
},
|
|
65
83
|
"rnx-kit": {
|
|
66
84
|
"kitType": "library",
|
|
67
85
|
"alignDeps": {
|
|
68
|
-
"presets": [
|
|
69
|
-
"microsoft/react-native"
|
|
70
|
-
],
|
|
71
|
-
"requirements": {
|
|
72
|
-
"development": [
|
|
73
|
-
"react-native@0.74"
|
|
74
|
-
],
|
|
75
|
-
"production": [
|
|
76
|
-
"react-native@0.73 || 0.74"
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
86
|
"capabilities": [
|
|
80
|
-
"babel-preset-react-native",
|
|
81
87
|
"core",
|
|
82
88
|
"core-android",
|
|
83
89
|
"core-ios",
|
|
84
90
|
"core-macos",
|
|
85
91
|
"core-windows",
|
|
86
|
-
"react"
|
|
92
|
+
"react",
|
|
93
|
+
"tools-core"
|
|
87
94
|
]
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"peerDependenciesMeta": {
|
|
91
|
-
"@office-iss/react-native-win32": {
|
|
92
|
-
"optional": true
|
|
93
|
-
},
|
|
94
|
-
"react-native-macos": {
|
|
95
|
-
"optional": true
|
|
96
95
|
},
|
|
97
|
-
"react-native-
|
|
98
|
-
"optional": true
|
|
99
|
-
}
|
|
96
|
+
"extends": "@fluentui-react-native/kit-config"
|
|
100
97
|
}
|
|
101
|
-
}
|
|
98
|
+
}
|
package/src/ThemeLayer.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { ThemeContext } from '@uifabricshared/theming-ramp';
|
|
|
5
5
|
|
|
6
6
|
import { removeThemeRegistryListener, getTheme, addThemeRegistryListener } from './Global';
|
|
7
7
|
import type { ITheme } from './Theme.types';
|
|
8
|
+
import type { FurnJSX } from '@fluentui-react-native/framework-base';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* props for the ThemeLayer
|
|
@@ -22,7 +23,7 @@ export interface IThemeLayerProps {
|
|
|
22
23
|
* children function that allows passing of the theme to children. This is a standard pattern for
|
|
23
24
|
* consumers.
|
|
24
25
|
*/
|
|
25
|
-
children: (theme: ITheme) =>
|
|
26
|
+
children: (theme: ITheme) => FurnJSX.Element | null;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -74,7 +75,7 @@ export class ThemeLayer extends React.Component<IThemeLayerProps> {
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
public render():
|
|
78
|
+
public render(): FurnJSX.Element {
|
|
78
79
|
let themeName = this.props.themeName;
|
|
79
80
|
return (
|
|
80
81
|
<ThemeContext.Consumer>
|
package/babel.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@fluentui-react-native/babel-config');
|