@thecb/components 12.0.0-beta.8 → 12.0.0

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
@@ -15099,7 +15099,8 @@ var AutopayOnIcon = function AutopayOnIcon(_ref) {
15099
15099
  xmlns: "http://www.w3.org/2000/svg",
15100
15100
  width: "12",
15101
15101
  height: "13",
15102
- viewBox: "0 0 12 13"
15102
+ viewBox: "0 0 12 13",
15103
+ "aria-hidden": "true"
15103
15104
  }, /*#__PURE__*/React__default.createElement("g", {
15104
15105
  fill: "none",
15105
15106
  fillRule: "evenodd",
@@ -45826,6 +45827,7 @@ var activeBackgroundColor$1 = CORNFLOWER_BLUE;
45826
45827
  var backgroundColor$a = LINK_WATER;
45827
45828
  var borderColor$5 = MOON_RAKER;
45828
45829
  var color$c = ROYAL_BLUE_VIVID;
45830
+ var textColor$5 = BRIGHT_GREY;
45829
45831
  var fallbackValues$L = {
45830
45832
  disabledBackgroundColor: disabledBackgroundColor$1,
45831
45833
  disabledBorderColor: disabledBorderColor$1,
@@ -45833,26 +45835,27 @@ var fallbackValues$L = {
45833
45835
  activeBackgroundColor: activeBackgroundColor$1,
45834
45836
  backgroundColor: backgroundColor$a,
45835
45837
  borderColor: borderColor$5,
45836
- color: color$c
45838
+ color: color$c,
45839
+ textColor: textColor$5
45837
45840
  };
45838
45841
 
45839
- var LinkWrapper = styled__default(reactRouterDom.Link).withConfig({
45840
- displayName: "LinkCardstyled__LinkWrapper",
45842
+ var StyledAnchor = styled__default("a").withConfig({
45843
+ displayName: "LinkCardstyled__StyledAnchor",
45841
45844
  componentId: "sc-l5q1h2-0"
45842
45845
  })(["", ""], function (_ref) {
45843
- var disabled = _ref.disabled,
45846
+ var disabled = _ref.$disabled,
45844
45847
  theme = _ref.$theme,
45845
- extraStyles = _ref.extraStyles,
45846
- disabledStyles = _ref.disabledStyles,
45847
- hoverStyles = _ref.hoverStyles,
45848
- activeStyles = _ref.activeStyles;
45848
+ extraStyles = _ref.$extraStyles,
45849
+ disabledStyles = _ref.$disabledStyles,
45850
+ hoverStyles = _ref.$hoverStyles,
45851
+ activeStyles = _ref.$activeStyles;
45849
45852
  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 ");
45850
45853
  });
45851
45854
  var Title$2 = styled__default(Heading$1).withConfig({
45852
45855
  displayName: "LinkCardstyled__Title",
45853
45856
  componentId: "sc-l5q1h2-1"
45854
45857
  })(["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) {
45855
- var disabled = _ref2.disabled,
45858
+ var disabled = _ref2.$disabled,
45856
45859
  theme = _ref2.$theme;
45857
45860
  return disabled ? theme.disabledColor : theme.color;
45858
45861
  });
@@ -45860,7 +45863,7 @@ var Subtitle = styled__default(Paragraph$1).withConfig({
45860
45863
  displayName: "LinkCardstyled__Subtitle",
45861
45864
  componentId: "sc-l5q1h2-2"
45862
45865
  })(["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) {
45863
- var disabled = _ref3.disabled,
45866
+ var disabled = _ref3.$disabled,
45864
45867
  theme = _ref3.$theme;
45865
45868
  return disabled ? theme.disabledColor : theme.textColor;
45866
45869
  });
@@ -45894,27 +45897,23 @@ var LinkCard = function LinkCard(_ref) {
45894
45897
  _ref$disabled = _ref.disabled,
45895
45898
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
45896
45899
  _ref$isExternalLink = _ref.isExternalLink,
45897
- isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
45898
- key = _ref.key;
45899
- var _useContext = React.useContext(styled.ThemeContext),
45900
- isMobile = _useContext.isMobile;
45900
+ isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
45901
45901
  var regex = /\W/g;
45902
45902
  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, "-");
45903
- return /*#__PURE__*/React__default.createElement(LinkWrapper, {
45904
- key: key || locatorSlug,
45905
- as: reactRouterDom.Link,
45906
- to: disabled ? undefined : href,
45907
- role: "link",
45908
- isMobile: isMobile,
45909
- $theme: themeValues,
45910
- extraStyles: extraStyles,
45911
- hoverStyles: extraHoverStyles,
45912
- activeStyles: extraActiveStyles,
45903
+ return /*#__PURE__*/React__default.createElement(StyledAnchor, {
45904
+ key: "link-card-".concat(locatorSlug),
45905
+ href: disabled ? undefined : href,
45906
+ rel: isExternalLink ? "noopener noreferrer" : undefined,
45907
+ target: isExternalLink ? "_blank" : undefined,
45908
+ tabIndex: disabled ? -1 : 0,
45913
45909
  "aria-disabled": disabled,
45914
- disabled: disabled,
45910
+ $disabled: disabled,
45915
45911
  "aria-label": "".concat(title, ", ").concat(subtitle),
45916
45912
  "data-qa": "link-card-".concat(locatorSlug),
45917
- tabIndex: disabled ? -1 : 0
45913
+ $theme: themeValues,
45914
+ $extraStyles: disabled ? "pointer-events: none; ".concat(extraStyles) : extraStyles,
45915
+ $hoverStyles: extraHoverStyles,
45916
+ $activeStyles: extraActiveStyles
45918
45917
  }, /*#__PURE__*/React__default.createElement(Stack, {
45919
45918
  childGap: 0,
45920
45919
  bottomItem: 3,
@@ -45931,7 +45930,7 @@ var LinkCard = function LinkCard(_ref) {
45931
45930
  variant: titleVariant,
45932
45931
  $theme: themeValues,
45933
45932
  margin: 0,
45934
- disabled: disabled
45933
+ $disabled: disabled
45935
45934
  }, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
45936
45935
  linkColor: themeValues.color,
45937
45936
  text: locatorSlug,
@@ -45945,7 +45944,7 @@ var LinkCard = function LinkCard(_ref) {
45945
45944
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
45946
45945
  variant: "pS",
45947
45946
  $theme: themeValues,
45948
- disabled: disabled
45947
+ $disabled: disabled
45949
45948
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
45950
45949
  background: "transparent",
45951
45950
  borderWidthOverride: "0 0 0 0",
@@ -46227,7 +46226,6 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
46227
46226
  } : navigateToSettings,
46228
46227
  isLoading: deactivatingSchedule
46229
46228
  };
46230
- var modalLinkHoverFocus = "\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;\n ";
46231
46229
  var hoverStyles = "text-decoration: underline;";
46232
46230
  var activeStyles = "text-decoration: underline;";
46233
46231
  var renderAutoPayControl = function renderAutoPayControl() {
@@ -46262,28 +46260,25 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
46262
46260
  {
46263
46261
  return /*#__PURE__*/React__default.createElement(Box, {
46264
46262
  padding: "0",
46263
+ role: "button",
46264
+ tabIndex: "0",
46265
46265
  onClick: onClick || function () {
46266
46266
  toggleModal(true);
46267
46267
  },
46268
+ onKeyDown: onKeyPress || function (e) {
46269
+ e.key === "Enter" && toggleModal(true);
46270
+ },
46268
46271
  hoverStyles: hoverStyles,
46269
46272
  activeStyles: activeStyles,
46270
- extraStyles: "cursor: pointer;"
46273
+ extraStyles: "cursor: pointer; margin-bottom: 5px;",
46274
+ dataQa: "".concat(shortPlan, " On")
46271
46275
  }, /*#__PURE__*/React__default.createElement(Cluster, {
46272
46276
  justify: isMobile ? "flex-start" : "flex-end",
46273
46277
  align: "center"
46274
46278
  }, /*#__PURE__*/React__default.createElement(AutopayOnIcon, null), /*#__PURE__*/React__default.createElement(Text$1, {
46275
46279
  variant: "pS",
46276
- onClick: onClick || function () {
46277
- return toggleModal(true);
46278
- },
46279
- onKeyPress: onKeyPress || function (e) {
46280
- e.key === "Enter" && toggleModal(true);
46281
- },
46282
- tabIndex: "0",
46283
- dataQa: "".concat(shortPlan, " On"),
46284
46280
  color: SEA_GREEN,
46285
46281
  weight: FONT_WEIGHT_REGULAR,
46286
- hoverStyles: modalLinkHoverFocus,
46287
46282
  extraStyles: "padding-left: 0.25rem;",
46288
46283
  disabled: disableActions
46289
46284
  }, "".concat(shortPlan, " ").concat(nextAutopayDate))));
@@ -51484,12 +51479,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
51484
51479
  var hoverColor$6 = ROYAL_BLUE;
51485
51480
  var activeColor$b = CONGRESS_BLUE;
51486
51481
  var linkColor$6 = ROYAL_BLUE_VIVID;
51487
- var textColor$5 = CHARADE_GREY;
51482
+ var textColor$6 = CHARADE_GREY;
51488
51483
  var fallbackValues$12 = {
51489
51484
  linkColor: linkColor$6,
51490
51485
  hoverColor: hoverColor$6,
51491
51486
  activeColor: activeColor$b,
51492
- textColor: textColor$5
51487
+ textColor: textColor$6
51493
51488
  };
51494
51489
 
51495
51490
  var TOOLTIP_THEME_SOURCE = "Popover";