UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 1.89 kB
import o,{css as t}from"styled-components";import i from"../../../__internal__/input/input.component.js";import"react/jsx-runtime";import"react";import"../../../__internal__/input/input-presentation.style.js";import"../../carbon-provider/__internal__/new-validation.context.js";import r from"./checker-board.svg";import e from"../../icon/icon.component.js";import n from"../../../style/utils/get-rgb-values.js";import s from"../../../style/utils/add-focus-styling.js";const l=o.div.withConfig({displayName:"simple-color.style__StyledSimpleColor",componentId:"sc-b2f24669-0"})(["width:var(--sizing700);height:var(--sizing700);margin-right:2px;margin-bottom:2px;&:hover{cursor:pointer;}"]),p=o.div.withConfig({displayName:"simple-color.style__StyledColorSampleBox",componentId:"sc-b2f24669-1"})(["height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;"," ",""],(({color:o})=>"transparent"!==o&&t(["background-color:",";"],o)),(({color:o})=>"transparent"===o&&t(['background-color:#eeeeee;background-image:url("','");background-size:14px 14px;background-position:-2px -2px;'],r))),a=o(i).withConfig({displayName:"simple-color.style__StyledSimpleColorInput",componentId:"sc-b2f24669-2"})(["position:absolute;opacity:0;height:var(--sizing700);width:var(--sizing700);margin:0;&:hover{cursor:pointer;}&:disabled:hover{cursor:not-allowed;}&:focus + ","{","}"],p,s(!0)),c=o(e).withConfig({displayName:"simple-color.style__StyledTickIcon",componentId:"sc-b2f24669-3"})(["height:20px;width:20px;pointer-events:none;display:block;&::before{font-size:20px;color:",";}"],(({color:o})=>(o=>{const t=n(o),[i,r,e]=t;return(Math.round(299*i)+Math.round(587*r)+Math.round(114*e))/1e3<128?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)"})(o)));export{p as StyledColorSampleBox,l as StyledSimpleColor,a as StyledSimpleColorInput,c as StyledTickIcon};