@widergy/energy-ui 3.148.0 → 3.149.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.149.0](https://github.com/widergy/energy-ui/compare/v3.148.0...v3.149.0) (2026-05-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * [BRILLA-374] utstatus truncate and xl size ([#791](https://github.com/widergy/energy-ui/issues/791)) ([d94861a](https://github.com/widergy/energy-ui/commit/d94861a54defacd18df28d96f3065c954dcf21ee))
7
+
1
8
  # [3.148.0](https://github.com/widergy/energy-ui/compare/v3.147.0...v3.148.0) (2026-05-05)
2
9
 
3
10
 
@@ -11,6 +11,7 @@ const SIZES = exports.SIZES = {
11
11
  large: 'large',
12
12
  medium: 'medium',
13
13
  small: 'small',
14
+ xlarge: 'xlarge',
14
15
  xsmall: 'xsmall'
15
16
  };
16
17
  const VARIANTS = exports.VARIANTS = {
@@ -14,6 +14,7 @@ var _UTTooltip = _interopRequireDefault(require("../UTTooltip"));
14
14
  var _theme = require("./theme");
15
15
  var _constants = require("./constants");
16
16
  var _utils = require("./utils");
17
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
19
  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); }
19
20
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
@@ -31,6 +32,7 @@ const UTStatus = _ref => {
31
32
  title,
32
33
  tooltip,
33
34
  tooltipProps = {},
35
+ truncate,
34
36
  type = _constants.DEFAULT_PROPS.type,
35
37
  variant = _constants.DEFAULT_PROPS.variant,
36
38
  weight = _constants.DEFAULT_PROPS.weight,
@@ -103,10 +105,10 @@ const UTStatus = _ref => {
103
105
  })) : null;
104
106
  }, [adornments, size, variant]);
105
107
  const StatusRender = /*#__PURE__*/_react.default.createElement("div", {
106
- className: "".concat(classes.root, " ").concat(className || '', " ").concat(area ? '' : classes.withoutArea, " ").concat(areaType === _constants.AREA_TYPES.SQUARE ? '' : classes.roundedArea),
108
+ className: "".concat(classes.root, " ").concat(truncate ? _stylesModule.default.truncated : '', " ").concat(className || '', " ").concat(area ? '' : classes.withoutArea, " ").concat(areaType === _constants.AREA_TYPES.SQUARE ? '' : classes.roundedArea),
107
109
  title: title
108
110
  }, useValidAdornments && leftAdornments.map(renderAdornment), withoutIcon || useValidAdornments ? null : /*#__PURE__*/_react.default.createElement(IconComponent, iconProps), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
109
- className: classes.label,
111
+ className: "".concat(classes.label, " ").concat(truncate ? _stylesModule.default.truncatedLabel : ''),
110
112
  colorTheme: colorTheme,
111
113
  shade: type !== _constants.TYPES.negative ? '05' : undefined,
112
114
  dataTestId: labelDataTestId,
@@ -139,6 +141,7 @@ UTStatus.propTypes = {
139
141
  title: _propTypes.string,
140
142
  tooltip: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.element]),
141
143
  tooltipProps: _propTypes.object,
144
+ truncate: _propTypes.bool,
142
145
  type: _propTypes.string,
143
146
  variant: _propTypes.string,
144
147
  weight: _propTypes.string,
@@ -0,0 +1,13 @@
1
+ .truncated {
2
+ box-sizing: border-box;
3
+ overflow: hidden;
4
+ width: 100%;
5
+ }
6
+
7
+ .truncatedLabel {
8
+ flex: 1;
9
+ min-width: 0;
10
+ overflow: hidden;
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ }
@@ -34,6 +34,7 @@ const getGridGap = _ref3 => {
34
34
  [_constants.SIZES.large]: 'var(--UT-status-gap-large, 8px)',
35
35
  [_constants.SIZES.medium]: 'var(--UT-status-gap-medium, 8px)',
36
36
  [_constants.SIZES.small]: 'var(--UT-status-gap-small, 4px)',
37
+ [_constants.SIZES.xlarge]: 'var(--UT-status-gap-xlarge, 8px)',
37
38
  [_constants.SIZES.xsmall]: 'var(--UT-status-gap-xsmall, 4px)'
38
39
  }[size];
39
40
  };
@@ -45,6 +46,7 @@ const getPadding = _ref4 => {
45
46
  [_constants.SIZES.large]: 'var(--UT-status-padding-y-large, 4px) var(--UT-status-padding-x-large, 8px)',
46
47
  [_constants.SIZES.medium]: 'var(--UT-status-padding-y-medium, 4px) var(--UT-status-padding-x-medium, 8px)',
47
48
  [_constants.SIZES.small]: 'var(--UT-status-padding-y-small, 4px) var(--UT-status-padding-x-small, 8px)',
49
+ [_constants.SIZES.xlarge]: 'var(--UT-status-padding-y-xlarge, 4px) var(--UT-status-padding-x-xlarge, 8px)',
48
50
  [_constants.SIZES.xsmall]: 'var(--UT-status-padding-y-xsmall, 2px) var(--UT-status-padding-x-xsmall, 4px)'
49
51
  }[size];
