@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/CHANGELOG.md +6 -0
- package/{CardListAction/CardListAction.d.ts → ListAction/ListAction.d.ts} +10 -6
- package/ListAction/ListAction.d.ts.map +1 -0
- package/ListAction/index.d.ts +4 -0
- package/ListAction/index.d.ts.map +1 -0
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.es.js +26 -21
- package/index.es.js.map +1 -1
- package/index.js +26 -21
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/CardListAction/CardListAction.d.ts.map +0 -1
- package/CardListAction/index.d.ts +0 -4
- package/CardListAction/index.d.ts.map +0 -1
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
|
|
47471
|
-
var
|
|
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:
|
|
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
|
-
|
|
47483
|
-
|
|
47484
|
-
|
|
47485
|
-
|
|
47486
|
-
|
|
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:
|
|
47496
|
-
e.createElement("div", { className:
|
|
47497
|
-
indicator && (e.createElement("div", { className:
|
|
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
|
-
|
|
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;
|