@useblu/ocean-react 1.132.0 → 1.134.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/ListAction/ListAction.d.ts +8 -0
  3. package/ListAction/ListAction.d.ts.map +1 -1
  4. package/ListAction/index.d.ts +1 -0
  5. package/ListAction/index.d.ts.map +1 -1
  6. package/ListExpandable/ListExpandable.d.ts +3 -0
  7. package/ListExpandable/ListExpandable.d.ts.map +1 -1
  8. package/ListReadOnly/ListReadOnly.d.ts +3 -0
  9. package/ListReadOnly/ListReadOnly.d.ts.map +1 -1
  10. package/ListSelectable/ListSelectable.d.ts +3 -0
  11. package/ListSelectable/ListSelectable.d.ts.map +1 -1
  12. package/ListSettings/ListSettings.d.ts +3 -0
  13. package/ListSettings/ListSettings.d.ts.map +1 -1
  14. package/TransactionListExpandable/TransactionListExpandable.d.ts +47 -0
  15. package/TransactionListExpandable/TransactionListExpandable.d.ts.map +1 -0
  16. package/TransactionListExpandable/index.d.ts +3 -0
  17. package/TransactionListExpandable/index.d.ts.map +1 -0
  18. package/_shared/components/AmountDetails/AmountDetails.d.ts +15 -0
  19. package/_shared/components/AmountDetails/AmountDetails.d.ts.map +1 -0
  20. package/_shared/components/AmountDetails/index.d.ts +3 -0
  21. package/_shared/components/AmountDetails/index.d.ts.map +1 -0
  22. package/_shared/components/ListContainer/ListContainer.d.ts +24 -0
  23. package/_shared/components/ListContainer/ListContainer.d.ts.map +1 -0
  24. package/_shared/components/ListContainer/index.d.ts +4 -0
  25. package/_shared/components/ListContainer/index.d.ts.map +1 -0
  26. package/index.d.ts +2 -0
  27. package/index.d.ts.map +1 -1
  28. package/index.es.js +143 -58
  29. package/index.es.js.map +1 -1
  30. package/index.js +143 -57
  31. package/index.js.map +1 -1
  32. package/package.json +1 -1
package/index.js CHANGED
@@ -5478,9 +5478,49 @@ var SkeletonBar = function (_a) {
5478
5478
  return (e.createElement("div", __assign$1({ className: "ods-skeleton-bar", style: { width: width, height: height } }, props)));
5479
5479
  };
5480
5480
 
