{"version":3,"file":"text-passage.D5-KDZzQ.js","sources":["../../../../../packages/web-components/src/lib/components/text-passage/text-passage.ts"],"sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { pdsCustomElement as customElement } from '../../decorators/pds-custom-element';\nimport { PdsElement } from '../PdsElement';\nimport '../linelength-container/linelength-container';\nimport lightDomStyles from './text-passage-light-dom.scss?inline';\n\n/**\n * @summary A wrapping element to help apply text styles\n *\n * @slot default Required: The content of the text passage\n */\n@customElement('pds-text-passage', {\n category: 'component',\n type: 'component',\n styles: {},\n})\nexport class PdsTextPassage extends PdsElement {\n /**\n * Add the light dom styles when this component is connected to a page\n */\n connectedCallback() {\n super.connectedCallback();\n const lightDomExists = document.head.querySelector(\n '#pds-text-passage-styles',\n );\n\n if (!lightDomExists) {\n const lightDomStyle = document.createElement('style');\n lightDomStyle.id = 'pds-text-passage-styles';\n lightDomStyle.innerHTML = lightDomStyles.toString();\n document.head.appendChild(lightDomStyle);\n }\n }\n\n protected override firstUpdated() {\n super.firstUpdated();\n }\n\n /**\n * - **default** default linelength cap\n * - **sm** small linelength cap\n * - **none** no linelength cap\n */\n @property()\n lineLength: 'sm' | 'none' | 'default' = 'default';\n\n /**\n * - **default** renders the text-passage with default body text size\n * - **sm** renders the text-passage with body text smaller than the default\n * - **lg** renders the text-passage with body text larger than the default\n */\n @property()\n size: 'sm' | 'lg' | 'default' = 'default';\n\n render() {\n const classes = {\n 'pds-c-text-passage': true,\n [`pds-c-text-passage--${this.size}`]: !!this.size,\n };\n\n return html`