@progress/kendo-react-progressbars 7.1.1-develop.1 → 7.1.1-develop.3
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.
- package/dist/cdn/js/kendo-react-progressbars.js +1 -1
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/package.json +3 -3
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2024 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(c,x){typeof exports=="object"&&typeof module!="undefined"?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!="undefined"?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-
|
|
5
|
+
(function(c,x){typeof exports=="object"&&typeof module!="undefined"?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!="undefined"?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-progressbar-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.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2024 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 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-
|
|
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-progressbar-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
|
@@ -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:
|
|
23
|
+
publishDate: 1707150163,
|
|
24
24
|
version: "",
|
|
25
25
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
26
26
|
}, j = e.forwardRef((s, t) => {
|
|
@@ -87,7 +87,7 @@ const X = 1e-5, Y = 3, Z = 400, ee = 0, se = (s) => {
|
|
|
87
87
|
{
|
|
88
88
|
key: l,
|
|
89
89
|
className: L(
|
|
90
|
-
"k-
|
|
90
|
+
"k-progressbar-chunk",
|
|
91
91
|
{
|
|
92
92
|
"k-first": l === 0,
|
|
93
93
|
"k-last": l === p - 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-progressbars",
|
|
3
|
-
"version": "7.1.1-develop.
|
|
3
|
+
"version": "7.1.1-develop.3",
|
|
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",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-animation": "7.1.1-develop.
|
|
27
|
-
"@progress/kendo-react-common": "7.1.1-develop.
|
|
26
|
+
"@progress/kendo-react-animation": "7.1.1-develop.3",
|
|
27
|
+
"@progress/kendo-react-common": "7.1.1-develop.3",
|
|
28
28
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
29
29
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
30
30
|
},
|