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