{ "version": 3, "sources": ["../javascripts/styled-components/components/InputRadio/index.tsx", "../javascripts/styled-components/components/InputRadio/wrapper.tsx"], "sourcesContent": ["import React from 'react';\n\nimport { Input, Label, LabelContent, LabelText, Meta, Wrapper } from './wrapper';\n\ntype Props = React.DetailedHTMLProps<\n React.InputHTMLAttributes,\n HTMLInputElement\n> & {\n id: string;\n children: React.ReactNode;\n meta?: React.ReactNode;\n};\n\nconst InputRadio = ({ children, meta, ...props }: Props) => {\n const { id } = props;\n return (\n \n ,\n HTMLInputElement\n >)}\n />\n \n \n );\n};\n\nexport default InputRadio;\n", "import React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { size } from '../../layout/helpers';\n\nconst checkboxSize = size(2);\nconst dotSize = size(0.75);\nconst textSize = (props: any) => props.theme.font.size.regular;\nconst textLineHeight = (props: any) => props.theme.font.lineHeight.main;\n\nexport const Label = styled.label.withConfig({ componentId: 'sc-wl1n6p-0' })`\n position: relative;\n display: flex;\n align-items: flex-start;\n font-size: ${textSize};\n line-height: ${textLineHeight};\n user-select: none;\n cursor: default;\n\n &::before {\n content: \"\";\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: ${checkboxSize};\n height: ${checkboxSize};\n margin-top: calc((${checkboxSize} - ${textSize} * ${textLineHeight}) / -2);\n background-color: var(--c-input-selection-bg);\n font-size: 1rem;\n border-radius: 50%;\n cursor: pointer;\n }\n\n &::after {\n content: \"\";\n display: none;\n position: absolute;\n top: calc((${checkboxSize} - ${dotSize}) / 2);\n left: calc((${checkboxSize} - ${dotSize}) / 2);\n width: ${dotSize};\n height: ${dotSize};\n margin-top: calc((${checkboxSize} - ${textSize} * ${textLineHeight}) / -2);\n border-radius: 50%;\n background-color: var(--c-input-accent-fg);\n }\n`;\n\nexport const LabelText = styled.div.withConfig({ componentId: 'sc-wl1n6p-1' })`\n flex: 1 1 auto;\n`;\n\nexport const Wrapper = styled((props: any) =>
).attrs(({ type, checked }) => ({\n role: type || 'checkbox',\n 'aria-checked': checked,\n})).withConfig({ componentId: 'sc-wl1n6p-2' })`\n ${({ error }) =>\n error &&\n css`\n ${Label} {\n color: var(--c-input-error-text);\n\n &::before {\n background-color: var(--c-semantic-error-100);\n }\n }\n `}\n`;\n\nexport const Input = styled((props: any) => (\n \n)).attrs(({ type, checked }) => ({\n checked,\n type: type || 'radio',\n})).withConfig({ componentId: 'sc-wl1n6p-3' })`\n position: fixed;\n left: -9999px;\n opacity: 0;\n\n &[disabled] {\n & + ${Label} {\n opacity: 0.37;\n cursor: not-allowed;\n }\n }\n\n &:checked,\n &.checked {\n & + ${Label} {\n &::before {\n background-color: var(--c-input-accent-bg);\n }\n\n &::after {\n display: block;\n }\n\n ${LabelText} {\n font-weight: var(--font-weight-medium);\n }\n }\n }\n`;\n\nexport const LabelContent = styled.div.withConfig({ componentId: 'sc-wl1n6p-4' })`\n flex: 1 1 auto;\n padding-left: ${size(1)};\n color: var(--c-text-main);\n`;\n\nexport const Meta = styled.div.withConfig({ componentId: 'sc-wl1n6p-5' })`\n padding: ${size(2)};\n margin-top: ${size(1)};\n border: 1px solid var(--c-border-main);\n border-radius: ${(props) => props.theme.size.borderRadius};\n font-size: ${(props) => props.theme.font.size.small};\n`;\n"], "mappings": "mHAAA,IAAAA,EAAkB,SCAlB,IAAAC,EAAkB,SAKlB,IAAMC,EAAeC,EAAK,CAAC,EACrBC,EAAUD,EAAK,GAAI,EACnBE,EAAYC,GAAeA,EAAM,MAAM,KAAK,KAAK,QACjDC,EAAkBD,GAAeA,EAAM,MAAM,KAAK,WAAW,KAEtDE,EAAQC,EAAO,MAAM,WAAW,CAAE,YAAa,aAAc,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI1DJ,CAAQ;AAAA,mBACNE,CAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAUhBL,CAAY;AAAA,kBACXA,CAAY;AAAA,4BACFA,CAAY,MAAMG,CAAQ,MAAME,CAAc;AAAA;AAA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gB,EAAOV,EAAO,IAAI,WAAW,CAAE,YAAa,aAAc,CAAC;AAAA,eACzDN,EAAK,CAAC,CAAC;AAAA,kBACJA,EAAK,CAAC,CAAC;AAAA;AAAA,qBAEHG,GAAUA,EAAM,MAAM,KAAK,YAAY;AAAA,iBAC3CA,GAAUA,EAAM,MAAM,KAAK,KAAK,KAAK;EDtGvD,IAAMc,EAAa,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,IAAa,CAC1D,GAAM,CAAE,GAAAC,CAAG,EAAID,EACf,OACE,EAAAE,QAAA,cAACC,EAAA,CAAQ,kBAAiBF,EAAK,GAAGA,CAAE,SAAW,QAC7C,EAAAC,QAAA,cAACE,EAAA,CACE,GAAIJ,EAIP,EACA,EAAAE,QAAA,cAACG,EAAA,CAAM,GAAI,GAAGJ,CAAE,SAAU,QAASA,GACjC,EAAAC,QAAA,cAACI,EAAA,KACC,EAAAJ,QAAA,cAACK,EAAA,KAAWT,CAAS,EACpBC,GAAQ,EAAAG,QAAA,cAACM,EAAA,KAAMT,CAAK,CACvB,CACF,CACF,CAEJ,EAEOU,EAAQZ", "names": ["import_react", "import_react", "checkboxSize", "size", "dotSize", "textSize", "props", "textLineHeight", "Label", "dt", "LabelText", "Wrapper", "React", "type", "checked", "error", "lt", "Input", "LabelContent", "Meta", "InputRadio", "children", "meta", "props", "id", "React", "Wrapper", "Input", "Label", "LabelContent", "LabelText", "Meta", "InputRadio_default"] }