Mike Phares 127634f5ab Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
Color Sorting
2024-03-13 13:15:56 -07:00

121 lines
2.8 KiB
JavaScript

import { h } from "@stencil/core";
export class ProgressBar {
constructor() {
this.value = 0;
this.label = '';
this.size = undefined;
this.showLabel = false;
this.internalValue = undefined;
}
valueChanged(newValue, oldValue) {
if (newValue !== oldValue) {
this.internalValue = newValue;
}
}
componentWillLoad() {
this.internalValue = this.value;
}
render() {
return (h("div", { "aria-label": 'a progress bar', "aria-value": this.value, class: `progress-bar ${this.size}` }, h("div", { class: "progress", style: { width: `${this.internalValue}%` } }, this.showLabel && this.size !== "s" && h("span", { class: "label" }, `${this.internalValue}%`))));
}
static get is() { return "ifx-progress-bar"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["progress-bar.scss"]
};
}
static get styleUrls() {
return {
"$": ["progress-bar.css"]
};
}
static get properties() {
return {
"value": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "value",
"reflect": false,
"defaultValue": "0"
},
"label": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "label",
"reflect": false,
"defaultValue": "''"
},
"size": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "size",
"reflect": false
},
"showLabel": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "show-label",
"reflect": false,
"defaultValue": "false"
}
};
}
static get states() {
return {
"internalValue": {}
};
}
static get watchers() {
return [{
"propName": "value",
"methodName": "valueChanged"
}];
}
}
//# sourceMappingURL=progress-bar.js.map