@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.esm.js CHANGED
@@ -6036,6 +6036,9 @@ var displayCurrency = function displayCurrency(cents) {
6036
6036
  var convertCentsToMoneyInt = function convertCentsToMoneyInt(n) {
6037
6037
  return (n / 100).toFixed(0);
6038
6038
  };
6039
+ var formatPercent = function formatPercent(decimal) {
6040
+ return Number.parseFloat(decimal).toFixed(2);
6041
+ };
6039
6042
 
6040
6043
  var createUniqueId = function createUniqueId() {
6041
6044
  return "_" + Math.random().toString(36).substr(2, 9);
@@ -6110,6 +6113,7 @@ var general = /*#__PURE__*/Object.freeze({
6110
6113
  noop: noop,
6111
6114
  displayCurrency: displayCurrency,
6112
6115
  convertCentsToMoneyInt: convertCentsToMoneyInt,
6116
+ formatPercent: formatPercent,
6113
6117
  safeChildren: safeChildren,
6114
6118
  generateClickHandler: generateClickHandler,
6115
6119
  checkCardBrand: checkCardBrand,
@@ -6563,10 +6567,10 @@ function (_ref2) {
6563
6567
  var minHeight = _ref6.minHeight;
6564
6568
  return minHeight ? "margin-top: 0; margin-bottom: 0;" : "";
6565
6569
  }, function (_ref7) {
6566
- var sidebarOnRight = _ref7.sidebarOnRight,
6570
+ var $sidebarOnRight = _ref7.$sidebarOnRight,
6567
6571
  contentMinWidth = _ref7.contentMinWidth,
6568
6572
  childGap = _ref7.childGap;
6569
- 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 }");
6573
+ 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 }");
6570
6574
  }, function (_ref8) {
6571
6575
  var fullHeight = _ref8.fullHeight;
6572
6576
  return fullHeight ? "min-height: 100%;" : "";
@@ -6606,7 +6610,7 @@ var Sidebar = function Sidebar(_ref) {
6606
6610
  }, rest), /*#__PURE__*/React.createElement(SidebarInnerWrapper, {
6607
6611
  childGap: childGap,
6608
6612
  width: width,
6609
- sidebarOnRight: sidebarOnRight,
6613
+ $sidebarOnRight: sidebarOnRight,
6610
6614
  contentMinWidth: contentMinWidth,
6611
6615
  fullHeight: fullHeight,
6612
6616
  minHeight: minHeight
@@ -18868,7 +18872,8 @@ var Card = function Card(_ref2) {
18868
18872
  }, heading), /*#__PURE__*/React.createElement(Text$1, {
18869
18873
  variant: "pS"
18870
18874
  }, text)))), /*#__PURE__*/React.createElement(Box, {
18871
- padding: "0.5rem 1rem 1rem"
18875
+ padding: "0.5rem 1rem 1rem",
18876
+ extraStyles: "display: flex; justify-content: center;"
18872
18877
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
18873
18878
  variant: "smallPrimary",
18874
18879
  text: buttonText,
@@ -22159,7 +22164,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22159
22164
  hiddenStyles: hide
22160
22165
  }, /*#__PURE__*/React.createElement(Alert$1, {
22161
22166
  heading: "Processing Fee",
22162
- text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22167
+ text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22163
22168
  return "with a minimum of ".concat(displayCurrency(a), " ");
22164
22169
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22165
22170
  variant: "info",
@@ -41415,7 +41420,8 @@ var WorkflowTile = function WorkflowTile(_ref) {
41415
41420
  text: workflowActionName,
41416
41421
  minWidth: "100%",
41417
41422
  url: "/service/".concat(slug),
41418
- extraStyles: "width: 100%;"
41423
+ extraStyles: "width: 100%;",
41424
+ linkExtraStyles: "justify-content: center;"
41419
41425
  }))));
41420
41426
  };
41421
41427