@fluentui/react-theme 9.0.0-nightly.46b9ea7036.0 → 9.0.0-rc.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 +139 -10
- package/CHANGELOG.md +42 -7
- package/dist/react-theme.d.ts +106 -74
- package/lib/alias/dark.js +155 -114
- package/lib/alias/dark.js.map +1 -1
- package/lib/alias/highContrast.js +155 -114
- package/lib/alias/highContrast.js.map +1 -1
- package/lib/alias/light.js +155 -114
- package/lib/alias/light.js.map +1 -1
- package/lib/alias/teamsDark.js +155 -114
- package/lib/alias/teamsDark.js.map +1 -1
- package/lib/global/borderRadius.js +1 -1
- package/lib/global/borderRadius.js.map +1 -1
- package/lib/global/brandColors.d.ts +1 -0
- package/lib/global/brandColors.js +53 -31
- package/lib/global/brandColors.js.map +1 -1
- package/lib/global/colors.d.ts +2 -2
- package/lib/global/colors.js +125 -125
- package/lib/global/colors.js.map +1 -1
- package/lib/global/fonts.js +4 -4
- package/lib/global/fonts.js.map +1 -1
- package/lib/global/strokeWidths.js +1 -1
- package/lib/global/strokeWidths.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/themeToTokensObject.d.ts +10 -0
- package/lib/themeToTokensObject.js +19 -0
- package/lib/themeToTokensObject.js.map +1 -0
- package/lib/themes/teams/darkTheme.js +1 -1
- package/lib/themes/teams/darkTheme.js.map +1 -1
- package/lib/themes/teams/highContrastTheme.js +1 -1
- package/lib/themes/teams/highContrastTheme.js.map +1 -1
- package/lib/themes/teams/lightTheme.js +1 -1
- package/lib/themes/teams/lightTheme.js.map +1 -1
- package/lib/themes/web/darkTheme.js +1 -1
- package/lib/themes/web/darkTheme.js.map +1 -1
- package/lib/themes/web/highContrastTheme.js +1 -1
- package/lib/themes/web/highContrastTheme.js.map +1 -1
- package/lib/themes/web/lightTheme.js +1 -1
- package/lib/themes/web/lightTheme.js.map +1 -1
- package/lib/tokens.d.ts +2 -0
- package/lib/tokens.js +687 -0
- package/lib/tokens.js.map +1 -0
- package/lib/types.d.ts +92 -77
- package/lib/utils/createDarkTheme.js +13 -4
- package/lib/utils/createDarkTheme.js.map +1 -1
- package/lib/utils/createHighContrastTheme.js +13 -4
- package/lib/utils/createHighContrastTheme.js.map +1 -1
- package/lib/utils/createLightTheme.js +13 -4
- package/lib/utils/createLightTheme.js.map +1 -1
- package/lib/utils/createTeamsDarkTheme.js +13 -4
- package/lib/utils/createTeamsDarkTheme.js.map +1 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.js +0 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/shadows.d.ts +2 -1
- package/lib/utils/shadows.js +7 -7
- package/lib/utils/shadows.js.map +1 -1
- package/lib-commonjs/alias/dark.js +155 -115
- package/lib-commonjs/alias/dark.js.map +1 -1
- package/lib-commonjs/alias/highContrast.js +155 -115
- package/lib-commonjs/alias/highContrast.js.map +1 -1
- package/lib-commonjs/alias/light.js +155 -115
- package/lib-commonjs/alias/light.js.map +1 -1
- package/lib-commonjs/alias/teamsDark.js +155 -115
- package/lib-commonjs/alias/teamsDark.js.map +1 -1
- package/lib-commonjs/global/brandColors.d.ts +1 -0
- package/lib-commonjs/global/brandColors.js +52 -30
- package/lib-commonjs/global/brandColors.js.map +1 -1
- package/lib-commonjs/global/colors.d.ts +2 -2
- package/lib-commonjs/global/colors.js +113 -113
- package/lib-commonjs/global/colors.js.map +1 -1
- package/lib-commonjs/global/index.js +1 -1
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +20 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/themeToTokensObject.d.ts +10 -0
- package/lib-commonjs/themeToTokensObject.js +28 -0
- package/lib-commonjs/themeToTokensObject.js.map +1 -0
- package/lib-commonjs/themes/index.js +1 -1
- package/lib-commonjs/themes/teams/darkTheme.js +2 -2
- package/lib-commonjs/themes/teams/darkTheme.js.map +1 -1
- package/lib-commonjs/themes/teams/highContrastTheme.js +1 -1
- package/lib-commonjs/themes/teams/highContrastTheme.js.map +1 -1
- package/lib-commonjs/themes/teams/index.js +1 -1
- package/lib-commonjs/themes/teams/lightTheme.js +2 -2
- package/lib-commonjs/themes/teams/lightTheme.js.map +1 -1
- package/lib-commonjs/themes/web/darkTheme.js +2 -2
- package/lib-commonjs/themes/web/darkTheme.js.map +1 -1
- package/lib-commonjs/themes/web/highContrastTheme.js +1 -1
- package/lib-commonjs/themes/web/highContrastTheme.js.map +1 -1
- package/lib-commonjs/themes/web/index.js +1 -1
- package/lib-commonjs/themes/web/lightTheme.js +2 -2
- package/lib-commonjs/themes/web/lightTheme.js.map +1 -1
- package/lib-commonjs/tokens.d.ts +2 -0
- package/lib-commonjs/tokens.js +693 -0
- package/lib-commonjs/tokens.js.map +1 -0
- package/lib-commonjs/types.d.ts +92 -77
- package/lib-commonjs/utils/createDarkTheme.js +16 -8
- package/lib-commonjs/utils/createDarkTheme.js.map +1 -1
- package/lib-commonjs/utils/createHighContrastTheme.js +16 -8
- package/lib-commonjs/utils/createHighContrastTheme.js.map +1 -1
- package/lib-commonjs/utils/createLightTheme.js +16 -8
- package/lib-commonjs/utils/createLightTheme.js.map +1 -1
- package/lib-commonjs/utils/createTeamsDarkTheme.js +16 -8
- package/lib-commonjs/utils/createTeamsDarkTheme.js.map +1 -1
- package/lib-commonjs/utils/index.d.ts +0 -2
- package/lib-commonjs/utils/index.js +1 -13
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/shadows.d.ts +2 -1
- package/lib-commonjs/utils/shadows.js +7 -7
- package/lib-commonjs/utils/shadows.js.map +1 -1
- package/package.json +6 -6
- package/lib/utils/mergeThemes.d.ts +0 -2
- package/lib/utils/mergeThemes.js +0 -14
- package/lib/utils/mergeThemes.js.map +0 -1
- package/lib/utils/themeToCSSVariables.d.ts +0 -2
- package/lib/utils/themeToCSSVariables.js +0 -12
- package/lib/utils/themeToCSSVariables.js.map +0 -1
- package/lib-commonjs/utils/mergeThemes.d.ts +0 -2
- package/lib-commonjs/utils/mergeThemes.js +0 -24
- package/lib-commonjs/utils/mergeThemes.js.map +0 -1
- package/lib-commonjs/utils/themeToCSSVariables.d.ts +0 -2
- package/lib-commonjs/utils/themeToCSSVariables.js +0 -21
- package/lib-commonjs/utils/themeToCSSVariables.js.map +0 -1
package/lib-commonjs/index.js
CHANGED
@@ -3,10 +3,29 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
exports.tokens = exports.themeToTokensObject = void 0;
|
6
7
|
|
7
|
-
|
8
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
9
|
|
9
10
|
tslib_1.__exportStar(require("./themes/index"), exports);
|
10
11
|
|
11
12
|
tslib_1.__exportStar(require("./utils/index"), exports);
|
13
|
+
|
14
|
+
var themeToTokensObject_1 = /*#__PURE__*/require("./themeToTokensObject");
|
15
|
+
|
16
|
+
Object.defineProperty(exports, "themeToTokensObject", {
|
17
|
+
enumerable: true,
|
18
|
+
get: function () {
|
19
|
+
return themeToTokensObject_1.themeToTokensObject;
|
20
|
+
}
|
21
|
+
});
|
22
|
+
|
23
|
+
var tokens_1 = /*#__PURE__*/require("./tokens");
|
24
|
+
|
25
|
+
Object.defineProperty(exports, "tokens", {
|
26
|
+
enumerable: true,
|
27
|
+
get: function () {
|
28
|
+
return tokens_1.tokens;
|
29
|
+
}
|
30
|
+
});
|
12
31
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AAEA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA;;AACT,IAAA,QAAA,gBAAA,OAAA,CAAA,UAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,QAAA,CAAA,MAAA;AAAM;AAAN,CAAA","sourceRoot":""}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Theme } from './types';
|
2
|
+
/**
|
3
|
+
* Programmatically generates a tokens to css variables mapping object from the keys in a theme.
|
4
|
+
* This helps with ease of use as a user of a custom theme does not have to manually construct this object, but it could
|
5
|
+
* affect tree-shaking since bundlers do not know the shape of the output.
|
6
|
+
*
|
7
|
+
* @param theme - Theme from which to get the keys to generate the tokens to css variables mapping object
|
8
|
+
* @returns Tokens to css variables mapping object corresponding to the passed theme
|
9
|
+
*/
|
10
|
+
export declare function themeToTokensObject<TTheme extends Theme>(theme: TTheme): Record<keyof TTheme, string>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.themeToTokensObject = void 0;
|
7
|
+
/**
|
8
|
+
* Programmatically generates a tokens to css variables mapping object from the keys in a theme.
|
9
|
+
* This helps with ease of use as a user of a custom theme does not have to manually construct this object, but it could
|
10
|
+
* affect tree-shaking since bundlers do not know the shape of the output.
|
11
|
+
*
|
12
|
+
* @param theme - Theme from which to get the keys to generate the tokens to css variables mapping object
|
13
|
+
* @returns Tokens to css variables mapping object corresponding to the passed theme
|
14
|
+
*/
|
15
|
+
|
16
|
+
function themeToTokensObject(theme) {
|
17
|
+
const tokens = {};
|
18
|
+
const keys = Object.keys(theme);
|
19
|
+
|
20
|
+
for (const key of keys) {
|
21
|
+
tokens[key] = `var(--${key})`;
|
22
|
+
}
|
23
|
+
|
24
|
+
return tokens;
|
25
|
+
}
|
26
|
+
|
27
|
+
exports.themeToTokensObject = themeToTokensObject;
|
28
|
+
//# sourceMappingURL=themeToTokensObject.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/themeToTokensObject.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;;;AAOG;;AACH,SAAgB,mBAAhB,CAA0D,KAA1D,EAAuE;AACrE,QAAM,MAAM,GAAG,EAAf;AACA,QAAM,IAAI,GAAG,MAAM,CAAC,IAAP,CAAY,KAAZ,CAAb;;AACA,OAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;AACtB,IAAA,MAAM,CAAC,GAAD,CAAN,GAAc,SAAS,GAAG,GAA1B;AACD;;AACD,SAAO,MAAP;AACD;;AAPD,OAAA,CAAA,mBAAA,GAAA,mBAAA","sourceRoot":""}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.teamsDarkTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createTeamsDarkTheme_1 = /*#__PURE__*/require("../../utils/createTeamsDarkTheme");
|
9
9
|
|
10
|
-
|
10
|
+
const brandColors_1 = /*#__PURE__*/require("../../global/brandColors");
|
11
11
|
|
12
12
|
exports.teamsDarkTheme = /*#__PURE__*/createTeamsDarkTheme_1.createTeamsDarkTheme(brandColors_1.brandTeams);
|
13
13
|
//# sourceMappingURL=darkTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/teams/darkTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/teams/darkTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,sBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGa,OAAA,CAAA,cAAA,gBAAwB,sBAAA,CAAA,oBAAA,CAAqB,aAAA,CAAA,UAArB,CAAxB","sourceRoot":""}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.teamsHighContrastTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createHighContrastTheme_1 = /*#__PURE__*/require("../../utils/createHighContrastTheme");
|
9
9
|
|
10
10
|
exports.teamsHighContrastTheme = /*#__PURE__*/createHighContrastTheme_1.createHighContrastTheme();
|
11
11
|
//# sourceMappingURL=highContrastTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/teams/highContrastTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/teams/highContrastTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,yBAAA,gBAAA,OAAA,CAAA,qCAAA,CAAA;;AAGa,OAAA,CAAA,sBAAA,gBAAgC,yBAAA,CAAA,uBAAA,EAAhC","sourceRoot":""}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.teamsLightTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createLightTheme_1 = /*#__PURE__*/require("../../utils/createLightTheme");
|
9
9
|
|
10
|
-
|
10
|
+
const brandColors_1 = /*#__PURE__*/require("../../global/brandColors");
|
11
11
|
|
12
12
|
exports.teamsLightTheme = /*#__PURE__*/createLightTheme_1.createLightTheme(brandColors_1.brandTeams);
|
13
13
|
//# sourceMappingURL=lightTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/teams/lightTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/teams/lightTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,kBAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGa,OAAA,CAAA,eAAA,gBAAyB,kBAAA,CAAA,gBAAA,CAAiB,aAAA,CAAA,UAAjB,CAAzB","sourceRoot":""}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.webDarkTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createDarkTheme_1 = /*#__PURE__*/require("../../utils/createDarkTheme");
|
9
9
|
|
10
|
-
|
10
|
+
const brandColors_1 = /*#__PURE__*/require("../../global/brandColors");
|
11
11
|
|
12
12
|
exports.webDarkTheme = /*#__PURE__*/createDarkTheme_1.createDarkTheme(brandColors_1.brandWeb);
|
13
13
|
//# sourceMappingURL=darkTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/web/darkTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/web/darkTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGa,OAAA,CAAA,YAAA,gBAAsB,iBAAA,CAAA,eAAA,CAAgB,aAAA,CAAA,QAAhB,CAAtB","sourceRoot":""}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.webHighContrastTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createHighContrastTheme_1 = /*#__PURE__*/require("../../utils/createHighContrastTheme");
|
9
9
|
|
10
10
|
exports.webHighContrastTheme = /*#__PURE__*/createHighContrastTheme_1.createHighContrastTheme();
|
11
11
|
//# sourceMappingURL=highContrastTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/web/highContrastTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/web/highContrastTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,yBAAA,gBAAA,OAAA,CAAA,qCAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,gBAA8B,yBAAA,CAAA,uBAAA,EAA9B","sourceRoot":""}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.webLightTheme = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const createLightTheme_1 = /*#__PURE__*/require("../../utils/createLightTheme");
|
9
9
|
|
10
|
-
|
10
|
+
const brandColors_1 = /*#__PURE__*/require("../../global/brandColors");
|
11
11
|
|
12
12
|
exports.webLightTheme = /*#__PURE__*/createLightTheme_1.createLightTheme(brandColors_1.brandWeb);
|
13
13
|
//# sourceMappingURL=lightTheme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/themes/web/lightTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/themes/web/lightTheme.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,kBAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGa,OAAA,CAAA,aAAA,gBAAuB,kBAAA,CAAA,gBAAA,CAAiB,aAAA,CAAA,QAAjB,CAAvB","sourceRoot":""}
|