@progress/kendo-react-progressbars
Version:
React ProgressBars offer a customizable interface for users to track and display the progress of a task. KendoReact ProgressBars package
9 lines (8 loc) • 1.05 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./constants.js"),s=e=>{const t=e.toString().split(".");return t.length===1?`${t[0]}`:`${t[0]}.${t[1].substr(0,u.LABEL_DECIMALS)}`},o=(e,t,n)=>{const r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},l=(e,t,n,r)=>{const c=Math.max(n,.01),a=100/c*100;e.current&&t.current&&(e.current.style.width=r?"100%":`${c}%`,t.current.style.width=r?"100%":`${a}%`,e.current.style.height=r?`${c}%`:"100%",t.current.style.height=r?`${a}%`:"100%")},h=(e,t,n)=>Math.max((n-e)/(t-e),u.MIN_RATIO);exports.calculatePercentage=o;exports.calculateRatio=h;exports.truncateNumber=s;exports.updateProgress=l;