@thecb/components 12.0.0-beta.2 → 12.0.0-beta.3

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
@@ -45806,9 +45806,8 @@ var disabledBorderColor$1 = GHOST_GREY;
45806
45806
  var disabledColor$2 = MANATEE_GREY;
45807
45807
  var activeBackgroundColor$1 = CORNFLOWER_BLUE;
45808
45808
  var backgroundColor$a = LINK_WATER;
45809
- var borderColor$5 = MANATEE_GREY;
45809
+ var borderColor$5 = MOON_RAKER;
45810
45810
  var color$c = ROYAL_BLUE_VIVID;
45811
- var textColor$5 = BRIGHT_GREY;
45812
45811
  var fallbackValues$L = {
45813
45812
  disabledBackgroundColor: disabledBackgroundColor$1,
45814
45813
  disabledBorderColor: disabledBorderColor$1,
@@ -45816,37 +45815,42 @@ var fallbackValues$L = {
45816
45815
  activeBackgroundColor: activeBackgroundColor$1,
45817
45816
  backgroundColor: backgroundColor$a,
45818
45817
  borderColor: borderColor$5,
45819
- color: color$c,
45820
- textColor: textColor$5
45818
+ color: color$c
45821
45819
  };
45822
45820
 
45823
- var Container = styled(Box).withConfig({
45824
- displayName: "LinkCardstyled__Container",
45821
+ var LinkWrapper = styled(Link).withConfig({
45822
+ displayName: "LinkCardstyled__LinkWrapper",
45825
45823
  componentId: "sc-l5q1h2-0"
45826
- })(["display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;border-radius:8px;padding:24px;", " text-decoration:none;transition:all 0.2s ease-in-out;", ""], function (_ref) {
45827
- var disabled = _ref.disabled,
45828
- themeValues = _ref.themeValues;
45829
- return "\n background-color: ".concat(disabled ? themeValues.disabledBackgroundColor : themeValues.backgroundColor, ";\n border: 1px solid ").concat(disabled ? themeValues.disabledBorderColor : themeValues.borderColor, ";\n ");
45824
+ })(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;padding:24px;max-width:", ";min-width:", ";min-height:141px;align-self:stretch;border-radius:8px;text-decoration:none;", " transition:all .2s ease-in-out;", ""], function (_ref) {
45825
+ var isMobile = _ref.isMobile;
45826
+ return isMobile ? "100%" : "288px";
45830
45827
  }, function (_ref2) {
45831
- var disabled = _ref2.disabled,
45832
- themeValues = _ref2.themeValues;
45833
- return disabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(themeValues.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(themeValues.borderColor, ";\n }\n\n &:active {\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n border: ").concat(BORDER_THIN, " solid ").concat(themeValues.borderColor, ";\n }\n ");
45828
+ var isMobile = _ref2.isMobile;
45829
+ return isMobile ? "240px" : "288px";
45830
+ }, function (_ref3) {
45831
+ var isDisabled = _ref3.isDisabled,
45832
+ theme = _ref3.theme;
45833
+ return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
45834
+ }, function (_ref4) {
45835
+ var isDisabled = _ref4.isDisabled,
45836
+ theme = _ref4.theme;
45837
+ 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 ");
45834
45838
  });
45835
45839
  var Title$2 = styled(Heading$1).withConfig({
45836
45840
  displayName: "LinkCardstyled__Title",
45837
45841
  componentId: "sc-l5q1h2-1"
45838
- })(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:", ";line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_SIZE.MD, FONT_WEIGHT_SEMIBOLD, function (_ref3) {
45839
- var disabled = _ref3.disabled,
45840
- themeValues = _ref3.themeValues;
45841
- return "color: ".concat(disabled ? themeValues.disabledColor : themeValues.color, ";");
45842
+ })(["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 (_ref5) {
45843
+ var isDisabled = _ref5.isDisabled,
45844
+ theme = _ref5.theme;
45845
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
45842
45846
  });
45843
45847
  var Subtitle = styled(Paragraph$1).withConfig({
45844
45848
  displayName: "LinkCardstyled__Subtitle",
45845
45849
  componentId: "sc-l5q1h2-2"
45846
- })(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:", ";line-height:150%;letter-spacing:0.14px;font-weight:", ";", ";"], FONT_SIZE.SM, FONT_WEIGHT_REGULAR, function (_ref4) {
45847
- var disabled = _ref4.disabled,
45848
- themeValues = _ref4.themeValues;
45849
- return "color: ".concat(disabled ? themeValues.disabledColor : themeValues.textColor, ";");
45850
+ })(["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 (_ref6) {
45851
+ var isDisabled = _ref6.isDisabled,
45852
+ theme = _ref6.theme;
45853
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.textColor, ";");
45850
45854
  });
45851
45855
  var Footer = styled(Stack).withConfig({
45852
45856
  displayName: "LinkCardstyled__Footer",
@@ -45865,6 +45869,7 @@ var LinkCard = function LinkCard(_ref) {
45865
45869
  leftContent = _ref.leftContent,
45866
45870
  showRight = _ref.showRight,
45867
45871
  rightContent = _ref.rightContent,
45872
+ href = _ref.href,
45868
45873
  _ref$extraStyles = _ref.extraStyles,
45869
45874
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
45870
45875
  _ref$extraHoverStyles = _ref.extraHoverStyles,
@@ -45877,26 +45882,23 @@ var LinkCard = function LinkCard(_ref) {
45877
45882
  _ref$disabled = _ref.disabled,
45878
45883
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
45879
45884
  _ref$isExternalLink = _ref.isExternalLink,
45880
- isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
45881
- _ref$href = _ref.href,
45882
- href = _ref$href === void 0 ? "" : _ref$href;
45885
+ isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
45883
45886
  var _useContext = useContext(ThemeContext),
45884
45887
  isMobile = _useContext.isMobile;
45885
45888
  var regex = /\W/g;
45886
45889
  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
- return /*#__PURE__*/React__default.createElement(Container, {
45888
- as: "a",
45890
+ return /*#__PURE__*/React__default.createElement(LinkWrapper, {
45891
+ as: Link,
45892
+ to: disabled ? undefined : href,
45889
45893
  role: "link",
45890
- href: disabled ? undefined : href,
45891
- tabIndex: disabled ? -1 : 0,
45892
- borderRadius: "8px",
45894
+ isMobile: isMobile,
45893
45895
  dataQa: "link-card-".concat(locatorSlug),
45894
- themeValues: themeValues,
45896
+ theme: themeValues,
45895
45897
  extraStyles: extraStyles,
45896
45898
  hoverStyles: extraHoverStyles,
45897
45899
  activeStyles: extraActiveStyles,
45898
45900
  "aria-disabled": disabled,
45899
- disabled: disabled,
45901
+ isDisabled: disabled,
45900
45902
  "aria-label": "".concat(title, ", ").concat(subtitle)
45901
45903
  }, /*#__PURE__*/React__default.createElement(Stack, {
45902
45904
  childGap: 0,
@@ -45912,9 +45914,9 @@ var LinkCard = function LinkCard(_ref) {
45912
45914
  extraStyles: "align-items: center;"
45913
45915
  }, /*#__PURE__*/React__default.createElement(Title$2, {
45914
45916
  variant: titleVariant,
45915
- themeValues: themeValues,
45917
+ theme: themeValues,
45916
45918
  margin: 0,
45917
- disabled: disabled
45919
+ isDisabled: disabled
45918
45920
  }, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
45919
45921
  linkColor: themeValues.color,
45920
45922
  text: locatorSlug,
@@ -45927,8 +45929,8 @@ var LinkCard = function LinkCard(_ref) {
45927
45929
  width: "100%"
45928
45930
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
45929
45931
  variant: "pS",
45930
- themeValues: themeValues,
45931
- disabled: disabled
45932
+ theme: themeValues,
45933
+ isDisabled: disabled
45932
45934
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
45933
45935
  background: "transparent",
45934
45936
  borderWidthOverride: "0 0 0 0",
@@ -50914,7 +50916,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50914
50916
  var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$10);
50915
50917
 
50916
50918
  var TextWrapStyles = css(["word-wrap:break-word;overflow-wrap:break-word;white-space:normal;max-width:100%;"]);
50917
- var Container$1 = styled(Box).withConfig({
50919
+ var Container = styled(Box).withConfig({
50918
50920
  displayName: "ContactCardstyled__Container",
50919
50921
  componentId: "sc-1v62a1n-0"
50920
50922
  })(["height:fit-content;display:flex;padding:1rem;flex-direction:column;align-items:flex-start;gap:1.5rem;border-radius:8px;", ""], function (_ref) {
@@ -50952,7 +50954,7 @@ var ContactCard = function ContactCard(_ref) {
50952
50954
  externalLinkColor: ROYAL_BLUE_VIVID
50953
50955
  };
50954
50956
  var linkThemeValues = createThemeValues(themeContext, linkFallbackValues, "Link", linkVariant);
50955
- return /*#__PURE__*/React__default.createElement(Container$1, {
50957
+ return /*#__PURE__*/React__default.createElement(Container, {
50956
50958
  borderRadius: "8px",
50957
50959
  background: WHITE,
50958
50960
  boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.25)",
@@ -51466,12 +51468,12 @@ var TurnstileWidget = /*#__PURE__*/forwardRef(function (_ref4, ref) {
51466
51468
  var hoverColor$6 = ROYAL_BLUE;
51467
51469
  var activeColor$b = CONGRESS_BLUE;
51468
51470
  var linkColor$6 = ROYAL_BLUE_VIVID;
51469
- var textColor$6 = CHARADE_GREY;
51471
+ var textColor$5 = CHARADE_GREY;
51470
51472
  var fallbackValues$12 = {
51471
51473
  linkColor: linkColor$6,
51472
51474
  hoverColor: hoverColor$6,
51473
51475
  activeColor: activeColor$b,
51474
- textColor: textColor$6
51476
+ textColor: textColor$5
51475
51477
  };
51476
51478
 
51477
51479
  var TOOLTIP_THEME_SOURCE = "Popover";