@progress/kendo-react-progressbars 7.0.3-develop.9 → 7.1.0-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 © 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<"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"})});
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-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.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: 1704453748,
23
+ publishDate: 1705398327,
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.3-develop.9",
3
+ "version": "7.1.0-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",
@@ -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.0.3-develop.9",
27
- "@progress/kendo-react-common": "7.0.3-develop.9",
26
+ "@progress/kendo-react-animation": "7.1.0-develop.2",
27
+ "@progress/kendo-react-common": "7.1.0-develop.2",
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
  },