UNPKG

@aqua-ds/web-components

Version:
58 lines (52 loc) 2.05 kB
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client'; var TargetLink; (function (TargetLink) { TargetLink["BLANK"] = "_blank"; TargetLink["SELF"] = "_self"; TargetLink["PARENT"] = "_parent"; TargetLink["TOP"] = "_top"; TargetLink["FRAMENAME"] = "framename"; })(TargetLink || (TargetLink = {})); const aqLinkCss = ".aq-link{font-family:var(--font-family-basic);font-size:var(--font-size-s);color:var(--color-primary-base)}.aq-link:hover{text-decoration:underline}.aq-link.is-disabled{color:var(--color-paper-dark);pointer-events:none}.aq-link.is-disabled:hover{text-decoration:none;cursor:default}"; const AqLabel = /*@__PURE__*/ proxyCustomElement(class AqLabel extends HTMLElement { constructor(registerHost) { super(); if (registerHost !== false) { this.__registerHost(); } this.target = TargetLink.SELF; this.href = ''; this.isDisabled = false; } getStyleClassMap() { return { 'aq-link': true, 'is-disabled': this.isDisabled, }; } render() { const cssClass = this.getStyleClassMap(); return (h("a", { key: 'b45f7e1a93a310bca157885371c8fe5cfd6fa577', rel: "noopener", href: this.href, target: this.target, class: cssClass }, h("slot", { key: '70e8ba53dbe4425fc4aa92deb8e7ecec72c0cf3b', name: "text" }))); } static get style() { return aqLinkCss; } }, [260, "aq-link", { "target": [1], "href": [1], "isDisabled": [4, "is-disabled"] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["aq-link"]; components.forEach(tagName => { switch (tagName) { case "aq-link": if (!customElements.get(tagName)) { customElements.define(tagName, AqLabel); } break; } }); } const AqLink = AqLabel; const defineCustomElement = defineCustomElement$1; export { AqLink, defineCustomElement };