UNPKG

@scania/tegel

Version:
47 lines (43 loc) 2.25 kB
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js'; const dividerCss = ".divider{box-sizing:border-box;background-color:var(--tds-divider-background)}.divider *{box-sizing:border-box}.divider.discrete{background-color:var(--tds-divider-background-discrete)}.divider.subtle{background-color:var(--tds-divider-background-subtle)}.divider.soft{background-color:var(--tds-divider-background-soft)}.divider.defined{background-color:var(--tds-divider-background-defined)}.divider.dark-blue{background-color:var(--tds-divider-background-dark-blue)}.divider.horizontal{width:100%;height:1px}.divider.vertical{height:100%;width:1px}"; const TdsDividerStyle0 = dividerCss; const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends H { constructor() { super(); this.__registerHost(); this.__attachShadow(); this.orientation = 'horizontal'; this.variant = 'subtle'; } render() { return (h(Host, { key: 'fb332ff6d8b15e2451266bb9051113819ac770ab', role: "separator", "aria-orientation": this.orientation === 'vertical' ? 'vertical' : undefined }, h("div", { key: 'a0a6e9037f259f3d4ecff62744a8b31875241901', class: { 'divider': true, 'vertical': this.orientation === 'vertical', 'horizontal': this.orientation === 'horizontal', 'discrete': this.variant === 'discrete', 'subtle': this.variant === 'subtle', 'soft': this.variant === 'soft', 'defined': this.variant === 'defined', 'dark-blue': this.variant === 'dark-blue', } }))); } static get style() { return TdsDividerStyle0; } }, [1, "tds-divider", { "orientation": [1], "variant": [1] }]); function defineCustomElement() { if (typeof customElements === "undefined") { return; } const components = ["tds-divider"]; components.forEach(tagName => { switch (tagName) { case "tds-divider": if (!customElements.get(tagName)) { customElements.define(tagName, Divider); } break; } }); } defineCustomElement(); export { Divider as D, defineCustomElement as d };