@useblu/ocean-react 1.110.0 → 1.112.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/index.js CHANGED
@@ -468,31 +468,35 @@ var Badge = e.forwardRef(function (_a, ref) {
468
468
  Badge.displayName = 'Badge';
469
469
 
470
470
  var Header = function (_a) {
471
- var title = _a.title, subtitle = _a.subtitle, count = _a.count;
471
+ var title = _a.title, subtitle = _a.subtitle, count = _a.count, tag = _a.tag;
472
472
  return (e.createElement("div", { className: "ods-card-group__header" },
473
473
  e.createElement("div", { className: "ods-card-group__header--content" },
474
- e.createElement("p", { className: "ods-typography ods-typography__heading4" }, title),
474
+ e.createElement("div", { className: "container-line" },
475
+ e.createElement("p", { className: "ods-typography ods-typography__heading4" }, title),
476
+ tag && e.createElement(Tag, __assign$1({ size: "medium", setIconOff: true }, tag))),
475
477
  subtitle && (e.createElement("p", { className: "ods-typography ods-typography__description" }, subtitle))),
476
478
  count !== undefined && (e.createElement(Badge, { variation: "medium", color: count === 0 ? 'neutral' : 'alert', count: count }))));
477
479
  };
478
480
 
479
481
  var ActionButton = function (_a) {
480
- var actionLabel = _a.actionLabel, actionClick = _a.actionClick;
482
+ var actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick;
481
483
  return (e.createElement(e.Fragment, null,
482
484
  e.createElement("hr", { className: "ods-divider" }),
483
485
  e.createElement("button", { onClick: actionClick, type: "button", className: "ods-card-group__action", "aria-label": actionLabel },
484
486
  e.createElement("span", { className: "ods-card-group__action--label" }, actionLabel),
485
- e.createElement(re, { size: 20 }))));
487
+ e.createElement("div", { className: "ods-card-group__action--right" },
488
+ actionCount !== undefined && (e.createElement(Badge, { variation: "medium", color: actionCount === 0 ? 'neutral' : 'alert', count: actionCount })),
489
+ e.createElement(re, { size: 20 })))));
486
490
  };
487
491
 
488
492
  var CardGroup = e.forwardRef(function (_a, ref) {
489
- var title = _a.title, subtitle = _a.subtitle, actionLabel = _a.actionLabel, actionClick = _a.actionClick, count = _a.count, children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'minimal' : _b, rest = __rest$1(_a, ["title", "subtitle", "actionLabel", "actionClick", "count", "children", "variant"]);
493
+ var title = _a.title, subtitle = _a.subtitle, actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick, count = _a.count, tag = _a.tag, children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'minimal' : _b, rest = __rest$1(_a, ["title", "subtitle", "actionLabel", "actionCount", "actionClick", "count", "tag", "children", "variant"]);
490
494
  return (e.createElement("div", __assign$1({ ref: ref }, rest, { "data-testid": "card-group", className: classNames('ods-card-group', "ods-card-group--".concat(variant)) }),
491
- (title || subtitle) && (e.createElement(Header, { title: title, subtitle: subtitle, count: count })),
495
+ (title || subtitle) && (e.createElement(Header, { title: title, subtitle: subtitle, count: count, tag: tag })),
492
496
  children && variant !== 'header' && (e.createElement(e.Fragment, null,
493
497
  (title || subtitle) && e.createElement("hr", { className: "ods-divider" }),
494
498
  e.createElement("div", null, children))),
495
- actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionClick: actionClick }))));
499
+ actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionCount: actionCount, actionClick: actionClick }))));
496
500
  });
497
501
  CardGroup.displayName = 'CardGroup';
498
502
 
@@ -46885,11 +46889,12 @@ var Shortcut = function (_a) {
46885
46889
  return (e.createElement("div", __assign$1({ className: classNames('ods-shortcut', "ods-shortcut--".concat(size), blocked && 'ods-shortcut--blocked', disabled && 'ods-shortcut--disabled', fullWidth && 'ods-shortcut--full-width', count && 'ods-shortcut--with-badge', "ods-shortcut--".concat(orientation)) }, rest),
46886
46890
  blocked && (e.createElement("div", { className: "ods-shortcut__blocked" },
46887
46891
  e.createElement(At, null))),
46888
- count ? (e.createElement(Badge, { className: "ods-shortcut__badge", variation: "small", color: "alert", count: count })) : null,
46892
+ !blocked && count ? (e.createElement(Badge, { className: "ods-shortcut__badge", variation: "small", color: disabled ? 'neutral' : 'alert', count: count })) : null,
46893
+ !blocked && tag && orientation === 'vertical' && (e.createElement(Tag, { className: "ods-shortcut__tag", variant: "highlight", type: "important" }, tag)),
46889
46894
  e.createElement("div", { className: classNames('ods-shortcut__content', "ods-shortcut__content--".concat(orientation)) },
46890
46895
  e.createElement("div", { className: "ods-shortcut__icon" }, icon),
46891
46896
  e.createElement("h5", { className: classNames('ods-shortcut__label', 'ods-typography__heading5') }, label),
46892
- tag && (e.createElement(Tag, { variant: "highlight", type: "important" }, tag))),
46897
+ tag && orientation === 'horizontal' && (e.createElement(Tag, { variant: "highlight", type: "important" }, tag))),
46893
46898
  size === 'medium' && description && (e.createElement("span", { className: classNames('ods-shortcut__description', 'ods-typography__description') }, description))));
46894
46899
  };
46895
46900