@widergy/energy-ui 3.107.0 → 3.107.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.107.2](https://github.com/widergy/energy-ui/compare/v3.107.1...v3.107.2) (2025-10-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* [AXCH-805] badge visual fixes ([#694](https://github.com/widergy/energy-ui/issues/694)) ([5e964f1](https://github.com/widergy/energy-ui/commit/5e964f153da2a26912d8e2c7cd4244c5c50f70ce))
|
|
7
|
+
|
|
8
|
+
## [3.107.1](https://github.com/widergy/energy-ui/compare/v3.107.0...v3.107.1) (2025-10-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* kpi palette import ([#695](https://github.com/widergy/energy-ui/issues/695)) ([817bae9](https://github.com/widergy/energy-ui/commit/817bae9f08ff9f1b911478a9eff9c72841516682))
|
|
14
|
+
|
|
1
15
|
# [3.107.0](https://github.com/widergy/energy-ui/compare/v3.106.0...v3.107.0) (2025-09-30)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -37,7 +37,7 @@ const UTBadge = _ref => {
|
|
|
37
37
|
componentProps: {}
|
|
38
38
|
};
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
40
|
-
className: "".concat(classes.root, " ").concat(className)
|
|
40
|
+
className: "".concat(classes.root, " ").concat(className || '')
|
|
41
41
|
}, componentProps), children);
|
|
42
42
|
};
|
|
43
43
|
UTBadge.defaultProps = _constants.DEFAULT_PROPS;
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.variantsColorTheme = exports.retrieveStyle = void 0;
|
|
7
7
|
var _componentUtils = require("../../utils/componentUtils");
|
|
8
8
|
var _constants = require("./constants");
|
|
9
|
-
const variantsColorTheme = (theme, colorTheme) => {
|
|
9
|
+
const variantsColorTheme = (theme, colorTheme, shade) => {
|
|
10
10
|
var _theme$Palette$action;
|
|
11
11
|
const colorThemeDefinition = theme.Palette[colorTheme] || ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[colorTheme]) || theme.Palette[_constants.DEFAULT_PROPS.colorTheme];
|
|
12
12
|
const colorShade = (0, _componentUtils.getDefaultColorShade)(colorTheme);
|
|
13
|
+
const backgroundColor = colorThemeDefinition[shade] || colorThemeDefinition[colorShade];
|
|
13
14
|
return {
|
|
14
|
-
backgroundColor
|
|
15
|
+
backgroundColor
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
exports.variantsColorTheme = variantsColorTheme;
|
|
@@ -29,20 +30,21 @@ const baseButtonTheme = () => ({
|
|
|
29
30
|
},
|
|
30
31
|
text: {
|
|
31
32
|
height: '20px',
|
|
32
|
-
width: '20px',
|
|
33
33
|
padding: '0 6px',
|
|
34
|
-
textAlign: 'center'
|
|
34
|
+
textAlign: 'center',
|
|
35
|
+
width: 'fit-content'
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
const retrieveStyle = _ref => {
|
|
38
39
|
let {
|
|
39
40
|
theme,
|
|
40
41
|
colorTheme,
|
|
41
|
-
children
|
|
42
|
+
children,
|
|
43
|
+
shade
|
|
42
44
|
} = _ref;
|
|
43
45
|
const baseTheme = baseButtonTheme();
|
|
44
46
|
const textTheme = (0, _componentUtils.valueExists)(children) ? baseTheme.text : {};
|
|
45
|
-
const variantTheme = variantsColorTheme(theme, colorTheme);
|
|
47
|
+
const variantTheme = variantsColorTheme(theme, colorTheme, shade);
|
|
46
48
|
return {
|
|
47
49
|
root: {
|
|
48
50
|
...baseTheme.root,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
|
-
var _classesUtils = require("
|
|
9
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
10
10
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
11
11
|
var _UTStatus = _interopRequireDefault(require("../UTStatus"));
|
|
12
12
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
@@ -25,6 +25,7 @@ const UTModal = _ref => {
|
|
|
25
25
|
classes: themeClasses,
|
|
26
26
|
classNames,
|
|
27
27
|
description,
|
|
28
|
+
descriptionProps = {},
|
|
28
29
|
handleClickAway,
|
|
29
30
|
isOpen,
|
|
30
31
|
primaryAction,
|
|
@@ -56,9 +57,9 @@ const UTModal = _ref => {
|
|
|
56
57
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
57
58
|
variant: "title3",
|
|
58
59
|
weight: "medium"
|
|
59
|
-
}, title), description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
60
|
+
}, title), description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
60
61
|
colorTheme: "gray"
|
|
61
|
-
}, description)), children && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
+
}, descriptionProps), description)), children && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
63
|
className: "".concat(_stylesModule.default.body, " ").concat(!removeBodyPadding && _stylesModule.default.bodyPadding)
|
|
63
64
|
}, children), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
65
|
className: "\n ".concat(_stylesModule.default.actions, "\n ").concat(classes.actions, "\n ").concat(withSecondaryActions && _stylesModule.default.withSecondaryActions, "\n ")
|
|
@@ -83,6 +84,7 @@ UTModal.propTypes = {
|
|
|
83
84
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
84
85
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
85
86
|
description: _propTypes.string,
|
|
87
|
+
descriptionProps: _propTypes.object,
|
|
86
88
|
handleClickAway: _propTypes.func,
|
|
87
89
|
isOpen: _propTypes.bool,
|
|
88
90
|
primaryAction: (0, _propTypes.shape)({
|