@useblu/ocean-react 1.135.3 → 1.137.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/Banner/Banner.d.ts +24 -0
- package/Banner/Banner.d.ts.map +1 -0
- package/Banner/index.d.ts +2 -0
- package/Banner/index.d.ts.map +1 -0
- package/CHANGELOG.md +13 -0
- package/CornerTag/CornerTag.d.ts +10 -0
- package/CornerTag/CornerTag.d.ts.map +1 -0
- package/CornerTag/index.d.ts +3 -0
- package/CornerTag/index.d.ts.map +1 -0
- package/ListAction/ListAction.d.ts +3 -1
- package/ListAction/ListAction.d.ts.map +1 -1
- package/ListExpandable/ListExpandable.d.ts +3 -1
- package/ListExpandable/ListExpandable.d.ts.map +1 -1
- package/ListReadOnly/ListReadOnly.d.ts +6 -1
- package/ListReadOnly/ListReadOnly.d.ts.map +1 -1
- package/ListSelectable/ListSelectable.d.ts +13 -3
- package/ListSelectable/ListSelectable.d.ts.map +1 -1
- package/ListSelectable/index.d.ts +1 -0
- package/ListSelectable/index.d.ts.map +1 -1
- package/_shared/components/ContentList/ContentList.d.ts +5 -2
- package/_shared/components/ContentList/ContentList.d.ts.map +1 -1
- package/_shared/components/ContentList/index.d.ts +1 -1
- package/_shared/components/ContentList/index.d.ts.map +1 -1
- package/_shared/components/ListContainer/ListContainer.d.ts +3 -0
- package/_shared/components/ListContainer/ListContainer.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +76 -28
- package/index.es.js.map +1 -1
- package/index.js +76 -27
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5450,8 +5450,10 @@ TextArea.displayName = 'TextArea';
|
|
|
5450
5450
|
|
|
5451
5451
|
var ContentList = function (_a) {
|
|
5452
5452
|
var _b, _c, _d;
|
|
5453
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.type, type = _f === void 0 ? 'default' : _f;
|
|
5453
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.type, type = _f === void 0 ? 'default' : _f, indicator = _a.indicator, indicatorPosition = _a.indicatorPosition;
|
|
5454
|
+
var stackedIndicator = indicator && indicatorPosition && (e.createElement("div", { className: classNames('ods-content-list__indicator', "ods-content-list__indicator--".concat(indicatorPosition)) }, indicator));
|
|
5454
5455
|
return (e.createElement("div", { className: "ods-content-list" },
|
|
5456
|
+
indicatorPosition === 'above' && stackedIndicator,
|
|
5455
5457
|
e.createElement("p", { className: classNames('ods-typography', (_b = {
|
|
5456
5458
|
'ods-typography__paragraph': !inverted,
|
|
5457
5459
|
'ods-typography__description': inverted
|
|
@@ -5470,7 +5472,8 @@ var ContentList = function (_a) {
|
|
|
5470
5472
|
description)),
|
|
5471
5473
|
caption && (e.createElement("p", { className: classNames("ods-typography ods-typography__captionbold", (_d = {},
|
|
5472
5474
|
_d["ods-typography__paragraph--".concat(type)] = type && type === 'inactive',
|
|
5473
|
-
_d)) }, caption))
|
|
5475
|
+
_d)) }, caption)),
|
|
5476
|
+
indicatorPosition === 'below' && stackedIndicator));
|
|
5474
5477
|
};
|
|
5475
5478
|
|
|
5476
5479
|
var SkeletonBar = function (_a) {
|
|
@@ -5478,9 +5481,17 @@ var SkeletonBar = function (_a) {
|
|
|
5478
5481
|
return (e.createElement("div", __assign$1({ className: "ods-skeleton-bar", style: { width: width, height: height } }, props)));
|
|
5479
5482
|
};
|
|
5480
5483
|
|
|
5484
|
+
var CornerTag = e.forwardRef(function (_a, ref) {
|
|
5485
|
+
var label = _a.label, _b = _a.color, color = _b === void 0 ? 'primaryDown' : _b, className = _a.className;
|
|
5486
|
+
if (!label)
|
|
5487
|
+
return null;
|
|
5488
|
+
return (e.createElement("span", { ref: ref, className: classNames('ods-corner-tag', "ods-corner-tag--".concat(color), className), "aria-label": label }, label));
|
|
5489
|
+
});
|
|
5490
|
+
CornerTag.displayName = 'CornerTag';
|
|
5491
|
+
|
|
5481
5492
|
var ListContainer = e.forwardRef(function (_a, ref) {
|
|
5482
5493
|
var _b, _c;
|
|
5483
|
-
var _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.showDivider, showDivider = _e === void 0 ? false : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, highlight = _a.highlight, children = _a.children, className = _a.className, rest = __rest$1(_a, ["type", "showDivider", "hasError", "highlight", "children", "className"]);
|
|
5494
|
+
var _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.showDivider, showDivider = _e === void 0 ? false : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, highlight = _a.highlight, cornerTag = _a.cornerTag, children = _a.children, className = _a.className, rest = __rest$1(_a, ["type", "showDivider", "hasError", "highlight", "cornerTag", "children", "className"]);
|
|
5484
5495
|
return (e.createElement("div", { className: "ods-list-container" },
|
|
5485
5496
|
e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-list-container__content', className, {
|
|
5486
5497
|
'ods-list-container__content--card': type === 'card',
|
|
@@ -5488,7 +5499,8 @@ var ListContainer = e.forwardRef(function (_a, ref) {
|
|
|
5488
5499
|
'ods-list-container__content--text': type === 'text',
|
|
5489
5500
|
}) }, rest),
|
|
5490
5501
|
children,
|
|
5491
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" }))
|
|
5502
|
+
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" })),
|
|
5503
|
+
type === 'card' && (cornerTag === null || cornerTag === void 0 ? void 0 : cornerTag.label) && e.createElement(CornerTag, __assign$1({}, cornerTag))),
|
|
5492
5504
|
(highlight === null || highlight === void 0 ? void 0 : highlight.caption) && (e.createElement("div", { className: "ods-list-container__highlight", "data-testid": "list-container-highlight", style: { backgroundColor: (_b = highlight.backgroundColor) !== null && _b !== void 0 ? _b : '#F3F5FE' } },
|
|
5493
5505
|
e.createElement("p", { className: "ods-typography ods-typography__caption", style: { color: (_c = highlight.captionColor) !== null && _c !== void 0 ? _c : '#67697A' } }, highlight.caption)))));
|
|
5494
5506
|
});
|
|
@@ -5496,16 +5508,17 @@ ListContainer.displayName = 'ListContainer';
|
|
|
5496
5508
|
|
|
5497
5509
|
var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
5498
5510
|
var _b;
|
|
5499
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.
|
|
5511
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.indicatorPosition, indicatorPosition = _c === void 0 ? 'inline' : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.inverted, inverted = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.loading, loading = _h === void 0 ? false : _h, className = _a.className, _j = _a.showDivider, showDivider = _j === void 0 ? false : _j, highlight = _a.highlight, cornerTag = _a.cornerTag, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "indicatorPosition", "type", "status", "inverted", "disabled", "loading", "className", "showDivider", "highlight", "cornerTag"]);
|
|
5500
5512
|
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-readonly__skeleton" },
|
|
5501
5513
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
5502
5514
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
5515
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
5503
5516
|
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
5504
5517
|
icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
|
|
5505
5518
|
'ods-list-readonly__icon--inactive': status === 'inactive',
|
|
5506
5519
|
}) }, icon)),
|
|
5507
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
5508
|
-
indicator && (e.createElement("div", { className: "ods-list-readonly__trailing" },
|
|
5520
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
5521
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-readonly__trailing" },
|
|
5509
5522
|
e.createElement("div", { className: "ods-list-readonly__indicator" }, indicator))))); };
|
|
5510
5523
|
var cardClassName = classNames('ods-list-readonly', className, (_b = {
|
|
5511
5524
|
'ods-list-readonly--loading': loading,
|
|
@@ -5513,21 +5526,23 @@ var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
|
5513
5526
|
},
|
|
5514
5527
|
_b["ods-list-readonly--".concat(type)] = type,
|
|
5515
5528
|
_b));
|
|
5516
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
5529
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight, cornerTag: cornerTag },
|
|
5517
5530
|
e.createElement("div", __assign$1({ ref: ref, "data-testid": "card-list-readonly", className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
5518
5531
|
});
|
|
5519
5532
|
ListReadOnly.displayName = 'ListReadOnly';
|
|
5520
5533
|
|
|
5521
|
-
var ListSelectable = e.forwardRef(function (
|
|
5522
|
-
var
|
|
5523
|
-
var title =
|
|
5534
|
+
var ListSelectable = e.forwardRef(function (props, ref) {
|
|
5535
|
+
var _a;
|
|
5536
|
+
var _b = props, title = _b.title, description = _b.description, caption = _b.caption, strikethroughDescription = _b.strikethroughDescription, inverted = _b.inverted, loading = _b.loading, disabled = _b.disabled, checkbox = _b.checkbox, radio = _b.radio, className = _b.className, showDivider = _b.showDivider, indicator = _b.indicator, _c = _b.indicatorPosition, indicatorPosition = _c === void 0 ? 'inline' : _c, isSelectableDisabled = _b.isSelectableDisabled, highlight = _b.highlight, _d = _b.status, status = _d === void 0 ? 'default' : _d, _e = _b.type, type = _e === void 0 ? 'card' : _e, _f = _b.platform, platform = _f === void 0 ? 'web' : _f, cornerTag = _b.cornerTag, rest = __rest$1(_b, ["title", "description", "caption", "strikethroughDescription", "inverted", "loading", "disabled", "checkbox", "radio", "className", "showDivider", "indicator", "indicatorPosition", "isSelectableDisabled", "highlight", "status", "type", "platform", "cornerTag"]);
|
|
5537
|
+
var cardCornerTag = type === 'card' ? cornerTag : undefined;
|
|
5524
5538
|
var hasError = e.useMemo(function () { return (radio === null || radio === void 0 ? void 0 : radio.error) || (checkbox === null || checkbox === void 0 ? void 0 : checkbox.error); }, [radio === null || radio === void 0 ? void 0 : radio.error, checkbox === null || checkbox === void 0 ? void 0 : checkbox.error]);
|
|
5525
5539
|
var isInputDisabled = e.useMemo(function () { return (radio === null || radio === void 0 ? void 0 : radio.disabled) || (checkbox === null || checkbox === void 0 ? void 0 : checkbox.disabled) || disabled; }, [radio === null || radio === void 0 ? void 0 : radio.disabled, checkbox === null || checkbox === void 0 ? void 0 : checkbox.disabled, disabled]);
|
|
5540
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
5526
5541
|
var internalList = e.useMemo(function () {
|
|
5527
5542
|
var _a;
|
|
5528
5543
|
return (e.createElement(e.Fragment, null,
|
|
5529
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: disabled ? 'inactive' : status }),
|
|
5530
|
-
indicator && (e.createElement("div", { className: classNames('ods-list-selectable__indicator', (_a = {},
|
|
5544
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: disabled ? 'inactive' : status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
5545
|
+
indicator && !stackedPosition && (e.createElement("div", { className: classNames('ods-list-selectable__indicator', (_a = {},
|
|
5531
5546
|
_a["ods-list-selectable__indicator--".concat(platform)] = platform,
|
|
5532
5547
|
_a)) }, indicator))));
|
|
5533
5548
|
}, [
|
|
@@ -5538,6 +5553,7 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5538
5553
|
inverted,
|
|
5539
5554
|
status,
|
|
5540
5555
|
indicator,
|
|
5556
|
+
stackedPosition,
|
|
5541
5557
|
disabled,
|
|
5542
5558
|
platform,
|
|
5543
5559
|
]);
|
|
@@ -5547,14 +5563,14 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5547
5563
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" })));
|
|
5548
5564
|
}
|
|
5549
5565
|
if (isSelectableDisabled) {
|
|
5550
|
-
return (e.createElement(ListReadOnly, __assign$1({ title: title, description: description, status: status, type: type, inverted: inverted, disabled: disabled, loading: loading, className: className, showDivider: showDivider, indicator: indicator, caption: caption, strikethroughDescription: strikethroughDescription, highlight: highlight }, rest, { ref: ref })));
|
|
5566
|
+
return (e.createElement(ListReadOnly, __assign$1({ title: title, description: description, status: status, type: type, inverted: inverted, disabled: disabled, loading: loading, className: className, showDivider: showDivider, indicator: indicator, indicatorPosition: indicatorPosition, caption: caption, strikethroughDescription: strikethroughDescription, highlight: highlight, cornerTag: cardCornerTag }, rest, { ref: ref })));
|
|
5551
5567
|
}
|
|
5552
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight },
|
|
5553
|
-
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (
|
|
5568
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight, cornerTag: cardCornerTag },
|
|
5569
|
+
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (_a = {
|
|
5554
5570
|
'ods-list-selectable--disabled': isInputDisabled
|
|
5555
5571
|
},
|
|
5556
|
-
|
|
5557
|
-
|
|
5572
|
+
_a["ods-list-selectable--".concat(platform)] = platform,
|
|
5573
|
+
_a)), ref: ref }, rest),
|
|
5558
5574
|
checkbox && e.createElement(Checkbox, __assign$1({}, checkbox, { label: internalList })),
|
|
5559
5575
|
radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))));
|
|
5560
5576
|
});
|
|
@@ -26265,6 +26281,36 @@ var Steps = function (_a) {
|
|
|
26265
26281
|
return (e.createElement("svg", { height: "20", width: 30 * (steps - 1) + 22, viewBox: "0 0 ".concat(30 * (steps - 1) + 22, " 20"), fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "step-".concat(currentStep) }, Array.from(Array(steps).keys()).map(function (step) { return (e.createElement("g", { key: step }, getCurrentStep(step + 1))); })));
|
|
26266
26282
|
};
|
|
26267
26283
|
|
|
26284
|
+
var PRIMARY_VARIANT_MAP = {
|
|
26285
|
+
default: 'primary',
|
|
26286
|
+
warning: 'primaryWarning',
|
|
26287
|
+
negative: 'primaryCritical',
|
|
26288
|
+
emphasys: 'secondary',
|
|
26289
|
+
};
|
|
26290
|
+
var SECONDARY_VARIANT_MAP = {
|
|
26291
|
+
default: 'tertiary',
|
|
26292
|
+
warning: 'tertiaryWarning',
|
|
26293
|
+
negative: 'tertiaryCritical',
|
|
26294
|
+
emphasys: 'tertiary',
|
|
26295
|
+
};
|
|
26296
|
+
var Banner = e.forwardRef(function (_a, ref) {
|
|
26297
|
+
var _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.type, type = _c === void 0 ? 'default' : _c, title = _a.title, description = _a.description, image = _a.image, primaryAction = _a.primaryAction, secondaryAction = _a.secondaryAction, className = _a.className, rest = __rest$1(_a, ["size", "type", "title", "description", "image", "primaryAction", "secondaryAction", "className"]);
|
|
26298
|
+
var isEmphasys = type === 'emphasys';
|
|
26299
|
+
var hasActions = primaryAction || secondaryAction;
|
|
26300
|
+
var imageEl = image ? (e.createElement("img", { className: "ods-banner__image", src: image, alt: "", "aria-hidden": "true" })) : null;
|
|
26301
|
+
return (e.createElement("div", __assign$1({ ref: ref }, rest, { className: classNames('ods-banner', "ods-banner--".concat(size), "ods-banner--".concat(type), className) }),
|
|
26302
|
+
imageEl && size === 'large' && (e.createElement("div", { className: "ods-banner__image-wrapper ods-banner__image-wrapper--top" }, imageEl)),
|
|
26303
|
+
e.createElement("div", { className: "ods-banner__body" },
|
|
26304
|
+
e.createElement("div", { className: "ods-banner__content" },
|
|
26305
|
+
e.createElement(Typography, { variant: "heading4", inverse: isEmphasys, className: "ods-banner__title" }, title),
|
|
26306
|
+
description && (e.createElement(Typography, { variant: "description", inverse: isEmphasys, className: "ods-banner__description" }, description)),
|
|
26307
|
+
hasActions && (e.createElement("div", { className: "ods-banner__actions" },
|
|
26308
|
+
primaryAction && (e.createElement(Button$1, { size: "sm", variant: PRIMARY_VARIANT_MAP[type], onClick: primaryAction.onClick }, primaryAction.label)),
|
|
26309
|
+
secondaryAction && (e.createElement(Button$1, { size: "sm", variant: SECONDARY_VARIANT_MAP[type], onClick: secondaryAction.onClick }, secondaryAction.label))))),
|
|
26310
|
+
imageEl && size === 'small' && (e.createElement("div", { className: "ods-banner__image-wrapper ods-banner__image-wrapper--side" }, imageEl)))));
|
|
26311
|
+
});
|
|
26312
|
+
Banner.displayName = 'Banner';
|
|
26313
|
+
|
|
26268
26314
|
var CrossSellCard = e.forwardRef(function (_a, ref) {
|
|
26269
26315
|
var title = _a.title, className = _a.className, description = _a.description, imageSrc = _a.imageSrc, ctaText = _a.ctaText, ctaAction = _a.ctaAction, customIcon = _a.customIcon, rest = __rest$1(_a, ["title", "className", "description", "imageSrc", "ctaText", "ctaAction", "customIcon"]);
|
|
26270
26316
|
return (e.createElement("div", __assign$1({ ref: ref }, rest, { className: classNames('ods-cross-sell-card', className) }),
|
|
@@ -47845,9 +47891,9 @@ var AmountDetails = function (_a) {
|
|
|
47845
47891
|
|
|
47846
47892
|
var ListAction = e.forwardRef(function (_a, ref) {
|
|
47847
47893
|
var _b;
|
|
47848
|
-
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 =
|
|
47849
|
-
var
|
|
47850
|
-
var
|
|
47894
|
+
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.indicatorPosition, indicatorPosition = _h === void 0 ? 'inline' : _h, _j = _a.actionType, actionType = _j === void 0 ? 'chevron' : _j, menuActions = _a.menuActions, _k = _a.menuPosition, menuPosition = _k === void 0 ? 'bottom-right' : _k, onClick = _a.onClick, className = _a.className, _l = _a.showDivider, showDivider = _l === void 0 ? false : _l, amountDetails = _a.amountDetails, position = _a.position, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "indicator", "indicatorPosition", "actionType", "menuActions", "menuPosition", "onClick", "className", "showDivider", "amountDetails", "position", "highlight"]);
|
|
47895
|
+
var _m = e.useState(false), isSwipeOpen = _m[0], setIsSwipeOpen = _m[1];
|
|
47896
|
+
var _o = e.useState(0), menuWidth = _o[0], setMenuWidth = _o[1];
|
|
47851
47897
|
var handleSwipeOpenChange = function (isOpen, width) {
|
|
47852
47898
|
setIsSwipeOpen(isOpen);
|
|
47853
47899
|
if (width !== undefined) {
|
|
@@ -47870,6 +47916,7 @@ var ListAction = e.forwardRef(function (_a, ref) {
|
|
|
47870
47916
|
var contentStyle = isSwipeOpen && menuWidth > 0
|
|
47871
47917
|
? { transform: "translateX(-".concat(menuWidth, "px)") }
|
|
47872
47918
|
: {};
|
|
47919
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
47873
47920
|
var showLeading = position && icon;
|
|
47874
47921
|
var showLineAbove = position === 'middle' || position === 'last';
|
|
47875
47922
|
var showLineBelow = position === 'first' || position === 'middle';
|
|
@@ -47887,9 +47934,9 @@ var ListAction = e.forwardRef(function (_a, ref) {
|
|
|
47887
47934
|
}) }))) : (icon && (e.createElement("div", { className: classNames('ods-list-action__icon', {
|
|
47888
47935
|
'ods-list-action__icon--inactive': status === 'inactive',
|
|
47889
47936
|
}) }, icon))),
|
|
47890
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
47937
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
47891
47938
|
amountDetails && e.createElement(AmountDetails, __assign$1({ type: status }, amountDetails)),
|
|
47892
|
-
indicator && (e.createElement("div", { className: "ods-list-action__indicator" }, indicator))),
|
|
47939
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-action__indicator" }, indicator))),
|
|
47893
47940
|
renderActionIcon())); };
|
|
47894
47941
|
var buttonClassName = classNames('ods-list-action', className, (_b = {
|
|
47895
47942
|
'ods-list-action--loading': loading,
|
|
@@ -47906,8 +47953,8 @@ ListAction.displayName = 'ListAction';
|
|
|
47906
47953
|
|
|
47907
47954
|
var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
47908
47955
|
var _b;
|
|
47909
|
-
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.loading, loading = _f === void 0 ? false : _f, icon = _a.icon, indicator = _a.indicator, controlledExpanded = _a.expanded,
|
|
47910
|
-
var
|
|
47956
|
+
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.loading, loading = _f === void 0 ? false : _f, icon = _a.icon, indicator = _a.indicator, _g = _a.indicatorPosition, indicatorPosition = _g === void 0 ? 'inline' : _g, controlledExpanded = _a.expanded, _h = _a.defaultExpanded, defaultExpanded = _h === void 0 ? false : _h, onToggle = _a.onToggle, children = _a.children, className = _a.className, _j = _a.disabled, disabled = _j === void 0 ? false : _j, _k = _a.showDivider, showDivider = _k === void 0 ? false : _k, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "loading", "icon", "indicator", "indicatorPosition", "expanded", "defaultExpanded", "onToggle", "children", "className", "disabled", "showDivider", "highlight"]);
|
|
47957
|
+
var _l = e.useState(defaultExpanded), internalExpanded = _l[0], setInternalExpanded = _l[1];
|
|
47911
47958
|
var isControlled = controlledExpanded !== undefined;
|
|
47912
47959
|
var isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
47913
47960
|
var handleToggle = function () {
|
|
@@ -47920,13 +47967,14 @@ var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
|
47920
47967
|
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-expandable__skeleton" },
|
|
47921
47968
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
47922
47969
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
47970
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
47923
47971
|
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
47924
47972
|
icon && (e.createElement("div", { className: classNames('ods-list-expandable__icon', {
|
|
47925
47973
|
'ods-list-expandable__icon--inactive': status === 'inactive',
|
|
47926
47974
|
}) }, icon)),
|
|
47927
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
47975
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
47928
47976
|
e.createElement("div", { className: "ods-list-expandable__trailing" },
|
|
47929
|
-
indicator && (e.createElement("div", { className: "ods-list-expandable__indicator" }, indicator)),
|
|
47977
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-expandable__indicator" }, indicator)),
|
|
47930
47978
|
e.createElement("div", { className: "ods-list-expandable__action" }, isExpanded ? e.createElement(ae, { size: 20 }) : e.createElement(ee, { size: 20 }))))); };
|
|
47931
47979
|
var containerClassName = classNames('ods-list-expandable', className, (_b = {
|
|
47932
47980
|
'ods-list-expandable--expanded': isExpanded,
|
|
@@ -48063,6 +48111,7 @@ ListSettings.displayName = 'ListSettings';
|
|
|
48063
48111
|
exports.Accordion = Accordion;
|
|
48064
48112
|
exports.Alert = Alert;
|
|
48065
48113
|
exports.Badge = Badge;
|
|
48114
|
+
exports.Banner = Banner;
|
|
48066
48115
|
exports.Breadcrumb = Breadcrumb;
|
|
48067
48116
|
exports.Button = Button$1;
|
|
48068
48117
|
exports.CardGroup = CardGroup;
|