@synerise/ds-progress-bar 1.1.21 → 1.1.23
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 +19 -0
- package/dist/ProgressBar.js +10 -14
- package/dist/ProgressBar.styles.d.ts +8 -5
- package/dist/ProgressBar.styles.js +21 -9
- package/dist/ProgressTiles/ProgressTiles.js +1 -4
- package/dist/ProgressTiles/ProgressTiles.styles.d.ts +1 -0
- package/dist/ProgressTiles/ProgressTiles.styles.js +7 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
## [1.1.23](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@1.1.22...@synerise/ds-progress-bar@1.1.23) (2025-11-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-progress-bar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.1.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@1.1.21...@synerise/ds-progress-bar@1.1.22) (2025-11-13)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **progress-bar:** layout tweaks ([53c1d2e](https://github.com/Synerise/synerise-design/commit/53c1d2efe614035cae18122a0f2bfa8589d05745))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.1.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-progress-bar@1.1.20...@synerise/ds-progress-bar@1.1.21) (2025-11-06)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-progress-bar
|
package/dist/ProgressBar.js
CHANGED
|
@@ -41,26 +41,22 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
41
41
|
return /*#__PURE__*/React.createElement(S.Container, _extends({
|
|
42
42
|
className: (className || '') + " progress-bar-container",
|
|
43
43
|
"data-testid": "progress-bar-container",
|
|
44
|
-
steps: steps,
|
|
45
|
-
inline: inline
|
|
46
|
-
}, rest), label && !inline && /*#__PURE__*/React.createElement(S.LabelWrapper, null, /*#__PURE__*/React.createElement(S.Label, {
|
|
47
|
-
"data-testid": "progress-bar-label"
|
|
48
|
-
|
|
49
|
-
}, label), /*#__PURE__*/React.createElement("span", {
|
|
44
|
+
$steps: steps,
|
|
45
|
+
$inline: inline
|
|
46
|
+
}, rest), label && !inline && /*#__PURE__*/React.createElement(S.LabelWrapper, null, label && /*#__PURE__*/React.createElement(S.Label, {
|
|
47
|
+
"data-testid": "progress-bar-label"
|
|
48
|
+
}, label), /*#__PURE__*/React.createElement(S.Percent, {
|
|
50
49
|
"data-testid": "progress-bar-max-percent"
|
|
51
|
-
}, percent + "%")), /*#__PURE__*/React.createElement(
|
|
52
|
-
className: "progress-div"
|
|
53
|
-
}, tiles.map(function (tile, i) {
|
|
50
|
+
}, percent + "%")), /*#__PURE__*/React.createElement(S.ProgressOuter, null, tiles.map(function (tile, i) {
|
|
54
51
|
return /*#__PURE__*/React.createElement(S.ProgressWrapper, {
|
|
55
|
-
thin: thin,
|
|
52
|
+
$thin: thin,
|
|
56
53
|
key: "key-" + tile.id,
|
|
57
|
-
width: width
|
|
54
|
+
$width: width
|
|
58
55
|
}, /*#__PURE__*/React.createElement(S.ProgressBar, {
|
|
59
56
|
customColor: customColor,
|
|
60
|
-
width: (tilesWidthRatios[i] || 0) * MAX_PERCENT + "%"
|
|
57
|
+
$width: (tilesWidthRatios[i] || 0) * MAX_PERCENT + "%"
|
|
61
58
|
}));
|
|
62
|
-
})), inline && /*#__PURE__*/React.createElement(S.PercentWrapper, null, percent + "%"), description && !inline && /*#__PURE__*/React.createElement(
|
|
63
|
-
className: "progress-bar-description",
|
|
59
|
+
})), inline && /*#__PURE__*/React.createElement(S.PercentWrapper, null, label || percent + "%"), description && !inline && /*#__PURE__*/React.createElement(S.ProgressBarDescription, {
|
|
64
60
|
"data-testid": "progress-bar-description"
|
|
65
61
|
}, description));
|
|
66
62
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
export declare const LabelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const Label: import("styled-components").StyledComponent<({ id, label, tooltip, tooltipConfig, children, ...htmlAttributes }: import("@synerise/ds-form-field").FormFieldLabelProps) => React.JSX.Element, any, {}, never>;
|
|
3
3
|
export declare const ProgressWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
-
width: string;
|
|
5
|
-
thin: boolean;
|
|
4
|
+
$width: string;
|
|
5
|
+
$thin: boolean;
|
|
6
6
|
}, never>;
|
|
7
|
+
export declare const ProgressOuter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Percent: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
9
|
+
export declare const ProgressBarDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
10
|
export declare const ProgressBar: import("styled-components").StyledComponent<"div", any, {
|
|
8
11
|
customColor: string;
|
|
9
|
-
width: string;
|
|
12
|
+
$width: string;
|
|
10
13
|
}, never>;
|
|
11
14
|
export declare const PercentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
15
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
13
|
-
steps?: number;
|
|
14
|
-
inline?: boolean;
|
|
16
|
+
$steps?: number;
|
|
17
|
+
$inline?: boolean;
|
|
15
18
|
}, never>;
|
|
@@ -12,31 +12,43 @@ export var ProgressWrapper = styled.div.withConfig({
|
|
|
12
12
|
displayName: "ProgressBarstyles__ProgressWrapper",
|
|
13
13
|
componentId: "sc-1gqovic-2"
|
|
14
14
|
})(["position:relative;margin-right:2px;width:", ";height:", ";background:", ";"], function (props) {
|
|
15
|
-
return props
|
|
15
|
+
return props.$width;
|
|
16
16
|
}, function (props) {
|
|
17
|
-
return props
|
|
17
|
+
return props.$thin ? '4px' : '6px';
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.theme.palette['grey-200'];
|
|
20
20
|
});
|
|
21
|
+
export var ProgressOuter = styled.div.withConfig({
|
|
22
|
+
displayName: "ProgressBarstyles__ProgressOuter",
|
|
23
|
+
componentId: "sc-1gqovic-3"
|
|
24
|
+
})(["display:flex;align-items:center;min-width:0;flex:1 1 auto;"]);
|
|
25
|
+
export var Percent = styled.span.withConfig({
|
|
26
|
+
displayName: "ProgressBarstyles__Percent",
|
|
27
|
+
componentId: "sc-1gqovic-4"
|
|
28
|
+
})([""]);
|
|
29
|
+
export var ProgressBarDescription = styled.span.withConfig({
|
|
30
|
+
displayName: "ProgressBarstyles__ProgressBarDescription",
|
|
31
|
+
componentId: "sc-1gqovic-5"
|
|
32
|
+
})(["margin-top:8px;"]);
|
|
21
33
|
export var ProgressBar = styled.div.withConfig({
|
|
22
34
|
displayName: "ProgressBarstyles__ProgressBar",
|
|
23
|
-
componentId: "sc-1gqovic-
|
|
35
|
+
componentId: "sc-1gqovic-6"
|
|
24
36
|
})(["position:absolute;height:100%;width:", ";background-color:", ";"], function (props) {
|
|
25
|
-
return props
|
|
37
|
+
return props.$width;
|
|
26
38
|
}, function (props) {
|
|
27
39
|
return props.customColor ? props.customColor : props.theme.palette['green-500'];
|
|
28
40
|
});
|
|
29
41
|
export var PercentWrapper = styled.div.withConfig({
|
|
30
42
|
displayName: "ProgressBarstyles__PercentWrapper",
|
|
31
|
-
componentId: "sc-1gqovic-
|
|
43
|
+
componentId: "sc-1gqovic-7"
|
|
32
44
|
})(["margin-left:8px;color:", ";font-weight:400;"], function (props) {
|
|
33
45
|
return props.theme.palette['grey-800'];
|
|
34
46
|
});
|
|
35
47
|
export var Container = styled.div.withConfig({
|
|
36
48
|
displayName: "ProgressBarstyles__Container",
|
|
37
|
-
componentId: "sc-1gqovic-
|
|
38
|
-
})(["width:100%;display:flex;justify-content:center;flex-direction:", "
|
|
39
|
-
return props
|
|
49
|
+
componentId: "sc-1gqovic-8"
|
|
50
|
+
})(["width:100%;display:flex;justify-content:center;flex-direction:", ";", ":last-of-type{border-radius:3px;", ":last-of-type{border-radius:3px;}}", ""], function (props) {
|
|
51
|
+
return props.$inline ? 'row' : 'column';
|
|
40
52
|
}, ProgressWrapper, ProgressBar, function (props) {
|
|
41
|
-
return props
|
|
53
|
+
return props.$steps !== 1 && css(["", ":first-of-type{border-radius:3px 0 0 3px;", ":first-of-type{border-radius:3px 0 0 3px;}}", ":last-of-type{border-radius:0 3px 3px 0;", ":last-of-type{border-radius:0 3px 3px 0;}}"], ProgressWrapper, ProgressBar, ProgressWrapper, ProgressBar);
|
|
42
54
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
var _excluded = ["colors", "label", "tileWidth", "percent"];
|
|
2
2
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
|
-
import { FormFieldLabel } from '@synerise/ds-form-field';
|
|
5
4
|
import * as S from './ProgressTiles.styles';
|
|
6
5
|
var MAX_PERCENT = 100;
|
|
7
6
|
export var ProgressTiles = function ProgressTiles(_ref) {
|
|
@@ -25,9 +24,7 @@ export var ProgressTiles = function ProgressTiles(_ref) {
|
|
|
25
24
|
};
|
|
26
25
|
});
|
|
27
26
|
}, [colors, percent]);
|
|
28
|
-
return /*#__PURE__*/React.createElement(S.TilesWrapper, rest, label && /*#__PURE__*/React.createElement(
|
|
29
|
-
className: "progress-bar-label"
|
|
30
|
-
}, label), /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
return /*#__PURE__*/React.createElement(S.TilesWrapper, rest, label && /*#__PURE__*/React.createElement(S.Label, null, label), /*#__PURE__*/React.createElement("div", {
|
|
31
28
|
className: "progress-bar-wrapper"
|
|
32
29
|
}, getTilesConfig().map(function (tile) {
|
|
33
30
|
return /*#__PURE__*/React.createElement(S.TileContainer, {
|
|
@@ -5,4 +5,5 @@ export declare const TileProgress: import("styled-components").StyledComponent<"
|
|
|
5
5
|
color: string;
|
|
6
6
|
width: string;
|
|
7
7
|
}, never>;
|
|
8
|
+
export declare const Label: import("styled-components").StyledComponent<({ id, label, tooltip, tooltipConfig, children, ...htmlAttributes }: import("@synerise/ds-form-field").FormFieldLabelProps) => React.JSX.Element, any, {}, never>;
|
|
8
9
|
export declare const TilesWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
+
import { FormFieldLabel } from '@synerise/ds-form-field';
|
|
2
3
|
export var TileContainer = styled.div.withConfig({
|
|
3
4
|
displayName: "ProgressTilesstyles__TileContainer",
|
|
4
5
|
componentId: "sc-sod9jl-0"
|
|
@@ -15,7 +16,11 @@ export var TileProgress = styled.div.withConfig({
|
|
|
15
16
|
}, function (props) {
|
|
16
17
|
return props.color;
|
|
17
18
|
});
|
|
19
|
+
export var Label = styled(FormFieldLabel).withConfig({
|
|
20
|
+
displayName: "ProgressTilesstyles__Label",
|
|
21
|
+
componentId: "sc-sod9jl-2"
|
|
22
|
+
})(["margin-bottom:12px;cursor:pointer;"]);
|
|
18
23
|
export var TilesWrapper = styled.div.withConfig({
|
|
19
24
|
displayName: "ProgressTilesstyles__TilesWrapper",
|
|
20
|
-
componentId: "sc-sod9jl-
|
|
21
|
-
})(["width:100%;display:flex;justify-content:center;flex-direction:column;.progress-bar-
|
|
25
|
+
componentId: "sc-sod9jl-3"
|
|
26
|
+
})(["width:100%;display:flex;justify-content:center;flex-direction:column;.progress-bar-wrapper{display:flex;}", ":first-of-type{border-radius:3px 0 0 3px;", ":first-of-type{border-radius:3px 0 0 3px;}}", ":last-of-type{border-radius:0 3px 3px 0;", ":last-of-type{border-radius:0 3px 3px 0;}}"], TileContainer, TileProgress, TileContainer, TileProgress);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-progress-bar",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Progress-Bar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-form-field": "^1.1.
|
|
38
|
+
"@synerise/ds-form-field": "^1.1.20",
|
|
39
39
|
"@synerise/ds-utils": "^1.5.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"react": ">=16.9.0 <= 18.3.1",
|
|
44
44
|
"styled-components": "^5.3.3"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d5bd7fbc9d840ac30e2b79b36c451b486e178445"
|
|
47
47
|
}
|