@synerise/ds-progress-bar 0.6.12 → 0.6.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 CHANGED
@@ -3,6 +3,34 @@
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.6.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.6.14...@synerise/ds-progress-bar@0.6.15) (2022-07-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **progress-bar:** fix bar when is over 99% ([413ec7f](https://github.com/Synerise/synerise-design/commit/413ec7f4aec1febdea73279ba69ee08836e29573))
12
+ * **progress-bar:** fix bar when is over 99% ([cf69288](https://github.com/Synerise/synerise-design/commit/cf692889473701ae1bb726f3d28da7cd0d362cd2))
13
+
14
+
15
+
16
+
17
+
18
+ ## [0.6.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.6.13...@synerise/ds-progress-bar@0.6.14) (2022-07-17)
19
+
20
+ **Note:** Version bump only for package @synerise/ds-progress-bar
21
+
22
+
23
+
24
+
25
+
26
+ ## [0.6.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.6.12...@synerise/ds-progress-bar@0.6.13) (2022-07-08)
27
+
28
+ **Note:** Version bump only for package @synerise/ds-progress-bar
29
+
30
+
31
+
32
+
33
+
6
34
  ## [0.6.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@0.6.11...@synerise/ds-progress-bar@0.6.12) (2022-07-06)
7
35
 
8
36
  **Note:** Version bump only for package @synerise/ds-progress-bar
@@ -8,6 +8,7 @@ declare class ProgressBar extends React.PureComponent<ProgressProps> {
8
8
  strokeColor: string;
9
9
  showLabel: boolean;
10
10
  description: string;
11
+ maxPercent: boolean;
11
12
  };
12
13
  render(): React.ReactNode;
13
14
  }
@@ -27,7 +27,17 @@ var ProgressBar = /*#__PURE__*/function (_React$PureComponent) {
27
27
  className = _this$props.className,
28
28
  thick = _this$props.thick,
29
29
  labelFormatter = _this$props.labelFormatter,
30
- containerStyles = _this$props.containerStyles;
30
+ containerStyles = _this$props.containerStyles,
31
+ maxPercent = _this$props.maxPercent;
32
+
33
+ var maxBorderWidth = function maxBorderWidth() {
34
+ if (percent === 100) {
35
+ return maxPercent;
36
+ }
37
+
38
+ return false;
39
+ };
40
+
31
41
  return /*#__PURE__*/React.createElement(S.Container, {
32
42
  className: (className || '') + " progress-bar-container",
33
43
  "data-testid": "progress-bar-container",
@@ -41,6 +51,7 @@ var ProgressBar = /*#__PURE__*/function (_React$PureComponent) {
41
51
  "data-testid": "progress-bar-max-percent"
42
52
  }, " (" + percent + "%)"))), /*#__PURE__*/React.createElement(S.AntdProgressBar, {
43
53
  percent: percent,
54
+ maxPercent: maxBorderWidth(),
44
55
  type: type,
45
56
  thick: thick,
46
57
  status: status,
@@ -62,7 +73,8 @@ _defineProperty(ProgressBar, "defaultProps", {
62
73
  strokeLinecap: 'round',
63
74
  strokeColor: '#76dc25',
64
75
  showLabel: false,
65
- description: ''
76
+ description: '',
77
+ maxPercent: true
66
78
  });
67
79
 
68
80
  export default ProgressBar;
@@ -15,7 +15,7 @@ export var MaxValue = styled.strong.withConfig({
15
15
  export var AntdProgressBar = styled(Progress).withConfig({
16
16
  displayName: "ProgressBarstyles__AntdProgressBar",
17
17
  componentId: "sc-1gqovic-2"
18
- })(["&.ant-progress-line{width:100%;height:", ";margin-top:", ";margin:14px 0;border-radius:3px;color:", ";overflow:hidden;box-sizing:content-box;.ant-progress-outer{display:flex;}.ant-progress-inner{width:100%;}.ant-progress-outer,.ant-progress-inner{background:", ";}.ant-progress-outer,.ant-progress-inner,.ant-progress-bg{height:6px !important;}.ant-progress-bg:first-child{border-top-right-radius:0px;border-bottom-right-radius:0px;border-right:2px solid ", ";}}"], function (props) {
18
+ })(["&.ant-progress-line{width:100%;height:", ";margin-top:", ";margin:14px 0;border-radius:3px;color:", ";overflow:hidden;box-sizing:content-box;.ant-progress-outer{display:flex;}.ant-progress-inner{width:100%;}.ant-progress-outer,.ant-progress-inner{background:", ";}.ant-progress-outer,.ant-progress-inner,.ant-progress-bg{height:6px !important;}.ant-progress-bg:first-child{border-top-right-radius:0px;border-bottom-right-radius:0px;border-right:", ";}}"], function (props) {
19
19
  return props.thick ? '3px' : '6px';
20
20
  }, function (props) {
21
21
  return props.thick ? '3px' : '0px';
@@ -24,5 +24,5 @@ export var AntdProgressBar = styled(Progress).withConfig({
24
24
  }, function (props) {
25
25
  return props.theme.palette['grey-100'];
26
26
  }, function (props) {
27
- return props.theme.palette.white;
27
+ return props.maxPercent ? "0px" : "2px solid " + props.theme.palette.white;
28
28
  });
@@ -7,4 +7,5 @@ export interface ProgressProps extends AntProgressProps {
7
7
  thick?: boolean;
8
8
  labelFormatter?: (amount?: string | number, percent?: string | number) => React.ReactNode;
9
9
  containerStyles?: React.CSSProperties;
10
+ maxPercent?: boolean;
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-progress-bar",
3
- "version": "0.6.12",
3
+ "version": "0.6.15",
4
4
  "description": "Progress-Bar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -40,7 +40,7 @@
40
40
  "react": ">=16.9.0 < 17.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@synerise/ds-utils": "^0.22.1"
43
+ "@synerise/ds-utils": "^0.22.3"
44
44
  },
45
- "gitHead": "6e09a689031ae03275336274cc4302de669f380d"
45
+ "gitHead": "bf12565ec1e6a4124b0c54cdb61e22eae4401d93"
46
46
  }