@thecb/components 5.6.0 → 5.6.3

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 CHANGED
@@ -6044,6 +6044,9 @@ var displayCurrency = function displayCurrency(cents) {
6044
6044
  var convertCentsToMoneyInt = function convertCentsToMoneyInt(n) {
6045
6045
  return (n / 100).toFixed(0);
6046
6046
  };
6047
+ var formatPercent = function formatPercent(decimal) {
6048
+ return Number.parseFloat(decimal).toFixed(2);
6049
+ };
6047
6050
 
6048
6051
  var createUniqueId = function createUniqueId() {
6049
6052
  return "_" + Math.random().toString(36).substr(2, 9);
@@ -6118,6 +6121,7 @@ var general = /*#__PURE__*/Object.freeze({
6118
6121
  noop: noop,
6119
6122
  displayCurrency: displayCurrency,
6120
6123
  convertCentsToMoneyInt: convertCentsToMoneyInt,
6124
+ formatPercent: formatPercent,
6121
6125
  safeChildren: safeChildren,
6122
6126
  generateClickHandler: generateClickHandler,
6123
6127
  checkCardBrand: checkCardBrand,
@@ -6571,10 +6575,10 @@ function (_ref2) {
6571
6575
  var minHeight = _ref6.minHeight;
6572
6576
  return minHeight ? "margin-top: 0; margin-bottom: 0;" : "";
6573
6577
  }, function (_ref7) {
6574
- var sidebarOnRight = _ref7.sidebarOnRight,
6578
+ var $sidebarOnRight = _ref7.$sidebarOnRight,
6575
6579
  contentMinWidth = _ref7.contentMinWidth,
6576
6580
  childGap = _ref7.childGap;
6577
- return sidebarOnRight ? "> :first-child {\n flex-basis: 0;\n flex-grow: 999;\n min-width: calc(".concat(contentMinWidth, " - ").concat(childGap, ");\n }\n ") : "> :last-child {\n flex-basis: 0;\n flex-grow: 999;\n min-width: calc(".concat(contentMinWidth, " - ").concat(childGap, ");\n }");
6581
+ return $sidebarOnRight ? "> :first-child {\n flex-basis: 0;\n flex-grow: 999;\n min-width: calc(".concat(contentMinWidth, " - ").concat(childGap, ");\n }\n ") : "> :last-child {\n flex-basis: 0;\n flex-grow: 999;\n min-width: calc(".concat(contentMinWidth, " - ").concat(childGap, ");\n }");
6578
6582
  }, function (_ref8) {
6579
6583
  var fullHeight = _ref8.fullHeight;
6580
6584
  return fullHeight ? "min-height: 100%;" : "";
@@ -6614,7 +6618,7 @@ var Sidebar = function Sidebar(_ref) {
6614
6618
  }, rest), /*#__PURE__*/React__default.createElement(SidebarInnerWrapper, {
6615
6619
  childGap: childGap,
6616
6620
  width: width,
6617
- sidebarOnRight: sidebarOnRight,
6621
+ $sidebarOnRight: sidebarOnRight,
6618
6622
  contentMinWidth: contentMinWidth,
6619
6623
  fullHeight: fullHeight,
6620
6624
  minHeight: minHeight
@@ -18876,7 +18880,8 @@ var Card = function Card(_ref2) {
18876
18880
  }, heading), /*#__PURE__*/React__default.createElement(Text$1, {
18877
18881
  variant: "pS"
18878
18882
  }, text)))), /*#__PURE__*/React__default.createElement(Box, {
18879
- padding: "0.5rem 1rem 1rem"
18883
+ padding: "0.5rem 1rem 1rem",
18884
+ extraStyles: "display: flex; justify-content: center;"
18880
18885
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
18881
18886
  variant: "smallPrimary",
18882
18887
  text: buttonText,
@@ -22167,7 +22172,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22167
22172
  hiddenStyles: hide
22168
22173
  }, /*#__PURE__*/React__default.createElement(Alert$1, {
22169
22174
  heading: "Processing Fee",
22170
- text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22175
+ text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22171
22176
  return "with a minimum of ".concat(displayCurrency(a), " ");
22172
22177
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22173
22178
  variant: "info",
@@ -41423,7 +41428,8 @@ var WorkflowTile = function WorkflowTile(_ref) {
41423
41428
  text: workflowActionName,
41424
41429
  minWidth: "100%",
41425
41430
  url: "/service/".concat(slug),
41426
- extraStyles: "width: 100%;"
41431
+ extraStyles: "width: 100%;",
41432
+ linkExtraStyles: "justify-content: center;"
41427
41433
  }))));
41428
41434
  };
41429
41435