{ "version": 3, "sources": ["../javascripts/styled-components/components/Link/index.tsx"], "sourcesContent": ["import { Link as RRDLink } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\n\nimport { size } from '../../layout/helpers';\n\nexport const linkBase = css`\n display: inline-flex;\n align-items: center;\n gap: ${size(1)};\n text-decoration: none;\n color: var(--c-link);\n font-size: inherit;\n font-weight: var(--font-weight-link);\n\n &:hover {\n text-decoration: underline;\n }\n`;\n\ninterface LinkProps {\n $hoverGhost?: boolean;\n $currentColor?: boolean;\n $hasContent?: boolean;\n $valign?: 'baseline';\n $noExternalIcon?: boolean;\n $block?: boolean;\n}\n\nexport const Link = styled.a.withConfig({ componentId: 'sc-13p5lnv-0' })`\n ${linkBase}\n\n ${({ $noExternalIcon }) =>\n !$noExternalIcon &&\n css`\n // Add external link icon to external links\n &[target=\"_blank\"] {\n &::after {\n content: \"\";\n mask-image: url('data:image/svg+xml;utf8,');\n mask-size: 100%;\n content: \"\";\n display: inline-block;\n vertical-align: baseline;\n width: 0.75em;\n height: 0.75em;\n margin-left: 0.25em;\n background-color: currentColor;\n }\n }\n `}\n\n\n\n ${({ $hoverGhost }) =>\n $hoverGhost &&\n css`\n &:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n `}\n\n ${({ $currentColor }) =>\n $currentColor &&\n css`\n color: currentColor;\n `}\n\n ${({ $hasContent }) =>\n $hasContent &&\n css`\n display: inline-flex;\n align-items: center;\n `}\n\n ${({ $valign }) =>\n $valign === 'baseline'\n ? css`\n vertical-align: baseline;\n `\n : undefined}\n\n ${({ $block }) =>\n $block &&\n css`\n display: flex;\n `}\n`;\n\nexport const RouterLink = styled(RRDLink).withConfig({ componentId: 'sc-13p5lnv-1' })`\n ${linkBase}\n\n ${({ $hoverGhost }) =>\n $hoverGhost &&\n css`\n &:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n `}\n\n ${({ $currentColor }) =>\n $currentColor &&\n css`\n color: currentColor;\n `}\n\n ${({ $hasContent }) =>\n $hasContent &&\n css`\n display: inline-flex;\n align-items: center;\n `}\n\n ${({ $valign }) =>\n $valign === 'baseline'\n ? css`\n vertical-align: baseline;\n `\n : undefined}\n\n ${({ $block }) =>\n $block &&\n css`\n display: flex;\n `}\n`;\n"], "mappings": "4GAKO,IAAMA,EAAWC;AAAA;AAAA;AAAA,WAGbC,EAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBLC,EAAOC,EAAO,EAAE,WAAW,CAAE,YAAa,cAAe,CAAC;AAAA,MACjEJ,CAAQ;AAAA;AAAA,MAER,CAAC,CAAE,gBAAAK,CAAgB,IACnB,CAACA,GACDJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAgBG;AAAA;AAAA;AAAA;AAAA,MAIH,CAAC,CAAE,YAAAK,CAAY,IACfA,GACAL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASG;AAAA;AAAA,MAEH,CAAC,CAAE,cAAAM,CAAc,IACjBA,GACAN;AAAA;AAAA,SAEG;AAAA;AAAA,MAEH,CAAC,CAAE,YAAAO,CAAY,IACfA,GACAP;AAAA;AAAA;AAAA,SAGG;AAAA;AAAA,MAEH,CAAC,CAAE,QAAAQ,CAAQ,IACXA,IAAY,WACRR;AAAA;AAAA,gBAGA,MAAS;AAAA;AAAA,MAEb,CAAC,CAAE,OAAAS,CAAO,IACVA,GACAT;AAAA;AAAA,SAEG;AAAA,EAGIU,EAAaP,EAAOD,CAAO,EAAE,WAAW,CAAE,YAAa,cAAe,CAAC;AAAA,MAC9EH,CAAQ;AAAA;AAAA,MAER,CAAC,CAAE,YAAAM,CAAY,IACfA,GACAL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASG;AAAA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