{"mappings":"AACA,cAAc,sBAAiC;AAG/C,SAAS,mBAAkC;;;;;;AAS3C,cAsCM,aAAa,YAAY;CAC7B,AAWA,WAAW,SAAS,UAAU,WAAW;CAEzC,AACA;CAEA,AACA;CAEA,AACA;CAEA,AACA;CAEA,UAAU,UAAU,eAAe;;AAOrC,eAAe;AACf,SAAS","names":[],"sources":["../../../../src/web-components/text/component.ts"],"sourcesContent":["import { godown, htmlSlot, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle, cssGlobalVars } from \"../../internal/global-style.js\";\n\nconst protoName = \"text\";\n\n/**\n * {@linkcode Text} renders text.\n *\n * @category display\n */\n@godown(protoName)\n@styles(css`\n  :host([clip]) {\n    background: var(${cssGlobalVars.backgroundClip});\n    display: inline-block;\n    color: transparent;\n    -webkit-text-fill-color: transparent;\n    background-clip: text;\n    -webkit-background-clip: text;\n  }\n\n  :host([nowrap]) {\n    white-space: nowrap;\n  }\n\n  :host([italic]) {\n    font-style: italic;\n  }\n\n  :host([truncate]),\n  :host([truncate]) ::slotted(*) {\n    max-width: 100%;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n\n  :host([strikethrough]) {\n    text-decoration: line-through;\n  }\n\n  :host([underline=\"\"]),\n  :host([underline=\"always\"]),\n  :host(:hover[underline=\"hover\"]),\n  :host(:active[underline=\"active\"]),\n  :host(:focus[underline=\"focus\"]) {\n    text-decoration: underline;\n  }\n`)\nclass Text extends GlobalStyle {\n  @property({\n    converter: {\n      fromAttribute(value) {\n        return value === \"\" ? true : value;\n      },\n      toAttribute(value) {\n        return value === false ? null : value === true ? \"\" : value;\n      },\n    },\n    reflect: true,\n  })\n  underline: \"none\" | \"hover\" | \"active\" | \"always\" | boolean = \"none\";\n\n  @property({ type: Boolean, reflect: true })\n  nowrap = false;\n\n  @property({ type: Boolean, reflect: true })\n  italic = false;\n\n  @property({ type: Boolean, reflect: true })\n  truncate = false;\n\n  @property({ type: Boolean, reflect: true })\n  clip = false;\n\n  protected render(): TemplateResult<1> {\n    return html`\n      <p part=\"root\">${htmlSlot()}</p>\n    `;\n  }\n}\n\nexport default Text;\nexport { Text };\n"],"version":3,"file":"component.d.ts"}