Socket
Socket
Sign inDemoInstall

@chakra-ui/theme-tools

Package Overview
Dependencies
Maintainers
4
Versions
489
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/theme-tools - npm Package Compare versions

Comparing version 1.0.0-next.6 to 1.0.0-next.7

dist/cjs/style-config/index.js

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [1.0.0-next.7](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/theme-tools@1.0.0-next.6...@chakra-ui/theme-tools@1.0.0-next.7) (2020-07-26)
### Features
- add support for single and multipart config
([a13d0f8](https://github.com/chakra-ui/chakra-ui/commit/a13d0f8a3d97405bde6acba1c4fc126677154a8b))
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.0.0-next.6](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/theme-tools@1.0.0-next.5...@chakra-ui/theme-tools@1.0.0-next.6) (2020-07-15)

@@ -8,0 +20,0 @@

35

dist/cjs/color.js

@@ -6,3 +6,3 @@ "use strict";

exports.randomColor = randomColor;
exports.ink = exports.toAlphas = exports.complementary = exports.isAccessible = exports.contrast = exports.lighten = exports.darken = exports.blacken = exports.whiten = exports.transparentize = exports.isLight = exports.isDark = exports.tone = exports.getColor = void 0;
exports.complementary = exports.isAccessible = exports.contrast = exports.lighten = exports.darken = exports.blacken = exports.whiten = exports.transparentize = exports.isLight = exports.isDark = exports.tone = exports.getColor = void 0;

@@ -192,36 +192,3 @@ var _tinycolor = _interopRequireDefault(require("tinycolor2"));

}
/**
* Returns an accessible ink color of any given fill color.
*/
var toAlphas = function toAlphas(color) {
return {
900: transparentize(color, 0.92),
800: transparentize(color, 0.8),
700: transparentize(color, 0.6),
600: transparentize(color, 0.48),
500: transparentize(color, 0.38),
400: transparentize(color, 0.24),
300: transparentize(color, 0.16),
200: transparentize(color, 0.12),
100: transparentize(color, 0.08),
50: transparentize(color, 0.04)
};
};
exports.toAlphas = toAlphas;
var ink = function ink(color, emphasis) {
var values = {
high: toAlphas(color)[900],
medium: toAlphas(color)[700],
low: toAlphas(color)[500],
lowest: toAlphas(color)[300]
};
return values[emphasis];
};
exports.ink = ink;
function randomColor(opts) {

@@ -228,0 +195,0 @@ var fallback = _tinycolor["default"].random().toHexString();

@@ -5,3 +5,2 @@ "use strict";

exports.mode = mode;
exports.orientation = orientation;
exports.orient = orient;

@@ -19,8 +18,2 @@

function orientation(horizontal, vertical) {
return function (props) {
return props.orientation === "horizontal" ? horizontal : vertical;
};
}
function orient(options) {

@@ -27,0 +20,0 @@ var orientation = options.orientation,

@@ -19,8 +19,8 @@ "use strict";

var _transition = require("@chakra-ui/transition");
var _styleConfig = require("./style-config");
Object.keys(_transition).forEach(function (key) {
Object.keys(_styleConfig).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
exports[key] = _transition[key];
exports[key] = _styleConfig[key];
});
//# sourceMappingURL=index.js.map

@@ -111,27 +111,2 @@ import Color from "tinycolor2";

}
/**
* Returns an accessible ink color of any given fill color.
*/
export var toAlphas = color => ({
900: transparentize(color, 0.92),
800: transparentize(color, 0.8),
700: transparentize(color, 0.6),
600: transparentize(color, 0.48),
500: transparentize(color, 0.38),
400: transparentize(color, 0.24),
300: transparentize(color, 0.16),
200: transparentize(color, 0.12),
100: transparentize(color, 0.08),
50: transparentize(color, 0.04)
});
export var ink = (color, emphasis) => {
var values = {
high: toAlphas(color)[900],
medium: toAlphas(color)[700],
low: toAlphas(color)[500],
lowest: toAlphas(color)[300]
};
return values[emphasis];
};
export function randomColor(opts) {

@@ -138,0 +113,0 @@ var fallback = Color.random().toHexString();

@@ -6,5 +6,2 @@ import { runIfFn } from "@chakra-ui/utils";

}
export function orientation(horizontal, vertical) {
return props => props.orientation === "horizontal" ? horizontal : vertical;
}
export function orient(options) {

@@ -11,0 +8,0 @@ var {

export * from "./color";
export * from "./component";
export * from "@chakra-ui/transition";
export * from "./style-config";
//# sourceMappingURL=index.js.map

@@ -71,19 +71,2 @@ import Color from "tinycolor2";

};
/**
* Returns an accessible ink color of any given fill color.
*/
export declare const toAlphas: (color: string) => {
900: (theme: Dict) => string;
800: (theme: Dict) => string;
700: (theme: Dict) => string;
600: (theme: Dict) => string;
500: (theme: Dict) => string;
400: (theme: Dict) => string;
300: (theme: Dict) => string;
200: (theme: Dict) => string;
100: (theme: Dict) => string;
50: (theme: Dict) => string;
};
declare type Emphasis = "high" | "medium" | "low" | "lowest";
export declare const ink: (color: string, emphasis: Emphasis) => (theme: Dict) => string;
interface RandomColorOptions {

@@ -90,0 +73,0 @@ /**

@@ -0,6 +1,11 @@

/// <reference types="react" />
import { SystemStyleObject } from "@chakra-ui/system";
import { Dict, UnionStringArray, runIfFn } from "@chakra-ui/utils";
import { TransitionConfig } from "@chakra-ui/transition";
import { Dict, runIfFn } from "@chakra-ui/utils";
interface GlobalStyleProps {
colorScheme: string;
colorMode: "light" | "dark";
theme: Dict;
}
export declare type GlobalStyles = {
global?: SystemStyleObject | ((props: Props) => SystemStyleObject);
global?: SystemStyleObject | ((props: GlobalStyleProps) => SystemStyleObject);
};

@@ -12,31 +17,3 @@ export declare type JSXElementStyles = {

export declare type Styles = GlobalStyles & JSXElementStyles;
export declare type ExtendProps<P> = P & Props;
export interface Props {
colorScheme: string;
orientation: "horizontal" | "vertical";
colorMode: "light" | "dark";
theme: Dict;
}
export declare type VariantType<E extends Readonly<Dict>> = E["variants"][number];
export declare type SizeType<E extends Readonly<Dict>> = E["sizes"][number];
declare type Arr = Readonly<any[]>;
declare type PartsStyle<P extends Arr, V = SystemStyleObject> = {
[K in UnionStringArray<P>]?: V;
};
declare type PartsInterpolation<E extends Readonly<Dict>, V = SystemStyleObject> = PartsStyle<E["parts"], V> | ((props: any) => PartsStyle<E["parts"], V>);
export declare type TransitionStyle<E extends Readonly<Dict>> = PartsInterpolation<E, TransitionConfig>;
export declare type BaseStyle<E extends Readonly<Dict>> = PartsInterpolation<E>;
export declare type Sizes<E extends Readonly<Dict>> = {
[K in UnionStringArray<E["sizes"]>]?: PartsInterpolation<E>;
};
export declare type Variants<E extends Readonly<Dict>> = {
[K in UnionStringArray<E["variants"]>]?: PartsInterpolation<E>;
};
export declare type DefaultProps<E extends Readonly<Dict>> = {
size?: UnionStringArray<E["sizes"]>;
variant?: UnionStringArray<E["variants"]>;
colorScheme?: string;
};
export declare function mode(light: any, dark: any): (props: any) => any;
export declare function orientation(horizontal: any, vertical: any): (props: any) => any;
export declare function mode(light: any, dark: any): (props: Dict) => any;
export declare function orient(options: {

@@ -43,0 +20,0 @@ orientation?: "vertical" | "horizontal";

export * from "./color";
export * from "./component";
export * from "@chakra-ui/transition";
export * from "./style-config";
{
"name": "@chakra-ui/theme-tools",
"version": "1.0.0-next.6",
"version": "1.0.0-next.7",
"description": "Set of helpers that makes theming and styling easier",

@@ -47,4 +47,3 @@ "keywords": [

"dependencies": {
"@chakra-ui/transition": "^1.0.0-next.6",
"@chakra-ui/utils": "^1.0.0-next.6",
"@chakra-ui/utils": "^1.0.0-next.7",
"@types/tinycolor2": "1.4.2",

@@ -54,8 +53,8 @@ "tinycolor2": "1.4.1"

"peerDependencies": {
"@chakra-ui/system": "^1.0.0-next.5"
"@chakra-ui/system": "^1.0.0-next.7"
},
"devDependencies": {
"@chakra-ui/system": "^1.0.0-next.6"
"@chakra-ui/system": "^1.0.0-next.7"
},
"gitHead": "72eeca4ba3fc6e7d8845b0d283a03cb6ec384a50"
"gitHead": "3dcabd8c7e21b32ae1b61485588f70370c4e626f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc