{"version":3,"names":["sewWsRichtextCss","SewWsRichtext","checkIfBelowRichtext","previousSibling","this","host","previousElementSibling","nodeName","getAttribute","classList","add","checkForListIcon","querySelectorAll","forEach","ul","icon","li","insertAdjacentHTML","componentWillLoad","el","addEventListener","e","stopPropagation","render","h","Host","key"],"sources":["src/components/website-components/sew-ws-richtext/sew-ws-richtext.scss?tag=sew-ws-richtext","src/components/website-components/sew-ws-richtext/sew-ws-richtext.tsx"],"sourcesContent":["/* stylelint-disable selector-max-compound-selectors */\nsew-ws-richtext {\n display: block;\n word-break: break-word;\n\n h1,\n .sew-ws-h1 {\n @include typo-ws-h1;\n\n margin: 0 0 40px;\n }\n\n h2,\n .sew-ws-h2 {\n @include typo-ws-h2;\n\n margin: 40px 0 16px;\n }\n\n h3,\n .sew-ws-h3 {\n @include typo-ws-h3;\n\n margin: 40px 0 16px;\n }\n\n h4,\n .sew-ws-h4 {\n @include typo-ws-h4;\n\n margin: 40px 0 16px;\n }\n\n h2 + h4,\n .sew-ws-h2 + .sew-ws-h4 {\n margin-top: 24px;\n }\n\n h5,\n .sew-ws-h5 {\n @include typo-ws-paragraph-bold;\n\n margin: 12px 0 0;\n }\n\n p {\n @include typo-ws-paragraph;\n\n margin: 16px 0 0;\n }\n\n b {\n @include typo-ws-paragraph-bold;\n }\n\n em {\n all: unset;\n color: $color-grey-02-steel;\n }\n\n p,\n li,\n strong {\n > a {\n color: $color-red;\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n }\n }\n\n ul,\n ol {\n @include typo-ws-bulletlist;\n\n margin-top: 8px;\n padding-left: 20px;\n }\n\n ul {\n list-style-type: square;\n\n sew-ws-link[type='default'] {\n margin-top: 12px;\n\n &[size='large'] {\n margin-top: 16px;\n }\n }\n }\n\n ul.sew-no-bullets,\n ul.sew-no-bullets ul {\n list-style-type: none;\n }\n\n ul[data-icon] {\n list-style-type: none;\n padding-left: 0;\n\n li {\n display: flex;\n column-gap: 6px;\n\n sew-icon {\n color: $color-red;\n flex-shrink: 0;\n }\n }\n }\n\n ul.sew-no-bullets {\n padding: 0;\n\n > li:first-child {\n sew-ws-link[type='default'] {\n margin-top: 0;\n }\n }\n }\n\n li > ul,\n li > ol {\n margin-top: 0;\n }\n\n p + sew-ws-linklist {\n margin-top: 32px;\n }\n\n sew-ws-link {\n a:hover {\n text-decoration: none;\n }\n }\n\n sew-picture {\n margin-top: 40px;\n }\n\n sew-ws-button {\n margin-top: 32px;\n\n + sew-ws-button {\n margin-left: 20px;\n }\n }\n\n .sew-text-split {\n column-count: 2;\n gap: var(--column-gap);\n hyphens: auto;\n }\n\n h4 + .sew-text-split > ul {\n margin: 0;\n }\n\n &[small] {\n p {\n @include typo-ws-paragraph-s;\n }\n }\n\n &[large] {\n p {\n @include typo-ws-paragraph-l;\n }\n }\n\n &.underlay {\n background-color: $color-grey-06-bright;\n padding: 32px 40px;\n }\n\n &.breakout {\n padding-left: var(--grid-margin);\n margin-left: calc(var(--grid-margin) * -1);\n }\n}\n\nsew-ws-richtext:not(.margin-top):not(.margin-top-mq2) {\n > *:first-child {\n margin-top: 0;\n\n > sew-headline {\n margin-top: 0;\n }\n }\n}\n\nsew-ws-richtext:not(.margin-bottom) {\n > *:last-child {\n margin-bottom: 0;\n }\n}\n\n@include mq-3-min {\n sew-ws-richtext.margin-top-mq2 {\n > *:first-child {\n margin-top: 0;\n }\n }\n}\n\n@include mq-2 {\n sew-ws-richtext {\n .sew-text-split {\n column-count: 1;\n gap: var(--column-gap);\n }\n\n &.breakout {\n padding-right: var(--grid-margin);\n margin-right: calc(var(--grid-margin) * -1);\n }\n }\n}\n\nsew-ws-richtext.sew-ws-dark {\n color: $color-white;\n\n p,\n li {\n > a {\n color: var(--link-color, $color-red-theme-dark);\n }\n }\n}\n\n@include mq-1 {\n sew-ws-richtext {\n sew-ws-button {\n + sew-ws-button {\n margin-left: 0;\n }\n }\n }\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sew-ws-richtext',\n styleUrl: 'sew-ws-richtext.scss',\n shadow: false,\n})\nexport class SewWsRichtext {\n @Element() host: HTMLSewWsRichtextElement;\n\n @Prop({ reflect: true }) large: boolean;\n @Prop({ reflect: true }) small: boolean;\n\n private checkIfBelowRichtext(): void {\n const previousSibling = this.host.previousElementSibling;\n\n // if there is a node add margin for small and large size\n if (\n previousSibling &&\n (previousSibling.nodeName === 'SEW-WS-RICHTEXT' ||\n previousSibling.nodeName === 'SEW-WS-PODCAST') &&\n this.host.getAttribute('slot') === previousSibling.getAttribute('slot')\n ) {\n this.host.classList.add('margin-top');\n }\n }\n\n private checkForListIcon(): void {\n this.host.querySelectorAll('ul[data-icon]').forEach(ul => {\n const icon = ul.getAttribute('data-icon');\n ul.querySelectorAll('li').forEach(li => {\n li.insertAdjacentHTML('afterbegin', ``);\n });\n });\n }\n\n componentWillLoad() {\n this.checkIfBelowRichtext();\n this.checkForListIcon();\n\n this.host.querySelectorAll('a').forEach(el => {\n el.addEventListener('click', e => {\n e.stopPropagation();\n });\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAmB,s5I,MCOZC,EAAa,M,yBAMd,oBAAAC,GACJ,MAAMC,EAAkBC,KAAKC,KAAKC,uBAGlC,GACIH,IACCA,EAAgBI,WAAa,mBAC1BJ,EAAgBI,WAAa,mBACjCH,KAAKC,KAAKG,aAAa,UAAYL,EAAgBK,aAAa,QAClE,CACEJ,KAAKC,KAAKI,UAAUC,IAAI,a,EAIxB,gBAAAC,GACJP,KAAKC,KAAKO,iBAAiB,iBAAiBC,SAAQC,IAChD,MAAMC,EAAOD,EAAGN,aAAa,aAC7BM,EAAGF,iBAAiB,MAAMC,SAAQG,IAC9BA,EAAGC,mBAAmB,aAAc,mBAAmBF,iBAAoB,GAC7E,G,CAIV,iBAAAG,GACId,KAAKF,uBACLE,KAAKO,mBAELP,KAAKC,KAAKO,iBAAiB,KAAKC,SAAQM,IACpCA,EAAGC,iBAAiB,SAASC,IACzBA,EAAEC,iBAAiB,GACrB,G,CAIV,MAAAC,GACI,OACIC,EAACC,EAAI,CAAAC,IAAA,4CACDF,EAAa,QAAAE,IAAA,6C","ignoreList":[]}