50
52
  };
@@ -56,6 +58,7 @@ const getLabelVariant = _ref5 => {
56
58
  [_constants.SIZES.large]: 'body',
57
59
  [_constants.SIZES.medium]: 'small',
58
60
  [_constants.SIZES.small]: 'xsmall',
61
+ [_constants.SIZES.xlarge]: 'body',
59
62
  [_constants.SIZES.xsmall]: 'xsmall'
60
63
  }[size];
61
64
  };
@@ -68,6 +71,7 @@ const getIconSize = _ref6 => {
68
71
  [_constants.SIZES.large]: 'var(--UT-status-icon-size-xs, 20px)',
69
72
  [_constants.SIZES.medium]: 'var(--UT-status-icon-size-2xs, 16px)',
70
73
  [_constants.SIZES.small]: 'var(--UT-status-icon-size-3xs, 12px)',
74
+ [_constants.SIZES.xlarge]: 'var(--UT-status-icon-size-xs, 20px)',
71
75
  [_constants.SIZES.xsmall]: 'var(--UT-status-icon-size-3xs, 12px)'
72
76
  }[size];
73
77
  };
@@ -180,6 +184,10 @@ const retrieveStyle = _ref8 => {
180
184
  height: '8px',
181
185
  width: '8px'
182
186
  },
187
+ iconXlarge: {
188
+ height: '20px',
189
+ width: '20px'
190
+ },
183
191
  badgeSmall: {
184
192
  height: '8px',
185
193
  width: '8px'
@@ -192,6 +200,10 @@ const retrieveStyle = _ref8 => {
192
200
  height: '10px',
193
201
  width: '10px'
194
202
  },
203
+ badgeXlarge: {
204
+ height: '10px',
205
+ width: '10px'
206
+ },
195
207
  withoutArea: {
196
208
  backgroundColor: 'transparent !important'
197
209
  },
@@ -47,23 +47,27 @@ const interpreterSize = (size, classes) => {
47
47
  iconSmall,
48
48
  iconMedium,
49
49
  iconLarge,
50
+ iconXlarge,
50
51
  badgeXsmall,
51
52
  badgeSmall,
52
53
  badgeMedium,
53
- badgeLarge
54
+ badgeLarge,
55
+ badgeXlarge
54
56
  } = classes || {};
55
57
  return {
56
58
  [_constants.COMPONENT_KEYS.BADGE]: {
57
59
  [_constants.SIZES.xsmall]: badgeXsmall,
58
60
  [_constants.SIZES.small]: badgeSmall,
59
61
  [_constants.SIZES.medium]: badgeMedium,
60
- [_constants.SIZES.large]: badgeLarge
62
+ [_constants.SIZES.large]: badgeLarge,
63
+ [_constants.SIZES.xlarge]: badgeXlarge
61
64
  }[size],
62
65
  [_constants.COMPONENT_KEYS.ICON]: {
63
66
  [_constants.SIZES.xsmall]: iconXsmall,
64
67
  [_constants.SIZES.small]: iconSmall,
65
68
  [_constants.SIZES.medium]: iconMedium,
66
- [_constants.SIZES.large]: iconLarge
69
+ [_constants.SIZES.large]: iconLarge,
70
+ [_constants.SIZES.xlarge]: iconXlarge
67
71
  }[size]
68
72
  };
69
73
  };
@@ -243,6 +243,7 @@ const baseTokens = exports.baseTokens = {
243
243
  'UT-status-gap-large': 'gap-sm',
244
244
  'UT-status-gap-medium': 'gap-sm',
245
245
  'UT-status-gap-small': 'gap-xs',
246
+ 'UT-status-gap-xlarge': 'gap-sm',
246
247
  'UT-status-gap-xsmall': 'gap-xs',
247
248
  'UT-status-padding-y-large': 'padding-2xs',
248
249
  'UT-status-padding-x-large': 'padding-xs',
@@ -250,6 +251,8 @@ const baseTokens = exports.baseTokens = {
250
251
  'UT-status-padding-x-medium': 'padding-xs',
251
252
  'UT-status-padding-y-small': 'padding-2xs',
252
253
  'UT-status-padding-x-small': 'padding-xs',
254
+ 'UT-status-padding-y-xlarge': 'padding-2xs',
255
+ 'UT-status-padding-x-xlarge': 'padding-xs',
253
256
  'UT-status-padding-y-xsmall': 'padding-3xs',
254
257
  'UT-status-padding-x-xsmall': 'padding-2xs',
255
258
  'UT-status-radius': 'radius-sm',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.148.0",
3
+ "version": "3.149.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",