carbon-react
Version:
A library of reusable React components for easily building user interfaces.
2 lines (1 loc) • 4.66 kB
JavaScript
import e,{css as t}from"styled-components";import{margin as i}from"styled-system";import{Fieldset as o}from"../fieldset/fieldset.component.js";import n 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{StyledLegend as r}from"../fieldset/fieldset.style.js";import l from"../icon/icon.style.js";import s from"../../style/themes/apply-base-theme.js";import a from"../../style/utils/add-focus-styling.js";const c=e.h3.withConfig({displayName:"tile-select.style__StyledTitle",componentId:"sc-b250e3c0-0"})(["font-size:16px;font-weight:700;margin:0;margin-right:16px;margin-bottom:8px;color:var(--colorsActionMinorYin090);"]),d=e.h4.withConfig({displayName:"tile-select.style__StyledSubtitle",componentId:"sc-b250e3c0-1"})(["font-size:14px;font-weight:500;margin:0;margin-right:16px;margin-bottom:8px;color:var(--colorsActionMinorYin090);"]),p=e.div.withConfig({displayName:"tile-select.style__StyledAdornment",componentId:"sc-b250e3c0-2"})(["z-index:500;margin-bottom:","px;"],(({hasAdditionalInformation:e})=>e?"4":"8")),m=e.p.withConfig({displayName:"tile-select.style__StyledDescription",componentId:"sc-b250e3c0-3"})(["color:var(--colorsActionMinorYin055);font-size:14px;margin:0;"]),g=e.div.withConfig({displayName:"tile-select.style__StyledTileSelect",componentId:"sc-b250e3c0-4"})(["background:var(--colorsActionMinorYang100);padding:24px;"," ",""],(({checked:e})=>e&&t(["background:var(--colorsActionMajor025);"])),(({disabled:e})=>e&&t(["background:var(--colorsActionMinorYang100);",",",",","{color:var(--colorsActionMinorYin030);}"," *{opacity:0.3;}"],c,d,m,p))),y=e.div.withConfig({displayName:"tile-select.style__StyledFocusWrapper",componentId:"sc-b250e3c0-5"})(["",""],(({checked:e,hasFocus:i})=>t(["position:relative;border:1px solid var(--colorsActionMinor250);border-radius:var(--borderRadius100);overflow:hidden;"," ",""],e&&t(["border-color:var(--colorsActionMajor500);z-index:10;"]),i&&t([""," z-index:15;"],a())))),f=e.div.attrs(s).withConfig({displayName:"tile-select.style__StyledTileSelectContainer",componentId:"sc-b250e3c0-6"})([""," width:100%;position:relative;& + & ","{margin-top:-1px;}",""],i,y,(({checked:e,disabled:i})=>!e&&!i&&t(["&:hover ","{background:var(--colorsActionMinor050);}"],g))),h=e.div.withConfig({displayName:"tile-select.style__StyledFooterWrapper",componentId:"sc-b250e3c0-7"})(["width:fit-content;position:relative;z-index:200;"]),b=e.div.withConfig({displayName:"tile-select.style__StyledAccordionFooterWrapper",componentId:"sc-b250e3c0-8"})(["width:fit-content;position:relative;z-index:200;left:-12px;border-bottom-right-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);",""],(({accordionExpanded:e})=>`\n span[data-element="chevron_down"] {\n transition: transform 0.3s;\n ${!e&&"transform: rotate(-90deg)"};\n }\n `)),_=e(n).withConfig({displayName:"tile-select.style__StyledTileSelectInput",componentId:"sc-b250e3c0-9"})(["position:absolute;top:0;left:0;opacity:0;height:100%;width:100%;margin:0;z-index:100;cursor:",";"],(({disabled:e})=>e?"not-allowed":"pointer")),x=e.div.withConfig({displayName:"tile-select.style__StyledTitleContainer",componentId:"sc-b250e3c0-10"})(["display:inline-flex;align-items:baseline;flex-wrap:wrap;margin-right:16px;position:relative;"]),v=e.div.withConfig({displayName:"tile-select.style__StyledDeselectWrapper",componentId:"sc-b250e3c0-11"})(["",""],(({hasActionAdornment:e})=>t(["z-index:200;position:relative;top:-4px;right:8px;height:fit-content;",""],e&&`\n margin-right: var(--sizing200);\n display: flex;\n align-items: baseline;\n min-height: var(--sizing400);\n\n ${l} {\n top: 2px;\n }\n `))),w=e(o).attrs(s).withConfig({displayName:"tile-select.style__StyledTileSelectFieldset",componentId:"sc-b250e3c0-12"})([""," ","{margin-bottom:16px;font-size:16px;line-height:16px;margin-left:-2px;}",""],i,r,(({multiSelect:e})=>e&&t(["","{margin-bottom:8px;}"],f))),u=e.p.withConfig({displayName:"tile-select.style__StyledGroupDescription",componentId:"sc-b250e3c0-13"})(["color:var(--colorsActionMinorYin055);margin:0;margin-bottom:16px;"]);export{b as StyledAccordionFooterWrapper,p as StyledAdornment,m as StyledDescription,v as StyledDeselectWrapper,y as StyledFocusWrapper,h as StyledFooterWrapper,u as StyledGroupDescription,d as StyledSubtitle,g as StyledTileSelect,f as StyledTileSelectContainer,w as StyledTileSelectFieldset,_ as StyledTileSelectInput,c as StyledTitle,x as StyledTitleContainer};