@scania/tegel
Version:
Tegel Design System
60 lines (56 loc) • 2.75 kB
JavaScript
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
import { d as defineCustomElement$1 } from './p-b390ece5.js';
const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
const TdsHeaderLauncherButtonStyle0 = headerLauncherButtonCss;
const TdsHeaderLauncherButton = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLauncherButton extends H {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.active = false;
this.tdsAriaLabel = undefined;
}
render() {
this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes(this.host));
const buttonProps = Object.assign({}, this.ariaAttributes);
return (h(Host, { key: '62757385fdf2aa3c51af260f2761714aea4c9727' }, h("tds-header-item", { key: '199a00653122178784999c0b5d643b9b15cd8cc5', active: this.active }, h("button", Object.assign({ key: 'd59e77834e10763d5b1c518d5bcd96e51c4dad58' }, buttonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: 'add07749af57c4110b6baeda3944e97ddf36c067', class: "icon", name: "bento", size: "20px", "svg-title": this.tdsAriaLabel })))));
}
get host() { return this; }
static get style() { return TdsHeaderLauncherButtonStyle0; }
}, [1, "tds-header-launcher-button", {
"active": [4],
"tdsAriaLabel": [1, "tds-aria-label"]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["tds-header-launcher-button", "tds-core-header-item", "tds-header-item", "tds-icon"];
components.forEach(tagName => { switch (tagName) {
case "tds-header-launcher-button":
if (!customElements.get(tagName)) {
customElements.define(tagName, TdsHeaderLauncherButton);
}
break;
case "tds-core-header-item":
if (!customElements.get(tagName)) {
defineCustomElement$3();
}
break;
case "tds-header-item":
if (!customElements.get(tagName)) {
defineCustomElement$2();
}
break;
case "tds-icon":
if (!customElements.get(tagName)) {
defineCustomElement$1();
}
break;
} });
}
defineCustomElement();
export { TdsHeaderLauncherButton as T, defineCustomElement as d };