@progress/kendo-react-progressbars 7.0.2-develop.1 → 7.0.2-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(o,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],C):(o=typeof globalThis<"u"?globalThis:o||self,C(o.KendoReactProgressbars={},o.React,o.PropTypes,o.KendoReactCommon,o.KendoReactAnimation))})(this,function(o,C,J,i,Q){"use strict";"use client";function F(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=F(C),r=F(J),X=1e-5,Y=3,Z=400,ee=0,se=e=>{const t=e.toString().split(".");return t.length===1?`${t[0]}`:`${t[0]}.${t[1].substr(0,Y)}`},D=(e,t,a)=>{const n=Math.abs((t-e)/100);return Math.abs((a-e)/n)},_=(e,t,a,n)=>{const m=Math.max(a,.01),P=100/m*100;e.current&&t.current&&(e.current.style.width=n?"100%":`${m}%`,t.current.style.width=n?"100%":`${P}%`,e.current.style.height=n?`${m}%`:"100%",t.current.style.height=n?`${P}%`:"100%")},re=(e,t,a)=>Math.max((a-e)/(t-e),X),H={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},O=s.forwardRef((e,t)=>{i.validatePackage(H);const{chunkCount:a=y.chunkCount,className:n,disabled:m,orientation:P,min:A=y.min,max:v=y.max,reverse:d=y.reverse,style:p,tabIndex:K,emptyStyle:$,emptyClassName:B,progressStyle:U,progressClassName:M}=e,k=s.useRef(null),L=s.useCallback(()=>{k.current&&k.current.focus()},[]);s.useImperativeHandle(t,()=>({element:k.current,focus:L}));const b=e.value||y.value,g=e.value===null,h=i.useRtl(k,e.dir),E=P==="vertical",c={className:i.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!E,"k-progressbar-vertical":E,"k-progressbar-reverse":d,"k-progressbar-indeterminate":g,"k-disabled":m},n),ref:k,dir:h,tabIndex:i.getTabIndex(K,m),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":A,"aria-valuemax":v,"aria-valuenow":g?void 0:b,"aria-disabled":m,style:p},N=({count:f})=>{let R=[];const u=100/f+"%",q=re(A,v,b),z=Math.floor(q*f),I=Array(f).fill(!1);for(let l=0;l<z;l++)I[l]=!0;for(let l=0;l<f;++l){const S=I[l],j=S?M:B,V={...{width:E?void 0:u,height:E?u:void 0},...S?U:$};R.push(s.createElement("li",{key:l,className:i.classNames("k-progress-chunk",{"k-first":l===0,"k-last":l===f-1,"k-selected":S},j),style:V}))}return s.createElement(s.Fragment,null,R)};return s.createElement("div",{...c},s.createElement("ul",{className:"k-progressbar-chunks k-reset"},s.createElement(N,{count:a||y.chunkCount})))});O.propTypes={chunkCount:r.number,ariaLabel:r.string,disabled:r.bool,reverse:r.bool,max:r.number,min:r.number,value:r.number,tabIndex:r.number,emptyStyle:r.object,emptyClassName:r.string,progressStyle:r.object,progressClassName:r.string};const y={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};O.defaultProps=y,O.displayName="KendoChunkProgressBar";const te=e=>{const t=s.useRef();return s.useEffect(()=>{t.current=e}),t.current},w=s.forwardRef((e,t)=>{i.validatePackage(H);const{animation:a,disabled:n,reverse:m=x.reverse,orientation:P,labelVisible:A,labelPlacement:v,max:d=x.max,min:p=x.min,tabIndex:K,className:$,style:B,emptyStyle:U,emptyClassName:M,progressStyle:k,progressClassName:L}=e,b=s.useRef(null),g=s.useRef(null),h=s.useRef(null),E=s.useCallback(()=>{b.current&&b.current.focus()},[]);s.useImperativeHandle(t,()=>({element:b.current,progressStatusElement:g.current,progressStatusWrapElement:h.current,focus:E}));const c=e.value||x.value,N=te(c),f=e.value===null,R=i.useRtl(b,e.dir),u=P==="vertical",q=se(c),z={value:c},I=A?e.label?s.createElement("span",{className:"k-progress-status"},s.createElement(e.label,{...z})):s.createElement("span",{className:"k-progress-status"},q):void 0,l={className:i.classNames("k-progressbar",{"k-progressbar-horizontal":!u,"k-progressbar-vertical":u,"k-progressbar-reverse":m,"k-progressbar-indeterminate":f,"k-disabled":n},$),ref:b,dir:R,tabIndex:i.getTabIndex(K,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":p,"aria-valuemax":d,"aria-valuenow":f?void 0:c,"aria-disabled":n,style:B},S=i.classNames("k-progress-status-wrap",{"k-progress-start":v==="start","k-progress-center":v==="center","k-progress-end":v==="end"||v===void 0}),j=typeof a!="boolean"&&a!==void 0?a.duration:a?Z:ee,W=s.useCallback(()=>{const T=D(p,d,N);_(g,h,T,u)},[u,d,p,N]),G=s.useCallback(T=>{const ae=D(p,d,N+(c-N)*T);_(g,h,ae,u)},[p,d,N,c,u]),V=s.useCallback(()=>{const T=D(p,d,c);_(g,h,T,u)},[u,d,p,c]);return Q.useAnimation({duration:j,onStart:W,onUpdate:G,onEnd:V},[c,j]),s.createElement("div",{...l},s.createElement("span",{className:S+(M?" "+M:""),style:U},I),s.createElement("div",{className:"k-progressbar-value k-selected",style:k,ref:g},s.createElement("span",{className:S+(L?" "+L:""),ref:h},I)))});w.propTypes={animation:r.any,ariaLabel:r.string,disabled:r.bool,reverse:r.bool,label:r.any,labelVisible:r.bool,labelPlacement:r.oneOf(["start","center","end"]),max:r.number,min:r.number,value:r.number,tabIndex:r.number,emptyStyle:r.object,emptyClassName:r.string,progressStyle:r.object,progressClassName:r.string};const x={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};w.defaultProps=x,w.displayName="KendoProgressBar",o.ChunkProgressBar=O,o.ProgressBar=w,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
5
+ (function(c,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],x):(c=typeof globalThis<"u"?globalThis:c||self,x(c.KendoReactProgressbars={},c.React,c.PropTypes,c.KendoReactCommon,c.KendoReactAnimation))})(this,function(c,x,a,i,J){"use strict";"use client";function Q(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const t=Q(x),X=1e-5,Y=3,Z=400,T=0,ee=e=>{const s=e.toString().split(".");return s.length===1?`${s[0]}`:`${s[0]}.${s[1].substr(0,Y)}`},_=(e,s,r)=>{const n=Math.abs((s-e)/100);return Math.abs((r-e)/n)},$=(e,s,r,n)=>{const m=Math.max(r,.01),y=100/m*100;e.current&&s.current&&(e.current.style.width=n?"100%":`${m}%`,s.current.style.width=n?"100%":`${y}%`,e.current.style.height=n?`${m}%`:"100%",s.current.style.height=n?`${y}%`:"100%")},te=(e,s,r)=>Math.max((r-e)/(s-e),X),H={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},A=t.forwardRef((e,s)=>{i.validatePackage(H);const{chunkCount:r=k.chunkCount,className:n,disabled:m,orientation:y,min:L=k.min,max:p=k.max,reverse:d=k.reverse,style:b,tabIndex:B,emptyStyle:P,emptyClassName:U,progressStyle:q,progressClassName:R}=e,h=t.useRef(null),j=t.useCallback(()=>{h.current&&h.current.focus()},[]);t.useImperativeHandle(s,()=>({element:h.current,focus:j}));const g=e.value||k.value,f=e.value===null,N=i.useRtl(h,e.dir),S=y==="vertical",o={className:i.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!S,"k-progressbar-vertical":S,"k-progressbar-reverse":d,"k-progressbar-indeterminate":f,"k-disabled":m},n),ref:h,dir:N,tabIndex:i.getTabIndex(B,m),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":L,"aria-valuemax":p,"aria-valuenow":f?void 0:g,"aria-disabled":m,style:b},E=({count:v})=>{let D=[];const u=100/v+"%",z=te(L,p,g),V=Math.floor(z*v),O=Array(v).fill(!1);for(let l=0;l<V;l++)O[l]=!0;for(let l=0;l<v;++l){const C=O[l],K=C?R:U,F={...{width:S?void 0:u,height:S?u:void 0},...C?q:P};D.push(t.createElement("li",{key:l,className:i.classNames("k-progress-chunk",{"k-first":l===0,"k-last":l===v-1,"k-selected":C},K),style:F}))}return t.createElement(t.Fragment,null,D)};return t.createElement("div",{...o},t.createElement("ul",{className:"k-progressbar-chunks k-reset"},t.createElement(E,{count:r||k.chunkCount})))});A.propTypes={chunkCount:a.number,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const k={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};A.defaultProps=k,A.displayName="KendoChunkProgressBar";const ae=e=>{const s=t.useRef();return t.useEffect(()=>{s.current=e}),s.current},M=t.forwardRef((e,s)=>{i.validatePackage(H);const{animation:r,disabled:n,reverse:m=I.reverse,orientation:y,labelVisible:L,labelPlacement:p,max:d=I.max,min:b=I.min,tabIndex:B,className:P,style:U,emptyStyle:q,emptyClassName:R,progressStyle:h,progressClassName:j}=e,g=t.useRef(null),f=t.useRef(null),N=t.useRef(null),S=t.useCallback(()=>{g.current&&g.current.focus()},[]);t.useImperativeHandle(s,()=>({element:g.current,progressStatusElement:f.current,progressStatusWrapElement:N.current,focus:S}));const o=e.value||I.value,E=ae(o),v=e.value===null,D=i.useRtl(g,e.dir),u=y==="vertical",z=ee(o),V={value:o},O=L?e.label?t.createElement("span",{className:"k-progress-status"},t.createElement(e.label,{...V})):t.createElement("span",{className:"k-progress-status"},z):void 0,l={className:i.classNames("k-progressbar",{"k-progressbar-horizontal":!u,"k-progressbar-vertical":u,"k-progressbar-reverse":m,"k-progressbar-indeterminate":v,"k-disabled":n},P),ref:g,dir:D,tabIndex:i.getTabIndex(B,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":b,"aria-valuemax":d,"aria-valuenow":v?void 0:o,"aria-disabled":n,style:U},C=i.classNames("k-progress-status-wrap",{"k-progress-start":p==="start","k-progress-center":p==="center","k-progress-end":p==="end"||p===void 0}),K=typeof r!="boolean"&&r!==void 0?r.duration:r?Z:T,W=t.useCallback(()=>{const w=_(b,d,E);$(f,N,w,u)},[u,d,b,E]),G=t.useCallback(w=>{const se=_(b,d,E+(o-E)*w);$(f,N,se,u)},[b,d,E,o,u]),F=t.useCallback(()=>{const w=_(b,d,o);$(f,N,w,u)},[u,d,b,o]);return J.useAnimation({duration:K,onStart:W,onUpdate:G,onEnd:F},[o,K]),t.createElement("div",{...l},t.createElement("span",{className:C+(R?" "+R:""),style:q},O),t.createElement("div",{className:"k-progressbar-value k-selected",style:h,ref:f},t.createElement("span",{className:C+(j?" "+j:""),ref:N},O)))});M.propTypes={animation:a.any,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,label:a.any,labelVisible:a.bool,labelPlacement:a.oneOf(["start","center","end"]),max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const I={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};M.defaultProps=I,M.displayName="KendoProgressBar",c.ChunkProgressBar=A,c.ProgressBar=M,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
package/index.d.mts ADDED
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export * from './index';
package/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),J=require("prop-types"),u=require("@progress/kendo-react-common"),Q=require("@progress/kendo-react-animation");function F(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const s=F(G),t=F(J),X=1e-5,Y=3,Z=400,ee=0,se=e=>{const a=e.toString().split(".");return a.length===1?`${a[0]}`:`${a[0]}.${a[1].substr(0,Y)}`},K=(e,a,r)=>{const n=Math.abs((a-e)/100);return Math.abs((r-e)/n)},q=(e,a,r,n)=>{const i=Math.max(r,.01),N=100/i*100;e.current&&a.current&&(e.current.style.width=n?"100%":`${i}%`,a.current.style.width=n?"100%":`${N}%`,e.current.style.height=n?`${i}%`:"100%",a.current.style.height=n?`${N}%`:"100%")},te=(e,a,r)=>Math.max((r-e)/(a-e),X),H={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},A=s.forwardRef((e,a)=>{u.validatePackage(H);const{chunkCount:r=h.chunkCount,className:n,disabled:i,orientation:N,min:I=h.min,max:k=h.max,reverse:m=h.reverse,style:d,tabIndex:L,emptyStyle:D,emptyClassName:_,progressStyle:j,progressClassName:R}=e,f=s.useRef(null),O=s.useCallback(()=>{f.current&&f.current.focus()},[]);s.useImperativeHandle(a,()=>({element:f.current,focus:O}));const b=e.value||h.value,p=e.value===null,v=u.useRtl(f,e.dir),P=N==="vertical",o={className:u.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!P,"k-progressbar-vertical":P,"k-progressbar-reverse":m,"k-progressbar-indeterminate":p,"k-disabled":i},n),ref:f,dir:v,tabIndex:u.getTabIndex(L,i),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":I,"aria-valuemax":k,"aria-valuenow":p?void 0:b,"aria-disabled":i,style:d},y=({count:g})=>{let T=[];const c=100/g+"%",$=te(I,k,b),B=Math.floor($*g),E=Array(g).fill(!1);for(let l=0;l<B;l++)E[l]=!0;for(let l=0;l<g;++l){const C=E[l],w=C?R:_,U={...{width:P?void 0:c,height:P?c:void 0},...C?j:D};T.push(s.createElement("li",{key:l,className:u.classNames("k-progress-chunk",{"k-first":l===0,"k-last":l===g-1,"k-selected":C},w),style:U}))}return s.createElement(s.Fragment,null,T)};return s.createElement("div",{...o},s.createElement("ul",{className:"k-progressbar-chunks k-reset"},s.createElement(y,{count:r||h.chunkCount})))});A.propTypes={chunkCount:t.number,ariaLabel:t.string,disabled:t.bool,reverse:t.bool,max:t.number,min:t.number,value:t.number,tabIndex:t.number,emptyStyle:t.object,emptyClassName:t.string,progressStyle:t.object,progressClassName:t.string};const h={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};A.defaultProps=h;A.displayName="KendoChunkProgressBar";const ae=e=>{const a=s.useRef();return s.useEffect(()=>{a.current=e}),a.current},M=s.forwardRef((e,a)=>{u.validatePackage(H);const{animation:r,disabled:n,reverse:i=x.reverse,orientation:N,labelVisible:I,labelPlacement:k,max:m=x.max,min:d=x.min,tabIndex:L,className:D,style:_,emptyStyle:j,emptyClassName:R,progressStyle:f,progressClassName:O}=e,b=s.useRef(null),p=s.useRef(null),v=s.useRef(null),P=s.useCallback(()=>{b.current&&b.current.focus()},[]);s.useImperativeHandle(a,()=>({element:b.current,progressStatusElement:p.current,progressStatusWrapElement:v.current,focus:P}));const o=e.value||x.value,y=ae(o),g=e.value===null,T=u.useRtl(b,e.dir),c=N==="vertical",$=se(o),B={value:o},E=I?e.label?s.createElement("span",{className:"k-progress-status"},s.createElement(e.label,{...B})):s.createElement("span",{className:"k-progress-status"},$):void 0,l={className:u.classNames("k-progressbar",{"k-progressbar-horizontal":!c,"k-progressbar-vertical":c,"k-progressbar-reverse":i,"k-progressbar-indeterminate":g,"k-disabled":n},D),ref:b,dir:T,tabIndex:u.getTabIndex(L,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":g?void 0:o,"aria-disabled":n,style:_},C=u.classNames("k-progress-status-wrap",{"k-progress-start":k==="start","k-progress-center":k==="center","k-progress-end":k==="end"||k===void 0}),w=typeof r!="boolean"&&r!==void 0?r.duration:r?Z:ee,z=s.useCallback(()=>{const S=K(d,m,y);q(p,v,S,c)},[c,m,d,y]),V=s.useCallback(S=>{const W=K(d,m,y+(o-y)*S);q(p,v,W,c)},[d,m,y,o,c]),U=s.useCallback(()=>{const S=K(d,m,o);q(p,v,S,c)},[c,m,d,o]);return Q.useAnimation({duration:w,onStart:z,onUpdate:V,onEnd:U},[o,w]),s.createElement("div",{...l},s.createElement("span",{className:C+(R?" "+R:""),style:j},E),s.createElement("div",{className:"k-progressbar-value k-selected",style:f,ref:p},s.createElement("span",{className:C+(O?" "+O:""),ref:v},E)))});M.propTypes={animation:t.any,ariaLabel:t.string,disabled:t.bool,reverse:t.bool,label:t.any,labelVisible:t.bool,labelPlacement:t.oneOf(["start","center","end"]),max:t.number,min:t.number,value:t.number,tabIndex:t.number,emptyStyle:t.object,emptyClassName:t.string,progressStyle:t.object,progressClassName:t.string};const x={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};M.defaultProps=x;M.displayName="KendoProgressBar";exports.ChunkProgressBar=A;exports.ProgressBar=M;
5
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),s=require("prop-types"),u=require("@progress/kendo-react-common"),G=require("@progress/kendo-react-animation");function J(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const t=J(W),Q=1e-5,X=3,Y=400,Z=0,ee=e=>{const a=e.toString().split(".");return a.length===1?`${a[0]}`:`${a[0]}.${a[1].substr(0,X)}`},K=(e,a,r)=>{const n=Math.abs((a-e)/100);return Math.abs((r-e)/n)},q=(e,a,r,n)=>{const i=Math.max(r,.01),N=100/i*100;e.current&&a.current&&(e.current.style.width=n?"100%":`${i}%`,a.current.style.width=n?"100%":`${N}%`,e.current.style.height=n?`${i}%`:"100%",a.current.style.height=n?`${N}%`:"100%")},te=(e,a,r)=>Math.max((r-e)/(a-e),Q),F={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},A=t.forwardRef((e,a)=>{u.validatePackage(F);const{chunkCount:r=h.chunkCount,className:n,disabled:i,orientation:N,min:I=h.min,max:k=h.max,reverse:m=h.reverse,style:d,tabIndex:L,emptyStyle:D,emptyClassName:j,progressStyle:_,progressClassName:R}=e,f=t.useRef(null),O=t.useCallback(()=>{f.current&&f.current.focus()},[]);t.useImperativeHandle(a,()=>({element:f.current,focus:O}));const b=e.value||h.value,p=e.value===null,v=u.useRtl(f,e.dir),C=N==="vertical",o={className:u.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!C,"k-progressbar-vertical":C,"k-progressbar-reverse":m,"k-progressbar-indeterminate":p,"k-disabled":i},n),ref:f,dir:v,tabIndex:u.getTabIndex(L,i),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":I,"aria-valuemax":k,"aria-valuenow":p?void 0:b,"aria-disabled":i,style:d},y=({count:g})=>{let w=[];const c=100/g+"%",$=te(I,k,b),B=Math.floor($*g),E=Array(g).fill(!1);for(let l=0;l<B;l++)E[l]=!0;for(let l=0;l<g;++l){const P=E[l],T=P?R:j,U={...{width:C?void 0:c,height:C?c:void 0},...P?_:D};w.push(t.createElement("li",{key:l,className:u.classNames("k-progress-chunk",{"k-first":l===0,"k-last":l===g-1,"k-selected":P},T),style:U}))}return t.createElement(t.Fragment,null,w)};return t.createElement("div",{...o},t.createElement("ul",{className:"k-progressbar-chunks k-reset"},t.createElement(y,{count:r||h.chunkCount})))});A.propTypes={chunkCount:s.number,ariaLabel:s.string,disabled:s.bool,reverse:s.bool,max:s.number,min:s.number,value:s.number,tabIndex:s.number,emptyStyle:s.object,emptyClassName:s.string,progressStyle:s.object,progressClassName:s.string};const h={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};A.defaultProps=h;A.displayName="KendoChunkProgressBar";const se=e=>{const a=t.useRef();return t.useEffect(()=>{a.current=e}),a.current},M=t.forwardRef((e,a)=>{u.validatePackage(F);const{animation:r,disabled:n,reverse:i=x.reverse,orientation:N,labelVisible:I,labelPlacement:k,max:m=x.max,min:d=x.min,tabIndex:L,className:D,style:j,emptyStyle:_,emptyClassName:R,progressStyle:f,progressClassName:O}=e,b=t.useRef(null),p=t.useRef(null),v=t.useRef(null),C=t.useCallback(()=>{b.current&&b.current.focus()},[]);t.useImperativeHandle(a,()=>({element:b.current,progressStatusElement:p.current,progressStatusWrapElement:v.current,focus:C}));const o=e.value||x.value,y=se(o),g=e.value===null,w=u.useRtl(b,e.dir),c=N==="vertical",$=ee(o),B={value:o},E=I?e.label?t.createElement("span",{className:"k-progress-status"},t.createElement(e.label,{...B})):t.createElement("span",{className:"k-progress-status"},$):void 0,l={className:u.classNames("k-progressbar",{"k-progressbar-horizontal":!c,"k-progressbar-vertical":c,"k-progressbar-reverse":i,"k-progressbar-indeterminate":g,"k-disabled":n},D),ref:b,dir:w,tabIndex:u.getTabIndex(L,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":g?void 0:o,"aria-disabled":n,style:j},P=u.classNames("k-progress-status-wrap",{"k-progress-start":k==="start","k-progress-center":k==="center","k-progress-end":k==="end"||k===void 0}),T=typeof r!="boolean"&&r!==void 0?r.duration:r?Y:Z,z=t.useCallback(()=>{const S=K(d,m,y);q(p,v,S,c)},[c,m,d,y]),V=t.useCallback(S=>{const H=K(d,m,y+(o-y)*S);q(p,v,H,c)},[d,m,y,o,c]),U=t.useCallback(()=>{const S=K(d,m,o);q(p,v,S,c)},[c,m,d,o]);return G.useAnimation({duration:T,onStart:z,onUpdate:V,onEnd:U},[o,T]),t.createElement("div",{...l},t.createElement("span",{className:P+(R?" "+R:""),style:_},E),t.createElement("div",{className:"k-progressbar-value k-selected",style:f,ref:p},t.createElement("span",{className:P+(O?" "+O:""),ref:v},E)))});M.propTypes={animation:s.any,ariaLabel:s.string,disabled:s.bool,reverse:s.bool,label:s.any,labelVisible:s.bool,labelPlacement:s.oneOf(["start","center","end"]),max:s.number,min:s.number,value:s.number,tabIndex:s.number,emptyStyle:s.object,emptyClassName:s.string,progressStyle:s.object,progressClassName:s.string};const x={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};M.defaultProps=x;M.displayName="KendoProgressBar";exports.ChunkProgressBar=A;exports.ProgressBar=M;
package/index.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use client";
6
6
  import * as e from "react";
