UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

2 lines (1 loc) 4.06 kB
this.primevue=this.primevue||{},this.primevue.progressbar=function(e){"use strict";var n={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"block"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const t={key:1,class:"p-progressbar-label"},r={key:2,class:"p-progressbar-indeterminate-container"},i=e.createVNode("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1);return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-determinate .p-progressbar-label {\n text-align: center;\n height: 100%;\n width: 100%;\n position: absolute;\n font-weight: bold;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),n.render=function(n,a,s,o,l,p){return e.openBlock(),e.createBlock("div",{role:"progressbar",class:p.containerClass,"aria-valuemin":"0","aria-valuenow":s.value,"aria-valuemax":"100"},[p.determinate?(e.openBlock(),e.createBlock("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:p.progressStyle},null,4)):e.createCommentVNode("",!0),p.determinate&&null!==s.value&&s.showValue?(e.openBlock(),e.createBlock("div",t,[e.renderSlot(n.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(s.value+"%"),1)]))])):e.createCommentVNode("",!0),p.indeterminate?(e.openBlock(),e.createBlock("div",r,[i])):e.createCommentVNode("",!0)],10,["aria-valuenow"])},n}(Vue);