5481
- var ListSelectable = e.forwardRef(function (_a, ref) {
5481
+ var ListContainer = e.forwardRef(function (_a, ref) {
5482
5482
  var _b, _c;
5483
- var title = _a.title, description = _a.description, caption = _a.caption, strikethroughDescription = _a.strikethroughDescription, inverted = _a.inverted, loading = _a.loading, disabled = _a.disabled, checkbox = _a.checkbox, radio = _a.radio, className = _a.className, showDivider = _a.showDivider, indicator = _a.indicator, _d = _a.status, status = _d === void 0 ? 'default' : _d, _e = _a.type, type = _e === void 0 ? 'card' : _e, _f = _a.platform, platform = _f === void 0 ? 'web' : _f, rest = __rest$1(_a, ["title", "description", "caption", "strikethroughDescription", "inverted", "loading", "disabled", "checkbox", "radio", "className", "showDivider", "indicator", "status", "type", "platform"]);
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"]);
5484
+ return (e.createElement("div", { className: "ods-list-container" },
5485
+ e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-list-container__content', className, {
5486
+ 'ods-list-container__content--card': type === 'card',
5487
+ 'ods-list-container__content--card--error': type === 'card' && hasError,
5488
+ 'ods-list-container__content--text': type === 'text',
5489
+ }) }, rest),
5490
+ children,
5491
+ showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" }))),
5492
+ (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
+ e.createElement("p", { className: "ods-typography ods-typography__caption", style: { color: (_c = highlight.captionColor) !== null && _c !== void 0 ? _c : '#67697A' } }, highlight.caption)))));
5494
+ });
5495
+ ListContainer.displayName = 'ListContainer';
5496
+
5497
+ var ListReadOnly = e.forwardRef(function (_a, ref) {
5498
+ var _b;
5499
+ var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.type, type = _c === void 0 ? 'card' : _c, _d = _a.status, status = _d === void 0 ? 'default' : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, className = _a.className, _h = _a.showDivider, showDivider = _h === void 0 ? false : _h, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "type", "status", "inverted", "disabled", "loading", "className", "showDivider", "highlight"]);
5500
+ var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-readonly__skeleton" },
5501
+ e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
5502
+ e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
5503
+ var renderContent = function () { return (e.createElement(e.Fragment, null,
5504
+ icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
5505
+ 'ods-list-readonly__icon--inactive': status === 'inactive',
5506
+ }) }, 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" },
5509
+ e.createElement("div", { className: "ods-list-readonly__indicator" }, indicator))))); };
5510
+ var cardClassName = classNames('ods-list-readonly', className, (_b = {
5511
+ 'ods-list-readonly--loading': loading,
5512
+ 'ods-list-readonly--disabled': disabled
5513
+ },
5514
+ _b["ods-list-readonly--".concat(type)] = type,
5515
+ _b));
5516
+ return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
5517
+ e.createElement("div", __assign$1({ ref: ref, "data-testid": "card-list-readonly", className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent())));
5518
+ });
5519
+ ListReadOnly.displayName = 'ListReadOnly';
5520
+
5521
+ var ListSelectable = e.forwardRef(function (_a, ref) {
5522
+ var _b;
5523
+ var title = _a.title, description = _a.description, caption = _a.caption, strikethroughDescription = _a.strikethroughDescription, inverted = _a.inverted, loading = _a.loading, disabled = _a.disabled, checkbox = _a.checkbox, radio = _a.radio, className = _a.className, showDivider = _a.showDivider, indicator = _a.indicator, isSelectableDisabled = _a.isSelectableDisabled, highlight = _a.highlight, _c = _a.status, status = _c === void 0 ? 'default' : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.platform, platform = _e === void 0 ? 'web' : _e, rest = __rest$1(_a, ["title", "description", "caption", "strikethroughDescription", "inverted", "loading", "disabled", "checkbox", "radio", "className", "showDivider", "indicator", "isSelectableDisabled", "highlight", "status", "type", "platform"]);
5484
5524
  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]);
5485
5525
  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]);
5486
5526
  var internalList = e.useMemo(function () {
@@ -5506,18 +5546,17 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
5506
5546
  e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
5507
5547
  e.createElement(SkeletonBar, { width: "100%", height: "16px" })));
5508
5548
  }
5509
- return (e.createElement("div", { className: classNames('ods-list-selectable__root', (_b = {},
5510
- _b["ods-list-selectable__root--".concat(type)] = type,
5511
- _b["ods-list-selectable__root--".concat(type, "--error")] = hasError,
5512
- _b)) },
5513
- e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (_c = {
5549
+ 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 })));
5551
+ }
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, (_b = {
5514
5554
  'ods-list-selectable--disabled': isInputDisabled
5515
5555
  },
5516
- _c["ods-list-selectable--".concat(platform)] = platform,
5517
- _c)), ref: ref }, rest),
5556
+ _b["ods-list-selectable--".concat(platform)] = platform,
5557
+ _b)), ref: ref }, rest),
5518
5558
  checkbox && e.createElement(Checkbox, __assign$1({}, checkbox, { label: internalList })),
5519
- radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList }))),
5520
- showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-selectable__root--text--divider" }))));
5559
+ radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))));
5521
5560
  });
5522
5561
  ListSelectable.displayName = 'ListSelectable';
5523
5562
 
@@ -47787,9 +47826,26 @@ var InternalListActions = e.forwardRef(function (_a, forwardedRef) {
47787
47826
  });
