@operational/theme
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -1,2 +0,1 @@ | ||
export { expandColor } from "./utils"; | ||
export declare type TextTransform = "capitalize" | "full-width" | "lowercase" | "none" | "uppercase"; | ||
@@ -62,1 +61,3 @@ export declare type ThemeColorName = "brand" | "info" | "success" | "warning" | "error" | "white" | "black" | "gray" | "lightGray" | "text" | "lightText" | "linkText" | "navBackground" | "background" | "lighterBackground" | "border" | "separator"; | ||
export { operational }; | ||
export { default as constants, OperationalStyleConstants } from "./constants"; | ||
export { expandColor } from "./utils"; /** <- @peterszerzo, why is this not in @operational/utils? */ |
"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 }); | ||
var utils_1 = require("./utils"); | ||
exports.expandColor = utils_1.expandColor; | ||
// Default theme definition | ||
var colors = { | ||
const colors = { | ||
brand: "#000000", | ||
@@ -57,3 +46,3 @@ info: "#1499CE", | ||
}; | ||
var baseTypography = { | ||
const baseTypography = { | ||
lineHeight: "1.5", | ||
@@ -63,10 +52,10 @@ 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)", | ||
@@ -77,6 +66,6 @@ card: "0px 1px 5px #d3d1d1", | ||
}; | ||
var operational = { | ||
typography: typography, | ||
shadows: shadows, | ||
colors: colors, | ||
const operational = { | ||
typography, | ||
shadows, | ||
colors, | ||
spacing: 16, | ||
@@ -89,2 +78,6 @@ box: 72, | ||
exports.operational = operational; | ||
var constants_1 = require("./constants"); | ||
exports.constants = constants_1.default; | ||
var utils_1 = require("./utils"); /** <- @peterszerzo, why is this not in @operational/utils? */ | ||
exports.expandColor = utils_1.expandColor; | ||
//# sourceMappingURL=index.js.map |
@@ -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", | ||
"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)$" | ||
} | ||
} |
@@ -1,5 +0,1 @@ | ||
// Type definitions | ||
export { expandColor } from "./utils" | ||
export type TextTransform = "capitalize" | "full-width" | "lowercase" | "none" | "uppercase" | ||
@@ -185,1 +181,3 @@ | ||
export { operational } | ||
export { default as constants, OperationalStyleConstants } from "./constants" | ||
export { expandColor } from "./utils" /** <- @peterszerzo, why is this not in @operational/utils? */ |
{ | ||
"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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
28376
0
19
783
1