@scania/tegel
Version:
Tegel Design System
47 lines (42 loc) • 1.92 kB
JavaScript
import { p as proxyCustomElement, H, h } from './p-28ef5186.js';
const breadcrumbsCss = ":host{box-sizing:border-box}:host *{box-sizing:border-box}:host [role=list]{padding:0;margin:0;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;flex-wrap:wrap;list-style-type:none}";
const TdsBreadcrumbsStyle0 = breadcrumbsCss;
const TdsBreadcrumbs$1 = /*@__PURE__*/ proxyCustomElement(class TdsBreadcrumbs extends H {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.tdsAriaLabel = undefined;
}
connectedCallback() {
if (!this.tdsAriaLabel) {
console.warn('Tegel Breadcrumbs component: missing tdsAriaLabel prop');
}
}
render() {
var _a;
(_a = this.host.children[this.host.children.length - 1]) === null || _a === void 0 ? void 0 : _a.classList.add('last');
return (h("nav", { key: 'fe6eaf7da192518c8f5078ac07082ac437b4aa9d', "aria-label": this.tdsAriaLabel }, h("div", { key: 'a33b2f1de081eff02a6101177cc72a899a81bbff', role: "list", class: "tds-breadcrumb" }, h("slot", { key: '0e7a03715689f66c35f1109d301b42694254c864' }))));
}
get host() { return this; }
static get style() { return TdsBreadcrumbsStyle0; }
}, [1, "tds-breadcrumbs", {
"tdsAriaLabel": [1, "tds-aria-label"]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["tds-breadcrumbs"];
components.forEach(tagName => { switch (tagName) {
case "tds-breadcrumbs":
if (!customElements.get(tagName)) {
customElements.define(tagName, TdsBreadcrumbs$1);
}
break;
} });
}
defineCustomElement$1();
const TdsBreadcrumbs = TdsBreadcrumbs$1;
const defineCustomElement = defineCustomElement$1;
export { TdsBreadcrumbs, defineCustomElement };