47788
47827
  InternalListActions.displayName = 'InternalListActions';
47789
47828
 
47829
+ var AmountDetails = function (_a) {
47830
+ var amount = _a.amount, _b = _a.type, type = _b === void 0 ? 'default' : _b, indicator = _a.indicator, _c = _a.indicatorSize, indicatorSize = _c === void 0 ? 'small' : _c, _d = _a.showIndicator, showIndicator = _d === void 0 ? true : _d, additionalData = _a.additionalData, _e = _a.showAdditionalData, showAdditionalData = _e === void 0 ? true : _e;
47831
+ var isNegative = type === 'negative';
47832
+ var isPositive = type === 'positive';
47833
+ return (e.createElement("div", { className: "ods-amount-details" },
47834
+ e.createElement("div", { className: "ods-amount-details__main" },
47835
+ isNegative ? (e.createElement("div", { className: "ods-amount-details__amount-row" },
47836
+ e.createElement("span", { className: "ods-amount-details__amount-sign" }, "- "),
47837
+ e.createElement("p", { className: "ods-amount-details__amount" }, amount))) : (e.createElement("p", { className: classNames('ods-amount-details__amount', {
47838
+ 'ods-amount-details__amount--positive': isPositive,
47839
+ }) }, amount)),
47840
+ showIndicator && indicator && (e.createElement("div", { className: classNames('ods-amount-details__indicator', {
47841
+ 'ods-amount-details__indicator--medium': indicatorSize === 'medium',
47842
+ }) }, indicator))),
47843
+ showAdditionalData && additionalData && (e.createElement(Typography, { variant: "captionbold", className: "ods-amount-details__caption" }, additionalData))));
47844
+ };
47845
+
47790
47846
  var ListAction = e.forwardRef(function (_a, ref) {
47791
47847
  var _b;
47792
- 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"]);
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 = _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, amountDetails = _a.amountDetails, position = _a.position, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "indicator", "actionType", "menuActions", "menuPosition", "onClick", "className", "showDivider", "amountDetails", "position", "highlight"]);
47793
47849
  var _l = e.useState(false), isSwipeOpen = _l[0], setIsSwipeOpen = _l[1];
47794
47850
  var _m = e.useState(0), menuWidth = _m[0], setMenuWidth = _m[1];
