UNPKG

dap-design-system

Version:

Official design system for the DÁP (dap.gov.hu)

65 lines (64 loc) 2.09 kB
import { clsx as d } from "../../node_modules/clsx/dist/clsx.js"; import "../../node_modules/@lit/reactive-element/reactive-element.js"; import "../../node_modules/lit-html/lit-html.js"; import "../../node_modules/lit-element/lit-element.js"; import { property as m } from "../../node_modules/@lit/reactive-element/decorators/property.js"; import { unsafeStatic as n, html as f } from "../../node_modules/lit-html/static.js"; import { anchorClass as c } from "../../common/const.js"; import { kebabCase as $ } from "../../common/utils.js"; import { adoptLightStyles as b } from "../../internal/adopt-light-styles.js"; import { DdsElement as k } from "../../internal/dds-hu-element.js"; import u from "../link/link.component.js"; import v from "../typography/_styles/typography.scss.js"; import y from "./anchor-heading.scss.js"; import { unsafeCSS as p } from "../../node_modules/@lit/reactive-element/css-tag.js"; var x = Object.defineProperty, h = (s, a, o, C) => { for (var t = void 0, i = s.length - 1, l; i >= 0; i--) (l = s[i]) && (t = l(a, o, t) || t); return t && x(a, o, t), t; }; const r = class r extends k { createRenderRoot() { return b(this), this; } get elementId() { return this.id ? this.id : $(this.label); } get anchorTitle() { return `Link to ${this.label}`; } render() { return f` <${n(this.variant)} id=${this.elementId} part="base" class=${d(c, { [`typography-${this.variant}`]: this.variant })} > ${this.label} <dap-ds-link part="link" exportparts="base: link-base, text: link-text" class="dds-anchor__link" href=${`#${this.elementId}`} aria-label=${this.anchorTitle} title=${this.anchorTitle}> &#8203; </dap-ds-link> </${n(this.variant)}> `; } }; r.tagName = "dap-ds-anchor-heading", r.dependencies = { "dap-ds-link": u }, r.styles = [p(y), p(v)]; let e = r; h([ m() ], e.prototype, "variant"); h([ m() ], e.prototype, "label"); export { e as default }; //# sourceMappingURL=anchor-heading.component.js.map