@widergy/energy-ui 3.78.0 → 3.79.1
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 +14 -0
- package/dist/components/UTDocumentWizard/components/SectionDetails/index.js +2 -1
- package/dist/components/UTDocumentWizard/components/Sheet/index.js +2 -1
- package/dist/components/UTFieldLabel/index.js +3 -2
- package/dist/components/UTLabel/index.js +2 -1
- package/dist/components/UTLabel/utils.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.79.1](https://github.com/widergy/energy-ui/compare/v3.79.0...v3.79.1) (2025-05-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* break lines markdown utlabel fixes ([#620](https://github.com/widergy/energy-ui/issues/620)) ([a59708e](https://github.com/widergy/energy-ui/commit/a59708e7ca209ca5661792b9687659b946223043))
|
|
7
|
+
|
|
8
|
+
# [3.79.0](https://github.com/widergy/energy-ui/compare/v3.78.0...v3.79.0) (2025-05-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* UTFieldLabel stringContentProps for tooltip ([#617](https://github.com/widergy/energy-ui/issues/617)) ([27a5faa](https://github.com/widergy/energy-ui/commit/27a5faa642459ee377e13890b1ed53f125797255))
|
|
14
|
+
|
|
1
15
|
# [3.78.0](https://github.com/widergy/energy-ui/compare/v3.77.0...v3.78.0) (2025-05-14)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -43,7 +43,8 @@ const SectionDetails = _ref => {
|
|
|
43
43
|
className: _stylesModule.default.title,
|
|
44
44
|
variant: "title3"
|
|
45
45
|
}, title), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
46
|
-
variant: "body"
|
|
46
|
+
variant: "body",
|
|
47
|
+
withMarkdown: true
|
|
47
48
|
}, description));
|
|
48
49
|
};
|
|
49
50
|
SectionDetails.propTypes = {
|
|
@@ -44,7 +44,7 @@ const UTFieldLabel = _ref => {
|
|
|
44
44
|
}, _constants.REQUIRED_LABEL)), !(0, _isEmpty.default)(actions) && (0, _isArray.default)(actions) && /*#__PURE__*/_react.default.createElement("div", {
|
|
45
45
|
className: _stylesModule.default.actionsContainer
|
|
46
46
|
}, actions.map(action => {
|
|
47
|
-
var _action$title;
|
|
47
|
+
var _action$title, _action$tooltipProps;
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
49
49
|
arrow: false,
|
|
50
50
|
key: "".concat((_action$title = action.title) !== null && _action$title !== void 0 ? _action$title : action.Icon),
|
|
@@ -52,7 +52,8 @@ const UTFieldLabel = _ref => {
|
|
|
52
52
|
appendTo: () => document.body,
|
|
53
53
|
interactive: false
|
|
54
54
|
},
|
|
55
|
-
content: action.tooltip
|
|
55
|
+
content: action.tooltip,
|
|
56
|
+
stringContentProps: action === null || action === void 0 || (_action$tooltipProps = action.tooltipProps) === null || _action$tooltipProps === void 0 ? void 0 : _action$tooltipProps.stringContentProps
|
|
56
57
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_UTButton.default, action, action.title)));
|
|
57
58
|
})));
|
|
58
59
|
};
|
|
@@ -15,6 +15,7 @@ var _UTSkeleton = _interopRequireDefault(require("../UTSkeleton"));
|
|
|
15
15
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
16
16
|
var _constants = require("./constants");
|
|
17
17
|
var _theme = require("./theme");
|
|
18
|
+
var _utils = require("./utils");
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
21
|
/* eslint-disable react/no-children-prop */
|
|
@@ -40,7 +41,7 @@ const UTLabel = _ref => {
|
|
|
40
41
|
"data-testid": dataTestId,
|
|
41
42
|
title: title
|
|
42
43
|
}, withMarkdown && /*#__PURE__*/_react.default.createElement(_reactMarkdown.default, {
|
|
43
|
-
children: children,
|
|
44
|
+
children: (0, _utils.markdownFormat)(children),
|
|
44
45
|
components: markdownRenderers,
|
|
45
46
|
disallowedElements: ['p', 'blockquote'],
|
|
46
47
|
rehypePlugins: [_rehypeRaw.default],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.markdownFormat = void 0;
|
|
7
|
+
const markdownFormat = content => content === null || content === void 0 ? void 0 : content.toString().replace(/\r\n|\r/g, '\n').replace(/\n+/g, match => {
|
|
8
|
+
const count = match.length;
|
|
9
|
+
return "".concat('<br>'.repeat(count));
|
|
10
|
+
});
|
|
11
|
+
exports.markdownFormat = markdownFormat;
|