@widergy/energy-ui 3.141.3 → 3.141.4

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
+ ## [3.141.4](https://github.com/widergy/energy-ui/compare/v3.141.3...v3.141.4) (2026-04-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix sidebar ([#775](https://github.com/widergy/energy-ui/issues/775)) ([2535e64](https://github.com/widergy/energy-ui/commit/2535e64fa0b75a5bcfe9bbc61896a38f63ad597e))
7
+
1
8
  ## [3.141.3](https://github.com/widergy/energy-ui/compare/v3.141.2...v3.141.3) (2026-04-13)
2
9
 
3
10
 
@@ -38,8 +38,13 @@ const ListOption = _ref => {
38
38
  } else setOpenMenu(!openMenu);
39
39
  };
40
40
  const optionHeight = (0, _react.useMemo)(() => {
41
- var _optionRef$current;
42
- return openMenu && open ? options.length * (optionRef === null || optionRef === void 0 || (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.clientHeight) : 0;
41
+ if (!openMenu || !open || !(optionRef !== null && optionRef !== void 0 && optionRef.current)) return 0;
42
+ const {
43
+ marginTop,
44
+ marginBottom
45
+ } = window.getComputedStyle(optionRef.current);
46
+ const margin = parseFloat(marginTop) + parseFloat(marginBottom);
47
+ return options.length * (optionRef.current.clientHeight + margin);
43
48
  }, [openMenu, open]);
44
49
  const hasSelectedItem = (0, _react.useMemo)(() => options.some(opt => opt.link === location), [location, options]);
45
50
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Option.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.141.3",
3
+ "version": "3.141.4",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",