@operational/theme
Advanced tools
Comparing version 0.1.0-12 to 0.1.0-13
@@ -0,4 +1,4 @@ | ||
export { expandColor } from "./utils"; | ||
export declare type ThemeColorName = "brand" | "info" | "success" | "warning" | "error" | "white" | "black" | "gray10" | "gray20" | "gray30" | "gray40" | "gray50" | "gray60" | "gray70" | "gray80" | "gray90" | "background" | "bodyText" | "emphasizedText" | "lightText" | "linkText" | "cardBackground" | "border" | "sidenavBackground" | "secondarySeparator" | "separator"; | ||
export interface ThemeColors { | ||
[key: string]: string; | ||
brand: string; | ||
@@ -9,2 +9,3 @@ info: string; | ||
error: string; | ||
visualizationPalette: string[]; | ||
white: string; | ||
@@ -11,0 +12,0 @@ black: string; |
@@ -12,2 +12,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var utils_1 = require("./utils"); | ||
exports.expandColor = utils_1.expandColor; | ||
// Default theme definition | ||
@@ -22,2 +24,24 @@ var colors = { | ||
black: "#000000", | ||
visualizationPalette: [ | ||
"#2ca02c", | ||
"#1f77b4", | ||
"#ff7f0e", | ||
"#d62728", | ||
"#9467bd", | ||
"#17becf", | ||
"#7f7f7f", | ||
"#e377c2", | ||
"#8c564b", | ||
"#bcbd22", | ||
"#98df8a", | ||
"#aec7e8", | ||
"#ffbb78", | ||
"#ff9896", | ||
"#c5b0d5", | ||
"#9edae5", | ||
"#c7c7c7", | ||
"#f7b6d2", | ||
"#c49c94", | ||
"#dbdb8d" | ||
], | ||
gray10: "#F8F8F8", | ||
@@ -24,0 +48,0 @@ gray20: "#e8e8e8", |
{ | ||
"name": "@operational/theme", | ||
"version": "0.1.0-12", | ||
"version": "0.1.0-13", | ||
"description": "Customization theme for the Operational UI packages.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -1,2 +0,2 @@ | ||
import { operational } from "../index" | ||
import { operational, expandColor } from "../index" | ||
@@ -9,1 +9,19 @@ describe("operational theme", () => { | ||
}) | ||
describe("expandColor", () => { | ||
it("expands a custom hex value", () => { | ||
expect(expandColor("#FFFFFF", operational)).toBe("#FFFFFF") | ||
}) | ||
it("expands a known theme color key", () => { | ||
expect(expandColor("warning", operational)).toBe("#FFAE00") | ||
}) | ||
it("returns null for an unrecognized color key", () => { | ||
expect(expandColor("warningXYZ", operational)).toBe(null) | ||
}) | ||
it("returns null for a falsy color", () => { | ||
expect(expandColor(undefined, operational)).toBe(null) | ||
}) | ||
}) |
// Type definitions | ||
export { expandColor } from "./utils" | ||
export type ThemeColorName = | ||
@@ -32,3 +34,2 @@ | "brand" | ||
export interface ThemeColors { | ||
[key: string]: string | ||
brand: string | ||
@@ -39,2 +40,3 @@ info: string | ||
error: string | ||
visualizationPalette: string[] | ||
white: string | ||
@@ -107,2 +109,24 @@ black: string | ||
black: "#000000", | ||
visualizationPalette: [ | ||
"#2ca02c", | ||
"#1f77b4", | ||
"#ff7f0e", | ||
"#d62728", | ||
"#9467bd", | ||
"#17becf", | ||
"#7f7f7f", | ||
"#e377c2", | ||
"#8c564b", | ||
"#bcbd22", | ||
"#98df8a", | ||
"#aec7e8", | ||
"#ffbb78", | ||
"#ff9896", | ||
"#c5b0d5", | ||
"#9edae5", | ||
"#c7c7c7", | ||
"#f7b6d2", | ||
"#c49c94", | ||
"#dbdb8d" | ||
], | ||
gray10: "#F8F8F8", | ||
@@ -109,0 +133,0 @@ gray20: "#e8e8e8", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17467
15
429