@thecb/components 5.5.0 → 5.6.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 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,
@@ -12171,6 +12175,11 @@ var ReelStyled = styled__default.div.withConfig({
12171
12175
  });
12172
12176
 
12173
12177
  var _excluded$g = ["childGap", "height", "childWidth", "padding", "justifyContent", "disableScroll", "useOrderedList", "useUnorderedList", "children"];
12178
+ /*
12179
+ Safari has a bug where it refuses to recognize <ul /> tags as lists when list-style: none is used
12180
+ This affects the apple voice over (mainly used on iOS devices)
12181
+ The solution is to explicitly include "role=List"
12182
+ */
12174
12183
 
12175
12184
  var Reel = function Reel(_ref) {
12176
12185
  var _ref$childGap = _ref.childGap,
@@ -12203,7 +12212,9 @@ var Reel = function Reel(_ref) {
12203
12212
  as: elementType,
12204
12213
  useOrderedList: useOrderedList,
12205
12214
  useUnorderedList: useUnorderedList
12206
- }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
12215
+ }, rest, {
12216
+ role: useOrderedList || useUnorderedList ? "list" : "section"
12217
+ }), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
12207
12218
  };
12208
12219
 
12209
12220
  /*
@@ -17007,7 +17018,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
17007
17018
  return /*#__PURE__*/React__default.createElement(React.Fragment, {
17008
17019
  key: "breadcrumb-".concat(linkText)
17009
17020
  }, /*#__PURE__*/React__default.createElement(InternalLink, {
17010
- "aria-current": index === breadcrumbsList.length - 1 && "location",
17021
+ "aria-current": index === breadcrumbsList.length - 1 ? "location" : "",
17011
17022
  to: linkDestination,
17012
17023
  active: isActive.toString(),
17013
17024
  color: themeValues.color,
@@ -17016,7 +17027,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
17016
17027
  fontWeight: themeValues.fontWeight,
17017
17028
  margin: themeValues.margin,
17018
17029
  extraStyles: "\n text-transform: uppercase;\n ".concat(isActive.toString() === "true" && "pointer-events: none;\n color: ".concat(themeValues.activeBreadcrumbColor, ";\n "), "\n &:first-child {\n margin-left: 0;\n }\n &:active {\n color: ").concat(themeValues.activeColor, "; \n }")
17019
- }, linkText), index < breadcrumbsList.length - 1 && /*#__PURE__*/React__default.createElement(IconChevron, null));
17030
+ }, linkText), index < breadcrumbsList.length - 1 ? /*#__PURE__*/React__default.createElement(IconChevron, null) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
17020
17031
  })));
17021
17032
  };
17022
17033
 
@@ -18869,7 +18880,8 @@ var Card = function Card(_ref2) {
18869
18880
  }, heading), /*#__PURE__*/React__default.createElement(Text$1, {
18870
18881
  variant: "pS"
18871
18882
  }, text)))), /*#__PURE__*/React__default.createElement(Box, {
18872
- padding: "0.5rem 1rem 1rem"
18883
+ padding: "0.5rem 1rem 1rem",
18884
+ extraStyles: "display: flex; justify-content: center;"
18873
18885
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
18874
18886
  variant: "smallPrimary",
18875
18887
  text: buttonText,
@@ -22160,7 +22172,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22160
22172
  hiddenStyles: hide
22161
22173
  }, /*#__PURE__*/React__default.createElement(Alert$1, {
22162
22174
  heading: "Processing Fee",
22163
- 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) {
22164
22176
  return "with a minimum of ".concat(displayCurrency(a), " ");
22165
22177
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22166
22178
  variant: "info",
@@ -35810,8 +35822,9 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
35810
35822
  borderSize: "3px",
35811
35823
  borderColor: highlightIndex == i ? themeValues.textColor : "transparent",
35812
35824
  borderWidthOverride: "0 0 3px 0",
35813
- extraStyles: "text-align: center;",
35814
- as: "li"
35825
+ extraStyles: "text-align: center; display: block;",
35826
+ as: "li",
35827
+ "aria-current": highlightIndex == i ? "step" : ""
35815
35828
  }, /*#__PURE__*/React__default.createElement(Text$1, {
35816
35829
  variant: "p",
35817
35830
  textAlign: "center",
@@ -41415,7 +41428,8 @@ var WorkflowTile = function WorkflowTile(_ref) {
41415
41428
  text: workflowActionName,
41416
41429
  minWidth: "100%",
41417
41430
  url: "/service/".concat(slug),
41418
- extraStyles: "width: 100%;"
41431
+ extraStyles: "width: 100%;",
41432
+ linkExtraStyles: "justify-content: center;"
41419
41433
  }))));
41420
41434
  };
41421
41435