-> Refonte du système de GESTION DES ROULEMENTS de matériels roulants -> Cartographie Infra + Widget
2 lines
4.2 KiB
JavaScript
2 lines
4.2 KiB
JavaScript
import{r,h as s,g as a}from"./p-32e583ea.js";import{i as e,a as o,s as c}from"./p-52d77e1f.js";const t=":host{--wcs-progress-bar-border-radius:var(--wcs-semantic-border-radius-full);--wcs-progress-bar-border-radius-small:var(--wcs-semantic-border-radius-small);--wcs-internal-progress-bar-animation-duration:var(--wcs-progress-bar-animation-duration, var(--wcs-semantic-motion-duration-feedback-slower));--wcs-progress-bar-height-m:calc(var(--wcs-semantic-size-m) / 4);--wcs-progress-bar-height-s:calc(var(--wcs-semantic-size-s) / 6);--wcs-progress-bar-background-color:transparent;--wcs-progress-bar-rail-color:var(--wcs-semantic-color-background-surface-tertiary);--wcs-progress-bar-rail-spacing:var(--wcs-semantic-spacing-small);--wcs-progress-bar-gap-s:var(--wcs-semantic-spacing-small);--wcs-progress-bar-gap-m:var(--wcs-semantic-spacing-base);--wcs-progress-bar-indicator-color:var(--wcs-semantic-color-background-surface-brand);--wcs-progress-bar-label-color:var(--wcs-semantic-color-text-primary);--wcs-progress-bar-label-font-size-s:var(--wcs-semantic-font-size-s);--wcs-progress-bar-label-font-size-m:calc(1.5 * var(--wcs-semantic-font-size-m));--wcs-progress-bar-label-font-weight:var(--wcs-semantic-font-weight-medium);--wcs-progress-bar-label-percentage-font-size-s:calc(var(--wcs-semantic-font-size-s) * 0.7);--wcs-progress-bar-label-percentage-font-size-m:calc(var(--wcs-semantic-font-size-m) * 0.7);--wcs-progress-bar-label-top-space:var(--wcs-semantic-spacing-large)}:host([size=s]) .progress{height:var(--wcs-progress-bar-height-s);background-color:var(--wcs-progress-bar-background-color);background-image:none;background-size:auto;border-radius:var(--wcs-progress-bar-border-radius-small)}:host([size=s]) .progress .progress-label{font-size:var(--wcs-progress-bar-label-font-size-s);bottom:calc(100% + var(--wcs-progress-bar-gap-s))}:host([size=s]) .progress .progress-label sup{font-size:var(--wcs-progress-bar-label-percentage-font-size-s)}.progress{display:flex;height:var(--wcs-progress-bar-height-m);color:var(--wcs-progress-bar-label-color);background-color:var(--wcs-progress-bar-background-color);background-image:linear-gradient(90deg, var(--wcs-progress-bar-rail-color), 50%, transparent 50%);background-size:var(--wcs-progress-bar-rail-spacing) var(--wcs-progress-bar-height-m);border-radius:var(--wcs-progress-bar-border-radius)}.progress.has-label{margin-top:var(--wcs-progress-bar-label-top-space)}.progress.value-zero>.progress-bar>.progress-label{right:unset}.progress-bar{position:relative;display:flex;flex-direction:column;justify-content:center;color:var(--wcs-progress-bar-label-color);text-align:center;background-color:var(--wcs-progress-bar-indicator-color);border-radius:var(--wcs-progress-bar-border-radius);transition:width var(--wcs-internal-progress-bar-animation-duration) ease-out}.progress-label{line-height:1;position:absolute;right:0;bottom:calc(100% + var(--wcs-progress-bar-gap-m));display:flex;flex-direction:row;align-items:flex-start;font-size:var(--wcs-progress-bar-label-font-size-m);font-weight:var(--wcs-progress-bar-label-font-weight)}.progress-label sup{font-size:var(--wcs-progress-bar-label-percentage-font-size-m)}";const i=t;const l=["title"];const b=class{constructor(s){r(this,s);this.inheritedAttributes={};this.size="m";this.showLabel=false;this.value=0}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},e(this.el)),o(this.el,l))}async setAriaAttribute(r,s){c(this.nativeProgress,r,s)}render(){const r={width:this.value+"%"};return s("div",Object.assign({key:"5fe4671aeaaf799d336e38c4bd49f021b4fbb27b",class:this.rootClasses(),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":this.value,"aria-valuetext":this.value+"%",ref:r=>this.nativeProgress=r},this.inheritedAttributes),s("div",{key:"9278d7110c3fed850ddcf1a06ff29a60fb4ebbd8",class:"progress-bar",style:r},this.showLabel&&s("span",{key:"ac5758b7b685fc08ecf4592b7194666d751c4b87",class:"progress-label"},this.value,s("sup",{key:"313cec9fb8df686b3affb9a9002e1c6055249f0b"},"%"))))}rootClasses(){let r="progress";if(this.showLabel)r+=" has-label";if(this.value===0)r+=" value-zero";return r}get el(){return a(this)}};b.style=i;export{b as wcs_progress_bar};
|
|
//# sourceMappingURL=p-9fd3366c.entry.js.map
|