@progress/kendo-react-progressbars 10.2.0-develop.6 → 10.2.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.
@@ -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:"10.2.0-develop.6",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(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,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}));
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:"10.2.0-develop.7",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(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,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}));
package/index.d.mts CHANGED
@@ -12,80 +12,158 @@ import * as React_2 from 'react';
12
12
  */
13
13
  declare interface BaseProps {
14
14
  /**
15
- * Sets one of the two visually distinct types of progress bar.
15
+ * Specifies the type of progress bar. Can be either `linear` or `circular`.
16
+ *
17
+ * Example:
18
+ * ```jsx
19
+ * <ProgressBar type="linear" />
20
+ * ```
16
21
  *
17
22
  * @hidden
18
23
  */
19
24
  type?: 'linear' | 'circular';
20
25
  /**
21
- * Sets the value of the progress bar. Has to be between `min` and `max` values. Defaults to `0`.
22
- * Set `null` to enable the indeterminate state of the progress bar.
26
+ * Sets the current value of the progress bar. Must be between the `min` and `max` values. Defaults to `0`.
27
+ * Set to `null` to enable the indeterminate state of the progress bar.
23
28
  * See examples ([here]({% slug overview_progressbar %})) and ([here]({% slug overview_chunkprogressbar %})).
29
+ *
30
+ * Example:
31
+ * ```jsx
32
+ * <ProgressBar value={50} />
33
+ * ```
24
34
  */
25
35
  value?: number | null;
26
36
  /**
27
- * The minimum value of the progress bar. Defaults to `0`.
37
+ * Specifies the minimum value of the progress bar. Defaults to `0`.
38
+ *
39
+ * Example:
40
+ * ```jsx
41
+ * <ProgressBar min={0} />
42
+ * ```
28
43
  */
29
44
  min?: number;
30
45
  /**
31
- * The maximum value of the progress bar. Defaults to `100`.
46
+ * Specifies the maximum value of the progress bar. Defaults to `100`.
47
+ *
48
+ * Example:
49
+ * ```jsx
50
+ * <ProgressBar max={100} />
51
+ * ```
32
52
  */
33
53
  max?: number;
34
54
  /**
35
- * Represents the `dir` HTML attribute. This is used to switch from LTR to RTL.
55
+ * Sets the `dir` HTML attribute to switch between LTR and RTL directions.
56
+ *
57
+ * Example:
58
+ * ```jsx
59
+ * <ProgressBar dir="rtl" />
60
+ * ```
36
61
  */
37
62
  dir?: string;
38
63
  /**
39
- * The accessible label of the component.
64
+ * Provides an accessible label for the component.
65
+ *
66
+ * Example:
67
+ * ```jsx
68
+ * <ProgressBar ariaLabel="Loading progress" />
69
+ * ```
40
70
  */
41
71
  ariaLabel?: string;
42
72
  /**
43
- * Sets the disabled state of the progress bar.
73
+ * Determines whether the progress bar is in a disabled state.
44
74
  * See examples ([here]({% slug progressbar_disabled %})) and ([here]({% slug chunkprogressbar_disabled %})).
75
+ *
76
+ * Example:
77
+ * ```jsx
78
+ * <ProgressBar disabled={true} />
79
+ * ```
45
80
  */
46
81
  disabled?: boolean;
47
82
  /**
48
- * Defines the orientation of the progress bar.
83
+ * Specifies the orientation of the progress bar. Can be `horizontal` or `vertical`. Defaults to `horizontal`.
49
84
  * See examples ([here]({% slug progressbar_orientation %})) and ([here]({% slug chunkprogressbar_orientation %})).
50
- * Defaults to `horizontal`.
85
+ *
86
+ * Example:
87
+ * ```jsx
88
+ * <ProgressBar orientation="vertical" />
89
+ * ```
51
90
  */
52
91
  orientation?: 'horizontal' | 'vertical';
53
92
  /**
54
- * If set to `true`, the progress bar will be reversed.
93
+ * If set to `true`, reverses the direction of the progress bar. Defaults to `false`.
55
94
  * See examples ([here]({% slug progressbar_direction %})) and ([here]({% slug chunkprogressbar_direction %})).
56
- * Defaults to `false`.
95
+ *
96
+ * Example:
97
+ * ```jsx
98
+ * <ProgressBar reverse={true} />
99
+ * ```
57
100
  */
58
101
  reverse?: boolean;
59
102
  /**
60
- * Specifies a list of CSS classes that will be added to the progress bar element.
103
+ * Adds a list of CSS classes to the progress bar element.
104
+ *
105
+ * Example:
106
+ * ```jsx
107
+ * <ProgressBar className="custom-progress-bar" />
108
+ * ```
61
109
  */
62
110
  className?: string;
63
111
  /**
64
- * Sets additional CSS styles to the progress bar.
112
+ * Applies additional CSS styles to the progress bar.
113
+ *
114
+ * Example:
115
+ * ```jsx
116
+ * <ProgressBar style={{ backgroundColor: 'red' }} />
117
+ * ```
65
118
  */
66
119
  style?: React.CSSProperties;
67
120
  /**
68
- * The styles that are applied to the inner element which represents the empty portion of the progress bar.
121
+ * Specifies the styles applied to the inner element representing the empty portion of the progress bar.
69
122
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
123
+ *
124
+ * Example:
125
+ * ```jsx
126
+ * <ProgressBar emptyStyle={{ backgroundColor: 'lightgray' }} />
127
+ * ```
70
128
  */
71
129
  emptyStyle?: React.CSSProperties;
72
130
  /**
73
- * Sets additional classes to the inner element which represents the empty portion of the progress bar.
131
+ * Adds additional CSS classes to the inner element representing the empty portion of the progress bar.
74
132
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
133
+ *
134
+ * Example:
135
+ * ```jsx
136
+ * <ProgressBar emptyClassName="custom-empty-class" />
137
+ * ```
75
138
  */
76
139
  emptyClassName?: string;
77
140
  /**
78
- * The styles that are applied to the inner element which represents the full portion of the progress bar.
141
+ * Specifies the styles applied to the inner element representing the full portion of the progress bar.
79
142
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
143
+ *
144
+ * Example:
145
+ * ```jsx
146
+ * <ProgressBar progressStyle={{ backgroundColor: 'green' }} />
147
+ * ```
80
148
  */
81
149
  progressStyle?: React.CSSProperties;
82
150
  /**
83
- * Sets additional classes to the inner element which represents the full portion of the progress bar.
151
+ * Adds additional CSS classes to the inner element representing the full portion of the progress bar.
84
152
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
153
+ *
154
+ * Example:
155
+ * ```jsx
156
+ * <ProgressBar progressClassName="custom-progress-class" />
157
+ * ```
85
158
  */
86
159
  progressClassName?: string;
87
160
  /**
88
- * Sets the `tabIndex` property of the progress bar.
161
+ * Sets the `tabIndex` attribute of the progress bar for keyboard navigation.
162
+ *
163
+ * Example:
164
+ * ```jsx
165
+ * <ProgressBar tabIndex={0} />
166
+ * ```
89
167
  */
90
168
  tabIndex?: number;
91
169
  }
