@widergy/energy-ui 3.166.0 → 3.167.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,31 @@
1
- # [3.166.0](https://github.com/widergy/energy-ui/compare/v3.165.1...v3.166.0) (2026-06-12)
1
+ # [3.167.0](https://github.com/widergy/energy-ui/compare/v3.166.1...v3.167.0) (2026-06-17)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * [AUTO-271] Add test ids to case panel detail ([#809](https://github.com/widergy/energy-ui/issues/809)) ([d2413bb](https://github.com/widergy/energy-ui/commit/d2413bb084b1ae70de41800edd347450e836d94e))
6
+ * [AXCH-1778] button prop disabled in ut dot menu ([#819](https://github.com/widergy/energy-ui/issues/819)) ([14a1ccd](https://github.com/widergy/energy-ui/commit/14a1ccd7976107b661045c0ed2c9c959a050c29d))
7
+
8
+ ## [3.166.1](https://github.com/widergy/energy-ui/compare/v3.166.0...v3.166.1) (2026-06-16)
9
+
10
+ ### Correcciones
11
+
12
+ * Se corrigió un problema que causaba que ciertos íconos de estado se mostraran sin tamaño visible en versiones anteriores del navegador Chromium. [#817](https://github.com/widergy/Energy-UI/pull/817) [CX-2433](https://widergy.atlassian.net/browse/CX-2433)
13
+
14
+ # [3.166.0](https://github.com/widergy/energy-ui/compare/v3.165.1...v3.166.0) (2026-06-12)
15
+
16
+ ### Novedades y Mejoras
17
+
18
+ * Mejoras internas de la plataforma. [#809](https://github.com/widergy/Energy-UI/pull/809) [AUTO-271](https://widergy.atlassian.net/browse/AUTO-271)
7
19
 
8
20
  ## [3.165.1](https://github.com/widergy/energy-ui/compare/v3.165.0...v3.165.1) (2026-06-12)
9
21
 
22
+ ### Novedades y Mejoras
10
23
 
11
- ### Bug Fixes
12
24
 
13
- * added prop position to snackbar ([#818](https://github.com/widergy/energy-ui/issues/818)) ([676e43c](https://github.com/widergy/energy-ui/commit/676e43c4d625578b074506867879b0b8bdbe75ea))
25
+
26
+ ### Correcciones
27
+
28
+ * El componente de notificaciones emergentes ahora permite elegir entre cuatro posiciones en pantalla: inferior izquierda, inferior derecha, superior izquierda y superior derecha. [#818](https://github.com/widergy/Energy-UI/pull/818) [DIS-1106](https://widergy.atlassian.net/browse/DIS-1106)
14
29
 
15
30
  # [3.165.0](https://github.com/widergy/energy-ui/compare/v3.164.0...v3.165.0) (2026-06-10)
16
31
 
@@ -8,6 +8,7 @@ Botón de tres puntos verticales que despliega un menú de opciones. Soporta íc
8
8
  |------|------|---------|-------------|
9
9
  | `className` | `string` | `undefined` | Clase CSS aplicada al contenedor raíz. |
10
10
  | `classNames` | `shape({ button, icon })` | `{}` | Clases personalizadas para el botón trigger. |
11
+ | `disabled` | `bool` | `undefined` | Deshabilita el botón trigger. Cuando es `true`, el menú no puede abrirse. |
11
12
  | `Icon` | `elementType \| string` | `MoreVertIcon` | Ícono del botón trigger. Acepta un componente React o un nombre de ícono de Tabler (ej: `'IconDotsVertical'`). |
12
13
  | `menuItemProps` | `object` | `undefined` | Props pasadas a cada `MenuItem` de MUI. Útil para sobreescribir estilos (ej: `{ style: { minHeight: 'auto' } }`). |
13
14
  | `menuProps` | `object` | `undefined` | Props pasadas al componente `Menu` de MUI. El `borderRadius` del Paper es `8px` por defecto y se puede sobreescribir vía `menuProps.PaperProps`. |
@@ -20,6 +20,7 @@ const UTDotMenu = _ref => {
20
20
  let {
21
21
  className,
22
22
  classNames = _constants.DEFAULT_PROPS.classNames,
23
+ disabled,
23
24
  Icon = _constants.DEFAULT_PROPS.Icon,
24
25
  menuItemProps,
25
26
  menuProps,
@@ -34,6 +35,7 @@ const UTDotMenu = _ref => {
34
35
  icon: classNames.icon,
35
36
  root: classNames.button
36
37
  },
38
+ disabled: disabled,
37
39
  Icon: Icon,
38
40
  onClick: event => setAnchorEl(event.currentTarget),
39
41
  size: size,
@@ -76,6 +78,7 @@ UTDotMenu.propTypes = {
76
78
  button: _propTypes.string,
77
79
  icon: _propTypes.string
78
80
  }),
81
+ disabled: _propTypes.bool,
79
82
  Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
80
83
  menuItemProps: _propTypes.object,
81
84
  menuProps: _propTypes.object,
@@ -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.AccionDestructiva = void 0;
6
+ exports.default = exports.Small = exports.Playground = exports.IconoPersonalizado = exports.Default = 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 }; }
@@ -62,6 +62,18 @@ var _default = exports.default = {
62
62
  }
63
63
  }
64
64
  },
65
+ disabled: {
66
+ control: 'boolean',
67
+ description: 'Deshabilita el botón trigger. Cuando es `true`, el menú no puede abrirse.',
68
+ table: {
69
+ defaultValue: {
70
+ summary: 'undefined'
71
+ },
72
+ type: {
73
+ summary: 'bool'
74
+ }
75
+ }
76
+ },
65
77
  Icon: {
66
78
  control: 'text',
67
79
  description: 'Ícono del botón trigger. Acepta un nombre de ícono de Tabler (string) o un componente React. Por defecto muestra el ícono de tres puntos verticales (MoreVertIcon).',
@@ -250,6 +262,20 @@ const ConIconProps = exports.ConIconProps = {
250
262
  }
251
263
  }
252
264
  };
265
+ const BotonDeshabilitado = exports.BotonDeshabilitado = {
266
+ args: {
267
+ disabled: true,
268
+ options: BASIC_OPTIONS
269
+ },
270
+ name: 'Botón deshabilitado',
271
+ parameters: {
272
+ docs: {
273
+ description: {
274
+ story: '`disabled={true}` deshabilita el botón trigger. El menú no puede abrirse.'
275
+ }
276
+ }
277
+ }
278
+ };
253
279
  const IconoPersonalizado = exports.IconoPersonalizado = {
254
280
  args: {
255
281
  Icon: () => /*#__PURE__*/_react.default.createElement("span", {
@@ -20,6 +20,7 @@ const FLAG_CODES = new Set(_countries.default.map(_ref => {
20
20
  return code;
21
21
  }));
22
22
  const flagComponentCache = {};
23
+ const isCSSVar = value => typeof value === 'string' && value.startsWith('var(');
23
24
  const getFlagComponent = code => {
24
25
  if (!(code in flagComponentCache)) {
25
26
  const loader = _flagsComponents.default[code];
@@ -65,25 +66,35 @@ const getIconProps = _ref3 => {
65
66
  theme,
66
67
  shade: fillShade || _constants.DEFAULT_INTERNAL_SHADE
67
68
  });
69
+ const sizeIsCSSVar = isCSSVar(size);
70
+ const resolvedSize = sizeIsCSSVar ? undefined : size;
71
+ const sizeStyle = sizeIsCSSVar ? {
72
+ width: size,
73
+ height: size
74
+ } : {};
75
+ const baseStyle = filled ? {
76
+ color: themeColor
77
+ } : style || {};
68
78
  const defaultIconProps = {
69
79
  color: iconColor,
70
- size
80
+ size: resolvedSize
71
81
  };
72
82
  const energyIconProps = {
73
83
  stroke: iconColor,
74
- ...(size && {
75
- width: size,
76
- height: size
84
+ ...(resolvedSize && {
85
+ width: resolvedSize,
86
+ height: resolvedSize
77
87
  })
78
88
  };
79
89
  const flagProps = {
80
- width: size || 24,
81
- height: size || 24
90
+ width: resolvedSize || 24,
91
+ height: resolvedSize || 24
82
92
  };
83
93
  return {
84
- style: filled ? {
85
- color: themeColor
86
- } : style,
94
+ style: {
95
+ ...baseStyle,
96
+ ...sizeStyle
97
+ },
87
98
  ...(internalFill && {
88
99
  fill: internalFill
89
100
  }),
@@ -8,6 +8,7 @@ Botón de tres puntos verticales que despliega un menú de opciones. Soporta íc
8
8
  |------|------|---------|-------------|
9
9
  | `className` | `string` | `undefined` | Clase CSS aplicada al contenedor raíz. |
10
10
  | `classNames` | `shape({ button, icon })` | `{}` | Clases personalizadas para el botón trigger. |
11
+ | `disabled` | `bool` | `undefined` | Deshabilita el botón trigger. Cuando es `true`, el menú no puede abrirse. |
11
12
  | `Icon` | `elementType \| string` | `MoreVertIcon` | Ícono del botón trigger. Acepta un componente React o un nombre de ícono de Tabler (ej: `'IconDotsVertical'`). |
12
13
  | `menuItemProps` | `object` | `undefined` | Props pasadas a cada `MenuItem` de MUI. Útil para sobreescribir estilos (ej: `{ style: { minHeight: 'auto' } }`). |
13
14
  | `menuProps` | `object` | `undefined` | Props pasadas al componente `Menu` de MUI. El `borderRadius` del Paper es `8px` por defecto y se puede sobreescribir vía `menuProps.PaperProps`. |
@@ -2,7 +2,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
2
2
  import React, { useState } from 'react';
3
3
  import Menu from '@material-ui/core/Menu';
4
4
  import MenuItem from '@material-ui/core/MenuItem';
5
- import { arrayOf, elementType, func, object, oneOfType, shape, string } from 'prop-types';
5
+ import { arrayOf, bool, elementType, func, object, oneOfType, shape, string } from 'prop-types';
6
6
  import UTButton from '../UTButton';
7
7
  import UTIcon from '../UTIcon';
8
8
  import UTLabel from '../UTLabel';
@@ -12,6 +12,7 @@ const UTDotMenu = _ref => {
12
12
  let {
13
13
  className,
14
14
  classNames = DEFAULT_PROPS.classNames,
15
+ disabled,
15
16
  Icon = DEFAULT_PROPS.Icon,
16
17
  menuItemProps,
17
18
  menuProps,
@@ -26,6 +27,7 @@ const UTDotMenu = _ref => {
26
27
  icon: classNames.icon,
27
28
  root: classNames.button
28
29
  },
30
+ disabled: disabled,
29
31
  Icon: Icon,
30
32
  onClick: event => setAnchorEl(event.currentTarget),
31
33
  size: size,
@@ -68,6 +70,7 @@ UTDotMenu.propTypes = {
68
70
  button: string,
69
71
  icon: string
70
72
  }),
73
+ disabled: bool,
71
74
  Icon: oneOfType([elementType, string]),
72
75
  menuItemProps: object,
73
76
  menuProps: object,
@@ -54,6 +54,18 @@ export default {
54
54
  }
55
55
  }
56
56
  },
57
+ disabled: {
58
+ control: 'boolean',
59
+ description: 'Deshabilita el botón trigger. Cuando es `true`, el menú no puede abrirse.',
60
+ table: {
61
+ defaultValue: {
62
+ summary: 'undefined'
63
+ },
64
+ type: {
65
+ summary: 'bool'
66
+ }
67
+ }
68
+ },
57
69
  Icon: {
58
70
  control: 'text',
59
71
  description: 'Ícono del botón trigger. Acepta un nombre de ícono de Tabler (string) o un componente React. Por defecto muestra el ícono de tres puntos verticales (MoreVertIcon).',
@@ -242,6 +254,20 @@ export const ConIconProps = {
242
254
  }
243
255
  }
244
256
  };
257
+ export const BotonDeshabilitado = {
258
+ args: {
259
+ disabled: true,
260
+ options: BASIC_OPTIONS
261
+ },
262
+ name: 'Botón deshabilitado',
263
+ parameters: {
264
+ docs: {
265
+ description: {
266
+ story: '`disabled={true}` deshabilita el botón trigger. El menú no puede abrirse.'
267
+ }
268
+ }
269
+ }
270
+ };
245
271
  export const IconoPersonalizado = {
246
272
  args: {
247
273
  Icon: () => /*#__PURE__*/React.createElement("span", {
@@ -12,6 +12,7 @@ const FLAG_CODES = new Set(countries.map(_ref => {
12
12
  return code;
13
13
  }));
14
14
  const flagComponentCache = {};
15
+ const isCSSVar = value => typeof value === 'string' && value.startsWith('var(');
15
16
  const getFlagComponent = code => {
16
17
  if (!(code in flagComponentCache)) {
17
18
  const loader = flagComponentMap[code];
@@ -56,25 +57,35 @@ export const getIconProps = _ref3 => {
56
57
  theme,
57
58
  shade: fillShade || DEFAULT_INTERNAL_SHADE
58
59
  });
60
+ const sizeIsCSSVar = isCSSVar(size);
61
+ const resolvedSize = sizeIsCSSVar ? undefined : size;
62
+ const sizeStyle = sizeIsCSSVar ? {
63
+ width: size,
64
+ height: size
65
+ } : {};
66
+ const baseStyle = filled ? {
67
+ color: themeColor
68
+ } : style || {};
59
69
  const defaultIconProps = {
60
70
  color: iconColor,
61
- size
71
+ size: resolvedSize
62
72
  };
63
73
  const energyIconProps = {
64
74
  stroke: iconColor,
65
- ...(size && {
66
- width: size,
67
- height: size
75
+ ...(resolvedSize && {
76
+ width: resolvedSize,
77
+ height: resolvedSize
68
78
  })
69
79
  };
70
80
  const flagProps = {
71
- width: size || 24,
72
- height: size || 24
81
+ width: resolvedSize || 24,
82
+ height: resolvedSize || 24
73
83
  };
74
84
  return {
75
- style: filled ? {
76
- color: themeColor
77
- } : style,
85
+ style: {
86
+ ...baseStyle,
87
+ ...sizeStyle
88
+ },
78
89
  ...(internalFill && {
79
90
  fill: internalFill
80
91
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.166.0",
3
+ "version": "3.167.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",