cozy-ui 138.11.0 → 138.12.0

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
@@ -1,3 +1,10 @@
1
+ # [138.12.0](https://github.com/cozy/cozy-ui/compare/v138.11.0...v138.12.0) (2026-05-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * Allow to customize background color of ProgressionBanner component ([91b5cee](https://github.com/cozy/cozy-ui/commit/91b5cee))
7
+
1
8
  # [138.11.0](https://github.com/cozy/cozy-ui/compare/v138.10.0...v138.11.0) (2026-05-07)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "138.11.0",
3
+ "version": "138.12.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -12,7 +12,7 @@ import { BreakpointsProvider } from "cozy-ui/transpiled/react/providers/Breakpoi
12
12
  const { progression } = useProgression();
13
13
 
14
14
  const initialVariants = [
15
- { withValue: true, progressBar: true, withButton: false },
15
+ { withValue: true, progressBar: true, withButton: false, customColor: false },
16
16
  ];
17
17
 
18
18
  <BreakpointsProvider>
@@ -21,6 +21,7 @@ const initialVariants = [
21
21
  <ProgressionBanner
22
22
  progressBar={variant.progressBar}
23
23
  value={variant.withValue && progression}
24
+ color={variant.customColor ? 'var(--errorColorLight)': undefined}
24
25
  text={
25
26
  variant.withButton
26
27
  ? "Storage limit nearly reached"
@@ -19,7 +19,7 @@ const styles = () => ({
19
19
  })
20
20
 
21
21
  const ProgressionBanner = withStyles(styles)(
22
- ({ classes, value, text, icon, button, progressBar }) => {
22
+ ({ classes, value, text, icon, button, progressBar, color }) => {
23
23
  const variant = value ? 'determinate' : undefined
24
24
  const { isMobile } = useBreakpoints()
25
25
 
@@ -32,7 +32,7 @@ const ProgressionBanner = withStyles(styles)(
32
32
  <>
33
33
  <Alert
34
34
  icon={_icon}
35
- color="var(--contrastBackgroundColor)"
35
+ color={color}
36
36
  square
37
37
  block={isMobile}
38
38
  action={button}
@@ -63,11 +63,14 @@ ProgressionBanner.propTypes = {
63
63
  /** Button to use in the banner */
64
64
  button: PropTypes.node,
65
65
  /** Progression bar is hidden if set to false (defaults to true) */
66
- progressBar: PropTypes.bool
66
+ progressBar: PropTypes.bool,
67
+ /** Background color of the banner, css color */
68
+ color: PropTypes.string
67
69
  }
68
70
 
69
71
  ProgressionBanner.defaultProps = {
70
- progressBar: true
72
+ progressBar: true,
73
+ color: 'var(--contrastBackgroundColor)'
71
74
  }
72
75
 
73
76
  export default ProgressionBanner
@@ -30,7 +30,8 @@ var ProgressionBanner = withStyles(styles)(function (_ref) {
30
30
  text = _ref.text,
31
31
  icon = _ref.icon,
32
32
  button = _ref.button,
33
- progressBar = _ref.progressBar;
33
+ progressBar = _ref.progressBar,
34
+ color = _ref.color;
34
35
  var variant = value ? 'determinate' : undefined;
35
36
 
36
37
  var _useBreakpoints = useBreakpoints(),
@@ -46,7 +47,7 @@ var ProgressionBanner = withStyles(styles)(function (_ref) {
46
47
 
47
48
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Alert, {
48
49
  icon: _icon,
49
- color: "var(--contrastBackgroundColor)",
50
+ color: color,
50
51
  square: true,
51
52
  block: isMobile,
52
53
  action: button
@@ -73,9 +74,13 @@ ProgressionBanner.propTypes = {
73
74
  button: PropTypes.node,
74
75
 
75
76
  /** Progression bar is hidden if set to false (defaults to true) */
76
- progressBar: PropTypes.bool
77
+ progressBar: PropTypes.bool,
78
+
79
+ /** Background color of the banner, css color */
80
+ color: PropTypes.string
77
81
  };
78
82
  ProgressionBanner.defaultProps = {
79
- progressBar: true
83
+ progressBar: true,
84
+ color: 'var(--contrastBackgroundColor)'
80
85
  };
81
86
  export default ProgressionBanner;