@scania/tegel
Version:
Tegel Design System
39 lines (34 loc) • 2.37 kB
JavaScript
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
const breadcrumbCss = "@charset \"UTF-8\";:host([role=listitem]) div ::slotted(*){color:var(--tds-breadcrumb-color);text-decoration:none}:host([role=listitem]) div:hover ::slotted(*){color:var(--tds-breadcrumb-color-hover);text-decoration:underline}:host([role=listitem]) div ::slotted(*:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1;outline-offset:0}:host([role=listitem]) div.current ::slotted(*),:host([role=listitem]) div [aria-current=page] ::slotted(*){pointer-events:none;cursor:default;color:var(--tds-breadcrumb-color-current)}:host([role=listitem]) div.current:hover ::slotted(*),:host([role=listitem]) div [aria-current=page]:hover ::slotted(*){text-decoration:none;cursor:not-allowed}:host([role=listitem]) div::after{content:\"›\";color:var(--tds-breadcrumb-separator-color);margin-right:4px;margin-left:4px;display:inline-block;width:4px;height:8px}:host([role=listitem]) .current::after{display:none}";
const TdsBreadcrumbStyle0 = breadcrumbCss;
const TdsBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class TdsBreadcrumb extends H {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.current = false;
}
render() {
return (h(Host, { key: 'f1a223cf44e435b547b42382e8b3d47979c71793', role: "listitem" }, h("div", Object.assign({ key: '41baa33ae1474121ae4512ddf89fb960670d1cea', class: { current: this.current } }, (this.current ? { 'aria-current': 'page' } : {})), h("slot", { key: '8f14f28f7e9824e76886a1d49f15d3404666771a' }))));
}
static get style() { return TdsBreadcrumbStyle0; }
}, [1, "tds-breadcrumb", {
"current": [4]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["tds-breadcrumb"];
components.forEach(tagName => { switch (tagName) {
case "tds-breadcrumb":
if (!customElements.get(tagName)) {
customElements.define(tagName, TdsBreadcrumb$1);
}
break;
} });
}
defineCustomElement$1();
const TdsBreadcrumb = TdsBreadcrumb$1;
const defineCustomElement = defineCustomElement$1;
export { TdsBreadcrumb, defineCustomElement };