@thecb/components 10.3.3-beta.0 → 10.3.3-beta.2
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/dist/index.cjs.js +29 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -17
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/payment-details/PaymentDetails.js +47 -26
- package/src/components/molecules/payment-details/PaymentDetails.stories.js +2 -0
package/dist/index.cjs.js
CHANGED
|
@@ -47642,10 +47642,12 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
47642
47642
|
voidableTransactionDetails = _ref.voidableTransactionDetails,
|
|
47643
47643
|
voidableAmountPaid = _ref.voidableAmountPaid,
|
|
47644
47644
|
partialVoidAction = _ref.partialVoidAction,
|
|
47645
|
-
remainingBalance = _ref.remainingBalance
|
|
47645
|
+
remainingBalance = _ref.remainingBalance,
|
|
47646
|
+
agencySubheading = _ref.agencySubheading,
|
|
47647
|
+
isCollapsible = _ref.isCollapsible;
|
|
47646
47648
|
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
47647
47649
|
childGap: "16px"
|
|
47648
|
-
}, lineItemElems, hasVoidablePaymentsSection && /*#__PURE__*/React__default.createElement(Box, {
|
|
47650
|
+
}, isCollapsible && agencySubheading, lineItemElems, hasVoidablePaymentsSection && /*#__PURE__*/React__default.createElement(Box, {
|
|
47649
47651
|
background: ATHENS_GREY
|
|
47650
47652
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
47651
47653
|
variant: "p",
|
|
@@ -47869,7 +47871,8 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47869
47871
|
isLoading = _ref4$isLoading === void 0 ? false : _ref4$isLoading,
|
|
47870
47872
|
_ref4$isError = _ref4.isError,
|
|
47871
47873
|
isError = _ref4$isError === void 0 ? false : _ref4$isError,
|
|
47872
|
-
|
|
47874
|
+
_ref4$multiCartEnable = _ref4.multiCartEnabled,
|
|
47875
|
+
multiCartEnabled = _ref4$multiCartEnable === void 0 ? false : _ref4$multiCartEnable,
|
|
47873
47876
|
agencyDisplayName = _ref4.agencyDisplayName;
|
|
47874
47877
|
|
|
47875
47878
|
var _useState = React.useState(initiallyOpen),
|
|
@@ -47916,6 +47919,21 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47916
47919
|
variant: themeValues.labeledAmountSubtotal
|
|
47917
47920
|
}, fee)));
|
|
47918
47921
|
});
|
|
47922
|
+
var agencySubheading = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, multiCartEnabled && agencyDisplayName && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
47923
|
+
justify: "space-between",
|
|
47924
|
+
align: "center",
|
|
47925
|
+
style: {
|
|
47926
|
+
margin: isCollapsible ? "0" : "0.5rem 0"
|
|
47927
|
+
}
|
|
47928
|
+
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
47929
|
+
weight: FONT_WEIGHT_REGULAR,
|
|
47930
|
+
as: "h3",
|
|
47931
|
+
extraStyles: "font-size: 1rem;"
|
|
47932
|
+
}, agencyDisplayName), (lineItems === null || lineItems === void 0 ? void 0 : lineItems.length) && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
47933
|
+
variant: "pS",
|
|
47934
|
+
color: themeValues.text,
|
|
47935
|
+
weight: "400"
|
|
47936
|
+
}, "".concat(lineItems.length, " item").concat(lineItems.length > 1 ? "s" : ""))));
|
|
47919
47937
|
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack, {
|
|
47920
47938
|
childGap: "0"
|
|
47921
47939
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47933,7 +47951,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47933
47951
|
voidableTransactionDetails: voidableTransactionDetails,
|
|
47934
47952
|
voidableAmountPaid: voidableAmountPaid,
|
|
47935
47953
|
partialVoidAction: partialVoidAction,
|
|
47936
|
-
remainingBalance: remainingBalance
|
|
47954
|
+
remainingBalance: remainingBalance,
|
|
47955
|
+
agencySubheading: agencySubheading,
|
|
47956
|
+
isCollapsible: isCollapsible
|
|
47937
47957
|
})) : /*#__PURE__*/React__default.createElement(PaymentDetailsContent, {
|
|
47938
47958
|
lineItemElems: lineItemElems,
|
|
47939
47959
|
feeElems: feeElems,
|
|
@@ -47945,7 +47965,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47945
47965
|
voidableTransactionDetails: voidableTransactionDetails,
|
|
47946
47966
|
voidableAmountPaid: voidableAmountPaid,
|
|
47947
47967
|
partialVoidAction: partialVoidAction,
|
|
47948
|
-
remainingBalance: remainingBalance
|
|
47968
|
+
remainingBalance: remainingBalance,
|
|
47969
|
+
agencySubheading: agencySubheading,
|
|
47970
|
+
isCollapsible: isCollapsible
|
|
47949
47971
|
});
|
|
47950
47972
|
var title = hideTitle ? /*#__PURE__*/React__default.createElement(React.Fragment, null) : isCollapsible ? /*#__PURE__*/React__default.createElement(Box, {
|
|
47951
47973
|
width: "100%",
|
|
@@ -47962,23 +47984,13 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47962
47984
|
weight: FONT_WEIGHT_BOLD,
|
|
47963
47985
|
as: "p",
|
|
47964
47986
|
extraStyles: "font-size: 1.375rem;"
|
|
47965
|
-
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(
|
|
47966
|
-
width: "100%",
|
|
47967
|
-
padding: "none"
|
|
47968
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
47969
|
-
justify: "space-between",
|
|
47970
|
-
align: "center"
|
|
47971
|
-
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
47987
|
+
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
47972
47988
|
as: "h2",
|
|
47973
47989
|
weight: FONT_WEIGHT_BOLD,
|
|
47974
47990
|
margin: "1rem 0 0 0",
|
|
47975
47991
|
extraStyles: "font-size: 1.75rem;",
|
|
47976
47992
|
id: "payment-details-title"
|
|
47977
|
-
}, titleText,
|
|
47978
|
-
weight: FONT_WEIGHT_SEMIBOLD,
|
|
47979
|
-
as: "h3",
|
|
47980
|
-
extraStyles: "font-size: 1.375rem;"
|
|
47981
|
-
}, agencyDisplayName)));
|
|
47993
|
+
}, titleText), agencySubheading);
|
|
47982
47994
|
return isCollapsible ? /*#__PURE__*/React__default.createElement(Collapsible, {
|
|
47983
47995
|
title: title,
|
|
47984
47996
|
content: content,
|