47795
47851
  var handleSwipeOpenChange = function (isOpen, width) {
@@ -47800,7 +47856,7 @@ var ListAction = e.forwardRef(function (_a, ref) {
47800
47856
  };
47801
47857
  var renderActionIcon = function () {
47802
47858
  if (actionType === 'chevron') {
47803
- return (e.createElement("div", { className: 'ods-list-action__action' },
47859
+ return (e.createElement("div", { className: "ods-list-action__action" },
47804
47860
  e.createElement(re, { size: 20 })));
47805
47861
  }
47806
47862
  if (actionType === 'menu' || actionType === 'swipe') {
@@ -47808,19 +47864,32 @@ var ListAction = e.forwardRef(function (_a, ref) {
47808
47864
  }
47809
47865
  return null;
47810
47866
  };
47811
- var renderLoadingContent = function () { return (e.createElement("div", { className: 'ods-list-action__skeleton' },
47812
- e.createElement(SkeletonBar, { width: '40%', height: '16px' }),
47813
- e.createElement(SkeletonBar, { width: '100%', height: '16px' }))); };
47867
+ var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-action__skeleton" },
47868
+ e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
47869
+ e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
47814
47870
  var contentStyle = isSwipeOpen && menuWidth > 0
47815
47871
  ? { transform: "translateX(-".concat(menuWidth, "px)") }
47816
47872
  : {};
47873
+ var showLeading = position && icon;
47874
+ var showLineAbove = position === 'middle' || position === 'last';
47875
+ var showLineBelow = position === 'first' || position === 'middle';
47817
47876
  var renderContent = function () { return (e.createElement(e.Fragment, null,
47818
- e.createElement("div", { className: 'ods-list-action__content', style: contentStyle },
47819
- icon && (e.createElement("div", { className: classNames('ods-list-action__icon', {
47877
+ e.createElement("div", { className: "ods-list-action__content", style: contentStyle },
47878
+ showLeading ? (e.createElement("div", { className: "ods-list-action__position" },
47879
+ e.createElement("div", { className: classNames('ods-list-action__position-line', {
47880
+ 'ods-list-action__position-line--visible': showLineAbove,
47881
+ }) }),
47882
+ e.createElement("div", { className: classNames('ods-list-action__icon', {
47883
+ 'ods-list-action__icon--inactive': status === 'inactive',
47884
+ }) }, icon),
47885
+ e.createElement("div", { className: classNames('ods-list-action__position-line', {
47886
+ 'ods-list-action__position-line--visible': showLineBelow,
47887
+ }) }))) : (icon && (e.createElement("div", { className: classNames('ods-list-action__icon', {
47820
47888
  'ods-list-action__icon--inactive': status === 'inactive',
47821
- }) }, icon)),
47889
+ }) }, icon))),
47822
47890
  e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
47823
- indicator && (e.createElement("div", { className: 'ods-list-action__indicator' }, indicator))),
47891
+ amountDetails && e.createElement(AmountDetails, __assign$1({ type: status }, amountDetails)),
47892
+ indicator && (e.createElement("div", { className: "ods-list-action__indicator" }, indicator))),
47824
47893
  renderActionIcon())); };
47825
47894
  var buttonClassName = classNames('ods-list-action', className, (_b = {
47826
47895
  'ods-list-action--loading': loading,
@@ -47830,40 +47899,14 @@ var ListAction = e.forwardRef(function (_a, ref) {
47830
47899
  },
47831
47900
  _b["ods-list-action--".concat(type)] = type,
47832
47901
  _b));
47833
- return (e.createElement("div", { className: 'ods-list-action__container' },
47834
- 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()),
47835
- showDivider && type === 'text' && (e.createElement("div", { className: 'ods-list-action__divider' }))));
47902
+ return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
47903
+ 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())));
47836
47904
  });
47837
47905
  ListAction.displayName = 'ListAction';
47838
47906
 
47839
- var ListReadOnly = e.forwardRef(function (_a, ref) {
47840
- var _b;
47841
- var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.type, type = _c === void 0 ? 'card' : _c, _d = _a.status, status = _d === void 0 ? 'default' : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, className = _a.className, _h = _a.showDivider, showDivider = _h === void 0 ? false : _h, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "type", "status", "inverted", "disabled", "loading", "className", "showDivider"]);
47842
- var renderLoadingContent = function () { return (e.createElement("div", { className: 'ods-list-readonly__skeleton' },
47843
- e.createElement(SkeletonBar, { width: '40%', height: '16px' }),
47844
- e.createElement(SkeletonBar, { width: '100%', height: '16px' }))); };
47845
- var renderContent = function () { return (e.createElement(e.Fragment, null,
47846
- icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
47847
- 'ods-list-readonly__icon--inactive': status === 'inactive',
47848
- }) }, icon)),
47849
- e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
47850
- indicator && (e.createElement("div", { className: 'ods-list-readonly__trailing' },
47851
- e.createElement("div", { className: 'ods-list-readonly__indicator' }, indicator))))); };
47852
- var cardClassName = classNames('ods-list-readonly', className, (_b = {
47853
- 'ods-list-readonly--loading': loading,
47854
- 'ods-list-readonly--disabled': disabled
47855
- },
47856
- _b["ods-list-readonly--".concat(type)] = type,
47857
- _b));
47858
- return (e.createElement("div", { className: 'ods-list-readonly__container' },
47859
- e.createElement("div", __assign$1({ ref: ref, "data-testid": 'card-list-readonly', className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent()),
47860
- showDivider && type === 'text' && (e.createElement("div", { className: 'ods-list-readonly__divider' }))));
47861
- });
47862
- ListReadOnly.displayName = 'ListReadOnly';
47863
-
47864
47907
  var ListExpandable = e.forwardRef(function (_a, ref) {
47865
47908
  var _b;
47866
- 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, _g = _a.defaultExpanded, defaultExpanded = _g === void 0 ? false : _g, onToggle = _a.onToggle, children = _a.children, className = _a.className, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.showDivider, showDivider = _j === void 0 ? false : _j, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "loading", "icon", "indicator", "expanded", "defaultExpanded", "onToggle", "children", "className", "disabled", "showDivider"]);
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, _g = _a.defaultExpanded, defaultExpanded = _g === void 0 ? false : _g, onToggle = _a.onToggle, children = _a.children, className = _a.className, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.showDivider, showDivider = _j === void 0 ? false : _j, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "loading", "icon", "indicator", "expanded", "defaultExpanded", "onToggle", "children", "className", "disabled", "showDivider", "highlight"]);
47867
47910
  var _k = e.useState(defaultExpanded), internalExpanded = _k[0], setInternalExpanded = _k[1];
