@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
2 lines (1 loc) • 1.21 kB
JavaScript
import{_ as e}from"../../tslib.es6-CmLYFWVC.js";import{i as t,E as r,x as i}from"../../lit-element-Ho-VPzO1.js";import{n as a}from"../../property-Ck1wIidx.js";import{e as s}from"../../query-DifSdHBD.js";import{e as o}from"../../class-map-DlMb2KKL.js";import{mixinDelegatesAria as m}from"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";class p extends(m(t)){constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.wavy=!1}render(){const{ariaLabel:e}=this;return i`<div class="progress ${o(this.getRenderClasses())}" style="--_active-fraction:${this.value/this.max};--_inactive-fraction:${1-this.value/this.max}" role="progressbar" aria-label="${e||r}" aria-valuemin="0" aria-valuemax="${this.max}" aria-valuenow="${this.indeterminate?r:this.value}">${this.renderIndicator()}</div>`}getRenderClasses(){return{indeterminate:this.indeterminate,wavy:this.wavy}}}e([a({type:Number})],p.prototype,"value",void 0),e([a({type:Number})],p.prototype,"max",void 0),e([a({type:Boolean})],p.prototype,"indeterminate",void 0),e([a({type:Boolean,reflect:!0})],p.prototype,"wavy",void 0),e([s(".progress")],p.prototype,"progressElement",void 0);export{p as BaseProgressIndicator};