@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.14 kB
JavaScript
import{r as s,h as t,H as e,g as c}from"./p-D_4hbGjA.js";import{i as o}from"./p-BLBSdonk.js";const r=class{constructor(t){s(this,t),this.inheritedAttributes={},this.customClass="",this.steps=[]}componentWillLoad(){this.inheritedAttributes=o(this.el)}getClasses(){const s=["modus-wc-steps"],t=(({orientation:s})=>{let t="";if(s)switch(s){case"horizontal":break;case"vertical":t=`${t} modus-wc-steps-vertical`}return t.trim()})({orientation:this.orientation});return t&&s.push(t),this.customClass&&s.push(this.customClass),s.join(" ")}getClassesForStep(s){const t=["modus-wc-step"];return s.color&&t.push(`modus-wc-step-${s.color}`),s.customClass&&t.push(s.customClass),t.join(" ")}render(){return t(e,{key:"99d8209d8e054b6cdb6b597c70830c76c7ce4e71"},t("div",Object.assign({key:"1b63bb86f6f3a3aa03df0779c1e798d21fc81ba4",class:this.getClasses()},this.inheritedAttributes),this.steps.map(((s,e)=>t("li",{class:this.getClassesForStep(s),key:e,"data-content":s.content},s.label)))))}get el(){return c(this)}};r.style="modus-wc-stepper .modus-wc-steps .modus-wc-step{--fallback-b3:var(--modus-wc-color-base-200)}";export{r as modus_wc_stepper}