@progress/kendo-react-progressbars 8.1.0-develop.8 → 8.1.0

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.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),e=require("prop-types"),u=require("@progress/kendo-react-common"),L=require("../common/utils.js"),A=require("../package-metadata.js");function F(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(l,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return l.default=t,Object.freeze(l)}const s=F(D),d=s.forwardRef((t,l)=>{u.validatePackage(A.packageMetadata);const{chunkCount:n=a.chunkCount,className:i,disabled:b,orientation:P,min:p=a.min,max:g=a.max,reverse:N=a.reverse,style:S,tabIndex:x,emptyStyle:R,emptyClassName:j,progressStyle:E,progressClassName:O}=t,o=s.useRef(null),q=s.useCallback(()=>{o.current&&o.current.focus()},[]);s.useImperativeHandle(l,()=>({element:o.current,focus:q}));const f=t.value||a.value,y=t.value===null,w=u.useRtl(o,t.dir),m=P==="vertical",I={className:u.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!m,"k-progressbar-vertical":m,"k-progressbar-reverse":N,"k-progressbar-indeterminate":y,"k-disabled":b},i),ref:o,dir:w,tabIndex:u.getTabIndex(x,b),role:"progressbar","aria-label":t.ariaLabel,"aria-valuemin":p,"aria-valuemax":g,"aria-valuenow":y?void 0:f,"aria-disabled":b,style:S},M=({count:c})=>{let v=[];const h=100/c+"%",T=L.calculateRatio(p,g,f),z=Math.floor(T*c),C=Array(c).fill(!1);for(let r=0;r<z;r++)C[r]=!0;for(let r=0;r<c;++r){const k=C[r],B=k?O:j,_={...{width:m?void 0:h,height:m?h:void 0},...k?E:R};v.push(s.createElement("li",{key:r,className:u.classNames("k-progressbar-chunk",{"k-first":r===0,"k-last":r===c-1,"k-selected":k},B),style:_}))}return s.createElement(s.Fragment,null,v)};return s.createElement("div",{...I},s.createElement("ul",{className:"k-progressbar-chunks k-reset"},s.createElement(M,{count:n||a.chunkCount})))});d.propTypes={chunkCount:e.number,ariaLabel:e.string,disabled:e.bool,reverse:e.bool,max:e.number,min:e.number,value:e.number,tabIndex:e.number,emptyStyle:e.object,emptyClassName:e.string,progressStyle:e.object,progressClassName:e.string};const a={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};d.defaultProps=a;d.displayName="KendoChunkProgressBar";exports.ChunkProgressBar=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),e=require("prop-types"),u=require("@progress/kendo-react-common"),L=require("../common/utils.js"),A=require("../package-metadata.js");function F(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(l,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}return l.default=r,Object.freeze(l)}const s=F(D),g=s.forwardRef((r,l)=>{u.validatePackage(A.packageMetadata);const{chunkCount:a=n.chunkCount,className:i,disabled:d=n.disabled,orientation:N,min:k=n.min,max:p=n.max,reverse:P=n.reverse,style:S,tabIndex:x,emptyStyle:R,emptyClassName:j,progressStyle:E,progressClassName:O}=r,o=s.useRef(null),q=s.useCallback(()=>{o.current&&o.current.focus()},[]);s.useImperativeHandle(l,()=>({element:o.current,focus:q}));const f=r.value||n.value,y=r.value===null,w=u.useRtl(o,r.dir),m=N==="vertical",I={className:u.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!m,"k-progressbar-vertical":m,"k-progressbar-reverse":P,"k-progressbar-indeterminate":y,"k-disabled":d},i),ref:o,dir:w,tabIndex:u.getTabIndex(x,d),role:"progressbar","aria-label":r.ariaLabel,"aria-valuemin":k,"aria-valuemax":p,"aria-valuenow":y?void 0:f,"aria-disabled":d,style:S},M=({count:c})=>{let v=[];const h=100/c+"%",T=L.calculateRatio(k,p,f),z=Math.floor(T*c),C=Array(c).fill(!1);for(let t=0;t<z;t++)C[t]=!0;for(let t=0;t<c;++t){const b=C[t],B=b?O:j,_={...{width:m?void 0:h,height:m?h:void 0},...b?E:R};v.push(s.createElement("li",{key:t,className:u.classNames("k-progressbar-chunk",{"k-first":t===0,"k-last":t===c-1,"k-selected":b},B),style:_}))}return s.createElement(s.Fragment,null,v)};return s.createElement("div",{...I},s.createElement("ul",{className:"k-progressbar-chunks k-reset"},s.createElement(M,{count:a})))});g.propTypes={chunkCount:e.number,ariaLabel:e.string,disabled:e.bool,reverse:e.bool,max:e.number,min:e.number,value:e.number,tabIndex:e.number,emptyStyle:e.object,emptyClassName:e.string,progressStyle:e.object,progressClassName:e.string};const n={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};g.displayName="KendoChunkProgressBar";exports.ChunkProgressBar=g;
@@ -8,18 +8,18 @@
8
8
  "use client";
