@widergy/energy-ui 3.171.0 → 3.171.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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
- # [3.171.0](https://github.com/widergy/energy-ui/compare/v3.170.0...v3.171.0) (2026-06-22)
1
+ ## [3.171.1](https://github.com/widergy/energy-ui/compare/v3.171.0...v3.171.1) (2026-06-23)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
+
6
+ * [OUG] radio group error ([#827](https://github.com/widergy/energy-ui/issues/827)) ([8b3224a](https://github.com/widergy/energy-ui/commit/8b3224a97d184dbc3ca37bb182c8b84e3cbb157a))
7
+
8
+ # [3.171.0](https://github.com/widergy/energy-ui/compare/v3.170.0...v3.171.0) (2026-06-22)
9
+
10
+ ### Novedades y Mejoras
5
11
 
6
- * disabled prop in sidebar utpanel ([#826](https://github.com/widergy/energy-ui/issues/826)) ([f7ce127](https://github.com/widergy/energy-ui/commit/f7ce127d78e5c49d0a8b9a80eae8d2dae02c381d))
12
+ * Ahora es posible deshabilitar elementos individuales del panel lateral, impidiendo su acceso cuando no están disponibles o no corresponden al contexto del usuario. [#826](https://github.com/widergy/Energy-UI/pull/826) [AXCH-1778](https://widergy.atlassian.net/browse/AXCH-1778)
7
13
 
8
14
  # [3.170.0](https://github.com/widergy/energy-ui/compare/v3.169.0...v3.170.0) (2026-06-22)
9
15
 
@@ -10,6 +10,8 @@ var _RadioGroup = _interopRequireDefault(require("@material-ui/core/RadioGroup")
10
10
  var _buttonTypes = require("../../../../types/buttonTypes");
11
11
  var _UTFieldLabel = _interopRequireDefault(require("../../../UTFieldLabel"));
12
12
  var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
13
+ var _utils = require("../../../UTValidation/utils");
14
+ var _UTValidation = _interopRequireDefault(require("../../../UTValidation"));
13
15
  var _Radio = _interopRequireDefault(require("./components/Radio"));
14
16
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
15
17
  var _constants = require("./constants");
@@ -21,9 +23,13 @@ const UTRadioGroup = _ref => {
21
23
  actions,
22
24
  classNames = {},
23
25
  dataTestId,
26
+ descriptionProps,
24
27
  disabled,
28
+ error,
29
+ errorDataTestId,
25
30
  horizontalSpacing = 'medium',
26
31
  itemDataTestId,
32
+ nameProps,
27
33
  onChange = () => {},
28
34
  options,
29
35
  required,
@@ -31,8 +37,6 @@ const UTRadioGroup = _ref => {
31
37
  title,
32
38
  value = null,
33
39
  variant,
34
- nameProps,
35
- descriptionProps,
36
40
  verticalSpacing = 'medium'
37
41
  } = _ref;
38
42
  const categorizedOptions = (0, _react.useMemo)(() => {
@@ -55,6 +59,7 @@ const UTRadioGroup = _ref => {
55
59
  return categoryA === _constants.NO_CATEGORY ? -1 : categoryB === _constants.NO_CATEGORY ? 1 : 0;
56
60
  });
57
61
  }, [options]);
62
+ const validationData = (0, _react.useMemo)(() => error && (0, _utils.formatErrorToValidation)(error), [error]);
58
63
  return /*#__PURE__*/_react.default.createElement("div", {
59
64
  className: "".concat(_stylesModule.default.container, " ").concat(classNames.root),
60
65
  "data-testid": dataTestId
@@ -88,7 +93,10 @@ const UTRadioGroup = _ref => {
88
93
  spacing: horizontalSpacing,
89
94
  variant: variant
90
95
  }, (item === null || item === void 0 ? void 0 : item.configuration) || {}, item))));
91
- })));
96
+ })), validationData && /*#__PURE__*/_react.default.createElement(_UTValidation.default, {
97
+ dataTestId: errorDataTestId,
98
+ validationData: validationData
99
+ }));
92
100
  };
93
101
  UTRadioGroup.propTypes = {
94
102
  actions: (0, _propTypes.arrayOf)(_buttonTypes.buttonTypes),
@@ -97,6 +105,7 @@ UTRadioGroup.propTypes = {
97
105
  descriptionProps: _propTypes.object,
98
106
  disabled: _propTypes.bool,
99
107
  error: _propTypes.string,
108
+ errorDataTestId: _propTypes.string,
100
109
  horizontalSpacing: _propTypes.string,
101
110
  itemDataTestId: _propTypes.string,
102
111
  nameProps: _propTypes.object,
@@ -5,6 +5,8 @@ import RadioGroup from '@material-ui/core/RadioGroup';
5
5
  import { buttonTypes } from '../../../../types/buttonTypes';
6
6
  import UTFieldLabel from '../../../UTFieldLabel';
7
7
  import UTLabel from '../../../UTLabel';
8
+ import { formatErrorToValidation } from '../../../UTValidation/utils';
9
+ import UTValidation from '../../../UTValidation';
8
10
  import Radio from './components/Radio';
9
11
  import styles from './styles.module.scss';
10
12
  import { NO_CATEGORY } from './constants';
@@ -13,9 +15,13 @@ const UTRadioGroup = _ref => {
13
15
  actions,
14
16
  classNames = {},
15
17
  dataTestId,
18
+ descriptionProps,
16
19
  disabled,
20
+ error,
21
+ errorDataTestId,
17
22
  horizontalSpacing = 'medium',
18
23
  itemDataTestId,
24
+ nameProps,
19
25
  onChange = () => {},
20
26
  options,
21
27
  required,
@@ -23,8 +29,6 @@ const UTRadioGroup = _ref => {
23
29
  title,
24
30
  value = null,
25
31
  variant,
26
- nameProps,
27
- descriptionProps,
28
32
  verticalSpacing = 'medium'
29
33
  } = _ref;
30
34
  const categorizedOptions = useMemo(() => {
@@ -47,6 +51,7 @@ const UTRadioGroup = _ref => {
47
51
  return categoryA === NO_CATEGORY ? -1 : categoryB === NO_CATEGORY ? 1 : 0;
48
52
  });
49
53
  }, [options]);
54
+ const validationData = useMemo(() => error && formatErrorToValidation(error), [error]);
50
55
  return /*#__PURE__*/React.createElement("div", {
51
56
  className: "".concat(styles.container, " ").concat(classNames.root),
52
57
  "data-testid": dataTestId
@@ -80,7 +85,10 @@ const UTRadioGroup = _ref => {
80
85
  spacing: horizontalSpacing,
81
86
  variant: variant
82
87
  }, (item === null || item === void 0 ? void 0 : item.configuration) || {}, item))));
83
- })));
88
+ })), validationData && /*#__PURE__*/React.createElement(UTValidation, {
89
+ dataTestId: errorDataTestId,
90
+ validationData: validationData
91
+ }));
84
92
  };
85
93
  UTRadioGroup.propTypes = {
86
94
  actions: arrayOf(buttonTypes),
@@ -89,6 +97,7 @@ UTRadioGroup.propTypes = {
89
97
  descriptionProps: object,
90
98
  disabled: bool,
91
99
  error: string,
100
+ errorDataTestId: string,
92
101
  horizontalSpacing: string,
93
102
  itemDataTestId: string,
94
103
  nameProps: object,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.171.0",
3
+ "version": "3.171.1",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",