@widergy/energy-ui 3.44.0 → 3.44.2

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,17 @@
1
+ ## [3.44.2](https://github.com/widergy/energy-ui/compare/v3.44.1...v3.44.2) (2024-11-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fixed useState render bug ([#533](https://github.com/widergy/energy-ui/issues/533)) ([045671d](https://github.com/widergy/energy-ui/commit/045671db42c03f8c82739dab5c90b85c37ddb233))
7
+
8
+ ## [3.44.1](https://github.com/widergy/energy-ui/compare/v3.44.0...v3.44.1) (2024-11-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * checkbox on change ([#534](https://github.com/widergy/energy-ui/issues/534)) ([ec5d7a2](https://github.com/widergy/energy-ui/commit/ec5d7a268094f7a36f49903ad4449bf5f1565411))
14
+
1
15
  # [3.44.0](https://github.com/widergy/energy-ui/compare/v3.43.0...v3.44.0) (2024-11-22)
2
16
 
3
17
 
@@ -83,12 +83,10 @@ const Bars = _ref => {
83
83
  const yInitialPosition = yAxis(value);
84
84
  const selectorWidth = fullSizeBars ? groupWidth - graphXStart : barWidth * groups + highlightSpacing * groups;
85
85
  const selectorPosition = fullSizeBars ? graphXStart : xAxis(index) + xSubAxis(0) - highlightSpacing / 2;
86
- (0, _react.useEffect)(() => {
87
- barRef.current = {
88
- width: selectorWidth,
89
- position: selectorPosition
90
- };
91
- }, [barWidth, groups, highlightSpacing, borderSelector === null || borderSelector === void 0 ? void 0 : borderSelector.widthOffset]);
86
+ barRef.current = {
87
+ width: selectorWidth,
88
+ position: selectorPosition
89
+ };
92
90
  return /*#__PURE__*/_react.default.createElement("g", null, (highlighted || selected) && /*#__PURE__*/_react.default.createElement(_Bar.default, {
93
91
  bar: bar,
94
92
  width: barWidth + 2 * highlightSpacing,
@@ -36,7 +36,7 @@ const UTCheckbox = _ref => {
36
36
  const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(theme, classNames), [classNames, theme]);
37
37
  const iconName = (0, _react.useMemo)(() => indeterminate ? _constants.INDETERMINATE_ICON : value === true ? _constants.CHECKED_ICON : '', [indeterminate, value]);
38
38
  const handlePress = (0, _react.useCallback)(() => {
39
- if (!disabled && onChange) onChange(value === false);
39
+ if (!disabled && onChange) onChange(value);
40
40
  }, [disabled, onChange, value]);
41
41
  const shouldHighlightLabel = value === true && variant === _constants.BUTTON_VARIANT;
42
42
  const touchableProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.44.0",
3
+ "version": "3.44.2",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",