@blockchain-com/constellation
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -89,2 +89,1 @@ declare const colors: { | ||
export { colors }; | ||
export default colors; |
@@ -28,3 +28,2 @@ "use strict"; | ||
exports.colors = colors; | ||
exports.default = colors; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import colors from '.'; | ||
import { colors } from '.'; | ||
export declare type ColorKeysType = keyof typeof colors; |
@@ -8,3 +8,3 @@ "use strict"; | ||
const react_1 = __importDefault(require("react")); | ||
const colors_1 = __importDefault(require("../../colors")); | ||
const colors_1 = require("../../colors"); | ||
const Icon_1 = require("../Icon"); | ||
@@ -16,3 +16,3 @@ const _1 = __importDefault(require(".")); | ||
description: 'Clipboard color', | ||
options: Object.keys(colors_1.default), | ||
options: Object.keys(colors_1.colors), | ||
type: 'select', | ||
@@ -22,3 +22,3 @@ }, | ||
description: 'Clipboard hover color', | ||
options: Object.keys(colors_1.default), | ||
options: Object.keys(colors_1.colors), | ||
type: 'select', | ||
@@ -33,3 +33,3 @@ }, | ||
description: 'Success color', | ||
options: Object.keys(colors_1.default), | ||
options: Object.keys(colors_1.colors), | ||
type: 'select', | ||
@@ -39,3 +39,3 @@ }, | ||
description: 'Success hover color', | ||
options: Object.keys(colors_1.default), | ||
options: Object.keys(colors_1.colors), | ||
type: 'select', | ||
@@ -42,0 +42,0 @@ }, |
@@ -27,3 +27,3 @@ "use strict"; | ||
const styled_components_1 = __importDefault(require("styled-components")); | ||
const colors_1 = __importDefault(require("../../colors")); | ||
const colors_1 = require("../../colors"); | ||
const Icon_1 = __importDefault(require("../Icon")); | ||
@@ -85,3 +85,3 @@ const types_1 = require("../Icon/types"); | ||
return (react_1.default.createElement(Icon, { color: color, hoverColor: hoverColor, onClick: handleClick, showSuccess: showSuccess, successColor: successColor, successHoverColor: successHoverColor }, showSuccess | ||
? Icon_1.default({ color: colors_1.default.green600, name: types_1.IconName.CHECK, size: size ?? 'md' }) | ||
? Icon_1.default({ color: colors_1.colors.green600, name: types_1.IconName.CHECK, size: size ?? 'md' }) | ||
: Icon_1.default({ name: types_1.IconName.CLIPBOARD, size: size ?? 'md' }))); | ||
@@ -88,0 +88,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
declare const iconColor: (colorCode: keyof typeof colors, hoverColorCode?: "white1" | "white100" | "white200" | "white400" | "white60" | "white600" | "white800" | "teal0" | "teal100" | "teal200" | "teal300" | "teal400" | "teal500" | "teal600" | "teal700" | "teal800" | "teal900" | "red0" | "red100" | "red200" | "red300" | "red400" | "red500" | "red600" | "red700" | "red800" | "red900" | "purple0" | "purple100" | "purple200" | "purple300" | "purple400" | "purple500" | "purple600" | "purple700" | "purple800" | "purple900" | "orange0" | "orange100" | "orange200" | "orange300" | "orange400" | "orange500" | "orange600" | "orange700" | "orange800" | "orange900" | "grey0" | "grey100" | "grey200" | "grey300" | "grey400" | "grey500" | "grey600" | "grey700" | "grey800" | "grey900" | "green0" | "green100" | "green200" | "green300" | "green400" | "green500" | "green600" | "green700" | "green800" | "green900" | "dark100" | "dark200" | "dark400" | "dark60" | "dark600" | "dark700" | "dark800" | "dark900" | "blue0" | "blue100" | "blue200" | "blue300" | "blue400" | "blue500" | "blue600" | "blue700" | "blue800" | "blue900" | undefined) => import("styled-components").FlattenSimpleInterpolation; | ||
export default iconColor; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const styled_components_1 = require("styled-components"); | ||
const colors_1 = __importDefault(require("../../colors")); | ||
const colors_1 = require("../../colors"); | ||
const iconColor = (colorCode, hoverColorCode) => styled_components_1.css ` | ||
svg { | ||
& > path { | ||
fill: ${colors_1.default[colorCode]}; | ||
fill: ${colors_1.colors[colorCode]}; | ||
} | ||
&:hover > path { | ||
fill: ${hoverColorCode ? colors_1.default[hoverColorCode] : colors_1.default[colorCode]}; | ||
fill: ${hoverColorCode ? colors_1.colors[hoverColorCode] : colors_1.colors[colorCode]}; | ||
} | ||
@@ -16,0 +13,0 @@ } |
@@ -8,3 +8,3 @@ "use strict"; | ||
const styled_components_1 = __importDefault(require("styled-components")); | ||
const colors_1 = __importDefault(require("../../colors")); | ||
const colors_1 = require("../../colors"); | ||
const SwitchWrapper = styled_components_1.default.div ` | ||
@@ -18,3 +18,3 @@ position: relative; | ||
align-items: center; | ||
background: ${({ background }) => background ?? colors_1.default.dark700}; | ||
background: ${({ background }) => background ?? colors_1.colors.dark700}; | ||
border-radius: 8px; | ||
@@ -26,8 +26,8 @@ margin: 0; | ||
if (props.disabled) { | ||
return props.disabledColor ?? colors_1.default.dark400; | ||
return props.disabledColor ?? colors_1.colors.dark400; | ||
} | ||
if (props.selected || state === 'hover') { | ||
return props.selectedTextColor ?? colors_1.default.white1; | ||
return props.selectedTextColor ?? colors_1.colors.white1; | ||
} | ||
return props.textColor ?? colors_1.default.white1; | ||
return props.textColor ?? colors_1.colors.white1; | ||
}; | ||
@@ -40,14 +40,14 @@ const getSwitchBGColor = (state) => (props) => { | ||
if (state === 'active') { | ||
return props.selectedActiveColor ?? props.selectedColor ?? colors_1.default.dark700; | ||
return props.selectedActiveColor ?? props.selectedColor ?? colors_1.colors.dark700; | ||
} | ||
if (state === 'hover') { | ||
return props.selectedHoverColor ?? props.selectedColor ?? colors_1.default.dark700; | ||
return props.selectedHoverColor ?? props.selectedColor ?? colors_1.colors.dark700; | ||
} | ||
return props.selectedColor ?? colors_1.default.dark700; | ||
return props.selectedColor ?? colors_1.colors.dark700; | ||
} | ||
if (state === 'active') { | ||
return props.activeColor ?? props.regularColor ?? colors_1.default.dark900; | ||
return props.activeColor ?? props.regularColor ?? colors_1.colors.dark900; | ||
} | ||
if (state === 'hover') { | ||
return props.hoverColor ?? props.regularColor ?? colors_1.default.dark800; | ||
return props.hoverColor ?? props.regularColor ?? colors_1.colors.dark800; | ||
} | ||
@@ -54,0 +54,0 @@ return props.regularColor ?? 'transparent'; |
@@ -89,2 +89,1 @@ declare const colors: { | ||
export { colors }; | ||
export default colors; |
@@ -22,3 +22,2 @@ import blue from './blue'; | ||
export { colors }; | ||
export default colors; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import colors from '.'; | ||
import { colors } from '.'; | ||
export declare type ColorKeysType = keyof typeof colors; |
import React from 'react'; | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
import { iconSize } from '../Icon'; | ||
@@ -4,0 +4,0 @@ import Component from '.'; |
import React, { useEffect, useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
import getIcon from '../Icon'; | ||
@@ -5,0 +5,0 @@ import { IconName } from '../Icon/types'; |
@@ -1,3 +0,3 @@ | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
declare const iconColor: (colorCode: keyof typeof colors, hoverColorCode?: "white1" | "white100" | "white200" | "white400" | "white60" | "white600" | "white800" | "teal0" | "teal100" | "teal200" | "teal300" | "teal400" | "teal500" | "teal600" | "teal700" | "teal800" | "teal900" | "red0" | "red100" | "red200" | "red300" | "red400" | "red500" | "red600" | "red700" | "red800" | "red900" | "purple0" | "purple100" | "purple200" | "purple300" | "purple400" | "purple500" | "purple600" | "purple700" | "purple800" | "purple900" | "orange0" | "orange100" | "orange200" | "orange300" | "orange400" | "orange500" | "orange600" | "orange700" | "orange800" | "orange900" | "grey0" | "grey100" | "grey200" | "grey300" | "grey400" | "grey500" | "grey600" | "grey700" | "grey800" | "grey900" | "green0" | "green100" | "green200" | "green300" | "green400" | "green500" | "green600" | "green700" | "green800" | "green900" | "dark100" | "dark200" | "dark400" | "dark60" | "dark600" | "dark700" | "dark800" | "dark900" | "blue0" | "blue100" | "blue200" | "blue300" | "blue400" | "blue500" | "blue600" | "blue700" | "blue800" | "blue900" | undefined) => import("styled-components").FlattenSimpleInterpolation; | ||
export default iconColor; |
import { css } from 'styled-components'; | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
const iconColor = (colorCode, hoverColorCode) => css ` | ||
@@ -4,0 +4,0 @@ svg { |
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import colors from '../../colors'; | ||
import { colors } from '../../colors'; | ||
const SwitchWrapper = styled.div ` | ||
@@ -5,0 +5,0 @@ position: relative; |
{ | ||
"name": "@blockchain-com/constellation", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"license": "MIT", | ||
@@ -13,3 +13,3 @@ "main": "dist/cjs/index.js", | ||
"scripts": { | ||
"prepublishOnly": "yarn build", | ||
"prepublish": "yarn build", | ||
"build": "rimraf dist && yarn build:esm && yarn build:cjs", | ||
@@ -45,3 +45,3 @@ "build:esm": "tsc -p tsconfig.json", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-constellation": "workspace:*", | ||
"eslint-config-constellation": "0.0.26", | ||
"eslint-config-prettier": "^8.1.0", | ||
@@ -63,3 +63,3 @@ "eslint-import-resolver-typescript": "^2.4.0", | ||
"prettier": "^2.3.0", | ||
"prettier-config-constellation": "workspace:*", | ||
"prettier-config-constellation": "0.0.5", | ||
"react": "^17.0.2", | ||
@@ -69,3 +69,3 @@ "react-dom": "^17.0.2", | ||
"stylelint": "^13.12.0", | ||
"stylelint-config-constellation": "workspace:*", | ||
"stylelint-config-constellation": "0.0.5", | ||
"stylelint-config-prettier": "^8.0.2", | ||
@@ -85,2 +85,2 @@ "stylelint-config-recommended": "^4.0.0", | ||
} | ||
} | ||
} |
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
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
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
804949
8678