@widergy/energy-ui 3.145.1 → 3.147.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,17 @@
1
+ # [3.147.0](https://github.com/widergy/energy-ui/compare/v3.146.0...v3.147.0) (2026-05-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * add expandable-panel ([#787](https://github.com/widergy/energy-ui/issues/787)) ([9e15e3a](https://github.com/widergy/energy-ui/commit/9e15e3aea9e65d827b30cb17aae1e74df637f102))
7
+
8
+ # [3.146.0](https://github.com/widergy/energy-ui/compare/v3.145.1...v3.146.0) (2026-04-30)
9
+
10
+
11
+ ### Features
12
+
13
+ * dynamic test id for snackbar label ([#780](https://github.com/widergy/energy-ui/issues/780)) ([3349141](https://github.com/widergy/energy-ui/commit/334914166fbb5bf3ada2c030ab5d381bf212eb71))
14
+
1
15
  ## [3.145.1](https://github.com/widergy/energy-ui/compare/v3.145.0...v3.145.1) (2026-04-28)
2
16
 
3
17
 
@@ -68,7 +68,7 @@ class UTAlert extends _react.PureComponent {
68
68
  classes = {},
69
69
  closeDataTestId = snackBar.closeButton,
70
70
  content: alert = {},
71
- labelDataTestId = snackBar.label,
71
+ labelDataTestId = "".concat(snackBar.label, ".").concat(alert.type),
72
72
  withoutIcon
73
73
  } = this.props;
74
74
  const anchor = {
@@ -171,6 +171,18 @@ var _default = exports.default = {
171
171
  }
172
172
  }
173
173
  },
174
+ autoExpand: {
175
+ control: 'boolean',
176
+ description: '(V1 only) Si es true, expande automáticamente el primer item de additionalContent.',
177
+ table: {
178
+ defaultValue: {
179
+ summary: 'true'
180
+ },
181
+ type: {
182
+ summary: 'boolean'
183
+ }
184
+ }
185
+ },
174
186
  open: {
175
187
  control: 'boolean',
176
188
  description: 'Controla si el panel está abierto o cerrado.',
@@ -28,6 +28,7 @@ const UTPanel = _ref => {
28
28
  var _classes$bodyContaine;
29
29
  let {
30
30
  additionalContent,
31
+ autoExpand = true,
31
32
  backButtonDataTestId = panel.backButton,
32
33
  BackdropProps = {},
33
34
  children,
@@ -79,11 +80,11 @@ const UTPanel = _ref => {
79
80
  const [activeAdditionalContentId, setActiveAdditionalContentId] = (0, _react.useState)(null);
80
81
  (0, _react.useEffect)(() => {
81
82
  if (additionalContent && additionalContent.length > 0) {
82
- setActiveAdditionalContentId(additionalContent[0].id);
83
+ if (autoExpand) setActiveAdditionalContentId(additionalContent[0].id);
83
84
  } else {
84
85
  setActiveAdditionalContentId(null);
85
86
  }
86
- }, [additionalContent]);
87
+ }, [additionalContent, autoExpand]);
87
88
  const panelIsCollapsible = collapsablePanel && inline;
88
89
  const panelIsCollapsed = panelIsCollapsible && !open;
89
90
  const hasAdditionalContent = !(0, _isEmpty.default)(additionalContent);
@@ -197,6 +198,7 @@ UTPanel.propTypes = {
197
198
  BodyComponent: _propTypes.elementType.isRequired,
198
199
  tooltipProps: _propTypes.object.isRequired
199
200
  })),
201
+ autoExpand: _propTypes.bool,
200
202
  backButtonDataTestId: _propTypes.string,
201
203
  BackdropProps: _propTypes.object,
202
204
  classes: (0, _propTypes.objectOf)(_propTypes.string),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.145.1",
3
+ "version": "3.147.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",