dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
30 lines (29 loc) • 1.09 kB
JavaScript
import "../../node_modules/@lit/reactive-element/reactive-element.js";
import "../../node_modules/lit-html/lit-html.js";
import "../../node_modules/lit-element/lit-element.js";
import { html as l } from "../../node_modules/lit-html/static.js";
import { DdsElement as m } from "../../internal/dds-hu-element.js";
import a from "./timeline.scss.js";
import { unsafeCSS as f } from "../../node_modules/@lit/reactive-element/css-tag.js";
const e = class e extends m {
firstUpdated(o) {
super.firstUpdated(o), this.setAttribute("role", "list");
const r = Array.from(this.children);
r.forEach((t, s) => {
t.setAttribute("role", "listitem"), s === 0 ? t.toggleAttribute("first") : s === r.length - 1 ? t.toggleAttribute("last") : (t.removeAttribute("first"), t.removeAttribute("last"), t.toggleAttribute("middle"));
});
}
render() {
return l`
<div part="base" class="timeline">
<slot></slot>
</div>
`;
}
};
e.tagName = "dap-ds-timeline", e.styles = f(a);
let i = e;
export {
i as default
};
//# sourceMappingURL=timeline.component.js.map