@kelvininc/ui-components
Version:
Kelvin UI Components
41 lines (37 loc) • 2.38 kB
JavaScript
import { p as proxyCustomElement, H, d as createEvent, h, e as Host } from './p-D6GMjtmE.js';
const linkCss = "@property --rotation{syntax:\"<angle>\";initial-value:0deg;inherits:false}@keyframes rotate-border{to{--rotation:360deg}}:host .link-container{display:flex;flex-direction:column}:host .link-container .label{font-family:var(--kv-primary-font, \"proxima-nova\", sans-serif, \"Arial\");font-size:14px;font-weight:600;font-stretch:normal;font-style:normal;line-height:21px;letter-spacing:normal;text-transform:none;text-decoration:none;user-select:none;color:var(--kv-text, #fff);cursor:pointer}:host .link-container .label:hover{color:var(--kv-primary, #005cc7);text-decoration:underline}:host .link-container .subtitle{font-family:var(--kv-primary-font, \"proxima-nova\", sans-serif, \"Arial\");font-size:12px;font-weight:400;font-stretch:normal;font-style:normal;line-height:18px;letter-spacing:normal;text-transform:none;color:var(--kv-text, #fff)}";
const KvLink = /*@__PURE__*/ proxyCustomElement(class KvLink extends H {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.labelClick = createEvent(this, "labelClick", 7);
this.onLabelClick = event => {
this.labelClick.emit(event);
};
}
render() {
return (h(Host, { key: '38b649400b666852add95f609e672f183eae4b74' }, h("div", { key: '5c6dca20672fca2fea6ca30d7140656c1971f6b3', class: "link-container", part: "container" }, h("a", { key: '5ef0ad5d47387e43335693a3f3b8734ef9c9efeb', class: "label", href: this.href, target: this.target, onClick: this.onLabelClick }, this.label), this.subtitle && h("div", { key: 'f1fb4925a9ef0e30727b7284814385de8756a673', class: "subtitle" }, this.subtitle))));
}
static get style() { return linkCss; }
}, [1, "kv-link", {
"label": [513],
"subtitle": [513],
"href": [513],
"target": [513]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["kv-link"];
components.forEach(tagName => { switch (tagName) {
case "kv-link":
if (!customElements.get(tagName)) {
customElements.define(tagName, KvLink);
}
break;
} });
}
defineCustomElement();
export { KvLink as K, defineCustomElement as d };