@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.es.js
CHANGED
|
@@ -5448,8 +5448,10 @@ TextArea.displayName = 'TextArea';
|
|
|
5448
5448
|
|
|
5449
5449
|
var ContentList = function (_a) {
|
|
5450
5450
|
var _b, _c, _d;
|
|
5451
|
-
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;
|
|
5451
|
+
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;
|
|
5452
|
+
var stackedIndicator = indicator && indicatorPosition && (e.createElement("div", { className: classNames('ods-content-list__indicator', "ods-content-list__indicator--".concat(indicatorPosition)) }, indicator));
|
|
5452
5453
|
return (e.createElement("div", { className: "ods-content-list" },
|
|
5454
|
+
indicatorPosition === 'above' && stackedIndicator,
|
|
5453
5455
|
e.createElement("p", { className: classNames('ods-typography', (_b = {
|
|
5454
5456
|
'ods-typography__paragraph': !inverted,
|
|
5455
5457
|
'ods-typography__description': inverted
|
|
@@ -5468,7 +5470,8 @@ var ContentList = function (_a) {
|
|
|
5468
5470
|
description)),
|
|
5469
5471
|
caption && (e.createElement("p", { className: classNames("ods-typography ods-typography__captionbold", (_d = {},
|
|
5470
5472
|
_d["ods-typography__paragraph--".concat(type)] = type && type === 'inactive',
|
|
5471
|
-
_d)) }, caption))
|
|
5473
|
+
_d)) }, caption)),
|
|
5474
|
+
indicatorPosition === 'below' && stackedIndicator));
|
|
5472
5475
|
};
|
|
5473
5476
|
|
|
5474
5477
|
var SkeletonBar = function (_a) {
|
|
@@ -5476,9 +5479,17 @@ var SkeletonBar = function (_a) {
|
|
|
5476
5479
|
return (e.createElement("div", __assign$1({ className: "ods-skeleton-bar", style: { width: width, height: height } }, props)));
|
|
5477
5480
|
};
|
|
5478
5481
|
|
|
5482
|
+
var CornerTag = e.forwardRef(function (_a, ref) {
|
|
5483
|
+
var label = _a.label, _b = _a.color, color = _b === void 0 ? 'primaryDown' : _b, className = _a.className;
|
|
5484
|
+
if (!label)
|
|
5485
|
+
return null;
|
|
5486
|
+
return (e.createElement("span", { ref: ref, className: classNames('ods-corner-tag', "ods-corner-tag--".concat(color), className), "aria-label": label }, label));
|
|
5487
|
+
});
|
|
5488
|
+
CornerTag.displayName = 'CornerTag';
|
|
5489
|
+
|
|
5479
5490
|
var ListContainer = e.forwardRef(function (_a, ref) {
|
|
5480
5491
|
var _b, _c;
|
|
5481
|
-
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"]);
|
|
5492
|
+
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"]);
|
|
5482
5493
|
return (e.createElement("div", { className: "ods-list-container" },
|
|
5483
5494
|
e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-list-container__content', className, {
|
|
5484
5495
|
'ods-list-container__content--card': type === 'card',
|
|
@@ -5486,7 +5497,8 @@ var ListContainer = e.forwardRef(function (_a, ref) {
|
|
|
5486
5497
|
'ods-list-container__content--text': type === 'text',
|
|
5487
5498
|
}) }, rest),
|
|
5488
5499
|
children,
|
|
5489
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" }))
|
|
5500
|
+
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" })),
|
|
5501
|
+
type === 'card' && (cornerTag === null || cornerTag === void 0 ? void 0 : cornerTag.label) && e.createElement(CornerTag, __assign$1({}, cornerTag))),
|
|
5490
5502
|
(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' } },
|
|
5491
5503
|
e.createElement("p", { className: "ods-typography ods-typography__caption", style: { color: (_c = highlight.captionColor) !== null && _c !== void 0 ? _c : '#67697A' } }, highlight.caption)))));
|
|
5492
5504
|
});
|
|
@@ -5494,16 +5506,17 @@ ListContainer.displayName = 'ListContainer';
|
|
|
5494
5506
|
|
|
5495
5507
|
var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
5496
5508
|
var _b;
|
|
5497
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.
|
|
5509
|
+
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"]);
|
|
5498
5510
|
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-readonly__skeleton" },
|
|
5499
5511
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
5500
5512
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
5513
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
5501
5514
|
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
5502
5515
|
icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
|
|
5503
5516
|
'ods-list-readonly__icon--inactive': status === 'inactive',
|
|
5504
5517
|
}) }, icon)),
|
|
5505
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
5506
|
-
indicator && (e.createElement("div", { className: "ods-list-readonly__trailing" },
|
|
5518
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
5519
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-readonly__trailing" },
|
|
5507
5520
|
e.createElement("div", { className: "ods-list-readonly__indicator" }, indicator))))); };
|
|
5508
5521
|
var cardClassName = classNames('ods-list-readonly', className, (_b = {
|
|
5509
5522
|
'ods-list-readonly--loading': loading,
|
|
@@ -5511,21 +5524,23 @@ var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
|
5511
5524
|
},
|
|
5512
5525
|
_b["ods-list-readonly--".concat(type)] = type,
|
|
5513
5526
|
_b));
|
|
5514
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
5527
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight, cornerTag: cornerTag },
|
|
5515
5528
|
e.createElement("div", __assign$1({ ref: ref, "data-testid": "card-list-readonly", className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
5516
5529
|
});
|
|
5517
5530
|
ListReadOnly.displayName = 'ListReadOnly';
|
|
5518
5531
|
|
|
5519
|
-
var ListSelectable = e.forwardRef(function (
|
|
5520
|
-
var
|
|
5521
|
-
var title =
|
|
5532
|
+
var ListSelectable = e.forwardRef(function (props, ref) {
|
|
5533
|
+
var _a;
|
|
5534
|
+
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"]);
|
|
5535
|
+
var cardCornerTag = type === 'card' ? cornerTag : undefined;
|
|
5522
5536
|
var hasError = 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]);
|
|
5523
5537
|
var isInputDisabled = 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]);
|
|
5538
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
5524
5539
|
var internalList = useMemo(function () {
|
|
5525
5540
|
var _a;
|
|
5526
5541
|
return (e.createElement(e.Fragment, null,
|
|
5527
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: disabled ? 'inactive' : status }),
|
|
5528
|
-
indicator && (e.createElement("div", { className: classNames('ods-list-selectable__indicator', (_a = {},
|
|
5542
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: disabled ? 'inactive' : status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
5543
|
+
indicator && !stackedPosition && (e.createElement("div", { className: classNames('ods-list-selectable__indicator', (_a = {},
|
|
5529
5544
|
_a["ods-list-selectable__indicator--".concat(platform)] = platform,
|
|
5530
5545
|
_a)) }, indicator))));
|
|
5531
5546
|
}, [
|
|
@@ -5536,6 +5551,7 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5536
5551
|
inverted,
|
|
5537
5552
|
status,
|
|
5538
5553
|
indicator,
|
|
5554
|
+
stackedPosition,
|
|
5539
5555
|
disabled,
|
|
5540
5556
|
platform,
|
|
5541
5557
|
]);
|
|
@@ -5545,14 +5561,14 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5545
5561
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" })));
|
|
5546
5562
|
}
|
|
5547
5563
|
if (isSelectableDisabled) {
|
|
5548
|
-
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 })));
|
|
5564
|
+
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 })));
|
|
5549
5565
|
}
|
|
5550
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight },
|
|
5551
|
-
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (
|
|
5566
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight, cornerTag: cardCornerTag },
|
|
5567
|
+
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (_a = {
|
|
5552
5568
|
'ods-list-selectable--disabled': isInputDisabled
|
|
5553
5569
|
},
|
|
5554
|
-
|
|
5555
|
-
|
|
5570
|
+
_a["ods-list-selectable--".concat(platform)] = platform,
|
|
5571
|
+
_a)), ref: ref }, rest),
|
|
5556
5572
|
checkbox && e.createElement(Checkbox, __assign$1({}, checkbox, { label: internalList })),
|
|
5557
5573
|
radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))));
|
|
5558
5574
|
});
|
|
@@ -26263,6 +26279,36 @@ var Steps = function (_a) {
|
|
|
26263
26279
|
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))); })));
|
|
26264
26280
|
};
|
|
26265
26281
|
|
|
26282
|
+
var PRIMARY_VARIANT_MAP = {
|
|
26283
|
+
default: 'primary',
|
|
26284
|
+
warning: 'primaryWarning',
|
|
26285
|
+
negative: 'primaryCritical',
|
|
26286
|
+
emphasys: 'secondary',
|
|
26287
|
+
};
|
|
26288
|
+
var SECONDARY_VARIANT_MAP = {
|
|
26289
|
+
default: 'tertiary',
|
|
26290
|
+
warning: 'tertiaryWarning',
|
|
26291
|
+
negative: 'tertiaryCritical',
|
|
26292
|
+
emphasys: 'tertiary',
|
|
26293
|
+
};
|
|
26294
|
+
var Banner = e.forwardRef(function (_a, ref) {
|
|
26295
|
+
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"]);
|
|
26296
|
+
var isEmphasys = type === 'emphasys';
|
|
26297
|
+
var hasActions = primaryAction || secondaryAction;
|
|
26298
|
+
var imageEl = image ? (e.createElement("img", { className: "ods-banner__image", src: image, alt: "", "aria-hidden": "true" })) : null;
|
|
26299
|
+
return (e.createElement("div", __assign$1({ ref: ref }, rest, { className: classNames('ods-banner', "ods-banner--".concat(size), "ods-banner--".concat(type), className) }),
|
|
26300
|
+
imageEl && size === 'large' && (e.createElement("div", { className: "ods-banner__image-wrapper ods-banner__image-wrapper--top" }, imageEl)),
|
|
26301
|
+
e.createElement("div", { className: "ods-banner__body" },
|
|
26302
|
+
e.createElement("div", { className: "ods-banner__content" },
|
|
26303
|
+
e.createElement(Typography, { variant: "heading4", inverse: isEmphasys, className: "ods-banner__title" }, title),
|
|
26304
|
+
description && (e.createElement(Typography, { variant: "description", inverse: isEmphasys, className: "ods-banner__description" }, description)),
|
|
26305
|
+
hasActions && (e.createElement("div", { className: "ods-banner__actions" },
|
|
26306
|
+
primaryAction && (e.createElement(Button$1, { size: "sm", variant: PRIMARY_VARIANT_MAP[type], onClick: primaryAction.onClick }, primaryAction.label)),
|
|
26307
|
+
secondaryAction && (e.createElement(Button$1, { size: "sm", variant: SECONDARY_VARIANT_MAP[type], onClick: secondaryAction.onClick }, secondaryAction.label))))),
|
|
26308
|
+
imageEl && size === 'small' && (e.createElement("div", { className: "ods-banner__image-wrapper ods-banner__image-wrapper--side" }, imageEl)))));
|
|
26309
|
+
});
|
|
26310
|
+
Banner.displayName = 'Banner';
|
|
26311
|
+
|
|
26266
26312
|
var CrossSellCard = e.forwardRef(function (_a, ref) {
|
|
26267
26313
|
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"]);
|
|
26268
26314
|
return (e.createElement("div", __assign$1({ ref: ref }, rest, { className: classNames('ods-cross-sell-card', className) }),
|
|
@@ -47843,9 +47889,9 @@ var AmountDetails = function (_a) {
|
|
|
47843
47889
|
|
|
47844
47890
|
var ListAction = e.forwardRef(function (_a, ref) {
|
|
47845
47891
|
var _b;
|
|
47846
|
-
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 =
|
|
47847
|
-
var
|
|
47848
|
-
var
|
|
47892
|
+
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"]);
|
|
47893
|
+
var _m = useState(false), isSwipeOpen = _m[0], setIsSwipeOpen = _m[1];
|
|
47894
|
+
var _o = useState(0), menuWidth = _o[0], setMenuWidth = _o[1];
|
|
47849
47895
|
var handleSwipeOpenChange = function (isOpen, width) {
|
|
47850
47896
|
setIsSwipeOpen(isOpen);
|
|
47851
47897
|
if (width !== undefined) {
|
|
@@ -47868,6 +47914,7 @@ var ListAction = e.forwardRef(function (_a, ref) {
|
|
|
47868
47914
|
var contentStyle = isSwipeOpen && menuWidth > 0
|
|
47869
47915
|
? { transform: "translateX(-".concat(menuWidth, "px)") }
|
|
47870
47916
|
: {};
|
|
47917
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
47871
47918
|
var showLeading = position && icon;
|
|
47872
47919
|
var showLineAbove = position === 'middle' || position === 'last';
|
|
47873
47920
|
var showLineBelow = position === 'first' || position === 'middle';
|
|
@@ -47885,9 +47932,9 @@ var ListAction = e.forwardRef(function (_a, ref) {
|
|
|
47885
47932
|
}) }))) : (icon && (e.createElement("div", { className: classNames('ods-list-action__icon', {
|
|
47886
47933
|
'ods-list-action__icon--inactive': status === 'inactive',
|
|
47887
47934
|
}) }, icon))),
|
|
47888
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
47935
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
47889
47936
|
amountDetails && e.createElement(AmountDetails, __assign$1({ type: status }, amountDetails)),
|
|
47890
|
-
indicator && (e.createElement("div", { className: "ods-list-action__indicator" }, indicator))),
|
|
47937
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-action__indicator" }, indicator))),
|
|
47891
47938
|
renderActionIcon())); };
|
|
47892
47939
|
var buttonClassName = classNames('ods-list-action', className, (_b = {
|
|
47893
47940
|
'ods-list-action--loading': loading,
|
|
@@ -47904,8 +47951,8 @@ ListAction.displayName = 'ListAction';
|
|
|
47904
47951
|
|
|
47905
47952
|
var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
47906
47953
|
var _b;
|
|
47907
|
-
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,
|
|
47908
|
-
var
|
|
47954
|
+
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"]);
|
|
47955
|
+
var _l = useState(defaultExpanded), internalExpanded = _l[0], setInternalExpanded = _l[1];
|
|
47909
47956
|
var isControlled = controlledExpanded !== undefined;
|
|
47910
47957
|
var isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
47911
47958
|
var handleToggle = function () {
|
|
@@ -47918,13 +47965,14 @@ var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
|
47918
47965
|
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-expandable__skeleton" },
|
|
47919
47966
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
47920
47967
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
47968
|
+
var stackedPosition = indicatorPosition !== 'inline' ? indicatorPosition : undefined;
|
|
47921
47969
|
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
47922
47970
|
icon && (e.createElement("div", { className: classNames('ods-list-expandable__icon', {
|
|
47923
47971
|
'ods-list-expandable__icon--inactive': status === 'inactive',
|
|
47924
47972
|
}) }, icon)),
|
|
47925
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
47973
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status, indicator: stackedPosition ? indicator : undefined, indicatorPosition: stackedPosition }),
|
|
47926
47974
|
e.createElement("div", { className: "ods-list-expandable__trailing" },
|
|
47927
|
-
indicator && (e.createElement("div", { className: "ods-list-expandable__indicator" }, indicator)),
|
|
47975
|
+
indicator && !stackedPosition && (e.createElement("div", { className: "ods-list-expandable__indicator" }, indicator)),
|
|
47928
47976
|
e.createElement("div", { className: "ods-list-expandable__action" }, isExpanded ? e.createElement(ae, { size: 20 }) : e.createElement(ee, { size: 20 }))))); };
|
|
47929
47977
|
var containerClassName = classNames('ods-list-expandable', className, (_b = {
|
|
47930
47978
|
'ods-list-expandable--expanded': isExpanded,
|
|
@@ -48058,5 +48106,5 @@ var ListSettings = e.forwardRef(function (_a, ref) {
|
|
|
48058
48106
|
});
|
|
48059
48107
|
ListSettings.displayName = 'ListSettings';
|
|
48060
48108
|
|
|
48061
|
-
export { Accordion, Alert, Badge, Breadcrumb, Button$1 as Button, CardGroup, CardListItem, Carousel, DoughnutChart as Chart, Checkbox, Chips, Col, Container, ContextualMenu, ContextualMenuItem, CrossSellCard, DatePickerSingle as DatePicker, DatePickerRange as DateRange, Divider, DoughnutChart, Drawer, index$1 as Grid, IconButton, Input, InternalContextualHero, Link, List, ListAction, ListExpandable, ListReadOnly, ListSelectable, ListSettings, Modal, Progress, Radio, Row$1 as Row, Search, Select, SelectAutocomplete, SettingsListItem, Shortcut, Snackbar, Stepper, Steps, SubHeader, Switch, Tag, TextArea, TextListItem, TokenInput, TopBar, TransactionListExpandable, TransactionListItem, Typography, UnorderedListItem, WebNotification };
|
|
48109
|
+
export { Accordion, Alert, Badge, Banner, Breadcrumb, Button$1 as Button, CardGroup, CardListItem, Carousel, DoughnutChart as Chart, Checkbox, Chips, Col, Container, ContextualMenu, ContextualMenuItem, CrossSellCard, DatePickerSingle as DatePicker, DatePickerRange as DateRange, Divider, DoughnutChart, Drawer, index$1 as Grid, IconButton, Input, InternalContextualHero, Link, List, ListAction, ListExpandable, ListReadOnly, ListSelectable, ListSettings, Modal, Progress, Radio, Row$1 as Row, Search, Select, SelectAutocomplete, SettingsListItem, Shortcut, Snackbar, Stepper, Steps, SubHeader, Switch, Tag, TextArea, TextListItem, TokenInput, TopBar, TransactionListExpandable, TransactionListItem, Typography, UnorderedListItem, WebNotification };
|
|
48062
48110
|
//# sourceMappingURL=index.es.js.map
|