@operational/theme
Advanced tools
Comparing version 0.2.2 to 0.3.0-alpha.fa791335
"use strict"; | ||
// Type definitions | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,3 +7,3 @@ var utils_1 = require("./utils"); | ||
// Default theme definition | ||
var colors = { | ||
const colors = { | ||
brand: "#000000", | ||
@@ -58,3 +50,3 @@ info: "#1499CE", | ||
}; | ||
var baseTypography = { | ||
const baseTypography = { | ||
lineHeight: "1.5", | ||
@@ -64,19 +56,19 @@ textTransform: "none", | ||
}; | ||
var typography = { | ||
title: __assign({}, baseTypography, { fontSize: 24, 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 }), | ||
small: __assign({}, baseTypography, { fontSize: 12, fontWeight: 400 }), | ||
const typography = { | ||
title: Object.assign({}, baseTypography, { fontSize: 24, fontWeight: 400 }), | ||
heading1: Object.assign({}, baseTypography, { fontSize: 16, fontWeight: 400 }), | ||
heading2: Object.assign({}, baseTypography, { fontSize: 16, opacity: 0.7, fontWeight: 400 }), | ||
body: Object.assign({}, baseTypography, { fontSize: 13, fontWeight: 400 }), | ||
small: Object.assign({}, baseTypography, { fontSize: 12, fontWeight: 400 }), | ||
}; | ||
var shadows = { | ||
const shadows = { | ||
pressed: "inset 0 1px 1px rgba(0,0,0,0.15)", | ||
card: "0px 1px 5px #d3d1d1", | ||
card: "0px 1px 3px rgba(0,0,0,.16)", | ||
focus: "inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)", | ||
popup: "0 3px 12px rgba(0, 0, 0, .14)", | ||
}; | ||
var operational = { | ||
typography: typography, | ||
shadows: shadows, | ||
colors: colors, | ||
const operational = { | ||
typography, | ||
shadows, | ||
colors, | ||
spacing: 16, | ||
@@ -83,0 +75,0 @@ box: 72, |
@@ -7,8 +7,8 @@ "use strict"; | ||
*/ | ||
exports.expandColor = function (theme, color) { | ||
exports.expandColor = (theme, color) => { | ||
if (!color) { | ||
return null; | ||
} | ||
var hexRegEx = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|currentColor/i; | ||
var isHex = hexRegEx.test(color); | ||
const hexRegEx = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|currentColor/i; | ||
const isHex = hexRegEx.test(color); | ||
if (isHex) { | ||
@@ -15,0 +15,0 @@ return color; |
{ | ||
"name": "@operational/theme", | ||
"version": "0.2.2", | ||
"version": "0.3.0-alpha.fa791335", | ||
"description": "Customization theme for the Operational UI packages.", | ||
@@ -14,24 +14,11 @@ "main": "./lib/index.js", | ||
"scripts": { | ||
"package": "rm -rf lib && tsc -d", | ||
"package": "rimraf lib && tsc", | ||
"precommit": "lint-staged", | ||
"package:watch": "tsc -d -w", | ||
"lint": "tslint './src/**/*.{ts,tsx}' --fix", | ||
"prettier": "prettier './src/**/*.{ts,tsx}' --write", | ||
"test": "jest", | ||
"test:u": "jest -u" | ||
"test:watch": "jest --watch" | ||
}, | ||
"devDependencies": { | ||
"@types/core-js": "0.9.43", | ||
"@types/jest": "20.0.8", | ||
"@types/node": "8.0.27", | ||
"jest": "21.2.1", | ||
"prettier": "1.8.2", | ||
"ts-jest": "21.0.0", | ||
"tslint": "5.9.1", | ||
"tslint-config-airbnb": "5.8.0", | ||
"tslint-config-prettier": "1.12.0", | ||
"typescript": "2.8.3" | ||
}, | ||
"jest": { | ||
"setupFiles": [ | ||
"./test-polyfills.js" | ||
"../../test-polyfills.js" | ||
], | ||
@@ -45,7 +32,9 @@ "moduleFileExtensions": [ | ||
"transform": { | ||
"\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
"\\.(ts|tsx)$": "<rootDir>/../../node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": "/__tests__/.*\\.(ts|tsx|js|jsx)$", | ||
"mapCoverage": true | ||
"roots": [ | ||
"<rootDir>/src" | ||
], | ||
"testRegex": "/__tests__/.*\\.(ts|tsx|js|jsx)$" | ||
} | ||
} |
@@ -167,3 +167,3 @@ // Type definitions | ||
pressed: "inset 0 1px 1px rgba(0,0,0,0.15)", | ||
card: "0px 1px 5px #d3d1d1", | ||
card: "0px 1px 3px rgba(0,0,0,.16)", | ||
focus: "inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)", | ||
@@ -170,0 +170,0 @@ popup: "0 3px 12px rgba(0, 0, 0, .14)", |
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"outDir": "lib", | ||
"target": "ES5", | ||
"module": "commonjs", | ||
"sourceMap": true, | ||
"noImplicitAny": true, | ||
"jsx": "react", | ||
"lib": ["DOM", "ES6", "DOM.Iterable", "ScriptHost", "es2017.object"], | ||
"moduleResolution": "node" | ||
}, | ||
"include": ["types/**/*", "src/index.ts"], | ||
"exclude": ["node_modules", "lib"] | ||
} | ||
"extends": "../../tsconfig.base", | ||
"compilerOptions": { "rootDir": "src", "outDir": "lib", "jsx": "react" }, | ||
"include": ["src", "types"] | ||
} |
Sorry, the diff of this file is not supported yet
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
16102
0
394