@thecb/components 5.4.4 → 5.6.1

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,
@@ -12138,7 +12142,7 @@ var Motion = function Motion(_ref) {
12138
12142
  var ReelStyled = styled.div.withConfig({
12139
12143
  displayName: "Reelstyled__ReelStyled",
12140
12144
  componentId: "sc-bhf05j-0"
12141
- })(["display:flex;overflow-x:", ";padding:", ";height:", ";justify-content:", ";> * + *{margin-left:", ";}> *{flex:0 0 ", ";}"], function (_ref) {
12145
+ })(["display:flex;overflow-x:", ";padding:", ";height:", ";justify-content:", ";> * + *{margin-left:", ";}> *{flex:0 0 ", ";}", ""], function (_ref) {
12142
12146
  var disableScroll = _ref.disableScroll;
12143
12147
  return disableScroll ? "hidden" : "auto";
12144
12148
  }, function (_ref2) {
@@ -12156,9 +12160,18 @@ var ReelStyled = styled.div.withConfig({
12156
12160
  }, function (_ref6) {
12157
12161
  var childWidth = _ref6.childWidth;
12158
12162
  return childWidth;
12163
+ }, function (_ref7) {
12164
+ var useOrderedList = _ref7.useOrderedList,
12165
+ useUnorderedList = _ref7.useUnorderedList;
12166
+ return useOrderedList || useUnorderedList ? "\n margin: 0;\n margin-block-start: 0;\n margin-block-end: 0;\n padding-inline-start: 0;\n list-style-type: none;\n " : "";
12159
12167
  });
12160
12168
 
12161
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
+ */
12162
12175
 
12163
12176
  var Reel = function Reel(_ref) {
12164
12177
  var _ref$childGap = _ref.childGap,
@@ -12188,8 +12201,12 @@ var Reel = function Reel(_ref) {
12188
12201
  padding: padding,
12189
12202
  justifyContent: justifyContent,
12190
12203
  disableScroll: disableScroll,
12191
- as: elementType
12192
- }, rest), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
12204
+ as: elementType,
12205
+ useOrderedList: useOrderedList,
12206
+ useUnorderedList: useUnorderedList
12207
+ }, rest, {
12208
+ role: useOrderedList || useUnorderedList ? "list" : "section"
12209
+ }), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
12193
12210
  };
12194
12211
 
12195
12212
  /*
@@ -16993,7 +17010,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
16993
17010
  return /*#__PURE__*/React.createElement(Fragment, {
16994
17011
  key: "breadcrumb-".concat(linkText)
16995
17012
  }, /*#__PURE__*/React.createElement(InternalLink, {
16996
- "aria-current": index === breadcrumbsList.length - 1 && "location",
17013
+ "aria-current": index === breadcrumbsList.length - 1 ? "location" : "",
16997
17014
  to: linkDestination,
16998
17015
  active: isActive.toString(),
16999
17016
  color: themeValues.color,
@@ -17002,7 +17019,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
17002
17019
  fontWeight: themeValues.fontWeight,
17003
17020
  margin: themeValues.margin,
17004
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 }")
17005
- }, 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));
17006
17023
  })));
17007
17024
  };
17008
17025
 
@@ -22146,7 +22163,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22146
22163
  hiddenStyles: hide
22147
22164
  }, /*#__PURE__*/React.createElement(Alert$1, {
22148
22165
  heading: "Processing Fee",
22149
- text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22166
+ text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22150
22167
  return "with a minimum of ".concat(displayCurrency(a), " ");
22151
22168
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22152
22169
  variant: "info",
@@ -35281,11 +35298,11 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
35281
35298
  }, customTitle ? /*#__PURE__*/React.createElement(Box, {
35282
35299
  width: "calc(100% - 36px)",
35283
35300
  padding: "0px"
35284
- }, title) : /*#__PURE__*/React.createElement(Heading$1, {
35285
- variant: "h6",
35301
+ }, title) : /*#__PURE__*/React.createElement(Title$1, {
35286
35302
  weight: FONT_WEIGHT_SEMIBOLD,
35287
35303
  color: themeValues.titleColor,
35288
- as: "h6"
35304
+ as: "h6",
35305
+ variant: "small"
35289
35306
  }, title), /*#__PURE__*/React.createElement(Motion, {
35290
35307
  variants: icon,
35291
35308
  extraStyles: "display: flex; align-items: center;"
@@ -35475,7 +35492,7 @@ var EditableList = function EditableList(_ref) {
35475
35492
  return removeItem(item.id);
35476
35493
  },
35477
35494
  extraStyles: "min-width: 0;",
35478
- "aria-label": "Remove ".concat(itemName, " ").concat(title)
35495
+ "aria-label": "Remove ".concat(itemName)
35479
35496
  })), canEdit && /*#__PURE__*/React.createElement(Box, {
35480
35497
  padding: "0 0.5rem",
35481
35498
  border: "2px solid transparent",
@@ -35489,7 +35506,7 @@ var EditableList = function EditableList(_ref) {
35489
35506
  return editItem(item.id);
35490
35507
  },
35491
35508
  extraStyles: "min-width: 0;",
35492
- "aria-label": "Edit ".concat(itemName, " ").concat(title)
35509
+ "aria-label": "Edit ".concat(itemName)
35493
35510
  }))));
35494
35511
  })), canAdd && (!maxItems || items.length < maxItems) && /*#__PURE__*/React.createElement(Box, {
35495
35512
  padding: items.length === 0 ? "0" : "1rem 0 0"
@@ -35796,8 +35813,9 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
35796
35813
  borderSize: "3px",
35797
35814
  borderColor: highlightIndex == i ? themeValues.textColor : "transparent",
35798
35815
  borderWidthOverride: "0 0 3px 0",
35799
- extraStyles: "text-align: center;",
35800
- as: "li"
35816
+ extraStyles: "text-align: center; display: block;",
35817
+ as: "li",
35818
+ "aria-current": highlightIndex == i ? "step" : ""
35801
35819
  }, /*#__PURE__*/React.createElement(Text$1, {
35802
35820
  variant: "p",
35803
35821
  textAlign: "center",