carbon-react
Version:
A library of reusable React components for easily building user interfaces.
2 lines (1 loc) • 2.06 kB
JavaScript
;var e=require("styled-components"),o=require("../../../__internal__/input/input.component.js");require("react/jsx-runtime"),require("react"),require("../../../__internal__/input/input-presentation.style.js"),require("../../carbon-provider/__internal__/new-validation.context.js");var t=require("./checker-board.svg"),r=require("../../icon/icon.component.js"),i=require("../../../style/utils/get-rgb-values.js"),n=require("../../../style/utils/add-focus-styling.js");function l(e){return e&&e.__esModule?e:{default:e}}var s=l(e),a=l(t);const c=s.default.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;}"]),d=s.default.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&&e.css(["background-color:",";"],o)),(({color:o})=>"transparent"===o&&e.css(['background-color:#eeeeee;background-image:url("','");background-size:14px 14px;background-position:-2px -2px;'],a.default))),p=s.default(o.default).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 + ","{","}"],d,n.default(!0)),u=s.default(r.default).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:e})=>(e=>{const o=i.default(e),[t,r,n]=o;return(Math.round(299*t)+Math.round(587*r)+Math.round(114*n))/1e3<128?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)"})(e)));exports.StyledColorSampleBox=d,exports.StyledSimpleColor=c,exports.StyledSimpleColorInput=p,exports.StyledTickIcon=u;