UNPKG

dap-design-system

Version:

Official design system for the DÁP (dap.gov.hu)

51 lines (50 loc) 1.63 kB
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 { property as a } from "../../node_modules/@lit/reactive-element/decorators/property.js"; import { queryAssignedElements as f } from "../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js"; import { html as c } from "../../node_modules/lit-html/static.js"; import { DdsElement as h } from "../../internal/dds-hu-element.js"; import d from "./table.scss.js"; import { unsafeCSS as u } from "../../node_modules/@lit/reactive-element/css-tag.js"; var y = Object.defineProperty, s = (n, i, e, l) => { for (var t = void 0, p = n.length - 1, m; p >= 0; p--) (m = n[p]) && (t = m(i, e, t) || t); return t && y(i, e, t), t; }; const o = class o extends h { constructor() { super(...arguments), this.role = "grid", this.mobile = !1, this.caption = ""; } firstUpdated(i) { this.rows.forEach((e, l) => { l === this.rows.length - 1 && e.toggleAttribute("last"); }), this.setAttribute("aria-label", this.caption); } render() { return c` <caption class="caption" part="caption"> ${this.caption} </caption> <slot></slot> `; } }; o.tagName = "dap-ds-table", o.styles = u(d); let r = o; s([ f() ], r.prototype, "rows"); s([ a({ reflect: !0 }) ], r.prototype, "role"); s([ a({ type: Boolean, reflect: !0 }) ], r.prototype, "mobile"); s([ a({ type: String }) ], r.prototype, "caption"); export { r as default }; //# sourceMappingURL=table.component.js.map