@widergy/energy-ui 3.127.0 → 3.128.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,3 +1,10 @@
1
+ # [3.128.0](https://github.com/widergy/energy-ui/compare/v3.127.0...v3.128.0) (2026-01-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * [AXCH-842] uticon and utselectable card features ([#729](https://github.com/widergy/energy-ui/issues/729)) ([0874a52](https://github.com/widergy/energy-ui/commit/0874a52d6973e0e21245c9a1bc730ceb4232cef7))
7
+
1
8
  # [3.127.0](https://github.com/widergy/energy-ui/compare/v3.126.0...v3.127.0) (2026-01-06)
2
9
 
3
10
 
@@ -95,6 +95,7 @@ exports.getClassNames = getClassNames;
95
95
  const retrieveStyle = _ref4 => {
96
96
  var _theme$Palette$action2, _theme$Palette$action3, _theme$Palette$action4;
97
97
  let {
98
+ areaColor,
98
99
  color,
99
100
  colorTheme,
100
101
  shade,
@@ -107,16 +108,16 @@ const retrieveStyle = _ref4 => {
107
108
  });
108
109
  const border = "2px solid ".concat(borderColor);
109
110
  const defaultBackgrounds = {
110
- accent: ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.accent['01']) || theme.Palette.accent['01'],
111
- dark: theme.Palette.light['03'],
112
- error: theme.Palette.error['01'],
113
- gray: theme.Palette.light['03'],
114
- information: theme.Palette.information['01'],
115
- light: theme.Palette.light['03'],
116
- negative: ((_theme$Palette$action3 = theme.Palette.actions) === null || _theme$Palette$action3 === void 0 ? void 0 : _theme$Palette$action3.negative['01']) || theme.Palette.negative['01'],
117
- neutral: ((_theme$Palette$action4 = theme.Palette.actions) === null || _theme$Palette$action4 === void 0 ? void 0 : _theme$Palette$action4.neutral['01']) || theme.Palette.neutral['01'],
118
- success: theme.Palette.success['01'],
119
- warning: theme.Palette.warning['01']
111
+ accent: areaColor || ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.accent['01']) || theme.Palette.accent['01'],
112
+ dark: areaColor || theme.Palette.light['03'],
113
+ error: areaColor || theme.Palette.error['01'],
114
+ gray: areaColor || theme.Palette.light['03'],
115
+ information: areaColor || theme.Palette.information['01'],
116
+ light: areaColor || theme.Palette.light['03'],
117
+ negative: areaColor || ((_theme$Palette$action3 = theme.Palette.actions) === null || _theme$Palette$action3 === void 0 ? void 0 : _theme$Palette$action3.negative['01']) || theme.Palette.negative['01'],
118
+ neutral: areaColor || ((_theme$Palette$action4 = theme.Palette.actions) === null || _theme$Palette$action4 === void 0 ? void 0 : _theme$Palette$action4.neutral['01']) || theme.Palette.neutral['01'],
119
+ success: areaColor || theme.Palette.success['01'],
120
+ warning: areaColor || theme.Palette.warning['01']
120
121
  };
121
122
  const variantStyles = Object.keys(defaultBackgrounds).reduce((acc, type) => {
122
123
  acc["".concat(type, "Default")] = {
@@ -9,6 +9,8 @@ const APPEARANCES = exports.APPEARANCES = {
9
9
  WHITE: 'white'
10
10
  };
11
11
  const SIZES = exports.SIZES = {
12
+ XLARGE: 'xlarge',
13
+ LARGE: 'large',
12
14
  MEDIUM: 'medium',
13
15
  SMALL: 'small'
14
16
  };
@@ -12,6 +12,7 @@ var _UTTooltip = _interopRequireDefault(require("../UTTooltip"));
12
12
  var _WithTheme = _interopRequireDefault(require("../WithTheme"));
13
13
  var _componentUtils = require("../../utils/componentUtils");
14
14
  var _UTIcon = _interopRequireDefault(require("../UTIcon"));
15
+ var _UTAvatar = _interopRequireDefault(require("../UTAvatar"));
15
16
  var _constants = require("./constants");
16
17
  var _theme = require("./theme");
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -56,6 +57,8 @@ const UTSelectableCard = _ref => {
56
57
  dataTestId,
57
58
  description,
58
59
  disabled = false,
60
+ avatar,
61
+ avatarProps = {},
59
62
  Icon,
60
63
  iconProps = {},
61
64
  onClick,
@@ -71,12 +74,15 @@ const UTSelectableCard = _ref => {
71
74
  }, iconProps)) : /*#__PURE__*/_react.default.createElement(Icon, {
72
75
  className: "".concat(classes.icon, " ").concat(classNames.icon)
73
76
  });
77
+ const AvatarComponent = avatar ? /*#__PURE__*/_react.default.createElement(_UTAvatar.default, _extends({
78
+ size: _constants.SIZES.LARGE
79
+ }, avatarProps)) : null;
74
80
  return /*#__PURE__*/_react.default.createElement("div", {
75
- className: "\n ".concat(classes.item, "\n ").concat(disabled ? classes["".concat(appearance, "DisabledContainer")] : selected ? classes["".concat(appearance, "SelectedContainer")] : classes["".concat(appearance, "Apareance")], "\n ").concat(classes["".concat(size, "Size")], "\n "),
81
+ className: "\n ".concat(classes.item, "\n ").concat(disabled ? "".concat(classes["".concat(appearance, "DisabledContainer")], " ").concat(classNames["".concat(appearance, "DisabledContainer")] || '') : selected ? "".concat(classes["".concat(appearance, "SelectedContainer")], " ").concat(classNames["".concat(appearance, "SelectedContainer")] || '') : "".concat(classes["".concat(appearance, "Apareance")], " ").concat(classNames["".concat(appearance, "Apareance")] || ''), "\n ").concat(classes["".concat(size, "Size")], "\n"),
76
82
  "data-testid": dataTestId,
77
83
  onClick: () => !disabled && onClick(),
78
84
  role: "button"
79
- }, Icon && IconComponent, /*#__PURE__*/_react.default.createElement("div", {
85
+ }, Icon && !avatar && IconComponent, avatar && !Icon && AvatarComponent, /*#__PURE__*/_react.default.createElement("div", {
80
86
  className: "".concat(classes.textContainer, " ").concat(checkIcon && classes.textContainerWithCheckedIcon)
81
87
  }, /*#__PURE__*/_react.default.createElement("div", {
82
88
  className: classes.column
@@ -113,6 +119,8 @@ UTSelectableCard.propTypes = {
113
119
  title: _propTypes.string
114
120
  }),
115
121
  appearance: (0, _propTypes.oneOf)([_constants.APPEARANCES.GRAY, _constants.APPEARANCES.WHITE]),
122
+ avatar: _propTypes.bool,
123
+ avatarProps: (0, _propTypes.objectOf)(_propTypes.string),
116
124
  checkIcon: _propTypes.bool,
117
125
  classes: (0, _propTypes.objectOf)(_propTypes.string),
118
126
  classNames: (0, _propTypes.objectOf)(_propTypes.string),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.127.0",
3
+ "version": "3.128.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",