@widergy/energy-ui 3.164.0 → 3.165.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +15 -4
  2. package/dist/components/UTAlert/README.md +100 -0
  3. package/dist/components/UTAlert/stories/UTAlert.stories.js +239 -0
  4. package/dist/components/UTAlert/stories/storiesConstants.js +107 -0
  5. package/dist/components/UTBanner/index.js +11 -5
  6. package/dist/components/UTBanner/stories/UTBanner.stories.js +8 -0
  7. package/dist/components/UTBaseInputField/UTBaseInputField.stories.js +393 -0
  8. package/dist/components/UTSnackbar/README.md +105 -0
  9. package/dist/components/UTSnackbar/constants.js +134 -0
  10. package/dist/components/UTSnackbar/index.js +134 -0
  11. package/dist/components/UTSnackbar/stories/UTSnackbar.stories.js +350 -0
  12. package/dist/components/UTSnackbar/stories/storiesConstants.js +169 -0
  13. package/dist/components/UTSnackbar/styles.module.scss +82 -0
  14. package/dist/components/UTSnackbar/theme.js +57 -0
  15. package/dist/components/UTSnackbar/types.js +20 -0
  16. package/dist/components/UTSnackbar/utils.js +53 -0
  17. package/dist/components/UTTextArea/UTTextArea.stories.js +342 -0
  18. package/dist/components/UTTextInput/UTTextInput.stories.js +439 -0
  19. package/dist/constants/testIds.js +9 -0
  20. package/dist/esm/components/UTAlert/README.md +100 -0
  21. package/dist/esm/components/UTAlert/stories/UTAlert.stories.js +231 -0
  22. package/dist/esm/components/UTAlert/stories/storiesConstants.js +101 -0
  23. package/dist/esm/components/UTBanner/index.js +11 -5
  24. package/dist/esm/components/UTBanner/stories/UTBanner.stories.js +8 -0
  25. package/dist/esm/components/UTBaseInputField/UTBaseInputField.stories.js +385 -0
  26. package/dist/esm/components/UTSnackbar/README.md +105 -0
  27. package/dist/esm/components/UTSnackbar/constants.js +128 -0
  28. package/dist/esm/components/UTSnackbar/index.js +127 -0
  29. package/dist/esm/components/UTSnackbar/stories/UTSnackbar.stories.js +342 -0
  30. package/dist/esm/components/UTSnackbar/stories/storiesConstants.js +163 -0
  31. package/dist/esm/components/UTSnackbar/styles.module.scss +82 -0
  32. package/dist/esm/components/UTSnackbar/theme.js +50 -0
  33. package/dist/esm/components/UTSnackbar/types.js +14 -0
  34. package/dist/esm/components/UTSnackbar/utils.js +46 -0
  35. package/dist/esm/components/UTTextArea/UTTextArea.stories.js +334 -0
  36. package/dist/esm/components/UTTextInput/UTTextInput.stories.js +431 -0
  37. package/dist/esm/constants/testIds.js +9 -0
  38. package/dist/esm/index.js +2 -1
  39. package/dist/esm/utils/hooks/useCSSVariables/constants.js +9 -0
  40. package/dist/index.js +7 -0
  41. package/dist/utils/hooks/useCSSVariables/constants.js +9 -0
  42. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,14 +1,25 @@
