@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.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,
@@ -12163,6 +12167,11 @@ var ReelStyled = styled.div.withConfig({
12163
12167
  });
12164
12168
 
12165
12169
  var _excluded$g = ["childGap", "height", "childWidth", "padding", "justifyContent", "disableScroll", "useOrderedList", "useUnorderedList", "children"];
12170
+ /*
12171
+ Safari has a bug where it refuses to recognize <ul /> tags as lists when list-style: none is used
12172
+ This affects the apple voice over (mainly used on iOS devices)
12173
+ The solution is to explicitly include "role=List"
12174
+ */
12166
12175
 
12167
12176
  var Reel = function Reel(_ref) {
12168
12177
  var _ref$childGap = _ref.childGap,
@@ -12195,7 +12204,9 @@ var Reel = function Reel(_ref) {
12195
12204
  as: elementType,
12196
12205
  useOrderedList: useOrderedList,
12197
12206
  useUnorderedList: useUnorderedList
12198
- }, rest), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
12207
+ }, rest, {
12208
+ role: useOrderedList || useUnorderedList ? "list" : "section"
12209
+ }), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
12199
12210
  };
12200
12211
 
12201
12212
  /*
@@ -16999,7 +17010,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
16999
17010
  return /*#__PURE__*/React.createElement(Fragment, {
17000
17011
  key: "breadcrumb-".concat(linkText)
17001
17012
  }, /*#__PURE__*/React.createElement(InternalLink, {
17002
- "aria-current": index === breadcrumbsList.length - 1 && "location",
17013
+ "aria-current": index === breadcrumbsList.length - 1 ? "location" : "",
17003
17014
  to: linkDestination,
17004
17015
  active: isActive.toString(),
17005
17016
  color: themeValues.color,
@@ -17008,7 +17019,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
17008
17019
  fontWeight: themeValues.fontWeight,
17009
17020
  margin: themeValues.margin,
17010
17021
  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 }")
17011
- }, linkText), index < breadcrumbsList.length - 1 && /*#__PURE__*/React.createElement(IconChevron, null));
17022
+ }, linkText), index < breadcrumbsList.length - 1 ? /*#__PURE__*/React.createElement(IconChevron, null) : /*#__PURE__*/React.createElement(Fragment, null));
17012
17023
  })));
17013
17024
  };
17014
17025
 
@@ -18861,7 +18872,8 @@ var Card = function Card(_ref2) {
18861
18872
  }, heading), /*#__PURE__*/React.createElement(Text$1, {
18862
18873
  variant: "pS"
18863
18874
  }, text)))), /*#__PURE__*/React.createElement(Box, {
18864
- padding: "0.5rem 1rem 1rem"
18875
+ padding: "0.5rem 1rem 1rem",
18876
+ extraStyles: "display: flex; justify-content: center;"
18865
18877
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
18866
18878
  variant: "smallPrimary",
18867
18879
  text: buttonText,
@@ -22152,7 +22164,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22152
22164
  hiddenStyles: hide
22153
22165
  }, /*#__PURE__*/React.createElement(Alert$1, {
22154
22166
  heading: "Processing Fee",
22155
- 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) {
22156
22168
  return "with a minimum of ".concat(displayCurrency(a), " ");
22157
22169
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22158
22170
  variant: "info",
@@ -35802,8 +35814,9 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
35802
35814
  borderSize: "3px",
35803
35815
  borderColor: highlightIndex == i ? themeValues.textColor : "transparent",
35804
35816
  borderWidthOverride: "0 0 3px 0",
35805
- extraStyles: "text-align: center;",
35806
- as: "li"
35817
+ extraStyles: "text-align: center; display: block;",
35818
+ as: "li",
35819
+ "aria-current": highlightIndex == i ? "step" : ""
35807
35820
  }, /*#__PURE__*/React.createElement(Text$1, {
35808
35821
  variant: "p",
35809
35822
  textAlign: "center",
@@ -41407,7 +41420,8 @@ var WorkflowTile = function WorkflowTile(_ref) {
41407
41420
  text: workflowActionName,
41408
41421
  minWidth: "100%",
41409
41422
  url: "/service/".concat(slug),
41410
- extraStyles: "width: 100%;"
41423
+ extraStyles: "width: 100%;",
41424
+ linkExtraStyles: "justify-content: center;"
41411
41425
  }))));
41412
41426
  };
41413
41427