UNPKG

wj-elements

Version:

WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.

53 lines (52 loc) 1.5 kB
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); import WJElement from "./wje-element.js"; const styles = "/*\n[ WJ Main ]\n*/\n\n:host {\n display: block;\n flex: 1;\n flex-basis: auto;\n padding: 1.5rem;\n box-sizing: border-box;\n}\n"; class Main extends WJElement { /** * Creates an instance of Main. * @class */ constructor() { super(); __publicField(this, "className", "Main"); } /** * Returns the CSS styles for the component. * @static * @returns {CSSStyleSheet} */ static get cssStyleSheet() { return styles; } /** * Returns the list of attributes to observe for changes. * @static * @returns {Array<string>} */ static get observedAttributes() { return []; } /** * Sets up the attributes for the component. */ setupAttributes() { this.isShadowRoot = "open"; } /** * Draws the component for the main section. * @returns {DocumentFragment} */ draw() { let fragment = document.createDocumentFragment(); let element = document.createElement("slot"); fragment.appendChild(element); return fragment; } } Main.define("wje-main", Main); export { Main as default }; //# sourceMappingURL=wje-main.js.map