@widergy/energy-ui 3.98.3 → 3.99.0
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.99.0](https://github.com/widergy/energy-ui/compare/v3.98.3...v3.99.0) (2025-08-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [EVEP2-10] add label in button ([#657](https://github.com/widergy/energy-ui/issues/657)) ([88a8a74](https://github.com/widergy/energy-ui/commit/88a8a74ac492c9c334d49255b856361382036f42))
|
|
7
|
+
|
|
1
8
|
## [3.98.3](https://github.com/widergy/energy-ui/compare/v3.98.2...v3.98.3) (2025-08-13)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -6,6 +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 _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
|
|
9
10
|
var _UTButton = _interopRequireDefault(require("../../../UTButton"));
|
|
10
11
|
var _constants = require("../../constants");
|
|
11
12
|
var _constants2 = require("./constants");
|
|
@@ -21,7 +22,7 @@ const BottomActions = _ref => {
|
|
|
21
22
|
const type = actions.length > 2 ? _constants.ACTION_TYPES.REDIRECTION : bottomActionsVariant || _constants.ACTION_TYPES.DEFAULT;
|
|
22
23
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
24
|
className: _stylesModule.default.actionsContainer
|
|
24
|
-
}, actions.map(_ref2 => {
|
|
25
|
+
}, actions.map((_ref2, index) => {
|
|
25
26
|
let {
|
|
26
27
|
colorTheme = 'primary',
|
|
27
28
|
dataTestId,
|
|
@@ -31,7 +32,9 @@ const BottomActions = _ref => {
|
|
|
31
32
|
loading,
|
|
32
33
|
onClick
|
|
33
34
|
} = _ref2;
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
36
|
+
key: label
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
35
38
|
classNames: {
|
|
36
39
|
childrenContainer: "".concat(type === _constants.ACTION_TYPES.REDIRECTION && _stylesModule.default.redirectionChildrenContainer, " "),
|
|
37
40
|
root: "".concat(_stylesModule.default.actionButton, " ").concat(type === _constants.ACTION_TYPES.REDIRECTION && _stylesModule.default.fullWidth, " ").concat(size === _constants.SIZES.MEDIUM && _stylesModule.default.mediumPadding),
|
|
@@ -42,12 +45,13 @@ const BottomActions = _ref => {
|
|
|
42
45
|
disabled: disabled,
|
|
43
46
|
Icon: type === _constants.ACTION_TYPES.REDIRECTION ? Icon || _constants2.DEFAULT_REDIRECTION_ICON : Icon,
|
|
44
47
|
iconPlacement: type === _constants.ACTION_TYPES.REDIRECTION ? 'right' : 'left',
|
|
45
|
-
key: label,
|
|
46
48
|
loading: loading,
|
|
47
49
|
onClick: onClick,
|
|
48
50
|
size: "large",
|
|
49
51
|
variant: "text"
|
|
50
|
-
}, label)
|
|
52
|
+
}, label), actions.length > 1 && index < actions.length - 1 && /*#__PURE__*/_react.default.createElement(_Divider.default, {
|
|
53
|
+
className: _stylesModule.default.divider
|
|
54
|
+
}));
|
|
51
55
|
}));
|
|
52
56
|
};
|
|
53
57
|
BottomActions.propTypes = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
$default-border-color: #
|
|
1
|
+
$default-border-color: #e7e7e7;
|
|
2
2
|
|
|
3
3
|
.actionsContainer {
|
|
4
4
|
border-top: 1px solid var(--light04, $default-border-color);
|
|
@@ -18,6 +18,11 @@ $default-border-color: #E7E7E7;
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.divider {
|
|
22
|
+
background-color: var(--light04, $default-border-color);
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
.redirectionText {
|
|
22
27
|
align-items: center;
|
|
23
28
|
display: flex;
|
|
@@ -64,7 +64,7 @@ const HeaderActions = _ref => {
|
|
|
64
64
|
},
|
|
65
65
|
size: "medium",
|
|
66
66
|
variant: "text"
|
|
67
|
-
}))))), !(0, _isEmpty.default)(secondaryActions) && (!showButtonGroup ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_UTMenu.default, {
|
|
67
|
+
}), buttonProps.title)))), !(0, _isEmpty.default)(secondaryActions) && (!showButtonGroup ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_UTMenu.default, {
|
|
68
68
|
anchor: menu,
|
|
69
69
|
iconBefore: true,
|
|
70
70
|
items: secondaryActions,
|
|
@@ -109,6 +109,7 @@ HeaderActions.propTypes = {
|
|
|
109
109
|
Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
|
|
110
110
|
id: (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.string]),
|
|
111
111
|
isPrimary: _propTypes.bool,
|
|
112
|
+
title: _propTypes.string,
|
|
112
113
|
label: _propTypes.string,
|
|
113
114
|
loading: _propTypes.bool,
|
|
114
115
|
onClick: _propTypes.func,
|