@progress/kendo-react-progressbars 9.0.0-develop.2 → 9.0.0-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/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact Progress Bars Library for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
12
13
|
>
|
|
13
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars) and speed up your development process!
|
|
14
15
|
|
|
@@ -16,11 +17,11 @@ The React ProgressBars, part of KendoReact, offer a highly customizable interfac
|
|
|
16
17
|
|
|
17
18
|
What's in this package (ToC):
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- [React ProgressBar component](#react-progressbar-component)
|
|
21
|
+
- [React ChunkProgressBar component](#react-chunkprogressbar-component)
|
|
22
|
+
- [React ProgressBars Components Library Features](#react-progressbars-library-shared-features)
|
|
23
|
+
- [Support Options](#support-options)
|
|
24
|
+
- [Resources](#resources)
|
|
24
25
|
|
|
25
26
|
## React ProgressBar Component
|
|
26
27
|
|
|
@@ -34,35 +35,35 @@ What's in this package (ToC):
|
|
|
34
35
|
|
|
35
36
|
Among the many features which the KendoReact ProgressBars deliver are:
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
- **Setting the default value and ranges**—Easily configure the initial, min and max values that the ProgressBars render.
|
|
39
|
+
- **Controlled mode**—Control the value of the ProgressBars.
|
|
40
|
+
- **Customization**—Easily implement custom styling.
|
|
41
|
+
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)—The KendoReact ProgressBars, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
|
|
41
42
|
|
|
42
43
|
## Support Options
|
|
43
44
|
|
|
44
45
|
For any issues you might encounter while working with the KendoReact ProgressBars, use any of the available support channels:
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars).
|
|
48
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars) are part of the free support you can get from the community and from the KendoReact team.
|
|
49
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars) is where you can request and vote for new features to be added.
|
|
49
50
|
|
|
50
51
|
## Resources
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
54
|
+
- [Get Started with the KendoReact ProgressBars](https://www.telerik.com/kendo-react-ui/components/progressbars/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
55
|
+
- [API Reference of the KendoReact ProgressBars](https://www.telerik.com/kendo-react-ui/components/progressbars/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
56
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
57
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
58
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
59
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
60
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-progressbars)
|
|
60
61
|
|
|
61
62
|
High-level component overview pages
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
- [React ChunkProgressBar Component](https://www.telerik.com/kendo-react-ui/chunkprogressbar)
|
|
65
|
+
- [React ProgressBar Component](https://www.telerik.com/kendo-react-ui/progressbar)
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
|
@@ -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(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})=>{
|
|
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})=>{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;
|
|
@@ -6,92 +6,93 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as r from "react";
|
|
10
10
|
import e from "prop-types";
|
|
11
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 v =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
() => {
|
|
14
|
+
const v = r.forwardRef(
|
|
15
|
+
(t, y) => {
|
|
16
|
+
H(D);
|
|
17
|
+
const {
|
|
18
|
+
chunkCount: h = a.chunkCount,
|
|
19
|
+
className: C,
|
|
20
|
+
disabled: c = a.disabled,
|
|
21
|
+
orientation: x,
|
|
22
|
+
min: m = a.min,
|
|
23
|
+
max: u = a.max,
|
|
24
|
+
reverse: N = a.reverse,
|
|
25
|
+
style: P,
|
|
26
|
+
tabIndex: S,
|
|
27
|
+
emptyStyle: R,
|
|
28
|
+
emptyClassName: E,
|
|
29
|
+
progressStyle: I,
|
|
30
|
+
progressClassName: w
|
|
31
|
+
} = t, l = r.useRef(null), T = r.useCallback(() => {
|
|
32
32
|
l.current && l.current.focus();
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
33
|
+
}, []);
|
|
34
|
+
r.useImperativeHandle(
|
|
35
|
+
y,
|
|
36
|
+
() => ({
|
|
37
|
+
element: l.current,
|
|
38
|
+
focus: T
|
|
39
|
+
})
|
|
40
|
+
);
|
|
41
|
+
const d = t.value || a.value, p = t.value === null, j = K(l, t.dir), o = x === "vertical", z = {
|
|
42
|
+
className: f(
|
|
43
|
+
"k-progressbar k-chunk-progressbar",
|
|
44
|
+
{
|
|
45
|
+
"k-progressbar-horizontal": !o,
|
|
46
|
+
"k-progressbar-vertical": o,
|
|
47
|
+
"k-progressbar-reverse": N,
|
|
48
|
+
"k-progressbar-indeterminate": p,
|
|
49
|
+
"k-disabled": c
|
|
50
|
+
},
|
|
51
|
+
C
|
|
52
|
+
),
|
|
53
|
+
ref: l,
|
|
54
|
+
dir: j,
|
|
55
|
+
tabIndex: V(S, c),
|
|
56
|
+
role: "progressbar",
|
|
57
|
+
"aria-label": t.ariaLabel,
|
|
58
|
+
"aria-valuemin": m,
|
|
59
|
+
"aria-valuemax": u,
|
|
60
|
+
"aria-valuenow": p ? void 0 : d,
|
|
61
|
+
"aria-disabled": c,
|
|
62
|
+
style: P
|
|
63
|
+
}, B = ({ count: n }) => {
|
|
64
|
+
const b = [], k = 100 / n + "%", L = q(m, u, d), M = Math.floor(L * n), g = Array(n).fill(!1);
|
|
65
|
+
for (let s = 0; s < M; s++)
|
|
66
|
+
g[s] = !0;
|
|
67
|
+
for (let s = 0; s < n; ++s) {
|
|
68
|
+
const i = g[s], A = i ? w : E, F = { ...{
|
|
69
|
+
width: o ? void 0 : k,
|
|
70
|
+
height: o ? k : void 0
|
|
71
|
+
}, ...i ? I : R };
|
|
72
|
+
b.push(
|
|
73
|
+
/* @__PURE__ */ r.createElement(
|
|
74
|
+
"li",
|
|
75
|
+
{
|
|
76
|
+
key: s,
|
|
77
|
+
className: f(
|
|
78
|
+
"k-progressbar-chunk",
|
|
79
|
+
{
|
|
80
|
+
"k-first": s === 0,
|
|
81
|
+
"k-last": s === n - 1,
|
|
82
|
+
"k-selected": i
|
|
83
|
+
},
|
|
84
|
+
A
|
|
85
|
+
),
|
|
86
|
+
style: F
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, b);
|
|
92
|
+
};
|
|
93
|
+
return /* @__PURE__ */ r.createElement("div", { ...z }, /* @__PURE__ */ r.createElement("ul", { className: "k-progressbar-chunks k-reset" }, /* @__PURE__ */ r.createElement(B, { count: h })));
|
|
94
|
+
}
|
|
95
|
+
);
|
|
95
96
|
v.propTypes = {
|
|
96
97
|
chunkCount: e.number,
|
|
97
98
|
ariaLabel: e.string,
|
|
@@ -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,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})=>{
|
|
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})=>{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(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}));
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-progressbars",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1729494489,
|
|
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": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-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": "9.0.0-develop.
|
|
27
|
-
"@progress/kendo-react-common": "9.0.0-develop.
|
|
26
|
+
"@progress/kendo-react-animation": "9.0.0-develop.3",
|
|
27
|
+
"@progress/kendo-react-common": "9.0.0-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
|
},
|
|
@@ -32,12 +32,9 @@ const R = e.forwardRef((t, S) => {
|
|
|
32
32
|
emptyClassName: k,
|
|
33
33
|
progressStyle: w,
|
|
34
34
|
progressClassName: N
|
|
35
|
-
} = t, i = e.useRef(null), c = e.useRef(null), m = e.useRef(null), U = e.useCallback(
|
|
36
|
-
()
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
[]
|
|
40
|
-
);
|
|
35
|
+
} = t, i = e.useRef(null), c = e.useRef(null), m = e.useRef(null), U = e.useCallback(() => {
|
|
36
|
+
i.current && i.current.focus();
|
|
37
|
+
}, []);
|
|
41
38
|
e.useImperativeHandle(
|
|
42
39
|
S,
|
|
43
40
|
() => ({
|
|
@@ -75,25 +72,19 @@ const R = e.forwardRef((t, S) => {
|
|
|
75
72
|
"k-progress-start": d === "start",
|
|
76
73
|
"k-progress-center": d === "center",
|
|
77
74
|
"k-progress-end": d === "end" || d === void 0
|
|
78
|
-
}), x = typeof b != "boolean" && b !== void 0 ? b.duration : b ? X : Y, B = e.useCallback(
|
|
79
|
-
(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
[s, l, n, u]
|
|
84
|
-
), W = e.useCallback(
|
|
75
|
+
}), x = typeof b != "boolean" && b !== void 0 ? b.duration : b ? X : Y, B = e.useCallback(() => {
|
|
76
|
+
const p = v(n, l, u);
|
|
77
|
+
f(c, m, p, s);
|
|
78
|
+
}, [s, l, n, u]), W = e.useCallback(
|
|
85
79
|
(p) => {
|
|
86
80
|
const F = v(n, l, u + (r - u) * p);
|
|
87
81
|
f(c, m, F, s);
|
|
88
82
|
},
|
|
89
83
|
[n, l, u, r, s]
|
|
90
|
-
), z = e.useCallback(
|
|
91
|
-
(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
[s, l, n, r]
|
|
96
|
-
);
|
|
84
|
+
), z = e.useCallback(() => {
|
|
85
|
+
const p = v(n, l, r);
|
|
86
|
+
f(c, m, p, s);
|
|
87
|
+
}, [s, l, n, r]);
|
|
97
88
|
return H(
|
|
98
89
|
{
|
|
99
90
|
duration: x,
|
|
@@ -102,22 +93,14 @@ const R = e.forwardRef((t, S) => {
|
|
|
102
93
|
onEnd: z
|
|
103
94
|
},
|
|
104
95
|
[r, x]
|
|
105
|
-
), /* @__PURE__ */ e.createElement("div", { ...j }, /* @__PURE__ */ e.createElement("span", { className: P + (k ? " " + k : ""), style: h }, E), /* @__PURE__ */ e.createElement(
|
|
106
|
-
"
|
|
96
|
+
), /* @__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(
|
|
97
|
+
"span",
|
|
107
98
|
{
|
|
108
|
-
className: "
|
|
109
|
-
|
|
110
|
-
ref: c
|
|
99
|
+
className: P + (N ? " " + N : ""),
|
|
100
|
+
ref: m
|
|
111
101
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
className: P + (N ? " " + N : ""),
|
|
116
|
-
ref: m
|
|
117
|
-
},
|
|
118
|
-
E
|
|
119
|
-
)
|
|
120
|
-
));
|
|
102
|
+
E
|
|
103
|
+
)));
|
|
121
104
|
});
|
|
122
105
|
R.propTypes = {
|
|
123
106
|
animation: a.any,
|