vue-progress-circle
Version:
Circle progress component for vue 3
861 lines (776 loc) • 28.9 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("vue"));
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["vue-progress-circle"] = factory(require("vue"));
else
root["vue-progress-circle"] = factory(root["Vue"]);
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__274__) {
return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 612:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
;
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(601);
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".progress-circle-container{position:relative}.progress-circle-inner{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}", ""]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
/***/ }),
/***/ 314:
/***/ (function(module) {
;
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = "";
var needLayer = typeof item[5] !== "undefined";
if (item[4]) {
content += "@supports (".concat(item[4], ") {");
}
if (item[2]) {
content += "@media ".concat(item[2], " {");
}
if (needLayer) {
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
}
content += cssWithMappingToString(item);
if (needLayer) {
content += "}";
}
if (item[2]) {
content += "}";
}
if (item[4]) {
content += "}";
}
return content;
}).join("");
};
// import a list of modules into the list
list.i = function i(modules, media, dedupe, supports, layer) {
if (typeof modules === "string") {
modules = [[null, modules, undefined]];
}
var alreadyImportedModules = {};
if (dedupe) {
for (var k = 0; k < this.length; k++) {
var id = this[k][0];
if (id != null) {
alreadyImportedModules[id] = true;
}
}
}
for (var _k = 0; _k < modules.length; _k++) {
var item = [].concat(modules[_k]);
if (dedupe && alreadyImportedModules[item[0]]) {
continue;
}
if (typeof layer !== "undefined") {
if (typeof item[5] === "undefined") {
item[5] = layer;
} else {
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
item[5] = layer;
}
}
if (media) {
if (!item[2]) {
item[2] = media;
} else {
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
item[2] = media;
}
}
if (supports) {
if (!item[4]) {
item[4] = "".concat(supports);
} else {
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
item[4] = supports;
}
}
list.push(item);
}
};
return list;
};
/***/ }),
/***/ 601:
/***/ (function(module) {
;
module.exports = function (i) {
return i[1];
};
/***/ }),
/***/ 742:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(612);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.id, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = (__webpack_require__(548)/* ["default"] */ .A)
var update = add("7b9e0c18", content, true, {"sourceMap":false,"shadowMode":false});
/***/ }),
/***/ 548:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
;
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
A: function() { return /* binding */ addStylesClient; }
});
;// ./node_modules/vue-style-loader/lib/listToStyles.js
/**
* Translates the list format produced by css-loader into something
* easier to manipulate.
*/
function listToStyles (parentId, list) {
var styles = []
var newStyles = {}
for (var i = 0; i < list.length; i++) {
var item = list[i]
var id = item[0]
var css = item[1]
var media = item[2]
var sourceMap = item[3]
var part = {
id: parentId + ':' + i,
css: css,
media: media,
sourceMap: sourceMap
}
if (!newStyles[id]) {
styles.push(newStyles[id] = { id: id, parts: [part] })
} else {
newStyles[id].parts.push(part)
}
}
return styles
}
;// ./node_modules/vue-style-loader/lib/addStylesClient.js
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
Modified by Evan You @yyx990803
*/
var hasDocument = typeof document !== 'undefined'
if (typeof DEBUG !== 'undefined' && DEBUG) {
if (!hasDocument) {
throw new Error(
'vue-style-loader cannot be used in a non-browser environment. ' +
"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
) }
}
/*
type StyleObject = {
id: number;
parts: Array<StyleObjectPart>
}
type StyleObjectPart = {
css: string;
media: string;
sourceMap: ?string
}
*/
var stylesInDom = {/*
[id: number]: {
id: number,
refs: number,
parts: Array<(obj?: StyleObjectPart) => void>
}
*/}
var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
var singletonElement = null
var singletonCounter = 0
var isProduction = false
var noop = function () {}
var options = null
var ssrIdKey = 'data-vue-ssr-id'
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
function addStylesClient (parentId, list, _isProduction, _options) {
isProduction = _isProduction
options = _options || {}
var styles = listToStyles(parentId, list)
addStylesToDom(styles)
return function update (newList) {
var mayRemove = []
for (var i = 0; i < styles.length; i++) {
var item = styles[i]
var domStyle = stylesInDom[item.id]
domStyle.refs--
mayRemove.push(domStyle)
}
if (newList) {
styles = listToStyles(parentId, newList)
addStylesToDom(styles)
} else {
styles = []
}
for (var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i]
if (domStyle.refs === 0) {
for (var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j]()
}
delete stylesInDom[domStyle.id]
}
}
}
}
function addStylesToDom (styles /* Array<StyleObject> */) {
for (var i = 0; i < styles.length; i++) {
var item = styles[i]
var domStyle = stylesInDom[item.id]
if (domStyle) {
domStyle.refs++
for (var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j])
}
for (; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j]))
}
if (domStyle.parts.length > item.parts.length) {
domStyle.parts.length = item.parts.length
}
} else {
var parts = []
for (var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j]))
}
stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
}
}
}
function createStyleElement () {
var styleElement = document.createElement('style')
styleElement.type = 'text/css'
head.appendChild(styleElement)
return styleElement
}
function addStyle (obj /* StyleObjectPart */) {
var update, remove
var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
if (styleElement) {
if (isProduction) {
// has SSR styles and in production mode.
// simply do nothing.
return noop
} else {
// has SSR styles but in dev mode.
// for some reason Chrome can't handle source map in server-rendered
// style tags - source maps in <style> only works if the style tag is
// created and inserted dynamically. So we remove the server rendered
// styles and inject new ones.
styleElement.parentNode.removeChild(styleElement)
}
}
if (isOldIE) {
// use singleton mode for IE9.
var styleIndex = singletonCounter++
styleElement = singletonElement || (singletonElement = createStyleElement())
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
} else {
// use multi-style-tag mode in all other cases
styleElement = createStyleElement()
update = applyToTag.bind(null, styleElement)
remove = function () {
styleElement.parentNode.removeChild(styleElement)
}
}
update(obj)
return function updateStyle (newObj /* StyleObjectPart */) {
if (newObj) {
if (newObj.css === obj.css &&
newObj.media === obj.media &&
newObj.sourceMap === obj.sourceMap) {
return
}
update(obj = newObj)
} else {
remove()
}
}
}
var replaceText = (function () {
var textStore = []
return function (index, replacement) {
textStore[index] = replacement
return textStore.filter(Boolean).join('\n')
}
})()
function applyToSingletonTag (styleElement, index, remove, obj) {
var css = remove ? '' : obj.css
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = replaceText(index, css)
} else {
var cssNode = document.createTextNode(css)
var childNodes = styleElement.childNodes
if (childNodes[index]) styleElement.removeChild(childNodes[index])
if (childNodes.length) {
styleElement.insertBefore(cssNode, childNodes[index])
} else {
styleElement.appendChild(cssNode)
}
}
}
function applyToTag (styleElement, obj) {
var css = obj.css
var media = obj.media
var sourceMap = obj.sourceMap
if (media) {
styleElement.setAttribute('media', media)
}
if (options.ssrId) {
styleElement.setAttribute(ssrIdKey, obj.id)
}
if (sourceMap) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
// http://stackoverflow.com/a/26603875
css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
}
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = css
} else {
while (styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild)
}
styleElement.appendChild(document.createTextNode(css))
}
}
/***/ }),
/***/ 274:
/***/ (function(module) {
;
module.exports = __WEBPACK_EXTERNAL_MODULE__274__;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/publicPath */
/******/ !function() {
/******/ __webpack_require__.p = "";
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
!function() {
;
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
ProgressCircle: function() { return /* reexport */ ProgressCircle; },
"default": function() { return /* binding */ entry_lib; },
install: function() { return /* reexport */ install; }
});
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
/* eslint-disable no-var */
// This file is imported into lib/wc client bundles.
if (typeof window !== 'undefined') {
var currentScript = window.document.currentScript
if (false) { var getCurrentScript; }
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
if (src) {
__webpack_require__.p = src[1] // eslint-disable-line
}
}
// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(274);
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/ProgressCircle.vue?vue&type=script&setup=true&lang=js
const _hoisted_1 = ["width", "height"];
const _hoisted_2 = ["id", "fx", "fy", "cx", "cy", "r"];
const _hoisted_3 = ["stop-color"];
const _hoisted_4 = ["stop-color"];
const _hoisted_5 = ["r", "cx", "cy", "fill", "stroke", "stroke-dasharray"];
const _hoisted_6 = ["transform", "r", "cx", "cy", "fill", "stroke", "stroke-dasharray", "stroke-dashoffset"];
/* harmony default export */ var ProgressCirclevue_type_script_setup_true_lang_js = ({
__name: 'ProgressCircle',
props: {
diameter: {
type: Number,
default: 100
},
totalSteps: {
type: Number,
required: true,
default: 10
},
completedSteps: {
type: Number,
required: true,
default: 0
},
startColor: {
type: String,
default: '#FF0000'
},
stopColor: {
type: String,
default: '#0000FF'
},
circleWidth: {
type: Number,
default: 10
},
animationDuration: {
type: Number,
default: 1000
},
circleColor: {
type: String,
default: '#000000'
},
innerDisplay: {
type: String,
default: 'slot'
},
percentColor: {
type: String,
default: 'inherit'
},
innerColor: {
type: String,
default: 'transparent'
},
circleOrigin: {
type: String,
default: 'top'
},
reverseRotation: {
type: Boolean,
default: false
},
afterMountDelay: {
type: Number,
default: 0
}
},
setup(__props) {
const props = __props;
const gradient = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)({
fx: 1,
fy: 0.5,
cx: 0.5,
cy: 0.5,
r: 0.65
});
const gradientAnimation = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
const currentAngle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
const strokeDashoffset = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
const animationIncrements = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(1000 / 60);
const generatedUid = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
// computed
const radius = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return props.diameter / 2;
});
const innerCircleDiameter = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return props.diameter - props.circleWidth * 2;
});
const circumference = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return Math.PI * innerCircleDiameter.value;
});
const finishedPercentage = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return stepSize.value * props.completedSteps;
});
const finishedPercentageRounded = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return Math.round(finishedPercentage.value);
});
const circleSlice = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return 2 * Math.PI / props.totalSteps;
});
const totalPoints = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return props.animationDuration / animationIncrements.value;
});
const animateSlice = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return circleSlice.value / totalPoints.value;
});
const innerCircleRadius = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return innerCircleDiameter.value / 2;
});
const startCircleWithAngle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
switch (props.circleOrigin) {
case 'bottom':
return 90;
case 'right':
return 0;
case 'left':
return 180;
}
return 270;
});
const stepSize = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
if (props.totalSteps === 0) {
return 0;
}
return 100 / props.totalSteps;
});
const containerStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return {
height: `${props.diameter}px`,
width: `${props.diameter}px`
};
});
const progressStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return {
height: `${props.diameter}px`,
width: `${props.diameter}px`,
strokeWidth: `${props.circleWidth}px`,
strokeDashoffset: strokeDashoffset.value,
transition: `stroke-dashoffset ${props.animationDuration}ms linear`
};
});
const strokeStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return {
height: `${props.diameter}px`,
width: `${props.diameter}px`,
strokeWidth: `${props.circleWidth}px`
};
});
const percentStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return {
fontSize: `${props.diameter / 2}px`,
color: `${props.percentColor}`,
display: 'block'
};
});
const innerCircleStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
return {
width: `${innerCircleDiameter.value}px`
};
});
// methods
const getPointOfCircle = angle => {
const radius = 0.5;
const x = radius + radius * Math.cos(angle);
const y = radius + radius * Math.sin(angle);
return {
x,
y
};
};
const gotoPoint = () => {
const point = getPointOfCircle(currentAngle.value);
gradient.value.fx = point.x;
gradient.value.fy = point.y;
};
const gotoNextStep = () => {
currentAngle.value = props.completedSteps * circleSlice.value;
gotoPoint();
};
const changeProgress = (isAnimate = true) => {
strokeDashoffset.value = (100 - finishedPercentage.value) / 100 * circumference.value;
if (props.reverseRotation) strokeDashoffset.value = -strokeDashoffset.value;
if (gradientAnimation.value) {
clearInterval(gradientAnimation.value);
}
if (!isAnimate) {
gotoNextStep();
return;
}
const angleOffset = (props.completedSteps - 1) * circleSlice.value;
let i = (currentAngle.value - angleOffset) / animateSlice.value;
const incrementer = Math.abs(i - totalPoints.value) / totalPoints.value;
const isMoveForward = i < totalPoints.value;
gradientAnimation.value = setInterval(() => {
if (isMoveForward && i >= totalPoints.value || !isMoveForward && i < totalPoints.value) {
clearInterval(gradientAnimation.value);
return;
}
currentAngle.value = angleOffset + animateSlice.value * i;
gotoPoint();
i += isMoveForward ? incrementer : -incrementer;
}, animationIncrements.value);
};
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.totalSteps, (newValue, oldValue) => {
changeProgress(true);
});
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.completedSteps, (newValue, oldValue) => {
changeProgress(true);
});
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.diameter, (newValue, oldValue) => {
changeProgress(true);
});
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.circleWidth, (newValue, oldValue) => {
changeProgress(true);
});
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.reverseRotation, (newValue, oldValue) => {
changeProgress(false);
});
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
generatedUid.value = 'progresscircle_' + Math.random().toString(36).substring(2, 9);
if (props.afterMountDelay) {
strokeDashoffset.value = circumference.value;
if (props.reverseRotation) strokeDashoffset.value = -strokeDashoffset.value;
setTimeout(() => {
changeProgress(false);
}, props.afterMountDelay);
} else {
changeProgress(false);
}
});
return (_ctx, _cache) => {
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
class: "progress-circle-container",
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(containerStyle.value)
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
class: "progress-circle-inner",
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(innerCircleStyle.value)
}, [__props.innerDisplay === 'percent' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
key: 0,
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(percentStyle.value)
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(finishedPercentageRounded.value), 5)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "default", {
key: 1
})], 4), ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("svg", {
class: "progress-circle-bar",
width: __props.diameter,
height: __props.diameter,
version: "1.1",
xmlns: "http://www.w3.org/2000/svg"
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("defs", null, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("radialGradient", {
id: 'radial-gradient' + generatedUid.value,
fx: gradient.value.fx,
fy: gradient.value.fy,
cx: gradient.value.cx,
cy: gradient.value.cy,
r: gradient.value.r
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("stop", {
offset: "50%",
"stop-color": __props.startColor
}, null, 8, _hoisted_3), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("stop", {
offset: "100%",
"stop-color": __props.stopColor
}, null, 8, _hoisted_4)], 8, _hoisted_2)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("circle", {
r: innerCircleRadius.value,
cx: radius.value,
cy: radius.value,
fill: __props.innerColor,
stroke: __props.circleColor,
"stroke-dasharray": circumference.value,
"stroke-dashoffset": "0",
"stroke-linecap": "round",
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(strokeStyle.value)
}, null, 12, _hoisted_5), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("circle", {
transform: 'rotate(' + startCircleWithAngle.value + ', ' + radius.value + ',' + radius.value + ')',
r: innerCircleRadius.value,
cx: radius.value,
cy: radius.value,
fill: __props.innerColor,
stroke: 'url(#radial-gradient' + generatedUid.value + ')',
"stroke-dasharray": circumference.value,
"stroke-dashoffset": circumference.value,
"stroke-linecap": "round",
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(progressStyle.value)
}, null, 12, _hoisted_6)], 8, _hoisted_1))], 4);
};
}
});
;// ./src/components/ProgressCircle.vue?vue&type=script&setup=true&lang=js
;// ./src/components/ProgressCircle.vue
const __exports__ = ProgressCirclevue_type_script_setup_true_lang_js;
/* harmony default export */ var ProgressCircle = (__exports__);
// EXTERNAL MODULE: ./src/styles/common.scss
var common = __webpack_require__(742);
;// ./src/index.js
// Component imports
// Default export for global usage
const install = app => {
app.component('progress-circle', ProgressCircle);
};
/* harmony default export */ var src_0 = (install);
// Named export for specific usage
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
/* harmony default export */ var entry_lib = (src_0);
}();
/******/ return __webpack_exports__;
/******/ })()
;
});