@widergy/energy-ui 3.168.0 → 3.170.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,16 +1,30 @@
1
- # [3.168.0](https://github.com/widergy/energy-ui/compare/v3.167.1...v3.168.0) (2026-06-18)
1
+ # [3.170.0](https://github.com/widergy/energy-ui/compare/v3.169.0...v3.170.0) (2026-06-22)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * [CX-2398] new ut loading version ([#815](https://github.com/widergy/energy-ui/issues/815)) ([b115b7e](https://github.com/widergy/energy-ui/commit/b115b7ecabd6e84e4917381f0d7876207602ffae))
6
+ * [AXCH-1778] test id support for utdotmenu ([#823](https://github.com/widergy/energy-ui/issues/823)) ([76d71f4](https://github.com/widergy/energy-ui/commit/76d71f4befad18fa1da9c43533cc53b95e3c673c))
7
7
 
8
- ## [3.167.1](https://github.com/widergy/energy-ui/compare/v3.167.0...v3.167.1) (2026-06-18)
8
+ # [3.169.0](https://github.com/widergy/energy-ui/compare/v3.168.0...v3.169.0) (2026-06-18)
9
9
 
10
+ ### Novedades y Mejoras
10
11
 
11
- ### Bug Fixes
12
+ * El selector desplegable ahora permite personalizar cómo se ve cada opción de la lista, tanto en modo de selección única como múltiple. [#821](https://github.com/widergy/Energy-UI/pull/821) [AXCH-1774](https://widergy.atlassian.net/browse/AXCH-1774)
13
+
14
+ # [3.168.0](https://github.com/widergy/energy-ui/compare/v3.167.1...v3.168.0) (2026-06-18)
15
+
16
+ ### Novedades y Mejoras
17
+
18
+ * Se incorpora una nueva experiencia visual de carga: un indicador animado moderno que utiliza los colores e identidad propios de cada cliente, con efecto de brillo y logo centrado. La experiencia anterior se mantiene activa por defecto, garantizando que ningún flujo existente se vea afectado. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
19
+ * Durante la carga de secciones de la aplicación, el nuevo indicador visual ya puede mostrarse en pantalla completa o adaptado al contenedor, según el contexto de navegación. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
20
+ * Las vistas principales de la aplicación —resumen de cuentas, perfil de usuario, listado de cuentas, trámites, estado de corte, consumo, historial, atención al cliente y facturas— fueron actualizadas para aprovechar la nueva experiencia de carga cuando está habilitada. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
21
+ * El resumen de factura inteligente incorpora soporte para la nueva experiencia de carga, manteniendo compatibilidad total con la versión anterior. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
22
+
23
+ ## [3.167.1](https://github.com/widergy/energy-ui/compare/v3.167.0...v3.167.1) (2026-06-18)
24
+
25
+ ### Correcciones
12
26
 
13
- * multiple fixes ([#822](https://github.com/widergy/energy-ui/issues/822)) ([c6ce17d](https://github.com/widergy/energy-ui/commit/c6ce17d96fc15531bbde7a390960bcf22e709da4))
27
+ * Mejoras internas de la plataforma. [#822](https://github.com/widergy/Energy-UI/pull/822) [`28c89f8`](https://github.com/widergy/Energy-UI/commit/28c89f8) [CX-9999](https://widergy.atlassian.net/browse/CX-9999)
14
28
 
15
29
  # [3.167.0](https://github.com/widergy/energy-ui/compare/v3.166.1...v3.167.0) (2026-06-17)
16
30
 
@@ -20,6 +20,7 @@ const UTDotMenu = _ref => {
20
20
  let {
21
21
  className,
22
22
  classNames = _constants.DEFAULT_PROPS.classNames,
23
+ dataTestId,
23
24
  disabled,
24
25
  Icon = _constants.DEFAULT_PROPS.Icon,
25
26
  menuItemProps,
@@ -29,12 +30,14 @@ const UTDotMenu = _ref => {
29
30
  } = _ref;
30
31
  const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
31
32
  return /*#__PURE__*/_react.default.createElement("div", {
32
- className: className
33
+ className: className,
34
+ "data-testid": dataTestId
33
35
  }, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
34
36
  classNames: {
35
37
  icon: classNames.icon,
36
38
  root: classNames.button
37
39
  },
40
+ dataTestId: dataTestId ? "".concat(dataTestId, ".button") : undefined,
38
41
  disabled: disabled,
39
42
  Icon: Icon,
40
43
  onClick: event => setAnchorEl(event.currentTarget),
@@ -52,15 +55,18 @@ const UTDotMenu = _ref => {
52
55
  },
53
56
  ...(menuProps === null || menuProps === void 0 ? void 0 : menuProps.PaperProps)
54
57
  }
55
- }), options.map(option => {
58
+ }), options.map((option, index) => {
56
59
  const {
57
60
  colorTheme,
61
+ dataTestId: optionTestId,
58
62
  icon,
59
63
  iconProps,
60
64
  name,
61
65
  onPress
62
66
  } = option;
67
+ const itemTestId = optionTestId !== null && optionTestId !== void 0 ? optionTestId : dataTestId ? "".concat(dataTestId, ".").concat(index) : undefined;
63
68
  return /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
69
+ "data-testid": itemTestId,
64
70
  key: name,
65
71
  onClick: onPress
66
72
  }, menuItemProps), icon && /*#__PURE__*/_react.default.createElement(_UTIcon.default, _extends({
@@ -78,12 +84,14 @@ UTDotMenu.propTypes = {
78
84
  button: _propTypes.string,
79
85
  icon: _propTypes.string
80
86
  }),
87
+ dataTestId: _propTypes.string,
81
88
  disabled: _propTypes.bool,
82
89
  Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
83
90
  menuItemProps: _propTypes.object,
84
91
  menuProps: _propTypes.object,
85
92
  options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
86
93
  colorTheme: _propTypes.string,
94
+ dataTestId: _propTypes.string,
87
95
  icon: _propTypes.string,
88
96
  iconProps: _propTypes.object,
89
97
  name: _propTypes.string,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.Small = exports.Playground = exports.IconoPersonalizado = exports.Default = exports.ConIconos = exports.ConIconProps = exports.BotonDeshabilitado = exports.AccionDestructiva = void 0;
6
+ exports.default = exports.Small = exports.Playground = exports.IconoPersonalizado = exports.Default = exports.ConTestIds = exports.ConIconos = exports.ConIconProps = exports.BotonDeshabilitado = exports.AccionDestructiva = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _ = _interopRequireDefault(require(".."));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -50,6 +50,18 @@ var _default = exports.default = {
50
50
  }
51
51
  }
52
52
  },
53
+ dataTestId: {
54
+ control: 'text',
55
+ description: 'Test id del contenedor raíz. El botón trigger recibe automáticamente el valor de esta prop con el sufijo `.button`. ' + 'Cada ítem del menú usa su propio `dataTestId` directamente (sin concatenación con el contenedor).',
56
+ table: {
57
+ defaultValue: {
58
+ summary: 'undefined'
59
+ },
60
+ type: {
61
+ summary: 'string'
62
+ }
63
+ }
64
+ },
53
65
  classNames: {
54
66
  control: false,
55
67
  description: 'Clases personalizadas para el botón trigger. Acepta `button` e `icon`.',
@@ -112,13 +124,13 @@ var _default = exports.default = {
112
124
  },
113
125
  options: {
114
126
  control: false,
115
- description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme` e `iconProps` para pasar props extra a UTIcon.',
127
+ description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme`, `iconProps` para props extra a UTIcon, ' + 'y `dataTestId` para identificar el ítem. El test id del ítem se usa directamente tal como se provee en la opción.',
116
128
  table: {
117
129
  defaultValue: {
118
130
  summary: 'undefined'
119
131
  },
120
132
  type: {
121
- summary: 'arrayOf(shape({ name, onPress, colorTheme?, icon?, iconProps? }))'
133
+ summary: 'arrayOf(shape({ name, onPress, colorTheme?, dataTestId?, icon?, iconProps? }))'
122
134
  }
123
135
  }
124
136
  },
@@ -262,6 +274,33 @@ const ConIconProps = exports.ConIconProps = {
262
274
  }
263
275
  }
264
276
  };
277
+ const ConTestIds = exports.ConTestIds = {
278
+ args: {
279
+ dataTestId: 'section.dotMenu',
280
+ options: [{
281
+ name: 'Editar',
282
+ icon: 'IconPencil',
283
+ dataTestId: 'section.dotMenu.edit'
284
+ }, {
285
+ name: 'Duplicar',
286
+ icon: 'IconCopy',
287
+ dataTestId: 'section.dotMenu.duplicate'
288
+ }, {
289
+ name: 'Eliminar',
290
+ icon: 'IconTrash',
291
+ colorTheme: 'error',
292
+ dataTestId: 'section.dotMenu.delete'
293
+ }]
294
+ },
295
+ name: 'Con test ids',
296
+ parameters: {
297
+ docs: {
298
+ description: {
299
+ story: 'El contenedor recibe `dataTestId="section.dotMenu"` y el botón trigger recibe `"section.dotMenu.button"` automáticamente. ' + 'Cada ítem usa su propio `dataTestId` tal como se provee, sin concatenación con el contenedor.'
300
+ }
301
+ }
302
+ }
303
+ };
265
304
  const BotonDeshabilitado = exports.BotonDeshabilitado = {
266
305
  args: {
267
306
  disabled: true,
@@ -14,6 +14,7 @@
14
14
  | autocompleteProps | object | {} | Additional props to pass to the underlying Material-UI Autocomplete component. |
15
15
  | className | string | | Additional CSS class name for the component container. |
16
16
  | clearable | bool | true | Determines whether a button to clear the current selection should be shown. |
17
+ | CustomRow | elementType | | Custom React component to render each option row. Receives `{ item, isChecked }` as props, where `item` is the option object and `isChecked` indicates if the option is selected. |
17
18
  | dataTestId | string | | Test ID for the main input component. |
18
19
  | disabled | bool | false | Disables the select input. |
19
20
  | disableFilterOptions | bool | false | Disables option filtering, showing all options even when typing in the search field. |
@@ -231,6 +232,40 @@ const ReadOnlyExample = () => {
231
232
  };
232
233
  ```
233
234
 
235
+ ### With Custom Row Renderer
236
+
237
+ ```jsx
238
+ import React, { useState } from 'react';
239
+ import UTSelect from './UTSelect';
240
+
241
+ const options = [
242
+ { name: 'Alice', value: '1', subtitle: 'Admin' },
243
+ { name: 'Bob', value: '2', subtitle: 'Editor' },
244
+ { name: 'Carol', value: '3', subtitle: 'Viewer' }
245
+ ];
246
+
247
+ const MyCustomRow = ({ item, isChecked }) => (
248
+ <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
249
+ <span style={{ fontWeight: isChecked ? 'bold' : 'normal' }}>{item.name}</span>
250
+ <span style={{ color: 'gray', fontSize: 12 }}>{item.subtitle}</span>
251
+ </div>
252
+ );
253
+
254
+ const CustomRowExample = () => {
255
+ const [value, setValue] = useState(null);
256
+
257
+ return (
258
+ <UTSelect
259
+ CustomRow={MyCustomRow}
260
+ onChange={setValue}
261
+ options={options}
262
+ placeholder="Select a user"
263
+ value={value}
264
+ />
265
+ );
266
+ };
267
+ ```
268
+
234
269
  ### With Search Term Handling
235
270
 
236
271
  ```jsx
@@ -0,0 +1,13 @@
1
+ import { ArgTypes, Canvas, Description, Meta, Title } from '@storybook/blocks';
2
+
3
+ import * as UTSelectV1Stories from './UTSelectV1.stories.js';
4
+
5
+ <Meta of={UTSelectV1Stories} />
6
+
7
+ <Title>UTSelect V1</Title>
8
+
9
+ <Description of={UTSelectV1Stories} />
10
+
11
+ <Canvas of={UTSelectV1Stories.Playground} withToolbar />
12
+
13
+ <ArgTypes exclude={['classes']} />