UNPKG

@trimble-oss/moduswebcomponents

Version:

Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust

47 lines (43 loc) 2.18 kB
import { p as proxyCustomElement, H, h, c as Host } from './p-BMvVSi6Y.js'; import { i as inheritAriaAttributes } from './p-COxr4v9W.js'; const modusWcToolbarCss = ""; const ModusWcToolbar = /*@__PURE__*/ proxyCustomElement(class ModusWcToolbar extends H { constructor() { super(); this.__registerHost(); this.inheritedAttributes = {}; /** Custom CSS class to apply to the outer div. */ this.customClass = ''; } componentWillLoad() { this.inheritedAttributes = inheritAriaAttributes(this.el); } getClasses() { const classList = ['modus-wc-navbar']; // The order CSS classes are added matters to CSS specificity if (this.customClass) classList.push(this.customClass); return classList.join(' '); } render() { return (h(Host, { key: 'a8d3ef8dd8fa3dddeeb30f95771641e23b3dd28e' }, h("div", Object.assign({ key: 'f12b47d6b385aa312868e65d488b1d2252e91fa4', class: this.getClasses() }, this.inheritedAttributes), h("div", { key: '35d694bc5c7d1db9e340da5ead6e98571fc9c6f7', class: "modus-wc-navbar-start" }, h("slot", { key: '9a4738e0f60a4d9cbe5865e7a5a4a2f32e05e239', name: "start" })), h("div", { key: 'a62ac4e3c85430d0727d704eae724de05d7067b2', class: "modus-wc-navbar-center" }, h("slot", { key: 'e154ccfb62fa6f273e6c0e4eaef9d455fc1c6472', name: "center" })), h("div", { key: 'd224cf4b79fe16191b0b231f403f8a04af2c673d', class: "modus-wc-navbar-end" }, h("slot", { key: 'b9027b5aec445137f05adb338583ab4b2bbee093', name: "end" }))))); } get el() { return this; } static get style() { return modusWcToolbarCss; } }, [4, "modus-wc-toolbar", { "customClass": [1, "custom-class"] }]); function defineCustomElement() { if (typeof customElements === "undefined") { return; } const components = ["modus-wc-toolbar"]; components.forEach(tagName => { switch (tagName) { case "modus-wc-toolbar": if (!customElements.get(tagName)) { customElements.define(tagName, ModusWcToolbar); } break; } }); } export { ModusWcToolbar as M, defineCustomElement as d };