@true-engineering/true-react-common-ui-kit 3.30.0 → 3.32.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.
@@ -27987,7 +27987,8 @@
27987
27987
  info: {},
27988
27988
  warning: {},
27989
27989
  ok: {},
27990
- "not-ok": {}
27990
+ "not-ok": {},
27991
+ custom: {}
27991
27992
  });
27992
27993
  function _define_property$e(obj, key, value) {
27993
27994
  if (key in obj) {
@@ -28042,20 +28043,22 @@
28042
28043
  return target;
28043
28044
  }
28044
28045
  var Notification = function(param) {
28045
- var children = param.children, type = param.type, _param_isFullWidth = param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? true : _param_isFullWidth, text = param.text, title = param.title, testId = param.testId, _param_size = param.size, size = _param_size === void 0 ? "s" : _param_size, data = param.data, tweakStyles = param.tweakStyles;
28046
+ var children = param.children, type = param.type, _param_isFullWidth = param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? true : _param_isFullWidth, text = param.text, title = param.title, testId = param.testId, _param_size = param.size, size = _param_size === void 0 ? "s" : _param_size, data = param.data, icon = param.icon, tweakStyles = param.tweakStyles;
28046
28047
  var classes = useStyles$b({
28047
28048
  theme: tweakStyles
28048
28049
  });
28049
28050
  var hasText = trueReactPlatformHelpers.isStringNotEmpty(text);
28050
28051
  var hasTitle = trueReactPlatformHelpers.isStringNotEmpty(title);
28052
+ var isDefaultType = type !== "custom";
28053
+ var hasIcon = trueReactPlatformHelpers.isReactNodeNotEmpty(icon) || isDefaultType;
28051
28054
  var _obj2;
28052
28055
  return /* @__PURE__ */ jsxs("div", _object_spread_props$c(_object_spread$d({
28053
28056
  className: clsx(classes.root, classes[size], classes[type], (_obj2 = {}, _define_property$e(_obj2, classes.inline, !isFullWidth), _define_property$e(_obj2, classes.withTitle, hasTitle), _define_property$e(_obj2, classes.withText, hasText), _obj2))
28054
28057
  }, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
28055
28058
  children: [
28056
- /* @__PURE__ */ jsx("div", {
28059
+ hasIcon && /* @__PURE__ */ jsx("div", {
28057
28060
  className: classes.icon,
28058
- children: /* @__PURE__ */ jsx(Icon, {
28061
+ children: trueReactPlatformHelpers.isReactNodeNotEmpty(icon) ? renderIcon(icon) : isDefaultType && /* @__PURE__ */ jsx(Icon, {
28059
28062
  type: "status-".concat(type)
28060
28063
  })
28061
28064
  }),