@widergy/energy-ui 3.60.0 → 3.60.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.60.2](https://github.com/widergy/energy-ui/compare/v3.60.1...v3.60.2) (2025-02-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * help text ([#579](https://github.com/widergy/energy-ui/issues/579)) ([720079e](https://github.com/widergy/energy-ui/commit/720079eb728afe1c2b197d953c5337549b7ac212))
7
+
8
+ ## [3.60.1](https://github.com/widergy/energy-ui/compare/v3.60.0...v3.60.1) (2025-02-17)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [UGENSA-1292] consumption history visual errors ([#576](https://github.com/widergy/energy-ui/issues/576)) ([51c379d](https://github.com/widergy/energy-ui/commit/51c379d81d2fea944acde70ce91e98aadf26ae6a))
14
+
1
15
  # [3.60.0](https://github.com/widergy/energy-ui/compare/v3.59.3...v3.60.0) (2025-02-13)
2
16
 
3
17
 
@@ -13,7 +13,7 @@ const useDynamicMargins = (center, options) => {
13
13
  const [marginBottom, setMarginBottom] = (0, _react.useState)(0);
14
14
  const [marginTop, setMarginTop] = (0, _react.useState)(0);
15
15
  const {
16
- lateralMargin,
16
+ lateralMargin = 0,
17
17
  verticalMargin
18
18
  } = options;
19
19
  const marginLeftRef = (0, _react.useRef)();
@@ -22,7 +22,7 @@ const useDynamicMargins = (center, options) => {
22
22
  const marginTopRef = (0, _react.useRef)();
23
23
  (0, _react.useEffect)(() => {
24
24
  var _marginLeftRef$curren, _marginRightRef$curre, _marginBottomRef$curr, _marginTopRef$current;
25
- setMarginLeft(Math.ceil(lateralMargin || ((_marginLeftRef$curren = marginLeftRef.current) === null || _marginLeftRef$curren === void 0 ? void 0 : _marginLeftRef$curren.getBoundingClientRect().width)) || LATERAL_DEFAULT_MARGIN);
25
+ setMarginLeft(Math.ceil(Math.max(lateralMargin, (_marginLeftRef$curren = marginLeftRef.current) === null || _marginLeftRef$curren === void 0 ? void 0 : _marginLeftRef$curren.getBoundingClientRect().width)) || LATERAL_DEFAULT_MARGIN);
26
26
  setMarginRight(Math.ceil(lateralMargin || ((_marginRightRef$curre = marginRightRef.current) === null || _marginRightRef$curre === void 0 ? void 0 : _marginRightRef$curre.getBoundingClientRect().width)) || LATERAL_DEFAULT_MARGIN);
27
27
  setMarginBottom(Math.ceil(verticalMargin || ((_marginBottomRef$curr = marginBottomRef.current) === null || _marginBottomRef$curr === void 0 ? void 0 : _marginBottomRef$curr.getBoundingClientRect().height)) || VERTICAL_DEFAULT_MARGIN);
28
28
  setMarginTop(Math.ceil(verticalMargin || ((_marginTopRef$current = marginTopRef.current) === null || _marginTopRef$current === void 0 ? void 0 : _marginTopRef$current.getBoundingClientRect().height)) || VERTICAL_DEFAULT_MARGIN);
@@ -40,7 +40,8 @@ const UTTextArea = _ref => {
40
40
  icon,
41
41
  textarea,
42
42
  label,
43
- textAreaContainer
43
+ textAreaContainer,
44
+ componentWrapper
44
45
  } = classNames;
45
46
  const {
46
47
  character_count_limit: characterCountLimit
@@ -61,7 +62,7 @@ const UTTextArea = _ref => {
61
62
  }, title)), /*#__PURE__*/_react.default.createElement("div", {
62
63
  className: "".concat(_stylesModule.default.textAreaContainer, " ").concat(textAreaContainer)
63
64
  }, /*#__PURE__*/_react.default.createElement("div", {
64
- className: _stylesModule.default.componentWrapper
65
+ className: "".concat(_stylesModule.default.componentWrapper, " ").concat(componentWrapper)
65
66
  }, /*#__PURE__*/_react.default.createElement("textarea", _extends({}, inputProps, {
66
67
  className: "".concat(_stylesModule.default.textarea, " ").concat(textarea, " ").concat(classes.textarea),
67
68
  "data-testid": dataTestId,
@@ -137,9 +137,11 @@ const UTTextInput = _ref => {
137
137
  type: type,
138
138
  value: value
139
139
  }), helpText && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
140
+ className: _stylesModule.default.textHelp,
140
141
  colorTheme: "gray",
141
142
  dataTestId: helperTextDataTestId,
142
- variant: "small"
143
+ variant: "small",
144
+ withMarkdown: true
143
145
  }, helpText), validationData && /*#__PURE__*/_react.default.createElement(_UTValidation.default, {
144
146
  dataTestId: validationDataTestId,
145
147
  validationData: validationData
@@ -3,3 +3,7 @@
3
3
  flex-direction: column;
4
4
  grid-gap: 8px;
5
5
  }
6
+
7
+ .textHelp {
8
+ text-align: left;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.60.0",
3
+ "version": "3.60.2",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",