UNPKG

dap-design-system

Version:

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

102 lines (101 loc) 3.67 kB
var y = Object.defineProperty; var h = Object.getOwnPropertySymbols; var S = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable; var c = (i, t, e) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, l = (i, t) => { for (var e in t || (t = {})) S.call(t, e) && c(i, e, t[e]); if (h) for (var e of h(t)) m.call(t, e) && c(i, e, t[e]); return i; }; import "../node_modules/@lit/reactive-element/reactive-element.js"; import "../node_modules/lit-html/lit-html.js"; import { LitElement as f } from "../node_modules/lit-element/lit-element.js"; import { property as o } from "../node_modules/@lit/reactive-element/decorators/property.js"; var b = Object.defineProperty, p = (i, t, e, r) => { for (var s = void 0, d = i.length - 1, u; d >= 0; d--) (u = i[d]) && (s = u(t, e, s) || s); return s && b(t, e, s), s; }; const n = class n extends f { constructor() { super(), this.ariaLabel = null, this.ariaExpanded = null, this.ariaControls = null, this.ariaHasPopup = null, this.ariaDescribedBy = null, this.ariaPressed = null, this.ariaHidden = null; const t = this.constructor.dependencies; for (const [e, r] of Object.entries(t)) r && r.define(e, r); } /** * Registers this component as a custom element. Safe to call repeatedly and * across bundles: if the tag is already defined it is a no-op (warning on a * different constructor) instead of throwing like `customElements.define`. */ static define(t = this.tagName, e = this, r = {}) { const s = customElements.get(t); if (s) { s !== e && console.warn( `[dds] <${t}> is already registered with a different constructor; skipping re-registration.` ); return; } try { customElements.define(t, e, r); } catch (d) { customElements.define(t, class extends e { }, r); } } emit(t, e, r) { const s = new CustomEvent(t, l({ bubbles: !0, cancelable: !1, composed: !0, detail: e ? l({}, e) : void 0 }, r)); return this.dispatchEvent(s), s; } firstUpdated(t) { super.firstUpdated(t), this._updateCustomStyles(); } updated(t) { super.updated(t), t.has("customStyles") && this._updateCustomStyles(); } _updateCustomStyles() { this.shadowRoot && (this.customStyles ? this._customStyleSheet ? this._customStyleSheet.replaceSync(this.customStyles) : (this._customStyleSheet = new CSSStyleSheet(), this._customStyleSheet.replaceSync(this.customStyles), this.shadowRoot.adoptedStyleSheets = [ ...this.shadowRoot.adoptedStyleSheets, this._customStyleSheet ]) : this._customStyleSheet && (this.shadowRoot.adoptedStyleSheets = this.shadowRoot.adoptedStyleSheets.filter( (t) => t !== this._customStyleSheet ), this._customStyleSheet = void 0)); } }; n.tagName = "", n.dependencies = {}; let a = n; p([ o({ type: String, attribute: "aria-label" }) ], a.prototype, "ariaLabel"); p([ o({ type: String, attribute: "aria-expanded" }) ], a.prototype, "ariaExpanded"); p([ o({ type: String, attribute: "aria-controls" }) ], a.prototype, "ariaControls"); p([ o({ type: String, attribute: "aria-haspopup" }) ], a.prototype, "ariaHasPopup"); p([ o({ type: String, attribute: "aria-describedby" }) ], a.prototype, "ariaDescribedBy"); p([ o({ type: String, attribute: "aria-pressed" }) ], a.prototype, "ariaPressed"); p([ o({ type: String, attribute: "aria-hidden" }) ], a.prototype, "ariaHidden"); p([ o({ type: String, attribute: "custom-styles" }) ], a.prototype, "customStyles"); export { a as DdsElement }; //# sourceMappingURL=dds-hu-element.js.map