UNPKG

6.14 kBJavaScriptView Raw
1import { r as registerInstance, h } from './index-d4feb066.js';
2
3const progressCss = ".progress:not(:last-child){margin-bottom:1.5rem}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:#ededed}.progress::-webkit-progress-value{background-color:#4a4a4a}.progress::-moz-progress-bar{background-color:#4a4a4a}.progress::-ms-fill{background-color:#4a4a4a;border:none}.progress.is-white::-webkit-progress-value{background-color:white}.progress.is-white::-moz-progress-bar{background-color:white}.progress.is-white::-ms-fill{background-color:white}.progress.is-white:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, white), color-stop(30%, #ededed));background-image:linear-gradient(to right, white 30%, #ededed 30%)}.progress.is-black::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black::-ms-fill{background-color:#0a0a0a}.progress.is-black:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #0a0a0a), color-stop(30%, #ededed));background-image:linear-gradient(to right, #0a0a0a 30%, #ededed 30%)}.progress.is-light::-webkit-progress-value{background-color:whitesmoke}.progress.is-light::-moz-progress-bar{background-color:whitesmoke}.progress.is-light::-ms-fill{background-color:whitesmoke}.progress.is-light:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, whitesmoke), color-stop(30%, #ededed));background-image:linear-gradient(to right, whitesmoke 30%, #ededed 30%)}.progress.is-dark::-webkit-progress-value{background-color:#363636}.progress.is-dark::-moz-progress-bar{background-color:#363636}.progress.is-dark::-ms-fill{background-color:#363636}.progress.is-dark:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #363636), color-stop(30%, #ededed));background-image:linear-gradient(to right, #363636 30%, #ededed 30%)}.progress.is-primary::-webkit-progress-value{background-color:#5851ff}.progress.is-primary::-moz-progress-bar{background-color:#5851ff}.progress.is-primary::-ms-fill{background-color:#5851ff}.progress.is-primary:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #5851ff), color-stop(30%, #ededed));background-image:linear-gradient(to right, #5851ff 30%, #ededed 30%)}.progress.is-link::-webkit-progress-value{background-color:#5851ff}.progress.is-link::-moz-progress-bar{background-color:#5851ff}.progress.is-link::-ms-fill{background-color:#5851ff}.progress.is-link:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #5851ff), color-stop(30%, #ededed));background-image:linear-gradient(to right, #5851ff 30%, #ededed 30%)}.progress.is-info::-webkit-progress-value{background-color:#3298dc}.progress.is-info::-moz-progress-bar{background-color:#3298dc}.progress.is-info::-ms-fill{background-color:#3298dc}.progress.is-info:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #3298dc), color-stop(30%, #ededed));background-image:linear-gradient(to right, #3298dc 30%, #ededed 30%)}.progress.is-success::-webkit-progress-value{background-color:#48c774}.progress.is-success::-moz-progress-bar{background-color:#48c774}.progress.is-success::-ms-fill{background-color:#48c774}.progress.is-success:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #48c774), color-stop(30%, #ededed));background-image:linear-gradient(to right, #48c774 30%, #ededed 30%)}.progress.is-warning::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning::-ms-fill{background-color:#ffdd57}.progress.is-warning:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #ffdd57), color-stop(30%, #ededed));background-image:linear-gradient(to right, #ffdd57 30%, #ededed 30%)}.progress.is-danger::-webkit-progress-value{background-color:#f14668}.progress.is-danger::-moz-progress-bar{background-color:#f14668}.progress.is-danger::-ms-fill{background-color:#f14668}.progress.is-danger:indeterminate{background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #f14668), color-stop(30%, #ededed));background-image:linear-gradient(to right, #f14668 30%, #ededed 30%)}.progress:indeterminate{-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:moveIndeterminate;animation-name:moveIndeterminate;-webkit-animation-timing-function:linear;animation-timing-function:linear;background-color:#ededed;background-image:-webkit-gradient(linear, left top, right top, color-stop(30%, #4a4a4a), color-stop(30%, #ededed));background-image:linear-gradient(to right, #4a4a4a 30%, #ededed 30%);background-position:top left;background-repeat:no-repeat;background-size:150% 150%}.progress:indeterminate::-webkit-progress-bar{background-color:transparent}.progress:indeterminate::-moz-progress-bar{background-color:transparent}.progress.is-small{height:0.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}@-webkit-keyframes moveIndeterminate{from{background-position:200% 0}to{background-position:-200% 0}}@keyframes moveIndeterminate{from{background-position:200% 0}to{background-position:-200% 0}}";
4
5const Progress = class {
6 constructor(hostRef) {
7 registerInstance(this, hostRef);
8 /**
9 * Maximum value
10 */
11 this.max = 100;
12 }
13 render() {
14 return (h("progress", { class: {
15 progress: true,
16 [this.color]: Boolean(this.color),
17 [this.size]: Boolean(this.size),
18 }, value: this.value, max: this.max }, typeof this.value === 'number' && `${this.value}%`));
19 }
20};
21Progress.style = progressCss;
22
23export { Progress as bm_progress };