7
- import * as r from "prop-types";
7
+ import r from "prop-types";
8
8
  import { validatePackage as H, useRtl as W, classNames as L, getTabIndex as q } from "@progress/kendo-react-common";
9
9
  import { useAnimation as Q } from "@progress/kendo-react-animation";
10
10
  const X = 1e-5, Y = 3, Z = 400, ee = 0, se = (s) => {
@@ -20,7 +20,7 @@ const X = 1e-5, Y = 3, Z = 400, ee = 0, se = (s) => {
20
20
  name: "@progress/kendo-react-progressbars",
21
21
  productName: "KendoReact",
22
22
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
23
- publishDate: 1702479929,
23
+ publishDate: 1702631344,
24
24
  version: "",
25
25
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
26
26
  }, j = e.forwardRef((s, t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-progressbars",
3
- "version": "7.0.2-develop.1",
3
+ "version": "7.0.2-develop.2",
4
4
  "description": "React ProgressBars offer a customizable interface for users to track and display the progress of a task. KendoReact ProgressBars package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -10,15 +10,21 @@
10
10
  "types": "./index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./index.mjs",
14
- "require": "./index.js"
13
+ "import": {
14
+ "types": "./index.d.mts",
15
+ "default": "./index.mjs"
16
+ },
17
+ "require": {
18
+ "types": "./index.d.ts",
19
+ "default": "./index.js"
20
+ }
15
21
  }
16
22
  },
17
23
  "sideEffects": false,
18
24
  "peerDependencies": {
19
- "@progress/kendo-licensing": "^1.3.0",
20
- "@progress/kendo-react-animation": "7.0.2-develop.1",
21
- "@progress/kendo-react-common": "7.0.2-develop.1",
25
+ "@progress/kendo-licensing": "^1.3.4",
26
+ "@progress/kendo-react-animation": "7.0.2-develop.2",
27
+ "@progress/kendo-react-common": "7.0.2-develop.2",
22
28
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
23
29
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
24
30
  },