@fluentui/tokens 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +264 -1
- package/CHANGELOG.md +86 -2
- package/dist/index.d.ts +460 -0
- package/lib/alias/darkColor.js +162 -0
- package/lib/alias/darkColor.js.map +1 -0
- package/lib/alias/darkColorPalette.js +67 -0
- package/lib/alias/darkColorPalette.js.map +1 -0
- package/lib/alias/highContrastColor.js +162 -0
- package/lib/alias/highContrastColor.js.map +1 -0
- package/lib/alias/highContrastColorPalette.js +52 -0
- package/lib/alias/highContrastColorPalette.js.map +1 -0
- package/lib/alias/lightColor.js +162 -0
- package/lib/alias/lightColor.js.map +1 -0
- package/lib/alias/lightColorPalette.js +57 -0
- package/lib/alias/lightColorPalette.js.map +1 -0
- package/lib/alias/teamsDarkColor.js +162 -0
- package/lib/alias/teamsDarkColor.js.map +1 -0
- package/lib/global/borderRadius.js +8 -0
- package/lib/global/borderRadius.js.map +1 -0
- package/lib/global/brandColors.js +54 -0
- package/lib/global/brandColors.js.map +1 -0
- package/lib/global/colorPalette.js +45 -0
- package/lib/global/colorPalette.js.map +1 -0
- package/lib/global/colors.js +807 -0
- package/lib/global/colors.js.map +1 -0
- package/lib/global/curves.js +11 -0
- package/lib/global/curves.js.map +1 -0
- package/lib/global/durations.js +10 -0
- package/lib/global/durations.js.map +1 -0
- package/lib/global/fonts.js +37 -0
- package/lib/global/fonts.js.map +1 -0
- package/lib/global/index.js +9 -0
- package/lib/global/index.js.map +1 -0
- package/lib/global/spacings.js +40 -0
- package/lib/global/spacings.js.map +1 -0
- package/lib/global/strokeWidths.js +6 -0
- package/lib/global/strokeWidths.js.map +1 -0
- package/lib/global/typographyStyles.js +107 -0
- package/lib/global/typographyStyles.js.map +1 -0
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -1
- package/lib/sharedColorNames.js +60 -0
- package/lib/sharedColorNames.js.map +1 -0
- package/lib/statusColorMapping.js +5 -0
- package/lib/statusColorMapping.js.map +1 -0
- package/lib/themeToTokensObject.js +15 -0
- package/lib/themeToTokensObject.js.map +1 -0
- package/lib/themes/index.js +2 -0
- package/lib/themes/index.js.map +1 -0
- package/lib/themes/teams/darkTheme.js +3 -0
- package/lib/themes/teams/darkTheme.js.map +1 -0
- package/lib/themes/teams/highContrastTheme.js +2 -0
- package/lib/themes/teams/highContrastTheme.js.map +1 -0
- package/lib/themes/teams/index.js +3 -0
- package/lib/themes/teams/index.js.map +1 -0
- package/lib/themes/teams/lightTheme.js +3 -0
- package/lib/themes/teams/lightTheme.js.map +1 -0
- package/lib/themes/web/darkTheme.js +3 -0
- package/lib/themes/web/darkTheme.js.map +1 -0
- package/lib/themes/web/index.js +2 -0
- package/lib/themes/web/index.js.map +1 -0
- package/lib/themes/web/lightTheme.js +3 -0
- package/lib/themes/web/lightTheme.js.map +1 -0
- package/lib/tokens.js +480 -0
- package/lib/tokens.js.map +1 -0
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/createDarkTheme.js +27 -0
- package/lib/utils/createDarkTheme.js.map +1 -0
- package/lib/utils/createHighContrastTheme.js +27 -0
- package/lib/utils/createHighContrastTheme.js.map +1 -0
- package/lib/utils/createLightTheme.js +27 -0
- package/lib/utils/createLightTheme.js.map +1 -0
- package/lib/utils/createTeamsDarkTheme.js +27 -0
- package/lib/utils/createTeamsDarkTheme.js.map +1 -0
- package/lib/utils/index.js +4 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/shadows.js +10 -0
- package/lib/utils/shadows.js.map +1 -0
- package/lib-commonjs/alias/darkColor.js +172 -0
- package/lib-commonjs/alias/darkColor.js.map +1 -0
- package/lib-commonjs/alias/darkColorPalette.js +85 -0
- package/lib-commonjs/alias/darkColorPalette.js.map +1 -0
- package/lib-commonjs/alias/highContrastColor.js +172 -0
- package/lib-commonjs/alias/highContrastColor.js.map +1 -0
- package/lib-commonjs/alias/highContrastColorPalette.js +70 -0
- package/lib-commonjs/alias/highContrastColorPalette.js.map +1 -0
- package/lib-commonjs/alias/lightColor.js +172 -0
- package/lib-commonjs/alias/lightColor.js.map +1 -0
- package/lib-commonjs/alias/lightColorPalette.js +75 -0
- package/lib-commonjs/alias/lightColorPalette.js.map +1 -0
- package/lib-commonjs/alias/teamsDarkColor.js +172 -0
- package/lib-commonjs/alias/teamsDarkColor.js.map +1 -0
- package/lib-commonjs/global/borderRadius.js +18 -0
- package/lib-commonjs/global/borderRadius.js.map +1 -0
- package/lib-commonjs/global/brandColors.js +75 -0
- package/lib-commonjs/global/brandColors.js.map +1 -0
- package/lib-commonjs/global/colorPalette.js +66 -0
- package/lib-commonjs/global/colorPalette.js.map +1 -0
- package/lib-commonjs/global/colors.js +1014 -0
- package/lib-commonjs/global/colors.js.map +1 -0
- package/lib-commonjs/global/curves.js +21 -0
- package/lib-commonjs/global/curves.js.map +1 -0
- package/lib-commonjs/global/durations.js +20 -0
- package/lib-commonjs/global/durations.js.map +1 -0
- package/lib-commonjs/global/fonts.js +59 -0
- package/lib-commonjs/global/fonts.js.map +1 -0
- package/lib-commonjs/global/index.js +13 -0
- package/lib-commonjs/global/index.js.map +1 -0
- package/lib-commonjs/global/spacings.js +58 -0
- package/lib-commonjs/global/spacings.js.map +1 -0
- package/lib-commonjs/global/strokeWidths.js +16 -0
- package/lib-commonjs/global/strokeWidths.js.map +1 -0
- package/lib-commonjs/global/typographyStyles.js +115 -0
- package/lib-commonjs/global/typographyStyles.js.map +1 -0
- package/lib-commonjs/index.js +50 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/sharedColorNames.js +84 -0
- package/lib-commonjs/sharedColorNames.js.map +1 -0
- package/lib-commonjs/statusColorMapping.js +15 -0
- package/lib-commonjs/statusColorMapping.js.map +1 -0
- package/lib-commonjs/themeToTokensObject.js +25 -0
- package/lib-commonjs/themeToTokensObject.js.map +1 -0
- package/lib-commonjs/themes/index.js +7 -0
- package/lib-commonjs/themes/index.js.map +1 -0
- package/lib-commonjs/themes/teams/darkTheme.js +13 -0
- package/lib-commonjs/themes/teams/darkTheme.js.map +1 -0
- package/lib-commonjs/themes/teams/highContrastTheme.js +12 -0
- package/lib-commonjs/themes/teams/highContrastTheme.js.map +1 -0
- package/lib-commonjs/themes/teams/index.js +8 -0
- package/lib-commonjs/themes/teams/index.js.map +1 -0
- package/lib-commonjs/themes/teams/lightTheme.js +13 -0
- package/lib-commonjs/themes/teams/lightTheme.js.map +1 -0
- package/lib-commonjs/themes/web/darkTheme.js +13 -0
- package/lib-commonjs/themes/web/darkTheme.js.map +1 -0
- package/lib-commonjs/themes/web/index.js +7 -0
- package/lib-commonjs/themes/web/index.js.map +1 -0
- package/lib-commonjs/themes/web/lightTheme.js +13 -0
- package/lib-commonjs/themes/web/lightTheme.js.map +1 -0
- package/lib-commonjs/tokens.js +490 -0
- package/lib-commonjs/tokens.js.map +1 -0
- package/lib-commonjs/types.js +4 -0
- package/lib-commonjs/types.js.map +1 -0
- package/lib-commonjs/utils/createDarkTheme.js +37 -0
- package/lib-commonjs/utils/createDarkTheme.js.map +1 -0
- package/lib-commonjs/utils/createHighContrastTheme.js +37 -0
- package/lib-commonjs/utils/createHighContrastTheme.js.map +1 -0
- package/lib-commonjs/utils/createLightTheme.js +37 -0
- package/lib-commonjs/utils/createLightTheme.js.map +1 -0
- package/lib-commonjs/utils/createTeamsDarkTheme.js +37 -0
- package/lib-commonjs/utils/createTeamsDarkTheme.js.map +1 -0
- package/lib-commonjs/utils/index.js +9 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/lib-commonjs/utils/shadows.js +20 -0
- package/lib-commonjs/utils/shadows.js.map +1 -0
- package/package.json +7 -4
- package/lib-amd/index.js +0 -5
- package/lib-amd/index.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatically generates a tokens to css variables mapping object from the keys in a theme.
|
|
3
|
+
* This helps with ease of use as a user of a custom theme does not have to manually construct this object, but it could
|
|
4
|
+
* affect tree-shaking since bundlers do not know the shape of the output.
|
|
5
|
+
*
|
|
6
|
+
* @param theme - Theme from which to get the keys to generate the tokens to css variables mapping object
|
|
7
|
+
* @returns Tokens to css variables mapping object corresponding to the passed theme
|
|
8
|
+
*/ "use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "themeToTokensObject", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function() {
|
|
15
|
+
return themeToTokensObject;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function themeToTokensObject(theme) {
|
|
19
|
+
const tokens = {};
|
|
20
|
+
const keys = Object.keys(theme);
|
|
21
|
+
for (const key of keys){
|
|
22
|
+
tokens[key] = `var(--${String(key)})`;
|
|
23
|
+
}
|
|
24
|
+
return tokens;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["themeToTokensObject.js"],"sourcesContent":["/**\n * Programmatically generates a tokens to css variables mapping object from the keys in a theme.\n * This helps with ease of use as a user of a custom theme does not have to manually construct this object, but it could\n * affect tree-shaking since bundlers do not know the shape of the output.\n *\n * @param theme - Theme from which to get the keys to generate the tokens to css variables mapping object\n * @returns Tokens to css variables mapping object corresponding to the passed theme\n */ export function themeToTokensObject(theme) {\n const tokens = {};\n const keys = Object.keys(theme);\n for (const key of keys){\n tokens[key] = `var(--${String(key)})`;\n }\n return tokens;\n}\n"],"names":["themeToTokensObject","theme","tokens","keys","Object","key","String"],"mappings":"AAAA;;;;;;;CAOC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,oBAAoBC,KAAK;IACzC,MAAMC,SAAS,CAAC;IAChB,MAAMC,OAAOC,OAAOD,IAAI,CAACF;IACzB,KAAK,MAAMI,OAAOF,KAAK;QACnBD,MAAM,CAACG,IAAI,GAAG,CAAC,MAAM,EAAEC,OAAOD,KAAK,CAAC,CAAC;IACzC;IACA,OAAOH;AACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './teams/index';\nexport * from './web/index';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "teamsDarkTheme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return teamsDarkTheme;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _createTeamsDarkTheme = require("../../utils/createTeamsDarkTheme");
|
|
12
|
+
const _brandColors = require("../../global/brandColors");
|
|
13
|
+
const teamsDarkTheme = (0, _createTeamsDarkTheme.createTeamsDarkTheme)(_brandColors.brandTeams);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["darkTheme.js"],"sourcesContent":["import { createTeamsDarkTheme } from '../../utils/createTeamsDarkTheme';\nimport { brandTeams } from '../../global/brandColors';\nexport const teamsDarkTheme = createTeamsDarkTheme(brandTeams);\n"],"names":["teamsDarkTheme","createTeamsDarkTheme","brandTeams"],"mappings":";;;;+BAEaA;;;eAAAA;;;sCAFwB;6BACV;AACpB,MAAMA,iBAAiBC,IAAAA,0CAAoB,EAACC,uBAAU"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "teamsHighContrastTheme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return teamsHighContrastTheme;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _createHighContrastTheme = require("../../utils/createHighContrastTheme");
|
|
12
|
+
const teamsHighContrastTheme = (0, _createHighContrastTheme.createHighContrastTheme)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["highContrastTheme.js"],"sourcesContent":["import { createHighContrastTheme } from '../../utils/createHighContrastTheme';\nexport const teamsHighContrastTheme = createHighContrastTheme();\n"],"names":["teamsHighContrastTheme","createHighContrastTheme"],"mappings":";;;;+BACaA;;;eAAAA;;;yCAD2B;AACjC,MAAMA,yBAAyBC,IAAAA,gDAAuB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./lightTheme"), exports);
|
|
7
|
+
_export_star._(require("./darkTheme"), exports);
|
|
8
|
+
_export_star._(require("./highContrastTheme"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './lightTheme';\nexport * from './darkTheme';\nexport * from './highContrastTheme';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "teamsLightTheme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return teamsLightTheme;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _createLightTheme = require("../../utils/createLightTheme");
|
|
12
|
+
const _brandColors = require("../../global/brandColors");
|
|
13
|
+
const teamsLightTheme = (0, _createLightTheme.createLightTheme)(_brandColors.brandTeams);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["lightTheme.js"],"sourcesContent":["import { createLightTheme } from '../../utils/createLightTheme';\nimport { brandTeams } from '../../global/brandColors';\nexport const teamsLightTheme = createLightTheme(brandTeams);\n"],"names":["teamsLightTheme","createLightTheme","brandTeams"],"mappings":";;;;+BAEaA;;;eAAAA;;;kCAFoB;6BACN;AACpB,MAAMA,kBAAkBC,IAAAA,kCAAgB,EAACC,uBAAU"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "webDarkTheme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return webDarkTheme;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _createDarkTheme = require("../../utils/createDarkTheme");
|
|
12
|
+
const _brandColors = require("../../global/brandColors");
|
|
13
|
+
const webDarkTheme = (0, _createDarkTheme.createDarkTheme)(_brandColors.brandWeb);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["darkTheme.js"],"sourcesContent":["import { createDarkTheme } from '../../utils/createDarkTheme';\nimport { brandWeb } from '../../global/brandColors';\nexport const webDarkTheme = createDarkTheme(brandWeb);\n"],"names":["webDarkTheme","createDarkTheme","brandWeb"],"mappings":";;;;+BAEaA;;;eAAAA;;;iCAFmB;6BACP;AAClB,MAAMA,eAAeC,IAAAA,gCAAe,EAACC,qBAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './lightTheme';\nexport * from './darkTheme';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "webLightTheme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return webLightTheme;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _createLightTheme = require("../../utils/createLightTheme");
|
|
12
|
+
const _brandColors = require("../../global/brandColors");
|
|
13
|
+
const webLightTheme = (0, _createLightTheme.createLightTheme)(_brandColors.brandWeb);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["lightTheme.js"],"sourcesContent":["import { createLightTheme } from '../../utils/createLightTheme';\nimport { brandWeb } from '../../global/brandColors';\nexport const webLightTheme = createLightTheme(brandWeb);\n"],"names":["webLightTheme","createLightTheme","brandWeb"],"mappings":";;;;+BAEaA;;;eAAAA;;;kCAFoB;6BACR;AAClB,MAAMA,gBAAgBC,IAAAA,kCAAgB,EAACC,qBAAQ"}
|