47868
47911
  var isControlled = controlledExpanded !== undefined;
47869
47912
  var isExpanded = isControlled ? controlledExpanded : internalExpanded;
@@ -47892,13 +47935,56 @@ var ListExpandable = e.forwardRef(function (_a, ref) {
47892
47935
  },
47893
47936
  _b["ods-list-expandable--".concat(type)] = type,
47894
47937
  _b));
47895
- return (e.createElement("div", __assign$1({ ref: ref, "data-testid": "list-expandable", className: containerClassName }, rest),
47896
- e.createElement("button", { type: "button", className: "ods-list-expandable__main", onClick: loading ? undefined : handleToggle, disabled: disabled || loading, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? 'Recolher' : 'Expandir', " ").concat(title), "data-testid": "list-expandable-button" }, loading ? renderLoadingContent() : renderContent()),
47897
- showDivider && e.createElement("div", { className: "ods-list-expandable__divider", "data-testid": "list-expandable-divider" }),
47898
- isExpanded && children && (e.createElement("div", { className: "ods-list-expandable__content" }, children))));
47938
+ return (e.createElement(ListContainer, { type: type, showDivider: false, highlight: highlight, ref: ref },
47939
+ e.createElement("div", __assign$1({ "data-testid": "list-expandable", className: containerClassName }, rest),
47940
+ e.createElement("button", { type: "button", className: "ods-list-expandable__main", onClick: loading ? undefined : handleToggle, disabled: disabled || loading, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? 'Recolher' : 'Expandir', " ").concat(title), "data-testid": "list-expandable-button" }, loading ? renderLoadingContent() : renderContent()),
47941
+ showDivider && (e.createElement("div", { className: "ods-list-expandable__divider", "data-testid": "list-expandable-divider" })),
47942
+ isExpanded && children && (e.createElement("div", { className: "ods-list-expandable__content" }, children)))));
47899
47943
  });
47900
47944
  ListExpandable.displayName = 'ListExpandable';
47901
47945
 
