UNPKG

5.69 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', { value: true });
4
5const core = require('./core-dd01c714.js');
6
7const Progress = class {
8 constructor(hostRef) {
9 core.registerInstance(this, hostRef);
10 /**
11 * Maximum value
12 */
13 this.max = 100;
14 }
15 render() {
16 return (core.h("progress", { class: {
17 progress: true,
18 [this.color]: Boolean(this.color),
19 [this.size]: Boolean(this.size),
20 [this.class]: Boolean(this.class),
21 }, value: this.value, max: this.max }, typeof this.value === 'number' && `${this.value}%`));
22 }
23 static get style() { return ".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:#fff}.progress.is-white::-moz-progress-bar{background-color:#fff}.progress.is-white::-ms-fill{background-color:#fff}.progress.is-white:indeterminate{background-image:-webkit-gradient(linear,left top,right top,color-stop(30%,#fff),color-stop(30%,#ededed));background-image:linear-gradient(90deg,#fff 30%,#ededed 0)}.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(90deg,#0a0a0a 30%,#ededed 0)}.progress.is-light::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light::-ms-fill{background-color:#f5f5f5}.progress.is-light:indeterminate{background-image:-webkit-gradient(linear,left top,right top,color-stop(30%,#f5f5f5),color-stop(30%,#ededed));background-image:linear-gradient(90deg,#f5f5f5 30%,#ededed 0)}.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(90deg,#363636 30%,#ededed 0)}.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(90deg,#5851ff 30%,#ededed 0)}.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(90deg,#3298dc 30%,#ededed 0)}.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(90deg,#48c774 30%,#ededed 0)}.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(90deg,#ffdd57 30%,#ededed 0)}.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(90deg,#f14668 30%,#ededed 0)}.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(90deg,#4a4a4a 30%,#ededed 0);background-position:0 0;background-repeat:no-repeat;background-size:150% 150%}.progress:indeterminate::-webkit-progress-bar{background-color:rgba(0,0,0,0)}.progress:indeterminate::-moz-progress-bar{background-color:rgba(0,0,0,0)}.progress.is-small{height:.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}\@-webkit-keyframes moveIndeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}\@keyframes moveIndeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}"; }
24};
25
26exports.bm_progress = Progress;