@useblu/ocean-react 1.116.0 → 1.117.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/index.js CHANGED
@@ -47467,11 +47467,12 @@ var InternalListActions = e.forwardRef(function (_a, forwardedRef) {
47467
47467
  });
47468
47468
  InternalListActions.displayName = 'InternalListActions';
47469
47469
 
47470
- var CardListAction = e.forwardRef(function (_a, ref) {
47471
- var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _b = _a.inverted, inverted = _b === void 0 ? false : _b, _c = _a.type, type = _c === void 0 ? 'default' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.loading, loading = _e === void 0 ? false : _e, icon = _a.icon, indicator = _a.indicator, _f = _a.actionType, actionType = _f === void 0 ? 'chevron' : _f, menuActions = _a.menuActions, _g = _a.menuPosition, menuPosition = _g === void 0 ? 'bottom-right' : _g, onClick = _a.onClick, className = _a.className, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "disabled", "loading", "icon", "indicator", "actionType", "menuActions", "menuPosition", "onClick", "className"]);
47470
+ var ListAction = e.forwardRef(function (_a, ref) {
47471
+ var _b;
47472
+ var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, icon = _a.icon, indicator = _a.indicator, _h = _a.actionType, actionType = _h === void 0 ? 'chevron' : _h, menuActions = _a.menuActions, _j = _a.menuPosition, menuPosition = _j === void 0 ? 'bottom-right' : _j, onClick = _a.onClick, className = _a.className, _k = _a.showDivider, showDivider = _k === void 0 ? false : _k, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "indicator", "actionType", "menuActions", "menuPosition", "onClick", "className", "showDivider"]);
47472
47473
  var renderActionIcon = function () {
47473
47474
  if (actionType === 'chevron') {
47474
- return (e.createElement("div", { className: "ods-card-list-action__action" },
47475
+ return (e.createElement("div", { className: 'ods-list-action__action' },
47475
47476
  e.createElement(re, { size: 20 })));
47476
47477
  }
47477
47478
  if (actionType === 'menu' || actionType === 'swipe') {
@@ -47479,25 +47480,29 @@ var CardListAction = e.forwardRef(function (_a, ref) {
47479
47480
  }
47480
47481
  return null;
47481
47482
  };
47482
- if (loading) {
47483
- return (e.createElement("button", __assign$1({ ref: ref, type: "button", "data-testid": "card-list-action", className: classNames('ods-card-list-action', 'ods-card-list-action--loading', className) }, rest),
47484
- e.createElement("div", { className: "ods-card-list-action__skeleton" },
47485
- e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
47486
- e.createElement(SkeletonBar, { width: "100%", height: "16px" }))));
47487
- }
47488
- return (e.createElement("button", __assign$1({ ref: ref, type: "button", "data-testid": "card-list-action", className: classNames('ods-card-list-action', className, {
47489
- 'ods-card-list-action--disabled': disabled,
47490
- 'ods-card-list-action--swipe-mode': actionType === 'swipe',
47491
- }), onClick: onClick, disabled: disabled }, rest),
47492
- icon && (e.createElement("div", { className: classNames('ods-card-list-action__icon', {
47493
- 'ods-card-list-action__icon--inactive': type === 'inactive',
47483
+ var renderLoadingContent = function () { return (e.createElement("div", { className: 'ods-list-action__skeleton' },
47484
+ e.createElement(SkeletonBar, { width: '40%', height: '16px' }),
47485
+ e.createElement(SkeletonBar, { width: '100%', height: '16px' }))); };
47486
+ var renderContent = function () { return (e.createElement(e.Fragment, null,
47487
+ icon && (e.createElement("div", { className: classNames('ods-list-action__icon', {
47488
+ 'ods-list-action__icon--inactive': status === 'inactive',
47494
47489
  }) }, icon)),
47495
- e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: type }),
47496
- e.createElement("div", { className: "ods-card-list-action__trailing" },
47497
- indicator && (e.createElement("div", { className: "ods-card-list-action__indicator" }, indicator)),
47498
- renderActionIcon())));
47490
+ e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
47491
+ e.createElement("div", { className: 'ods-list-action__trailing' },
47492
+ indicator && (e.createElement("div", { className: 'ods-list-action__indicator' }, indicator)),
47493
+ renderActionIcon()))); };
47494
+ var buttonClassName = classNames('ods-list-action', className, (_b = {
47495
+ 'ods-list-action--loading': loading,
47496
+ 'ods-list-action--disabled': disabled,
47497
+ 'ods-list-action--swipe-mode': actionType === 'swipe'
47498
+ },
47499
+ _b["ods-list-action--".concat(type)] = type,
47500
+ _b));
47501
+ return (e.createElement("div", { className: 'ods-list-action__container' },
47502
+ e.createElement("button", __assign$1({ ref: ref, type: 'button', "data-testid": 'list-action', className: buttonClassName, onClick: loading ? undefined : onClick, disabled: disabled || loading }, rest), loading ? renderLoadingContent() : renderContent()),
47503
+ showDivider && type === 'text' && (e.createElement("div", { className: 'ods-list-action__divider' }))));
47499
47504
  });
47500
- CardListAction.displayName = 'CardListAction';
47505
+ ListAction.displayName = 'ListAction';
47501
47506
 
47502
47507
  exports.Accordion = Accordion;
47503
47508
  exports.Alert = Alert;
@@ -47505,7 +47510,6 @@ exports.Badge = Badge;
47505
47510
  exports.Breadcrumb = Breadcrumb;
47506
47511
  exports.Button = Button$1;
47507
47512
  exports.CardGroup = CardGroup;
47508
- exports.CardListAction = CardListAction;
47509
47513
  exports.CardListItem = CardListItem;
47510
47514
  exports.Carousel = Carousel;
47511
47515
  exports.Chart = DoughnutChart;
@@ -47524,6 +47528,7 @@ exports.IconButton = IconButton;
47524
47528
  exports.Input = Input;
47525
47529
  exports.Link = Link;
47526
47530
  exports.List = List;
47531
+ exports.ListAction = ListAction;
47527
47532
  exports.ListSelectable = ListSelectable;
47528
47533
  exports.Modal = Modal;
47529
47534
  exports.Progress = Progress;