@@ -124,7 +202,13 @@ declare interface ChunkProgressBarHandle {
124
202
  */
125
203
  export declare interface ChunkProgressBarProps extends BaseProps {
126
204
  /**
127
- * Sets the number of chunks into which the ChunkProgressBar will be split. Defaults to `5`.
205
+ * Defines the number of chunks into which the ChunkProgressBar is divided. Defaults to `5`.
206
+ * Each chunk visually represents a portion of the progress bar.
207
+ *
208
+ * @example
209
+ * ```jsx
210
+ * <ChunkProgressBar chunkCount={10} />
211
+ * ```
128
212
  */
129
213
  chunkCount?: number;
130
214
  }
@@ -134,7 +218,7 @@ export declare interface ChunkProgressBarProps extends BaseProps {
134
218
  */
135
219
  export declare interface LabelProps {
136
220
  /**
137
- * Represents the current value of the ProgressBar.
221
+ * The current value of the ProgressBar. Can be a number or `null` for indeterminate state.
138
222
  */
139
223
  value?: number | null;
140
224
  }
@@ -191,21 +275,42 @@ export declare interface ProgressBarHandle {
191
275
  */
192
276
  export declare interface ProgressBarProps extends BaseProps {
193
277
  /**
194
- * Specifies the animation settings of the ProgressBar. Defaults to `false`.
195
- * If boolean, enables or disables the default animation.
196
- * Use ProgressBarAnimation to set slide animation with customizable duration option. Accepts a number in milliseconds.
278
+ * Configures the animation settings of the ProgressBar. Defaults to `false`.
279
+ * If set to a boolean, it enables or disables the default animation.
280
+ * If set to a `ProgressBarAnimation` object, it allows customization of the slide animation duration in milliseconds.
281
+ *
282
+ * @example
283
+ * ```jsx
284
+ * <ProgressBar animation={{ duration: 500 }} />
285
+ * ```
197
286
  */
198
287
  animation?: boolean | ProgressBarAnimation;
199
288
  /**
200
- * Overrides the default label ([see example]({% slug progressbar_label %})).
289
+ * Provides a custom label component for the ProgressBar ([see example]({% slug progressbar_label %})).
290
+ *
291
+ * @example
292
+ * ```jsx
293
+ * const CustomLabel = (props) => <span>{props.value}%</span>;
294
+ * <ProgressBar label={CustomLabel} />
295
+ * ```
201
296
  */
202
297
  label?: React.ComponentType<LabelProps>;
203
298
  /**
204
- * Sets the visibility of the progress status label. Defaults to `true`.
299
+ * Determines whether the progress status label is visible. Defaults to `true`.
300
+ *
301
+ * @example
302
+ * ```jsx
303
+ * <ProgressBar labelVisible={false} />
304
+ * ```
205
305
  */
206
306
  labelVisible?: boolean;
207
307
  /**
208
- * Sets the position of the progress status label. Defaults to `end` ([see example]({% slug progressbar_label %})).
308
+ * Specifies the position of the progress status label. Defaults to `end` ([see example]({% slug progressbar_label %})).
309
+ *
310
+ * @example
311
+ * ```jsx
312
+ * <ProgressBar labelPlacement="center" />
313
+ * ```
209
314
  */
210
315
  labelPlacement?: 'start' | 'center' | 'end';
211
316
  }
package/index.d.ts CHANGED
@@ -12,80 +12,158 @@ import * as React_2 from 'react';
12
12
  */
13
13
  declare interface BaseProps {
14
14
  /**
15
- * Sets one of the two visually distinct types of progress bar.
15
+ * Specifies the type of progress bar. Can be either `linear` or `circular`.
16
+ *
17
+ * Example:
18
+ * ```jsx
19
+ * <ProgressBar type="linear" />
20
+ * ```
16
21
  *
17
22
  * @hidden
18
23
  */
19
24
  type?: 'linear' | 'circular';
20
25
  /**
21
- * Sets the value of the progress bar. Has to be between `min` and `max` values. Defaults to `0`.
22
- * Set `null` to enable the indeterminate state of the progress bar.
26
+ * Sets the current value of the progress bar. Must be between the `min` and `max` values. Defaults to `0`.
27
+ * Set to `null` to enable the indeterminate state of the progress bar.
23
28
  * See examples ([here]({% slug overview_progressbar %})) and ([here]({% slug overview_chunkprogressbar %})).
29
+ *
30
+ * Example:
31
+ * ```jsx
32
+ * <ProgressBar value={50} />
33
+ * ```
24
34
  */
25
35
  value?: number | null;
26
36
  /**
27
- * The minimum value of the progress bar. Defaults to `0`.
37
+ * Specifies the minimum value of the progress bar. Defaults to `0`.
38
+ *
39
+ * Example:
40
+ * ```jsx
41
+ * <ProgressBar min={0} />
42
+ * ```
28
43
  */
29
44
  min?: number;
30
45
  /**
31
- * The maximum value of the progress bar. Defaults to `100`.
46
+ * Specifies the maximum value of the progress bar. Defaults to `100`.
47
+ *
48
+ * Example:
49
+ * ```jsx
50
+ * <ProgressBar max={100} />
51
+ * ```
32
52
  */
33
53
  max?: number;
34
54
  /**
35
- * Represents the `dir` HTML attribute. This is used to switch from LTR to RTL.
55
+ * Sets the `dir` HTML attribute to switch between LTR and RTL directions.
56
+ *
57
+ * Example:
58
+ * ```jsx
59
+ * <ProgressBar dir="rtl" />
60
+ * ```
36
61
  */
37
62
  dir?: string;
38
63
  /**
39
- * The accessible label of the component.
64
+ * Provides an accessible label for the component.
65
+ *
66
+ * Example:
67
+ * ```jsx
68
+ * <ProgressBar ariaLabel="Loading progress" />
69
+ * ```
40
70
  */
41
71
  ariaLabel?: string;
42
72
  /**
43
- * Sets the disabled state of the progress bar.
73
+ * Determines whether the progress bar is in a disabled state.
44
74
  * See examples ([here]({% slug progressbar_disabled %})) and ([here]({% slug chunkprogressbar_disabled %})).
75
+ *
76
+ * Example:
77
+ * ```jsx
78
+ * <ProgressBar disabled={true} />
79
+ * ```
45
80
  */
46
81
  disabled?: boolean;
47
82
  /**
48
- * Defines the orientation of the progress bar.
83
+ * Specifies the orientation of the progress bar. Can be `horizontal` or `vertical`. Defaults to `horizontal`.
49
84
  * See examples ([here]({% slug progressbar_orientation %})) and ([here]({% slug chunkprogressbar_orientation %})).
50
- * Defaults to `horizontal`.
85
+ *
86
+ * Example:
87
+ * ```jsx
88
+ * <ProgressBar orientation="vertical" />
89
+ * ```
51
90
  */
52
91
  orientation?: 'horizontal' | 'vertical';
53
92
  /**
54
- * If set to `true`, the progress bar will be reversed.
93
+ * If set to `true`, reverses the direction of the progress bar. Defaults to `false`.
55
94
  * See examples ([here]({% slug progressbar_direction %})) and ([here]({% slug chunkprogressbar_direction %})).
56
- * Defaults to `false`.
95
+ *
96
+ * Example:
97
+ * ```jsx
98
+ * <ProgressBar reverse={true} />
99
+ * ```
57
100
  */
58
101
  reverse?: boolean;
59
102
  /**
60
- * Specifies a list of CSS classes that will be added to the progress bar element.
103
+ * Adds a list of CSS classes to the progress bar element.
104
+ *
105
+ * Example:
106
+ * ```jsx
107
+ * <ProgressBar className="custom-progress-bar" />
108
+ * ```
61
109
  */
62
110
  className?: string;
63
111
  /**
64
- * Sets additional CSS styles to the progress bar.
112
+ * Applies additional CSS styles to the progress bar.
113
+ *
114
+ * Example:
115
+ * ```jsx
116
+ * <ProgressBar style={{ backgroundColor: 'red' }} />
117
+ * ```
65
118
  */
66
119
  style?: React.CSSProperties;
67
120
  /**
68
- * The styles that are applied to the inner element which represents the empty portion of the progress bar.
121
+ * Specifies the styles applied to the inner element representing the empty portion of the progress bar.
69
122
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
123
+ *
124
+ * Example:
125
+ * ```jsx
126
+ * <ProgressBar emptyStyle={{ backgroundColor: 'lightgray' }} />
127
+ * ```
70
128
  */
71
129
  emptyStyle?: React.CSSProperties;
72
130
  /**
73
- * Sets additional classes to the inner element which represents the empty portion of the progress bar.
131
+ * Adds additional CSS classes to the inner element representing the empty portion of the progress bar.
74
132
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
133
+ *
134
+ * Example:
135
+ * ```jsx
136
+ * <ProgressBar emptyClassName="custom-empty-class" />
137
+ * ```
75
138
  */
76
139
  emptyClassName?: string;
77
140
  /**
78
- * The styles that are applied to the inner element which represents the full portion of the progress bar.
141
+ * Specifies the styles applied to the inner element representing the full portion of the progress bar.
79
142
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
143
+ *
144
+ * Example:
145
+ * ```jsx
146
+ * <ProgressBar progressStyle={{ backgroundColor: 'green' }} />
147
+ * ```
80
148
  */
81
149
  progressStyle?: React.CSSProperties;
82
150
  /**
83
- * Sets additional classes to the inner element which represents the full portion of the progress bar.
151
+ * Adds additional CSS classes to the inner element representing the full portion of the progress bar.
84
152
  * See examples ([here]({% slug progressbar_appearance %})) and ([here]({% slug chunkprogressbar_appearance %})).
153
+ *
154
+ * Example:
155
+ * ```jsx
156
+ * <ProgressBar progressClassName="custom-progress-class" />
157
+ * ```
85
158
  */
86
159
  progressClassName?: string;
87
160
  /**
88
- * Sets the `tabIndex` property of the progress bar.
161
+ * Sets the `tabIndex` attribute of the progress bar for keyboard navigation.
162
+ *
163
+ * Example:
164
+ * ```jsx
165
+ * <ProgressBar tabIndex={0} />
166
+ * ```
89
167
  */
90
168
  tabIndex?: number;
91
169
  }
@@ -124,7 +202,13 @@ declare interface ChunkProgressBarHandle {
124
202
  */
125
203
  export declare interface ChunkProgressBarProps extends BaseProps {
126
204
  /**
127
- * Sets the number of chunks into which the ChunkProgressBar will be split. Defaults to `5`.
205
+ * Defines the number of chunks into which the ChunkProgressBar is divided. Defaults to `5`.
206
+ * Each chunk visually represents a portion of the progress bar.
207
+ *
208
+ * @example
209
+ * ```jsx
210
+ * <ChunkProgressBar chunkCount={10} />
211
+ * ```
128
212
  */
129
213
  chunkCount?: number;
130
214
  }
@@ -134,7 +218,7 @@ export declare interface ChunkProgressBarProps extends BaseProps {
134
218
  */
135
219
  export declare interface LabelProps {
136
220
  /**
137
- * Represents the current value of the ProgressBar.
221
+ * The current value of the ProgressBar. Can be a number or `null` for indeterminate state.
138
222
  */
139
223
  value?: number | null;
140
224
  }
@@ -191,21 +275,42 @@ export declare interface ProgressBarHandle {
191
275
  */
192
276
  export declare interface ProgressBarProps extends BaseProps {
193
277
  /**
194
- * Specifies the animation settings of the ProgressBar. Defaults to `false`.
195
- * If boolean, enables or disables the default animation.
196
- * Use ProgressBarAnimation to set slide animation with customizable duration option. Accepts a number in milliseconds.
278
+ * Configures the animation settings of the ProgressBar. Defaults to `false`.
279
+ * If set to a boolean, it enables or disables the default animation.
280
+ * If set to a `ProgressBarAnimation` object, it allows customization of the slide animation duration in milliseconds.
281
+ *
282
+ * @example
283
+ * ```jsx
284
+ * <ProgressBar animation={{ duration: 500 }} />
285
+ * ```
197
286
  */
198
287
  animation?: boolean | ProgressBarAnimation;
199
288
  /**
200
- * Overrides the default label ([see example]({% slug progressbar_label %})).
289
+ * Provides a custom label component for the ProgressBar ([see example]({% slug progressbar_label %})).
290
+ *
291
+ * @example
292
+ * ```jsx
293
+ * const CustomLabel = (props) => <span>{props.value}%</span>;
294
+ * <ProgressBar label={CustomLabel} />
295
+ * ```
201
296
  */
202
297
  label?: React.ComponentType<LabelProps>;
203
298
  /**
204
- * Sets the visibility of the progress status label. Defaults to `true`.
299
+ * Determines whether the progress status label is visible. Defaults to `true`.
300
+ *
301
+ * @example
302
+ * ```jsx
303
+ * <ProgressBar labelVisible={false} />
304
+ * ```
205
305
  */
206
306
  labelVisible?: boolean;
207
307
  /**
208
- * Sets the position of the progress status label. Defaults to `end` ([see example]({% slug progressbar_label %})).
308
+ * Specifies the position of the progress status label. Defaults to `end` ([see example]({% slug progressbar_label %})).
309
+ *
310
+ * @example
311
+ * ```jsx
312
+ * <ProgressBar labelPlacement="center" />
313
+ * ```
209
314
  */
210
315
  labelPlacement?: 'start' | 'center' | 'end';
211
316
  }
@@ -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: 1744621418,version:"10.2.0-develop.6",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: 1744785606,version:"10.2.0-develop.7",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: 1744621418,
14
- version: "10.2.0-develop.6",
13
+ publishDate: 1744785606,
14
+ version: "10.2.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": "10.2.0-develop.6",
3
+ "version": "10.2.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",
@@ -26,8 +26,8 @@
26
26
  "sideEffects": false,
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.5.1",
29
- "@progress/kendo-react-animation": "10.2.0-develop.6",
30
- "@progress/kendo-react-common": "10.2.0-develop.6",
29
+ "@progress/kendo-react-animation": "10.2.0-develop.7",
30
+ "@progress/kendo-react-common": "10.2.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": 1744621418,
59
+ "publishDate": 1744785606,
60
60
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
61
61
  }
62
62
  },