@thecb/components 12.0.0-beta.6 → 12.0.0-beta.7

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
@@ -26306,9 +26306,13 @@ var BankItemWrapper = styled.div.withConfig({
26306
26306
  displayName: "FormattedBankAccount__BankItemWrapper",
26307
26307
  componentId: "sc-18hcgw4-0"
26308
26308
  })(["display:flex;justify-content:flex-start;align-items:center;"]);
26309
+ var BankIconWrapper = styled.div.withConfig({
26310
+ displayName: "FormattedBankAccount__BankIconWrapper",
26311
+ componentId: "sc-18hcgw4-1"
26312
+ })(["margin-right:8px;width:36px;height:auto;display:flex;"]);
26309
26313
  var BankAccountText = styled.h4.withConfig({
26310
26314
  displayName: "FormattedBankAccount__BankAccountText",
26311
- componentId: "sc-18hcgw4-1"
26315
+ componentId: "sc-18hcgw4-2"
26312
26316
  })(["color:", ";font-size:1rem;font-weight:400;line-height:1.5rem;text-align:left;margin-right:0.5rem;display:inline-block;"], function (_ref) {
26313
26317
  var color = _ref.color;
26314
26318
  return color;
@@ -26320,10 +26324,7 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
26320
26324
  accountType = _ref2.accountType,
26321
26325
  autoPay = _ref2.autoPay,
26322
26326
  themeValues = _ref2.themeValues;
26323
- return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(Box, {
26324
- padding: "0.25rem 0 0 0",
26325
- extraStyles: "margin-right: 1rem;"
26326
- }, /*#__PURE__*/React__default.createElement(BankIcon, null)), /*#__PURE__*/React__default.createElement(Stack, {
26327
+ return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(BankIconWrapper, null, /*#__PURE__*/React__default.createElement(BankIconLarge, null)), /*#__PURE__*/React__default.createElement(Stack, {
26327
26328
  childGap: "0"
26328
26329
  }, accountType === CHECKING && /*#__PURE__*/React__default.createElement(BankAccountText, {
26329
26330
  color: themeValues.textColor
@@ -26378,7 +26379,7 @@ var CardType = function CardType(_ref) {
26378
26379
  var _ref2 = cardBrands[normalizedType] || cardBrands["default"],
26379
26380
  label = _ref2.label,
26380
26381
  IconComponent = _ref2[size];
26381
- return /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(IconComponent, null));
26382
+ return /*#__PURE__*/React__default.createElement(IconComponent, null);
26382
26383
  };
26383
26384
 
26384
26385
  var textColor$2 = "".concat(CHARADE_GREY);
@@ -26455,7 +26456,7 @@ var CreditCardWrapper = styled.div.withConfig({
26455
26456
  var CCIconWrapper = styled.div.withConfig({
26456
26457
  displayName: "FormattedCreditCard__CCIconWrapper",
26457
26458
  componentId: "sc-s0ta5l-1"
26458
- })(["margin-right:16px;width:36px;height:auto;display:flex;"]);
26459
+ })(["margin-right:8px;width:36px;height:auto;display:flex;"]);
26459
26460
  var FormattedCreditCard = function FormattedCreditCard(_ref) {
26460
26461
  var lastFour = _ref.lastFour,
26461
26462
  type = _ref.type,
@@ -27564,7 +27565,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
27564
27565
  borderWidth: "1px",
27565
27566
  borderStyle: "solid",
27566
27567
  borderRadius: "12px",
27567
- margin: "6px 14px 6px 6px",
27568
+ margin: "6px 8px 6px 6px",
27568
27569
  height: "24px",
27569
27570
  width: "24px",
27570
27571
  variants: buttonBorder,
@@ -45821,33 +45822,30 @@ var fallbackValues$L = {
45821
45822
  var LinkWrapper = styled(Link).withConfig({
45822
45823
  displayName: "LinkCardstyled__LinkWrapper",
45823
45824
  componentId: "sc-l5q1h2-0"
45824
- })(["display:flex;flex-direction:column;align-items:flex-start;gap:40px;flex-shrink:0;padding:24px;align-self:stretch;border-radius:8px;text-decoration:none;", " ", " transition:all .2s ease-in-out;", ""], function (_ref) {
45825
- var isDisabled = _ref.isDisabled,
45826
- theme = _ref.theme;
45827
- return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
45828
- }, function (_ref2) {
45829
- var extraStyles = _ref2.extraStyles;
45830
- return extraStyles;
45831
- }, function (_ref3) {
45832
- var isDisabled = _ref3.isDisabled,
45833
- theme = _ref3.theme;
45834
- return isDisabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(theme.disabledBorderColor, ";\n }\n ") : "\n &:hover,\n &:active {\n cursor: pointer;\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);\n }\n\n &:hover:not(:active) {\n border: 1px solid ".concat(theme.borderColor, ";\n }\n\n &:active {\n background-color: ").concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n }\n ");
45825
+ })(["", ""], function (_ref) {
45826
+ var disabled = _ref.disabled,
45827
+ theme = _ref.$theme,
45828
+ extraStyles = _ref.extraStyles,
45829
+ disabledStyles = _ref.disabledStyles,
45830
+ hoverStyles = _ref.hoverStyles,
45831
+ activeStyles = _ref.activeStyles;
45832
+ return "\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 40px;\n flex-shrink: 0;\n padding: 24px;\n align-self: stretch;\n border-radius: 8px;\n text-decoration: none;\n background-color: ".concat(disabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid\n ").concat(disabled ? theme.disabledBorderColor : theme.borderColor, ";\n transition: all 0.2s ease-in-out;\n ").concat(extraStyles || "", "\n\n ").concat(disabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(theme.disabledBorderColor, ";\n ").concat(disabledStyles || "", "\n }\n ") : "\n &:hover,\n &:active {\n cursor: pointer;\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);\n }\n ".concat(hoverStyles || "", "\n\n &:hover:not(:active) {\n border: 1px solid ").concat(theme.borderColor, ";\n }\n\n &:active {\n background-color: ").concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n ").concat(activeStyles || "", "\n }\n "), "\n ");
45835
45833
  });
45836
45834
  var Title$2 = styled(Heading$1).withConfig({
45837
45835
  displayName: "LinkCardstyled__Title",
45838
45836
  componentId: "sc-l5q1h2-1"
45839
- })(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref4) {
45840
- var isDisabled = _ref4.isDisabled,
45841
- theme = _ref4.theme;
45842
- return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
45837
+ })(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";color:", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref2) {
45838
+ var disabled = _ref2.disabled,
45839
+ theme = _ref2.$theme;
45840
+ return disabled ? theme.disabledColor : theme.color;
45843
45841
  });
45844
45842
  var Subtitle = styled(Paragraph$1).withConfig({
45845
45843
  displayName: "LinkCardstyled__Subtitle",
45846
45844
  componentId: "sc-l5q1h2-2"
45847
- })(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150%;letter-spacing:0.14px;font-weight:", ";", ";"], FONT_WEIGHT_REGULAR, function (_ref5) {
45848
- var isDisabled = _ref5.isDisabled,
45849
- theme = _ref5.theme;
45850
- return "color: ".concat(isDisabled ? theme.disabledColor : theme.textColor, ";");
45845
+ })(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150%;letter-spacing:0.14px;font-weight:", ";color:", ";"], FONT_WEIGHT_REGULAR, function (_ref3) {
45846
+ var disabled = _ref3.disabled,
45847
+ theme = _ref3.$theme;
45848
+ return disabled ? theme.disabledColor : theme.textColor;
45851
45849
  });
45852
45850
  var Footer = styled(Stack).withConfig({
45853
45851
  displayName: "LinkCardstyled__Footer",
@@ -45879,24 +45877,27 @@ var LinkCard = function LinkCard(_ref) {
45879
45877
  _ref$disabled = _ref.disabled,
45880
45878
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
45881
45879
  _ref$isExternalLink = _ref.isExternalLink,
45882
- isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
45880
+ isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
45881
+ key = _ref.key;
45883
45882
  var _useContext = useContext(ThemeContext),
45884
45883
  isMobile = _useContext.isMobile;
45885
45884
  var regex = /\W/g;
45886
45885
  var locatorSlug = title === null || title === void 0 || (_title$toLowerCase = title.toLowerCase) === null || _title$toLowerCase === void 0 || (_title$toLowerCase = _title$toLowerCase.call(title)) === null || _title$toLowerCase === void 0 || (_title$toLowerCase$re = _title$toLowerCase.replaceAll) === null || _title$toLowerCase$re === void 0 ? void 0 : _title$toLowerCase$re.call(_title$toLowerCase, regex, "-");
45887
45886
  return /*#__PURE__*/React__default.createElement(LinkWrapper, {
45887
+ key: key || locatorSlug,
45888
45888
  as: Link,
45889
45889
  to: disabled ? undefined : href,
45890
45890
  role: "link",
45891
45891
  isMobile: isMobile,
45892
- dataQa: "link-card-".concat(locatorSlug),
45893
- theme: themeValues,
45892
+ $theme: themeValues,
45894
45893
  extraStyles: extraStyles,
45895
45894
  hoverStyles: extraHoverStyles,
45896
45895
  activeStyles: extraActiveStyles,
45897
45896
  "aria-disabled": disabled,
45898
- isDisabled: disabled,
45899
- "aria-label": "".concat(title, ", ").concat(subtitle)
45897
+ disabled: disabled,
45898
+ "aria-label": "".concat(title, ", ").concat(subtitle),
45899
+ "data-qa": "link-card-".concat(locatorSlug),
45900
+ tabIndex: disabled ? -1 : 0
45900
45901
  }, /*#__PURE__*/React__default.createElement(Stack, {
45901
45902
  childGap: 0,
45902
45903
  bottomItem: 3,
@@ -45911,9 +45912,9 @@ var LinkCard = function LinkCard(_ref) {
45911
45912
  extraStyles: "align-items: center;"
45912
45913
  }, /*#__PURE__*/React__default.createElement(Title$2, {
45913
45914
  variant: titleVariant,
45914
- theme: themeValues,
45915
+ $theme: themeValues,
45915
45916
  margin: 0,
45916
- isDisabled: disabled
45917
+ disabled: disabled
45917
45918
  }, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
45918
45919
  linkColor: themeValues.color,
45919
45920
  text: locatorSlug,
@@ -45926,8 +45927,8 @@ var LinkCard = function LinkCard(_ref) {
45926
45927
  width: "100%"
45927
45928
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
45928
45929
  variant: "pS",
45929
- theme: themeValues,
45930
- isDisabled: disabled
45930
+ $theme: themeValues,
45931
+ disabled: disabled
45931
45932
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
45932
45933
  background: "transparent",
45933
45934
  borderWidthOverride: "0 0 0 0",