@operational/theme
Advanced tools
Comparing version 0.1.0-14 to 0.1.0-15
@@ -22,2 +22,3 @@ export { expandColor } from "./utils"; | ||
background: string; | ||
cardHeaderBackground: string; | ||
bodyText: string; | ||
@@ -45,2 +46,3 @@ emphasizedText: string; | ||
lineHeight: string; | ||
opacity?: number; | ||
color?: string; | ||
@@ -47,0 +49,0 @@ "&::before"?: { |
@@ -57,2 +57,3 @@ "use strict"; | ||
cardBackground: "#FFFFFF", | ||
cardHeaderBackground: "#F5F5F5", | ||
border: "#dadada", | ||
@@ -73,4 +74,4 @@ emphasizedText: "#373d3f", | ||
title: __assign({}, baseTypography, { fontSize: 24, fontWeight: 400 }), | ||
heading1: __assign({}, baseTypography, { fontSize: 16, fontWeight: 600 }), | ||
heading2: __assign({}, baseTypography, { fontSize: 16, fontWeight: 400 }), | ||
heading1: __assign({}, baseTypography, { fontSize: 16, fontWeight: 400 }), | ||
heading2: __assign({}, baseTypography, { fontSize: 16, opacity: 0.7, fontWeight: 400 }), | ||
body: __assign({}, baseTypography, { fontSize: 13, fontWeight: 400 }), | ||
@@ -81,3 +82,3 @@ small: __assign({}, baseTypography, { fontSize: 12, fontWeight: 400 }) | ||
pressed: "inset 0 1px 1px rgba(0,0,0,0.15)", | ||
card: "0px 1px 2px #d3d1d1", | ||
card: "0px 1px 3px #d3d1d1", | ||
focus: "inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)", | ||
@@ -84,0 +85,0 @@ popup: "0 3px 12px rgba(0, 0, 0, .14)" |
{ | ||
"name": "@operational/theme", | ||
"version": "0.1.0-14", | ||
"version": "0.1.0-15", | ||
"description": "Customization theme for the Operational UI packages.", | ||
@@ -18,29 +18,13 @@ "main": "./lib/index.js", | ||
"prettier": "prettier './src/**/*.{ts,tsx}' --write", | ||
"precommit": "npm run prettier", | ||
"test": "jest", | ||
"test:u": "jest -u", | ||
"ci": "npm run test && npm run lint && npm run prettier && npm run package" | ||
"test:u": "jest -u" | ||
}, | ||
"devDependencies": { | ||
"@types/core-js": "0.9.43", | ||
"@types/d3-ease": "1.0.7", | ||
"@types/d3-scale": "1.0.10", | ||
"@types/d3-selection": "1.1.0", | ||
"@types/d3-shape": "1.2.1", | ||
"@types/d3-transition": "1.1.0", | ||
"@types/enzyme": "3.1.5", | ||
"@types/jest": "20.0.8", | ||
"@types/jquery": "3.2.12", | ||
"@types/lodash": "4.14.74", | ||
"@types/marked": "0.3.0", | ||
"@types/node": "8.0.27", | ||
"@types/react": "16.0.25", | ||
"@types/react-color": "2.13.0", | ||
"@types/react-dom": "16.0.0", | ||
"@types/react-hot-loader": "3.0.4", | ||
"@types/react-icons": "2.2.2", | ||
"@types/react-router-dom": "4.2.0", | ||
"@types/react-syntax-highlighter": "0.0.3", | ||
"@types/tinycolor2": "1.4.0", | ||
"@types/webpack-env": "1.13.1", | ||
"awesome-typescript-loader": "3.4.1", | ||
@@ -47,0 +31,0 @@ "enzyme": "2.9.1", |
@@ -12,16 +12,16 @@ import { operational, expandColor } from "../index" | ||
it("expands a custom hex value", () => { | ||
expect(expandColor("#FFFFFF", operational)).toBe("#FFFFFF") | ||
expect(expandColor(operational, "#FFFFFF")).toBe("#FFFFFF") | ||
}) | ||
it("expands a known theme color key", () => { | ||
expect(expandColor("warning", operational)).toBe("#FFAE00") | ||
expect(expandColor(operational, "warning")).toBe("#FFAE00") | ||
}) | ||
it("returns null for an unrecognized color key", () => { | ||
expect(expandColor("warningXYZ", operational)).toBe(null) | ||
expect(expandColor(operational, "warningXYZ")).toBe(null) | ||
}) | ||
it("returns null for a falsy color", () => { | ||
expect(expandColor(undefined, operational)).toBe(null) | ||
expect(expandColor(operational, undefined)).toBe(null) | ||
}) | ||
}) |
@@ -52,2 +52,3 @@ // Type definitions | ||
background: string | ||
cardHeaderBackground: string | ||
bodyText: string | ||
@@ -77,2 +78,3 @@ emphasizedText: string | ||
lineHeight: string | ||
opacity?: number | ||
color?: string | ||
@@ -143,2 +145,3 @@ "&::before"?: { content: string } | ||
cardBackground: "#FFFFFF", | ||
cardHeaderBackground: "#F5F5F5", | ||
border: "#dadada", | ||
@@ -168,3 +171,3 @@ emphasizedText: "#373d3f", | ||
fontSize: 16, | ||
fontWeight: 600 | ||
fontWeight: 400 | ||
}, | ||
@@ -174,2 +177,3 @@ heading2: { | ||
fontSize: 16, | ||
opacity: 0.7, | ||
fontWeight: 400 | ||
@@ -191,3 +195,3 @@ }, | ||
pressed: "inset 0 1px 1px rgba(0,0,0,0.15)", | ||
card: "0px 1px 2px #d3d1d1", | ||
card: "0px 1px 3px #d3d1d1", | ||
focus: "inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)", | ||
@@ -194,0 +198,0 @@ popup: "0 3px 12px rgba(0, 0, 0, .14)" |
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
24
436
17102