@synerise/ds-progress-bar 0.7.13 → 0.7.15
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/CHANGELOG.md +16 -0
- package/dist/Multivalue/Multivalue.js +0 -3
- package/dist/ProgressBar.js +13 -28
- package/dist/ProgressTiles/ProgressTiles.js +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.7.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.7.14...@synerise/ds-progress-bar@0.7.15) (2024-11-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-progress-bar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.7.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.7.13...@synerise/ds-progress-bar@0.7.14) (2024-11-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-progress-bar
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.7.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.7.12...@synerise/ds-progress-bar@0.7.13) (2024-11-12)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @synerise/ds-progress-bar
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as S from './MultiValue.styles';
|
|
3
|
-
|
|
4
3
|
var normalizePercent = function normalizePercent(value) {
|
|
5
4
|
if (value < 0) return 0;
|
|
6
5
|
if (value > 100) return 100;
|
|
7
6
|
return value;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
var Multivalue = function Multivalue(props) {
|
|
11
9
|
var values = props.values;
|
|
12
10
|
var sortedByPercent = values.sort(function (a, b) {
|
|
@@ -21,5 +19,4 @@ var Multivalue = function Multivalue(props) {
|
|
|
21
19
|
});
|
|
22
20
|
}));
|
|
23
21
|
};
|
|
24
|
-
|
|
25
22
|
export default Multivalue;
|
package/dist/ProgressBar.js
CHANGED
|
@@ -1,49 +1,37 @@
|
|
|
1
1
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
2
|
-
|
|
3
2
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4
|
-
|
|
5
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
8
|
-
|
|
9
5
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
|
|
11
6
|
import React from 'react';
|
|
12
7
|
import * as S from './ProgressBar.styles';
|
|
13
|
-
|
|
14
8
|
var ProgressBar = /*#__PURE__*/function (_React$PureComponent) {
|
|
15
9
|
function ProgressBar() {
|
|
16
10
|
return _React$PureComponent.apply(this, arguments) || this;
|
|
17
11
|
}
|
|
18
|
-
|
|
19
12
|
_inheritsLoose(ProgressBar, _React$PureComponent);
|
|
20
|
-
|
|
21
13
|
var _proto = ProgressBar.prototype;
|
|
22
|
-
|
|
23
14
|
_proto.render = function render() {
|
|
24
15
|
var _this$props = this.props,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
showLabel = _this$props.showLabel,
|
|
17
|
+
description = _this$props.description,
|
|
18
|
+
amount = _this$props.amount,
|
|
19
|
+
percent = _this$props.percent,
|
|
20
|
+
type = _this$props.type,
|
|
21
|
+
status = _this$props.status,
|
|
22
|
+
strokeColor = _this$props.strokeColor,
|
|
23
|
+
strokeLinecap = _this$props.strokeLinecap,
|
|
24
|
+
className = _this$props.className,
|
|
25
|
+
thick = _this$props.thick,
|
|
26
|
+
labelFormatter = _this$props.labelFormatter,
|
|
27
|
+
containerStyles = _this$props.containerStyles,
|
|
28
|
+
maxPercent = _this$props.maxPercent;
|
|
39
29
|
var maxBorderWidth = function maxBorderWidth() {
|
|
40
30
|
if (percent === 100) {
|
|
41
31
|
return maxPercent;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
33
|
return false;
|
|
45
34
|
};
|
|
46
|
-
|
|
47
35
|
return /*#__PURE__*/React.createElement(S.Container, {
|
|
48
36
|
className: (className || '') + " progress-bar-container",
|
|
49
37
|
"data-testid": "progress-bar-container",
|
|
@@ -69,10 +57,8 @@ var ProgressBar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
69
57
|
"data-testid": "progress-bar-description"
|
|
70
58
|
}, description));
|
|
71
59
|
};
|
|
72
|
-
|
|
73
60
|
return ProgressBar;
|
|
74
61
|
}(React.PureComponent);
|
|
75
|
-
|
|
76
62
|
_defineProperty(ProgressBar, "defaultProps", {
|
|
77
63
|
type: 'line',
|
|
78
64
|
status: 'normal',
|
|
@@ -82,5 +68,4 @@ _defineProperty(ProgressBar, "defaultProps", {
|
|
|
82
68
|
description: '',
|
|
83
69
|
maxPercent: true
|
|
84
70
|
});
|
|
85
|
-
|
|
86
71
|
export default ProgressBar;
|
|
@@ -4,9 +4,9 @@ import * as S from './ProgressTiles.styles';
|
|
|
4
4
|
var MAX_PERCENT = 100;
|
|
5
5
|
export var ProgressTiles = function ProgressTiles(_ref) {
|
|
6
6
|
var colors = _ref.colors,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
label = _ref.label,
|
|
8
|
+
tileWidth = _ref.tileWidth,
|
|
9
|
+
percent = _ref.percent;
|
|
10
10
|
var getTilesConfig = React.useCallback(function () {
|
|
11
11
|
var TILES_COUNT = colors.length;
|
|
12
12
|
var tileWidthRatio = MAX_PERCENT / TILES_COUNT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-progress-bar",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
4
4
|
"description": "Progress-Bar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-typography": "^0.16.
|
|
38
|
-
"@synerise/ds-utils": "^0.31.
|
|
37
|
+
"@synerise/ds-typography": "^0.16.7",
|
|
38
|
+
"@synerise/ds-utils": "^0.31.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"react": ">=16.9.0 <= 17.0.2",
|
|
44
44
|
"styled-components": "5.0.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "4a56ee7ef816c22341ce704154dc7aa65b7d1dcc"
|
|
47
47
|
}
|