@thecb/components 12.0.0-beta.1 → 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.cjs.js CHANGED
@@ -45814,9 +45814,8 @@ var disabledBorderColor$1 = GHOST_GREY;
45814
45814
  var disabledColor$2 = MANATEE_GREY;
45815
45815
  var activeBackgroundColor$1 = CORNFLOWER_BLUE;
45816
45816
  var backgroundColor$a = LINK_WATER;
45817
- var borderColor$5 = MANATEE_GREY;
45817
+ var borderColor$5 = MOON_RAKER;
45818
45818
  var color$c = ROYAL_BLUE_VIVID;
45819
- var textColor$5 = BRIGHT_GREY;
45820
45819
  var fallbackValues$L = {
45821
45820
  disabledBackgroundColor: disabledBackgroundColor$1,
45822
45821
  disabledBorderColor: disabledBorderColor$1,
@@ -45824,37 +45823,42 @@ var fallbackValues$L = {
45824
45823
  activeBackgroundColor: activeBackgroundColor$1,
45825
45824
  backgroundColor: backgroundColor$a,
45826
45825
  borderColor: borderColor$5,
45827
- color: color$c,
45828
- textColor: textColor$5
45826
+ color: color$c
45829
45827
  };
45830
45828
 
45831
- var Container = styled__default(Box).withConfig({
45832
- displayName: "LinkCardstyled__Container",
45829
+ var LinkWrapper = styled__default(reactRouterDom.Link).withConfig({
45830
+ displayName: "LinkCardstyled__LinkWrapper",
45833
45831
  componentId: "sc-l5q1h2-0"
45834
- })(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;padding:", ";", " text-decoration:none;transition:all 0.2s ease-in-out;", ""], SPACING.MD, function (_ref) {
45835
- var disabled = _ref.disabled,
45836
- themeValues = _ref.themeValues;
45837
- return "\n background-color: ".concat(disabled ? themeValues.disabledBackgroundColor : themeValues.backgroundColor, ";\n border: 1px solid ").concat(disabled ? themeValues.disabledBorderColor : themeValues.borderColor, ";\n ");
45832
+ })(["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) {
45833
+ var isMobile = _ref.isMobile;
45834
+ return isMobile ? "100%" : "288px";
45838
45835
  }, function (_ref2) {
45839
- var disabled = _ref2.disabled,
45840
- themeValues = _ref2.themeValues;
45841
- 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 ");
45836
+ var isMobile = _ref2.isMobile;
45837
+ return isMobile ? "240px" : "288px";
45838
+ }, function (_ref3) {
45839
+ var isDisabled = _ref3.isDisabled,
45840
+ theme = _ref3.theme;
45841
+ return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
45842
+ }, function (_ref4) {
45843
+ var isDisabled = _ref4.isDisabled,
45844
+ theme = _ref4.theme;
45845
+ 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 ");
45842
45846
  });
45843
45847
  var Title$2 = styled__default(Heading$1).withConfig({
45844
45848
  displayName: "LinkCardstyled__Title",
45845
45849
  componentId: "sc-l5q1h2-1"
45846
- })(["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) {
45847
- var disabled = _ref3.disabled,
45848
- themeValues = _ref3.themeValues;
45849
- return "color: ".concat(disabled ? themeValues.disabledColor : themeValues.color, ";");
45850
+ })(["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) {
45851
+ var isDisabled = _ref5.isDisabled,
45852
+ theme = _ref5.theme;
45853
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
45850
45854
  });
45851
45855
  var Subtitle = styled__default(Paragraph$1).withConfig({
45852
45856
  displayName: "LinkCardstyled__Subtitle",
45853
45857
  componentId: "sc-l5q1h2-2"
45854
- })(["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) {
45855
- var disabled = _ref4.disabled,
45856
- themeValues = _ref4.themeValues;
45857
- return "color: ".concat(disabled ? themeValues.disabledColor : themeValues.textColor, ";");
45858
+ })(["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) {
45859
+ var isDisabled = _ref6.isDisabled,
45860
+ theme = _ref6.theme;
45861
+ return "color: ".concat(isDisabled ? theme.disabledColor : theme.textColor, ";");
45858
45862
  });
45859
45863
  var Footer = styled__default(Stack).withConfig({
45860
45864
  displayName: "LinkCardstyled__Footer",
@@ -45873,6 +45877,7 @@ var LinkCard = function LinkCard(_ref) {
45873
45877
  leftContent = _ref.leftContent,
45874
45878
  showRight = _ref.showRight,
45875
45879
  rightContent = _ref.rightContent,
45880
+ href = _ref.href,
45876
45881
  _ref$extraStyles = _ref.extraStyles,
45877
45882
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
45878
45883
  _ref$extraHoverStyles = _ref.extraHoverStyles,
@@ -45885,31 +45890,23 @@ var LinkCard = function LinkCard(_ref) {
45885
45890
  _ref$disabled = _ref.disabled,
45886
45891
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
45887
45892
  _ref$isExternalLink = _ref.isExternalLink,
45888
- isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
45889
- _ref$href = _ref.href,
45890
- href = _ref$href === void 0 ? "" : _ref$href;
45893
+ isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
45891
45894
  var _useContext = React.useContext(styled.ThemeContext),
45892
45895
  isMobile = _useContext.isMobile;
45893
45896
  var regex = /\W/g;
45894
45897
  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, "-");
45895
- return /*#__PURE__*/React__default.createElement(Container, {
45896
- as: "a",
45898
+ return /*#__PURE__*/React__default.createElement(LinkWrapper, {
45899
+ as: reactRouterDom.Link,
45900
+ to: disabled ? undefined : href,
45897
45901
  role: "link",
45898
- href: disabled ? undefined : href,
45899
- tabIndex: disabled ? -1 : 0,
45900
- borderRadius: "8px",
45902
+ isMobile: isMobile,
45901
45903
  dataQa: "link-card-".concat(locatorSlug),
45902
- width: "100%",
45903
- maxWidth: isMobile ? "100%" : "288px",
45904
- minWidth: isMobile ? "240px" : "288px",
45905
- minHeight: "141px",
45906
- padding: SPACING.MD,
45907
- themeValues: themeValues,
45904
+ theme: themeValues,
45908
45905
  extraStyles: extraStyles,
45909
45906
  hoverStyles: extraHoverStyles,
45910
45907
  activeStyles: extraActiveStyles,
45911
45908
  "aria-disabled": disabled,
45912
- disabled: disabled,
45909
+ isDisabled: disabled,
45913
45910
  "aria-label": "".concat(title, ", ").concat(subtitle)
45914
45911
  }, /*#__PURE__*/React__default.createElement(Stack, {
45915
45912
  childGap: 0,
@@ -45925,9 +45922,9 @@ var LinkCard = function LinkCard(_ref) {
45925
45922
  extraStyles: "align-items: center;"
45926
45923
  }, /*#__PURE__*/React__default.createElement(Title$2, {
45927
45924
  variant: titleVariant,
45928
- themeValues: themeValues,
45925
+ theme: themeValues,
45929
45926
  margin: 0,
45930
- disabled: disabled
45927
+ isDisabled: disabled
45931
45928
  }, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
45932
45929
  linkColor: themeValues.color,
45933
45930
  text: locatorSlug,
@@ -45940,8 +45937,8 @@ var LinkCard = function LinkCard(_ref) {
45940
45937
  width: "100%"
45941
45938
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
45942
45939
  variant: "pS",
45943
- themeValues: themeValues,
45944
- disabled: disabled
45940
+ theme: themeValues,
45941
+ isDisabled: disabled
45945
45942
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
45946
45943
  background: "transparent",
45947
45944
  borderWidthOverride: "0 0 0 0",
@@ -50927,7 +50924,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50927
50924
  var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$10);
50928
50925
 
50929
50926
  var TextWrapStyles = styled.css(["word-wrap:break-word;overflow-wrap:break-word;white-space:normal;max-width:100%;"]);
50930
- var Container$1 = styled__default(Box).withConfig({
50927
+ var Container = styled__default(Box).withConfig({
50931
50928
  displayName: "ContactCardstyled__Container",
50932
50929
  componentId: "sc-1v62a1n-0"
50933
50930
  })(["height:fit-content;display:flex;padding:1rem;flex-direction:column;align-items:flex-start;gap:1.5rem;border-radius:8px;", ""], function (_ref) {
@@ -50965,7 +50962,7 @@ var ContactCard = function ContactCard(_ref) {
50965
50962
  externalLinkColor: ROYAL_BLUE_VIVID
50966
50963
  };
50967
50964
  var linkThemeValues = createThemeValues(themeContext, linkFallbackValues, "Link", linkVariant);
50968
- return /*#__PURE__*/React__default.createElement(Container$1, {
50965
+ return /*#__PURE__*/React__default.createElement(Container, {
50969
50966
  borderRadius: "8px",
50970
50967
  background: WHITE,
50971
50968
  boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.25)",
@@ -51479,12 +51476,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
51479
51476
  var hoverColor$6 = ROYAL_BLUE;
51480
51477
  var activeColor$b = CONGRESS_BLUE;
51481
51478
  var linkColor$6 = ROYAL_BLUE_VIVID;
51482
- var textColor$6 = CHARADE_GREY;
51479
+ var textColor$5 = CHARADE_GREY;
51483
51480
  var fallbackValues$12 = {
51484
51481
  linkColor: linkColor$6,
51485
51482
  hoverColor: hoverColor$6,
51486
51483
  activeColor: activeColor$b,
51487
- textColor: textColor$6
51484
+ textColor: textColor$5
51488
51485
  };
51489
51486
 
51490
51487
  var TOOLTIP_THEME_SOURCE = "Popover";