first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
@@ -0,0 +1,4 @@
import type { IThemeSlotRule } from './IThemeSlotRule';
export interface IThemeRules {
[key: string]: IThemeSlotRule;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=IThemeRules.js.map
@@ -0,0 +1 @@
{"version":3,"file":"IThemeRules.js","sourceRoot":"../src/","sources":["components/ThemeGenerator/IThemeRules.ts"],"names":[],"mappings":"","sourcesContent":["import type { IThemeSlotRule } from './IThemeSlotRule';\n\nexport interface IThemeRules {\n [key: string]: IThemeSlotRule;\n}\n"]}
@@ -0,0 +1,25 @@
import { Shade } from '../../utilities/color/shades';
import type { IColor } from '../../utilities/color/interfaces';
export interface IThemeSlotRule {
/** The name of this theme slot. */
name: string;
/** The actual color this theme slot is if it is a color. */
color?: IColor;
/** The value of this slot if it is NOT a color. Must be falsey if not a color. */
value?: string;
/** The theme slot this slot is based on. */
inherits?: IThemeSlotRule;
/** If set, this slot is the specified shade of the slot it inherits from. */
asShade?: Shade;
/**
* Whether this slot is a background shade, which uses different logic for generating its inheriting-as-shade value.
*/
isBackgroundShade?: boolean;
/** Whether this slot has been manually overridden (else, it was automatically generated based on inheritance). */
isCustomized?: boolean;
/**
* A collection of rules that inherit from this one. It is the responsibility of the inheriting rule to add
* itself to its parent's dependentRules collection.
*/
dependentRules: IThemeSlotRule[];
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=IThemeSlotRule.js.map
@@ -0,0 +1 @@
{"version":3,"file":"IThemeSlotRule.js","sourceRoot":"../src/","sources":["components/ThemeGenerator/IThemeSlotRule.ts"],"names":[],"mappings":"","sourcesContent":["import { Shade } from '../../utilities/color/shades';\nimport type { IColor } from '../../utilities/color/interfaces';\n\nexport interface IThemeSlotRule {\n /** The name of this theme slot. */\n name: string;\n /** The actual color this theme slot is if it is a color. */\n color?: IColor;\n /** The value of this slot if it is NOT a color. Must be falsey if not a color. */\n value?: string;\n /** The theme slot this slot is based on. */\n inherits?: IThemeSlotRule;\n /** If set, this slot is the specified shade of the slot it inherits from. */\n asShade?: Shade;\n /**\n * Whether this slot is a background shade, which uses different logic for generating its inheriting-as-shade value.\n */\n isBackgroundShade?: boolean;\n /** Whether this slot has been manually overridden (else, it was automatically generated based on inheritance). */\n isCustomized?: boolean;\n /**\n * A collection of rules that inherit from this one. It is the responsibility of the inheriting rule to add\n * itself to its parent's dependentRules collection.\n */\n dependentRules: IThemeSlotRule[];\n}\n"]}
@@ -0,0 +1,88 @@
import type { IColor } from '../../utilities/color/interfaces';
import type { IThemeSlotRule } from './IThemeSlotRule';
import type { IThemeRules } from './IThemeRules';
export declare class ThemeGenerator {
/**
* Sets an IThemeSlotRule to the given color and cascades it to the rest of the theme, updating other IThemeSlotRules
* in the theme that inherit from that color.
* @param isInverted - whether it's a dark theme or not, which affects the algorithm used to generate shades
* @param isCustomization - should be true only if it's a user action, and indicates overwriting the slot's
* inheritance (if any)
* @param overwriteCustomColor - A slot could have a generated color based on its inheritance rules (isCustomized
* is false), or a custom color based on user input (isCustomized is true). This bool tells us whether to override
* existing customized colors.
*/
static setSlot(rule: IThemeSlotRule, color: string | IColor, isInverted?: boolean, isCustomization?: boolean, overwriteCustomColor?: boolean): void;
/**
* Sets the color of each slot based on its rule. Slots that don't inherit must have a color already.
* If this completes without error, then the theme is ready to use. (All slots will have a color.)
* setSlot() can be called before this, but this must be called before getThemeAs*().
* Does not override colors of rules where isCustomized is true (i.e. doesn't override existing customizations).
*/
static insureSlots(slotRules: IThemeRules, isInverted: boolean): void;
/**
* Gets the JSON-formatted blob that describes the theme, usable with the REST request endpoints:
* ```
* { [theme slot name as string] : [color as string],
* "tokenName": "#f00f00",
* "tokenName2": "#ba2ba2",
* ... }
* ```
*/
static getThemeAsJson(slotRules: IThemeRules): any;
/**
* Gets code-formatted load theme blob that can be copy and pasted.
* Only used for the old theme designer, where loadTheme usage is acceptable,
* unlike in the new theme designer.
*/
static getThemeAsCode(slotRules: IThemeRules): any;
/**
* Gets code-formatted load theme blob, specifically for the new theme designer,
* aka.ms/themedesigner. Shouldn't use loadTheme like the old theme designer since it's deprecated.
* We want to use the theme object from createTheme and use the Customizations.applySettings API instead.
*/
static getThemeAsCodeWithCreateTheme(slotRules: IThemeRules): any;
/**
* Gets the theme as a list of SASS variables that can be used in code
* ```
* $tokenName: "[theme:tokenName, default:#f00f00]";
* $tokenName2: "[theme:tokenName2, default:#ba2ba2]";
* ...
* ```
*/
static getThemeAsSass(slotRules: IThemeRules): any;
/**
* Gets the theme formatted for PowerShell scripts
* ```
* @{
* "tokenName" = "#f00f00";
* "tokenName2" = "#ba2ba2";
* ...
* }
* ```
*/
static getThemeForPowerShell(slotRules: IThemeRules): any;
/**
* Sets the given slot's color to the appropriate color, shading it if necessary.
* Then, iterates through all other rules (that are this rule's dependents) to update them accordingly.
* @param isCustomization - If true, it's a user-provided color, which should be to that raw color.
* If false, the rule it's inheriting from changed, so updated using asShade.
*/
private static _setSlot;
/**
* Makes the rest of the code that's used for the load theme blob in the exported codepens of
* both the older sharepoint-specific theme designer and the new theme designer. Takes in
* theme rules and converts them to format fitting a list of palette colors and their values.
* Resulting output looks like:
* ```
* const _theme = createTheme({
* palette: {
* themePrimary: '#0078d4',
* themeLighterAlt: '#f3f9fd',
* ...
* }});
* ```
* The first line is loadTheme instead of createTheme for the old sharepoint theme designer.
*/
private static _makeRemainingCode;
}
@@ -0,0 +1,221 @@
define(["require", "exports", "../../utilities/color/getColorFromString", "../../utilities/color/shades", "../../Utilities"], function (require, exports, getColorFromString_1, shades_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemeGenerator = void 0;
var ThemeGenerator = /** @class */ (function () {
function ThemeGenerator() {
}
/**
* Sets an IThemeSlotRule to the given color and cascades it to the rest of the theme, updating other IThemeSlotRules
* in the theme that inherit from that color.
* @param isInverted - whether it's a dark theme or not, which affects the algorithm used to generate shades
* @param isCustomization - should be true only if it's a user action, and indicates overwriting the slot's
* inheritance (if any)
* @param overwriteCustomColor - A slot could have a generated color based on its inheritance rules (isCustomized
* is false), or a custom color based on user input (isCustomized is true). This bool tells us whether to override
* existing customized colors.
*/
ThemeGenerator.setSlot = function (rule, color, isInverted, isCustomization, overwriteCustomColor) {
if (isInverted === void 0) { isInverted = false; }
if (isCustomization === void 0) { isCustomization = false; }
if (overwriteCustomColor === void 0) { overwriteCustomColor = true; }
if (!rule.color && rule.value) {
// not a color rule
return;
}
if (overwriteCustomColor) {
var colorAsIColor = void 0;
if (typeof color === 'string') {
colorAsIColor = (0, getColorFromString_1.getColorFromString)(color); // the ! is a lie here but we'll verify it in the next line
if (!colorAsIColor) {
throw new Error('color is invalid in setSlot(): ' + color);
}
}
else {
colorAsIColor = color;
}
ThemeGenerator._setSlot(rule, colorAsIColor, isInverted, isCustomization, overwriteCustomColor);
}
else if (rule.color) {
ThemeGenerator._setSlot(rule, rule.color, isInverted, isCustomization, overwriteCustomColor);
}
};
/**
* Sets the color of each slot based on its rule. Slots that don't inherit must have a color already.
* If this completes without error, then the theme is ready to use. (All slots will have a color.)
* setSlot() can be called before this, but this must be called before getThemeAs*().
* Does not override colors of rules where isCustomized is true (i.e. doesn't override existing customizations).
*/
ThemeGenerator.insureSlots = function (slotRules, isInverted) {
// Get all the "root" rules, the ones which don't inherit. Then "set" them to trigger updating dependent slots.
for (var ruleName in slotRules) {
if (slotRules.hasOwnProperty(ruleName)) {
var rule = slotRules[ruleName];
if (!rule.inherits && !rule.value) {
if (!rule.color) {
throw new Error('A color slot rule that does not inherit must provide its own color.');
}
ThemeGenerator._setSlot(rule, rule.color, isInverted, false, false);
}
}
}
};
/**
* Gets the JSON-formatted blob that describes the theme, usable with the REST request endpoints:
* ```
* { [theme slot name as string] : [color as string],
* "tokenName": "#f00f00",
* "tokenName2": "#ba2ba2",
* ... }
* ```
*/
ThemeGenerator.getThemeAsJson = function (slotRules) {
var theme = {};
for (var ruleName in slotRules) {
if (slotRules.hasOwnProperty(ruleName)) {
var rule = slotRules[ruleName];
theme[rule.name] = rule.color ? rule.color.str : rule.value || '';
}
}
return theme;
};
/**
* Gets code-formatted load theme blob that can be copy and pasted.
* Only used for the old theme designer, where loadTheme usage is acceptable,
* unlike in the new theme designer.
*/
ThemeGenerator.getThemeAsCode = function (slotRules) {
var output = 'loadTheme({\n palette: {\n';
return ThemeGenerator._makeRemainingCode(output, slotRules);
};
/**
* Gets code-formatted load theme blob, specifically for the new theme designer,
* aka.ms/themedesigner. Shouldn't use loadTheme like the old theme designer since it's deprecated.
* We want to use the theme object from createTheme and use the Customizations.applySettings API instead.
*/
ThemeGenerator.getThemeAsCodeWithCreateTheme = function (slotRules) {
var output = 'const myTheme = createTheme({\n palette: {\n';
return ThemeGenerator._makeRemainingCode(output, slotRules);
};
/**
* Gets the theme as a list of SASS variables that can be used in code
* ```
* $tokenName: "[theme:tokenName, default:#f00f00]";
* $tokenName2: "[theme:tokenName2, default:#ba2ba2]";
* ...
* ```
*/
ThemeGenerator.getThemeAsSass = function (slotRules) {
var sassVarTemplate = '${0}Color: "[theme: {1}, default: {2}]";\n';
var output = '';
for (var ruleName in slotRules) {
if (slotRules.hasOwnProperty(ruleName)) {
var rule = slotRules[ruleName];
var camelCasedName = rule.name.charAt(0).toLowerCase() + rule.name.slice(1);
output += (0, Utilities_1.format)(sassVarTemplate, camelCasedName, camelCasedName, rule.color ? rule.color.str : rule.value || '');
}
}
return output;
};
/**
* Gets the theme formatted for PowerShell scripts
* ```
* @{
* "tokenName" = "#f00f00";
* "tokenName2" = "#ba2ba2";
* ...
* }
* ```
*/
ThemeGenerator.getThemeForPowerShell = function (slotRules) {
var psVarTemplate = '"{0}" = "{1}";\n';
var output = '';
for (var ruleName in slotRules) {
if (slotRules.hasOwnProperty(ruleName)) {
var rule = slotRules[ruleName];
if (rule.value) {
// skip this one, it's not a color
continue;
}
var camelCasedName = rule.name.charAt(0).toLowerCase() + rule.name.slice(1);
var outputColor = rule.color ? '#' + rule.color.hex : rule.value || '';
// powershell endpoint uses the RGBA format
if (rule.color && rule.color.a && rule.color.a !== 100) {
outputColor += String(rule.color.a.toString(16));
}
output += (0, Utilities_1.format)(psVarTemplate, camelCasedName, outputColor);
}
}
return '@{\n' + output + '}';
};
/**
* Sets the given slot's color to the appropriate color, shading it if necessary.
* Then, iterates through all other rules (that are this rule's dependents) to update them accordingly.
* @param isCustomization - If true, it's a user-provided color, which should be to that raw color.
* If false, the rule it's inheriting from changed, so updated using asShade.
*/
ThemeGenerator._setSlot = function (rule, color, isInverted, isCustomization, overwriteCustomColor) {
if (overwriteCustomColor === void 0) { overwriteCustomColor = true; }
if (!rule.color && rule.value) {
// not a color rule
return;
}
if (overwriteCustomColor || !rule.color || !rule.isCustomized || !rule.inherits) {
// set the rule's color under these conditions
if ((overwriteCustomColor || !rule.isCustomized) &&
!isCustomization &&
rule.inherits &&
(0, shades_1.isValidShade)(rule.asShade)) {
// it's inheriting by shade
if (rule.isBackgroundShade) {
rule.color = (0, shades_1.getBackgroundShade)(color, rule.asShade, isInverted);
}
else {
rule.color = (0, shades_1.getShade)(color, rule.asShade, isInverted);
}
rule.isCustomized = false;
}
else {
rule.color = color;
rule.isCustomized = true;
}
// then update dependent colors
for (var _i = 0, _a = rule.dependentRules; _i < _a.length; _i++) {
var ruleToUpdate = _a[_i];
ThemeGenerator._setSlot(ruleToUpdate, rule.color, isInverted, false, overwriteCustomColor);
}
}
};
/**
* Makes the rest of the code that's used for the load theme blob in the exported codepens of
* both the older sharepoint-specific theme designer and the new theme designer. Takes in
* theme rules and converts them to format fitting a list of palette colors and their values.
* Resulting output looks like:
* ```
* const _theme = createTheme({
* palette: {
* themePrimary: '#0078d4',
* themeLighterAlt: '#f3f9fd',
* ...
* }});
* ```
* The first line is loadTheme instead of createTheme for the old sharepoint theme designer.
*/
ThemeGenerator._makeRemainingCode = function (output, slotRules) {
var attributeTemplate = " {0}: '{1}',\n";
for (var ruleName in slotRules) {
if (slotRules.hasOwnProperty(ruleName)) {
var rule = slotRules[ruleName];
var camelCasedName = rule.name.charAt(0).toLowerCase() + rule.name.slice(1);
var outputColor = rule.color ? '#' + rule.color.hex : rule.value || '';
output += (0, Utilities_1.format)(attributeTemplate, camelCasedName, outputColor);
}
}
output += ' }});';
return output;
};
return ThemeGenerator;
}());
exports.ThemeGenerator = ThemeGenerator;
});
//# sourceMappingURL=ThemeGenerator.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,38 @@
import type { IThemeRules } from './IThemeRules';
export declare enum BaseSlots {
primaryColor = 0,
backgroundColor = 1,
foregroundColor = 2
}
export declare enum FabricSlots {
themePrimary = 0,// BaseSlots.primaryColor, Shade[Shade.Unshaded]);
themeLighterAlt = 1,// BaseSlots.primaryColor, Shade[Shade.Shade1]);
themeLighter = 2,// BaseSlots.primaryColor, Shade[Shade.Shade2]);
themeLight = 3,// BaseSlots.primaryColor, Shade[Shade.Shade3]);
themeTertiary = 4,// BaseSlots.primaryColor, Shade[Shade.Shade4]);
themeSecondary = 5,// BaseSlots.primaryColor, Shade[Shade.Shade5]);
themeDarkAlt = 6,// BaseSlots.primaryColor, Shade[Shade.Shade6]);
themeDark = 7,// BaseSlots.primaryColor, Shade[Shade.Shade7]);
themeDarker = 8,// BaseSlots.primaryColor, Shade[Shade.Shade8]);
neutralLighterAlt = 9,// BaseSlots.backgroundColor, Shade[Shade.Shade1]);
neutralLighter = 10,// BaseSlots.backgroundColor, Shade[Shade.Shade2]);
neutralLight = 11,// BaseSlots.backgroundColor, Shade[Shade.Shade3]);
neutralQuaternaryAlt = 12,// BaseSlots.backgroundColor, Shade[Shade.Shade4]);
neutralQuaternary = 13,// BaseSlots.backgroundColor, Shade[Shade.Shade5]);
neutralTertiaryAlt = 14,// BaseSlots.backgroundColor, Shade[Shade.Shade6]); // bg6 or fg2
neutralTertiary = 15,// BaseSlots.foregroundColor, Shade[Shade.Shade3]);
neutralSecondaryAlt = 16,// BaseSlots.foregroundColor, Shade[Shade.Shade4]);
neutralSecondary = 17,// BaseSlots.foregroundColor, Shade[Shade.Shade5]);
neutralPrimaryAlt = 18,// BaseSlots.foregroundColor, Shade[Shade.Shade6]);
neutralPrimary = 19,// BaseSlots.foregroundColor, Shade[Shade.Unshaded]);
neutralDark = 20,// BaseSlots.foregroundColor, Shade[Shade.Shade7]);
black = 21,// BaseSlots.foregroundColor, Shade[Shade.Shade8]);
white = 22
}
export declare enum SemanticColorSlots {
bodyBackground = 0,
bodyText = 1,
disabledBackground = 2,
disabledText = 3
}
export declare function themeRulesStandardCreator(): IThemeRules;
@@ -0,0 +1,176 @@
define(["require", "exports", "../../utilities/color/shades", "../../utilities/color/getColorFromString", "../../Utilities"], function (require, exports, shades_1, getColorFromString_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SemanticColorSlots = exports.FabricSlots = exports.BaseSlots = void 0;
exports.themeRulesStandardCreator = themeRulesStandardCreator;
/* This is the set of rules for our default theme.
We start with three base slots, defining the background, foreground (text), and
primary color (sometimes called theme color). Each Fabric slot is generated from
shades (or tints) of one of those three, creating the Fabric palette.
Then, we have semantic slots, the new thing intended to eventually replace the
Fabric palette. The semantic slots inherit from the Fabric palette. */
/* The most minimal set of slots we start with. All other ones can be generated based on rules.
* This is not so much an enum as it is a list. The enum is used to insure "type"-safety.
* For now, we are only dealing with color. */
var BaseSlots;
(function (BaseSlots) {
BaseSlots[BaseSlots["primaryColor"] = 0] = "primaryColor";
BaseSlots[BaseSlots["backgroundColor"] = 1] = "backgroundColor";
BaseSlots[BaseSlots["foregroundColor"] = 2] = "foregroundColor";
})(BaseSlots || (exports.BaseSlots = BaseSlots = {}));
/* The original Fabric palette, only for back-compat. */
var FabricSlots;
(function (FabricSlots) {
FabricSlots[FabricSlots["themePrimary"] = 0] = "themePrimary";
FabricSlots[FabricSlots["themeLighterAlt"] = 1] = "themeLighterAlt";
FabricSlots[FabricSlots["themeLighter"] = 2] = "themeLighter";
FabricSlots[FabricSlots["themeLight"] = 3] = "themeLight";
FabricSlots[FabricSlots["themeTertiary"] = 4] = "themeTertiary";
FabricSlots[FabricSlots["themeSecondary"] = 5] = "themeSecondary";
FabricSlots[FabricSlots["themeDarkAlt"] = 6] = "themeDarkAlt";
FabricSlots[FabricSlots["themeDark"] = 7] = "themeDark";
FabricSlots[FabricSlots["themeDarker"] = 8] = "themeDarker";
FabricSlots[FabricSlots["neutralLighterAlt"] = 9] = "neutralLighterAlt";
FabricSlots[FabricSlots["neutralLighter"] = 10] = "neutralLighter";
FabricSlots[FabricSlots["neutralLight"] = 11] = "neutralLight";
FabricSlots[FabricSlots["neutralQuaternaryAlt"] = 12] = "neutralQuaternaryAlt";
FabricSlots[FabricSlots["neutralQuaternary"] = 13] = "neutralQuaternary";
FabricSlots[FabricSlots["neutralTertiaryAlt"] = 14] = "neutralTertiaryAlt";
FabricSlots[FabricSlots["neutralTertiary"] = 15] = "neutralTertiary";
FabricSlots[FabricSlots["neutralSecondaryAlt"] = 16] = "neutralSecondaryAlt";
FabricSlots[FabricSlots["neutralSecondary"] = 17] = "neutralSecondary";
FabricSlots[FabricSlots["neutralPrimaryAlt"] = 18] = "neutralPrimaryAlt";
FabricSlots[FabricSlots["neutralPrimary"] = 19] = "neutralPrimary";
FabricSlots[FabricSlots["neutralDark"] = 20] = "neutralDark";
FabricSlots[FabricSlots["black"] = 21] = "black";
FabricSlots[FabricSlots["white"] = 22] = "white";
})(FabricSlots || (exports.FabricSlots = FabricSlots = {}));
/* List of all the semantic color slots for this theme.
* This is not so much an enum as it is a list. The enum is used to insure "type"-safety. */
var SemanticColorSlots;
(function (SemanticColorSlots) {
SemanticColorSlots[SemanticColorSlots["bodyBackground"] = 0] = "bodyBackground";
SemanticColorSlots[SemanticColorSlots["bodyText"] = 1] = "bodyText";
SemanticColorSlots[SemanticColorSlots["disabledBackground"] = 2] = "disabledBackground";
SemanticColorSlots[SemanticColorSlots["disabledText"] = 3] = "disabledText";
})(SemanticColorSlots || (exports.SemanticColorSlots = SemanticColorSlots = {}));
function themeRulesStandardCreator() {
var slotRules = {};
/*** BASE COLORS and their SHADES */
// iterate through each base slot and make the SlotRules for those
(0, Utilities_1.mapEnumByName)(BaseSlots, function (baseSlot) {
// first make the SlotRule for the unshaded base Color
slotRules[baseSlot] = {
name: baseSlot,
isCustomized: true,
dependentRules: [],
};
// then make a rule for each shade of this base color, but skip unshaded
(0, Utilities_1.mapEnumByName)(shades_1.Shade, function (shadeName, shadeValue) {
if (shadeName === shades_1.Shade[shades_1.Shade.Unshaded]) {
return;
}
var inherits = slotRules[baseSlot];
var thisSlotRule = {
name: baseSlot + shadeName,
inherits: slotRules[baseSlot],
asShade: shadeValue,
isCustomized: false,
isBackgroundShade: baseSlot === BaseSlots[BaseSlots.backgroundColor] ? true : false,
dependentRules: [],
};
slotRules[baseSlot + shadeName] = thisSlotRule;
inherits.dependentRules.push(thisSlotRule);
return undefined;
});
return undefined;
});
// set default colors for the base colors
slotRules[BaseSlots[BaseSlots.primaryColor]].color = (0, getColorFromString_1.getColorFromString)('#0078d4');
slotRules[BaseSlots[BaseSlots.backgroundColor]].color = (0, getColorFromString_1.getColorFromString)('#ffffff');
slotRules[BaseSlots[BaseSlots.foregroundColor]].color = (0, getColorFromString_1.getColorFromString)('#323130');
function _makeFabricSlotRule(slotName, inheritedBase, inheritedShade, isBackgroundShade) {
if (isBackgroundShade === void 0) { isBackgroundShade = false; }
var inherits = slotRules[BaseSlots[inheritedBase]];
var thisSlotRule = {
name: slotName,
inherits: inherits,
asShade: inheritedShade,
isCustomized: false,
isBackgroundShade: isBackgroundShade,
dependentRules: [],
};
slotRules[slotName] = thisSlotRule;
inherits.dependentRules.push(thisSlotRule);
}
_makeFabricSlotRule(FabricSlots[FabricSlots.themePrimary], BaseSlots.primaryColor, shades_1.Shade.Unshaded);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeLighterAlt], BaseSlots.primaryColor, shades_1.Shade.Shade1);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeLighter], BaseSlots.primaryColor, shades_1.Shade.Shade2);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeLight], BaseSlots.primaryColor, shades_1.Shade.Shade3);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeTertiary], BaseSlots.primaryColor, shades_1.Shade.Shade4);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeSecondary], BaseSlots.primaryColor, shades_1.Shade.Shade5);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeDarkAlt], BaseSlots.primaryColor, shades_1.Shade.Shade6);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeDark], BaseSlots.primaryColor, shades_1.Shade.Shade7);
_makeFabricSlotRule(FabricSlots[FabricSlots.themeDarker], BaseSlots.primaryColor, shades_1.Shade.Shade8);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralLighterAlt], BaseSlots.backgroundColor, shades_1.Shade.Shade1, true);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralLighter], BaseSlots.backgroundColor, shades_1.Shade.Shade2, true);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralLight], BaseSlots.backgroundColor, shades_1.Shade.Shade3, true);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralQuaternaryAlt], BaseSlots.backgroundColor, shades_1.Shade.Shade4, true);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralQuaternary], BaseSlots.backgroundColor, shades_1.Shade.Shade5, true);
// bg6 or fg2
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralTertiaryAlt], BaseSlots.backgroundColor, shades_1.Shade.Shade6, true);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralTertiary], BaseSlots.foregroundColor, shades_1.Shade.Shade3);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralSecondary], BaseSlots.foregroundColor, shades_1.Shade.Shade4);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralSecondaryAlt], BaseSlots.foregroundColor, shades_1.Shade.Shade4);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralPrimaryAlt], BaseSlots.foregroundColor, shades_1.Shade.Shade5);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralPrimary], BaseSlots.foregroundColor, shades_1.Shade.Unshaded);
_makeFabricSlotRule(FabricSlots[FabricSlots.neutralDark], BaseSlots.foregroundColor, shades_1.Shade.Shade7);
_makeFabricSlotRule(FabricSlots[FabricSlots.black], BaseSlots.foregroundColor, shades_1.Shade.Shade8);
_makeFabricSlotRule(FabricSlots[FabricSlots.white], BaseSlots.backgroundColor, shades_1.Shade.Unshaded, true);
slotRules[FabricSlots[FabricSlots.neutralLighterAlt]].color = (0, getColorFromString_1.getColorFromString)('#faf9f8');
slotRules[FabricSlots[FabricSlots.neutralLighter]].color = (0, getColorFromString_1.getColorFromString)('#f3f2f1');
slotRules[FabricSlots[FabricSlots.neutralLight]].color = (0, getColorFromString_1.getColorFromString)('#edebe9');
slotRules[FabricSlots[FabricSlots.neutralQuaternaryAlt]].color = (0, getColorFromString_1.getColorFromString)('#e1dfdd');
slotRules[FabricSlots[FabricSlots.neutralDark]].color = (0, getColorFromString_1.getColorFromString)('#201f1e');
slotRules[FabricSlots[FabricSlots.neutralTertiaryAlt]].color = (0, getColorFromString_1.getColorFromString)('#c8c6c4');
slotRules[FabricSlots[FabricSlots.black]].color = (0, getColorFromString_1.getColorFromString)('#000000');
slotRules[FabricSlots[FabricSlots.neutralDark]].color = (0, getColorFromString_1.getColorFromString)('#201f1e');
slotRules[FabricSlots[FabricSlots.neutralPrimaryAlt]].color = (0, getColorFromString_1.getColorFromString)('#3b3a39');
slotRules[FabricSlots[FabricSlots.neutralSecondary]].color = (0, getColorFromString_1.getColorFromString)('#605e5c');
slotRules[FabricSlots[FabricSlots.neutralSecondaryAlt]].color = (0, getColorFromString_1.getColorFromString)('#8a8886');
slotRules[FabricSlots[FabricSlots.neutralTertiary]].color = (0, getColorFromString_1.getColorFromString)('#a19f9d');
slotRules[FabricSlots[FabricSlots.white]].color = (0, getColorFromString_1.getColorFromString)('#ffffff');
slotRules[FabricSlots[FabricSlots.themeDarker]].color = (0, getColorFromString_1.getColorFromString)('#004578');
slotRules[FabricSlots[FabricSlots.themeDark]].color = (0, getColorFromString_1.getColorFromString)('#005a9e');
slotRules[FabricSlots[FabricSlots.themeDarkAlt]].color = (0, getColorFromString_1.getColorFromString)('#106ebe');
slotRules[FabricSlots[FabricSlots.themeSecondary]].color = (0, getColorFromString_1.getColorFromString)('#2b88d8');
slotRules[FabricSlots[FabricSlots.themeTertiary]].color = (0, getColorFromString_1.getColorFromString)('#71afe5');
slotRules[FabricSlots[FabricSlots.themeLight]].color = (0, getColorFromString_1.getColorFromString)('#c7e0f4');
slotRules[FabricSlots[FabricSlots.themeLighter]].color = (0, getColorFromString_1.getColorFromString)('#deecf9');
slotRules[FabricSlots[FabricSlots.themeLighterAlt]].color = (0, getColorFromString_1.getColorFromString)('#eff6fc');
slotRules[FabricSlots[FabricSlots.neutralLighterAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralLighter]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralLight]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralQuaternaryAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralDark]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralTertiaryAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.black]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralDark]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralPrimaryAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralSecondary]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralSecondaryAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.neutralTertiary]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.white]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeDarker]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeDark]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeDarkAlt]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themePrimary]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeSecondary]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeTertiary]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeLight]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeLighter]].isCustomized = true;
slotRules[FabricSlots[FabricSlots.themeLighterAlt]].isCustomized = true;
return slotRules;
}
});
//# sourceMappingURL=ThemeRulesStandard.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
export * from './ThemeGenerator';
export * from './IThemeSlotRule';
export * from './IThemeRules';
export * from './ThemeRulesStandard';
@@ -0,0 +1,9 @@
define(["require", "exports", "tslib", "./ThemeGenerator", "./IThemeSlotRule", "./IThemeRules", "./ThemeRulesStandard"], function (require, exports, tslib_1, ThemeGenerator_1, IThemeSlotRule_1, IThemeRules_1, ThemeRulesStandard_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
tslib_1.__exportStar(ThemeGenerator_1, exports);
tslib_1.__exportStar(IThemeSlotRule_1, exports);
tslib_1.__exportStar(IThemeRules_1, exports);
tslib_1.__exportStar(ThemeRulesStandard_1, exports);
});
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ThemeGenerator/index.ts"],"names":[],"mappings":";;;IAAA,gDAAiC;IACjC,gDAAiC;IACjC,6CAA8B;IAC9B,oDAAqC","sourcesContent":["export * from './ThemeGenerator';\nexport * from './IThemeSlotRule';\nexport * from './IThemeRules';\nexport * from './ThemeRulesStandard';\n"]}