@bulmil/core
Version:

50 lines (45 loc) • 6.21 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
const progressCss = ".progress:not(:last-child){margin-bottom:1.5rem}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:9999px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:hsl(0, 0%, 93%)}.progress::-webkit-progress-value{background-color:hsl(0, 0%, 29%)}.progress::-moz-progress-bar{background-color:hsl(0, 0%, 29%)}.progress::-ms-fill{background-color:hsl(0, 0%, 29%);border:none}.progress.is-white::-webkit-progress-value{background-color:hsl(0, 0%, 100%)}.progress.is-white::-moz-progress-bar{background-color:hsl(0, 0%, 100%)}.progress.is-white::-ms-fill{background-color:hsl(0, 0%, 100%)}.progress.is-white:indeterminate{background-image:linear-gradient(to right, hsl(0, 0%, 100%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-black::-webkit-progress-value{background-color:hsl(0, 0%, 4%)}.progress.is-black::-moz-progress-bar{background-color:hsl(0, 0%, 4%)}.progress.is-black::-ms-fill{background-color:hsl(0, 0%, 4%)}.progress.is-black:indeterminate{background-image:linear-gradient(to right, hsl(0, 0%, 4%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-light::-webkit-progress-value{background-color:hsl(0, 0%, 96%)}.progress.is-light::-moz-progress-bar{background-color:hsl(0, 0%, 96%)}.progress.is-light::-ms-fill{background-color:hsl(0, 0%, 96%)}.progress.is-light:indeterminate{background-image:linear-gradient(to right, hsl(0, 0%, 96%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-dark::-webkit-progress-value{background-color:hsl(0, 0%, 21%)}.progress.is-dark::-moz-progress-bar{background-color:hsl(0, 0%, 21%)}.progress.is-dark::-ms-fill{background-color:hsl(0, 0%, 21%)}.progress.is-dark:indeterminate{background-image:linear-gradient(to right, hsl(0, 0%, 21%) 30%, hsl(0, 0%, 93%) 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:linear-gradient(to right, #5851ff 30%, hsl(0, 0%, 93%) 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:linear-gradient(to right, #5851ff 30%, hsl(0, 0%, 93%) 30%)}.progress.is-info::-webkit-progress-value{background-color:hsl(207, 61%, 53%)}.progress.is-info::-moz-progress-bar{background-color:hsl(207, 61%, 53%)}.progress.is-info::-ms-fill{background-color:hsl(207, 61%, 53%)}.progress.is-info:indeterminate{background-image:linear-gradient(to right, hsl(207, 61%, 53%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-success::-webkit-progress-value{background-color:hsl(153, 53%, 53%)}.progress.is-success::-moz-progress-bar{background-color:hsl(153, 53%, 53%)}.progress.is-success::-ms-fill{background-color:hsl(153, 53%, 53%)}.progress.is-success:indeterminate{background-image:linear-gradient(to right, hsl(153, 53%, 53%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-warning::-webkit-progress-value{background-color:hsl(44, 100%, 77%)}.progress.is-warning::-moz-progress-bar{background-color:hsl(44, 100%, 77%)}.progress.is-warning::-ms-fill{background-color:hsl(44, 100%, 77%)}.progress.is-warning:indeterminate{background-image:linear-gradient(to right, hsl(44, 100%, 77%) 30%, hsl(0, 0%, 93%) 30%)}.progress.is-danger::-webkit-progress-value{background-color:hsl(348, 86%, 61%)}.progress.is-danger::-moz-progress-bar{background-color:hsl(348, 86%, 61%)}.progress.is-danger::-ms-fill{background-color:hsl(348, 86%, 61%)}.progress.is-danger:indeterminate{background-image:linear-gradient(to right, hsl(348, 86%, 61%) 30%, hsl(0, 0%, 93%) 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:hsl(0, 0%, 93%);background-image:linear-gradient(to right, hsl(0, 0%, 29%) 30%, hsl(0, 0%, 93%) 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:indeterminate::-ms-fill{animation-name:none}.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}}";
const BmProgressStyle0 = progressCss;
const Progress = /*@__PURE__*/ proxyCustomElement(class Progress extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.value = undefined;
this.max = 100;
this.color = undefined;
this.size = undefined;
}
render() {
return (h("progress", { key: 'f9299daab0d523fbf0892a4b68d7f83184dcc732', class: {
progress: true,
[this.color]: Boolean(this.color),
[this.size]: Boolean(this.size),
}, value: this.value, max: this.max }, typeof this.value === 'number' && `${this.value}%`));
}
static get style() { return BmProgressStyle0; }
}, [0, "bm-progress", {
"value": [2],
"max": [2],
"color": [1],
"size": [1]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["bm-progress"];
components.forEach(tagName => { switch (tagName) {
case "bm-progress":
if (!customElements.get(tagName)) {
customElements.define(tagName, Progress);
}
break;
} });
}
const BmProgress = Progress;
const defineCustomElement = defineCustomElement$1;
export { BmProgress, defineCustomElement };