@widergy/energy-ui 3.52.1 → 3.53.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 +7 -0
- package/dist/components/UTBreadcrumbs/index.js +2 -2
- package/dist/components/UTCheckbox/versions/V1/README.md +15 -13
- package/dist/components/UTCheckbox/versions/V1/index.js +4 -1
- package/dist/components/UTValidation/README.md +1 -0
- package/dist/components/UTValidation/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.53.0](https://github.com/widergy/energy-ui/compare/v3.52.1...v3.53.0) (2025-01-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [AUT-418] user data testids ([#558](https://github.com/widergy/energy-ui/issues/558)) ([9032627](https://github.com/widergy/energy-ui/commit/90326273dcbbbac210818d17f77427dc53590b75))
|
|
7
|
+
|
|
1
8
|
## [3.52.1](https://github.com/widergy/energy-ui/compare/v3.52.0...v3.52.1) (2025-01-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -163,13 +163,13 @@ const UTBreadcrumbs = _ref => {
|
|
|
163
163
|
childrenContainer: overflowControl ? _stylesModule.default.buttonContainer : null,
|
|
164
164
|
text: overflowControl ? _stylesModule.default.ellipsis : null
|
|
165
165
|
},
|
|
166
|
-
dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(index) : "".concat(buttonId, "
|
|
166
|
+
dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(index) : "".concat(buttonId, ".").concat(index),
|
|
167
167
|
onClick: handleClick,
|
|
168
168
|
size: "small",
|
|
169
169
|
variant: "text"
|
|
170
170
|
}, colorThemesDefinition.button), "".concat(label)), !isLast && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
171
171
|
className: classes.separator,
|
|
172
|
-
dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(index) : "".concat(buttonId, "
|
|
172
|
+
dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(index) : "".concat(buttonId, ".").concat(index),
|
|
173
173
|
variant: "small",
|
|
174
174
|
weight: "medium"
|
|
175
175
|
}, colorThemesDefinition.label), separator));
|
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
## Props
|
|
8
8
|
|
|
9
|
-
| Name
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
9
|
+
| Name | Type | Default | Description |
|
|
10
|
+
| ------------------ | ---------------- | --------- | ------------------------------------------------------------------------------------- |
|
|
11
|
+
| checkboxDataTestId | string | | Box `data-testid`. |
|
|
12
|
+
| classNames | objectOf(string) | | Additional class names to apply for further styling. |
|
|
13
|
+
| dataTestId | string | | Whole component `data-testid`. |
|
|
14
|
+
| disabled | bool | false | Disables the checkbox, making it unclickable. |
|
|
15
|
+
| indeterminate | bool | false | Indicates if the checkbox is in an indeterminate state. |
|
|
16
|
+
| isSimple | bool | false | **Deprecated**: Please avoid using this property in future implementations. |
|
|
17
|
+
| onChange | func | | Function to call when the checkbox state changes. |
|
|
18
|
+
| required | bool | false | Indicates if the checkbox is required. |
|
|
19
|
+
| spacing | string | 'medium' | Defines the spacing between the checkbox and the label. Can be 'small' or 'medium'. |
|
|
20
|
+
| title | string | | Title to display next to the checkbox. Supports markdown when `withMarkdown` is true. |
|
|
21
|
+
| value | bool | false | Indicates if the checkbox is checked. |
|
|
22
|
+
| variant | string | 'default' | Defines the visual variant of the checkbox. |
|
|
23
|
+
| withMarkdown | bool | false | Enables markdown formatting for the `title` prop. |
|
|
22
24
|
|
|
23
25
|
## Usage
|
|
24
26
|
|
|
@@ -20,6 +20,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
20
20
|
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); }
|
|
21
21
|
const UTCheckbox = _ref => {
|
|
22
22
|
let {
|
|
23
|
+
checkboxDataTestId,
|
|
23
24
|
classes: theme,
|
|
24
25
|
classNames,
|
|
25
26
|
dataTestId,
|
|
@@ -51,7 +52,8 @@ const UTCheckbox = _ref => {
|
|
|
51
52
|
dataTestId: dataTestId,
|
|
52
53
|
className: classes.container
|
|
53
54
|
}, rootComponentProps), /*#__PURE__*/_react.default.createElement(BoxContainerComponent, _extends({
|
|
54
|
-
className: classes.boxContainer
|
|
55
|
+
className: classes.boxContainer,
|
|
56
|
+
dataTestId: checkboxDataTestId
|
|
55
57
|
}, boxContainerProps), isSimple ? /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
|
|
56
58
|
name: "IconCheck",
|
|
57
59
|
shade: "04",
|
|
@@ -73,6 +75,7 @@ const UTCheckbox = _ref => {
|
|
|
73
75
|
}, title));
|
|
74
76
|
};
|
|
75
77
|
UTCheckbox.propTypes = {
|
|
78
|
+
checkboxDataTestId: _propTypes.string,
|
|
76
79
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
77
80
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
78
81
|
dataTestId: _propTypes.string,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| Name | Type | Default | Description |
|
|
10
10
|
| -------------- | ------ | ------- | -------------------------------------------------------------------------------------------- |
|
|
11
11
|
| className | string | | Custom CSS class to apply to the root of the component. |
|
|
12
|
+
| dataTestId | string | | Component `data-testid` |
|
|
12
13
|
| validationData | array | [] | Array of validation data objects to display messages, each with a status and optional icons. |
|
|
13
14
|
|
|
14
15
|
### validationData
|
|
@@ -26,8 +26,7 @@ const UTValidation = _ref => {
|
|
|
26
26
|
if ((0, _lodash.isEmpty)(validationData)) return null;
|
|
27
27
|
const showIcon = status => _constants.STATUSES_WITH_ICON.includes(status);
|
|
28
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
-
className: "".concat(className, " ").concat(_stylesModule.default.container)
|
|
30
|
-
"data-testid": dataTestId
|
|
29
|
+
className: "".concat(className, " ").concat(_stylesModule.default.container)
|
|
31
30
|
}, validationData.map((_ref2, index) => {
|
|
32
31
|
let {
|
|
33
32
|
items,
|
|
@@ -57,7 +56,8 @@ const UTValidation = _ref => {
|
|
|
57
56
|
text,
|
|
58
57
|
status: itemStatus
|
|
59
58
|
}, itemIndex),
|
|
60
|
-
className: _stylesModule.default.itemContainer
|
|
59
|
+
className: _stylesModule.default.itemContainer,
|
|
60
|
+
"data-testid": "".concat(dataTestId, ".").concat(index, ".").concat(itemIndex)
|
|
61
61
|
}, withIcon && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
62
|
className: "".concat(_stylesModule.default.iconContainer, " ").concat(classes["icon".concat((0, _componentUtils.capitalize)(itemStatus))])
|
|
63
63
|
}, showIcon(itemStatus) && /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
|