@uifabricshared/theming-react-native 0.20.20 → 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.
Files changed (94) hide show
  1. package/CHANGELOG.md +97 -3
  2. package/README.md +1 -1
  3. package/etc/theming-react-native.api.md +12 -11
  4. package/lib/BaselinePlatformDefaults.d.ts +1 -1
  5. package/lib/BaselinePlatformDefaults.js +2 -2
  6. package/lib/BaselinePlatformDefaults.js.map +1 -1
  7. package/lib/Global.d.ts +1 -1
  8. package/lib/Global.js +11 -11
  9. package/lib/Global.js.map +1 -1
  10. package/lib/NativeModule/ThemingModule.d.ts +2 -2
  11. package/lib/NativeModule/ThemingModule.js +1 -1
  12. package/lib/NativeModule/ThemingModule.types.d.ts +13 -13
  13. package/lib/NativeModule/ThemingModule.types.js +1 -1
  14. package/lib/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  15. package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +1 -1
  16. package/lib/NativeModule/ThemingModuleHelpers.js +36 -36
  17. package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
  18. package/lib/NativeModule/getHostSettings.d.ts +1 -1
  19. package/lib/NativeModule/getHostSettings.js +2 -2
  20. package/lib/NativeModule/getHostSettings.js.map +1 -1
  21. package/lib/NativeModule/index.d.ts +1 -1
  22. package/lib/NativeModule/index.js +1 -1
  23. package/lib/Theme.types.d.ts +1 -1
  24. package/lib/Theme.types.js +1 -1
  25. package/lib/ThemeContext.d.ts +1 -1
  26. package/lib/ThemeContext.js +1 -1
  27. package/lib/ThemeLayer.d.ts +25 -24
  28. package/lib/ThemeLayer.d.ts.map +1 -1
  29. package/lib/ThemeLayer.js +42 -39
  30. package/lib/ThemeLayer.js.map +1 -1
  31. package/lib/ThemeProvider.d.ts +1 -1
  32. package/lib/ThemeProvider.js +21 -20
  33. package/lib/ThemeProvider.js.map +1 -1
  34. package/lib/ThemeProvider.types.d.ts +3 -3
  35. package/lib/ThemeProvider.types.js +1 -1
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.js +1 -1
  38. package/lib/platform/PlatformDefaults.d.ts +8 -2
  39. package/lib/platform/PlatformDefaults.d.ts.map +1 -1
  40. package/lib/platform/PlatformDefaults.js +2 -2
  41. package/lib/platform/PlatformDefaults.js.map +1 -1
  42. package/lib/platform/PlatformDefaults.native.d.ts +8 -2
  43. package/lib/platform/PlatformDefaults.native.d.ts.map +1 -1
  44. package/lib/platform/PlatformDefaults.native.js +6 -6
  45. package/lib/platform/PlatformDefaults.native.js.map +1 -1
  46. package/lib/platform/index.d.ts +1 -1
  47. package/lib/platform/index.js +1 -1
  48. package/lib-commonjs/BaselinePlatformDefaults.d.ts +1 -1
  49. package/lib-commonjs/BaselinePlatformDefaults.js +6 -7
  50. package/lib-commonjs/BaselinePlatformDefaults.js.map +1 -1
  51. package/lib-commonjs/Global.d.ts +1 -1
  52. package/lib-commonjs/Global.js +21 -22
  53. package/lib-commonjs/Global.js.map +1 -1
  54. package/lib-commonjs/NativeModule/ThemingModule.d.ts +2 -2
  55. package/lib-commonjs/NativeModule/ThemingModule.js +5 -5
  56. package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +13 -13
  57. package/lib-commonjs/NativeModule/ThemingModule.types.js +3 -3
  58. package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  59. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +46 -44
  60. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +1 -1
  61. package/lib-commonjs/NativeModule/getHostSettings.d.ts +1 -1
  62. package/lib-commonjs/NativeModule/getHostSettings.js +5 -6
  63. package/lib-commonjs/NativeModule/getHostSettings.js.map +1 -1
  64. package/lib-commonjs/NativeModule/index.d.ts +1 -1
  65. package/lib-commonjs/NativeModule/index.js +17 -7
  66. package/lib-commonjs/NativeModule/index.js.map +1 -1
  67. package/lib-commonjs/Theme.types.d.ts +1 -1
  68. package/lib-commonjs/Theme.types.js +3 -3
  69. package/lib-commonjs/ThemeContext.d.ts +1 -1
  70. package/lib-commonjs/ThemeContext.js +67 -30
  71. package/lib-commonjs/ThemeContext.js.map +1 -1
  72. package/lib-commonjs/ThemeLayer.d.ts +25 -24
  73. package/lib-commonjs/ThemeLayer.d.ts.map +1 -1
  74. package/lib-commonjs/ThemeLayer.js +97 -67
  75. package/lib-commonjs/ThemeLayer.js.map +1 -1
  76. package/lib-commonjs/ThemeProvider.d.ts +1 -1
  77. package/lib-commonjs/ThemeProvider.js +79 -49
  78. package/lib-commonjs/ThemeProvider.js.map +1 -1
  79. package/lib-commonjs/ThemeProvider.types.d.ts +3 -3
  80. package/lib-commonjs/ThemeProvider.types.js +3 -3
  81. package/lib-commonjs/index.d.ts +1 -1
  82. package/lib-commonjs/index.js +108 -24
  83. package/lib-commonjs/index.js.map +1 -1
  84. package/lib-commonjs/platform/PlatformDefaults.d.ts +8 -2
  85. package/lib-commonjs/platform/PlatformDefaults.js +11 -9
  86. package/lib-commonjs/platform/PlatformDefaults.js.map +1 -1
  87. package/lib-commonjs/platform/PlatformDefaults.native.d.ts +8 -2
  88. package/lib-commonjs/platform/PlatformDefaults.native.js +15 -13
  89. package/lib-commonjs/platform/PlatformDefaults.native.js.map +1 -1
  90. package/lib-commonjs/platform/index.d.ts +1 -1
  91. package/lib-commonjs/platform/index.js +29 -18
  92. package/package.json +58 -62
  93. package/src/ThemeLayer.tsx +3 -2
  94. 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
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./PlatformDefaults"), exports);
18
- //# sourceMappingURL=index.js.map
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.20.20",
3
+ "version": "0.21.0",
4
4
  "description": "A library of functions which produce React Native styles from a Theme",
