@progress/kendo-react-progressbars 9.5.0 → 10.0.0-develop.1

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