@widergy/energy-ui 3.18.1 → 3.18.3

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.18.3](https://github.com/widergy/energy-ui/compare/v3.18.2...v3.18.3) (2024-08-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * dynamic margins ([#482](https://github.com/widergy/energy-ui/issues/482)) ([f8c37af](https://github.com/widergy/energy-ui/commit/f8c37afe45efde531b05b4e2a0344a139ecd822e))
7
+
8
+ ## [3.18.2](https://github.com/widergy/energy-ui/compare/v3.18.1...v3.18.2) (2024-08-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * minor fix ([#481](https://github.com/widergy/energy-ui/issues/481)) ([a5d456e](https://github.com/widergy/energy-ui/commit/a5d456e9b89148c03126f1437c432da098457b19))
14
+
1
15
  ## [3.18.1](https://github.com/widergy/energy-ui/compare/v3.18.0...v3.18.1) (2024-08-26)
2
16
 
3
17
 
@@ -21,11 +21,11 @@ const useDynamicMargins = (center, options) => {
21
21
  const marginBottomRef = (0, _react.useRef)();
22
22
  const marginTopRef = (0, _react.useRef)();
23
23
  (0, _react.useEffect)(() => {
24
- setMarginLeft(Math.ceil(marginLeftRef.current?.getBoundingClientRect().width) || lateralMargin || LATERAL_DEFAULT_MARGIN);
25
- setMarginRight(Math.ceil(marginRightRef.current?.getBoundingClientRect().width) || lateralMargin || LATERAL_DEFAULT_MARGIN);
26
- setMarginBottom(Math.ceil(marginBottomRef.current?.getBoundingClientRect().height) || verticalMargin || VERTICAL_DEFAULT_MARGIN);
27
- setMarginTop(Math.ceil(marginTopRef.current?.getBoundingClientRect().height) || verticalMargin || VERTICAL_DEFAULT_MARGIN);
28
- }, []);
24
+ setMarginLeft(Math.ceil(lateralMargin || marginLeftRef.current?.getBoundingClientRect().width) || LATERAL_DEFAULT_MARGIN);
25
+ setMarginRight(Math.ceil(lateralMargin || marginRightRef.current?.getBoundingClientRect().width) || LATERAL_DEFAULT_MARGIN);
26
+ setMarginBottom(Math.ceil(verticalMargin || marginBottomRef.current?.getBoundingClientRect().height) || VERTICAL_DEFAULT_MARGIN);
27
+ setMarginTop(Math.ceil(verticalMargin || marginTopRef.current?.getBoundingClientRect().height) || VERTICAL_DEFAULT_MARGIN);
28
+ }, [marginLeftRef.current, marginRightRef.current, marginBottomRef.current, marginTopRef.current]);
29
29
  return {
30
30
  marginLeftRef,
31
31
  marginRightRef,
@@ -70,7 +70,7 @@ const UTButton = _ref => {
70
70
  className: `
71
71
  ${_stylesModule.default[`padding${(0, _componentUtils.capitalize)(size)}`]}
72
72
  ${hideTextOnResponsive && _stylesModule.default.hideTextOnResponsive}
73
- ${!hideTextOnResponsive && !children && _stylesModule.default.noChildren}}
73
+ ${!hideTextOnResponsive && !children && _stylesModule.default.noChildren}
74
74
  `,
75
75
  "data-testid": dataTestId,
76
76
  disabled: disabled || loading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.18.1",
3
+ "version": "3.18.3",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",