@widergy/energy-ui 3.110.0 → 3.110.2

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.110.2](https://github.com/widergy/energy-ui/compare/v3.110.1...v3.110.2) (2025-10-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add status accent variant ([#700](https://github.com/widergy/energy-ui/issues/700)) ([c6cf426](https://github.com/widergy/energy-ui/commit/c6cf426b025266418b1be160fdf09c8bc393d959))
7
+
8
+ ## [3.110.1](https://github.com/widergy/energy-ui/compare/v3.110.0...v3.110.1) (2025-10-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [PROMI] radio group fix ([#699](https://github.com/widergy/energy-ui/issues/699)) ([1e8d561](https://github.com/widergy/energy-ui/commit/1e8d561e0274d819f40bd543ef1f5c6a15108f59))
14
+
1
15
  # [3.110.0](https://github.com/widergy/energy-ui/compare/v3.109.0...v3.110.0) (2025-10-07)
2
16
 
3
17
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WithError = exports.Default = exports.Categorized = exports.CardVariant = exports.ButtonVariant = void 0;
6
+ exports.default = exports.Default = exports.Categorized = exports.CardVariant = exports.ButtonVariant = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _utils = require("stories/utils");
9
9
  var _constants = require("../UTCheckbox/versions/V1/constants");
@@ -93,18 +93,6 @@ var _default = exports.default = {
93
93
  }
94
94
  }
95
95
  },
96
- error: {
97
- control: 'text',
98
- description: 'Mensaje de error a mostrar.',
99
- table: {
100
- defaultValue: {
101
- summary: 'undefined'
102
- },
103
- type: {
104
- summary: 'string'
105
- }
106
- }
107
- },
108
96
  required: {
109
97
  control: 'boolean',
110
98
  description: 'Indica si el campo es obligatorio.',
@@ -250,23 +238,6 @@ const Default = exports.Default = {
250
238
  },
251
239
  name: 'Playground'
252
240
  };
253
- const WithError = exports.WithError = {
254
- render: args => {
255
- const [value, setValue] = _react.default.useState(args.value || '');
256
- return /*#__PURE__*/_react.default.createElement(_V.default, _extends({}, args, {
257
- value: value,
258
- onChange: setValue
259
- }));
260
- },
261
- args: {
262
- options: defaultOptions,
263
- title: 'Selecciona una opción',
264
- value: '',
265
- error: 'Por favor selecciona una opción',
266
- required: true
267
- },
268
- name: 'Con Error'
269
- };
270
241
  const Categorized = exports.Categorized = {
271
242
  render: args => {
272
243
  const [value, setValue] = _react.default.useState(args.value || '');
@@ -8,10 +8,8 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = require("prop-types");
9
9
  var _RadioGroup = _interopRequireDefault(require("@material-ui/core/RadioGroup"));
10
10
  var _buttonTypes = require("../../../../types/buttonTypes");
11
- var _utils = require("../../../UTValidation/utils");
12
11
  var _UTFieldLabel = _interopRequireDefault(require("../../../UTFieldLabel"));
13
12
  var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
14
- var _UTValidation = _interopRequireDefault(require("../../../UTValidation"));
15
13
  var _Radio = _interopRequireDefault(require("./components/Radio"));
16
14
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
15
  var _constants = require("./constants");
@@ -24,7 +22,6 @@ const UTRadioGroup = _ref => {
24
22
  classNames = {},
25
23
  dataTestId,
26
24
  disabled,
27
- error,
28
25
  horizontalSpacing = 'medium',
29
26
  itemDataTestId,
30
27
  onChange = () => {},
@@ -38,9 +35,6 @@ const UTRadioGroup = _ref => {
38
35
  descriptionProps,
39
36
  verticalSpacing = 'medium'
40
37
  } = _ref;
41
- const validationData = (0, _react.useMemo)(() => error && (0, _utils.formatErrorToValidation)(error, {
42
- withIcon: false
43
- }), [error]);
44
38
  const categorizedOptions = (0, _react.useMemo)(() => {
45
39
  const optionsGrouped = options.reduce((groupedOptions, option) => {
46
40
  const category = option.category || _constants.NO_CATEGORY;
@@ -64,14 +58,12 @@ const UTRadioGroup = _ref => {
64
58
  return /*#__PURE__*/_react.default.createElement("div", {
65
59
  className: "".concat(_stylesModule.default.container, " ").concat(classNames.root),
66
60
  "data-testid": dataTestId
67
- }, (title || validationData) && /*#__PURE__*/_react.default.createElement("div", {
61
+ }, title && /*#__PURE__*/_react.default.createElement("div", {
68
62
  className: "".concat(_stylesModule.default.headerContainer, " ").concat(classNames.header)
69
63
  }, title && /*#__PURE__*/_react.default.createElement(_UTFieldLabel.default, {
70
64
  actions: actions,
71
65
  required: required
72
- }, title), validationData && /*#__PURE__*/_react.default.createElement(_UTValidation.default, {
73
- validationData: validationData
74
- })), /*#__PURE__*/_react.default.createElement(_RadioGroup.default, {
66
+ }, title)), /*#__PURE__*/_react.default.createElement(_RadioGroup.default, {
75
67
  value: value || '',
76
68
  className: _stylesModule.default.container
77
69
  }, categorizedOptions.map((_ref5, catIndex) => {
@@ -11,6 +11,7 @@ const SIZES = exports.SIZES = {
11
11
  small: 'small'
12
12
  };
13
13
  const VARIANTS = exports.VARIANTS = {
14
+ accent: 'accent',
14
15
  error: 'error',
15
16
  information: 'information',
16
17
  success: 'success',
@@ -25,7 +25,7 @@ const UTStatus = _ref => {
25
25
  className,
26
26
  Icon,
27
27
  labelDataTestId,
28
- size,
28
+ size = _constants.DEFAULT_PROPS.size,
29
29
  title,
30
30
  tooltip,
31
31
  tooltipProps = {},
@@ -46,7 +46,7 @@ const UTStatus = _ref => {
46
46
  })), [StatusIcon, type, variant, classes.icon]);
47
47
  const showTooltip = !(0, _isEmpty.default)(tooltip);
48
48
  const StatusRender = /*#__PURE__*/_react.default.createElement("div", {
49
- className: "".concat(classes.root, " ").concat(className),
49
+ className: "".concat(classes.root, " ").concat(className || ''),
50
50
  title: title
51
51
  }, withoutIcon ? null : /*#__PURE__*/_react.default.createElement(IconComponent, iconProps), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
52
52
  className: classes.label,
@@ -59,6 +59,7 @@ const getIconSize = _ref5 => {
59
59
  };
60
60
  exports.getIconSize = getIconSize;
61
61
  const defaultIconMapper = variant => ({
62
+ [_constants.VARIANTS.accent]: 'IconCheck',
62
63
  [_constants.VARIANTS.error]: 'IconX',
63
64
  [_constants.VARIANTS.information]: 'IconInfoCircle',
64
65
  [_constants.VARIANTS.success]: 'IconCheck',
@@ -82,7 +83,7 @@ exports.validateProps = validateProps;
82
83
  const retrieveStyle = _ref7 => {
83
84
  let {
84
85
  theme,
85
- size,
86
+ size = _constants.DEFAULT_PROPS.size,
86
87
  type,
87
88
  uppercase,
88
89
  variant
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.110.0",
3
+ "version": "3.110.2",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",