9
9
  import * as s from "react";
10
10
  import e from "prop-types";
11
- import { validatePackage as H, useRtl as K, classNames as v, getTabIndex as V } from "@progress/kendo-react-common";
11
+ import { validatePackage as H, useRtl as K, classNames as f, getTabIndex as V } from "@progress/kendo-react-common";
12
12
  import { calculateRatio as q } from "../common/utils.mjs";
13
13
  import { packageMetadata as D } from "../package-metadata.mjs";
14
- const u = s.forwardRef((t, y) => {
14
+ const v = s.forwardRef((t, y) => {
15
15
  H(D);
16
16
  const {
17
17
  chunkCount: h = a.chunkCount,
18
18
  className: C,
19
- disabled: c,
19
+ disabled: c = a.disabled,
20
20
  orientation: x,
21
21
  min: m = a.min,
22
- max: d = a.max,
22
+ max: u = a.max,
23
23
  reverse: N = a.reverse,
24
24
  style: P,
25
25
  tabIndex: S,
@@ -37,14 +37,14 @@ const u = s.forwardRef((t, y) => {
37
37
  element: l.current,
38
38
  focus: T
39
39
  }));
40
- const p = t.value || a.value, k = t.value === null, j = K(l, t.dir), o = x === "vertical", z = {
41
- className: v(
40
+ const d = t.value || a.value, p = t.value === null, j = K(l, t.dir), o = x === "vertical", z = {
41
+ className: f(
42
42
  "k-progressbar k-chunk-progressbar",
43
43
  {
44
44
  "k-progressbar-horizontal": !o,
45
45
  "k-progressbar-vertical": o,
46
46
  "k-progressbar-reverse": N,
47
- "k-progressbar-indeterminate": k,
47
+ "k-progressbar-indeterminate": p,
48
48
  "k-disabled": c
49
49
  },
50
50
  C
@@ -55,26 +55,26 @@ const u = s.forwardRef((t, y) => {
55
55
  role: "progressbar",
56
56
  "aria-label": t.ariaLabel,
57
57
  "aria-valuemin": m,
58
- "aria-valuemax": d,
59
- "aria-valuenow": k ? void 0 : p,
58
+ "aria-valuemax": u,
59
+ "aria-valuenow": p ? void 0 : d,
60
60
  "aria-disabled": c,
61
61
  style: P
62
62
  }, B = ({ count: n }) => {
63
63
  let b = [];
64
- const g = 100 / n + "%", L = q(m, d, p), M = Math.floor(L * n), f = Array(n).fill(!1);
64
+ const k = 100 / n + "%", L = q(m, u, d), M = Math.floor(L * n), g = Array(n).fill(!1);
65
65
  for (let r = 0; r < M; r++)
66
- f[r] = !0;
66
+ g[r] = !0;
67
67
  for (let r = 0; r < n; ++r) {
68
- const i = f[r], A = i ? w : E, F = { ...{
69
- width: o ? void 0 : g,
70
- height: o ? g : void 0
68
+ const i = g[r], A = i ? w : E, F = { ...{
69
+ width: o ? void 0 : k,
70
+ height: o ? k : void 0
71
71
  }, ...i ? I : R };
72
72
  b.push(
73
73
  /* @__PURE__ */ s.createElement(
74
74
  "li",
75
75
  {
76
76
  key: r,
77
- className: v(
77
+ className: f(
78
78
  "k-progressbar-chunk",
79
79
  {
80
80
  "k-first": r === 0,
@@ -90,9 +90,9 @@ const u = s.forwardRef((t, y) => {
90
90
  }
91
91
  return /* @__PURE__ */ s.createElement(s.Fragment, null, b);
92
92
  };
93
- return /* @__PURE__ */ s.createElement("div", { ...z }, /* @__PURE__ */ s.createElement("ul", { className: "k-progressbar-chunks k-reset" }, /* @__PURE__ */ s.createElement(B, { count: h || a.chunkCount })));
93
+ return /* @__PURE__ */ s.createElement("div", { ...z }, /* @__PURE__ */ s.createElement("ul", { className: "k-progressbar-chunks k-reset" }, /* @__PURE__ */ s.createElement(B, { count: h })));
94
94
  });
95
- u.propTypes = {
95
+ v.propTypes = {
96
96
  chunkCount: e.number,
97
97
  ariaLabel: e.string,
98
98
  disabled: e.bool,
@@ -114,8 +114,7 @@ const a = {
114
114
  disabled: !1,
115
115
  reverse: !1
116
116
  };
117
- u.defaultProps = a;
118
- u.displayName = "KendoChunkProgressBar";
117
+ v.displayName = "KendoChunkProgressBar";
119
118
  export {
120
- u as ChunkProgressBar
119
+ v as ChunkProgressBar
121
120
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactProgressbars={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactAnimation)}(this,(function(e,r,a,s,t){"use strict";function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}})),r.default=e,Object.freeze(r)}var l=n(r);const o=e=>{const r=e.toString().split(".");return 1===r.length?`${r[0]}`:`${r[0]}.${r[1].substr(0,3)}`},i=(e,r,a)=>{const s=Math.abs((r-e)/100);return Math.abs((a-e)/s)},c=(e,r,a,s)=>{const t=Math.max(a,.01),n=100/t*100;e.current&&r.current&&(e.current.style.width=s?"100%":`${t}%`,r.current.style.width=s?"100%":`${n}%`,e.current.style.height=s?`${t}%`:"100%",r.current.style.height=s?`${n}%`:"100%")},u={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},m=l.forwardRef(((e,r)=>{s.validatePackage(u);const{chunkCount:a=d.chunkCount,className:t,disabled:n,orientation:o,min:i=d.min,max:c=d.max,reverse:m=d.reverse,style:p,tabIndex:b,emptyStyle:g,emptyClassName:k,progressStyle:f,progressClassName:v}=e,y=l.useRef(null),h=l.useCallback((()=>{y.current&&y.current.focus()}),[]);l.useImperativeHandle(r,(()=>({element:y.current,focus:h})));const N=e.value||d.value,C=null===e.value,x=s.useRtl(y,e.dir),E="vertical"===o,P={className:s.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!E,"k-progressbar-vertical":E,"k-progressbar-reverse":m,"k-progressbar-indeterminate":C,"k-disabled":n},t),ref:y,dir:x,tabIndex:s.getTabIndex(b,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":i,"aria-valuemax":c,"aria-valuenow":C?void 0:N,"aria-disabled":n,style:p},R=({count:e})=>{let r=[];const a=100/e+"%",t=((e,r,a)=>Math.max((a-e)/(r-e),1e-5))(i,c,N),n=Math.floor(t*e),o=Array(e).fill(!1);for(let e=0;e<n;e++)o[e]=!0;for(let t=0;t<e;++t){const n=o[t],i=n?v:k,c={width:E?void 0:a,height:E?a:void 0,...n?f:g};r.push(l.createElement("li",{key:t,className:s.classNames("k-progressbar-chunk",{"k-first":0===t,"k-last":t===e-1,"k-selected":n},i),style:c}))}return l.createElement(l.Fragment,null,r)};return l.createElement("div",{...P},l.createElement("ul",{className:"k-progressbar-chunks k-reset"},l.createElement(R,{count:a||d.chunkCount})))}));m.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 d={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};m.defaultProps=d,m.displayName="KendoChunkProgressBar";const p=l.forwardRef(((e,r)=>{s.validatePackage(u);const{animation:a,disabled:n,reverse:m=b.reverse,orientation:d,labelVisible:p,labelPlacement:g,max:k=b.max,min:f=b.min,tabIndex:v,className:y,style:h,emptyStyle:N,emptyClassName:C,progressStyle:x,progressClassName:E}=e,P=l.useRef(null),R=l.useRef(null),w=l.useRef(null),I=l.useCallback((()=>{P.current&&P.current.focus()}),[]);l.useImperativeHandle(r,(()=>({element:P.current,progressStatusElement:R.current,progressStatusWrapElement:w.current,focus:I})));const S=e.value||b.value,j=(e=>{const r=l.useRef();return l.useEffect((()=>{r.current=e})),r.current})(S),O=null===e.value,T=s.useRtl(P,e.dir),K="vertical"===d,$=o(S),M={value:S},D=p?e.label?l.createElement("span",{className:"k-progress-status"},l.createElement(e.label,{...M})):l.createElement("span",{className:"k-progress-status"},$):void 0,L={className:s.classNames("k-progressbar",{"k-progressbar-horizontal":!K,"k-progressbar-vertical":K,"k-progressbar-reverse":m,"k-progressbar-indeterminate":O,"k-disabled":n},y),ref:P,dir:T,tabIndex:s.getTabIndex(v,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":f,"aria-valuemax":k,"aria-valuenow":O?void 0:S,"aria-disabled":n,style:h},q=s.classNames("k-progress-status-wrap",{"k-progress-start":"start"===g,"k-progress-center":"center"===g,"k-progress-end":"end"===g||void 0===g}),A="boolean"!=typeof a&&void 0!==a?a.duration:a?400:0,B=l.useCallback((()=>{const e=i(f,k,j);c(R,w,e,K)}),[K,k,f,j]),U=l.useCallback((e=>{const r=i(f,k,j+(S-j)*e);c(R,w,r,K)}),[f,k,j,S,K]),z=l.useCallback((()=>{const e=i(f,k,S);c(R,w,e,K)}),[K,k,f,S]);return t.useAnimation({duration:A,onStart:B,onUpdate:U,onEnd:z},[S,A]),l.createElement("div",{...L},l.createElement("span",{className:q+(C?" "+C:""),style:N},D),l.createElement("div",{className:"k-progressbar-value k-selected",style:x,ref:R},l.createElement("span",{className:q+(E?" "+E:""),ref:w},D)))}));p.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 b={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};p.defaultProps=b,p.displayName="KendoProgressBar",e.ChunkProgressBar=m,e.ProgressBar=p}));
8
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactProgressbars={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactAnimation)}(this,(function(e,r,a,s,t){"use strict";function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}})),r.default=e,Object.freeze(r)}var l=n(r);const o=(e,r,a)=>{const s=Math.abs((r-e)/100);return Math.abs((a-e)/s)},i=(e,r,a,s)=>{const t=Math.max(a,.01),n=100/t*100;e.current&&r.current&&(e.current.style.width=s?"100%":`${t}%`,r.current.style.width=s?"100%":`${n}%`,e.current.style.height=s?`${t}%`:"100%",r.current.style.height=s?`${n}%`:"100%")},c={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},u=l.forwardRef(((e,r)=>{s.validatePackage(c);const{chunkCount:a=m.chunkCount,className:t,disabled:n=m.disabled,orientation:o,min:i=m.min,max:u=m.max,reverse:d=m.reverse,style:b,tabIndex:p,emptyStyle:g,emptyClassName:k,progressStyle:v,progressClassName:f}=e,y=l.useRef(null),h=l.useCallback((()=>{y.current&&y.current.focus()}),[]);l.useImperativeHandle(r,(()=>({element:y.current,focus:h})));const N=e.value||m.value,x=null===e.value,C=s.useRtl(y,e.dir),E="vertical"===o,R={className:s.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!E,"k-progressbar-vertical":E,"k-progressbar-reverse":d,"k-progressbar-indeterminate":x,"k-disabled":n},t),ref:y,dir:C,tabIndex:s.getTabIndex(p,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":i,"aria-valuemax":u,"aria-valuenow":x?void 0:N,"aria-disabled":n,style:b},P=({count:e})=>{let r=[];const a=100/e+"%",t=((e,r,a)=>Math.max((a-e)/(r-e),1e-5))(i,u,N),n=Math.floor(t*e),o=Array(e).fill(!1);for(let e=0;e<n;e++)o[e]=!0;for(let t=0;t<e;++t){const n=o[t],i=n?f:k,c={width:E?void 0:a,height:E?a:void 0,...n?v:g};r.push(l.createElement("li",{key:t,className:s.classNames("k-progressbar-chunk",{"k-first":0===t,"k-last":t===e-1,"k-selected":n},i),style:c}))}return l.createElement(l.Fragment,null,r)};return l.createElement("div",{...R},l.createElement("ul",{className:"k-progressbar-chunks k-reset"},l.createElement(P,{count:a})))}));u.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 m={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};u.displayName="KendoChunkProgressBar";const d=l.forwardRef(((e,r)=>{s.validatePackage(c);const{animation:a=b.animation,disabled:n=b.disabled,reverse:u=b.reverse,orientation:m,labelVisible:d=b.labelVisible,labelPlacement:p,max:g=b.max,min:k=b.min,tabIndex:v,className:f,style:y,emptyStyle:h,emptyClassName:N,progressStyle:x,progressClassName:C}=e,E=l.useRef(null),R=l.useRef(null),P=l.useRef(null),w=l.useCallback((()=>{E.current&&E.current.focus()}),[]);l.useImperativeHandle(r,(()=>({element:E.current,progressStatusElement:R.current,progressStatusWrapElement:P.current,focus:w})));const I=e.value||b.value,S=(e=>{const r=l.useRef();return l.useEffect((()=>{r.current=e})),r.current})(I),j=null===e.value,O=s.useRtl(E,e.dir),T="vertical"===m,K=(e=>{const r=e.toString().split(".");return 1===r.length?`${r[0]}`:`${r[0]}.${r[1].substr(0,3)}`})(I),$={value:I},M=d?e.label?l.createElement("span",{className:"k-progress-status"},l.createElement(e.label,{...$})):l.createElement("span",{className:"k-progress-status"},K):void 0,D={className:s.classNames("k-progressbar",{"k-progressbar-horizontal":!T,"k-progressbar-vertical":T,"k-progressbar-reverse":u,"k-progressbar-indeterminate":j,"k-disabled":n},f),ref:E,dir:O,tabIndex:s.getTabIndex(v,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":k,"aria-valuemax":g,"aria-valuenow":j?void 0:I,"aria-disabled":n,style:y},L=s.classNames("k-progress-status-wrap",{"k-progress-start":"start"===p,"k-progress-center":"center"===p,"k-progress-end":"end"===p||void 0===p}),q="boolean"!=typeof a&&void 0!==a?a.duration:a?400:0,A=l.useCallback((()=>{const e=o(k,g,S);i(R,P,e,T)}),[T,g,k,S]),B=l.useCallback((e=>{const r=o(k,g,S+(I-S)*e);i(R,P,r,T)}),[k,g,S,I,T]),U=l.useCallback((()=>{const e=o(k,g,I);i(R,P,e,T)}),[T,g,k,I]);return t.useAnimation({duration:q,onStart:A,onUpdate:B,onEnd:U},[I,q]),l.createElement("div",{...D},l.createElement("span",{className:L+(N?" "+N:""),style:h},M),l.createElement("div",{className:"k-progressbar-value k-selected",style:x,ref:R},l.createElement("span",{className:L+(C?" "+C:""),ref:P},M)))}));d.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 b={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};d.displayName="KendoProgressBar",e.ChunkProgressBar=u,e.ProgressBar=d}));
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-progressbars",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1718121584,
13
+ publishDate: 1719467296,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-progressbars",
3
- "version": "8.1.0-develop.8",
3
+ "version": "8.1.0",
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": "8.1.0-develop.8",
27
- "@progress/kendo-react-common": "8.1.0-develop.8",
26
+ "@progress/kendo-react-animation": "8.1.0",
27
+ "@progress/kendo-react-common": "8.1.0",
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
  },
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),a=require("prop-types"),H=require("@progress/kendo-react-animation"),f=require("@progress/kendo-react-common"),c=require("../common/utils.js"),K=require("./hooks/usePrevious.js"),C=require("../common/constants.js"),G=require("../package-metadata.js");function J(t){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(u,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return u.default=t,Object.freeze(u)}const e=J(F),P=e.forwardRef((t,u)=>{f.validatePackage(G.packageMetadata);const{animation:r,disabled:i,reverse:I=v.reverse,orientation:x,labelVisible:T,labelPlacement:k,max:l=v.max,min:o=v.min,tabIndex:q,className:A,style:j,emptyStyle:M,emptyClassName:y,progressStyle:_,progressClassName:N}=t,m=e.useRef(null),d=e.useRef(null),b=e.useRef(null),w=e.useCallback(()=>{m.current&&m.current.focus()},[]);e.useImperativeHandle(u,()=>({element:m.current,progressStatusElement:d.current,progressStatusWrapElement:b.current,focus:w}));const s=t.value||v.value,p=K.usePrevious(s),S=t.value===null,D=f.useRtl(m,t.dir),n=x==="vertical",L=c.truncateNumber(s),V={value:s},E=T?t.label?e.createElement("span",{className:"k-progress-status"},e.createElement(t.label,{...V})):e.createElement("span",{className:"k-progress-status"},L):void 0,h={className:f.classNames("k-progressbar",{"k-progressbar-horizontal":!n,"k-progressbar-vertical":n,"k-progressbar-reverse":I,"k-progressbar-indeterminate":S,"k-disabled":i},A),ref:m,dir:D,tabIndex:f.getTabIndex(q,i),role:"progressbar","aria-label":t.ariaLabel,"aria-valuemin":o,"aria-valuemax":l,"aria-valuenow":S?void 0:s,"aria-disabled":i,style:j},R=f.classNames("k-progress-status-wrap",{"k-progress-start":k==="start","k-progress-center":k==="center","k-progress-end":k==="end"||k===void 0}),O=typeof r!="boolean"&&r!==void 0?r.duration:r?C.DEFAULT_ANIMATION_DURATION:C.NO_ANIMATION,U=e.useCallback(()=>{const g=c.calculatePercentage(o,l,p);c.updateProgress(d,b,g,n)},[n,l,o,p]),B=e.useCallback(g=>{const W=c.calculatePercentage(o,l,p+(s-p)*g);c.updateProgress(d,b,W,n)},[o,l,p,s,n]),z=e.useCallback(()=>{const g=c.calculatePercentage(o,l,s);c.updateProgress(d,b,g,n)},[n,l,o,s]);return H.useAnimation({duration:O,onStart:U,onUpdate:B,onEnd:z},[s,O]),e.createElement("div",{...h},e.createElement("span",{className:R+(y?" "+y:""),style:M},E),e.createElement("div",{className:"k-progressbar-value k-selected",style:_,ref:d},e.createElement("span",{className:R+(N?" "+N:""),ref:b},E)))});P.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 v={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};P.defaultProps=v;P.displayName="KendoProgressBar";exports.ProgressBar=P;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),a=require("prop-types"),H=require("@progress/kendo-react-animation"),v=require("@progress/kendo-react-common"),c=require("../common/utils.js"),K=require("./hooks/usePrevious.js"),C=require("../common/constants.js"),G=require("../package-metadata.js");function J(t){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(m,s,u.get?u:{enumerable:!0,get:()=>t[s]})}}return m.default=t,Object.freeze(m)}const e=J(F),y=e.forwardRef((t,m)=>{v.validatePackage(G.packageMetadata);const{animation:s=i.animation,disabled:u=i.disabled,reverse:I=i.reverse,orientation:x,labelVisible:T=i.labelVisible,labelPlacement:k,max:l=i.max,min:o=i.min,tabIndex:q,className:A,style:j,emptyStyle:M,emptyClassName:N,progressStyle:V,progressClassName:P}=t,d=e.useRef(null),b=e.useRef(null),p=e.useRef(null),_=e.useCallback(()=>{d.current&&d.current.focus()},[]);e.useImperativeHandle(m,()=>({element:d.current,progressStatusElement:b.current,progressStatusWrapElement:p.current,focus:_}));const r=t.value||i.value,g=K.usePrevious(r),S=t.value===null,w=v.useRtl(d,t.dir),n=x==="vertical",D=c.truncateNumber(r),L={value:r},E=T?t.label?e.createElement("span",{className:"k-progress-status"},e.createElement(t.label,{...L})):e.createElement("span",{className:"k-progress-status"},D):void 0,h={className:v.classNames("k-progressbar",{"k-progressbar-horizontal":!n,"k-progressbar-vertical":n,"k-progressbar-reverse":I,"k-progressbar-indeterminate":S,"k-disabled":u},A),ref:d,dir:w,tabIndex:v.getTabIndex(q,u),role:"progressbar","aria-label":t.ariaLabel,"aria-valuemin":o,"aria-valuemax":l,"aria-valuenow":S?void 0:r,"aria-disabled":u,style:j},R=v.classNames("k-progress-status-wrap",{"k-progress-start":k==="start","k-progress-center":k==="center","k-progress-end":k==="end"||k===void 0}),O=typeof s!="boolean"&&s!==void 0?s.duration:s?C.DEFAULT_ANIMATION_DURATION:C.NO_ANIMATION,U=e.useCallback(()=>{const f=c.calculatePercentage(o,l,g);c.updateProgress(b,p,f,n)},[n,l,o,g]),B=e.useCallback(f=>{const W=c.calculatePercentage(o,l,g+(r-g)*f);c.updateProgress(b,p,W,n)},[o,l,g,r,n]),z=e.useCallback(()=>{const f=c.calculatePercentage(o,l,r);c.updateProgress(b,p,f,n)},[n,l,o,r]);return H.useAnimation({duration:O,onStart:U,onUpdate:B,onEnd:z},[r,O]),e.createElement("div",{...h},e.createElement("span",{className:R+(N?" "+N:""),style:M},E),e.createElement("div",{className:"k-progressbar-value k-selected",style:V,ref:b},e.createElement("span",{className:R+(P?" "+P:""),ref:p},E)))});y.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};y.displayName="KendoProgressBar";exports.ProgressBar=y;
@@ -9,117 +9,117 @@
9
9
  import * as e from "react";
10
10
  import a from "prop-types";
11
11
  import { useAnimation as H } from "@progress/kendo-react-animation";
12
- import { validatePackage as K, useRtl as q, classNames as R, getTabIndex as G } from "@progress/kendo-react-common";
12
+ import { validatePackage as K, useRtl as q, classNames as I, getTabIndex as G } from "@progress/kendo-react-common";
13
13
  import { truncateNumber as J, updateProgress as f, calculatePercentage as v } from "../common/utils.mjs";
14
14
  import { usePrevious as Q } from "./hooks/usePrevious.mjs";
15
15
  import { DEFAULT_ANIMATION_DURATION as X, NO_ANIMATION as Y } from "../common/constants.mjs";
16
16
  import { packageMetadata as Z } from "../package-metadata.mjs";
17
- const k = e.forwardRef((t, S) => {
17
+ const R = e.forwardRef((t, S) => {
18
18
  K(Z);
19
19
  const {
20
- animation: b,
21
- disabled: g,
22
- reverse: C = p.reverse,
20
+ animation: b = o.animation,
21
+ disabled: g = o.disabled,
22
+ reverse: C = o.reverse,
23
23
  orientation: A,
24
- labelVisible: T,
24
+ labelVisible: T = o.labelVisible,
25
25
  labelPlacement: d,
26
- max: l = p.max,
27
- min: n = p.min,
28
- tabIndex: L,
29
- className: O,
30
- style: V,
26
+ max: l = o.max,
27
+ min: n = o.min,
28
+ tabIndex: V,
29
+ className: L,
30
+ style: O,
31
31
  emptyStyle: h,
32
- emptyClassName: N,
32
+ emptyClassName: k,
33
33
  progressStyle: w,
34
- progressClassName: y
35
- } = t, o = e.useRef(null), i = e.useRef(null), c = e.useRef(null), U = e.useCallback(
34
+ progressClassName: N
35
+ } = t, i = e.useRef(null), c = e.useRef(null), m = e.useRef(null), U = e.useCallback(
36
36
  () => {
37
- o.current && o.current.focus();
37
+ i.current && i.current.focus();
38
38
  },
39
39
  []
40
40
  );
41
41
  e.useImperativeHandle(
42
42
  S,
43
43
  () => ({
44
- element: o.current,
45
- progressStatusElement: i.current,
46
- progressStatusWrapElement: c.current,
44
+ element: i.current,
45
+ progressStatusElement: c.current,
46
+ progressStatusWrapElement: m.current,
47
47
  focus: U
48
48
  })
49
49
  );
50
- const r = t.value || p.value, m = Q(r), P = t.value === null, D = q(o, t.dir), s = A === "vertical", M = J(r), _ = {
50
+ const r = t.value || o.value, u = Q(r), y = t.value === null, D = q(i, t.dir), s = A === "vertical", M = J(r), _ = {
51
51
  value: r
52
52
  }, E = T ? t.label ? /* @__PURE__ */ e.createElement("span", { className: "k-progress-status" }, /* @__PURE__ */ e.createElement(t.label, { ..._ })) : /* @__PURE__ */ e.createElement("span", { className: "k-progress-status" }, M) : void 0, j = {
53
- className: R(
53
+ className: I(
54
54
  "k-progressbar",
55
55
  {
56
56
  "k-progressbar-horizontal": !s,
57
57
  "k-progressbar-vertical": s,
58
58
  "k-progressbar-reverse": C,
59
- "k-progressbar-indeterminate": P,
59
+ "k-progressbar-indeterminate": y,
60
60
  "k-disabled": g
61
61
  },
62
- O
62
+ L
63
63
  ),
64
- ref: o,
64
+ ref: i,
65
65
  dir: D,
66
- tabIndex: G(L, g),
66
+ tabIndex: G(V, g),
67
67
  role: "progressbar",
68
68
  "aria-label": t.ariaLabel,
69
69
  "aria-valuemin": n,
70
70
  "aria-valuemax": l,
71
- "aria-valuenow": P ? void 0 : r,
71
+ "aria-valuenow": y ? void 0 : r,
72
72
  "aria-disabled": g,
73
- style: V
74
- }, x = R("k-progress-status-wrap", {
73
+ style: O
74
+ }, P = I("k-progress-status-wrap", {
75
75
  "k-progress-start": d === "start",
76
76
  "k-progress-center": d === "center",
77
77
  "k-progress-end": d === "end" || d === void 0
78
- }), I = typeof b != "boolean" && b !== void 0 ? b.duration : b ? X : Y, B = e.useCallback(
78
+ }), x = typeof b != "boolean" && b !== void 0 ? b.duration : b ? X : Y, B = e.useCallback(
79
79
  () => {
80
- const u = v(n, l, m);
81
- f(i, c, u, s);
80
+ const p = v(n, l, u);
81
+ f(c, m, p, s);
82
82
  },
83
- [s, l, n, m]
83
+ [s, l, n, u]
84
84
  ), W = e.useCallback(
85
- (u) => {
86
- const F = v(n, l, m + (r - m) * u);
87
- f(i, c, F, s);
85
+ (p) => {
86
+ const F = v(n, l, u + (r - u) * p);
87
+ f(c, m, F, s);
88
88
  },
89
- [n, l, m, r, s]
89
+ [n, l, u, r, s]
90
90
  ), z = e.useCallback(
91
91
  () => {
92
- const u = v(n, l, r);
93
- f(i, c, u, s);
92
+ const p = v(n, l, r);
93
+ f(c, m, p, s);
94
94
  },
95
95
  [s, l, n, r]
96
96
  );
97
97
  return H(
98
98
  {
99
- duration: I,
99
+ duration: x,
100
100
  onStart: B,
101
101
  onUpdate: W,
102
102
  onEnd: z
103
103
  },
104
- [r, I]
105
- ), /* @__PURE__ */ e.createElement("div", { ...j }, /* @__PURE__ */ e.createElement("span", { className: x + (N ? " " + N : ""), style: h }, E), /* @__PURE__ */ e.createElement(
104
+ [r, x]
105
+ ), /* @__PURE__ */ e.createElement("div", { ...j }, /* @__PURE__ */ e.createElement("span", { className: P + (k ? " " + k : ""), style: h }, E), /* @__PURE__ */ e.createElement(
106
106
  "div",
107
107
  {
108
108
  className: "k-progressbar-value k-selected",
109
109
  style: w,
110
- ref: i
110
+ ref: c
111
111
  },
112
112
  /* @__PURE__ */ e.createElement(
113
113
  "span",
114
114
  {
115
- className: x + (y ? " " + y : ""),
116
- ref: c
115
+ className: P + (N ? " " + N : ""),
116
+ ref: m
117
117
  },
118
118
  E
119
119
  )
120
120
  ));
121
121
  });
122
- k.propTypes = {
122
+ R.propTypes = {
123
123
  animation: a.any,
124
124
  ariaLabel: a.string,
125
125
  disabled: a.bool,
@@ -136,7 +136,7 @@ k.propTypes = {
136
136
  progressStyle: a.object,
137
137
  progressClassName: a.string
138
138
  };
139
- const p = {
139
+ const o = {
140
140
  animation: !1,
141
141
  min: 0,
142
142
  max: 100,
@@ -145,8 +145,7 @@ const p = {
145
145
  reverse: !1,
146
146
  labelVisible: !0
147
147
  };
148
- k.defaultProps = p;
149
- k.displayName = "KendoProgressBar";
148
+ R.displayName = "KendoProgressBar";
150
149
  export {
151
- k as ProgressBar
150
+ R as ProgressBar
152
151
  };