UNPKG

@limetech/lime-elements

Version:
63 lines (62 loc) 1.91 kB
import { h } from "@stencil/core"; /** * @slot - Content to put inside the surface * @private */ export class PopoverSurface { componentDidLoad() { this.appendElement(); } render() { return h("div", { key: '72e73b254be6cebbd27332329b10a58210ae0352', class: "limel-popover-surface", tabindex: "0" }); } appendElement() { const portalContainer = this.host.shadowRoot.querySelector('.limel-popover-surface'); const childElementsCopy = [...this.contentCollection]; for (const child of childElementsCopy) { if (child.slot === 'trigger') { continue; } portalContainer.append(child); } } static get is() { return "limel-popover-surface"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["popover-surface.scss"] }; } static get styleUrls() { return { "$": ["popover-surface.css"] }; } static get properties() { return { "contentCollection": { "type": "unknown", "mutable": false, "complexType": { "original": "HTMLCollection", "resolved": "HTMLCollection", "references": { "HTMLCollection": { "location": "global", "id": "global::HTMLCollection" } } }, "required": false, "optional": false, "docs": { "tags": [], "text": "Content to render" }, "getter": false, "setter": false } }; } static get elementRef() { return "host"; } }