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

1 lines 1.66 kB
import{r as e,h as i,H as s,g as r}from"./p-dzXW86AR.js";import{i as t}from"./p-B5lx0dpl.js";const c=class{constructor(i){e(this,i),this.inheritedAttributes={},this.color="tertiary",this.content="",this.customClass="",this.orientation="vertical",this.position="center",this.responsive=!0}componentWillLoad(){this.el.ariaLabel||(this.el.ariaLabel="Divider"),this.inheritedAttributes=t(this.el)}getClasses(){const e=["modus-wc-divider"],i=(({color:e,orientation:i,position:s,responsive:r})=>{let t="";if(e)switch(e){case"primary":t=`${t} modus-wc-divider-primary`;break;case"secondary":t=`${t} modus-wc-divider-secondary`;break;case"tertiary":t=`${t} modus-wc-divider-neutral`;break;case"high-contrast":t=`${t} modus-wc-divider-accent`;break;case"success":t=`${t} modus-wc-divider-success`;break;case"warning":t=`${t} modus-wc-divider-warning`;break;case"danger":t=`${t} modus-wc-divider-error`}if(i)switch(i){case"horizontal":t=`${t} modus-wc-divider-horizontal`;break;case"vertical":t=`${t} modus-wc-divider-vertical`}if(s)switch(s){case"end":t=`${t} modus-wc-divider-start`;break;case"start":t=`${t} modus-wc-divider-end`}return r&&(t=`${t} flex-grow place-items-center`),t.trim()})({color:this.color,orientation:this.orientation,position:this.position,responsive:this.responsive});return i&&e.push(i),this.customClass&&e.push(this.customClass),e.join(" ")}render(){return i(s,{key:"1d2cbc1c8e7a27f41572110dc52b0d7388bee2b2"},i("div",Object.assign({key:"1677c6f8cfafeda50869f97e2f6a452c696468a2",class:this.getClasses(),role:"separator",tabindex:-1},this.inheritedAttributes),this.content))}get el(){return r(this)}};c.style="";export{c as modus_wc_divider}