5
- "main": "lib-commonjs/index.js",
6
- "module": "lib/index.js",
7
- "react-native": "src/index.ts",
8
- "typings": "lib/index.d.ts",
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
- "just": "fluentui-scripts",
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.26.17",
39
- "@fluentui-react-native/win32-theme": "0.38.0",
40
- "@uifabricshared/theme-registry": "0.12.10",
41
- "@uifabricshared/theming-ramp": "0.20.17"
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/scripts": "0.1.1",
48
- "@react-native/babel-preset": "^0.74.0",
49
- "@react-native/metro-config": "^0.74.0",
50
- "@types/jest": "^29.0.0",
51
- "@types/react": "^18.2.0",
52
- "react": "18.2.0",
53
- "react-native": "^0.74.0",
54
- "react-native-macos": "^0.74.0",
55
- "react-native-windows": "^0.74.0",
56
- "typescript": "4.9.4"
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-native": "^0.73.0 || ^0.74.0",
62
- "react-native-macos": "^0.73.0 || ^0.74.0",
63
- "react-native-windows": "^0.73.0 || ^0.74.0"
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-macos": {
95
- "optional": true
96
- },
97
- "react-native-windows": {
98
- "optional": true
99
- }
95
+ "extends": "@fluentui-react-native/kit-config"
100
96
  }
101
- }
97
+ }
@@ -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) => JSX.Element | null;
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(): JSX.Element {
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');