1
- # [3.164.0](https://github.com/widergy/energy-ui/compare/v3.163.0...v3.164.0) (2026-06-09)
1
+ ## [3.165.1](https://github.com/widergy/energy-ui/compare/v3.165.0...v3.165.1) (2026-06-12)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * testid fix ([#816](https://github.com/widergy/energy-ui/issues/816)) ([0285aa9](https://github.com/widergy/energy-ui/commit/0285aa9c2f2fb10dd5a4a6a54788c2d9ea1760d5))
6
+ * added prop position to snackbar ([#818](https://github.com/widergy/energy-ui/issues/818)) ([676e43c](https://github.com/widergy/energy-ui/commit/676e43c4d625578b074506867879b0b8bdbe75ea))
7
7
 
8
+ # [3.165.0](https://github.com/widergy/energy-ui/compare/v3.164.0...v3.165.0) (2026-06-10)
8
9
 
9
- ### Features
10
+ ### Novedades y Mejoras
11
+
12
+ * Se incorpora un nuevo componente de notificaciones emergentes que permite mostrar mensajes informativos, de éxito, advertencia o error con estilos visuales configurables, soporte de íconos automáticos, acciones interactivas y cierre automático. Reemplaza y supera al componente de alertas anterior, adaptándose al diseño de cada entorno. [#813](https://github.com/widergy/Energy-UI/pull/813) [DIS-1106](https://widergy.atlassian.net/browse/DIS-1106)
13
+
14
+ # [3.164.0](https://github.com/widergy/energy-ui/compare/v3.163.0...v3.164.0) (2026-06-09)
15
+
16
+ ### Novedades y Mejoras
17
+
18
+ * Los campos de búsqueda y selección de fechas ahora son reconocibles por herramientas de pruebas automatizadas, mejorando la cobertura y confiabilidad del proceso de validación de la plataforma. [#807](https://github.com/widergy/Energy-UI/pull/807) [#816](https://github.com/widergy/Energy-UI/pull/816) [AUTO-257](https://widergy.atlassian.net/browse/AUTO-257)
19
+
20
+ ### Correcciones
10
21
 
11
- * [AUTO-257] Add test ids to management search ([#807](https://github.com/widergy/energy-ui/issues/807)) ([655afe4](https://github.com/widergy/energy-ui/commit/655afe42a3170099e1bcbb0c971c77fe549fdbb2))
22
+ * Mejoras internas de la plataforma. [`6431431`](https://github.com/widergy/Energy-UI/commit/6431431) [`f0e705e`](https://github.com/widergy/Energy-UI/commit/f0e705e)
12
23
 
13
24
  # [3.163.0](https://github.com/widergy/energy-ui/compare/v3.162.1...v3.163.0) (2026-06-08)
14
25
 
@@ -0,0 +1,100 @@
1
+ # UTAlert
2
+
3
+ Componente de alerta tipo Snackbar para mostrar notificaciones al usuario. Soporta cuatro tipos (success, error, info, warning), markdown en el mensaje y posicionamiento configurable. Se usa habitualmente junto al `AlertHandler` singleton para disparar alertas desde cualquier lugar de la aplicación.
4
+
5
+ ---
6
+
7
+ ## Props
8
+
9
+ ### `content` (shape)
10
+
11
+ Objeto que controla el estado y la apariencia de la alerta.
12
+
13
+ | Campo | Tipo | Default | Descripción |
14
+ | ----- | ---- | ------- | ----------- |
15
+ | `message` | `string` | `undefined` | Mensaje a mostrar. Soporta markdown. |
16
+ | `open` | `boolean` | `false` | Controla si la alerta está visible. |
17
+ | `type` | `'error' \| 'info' \| 'success' \| 'warning'` | `undefined` | Tipo de alerta. Determina el ícono y el color. |
18
+ | `timeDuration` | `number` | `undefined` | Duración en ms antes del cierre automático. |
19
+ | `topRight` | `boolean` | `false` | Si es `true`, aparece en la esquina superior derecha. Si es `false`, en la inferior izquierda. |
20
+ | `onClose` | `function` | `undefined` | Callback ejecutado al cerrar la alerta. |
21
+
22
+ ### Props de nivel superior
23
+
24
+ | Prop | Tipo | Default | Descripción |
25
+ | ---- | ---- | ------- | ----------- |
26
+ | `withoutIcon` | `boolean` | `undefined` | Si es `true`, oculta el ícono del tipo de alerta. |
27
+ | `classes` | `object` | `{}` | Clases CSS personalizadas para sobrescribir estilos del tema. |
28
+ | `closeDataTestId` | `string` | `undefined` | Identificador de test para el botón de cierre. |
29
+ | `labelDataTestId` | `string` | `undefined` | Identificador de test para el label del mensaje. |
30
+
31
+ ---
32
+
33
+ ## Uso básico
34
+
35
+ ```jsx
36
+ import { UTAlert } from '@widergy/energy-ui';
37
+
38
+ const MiComponente = () => (
39
+ <UTAlert
40
+ content={{
41
+ message: 'Operación completada exitosamente.',
42
+ open: true,
43
+ type: 'success'
44
+ }}
45
+ />
46
+ );
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Uso con AlertHandler
52
+
53
+ El patrón recomendado es inicializar `AlertHandler` una sola vez en el componente raíz y luego llamarlo desde cualquier parte de la aplicación.
54
+
55
+ ```jsx
56
+ import { useEffect, useState } from 'react';
57
+ import { UTAlert, AlertHandler } from '@widergy/energy-ui';
58
+
59
+ const AppRoot = () => {
60
+ const [alert, setAlert] = useState();
61
+
62
+ useEffect(() => {
63
+ AlertHandler.init({ setState: setAlert });
64
+ }, []);
65
+
66
+ return (
67
+ <>
68
+ <UTAlert content={alert} />
69
+ {/* resto de la app */}
70
+ </>
71
+ );
72
+ };
73
+
74
+ // Desde cualquier otro componente o servicio:
75
+ AlertHandler.success('Guardado correctamente.');
76
+ AlertHandler.error('Ocurrió un error. Intentá nuevamente.');
77
+ AlertHandler.info('Hay actualizaciones disponibles.');
78
+ AlertHandler.warning('Esta acción no se puede deshacer.');
79
+ ```
80
+
81
+ ### Métodos de AlertHandler
82
+
83
+ | Método | Descripción |
84
+ | ------ | ----------- |
85
+ | `init({ setState, duration })` | Inicializa el handler. `setState` es el setter de React. `duration` es la duración por defecto en ms (default: 5000). |
86
+ | `success(message, topRight?, timeDuration?)` | Muestra una alerta de éxito. |
87
+ | `error(message, topRight?, timeDuration?)` | Muestra una alerta de error. |
88
+ | `info(message, topRight?, timeDuration?)` | Muestra una alerta informativa. |
89
+ | `warning(message, topRight?, timeDuration?)` | Muestra una alerta de advertencia. |
90
+
91
+ ---
92
+
93
+ ## Variantes de tipo
94
+
95
+ | Tipo | Ícono | Descripción |
96
+ | ---- | ----- | ----------- |
97
+ | `success` | CheckCircle | Para operaciones exitosas. |
98
+ | `error` | Error | Para fallas o errores críticos. |
99
+ | `info` | Info | Para notificaciones informativas. |
100
+ | `warning` | Warning | Para acciones que requieren atención. |
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.TopRight = exports.Test = exports.SinIcono = exports.Playground = exports.ConMarkdown = exports.AllTypes = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _UTButton = _interopRequireDefault(require("../../UTButton"));
9
+ var _ = _interopRequireDefault(require(".."));
10
+ var _storiesConstants = require("./storiesConstants");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ const composeContent = _ref => {
14
+ let {
15
+ message,
16
+ open,
17
+ timeDuration,
18
+ topRight,
19
+ type
20
+ } = _ref;
21
+ return {
22
+ message,
23
+ open,
24
+ timeDuration,
25
+ topRight,
26
+ type
27
+ };
28
+ };
29
+ const AllTypesDemo = () => {
30
+ const [alertState, setAlertState] = (0, _react.useState)({
31
+ open: false
32
+ });
33
+ const showAlert = type => setAlertState({
34
+ message: "Alerta de tipo: ".concat(type),
35
+ open: true,
36
+ type
37
+ });
38
+ const handleClose = () => setAlertState(prev => ({
39
+ ...prev,
40
+ open: false
41
+ }));
42
+ return /*#__PURE__*/_react.default.createElement("div", {
43
+ style: {
44
+ display: 'flex',
45
+ gap: '8px'
46
+ }
47
+ }, _storiesConstants.ALERT_TYPES.map(type => /*#__PURE__*/_react.default.createElement(_UTButton.default, {
48
+ key: type,
49
+ onClick: () => showAlert(type),
50
+ variant: "outlined"
51
+ }, type)), /*#__PURE__*/_react.default.createElement(_.default, {
52
+ content: {
53
+ ...alertState,
54
+ onClose: handleClose
55
+ }
56
+ }));
57
+ };
58
+ var _default = exports.default = {
59
+ args: {
60
+ message: 'Este es un mensaje de alerta de ejemplo.',
61
+ open: true,
62
+ timeDuration: undefined,
63
+ topRight: false,
64
+ type: 'success',
65
+ withoutIcon: false
66
+ },
67
+ argTypes: _storiesConstants.ARG_TYPES,
68
+ component: _.default,
69
+ parameters: {
70
+ controls: {
71
+ exclude: ['classes', 'closeDataTestId', 'labelDataTestId']
72
+ },
73
+ docs: {
74
+ description: {
75
+ component: 'Componente de alerta tipo Snackbar para mostrar notificaciones al usuario. Soporta cuatro tipos (success, error, info, warning), markdown en el mensaje y posicionamiento configurable. Se usa habitualmente junto al `AlertHandler` singleton para disparar alertas desde cualquier lugar de la aplicación.'
76
+ }
77
+ }
78
+ },
79
+ title: 'Energy-UI/UTAlert'
80
+ };
81
+ const Playground = exports.Playground = {
82
+ name: 'Playground',
83
+ render: _ref2 => {
84
+ let {
85
+ message,
86
+ open,
87
+ timeDuration,
88
+ topRight,
89
+ type,
90
+ withoutIcon
91
+ } = _ref2;
92
+ return /*#__PURE__*/_react.default.createElement(_.default, {
93
+ content: composeContent({
94
+ message,
95
+ open,
96
+ timeDuration,
97
+ topRight,
98
+ type
99
+ }),
100
+ withoutIcon: withoutIcon
101
+ });
102
+ }
103
+ };
104
+ const AllTypes = exports.AllTypes = {
105
+ name: 'Todos los Tipos',
106
+ parameters: {
107
+ docs: {
108
+ description: {
109
+ story: 'Hacé clic en cada botón para ver el tipo de alerta correspondiente.'
110
+ }
111
+ }
112
+ },
113
+ render: () => /*#__PURE__*/_react.default.createElement(AllTypesDemo, null)
114
+ };
115
+ const TopRight = exports.TopRight = {
116
+ args: {
117
+ message: 'Esta alerta aparece en la esquina superior derecha.',
118
+ open: true,
119
+ topRight: true,
120
+ type: 'info'
121
+ },
122
+ name: 'Posición Superior Derecha',
123
+ parameters: {
124
+ docs: {
125
+ description: {
126
+ story: 'Con `topRight: true` en el objeto `content`, la alerta aparece en la esquina superior derecha con animación de slide desde la derecha.'
127
+ }
128
+ }
129
+ },
130
+ render: _ref3 => {
131
+ let {
132
+ message,
133
+ open,
134
+ timeDuration,
135
+ topRight,
136
+ type,
137
+ withoutIcon
138
+ } = _ref3;
139
+ return /*#__PURE__*/_react.default.createElement(_.default, {
140
+ content: composeContent({
141
+ message,
142
+ open,
143
+ timeDuration,
144
+ topRight,
145
+ type
146
+ }),
147
+ withoutIcon: withoutIcon
148
+ });
149
+ }
150
+ };
151
+ const SinIcono = exports.SinIcono = {
152
+ args: {
153
+ message: 'Alerta sin ícono de tipo.',
154
+ open: true,
155
+ type: 'warning',
156
+ withoutIcon: true
157
+ },
158
+ name: 'Sin Ícono',
159
+ parameters: {
160
+ docs: {
161
+ description: {
162
+ story: 'Con `withoutIcon: true` se oculta el ícono del tipo de alerta.'
163
+ }
164
+ }
165
+ },
166
+ render: _ref4 => {
167
+ let {
168
+ message,
169
+ open,
170
+ timeDuration,
171
+ topRight,
172
+ type,
173
+ withoutIcon
174
+ } = _ref4;
175
+ return /*#__PURE__*/_react.default.createElement(_.default, {
176
+ content: composeContent({
177
+ message,
178
+ open,
179
+ timeDuration,
180
+ topRight,
181
+ type
182
+ }),
183
+ withoutIcon: withoutIcon
184
+ });
185
+ }
186
+ };
187
+ const ConMarkdown = exports.ConMarkdown = {
188
+ args: {
189
+ message: 'Operación completada. El archivo **reporte_enero.pdf** fue generado *exitosamente*.',
190
+ open: true,
191
+ type: 'success'
192
+ },
193
+ name: 'Con Markdown',
194
+ parameters: {
195
+ docs: {
196
+ description: {
197
+ story: 'El campo `message` soporta sintaxis markdown. El texto se renderiza a través de `UTLabel` con `withMarkdown`.'
198
+ }
199
+ }
200
+ },
201
+ render: _ref5 => {
202
+ let {
203
+ message,
204
+ open,
205
+ timeDuration,
206
+ topRight,
207
+ type,
208
+ withoutIcon
209
+ } = _ref5;
210
+ return /*#__PURE__*/_react.default.createElement(_.default, {
211
+ content: composeContent({
212
+ message,
213
+ open,
214
+ timeDuration,
215
+ topRight,
216
+ type
217
+ }),
218
+ withoutIcon: withoutIcon
219
+ });
220
+ }
221
+ };
222
+ const Test = exports.Test = {
223
+ name: 'Test',
224
+ parameters: {
225
+ docs: {
226
+ description: {
227
+ story: 'Story para el Test Runner. Renderiza los cuatro tipos de alerta simultáneamente.'
228
+ }
229
+ }
230
+ },
231
+ render: () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, _storiesConstants.ALERT_TYPES.map(type => /*#__PURE__*/_react.default.createElement(_.default, {
232
+ key: type,
233
+ content: {
234
+ message: "Alerta ".concat(type),
235
+ open: true,
236
+ type
237
+ }
238
+ })))
239
+ };
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ARG_TYPES = exports.ALERT_TYPES = void 0;
7
+ var _utils = require("stories/utils");
8
+ const ALERT_TYPES = exports.ALERT_TYPES = ['error', 'info', 'success', 'warning'];
9
+ const ARG_TYPES = exports.ARG_TYPES = {
10
+ closeDataTestId: {
11
+ control: false,
12
+ description: 'Identificador de test para el botón de cierre.',
13
+ table: {
14
+ defaultValue: {
15
+ summary: 'undefined'
16
+ },
17
+ type: {
18
+ summary: 'string'
19
+ }
20
+ }
21
+ },
22
+ labelDataTestId: {
23
+ control: false,
24
+ description: 'Identificador de test para el label del mensaje.',
25
+ table: {
26
+ defaultValue: {
27
+ summary: 'undefined'
28
+ },
29
+ type: {
30
+ summary: 'string'
31
+ }
32
+ }
33
+ },
34
+ message: {
35
+ control: 'text',
36
+ description: 'Mensaje a mostrar en la alerta. Pertenece al objeto `content`. Soporta markdown.',
37
+ table: {
38
+ defaultValue: {
39
+ summary: 'undefined'
40
+ },
41
+ type: {
42
+ summary: 'string'
43
+ }
44
+ }
45
+ },
46
+ open: {
47
+ control: 'boolean',
48
+ description: 'Controla si la alerta está visible. Pertenece al objeto `content`.',
49
+ table: {
50
+ defaultValue: {
51
+ summary: 'false'
52
+ },
53
+ type: {
54
+ summary: 'boolean'
55
+ }
56
+ }
57
+ },
58
+ timeDuration: {
59
+ control: 'number',
60
+ description: 'Duración en milisegundos antes del cierre automático. Pertenece al objeto `content`.',
61
+ table: {
62
+ defaultValue: {
63
+ summary: 'undefined'
64
+ },
65
+ type: {
66
+ summary: 'number'
67
+ }
68
+ }
69
+ },
70
+ topRight: {
71
+ control: 'boolean',
72
+ description: 'Si es `true`, la alerta aparece en la esquina superior derecha. Si es `false`, en la inferior izquierda. Pertenece al objeto `content`.',
73
+ table: {
74
+ defaultValue: {
75
+ summary: 'false'
76
+ },
77
+ type: {
78
+ summary: 'boolean'
79
+ }
80
+ }
81
+ },
82
+ type: {
83
+ control: 'select',
84
+ description: 'Tipo de alerta. Determina el ícono y el color. Pertenece al objeto `content`.',
85
+ options: ALERT_TYPES,
86
+ table: {
87
+ defaultValue: {
88
+ summary: 'undefined'
89
+ },
90
+ type: {
91
+ summary: (0, _utils.joinArgTypes)(ALERT_TYPES)
92
+ }
93
+ }
94
+ },
95
+ withoutIcon: {
96
+ control: 'boolean',
97
+ description: 'Si es `true`, oculta el ícono del tipo de alerta.',
98
+ table: {
99
+ defaultValue: {
100
+ summary: 'undefined'
101
+ },
102
+ type: {
103
+ summary: 'boolean'
104
+ }
105
+ }
106
+ }
107
+ };
@@ -27,6 +27,7 @@ const UTBanner = _ref => {
27
27
  colorTheme = _constants.DEFAULT_PROPS.colorTheme,
28
28
  dataTestId,
29
29
  description,
30
+ descriptionProps,
30
31
  helpText,
31
32
  Icon,
32
33
  iconPlacement = _constants.DEFAULT_PROPS.iconPlacement,
@@ -35,6 +36,7 @@ const UTBanner = _ref => {
35
36
  secondaryButton,
36
37
  size = _constants.DEFAULT_PROPS.size,
37
38
  title,
39
+ titleProps,
38
40
  variant = _constants.DEFAULT_PROPS.variant
39
41
  } = _ref;
40
42
  const isVerticalButton = buttonPlacement === _constants.PLACEMENTS.VERTICAL;
@@ -86,16 +88,18 @@ const UTBanner = _ref => {
86
88
  dataTestId: dataTestId ? "".concat(dataTestId, ".category.").concat(_testIds.ID_CONSTANTS.LABEL) : undefined,
87
89
  variant: "xsmall",
88
90
  weight: "medium"
89
- }, category), !!title && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
91
+ }, category), !!title && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
90
92
  colorTheme: labelColorTheme,
91
- dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(_testIds.ID_CONSTANTS.TITLE, ".").concat(_testIds.ID_CONSTANTS.LABEL) : undefined,
92
93
  variant: titleVariant,
93
94
  weight: "medium"
94
- }, title), !!description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
95
+ }, titleProps, {
96
+ dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(_testIds.ID_CONSTANTS.TITLE, ".").concat(_testIds.ID_CONSTANTS.LABEL) : undefined
97
+ }), title), !!description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
95
98
  colorTheme: labelColorTheme,
96
- dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(_testIds.ID_CONSTANTS.DESCRIPTION, ".").concat(_testIds.ID_CONSTANTS.LABEL) : undefined,
97
99
  variant: descriptionVariant
98
- }, description), !!helpText && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
100
+ }, descriptionProps, {
101
+ dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(_testIds.ID_CONSTANTS.DESCRIPTION, ".").concat(_testIds.ID_CONSTANTS.LABEL) : undefined
102
+ }), description), !!helpText && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
99
103
  colorTheme: secondaryLabelColorTheme,
100
104
  dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(_testIds.ID_CONSTANTS.HELP_TEXT, ".").concat(_testIds.ID_CONSTANTS.LABEL) : undefined,
101
105
  variant: "small"
@@ -127,6 +131,7 @@ UTBanner.propTypes = {
127
131
  colorTheme: (0, _propTypes.oneOf)(Object.values(_constants.COLOR_THEMES)),
128
132
  dataTestId: _propTypes.string,
129
133
  description: _propTypes.string,
134
+ descriptionProps: _propTypes.object,
130
135
  helpText: _propTypes.string,
131
136
  Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
132
137
  iconPlacement: (0, _propTypes.oneOf)(Object.values(_constants.PLACEMENTS)),
@@ -135,6 +140,7 @@ UTBanner.propTypes = {
135
140
  secondaryButton: _types.buttonType,
136
141
  size: (0, _propTypes.oneOf)(Object.values(_constants.SIZES)),
137
142
  title: _propTypes.string,
143
+ titleProps: _propTypes.object,
138
144
  variant: (0, _propTypes.oneOf)(Object.values(_constants.VARIANTS))
139
145
  };
140
146
  var _default = exports.default = UTBanner;
@@ -47,6 +47,10 @@ var _default = exports.default = {
47
47
  control: 'text',
48
48
  description: 'Optional body text shown below the title (small).'
49
49
  },
50
+ descriptionProps: {
51
+ control: 'object',
52
+ description: 'Extra props spread into the UTLabel that renders the description.'
53
+ },
50
54
  helpText: {
51
55
  control: 'text',
52
56
  description: 'Optional secondary text shown below the description (small, gray).'
@@ -81,6 +85,10 @@ var _default = exports.default = {
81
85
  control: 'text',
82
86
  description: 'Main text of the banner.'
83
87
  },
88
+ titleProps: {
89
+ control: 'object',
90
+ description: 'Extra props spread into the UTLabel that renders the title.'
91
+ },
84
92
  variant: {
85
93
  control: {
86
94
  type: 'select'