@widergy/energy-ui 3.57.0 → 3.58.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/UTIcon/README.md +2 -2
- package/dist/components/UTIcon/index.js +4 -1
- package/dist/components/UTMenu/index.js +2 -0
- package/dist/components/UTProductItem/index.js +1 -1
- package/dist/components/UTProductItem/theme.js +1 -0
- package/dist/components/UTStatusMessage/index.js +12 -1
- package/dist/constants/testIds.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.58.1](https://github.com/widergy/energy-ui/compare/v3.58.0...v3.58.1) (2025-02-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* product item discount ([#567](https://github.com/widergy/energy-ui/issues/567)) ([9e5091d](https://github.com/widergy/energy-ui/commit/9e5091db2efaa054e37e1e4718aa28e6880ae019))
|
|
7
|
+
|
|
8
|
+
# [3.58.0](https://github.com/widergy/energy-ui/compare/v3.57.0...v3.58.0) (2025-02-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* [AUT-422] digital bill adherence test ids ([#566](https://github.com/widergy/energy-ui/issues/566)) ([cfcb190](https://github.com/widergy/energy-ui/commit/cfcb1908cc2a3696372754066e2105891f8176ab))
|
|
14
|
+
|
|
1
15
|
# [3.57.0](https://github.com/widergy/energy-ui/compare/v3.56.0...v3.57.0) (2025-01-28)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -10,13 +10,13 @@ The icon name must be with the first letter of each word in uppercase.
|
|
|
10
10
|
|
|
11
11
|
### Props
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
| Name | Description |
|
|
15
|
-
|
|
|
14
|
+
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
15
|
| area | padding around the icon is shown when it is true. (Default: false). |
|
|
17
16
|
| name | The name of the icon in TablerIcons |
|
|
18
17
|
| classname | The classname to aplied to the Icon |
|
|
19
18
|
| colorTheme | The icon color |
|
|
19
|
+
| dataTestId | Icon's data-testid |
|
|
20
20
|
| shade | The icon color shade |
|
|
21
21
|
| size | The icon size in px |
|
|
22
22
|
| variant | It depends on the `area` property and defines whether it should be displayed filled (`default`) or just with a border (`outlined`) around the icon. |
|
|
@@ -21,6 +21,7 @@ const UTIcon = _ref => {
|
|
|
21
21
|
className,
|
|
22
22
|
color,
|
|
23
23
|
colorTheme,
|
|
24
|
+
dataTestId,
|
|
24
25
|
fillShade,
|
|
25
26
|
fillTheme,
|
|
26
27
|
name,
|
|
@@ -51,7 +52,8 @@ const UTIcon = _ref => {
|
|
|
51
52
|
const IconComponent = _constants.ENERGY_ICONS[name] || TablerIcons[name];
|
|
52
53
|
if (!IconComponent) return null;
|
|
53
54
|
return /*#__PURE__*/_react.default.createElement(IconComponent, _extends({
|
|
54
|
-
className: classNames
|
|
55
|
+
className: classNames,
|
|
56
|
+
"data-testid": dataTestId
|
|
55
57
|
}, iconProps));
|
|
56
58
|
};
|
|
57
59
|
UTIcon.propTypes = {
|
|
@@ -63,6 +65,7 @@ UTIcon.propTypes = {
|
|
|
63
65
|
*/
|
|
64
66
|
color: _propTypes.string,
|
|
65
67
|
colorTheme: _propTypes.string,
|
|
68
|
+
dataTestId: _propTypes.string,
|
|
66
69
|
fillShade: _propTypes.string,
|
|
67
70
|
fillTheme: _propTypes.string,
|
|
68
71
|
name: _propTypes.string,
|
|
@@ -119,6 +119,7 @@ const UTMenu = _ref => {
|
|
|
119
119
|
};
|
|
120
120
|
return ItemComponent ? withMenuItem ? /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
|
|
121
121
|
className: "".concat(classes.menuItemContainer, " ").concat(item.menuItemClassName),
|
|
122
|
+
"data-testid": item.dataTestId,
|
|
122
123
|
disabled: item.disabled,
|
|
123
124
|
divider: withDivider && index < lastItem,
|
|
124
125
|
key: item.key,
|
|
@@ -129,6 +130,7 @@ const UTMenu = _ref => {
|
|
|
129
130
|
className: classes.menuItem
|
|
130
131
|
}, itemProps, item)) : /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
|
|
131
132
|
className: "".concat(classes.menuItemContainer, " ").concat(item.menuItemClassName),
|
|
133
|
+
"data-testid": item.dataTestId,
|
|
132
134
|
disabled: item.disabled,
|
|
133
135
|
divider: withDivider && index < lastItem,
|
|
134
136
|
key: item.key,
|
|
@@ -58,7 +58,7 @@ const UTProductItem = _ref => {
|
|
|
58
58
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
59
59
|
colorTheme: "light",
|
|
60
60
|
variant: discountSize
|
|
61
|
-
},
|
|
61
|
+
}, discount)), !!previousAmount && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
62
62
|
colorTheme: "gray",
|
|
63
63
|
className: classes.previousAmount
|
|
64
64
|
}, "$ ".concat(previousAmount))), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
@@ -11,11 +11,18 @@ var _UTIcon = _interopRequireDefault(require("../UTIcon"));
|
|
|
11
11
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
12
12
|
var _UTLoading = _interopRequireDefault(require("../UTLoading"));
|
|
13
13
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
14
|
+
var _testIds = require("../../constants/testIds");
|
|
14
15
|
var _constants = require("./constants");
|
|
15
16
|
var _theme = require("./theme");
|
|
16
17
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
|
+
const {
|
|
21
|
+
descriptionId,
|
|
22
|
+
helpTextId,
|
|
23
|
+
iconId,
|
|
24
|
+
titleId
|
|
25
|
+
} = _testIds.COMPONENT_IDS.statusMessageIds;
|
|
19
26
|
const UTStatusMessage = _ref => {
|
|
20
27
|
let {
|
|
21
28
|
children,
|
|
@@ -50,22 +57,26 @@ const UTStatusMessage = _ref => {
|
|
|
50
57
|
className: classes.iconContainer
|
|
51
58
|
}, /*#__PURE__*/_react.default.createElement(_UTIcon.default, _extends({
|
|
52
59
|
name: icon,
|
|
53
|
-
colorTheme: _constants.ICON_COLOR_THEMES[colorTheme]
|
|
60
|
+
colorTheme: _constants.ICON_COLOR_THEMES[colorTheme],
|
|
61
|
+
dataTestId: iconId
|
|
54
62
|
}, iconProps)))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
63
|
className: "".concat(_stylesModule.default.content, " ").concat(classes.content)
|
|
56
64
|
}, (title || description || helpText) && /*#__PURE__*/_react.default.createElement("div", {
|
|
57
65
|
className: _stylesModule.default.section
|
|
58
66
|
}, title && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
59
67
|
className: _stylesModule.default.label,
|
|
68
|
+
dataTestId: titleId,
|
|
60
69
|
variant: "title3",
|
|
61
70
|
weight: "medium"
|
|
62
71
|
}, titleProps), title), description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
63
72
|
className: _stylesModule.default.label,
|
|
64
73
|
colorTheme: "gray",
|
|
74
|
+
dataTestId: descriptionId,
|
|
65
75
|
variant: "body"
|
|
66
76
|
}, descriptionProps), description), helpText && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
67
77
|
className: _stylesModule.default.label,
|
|
68
78
|
colorTheme: "gray",
|
|
79
|
+
dataTestId: helpTextId,
|
|
69
80
|
variant: "small"
|
|
70
81
|
}, helpTextProps), helpText)), children, (primaryAction || secondaryAction) && /*#__PURE__*/_react.default.createElement("div", {
|
|
71
82
|
className: _stylesModule.default.section
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TABLE_ROW = exports.TABLE = exports.SELECTION_COMPONENT = exports.HEADER = exports.COMPONENT_IDS = exports.CELL = exports.ACTIONS = void 0;
|
|
6
|
+
exports.TABLE_ROW = exports.TABLE = exports.STATUS_MESSAGE = exports.SELECTION_COMPONENT = exports.HEADER = exports.COMPONENT_IDS = exports.CELL = exports.ACTIONS = void 0;
|
|
7
7
|
const BOTTOM_NAV = 'bottomNav';
|
|
8
8
|
const DIALOG = 'dialog';
|
|
9
9
|
const WORKFLOW_CONTAINER = 'workflowContainer';
|
|
@@ -11,6 +11,7 @@ const ACTIONS = exports.ACTIONS = 'actions';
|
|
|
11
11
|
const CELL = exports.CELL = 'cell';
|
|
12
12
|
const HEADER = exports.HEADER = 'header';
|
|
13
13
|
const SELECTION_COMPONENT = exports.SELECTION_COMPONENT = 'selectionComponent';
|
|
14
|
+
const STATUS_MESSAGE = exports.STATUS_MESSAGE = 'statusMessage';
|
|
14
15
|
const TABLE = exports.TABLE = 'table';
|
|
15
16
|
const TABLE_ROW = exports.TABLE_ROW = 'tableRow';
|
|
16
17
|
const COMPONENT_IDS = exports.COMPONENT_IDS = {
|
|
@@ -27,6 +28,12 @@ const COMPONENT_IDS = exports.COMPONENT_IDS = {
|
|
|
27
28
|
closeButtonId: 'snackbar.closeButton',
|
|
28
29
|
labelId: 'snackbar.label'
|
|
29
30
|
},
|
|
31
|
+
statusMessageIds: {
|
|
32
|
+
descriptionId: "".concat(STATUS_MESSAGE, ".description"),
|
|
33
|
+
helpTextId: "".concat(STATUS_MESSAGE, ".helperText"),
|
|
34
|
+
iconId: "".concat(STATUS_MESSAGE, ".icon"),
|
|
35
|
+
titleId: "".concat(STATUS_MESSAGE, ".title")
|
|
36
|
+
},
|
|
30
37
|
tableIds: {
|
|
31
38
|
actionsId: "".concat(TABLE, ".actions"),
|
|
32
39
|
cellId: "".concat(TABLE, ".tableRow.cell"),
|