47946
+ var TransactionListExpandable = e.forwardRef(function (_a, ref) {
47947
+ var _b;
47948
+ var title = _a.title, description = _a.description, caption = _a.caption, amount = _a.amount, _c = _a.amountType, amountType = _c === void 0 ? 'default' : _c, amountIndicator = _a.amountIndicator, _d = _a.showAmountIndicator, showAmountIndicator = _d === void 0 ? true : _d, additionalData = _a.additionalData, _e = _a.inverted, inverted = _e === void 0 ? true : _e, _f = _a.type, type = _f === void 0 ? 'card' : _f, _g = _a.status, status = _g === void 0 ? 'default' : _g, _h = _a.loading, loading = _h === void 0 ? false : _h, icon = _a.icon, _j = _a.expanded, expanded = _j === void 0 ? false : _j, onToggle = _a.onToggle, children = _a.children, supportingText = _a.supportingText, className = _a.className, _k = _a.disabled, disabled = _k === void 0 ? false : _k, _l = _a.showDivider, showDivider = _l === void 0 ? false : _l, rest = __rest$1(_a, ["title", "description", "caption", "amount", "amountType", "amountIndicator", "showAmountIndicator", "additionalData", "inverted", "type", "status", "loading", "icon", "expanded", "onToggle", "children", "supportingText", "className", "disabled", "showDivider"]);
47949
+ var handleToggle = function () {
47950
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(!expanded);
47951
+ };
47952
+ var renderLoadingContent = function () { return (e.createElement(e.Fragment, null,
47953
+ e.createElement("div", { className: "ods-list-expandable__icon", "aria-hidden": true },
47954
+ e.createElement(SkeletonBar, { width: "24px", height: "24px" })),
47955
+ e.createElement("div", { className: "ods-list-expandable__skeleton ods-list-expandable__transaction-content" },
47956
+ e.createElement("div", { className: "ods-list-expandable__skeleton-list" },
47957
+ e.createElement(SkeletonBar, { width: "33%", height: "16px" }),
47958
+ e.createElement(SkeletonBar, { width: "100%", height: "16px" })),
47959
+ e.createElement("div", { className: "ods-list-expandable__skeleton-amount" },
47960
+ e.createElement(SkeletonBar, { width: "100%", height: "16px" }),
47961
+ e.createElement(SkeletonBar, { width: "100%", height: "16px" }))))); };
47962
+ var renderContent = function () { return (e.createElement(e.Fragment, null,
47963
+ icon && (e.createElement("div", { className: classNames('ods-list-expandable__icon', {
47964
+ 'ods-list-expandable__icon--inactive': status === 'inactive',
47965
+ }) }, icon)),
47966
+ e.createElement("div", { className: "ods-list-expandable__transaction-content" },
47967
+ e.createElement(ContentList, { title: title, description: description, caption: caption, inverted: inverted, type: status }),
47968
+ e.createElement(AmountDetails, { amount: amount, type: amountType, indicator: amountIndicator, indicatorSize: "medium", showIndicator: showAmountIndicator, additionalData: additionalData, showAdditionalData: Boolean(additionalData) })),
47969
+ e.createElement("div", { className: "ods-list-expandable__trailing" },
47970
+ e.createElement("div", { className: "ods-list-expandable__action" }, expanded ? e.createElement(ae, { size: 20 }) : e.createElement(ee, { size: 20 }))))); };
47971
+ var containerClassName = classNames('ods-list-expandable', 'ods-list-expandable--transaction', className, (_b = {
47972
+ 'ods-list-expandable--expanded': expanded,
47973
+ 'ods-list-expandable--disabled': disabled,
47974
+ 'ods-list-expandable--loading': loading
47975
+ },
47976
+ _b["ods-list-expandable--".concat(type)] = type,
47977
+ _b));
47978
+ return (e.createElement("div", __assign$1({ ref: ref, "data-testid": "transaction-list-expandable", className: containerClassName }, rest),
47979
+ e.createElement("button", { type: "button", className: "ods-list-expandable__main", onClick: loading ? undefined : handleToggle, disabled: disabled || loading, "aria-expanded": expanded, "aria-label": "".concat(expanded ? 'Recolher' : 'Expandir', " ").concat(title), "data-testid": "transaction-list-expandable-button" }, loading ? renderLoadingContent() : renderContent()),
47980
+ showDivider && !expanded && (e.createElement("div", { className: "ods-list-expandable__divider", "data-testid": "transaction-list-expandable-divider" })),
47981
+ expanded && !loading && (children || supportingText) && (e.createElement(e.Fragment, null,
47982
+ children && (e.createElement("div", { className: "ods-list-expandable__content ods-list-expandable__content--transaction" }, children)),
47983
+ supportingText && (e.createElement("div", { className: "ods-list-expandable__footer", "data-testid": "transaction-list-expandable-supporting-text" }, supportingText)),
47984
+ showDivider && (e.createElement("div", { className: "ods-list-expandable__divider", "data-testid": "transaction-list-expandable-divider" }))))));
47985
+ });
47986
+ TransactionListExpandable.displayName = 'TransactionListExpandable';
47987
+
47902
47988
  var isListItemString = function (item) {
47903
47989
  return typeof item === 'object' && item !== null && 'description' in item;
47904
47990
  };
