@uifabricshared/theming-react-native 0.20.19 → 0.21.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.md +97 -3
- package/README.md +1 -1
- package/etc/theming-react-native.api.md +12 -11
- package/lib/BaselinePlatformDefaults.d.ts +1 -1
- package/lib/BaselinePlatformDefaults.js +2 -2
- package/lib/BaselinePlatformDefaults.js.map +1 -1
- package/lib/Global.d.ts +1 -1
- package/lib/Global.js +11 -11
- package/lib/Global.js.map +1 -1
- package/lib/NativeModule/ThemingModule.d.ts +2 -2
- package/lib/NativeModule/ThemingModule.js +1 -1
- package/lib/NativeModule/ThemingModule.types.d.ts +13 -13
- package/lib/NativeModule/ThemingModule.types.js +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.d.ts +8 -3
- package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.js +36 -36
- package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
- package/lib/NativeModule/getHostSettings.d.ts +1 -1
- package/lib/NativeModule/getHostSettings.js +2 -2
- package/lib/NativeModule/getHostSettings.js.map +1 -1
- package/lib/NativeModule/index.d.ts +1 -1
- package/lib/NativeModule/index.js +1 -1
- package/lib/Theme.types.d.ts +1 -1
- package/lib/Theme.types.js +1 -1
- package/lib/ThemeContext.d.ts +1 -1
- package/lib/ThemeContext.js +1 -1
- package/lib/ThemeLayer.d.ts +25 -24
- package/lib/ThemeLayer.d.ts.map +1 -1
- package/lib/ThemeLayer.js +42 -39
- package/lib/ThemeLayer.js.map +1 -1
- package/lib/ThemeProvider.d.ts +1 -1
- package/lib/ThemeProvider.js +21 -20
- package/lib/ThemeProvider.js.map +1 -1
- package/lib/ThemeProvider.types.d.ts +3 -3
- package/lib/ThemeProvider.types.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/platform/PlatformDefaults.d.ts +8 -2
- package/lib/platform/PlatformDefaults.d.ts.map +1 -1
- package/lib/platform/PlatformDefaults.js +2 -2
- package/lib/platform/PlatformDefaults.js.map +1 -1
- package/lib/platform/PlatformDefaults.native.d.ts +8 -2
- package/lib/platform/PlatformDefaults.native.d.ts.map +1 -1
- package/lib/platform/PlatformDefaults.native.js +6 -6
- package/lib/platform/PlatformDefaults.native.js.map +1 -1
- package/lib/platform/index.d.ts +1 -1
- package/lib/platform/index.js +1 -1
- package/lib-commonjs/BaselinePlatformDefaults.d.ts +1 -1
- package/lib-commonjs/BaselinePlatformDefaults.js +6 -7
- package/lib-commonjs/BaselinePlatformDefaults.js.map +1 -1
- package/lib-commonjs/Global.d.ts +1 -1
- package/lib-commonjs/Global.js +21 -22
- package/lib-commonjs/Global.js.map +1 -1
- package/lib-commonjs/NativeModule/ThemingModule.d.ts +2 -2
- package/lib-commonjs/NativeModule/ThemingModule.js +5 -5
- package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +13 -13
- package/lib-commonjs/NativeModule/ThemingModule.types.js +3 -3
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +8 -3
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +46 -44
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +1 -1
- package/lib-commonjs/NativeModule/getHostSettings.d.ts +1 -1
- package/lib-commonjs/NativeModule/getHostSettings.js +5 -6
- package/lib-commonjs/NativeModule/getHostSettings.js.map +1 -1
- package/lib-commonjs/NativeModule/index.d.ts +1 -1
- package/lib-commonjs/NativeModule/index.js +17 -7
- package/lib-commonjs/NativeModule/index.js.map +1 -1
- package/lib-commonjs/Theme.types.d.ts +1 -1
- package/lib-commonjs/Theme.types.js +3 -3
- package/lib-commonjs/ThemeContext.d.ts +1 -1
- package/lib-commonjs/ThemeContext.js +67 -30
- package/lib-commonjs/ThemeContext.js.map +1 -1
- package/lib-commonjs/ThemeLayer.d.ts +25 -24
- package/lib-commonjs/ThemeLayer.d.ts.map +1 -1
- package/lib-commonjs/ThemeLayer.js +97 -67
- package/lib-commonjs/ThemeLayer.js.map +1 -1
- package/lib-commonjs/ThemeProvider.d.ts +1 -1
- package/lib-commonjs/ThemeProvider.js +79 -49
- package/lib-commonjs/ThemeProvider.js.map +1 -1
- package/lib-commonjs/ThemeProvider.types.d.ts +3 -3
- package/lib-commonjs/ThemeProvider.types.js +3 -3
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.js +108 -24
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/platform/PlatformDefaults.d.ts +8 -2
- package/lib-commonjs/platform/PlatformDefaults.js +11 -9
- package/lib-commonjs/platform/PlatformDefaults.js.map +1 -1
- package/lib-commonjs/platform/PlatformDefaults.native.d.ts +8 -2
- package/lib-commonjs/platform/PlatformDefaults.native.js +15 -13
- package/lib-commonjs/platform/PlatformDefaults.native.js.map +1 -1
- package/lib-commonjs/platform/index.d.ts +1 -1
- package/lib-commonjs/platform/index.js +29 -18
- package/package.json +58 -62
- package/src/ThemeLayer.tsx +3 -2
- package/babel.config.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './PlatformDefaults';
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return m[k];
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}
|
|
18
|
+
: function (o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
});
|
|
22
|
+
var __exportStar =
|
|
23
|
+
(this && this.__exportStar) ||
|
|
24
|
+
function (m, exports) {
|
|
25
|
+
for (var p in m) if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
28
|
+
__exportStar(require('./PlatformDefaults'), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,101 +1,97 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uifabricshared/theming-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "A library of functions which produce React Native styles from a Theme",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
9
|
+
"directory": "packages/deprecated/theming-react-native"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "",
|
|
9
13
|
"exports": {
|
|
10
14
|
".": {
|
|
15
|
+
"types": "./lib/index.d.ts",
|
|
11
16
|
"import": "./lib/index.js",
|
|
12
|
-
"require": "./lib-commonjs/index.js"
|
|
13
|
-
"types": "./lib/index.d.ts"
|
|
17
|
+
"require": "./lib-commonjs/index.js"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
20
|
+
"main": "lib-commonjs/index.js",
|
|
21
|
+
"module": "lib/index.js",
|
|
22
|
+
"types": "lib/index.d.ts",
|
|
16
23
|
"scripts": {
|
|
17
24
|
"build": "fluentui-scripts build",
|
|
18
|
-
"
|
|
25
|
+
"build-cjs": "tsgo --outDir lib-commonjs",
|
|
26
|
+
"build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler",
|
|
19
27
|
"clean": "fluentui-scripts clean",
|
|
20
28
|
"depcheck": "fluentui-scripts depcheck",
|
|
21
29
|
"lint": "fluentui-scripts eslint",
|
|
30
|
+
"lint-package": "fluentui-scripts lint-package",
|
|
31
|
+
"prettier": "fluentui-scripts prettier",
|
|
22
32
|
"start": "fluentui-scripts dev",
|
|
23
33
|
"start-test": "fluentui-scripts jest-watch",
|
|
24
34
|
"test": "fluentui-scripts jest",
|
|
25
|
-
"update-snapshots": "fluentui-scripts jest -u"
|
|
26
|
-
"prettier": "fluentui-scripts prettier",
|
|
27
|
-
"prettier-fix": "fluentui-scripts prettier --fix true"
|
|
35
|
+
"update-snapshots": "fluentui-scripts jest -u"
|
|
28
36
|
},
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
32
|
-
"directory": "packages/deprecated/theming-react-native"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [],
|
|
35
|
-
"author": "",
|
|
36
|
-
"license": "MIT",
|
|
37
37
|
"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.
|
|
38
|
+
"@fluentui-react-native/default-theme": "0.27.0",
|
|
39
|
+
"@fluentui-react-native/win32-theme": "0.39.0",
|
|
40
|
+
"@uifabricshared/theme-registry": "0.13.0",
|
|
41
|
+
"@uifabricshared/theming-ramp": "0.21.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@babel/core": "^7.20.0",
|
|
45
45
|
"@fluentui-react-native/babel-config": "0.1.1",
|
|
46
46
|
"@fluentui-react-native/eslint-config-rules": "0.1.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/framework-base": "0.3.0",
|
|
48
|
+
"@fluentui-react-native/kit-config": "0.1.2",
|
|
49
|
+
"@fluentui-react-native/scripts": "0.1.2",
|
|
50
|
+
"@react-native-community/cli": "^20.0.0",
|
|
51
|
+
"@react-native-community/cli-platform-android": "^20.0.0",
|
|
52
|
+
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
53
|
+
"@react-native/metro-config": "^0.81.0",
|
|
54
|
+
"@types/react": "~19.1.0",
|
|
55
|
+
"react": "19.1.0",
|
|
56
|
+
"react-native": "^0.81.0",
|
|
57
|
+
"react-native-macos": "^0.81.0",
|
|
58
|
+
"react-native-windows": "^0.81.0"
|
|
57
59
|
},
|
|
58
60
|
"peerDependencies": {
|
|
59
61
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
60
|
-
"react": "18.2.0",
|
|
61
|
-
"react
|
|
62
|
-
"react-native
|
|
63
|
-
"react-native-
|
|
62
|
+
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0",
|
|
63
|
+
"react": "18.2.0 || 19.0.0 || 19.1.0",
|
|
64
|
+
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
|
|
65
|
+
"react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
|
|
66
|
+
"react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
|
|
67
|
+
},
|
|
68
|
+
"peerDependenciesMeta": {
|
|
69
|
+
"@office-iss/react-native-win32": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"@types/react": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"react-native-macos": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"react-native-windows": {
|
|
79
|
+
"optional": true
|
|
80
|
+
}
|
|
64
81
|
},
|
|
65
82
|
"rnx-kit": {
|
|
66
83
|
"kitType": "library",
|
|
67
84
|
"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
85
|
"capabilities": [
|
|
80
|
-
"babel-preset-react-native",
|
|
81
86
|
"core",
|
|
82
87
|
"core-android",
|
|
83
88
|
"core-ios",
|
|
84
89
|
"core-macos",
|
|
85
90
|
"core-windows",
|
|
86
|
-
"react"
|
|
91
|
+
"react",
|
|
92
|
+
"tools-core"
|
|
87
93
|
]
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"peerDependenciesMeta": {
|
|
91
|
-
"@office-iss/react-native-win32": {
|
|
92
|
-
"optional": true
|
|
93
94
|
},
|
|
94
|
-
"react-native-
|
|
95
|
-
"optional": true
|
|
96
|
-
},
|
|
97
|
-
"react-native-windows": {
|
|
98
|
-
"optional": true
|
|
99
|
-
}
|
|
95
|
+
"extends": "@fluentui-react-native/kit-config"
|
|
100
96
|
}
|
|
101
|
-
}
|
|
97
|
+
}
|
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');
|