@widergy/energy-ui 3.63.2 → 3.65.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 +14 -0
- package/dist/components/UTIcon/components/EnergyIcons/EnergyIconConsumptionBoxFilled.svg +4 -0
- package/dist/components/UTIcon/constants.js +19 -0
- package/dist/components/UTPanel/versions/V0/index.js +13 -2
- package/dist/components/UTPanel/versions/V1/index.js +25 -6
- package/dist/constants/testIds.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [3.65.0](https://github.com/widergy/energy-ui/compare/v3.64.0...v3.65.0) (2025-02-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* new icon added ([#585](https://github.com/widergy/energy-ui/issues/585)) ([84b0cb5](https://github.com/widergy/energy-ui/commit/84b0cb56e9c7091fc31ffdc35af05c97e89b7911))
|
|
7
|
+
|
|
8
|
+
# [3.64.0](https://github.com/widergy/energy-ui/compare/v3.63.2...v3.64.0) (2025-02-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* [AUT-500] panel ids ([#578](https://github.com/widergy/energy-ui/issues/578)) ([6d80159](https://github.com/widergy/energy-ui/commit/6d8015945a4653a38c644d29fe3cce98c848c712))
|
|
14
|
+
|
|
1
15
|
## [3.63.2](https://github.com/widergy/energy-ui/compare/v3.63.1...v3.63.2) (2025-02-24)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="100" height="100" viewBox="0 0 100 100" stroke="none" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25 20.8333C22.6988 20.8333 20.8333 22.6988 20.8333 25V75C20.8333 77.3012 22.6988 79.1667 25 79.1667H75C77.3012 79.1667 79.1667 77.3012 79.1667 75V25C79.1667 22.6988 77.3012 20.8333 75 20.8333H25ZM12.5 25C12.5 18.0964 18.0964 12.5 25 12.5H75C81.9036 12.5 87.5 18.0964 87.5 25V75C87.5 81.9036 81.9036 87.5 75 87.5H25C18.0964 87.5 12.5 81.9036 12.5 75V25Z"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.1827 33.4577C51.8176 33.9132 52.7367 35.4876 52.2356 36.9741L48.9501 46.7207H55.2371C56.2544 46.7207 57.2067 47.175 57.7848 47.9361C58.3629 48.6971 58.4929 49.6677 58.1327 50.5327L52.1709 64.8477C51.5654 66.3017 49.7781 67.034 48.1789 66.4835C46.5798 65.9329 45.7743 64.3079 46.3798 62.8539L50.754 52.3509H44.7629C43.7809 52.3509 42.8572 51.9274 42.2733 51.2095C41.6895 50.4916 41.5149 49.5645 41.8026 48.7109L46.3151 35.3243C46.8162 33.8378 48.5477 33.0021 50.1827 33.4577Z"/>
|
|
4
|
+
</svg>
|
|
@@ -117,6 +117,24 @@ EnergyIconConsumption.defaultProps = {
|
|
|
117
117
|
stroke: "currentColor",
|
|
118
118
|
xmlns: "http://www.w3.org/2000/svg"
|
|
119
119
|
};
|
|
120
|
+
var EnergyIconConsumptionBoxFilled = function EnergyIconConsumptionBoxFilled(props) {
|
|
121
|
+
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
122
|
+
fillRule: "evenodd",
|
|
123
|
+
clipRule: "evenodd",
|
|
124
|
+
d: "M25 20.833A4.167 4.167 0 0 0 20.833 25v50A4.167 4.167 0 0 0 25 79.167h50A4.167 4.167 0 0 0 79.167 75V25A4.167 4.167 0 0 0 75 20.833H25ZM12.5 25c0-6.904 5.596-12.5 12.5-12.5h50c6.904 0 12.5 5.596 12.5 12.5v50c0 6.904-5.596 12.5-12.5 12.5H25c-6.904 0-12.5-5.596-12.5-12.5V25Z"
|
|
125
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
126
|
+
fillRule: "evenodd",
|
|
127
|
+
clipRule: "evenodd",
|
|
128
|
+
d: "M50.183 33.458c1.635.455 2.554 2.03 2.053 3.516l-3.286 9.747h6.287c1.017 0 1.97.454 2.548 1.215a2.6 2.6 0 0 1 .348 2.597L52.17 64.848c-.606 1.454-2.393 2.186-3.992 1.636-1.6-.551-2.405-2.176-1.8-3.63l4.375-10.503h-5.991c-.982 0-1.906-.424-2.49-1.142-.584-.717-.758-1.645-.47-2.498l4.512-13.387c.501-1.486 2.233-2.322 3.868-1.866Z"
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
131
|
+
EnergyIconConsumptionBoxFilled.defaultProps = {
|
|
132
|
+
width: "100",
|
|
133
|
+
height: "100",
|
|
134
|
+
viewBox: "0 0 100 100",
|
|
135
|
+
fill: "currentColor",
|
|
136
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
137
|
+
};
|
|
120
138
|
var EnergyIconHome = function EnergyIconHome(props) {
|
|
121
139
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
122
140
|
d: "m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12Z",
|
|
@@ -219,6 +237,7 @@ const ENERGY_ICONS = exports.ENERGY_ICONS = {
|
|
|
219
237
|
EnergyIconCarbonFootprint,
|
|
220
238
|
EnergyIconCart,
|
|
221
239
|
EnergyIconConsumption,
|
|
240
|
+
EnergyIconConsumptionBoxFilled,
|
|
222
241
|
EnergyIconHome,
|
|
223
242
|
EnergyIconMessageEdit,
|
|
224
243
|
EnergyIconQuestionFilled,
|
|
@@ -12,14 +12,20 @@ var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
|
12
12
|
var _propTypes = require("prop-types");
|
|
13
13
|
var _UTButton = _interopRequireDefault(require("../../../UTButton"));
|
|
14
14
|
var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
15
|
+
var _testIds = require("../../../../constants/testIds");
|
|
15
16
|
var _commonTypes = require("../../../../types/commonTypes");
|
|
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
|
+
closeButtonId,
|
|
22
|
+
titleId
|
|
23
|
+
} = _testIds.COMPONENT_IDS.panelIds;
|
|
19
24
|
const UTPanel = _ref => {
|
|
20
25
|
let {
|
|
21
26
|
children,
|
|
22
27
|
classes = {},
|
|
28
|
+
closeButtonDataTestId = closeButtonId,
|
|
23
29
|
containerRef,
|
|
24
30
|
disableScrollbar = false,
|
|
25
31
|
modalProps,
|
|
@@ -31,6 +37,7 @@ const UTPanel = _ref => {
|
|
|
31
37
|
perfectScrollbarOptions,
|
|
32
38
|
title,
|
|
33
39
|
TitleComponent,
|
|
40
|
+
titleDataTestId = titleId,
|
|
34
41
|
TitleIcon,
|
|
35
42
|
...props
|
|
36
43
|
} = _ref;
|
|
@@ -67,13 +74,15 @@ const UTPanel = _ref => {
|
|
|
67
74
|
}, TitleIcon && /*#__PURE__*/_react.default.createElement(TitleIcon, {
|
|
68
75
|
className: "".concat(_stylesModule.default.titleIcon, " ").concat(titleIconClass)
|
|
69
76
|
}), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
className: classes.title,
|
|
78
|
+
dataTestId: titleDataTestId,
|
|
79
|
+
weight: "semibold"
|
|
72
80
|
}, title)), /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
73
81
|
classNames: {
|
|
74
82
|
icon: iconCloseClass,
|
|
75
83
|
root: closeButtonClass
|
|
76
84
|
},
|
|
85
|
+
dataTestId: closeButtonDataTestId,
|
|
77
86
|
Icon: _Close.default,
|
|
78
87
|
onClick: onClose,
|
|
79
88
|
variant: "text"
|
|
@@ -88,6 +97,7 @@ const UTPanel = _ref => {
|
|
|
88
97
|
};
|
|
89
98
|
UTPanel.propTypes = {
|
|
90
99
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
100
|
+
closeButtonDataTestId: _propTypes.string,
|
|
91
101
|
containerRef: _commonTypes.refType,
|
|
92
102
|
disableScrollbar: _propTypes.bool,
|
|
93
103
|
modalProps: _propTypes.object,
|
|
@@ -99,6 +109,7 @@ UTPanel.propTypes = {
|
|
|
99
109
|
perfectScrollbarOptions: _propTypes.object,
|
|
100
110
|
title: _propTypes.string,
|
|
101
111
|
TitleComponent: (0, _propTypes.oneOfType)([_propTypes.element, _propTypes.elementType]),
|
|
112
|
+
titleDataTestId: _propTypes.string,
|
|
102
113
|
TitleIcon: _propTypes.elementType
|
|
103
114
|
};
|
|
104
115
|
var _default = exports.default = UTPanel;
|
|
@@ -15,8 +15,9 @@ var _UTButton = _interopRequireDefault(require("../../../UTButton"));
|
|
|
15
15
|
var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
16
16
|
var _UTMenu = _interopRequireDefault(require("../../../UTMenu"));
|
|
17
17
|
var _index = _interopRequireDefault(require("../../../UTProgressBar/index.js"));
|
|
18
|
-
var _classesUtils = require("../../../../utils/classesUtils.js");
|
|
19
18
|
var _index2 = _interopRequireDefault(require("../../../WithTheme/index.js"));
|
|
19
|
+
var _testIds = require("../../../../constants/testIds.js");
|
|
20
|
+
var _classesUtils = require("../../../../utils/classesUtils.js");
|
|
20
21
|
var _DataItem = _interopRequireDefault(require("./components/DataItem"));
|
|
21
22
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
22
23
|
var _constants = require("./constants.js");
|
|
@@ -25,11 +26,18 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
25
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
28
|
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); }
|
|
29
|
+
const {
|
|
30
|
+
closeButtonId,
|
|
31
|
+
mainActionId,
|
|
32
|
+
secondaryActionId,
|
|
33
|
+
titleId
|
|
34
|
+
} = _testIds.COMPONENT_IDS.panelIds;
|
|
28
35
|
const UTPanel = _ref => {
|
|
29
36
|
let {
|
|
30
37
|
children,
|
|
31
|
-
classes: theme,
|
|
32
38
|
classNames,
|
|
39
|
+
classes: theme,
|
|
40
|
+
closeButtonDataTestId = closeButtonId,
|
|
33
41
|
collapsableHeader = false,
|
|
34
42
|
currentStep = 1,
|
|
35
43
|
disableScrollbar = false,
|
|
@@ -41,6 +49,7 @@ const UTPanel = _ref => {
|
|
|
41
49
|
hideHeader = false,
|
|
42
50
|
hideMainButton = false,
|
|
43
51
|
isWorkflow = false,
|
|
52
|
+
mainActionDataTestId = mainActionId,
|
|
44
53
|
mainButton = {},
|
|
45
54
|
modalProps,
|
|
46
55
|
onClose,
|
|
@@ -49,11 +58,13 @@ const UTPanel = _ref => {
|
|
|
49
58
|
open,
|
|
50
59
|
panelSide,
|
|
51
60
|
perfectScrollbarOptions,
|
|
61
|
+
secondaryActionDataTestId = secondaryActionId,
|
|
52
62
|
singleHeaderItemsColumn = false,
|
|
53
63
|
size = 'M',
|
|
54
64
|
stepsCount,
|
|
55
65
|
subtitle = '',
|
|
56
66
|
title = '',
|
|
67
|
+
titleDataTestId = titleId,
|
|
57
68
|
titleProps = {},
|
|
58
69
|
...props
|
|
59
70
|
} = _ref;
|
|
@@ -95,6 +106,7 @@ const UTPanel = _ref => {
|
|
|
95
106
|
icon: iconCloseClass,
|
|
96
107
|
root: closeButtonClass
|
|
97
108
|
},
|
|
109
|
+
dataTestId: closeButtonDataTestId,
|
|
98
110
|
Icon: "IconX",
|
|
99
111
|
onClick: onClose,
|
|
100
112
|
variant: "text"
|
|
@@ -115,6 +127,7 @@ const UTPanel = _ref => {
|
|
|
115
127
|
className: _stylesModule.default.titleArea
|
|
116
128
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
117
129
|
className: classes.title,
|
|
130
|
+
dataTestId: titleDataTestId,
|
|
118
131
|
variant: "title2",
|
|
119
132
|
weight: "medium"
|
|
120
133
|
}, titleProps), title), collapsableHeader && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
@@ -138,10 +151,12 @@ const UTPanel = _ref => {
|
|
|
138
151
|
withMenuItem: true
|
|
139
152
|
}), /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
140
153
|
colorTheme: "primary",
|
|
154
|
+
dataTestId: secondaryActionDataTestId,
|
|
141
155
|
onClick: secondaryActionAsMenu ? openMenu : undefined,
|
|
142
156
|
variant: "semitransparent"
|
|
143
157
|
}, !secondaryActionAsMenu && headerSecondaryActionButton), secondaryActionAsMenu ? _constants.MENU_LABEL : headerSecondaryActionButton.text)), !(0, _isEmpty.default)(headerMainActionButton) && /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
144
158
|
colorTheme: "success",
|
|
159
|
+
dataTestId: mainActionDataTestId,
|
|
145
160
|
variant: "filled"
|
|
146
161
|
}, headerMainActionButton), headerMainActionButton.text)))), !(0, _isEmpty.default)(headerItems) && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
162
|
className: "".concat(_stylesModule.default.headerItemsContainer, " \n ").concat(collapseHeader ? _stylesModule.default.expandedContainer : _stylesModule.default.collapsedContainer, " \n ").concat(singleHeaderItemsColumn && _stylesModule.default.singleHeaderItemsColumn || '')
|
|
@@ -162,8 +177,9 @@ const UTPanel = _ref => {
|
|
|
162
177
|
}, mainButton), (mainButton === null || mainButton === void 0 ? void 0 : mainButton.text) || _constants.ACCEPT_BUTTON_TEXT));
|
|
163
178
|
};
|
|
164
179
|
UTPanel.propTypes = {
|
|
165
|
-
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
166
180
|
classNames: _propTypes.object,
|
|
181
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
182
|
+
closeButtonDataTestId: _propTypes.string,
|
|
167
183
|
collapsableHeader: _propTypes.bool,
|
|
168
184
|
currentStep: _propTypes.number,
|
|
169
185
|
disableScrollbar: _propTypes.bool,
|
|
@@ -185,7 +201,11 @@ UTPanel.propTypes = {
|
|
|
185
201
|
text: _propTypes.string,
|
|
186
202
|
variant: _propTypes.string
|
|
187
203
|
}),
|
|
204
|
+
hideCloseButton: _propTypes.bool,
|
|
205
|
+
hideHeader: _propTypes.bool,
|
|
206
|
+
hideMainButton: _propTypes.bool,
|
|
188
207
|
isWorkflow: _propTypes.bool,
|
|
208
|
+
mainActionDataTestId: _propTypes.string,
|
|
189
209
|
mainButton: _propTypes.object,
|
|
190
210
|
modalProps: _propTypes.object,
|
|
191
211
|
onClose: _propTypes.func,
|
|
@@ -194,14 +214,13 @@ UTPanel.propTypes = {
|
|
|
194
214
|
open: _propTypes.bool,
|
|
195
215
|
panelSide: _propTypes.string,
|
|
196
216
|
perfectScrollbarOptions: _propTypes.object,
|
|
197
|
-
|
|
198
|
-
hideMainButton: _propTypes.bool,
|
|
199
|
-
hideHeader: _propTypes.bool,
|
|
217
|
+
secondaryActionDataTestId: _propTypes.string,
|
|
200
218
|
singleHeaderItemsColumn: _propTypes.bool,
|
|
201
219
|
size: _propTypes.string,
|
|
202
220
|
stepsCount: _propTypes.number,
|
|
203
221
|
subtitle: _propTypes.string,
|
|
204
222
|
title: _propTypes.string,
|
|
223
|
+
titleDataTestId: _propTypes.string,
|
|
205
224
|
titleProps: _propTypes.object
|
|
206
225
|
};
|
|
207
226
|
var _default = exports.default = (0, _index2.default)(_theme.retrieveStyle)(UTPanel);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TABLE_ROW = exports.TABLE = exports.STATUS_MESSAGE = exports.SELECTION_COMPONENT = exports.HEADER = exports.CREDIT_CARD = exports.COMPONENT_IDS = exports.CELL = exports.ACTIONS = void 0;
|
|
6
|
+
exports.TABLE_ROW = exports.TABLE = exports.STATUS_MESSAGE = exports.SELECTION_COMPONENT = exports.PANEL = exports.HEADER = exports.CREDIT_CARD = 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 CREDIT_CARD = exports.CREDIT_CARD = 'creditCard';
|
|
13
13
|
const HEADER = exports.HEADER = 'header';
|
|
14
|
+
const PANEL = exports.PANEL = 'panel';
|
|
14
15
|
const SELECTION_COMPONENT = exports.SELECTION_COMPONENT = 'selectionComponent';
|
|
15
16
|
const STATUS_MESSAGE = exports.STATUS_MESSAGE = 'statusMessage';
|
|
16
17
|
const TABLE = exports.TABLE = 'table';
|
|
@@ -38,6 +39,12 @@ const COMPONENT_IDS = exports.COMPONENT_IDS = {
|
|
|
38
39
|
prevButtonId: 'onboarding.prevButton',
|
|
39
40
|
titleId: 'onboarding.title'
|
|
40
41
|
},
|
|
42
|
+
panelIds: {
|
|
43
|
+
closeButtonId: "".concat(PANEL, ".closeButton"),
|
|
44
|
+
mainActionId: "".concat(PANEL, ".mainAction"),
|
|
45
|
+
secondaryActionId: "".concat(PANEL, ".secondaryAction"),
|
|
46
|
+
titleId: "".concat(PANEL, ".title")
|
|
47
|
+
},
|
|
41
48
|
snackBarIds: {
|
|
42
49
|
closeButtonId: 'snackbar.closeButton',
|
|
43
50
|
labelId: 'snackbar.label'
|