@@ -47944,7 +48030,7 @@ InternalContextualHero.displayName = 'InternalContextualHero';
47944
48030
 
47945
48031
  var ListSettings = e.forwardRef(function (_a, ref) {
47946
48032
  var _b;
47947
- 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, _h = _a.actionType, actionType = _h === void 0 ? 'button' : _h, _j = _a.buttonLabel, buttonLabel = _j === void 0 ? 'Label' : _j, _k = _a.buttonSize, buttonSize = _k === void 0 ? 'sm' : _k, _l = _a.buttonVariant, buttonVariant = _l === void 0 ? 'primary' : _l, _m = _a.toggleChecked, toggleChecked = _m === void 0 ? false : _m, onButtonClick = _a.onButtonClick, onToggleChange = _a.onToggleChange, _o = _a.showDivider, showDivider = _o === void 0 ? false : _o, className = _a.className, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "actionType", "buttonLabel", "buttonSize", "buttonVariant", "toggleChecked", "onButtonClick", "onToggleChange", "showDivider", "className"]);
48033
+ 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, _h = _a.actionType, actionType = _h === void 0 ? 'button' : _h, _j = _a.buttonLabel, buttonLabel = _j === void 0 ? 'Label' : _j, _k = _a.buttonSize, buttonSize = _k === void 0 ? 'sm' : _k, _l = _a.buttonVariant, buttonVariant = _l === void 0 ? 'primary' : _l, _m = _a.toggleChecked, toggleChecked = _m === void 0 ? false : _m, onButtonClick = _a.onButtonClick, onToggleChange = _a.onToggleChange, _o = _a.showDivider, showDivider = _o === void 0 ? false : _o, highlight = _a.highlight, className = _a.className, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "actionType", "buttonLabel", "buttonSize", "buttonVariant", "toggleChecked", "onButtonClick", "onToggleChange", "showDivider", "highlight", "className"]);
47948
48034
  var renderActionElement = function () {
47949
48035
  if (actionType === 'button') {
47950
48036
  return (e.createElement(Button$1, { variant: buttonVariant, size: buttonSize, onClick: onButtonClick, disabled: disabled }, buttonLabel));
@@ -47969,9 +48055,8 @@ var ListSettings = e.forwardRef(function (_a, ref) {
47969
48055
  },
47970
48056
  _b["ods-list-settings--".concat(type)] = type,
47971
48057
  _b));
47972
- return (e.createElement("div", { className: "ods-list-settings__container" },
47973
- e.createElement("div", __assign$1({ ref: ref, "data-testid": "list-settings", className: containerClassName }, rest), loading ? renderLoadingContent() : renderContent()),
47974
- showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-settings__divider" }))));
48058
+ return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
48059
+ e.createElement("div", __assign$1({ ref: ref, "data-testid": "list-settings", className: containerClassName }, rest), loading ? renderLoadingContent() : renderContent())));
47975
48060
  });
47976
48061
  ListSettings.displayName = 'ListSettings';
47977
48062
 
@@ -48026,6 +48111,7 @@ exports.TextArea = TextArea;
48026
48111
  exports.TextListItem = TextListItem;
48027
48112
  exports.TokenInput = TokenInput;
48028
48113
  exports.TopBar = TopBar;
48114
+ exports.TransactionListExpandable = TransactionListExpandable;
48029
48115
  exports.TransactionListItem = TransactionListItem;
48030
48116
  exports.Typography = Typography;
48031
48117
  exports.UnorderedListItem = UnorderedListItem;