@janiscommerce/ui-web 1.1.0 → 1.2.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
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.0] - 2025-10-16
11
+
12
+ ### Changed
13
+
14
+ - Validations for valid values in Progress bar
15
+
10
16
  ## [1.1.0] - 2025-10-08
11
17
 
12
18
  ### Added
package/dist/index.esm.js CHANGED
@@ -35745,7 +35745,11 @@ var styled = {
35745
35745
  };
35746
35746
 
35747
35747
  var isValidValue = function isValidValue(value) {
35748
- return !!value && isNumber(value) && value > 0;
35748
+ return isNumber(value) && value >= 0;
35749
+ };
35750
+
35751
+ var isValidMaxValue = function isValidMaxValue(maxValue) {
35752
+ return isNumber(maxValue) && maxValue > 0;
35749
35753
  };
35750
35754
 
35751
35755
  var ProgressBar = function ProgressBar(_ref) {
@@ -35760,7 +35764,7 @@ var ProgressBar = function ProgressBar(_ref) {
35760
35764
  height = _ref$height === void 0 ? 16 : _ref$height,
35761
35765
  _ref$color = _ref.color,
35762
35766
  color = _ref$color === void 0 ? 'blue' : _ref$color;
35763
- if (!isValidValue(value) || !isValidValue(maxValue) || value > maxValue) return null;
35767
+ if (!isValidValue(value) || !isValidMaxValue(maxValue) || value > maxValue) return null;
35764
35768
  var progress = Math.max(0, Math.min(maxValue, value));
35765
35769
  return /*#__PURE__*/React__default.createElement(styled.Bar, {
35766
35770
  height: height,