@thecb/components 11.11.1-beta.2 → 12.0.0-beta.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.cjs.js CHANGED
@@ -40923,9 +40923,7 @@ var EditableList = function EditableList(_ref) {
40923
40923
  _ref$editItemAriaRole = _ref.editItemAriaRole,
40924
40924
  editItemAriaRole = _ref$editItemAriaRole === void 0 ? "" : _ref$editItemAriaRole,
40925
40925
  _ref$disablePlacehold = _ref.disablePlaceholder,
40926
- disablePlaceholder = _ref$disablePlacehold === void 0 ? false : _ref$disablePlacehold,
40927
- _ref$getEditHref = _ref.getEditHref,
40928
- getEditHref = _ref$getEditHref === void 0 ? null : _ref$getEditHref;
40926
+ disablePlaceholder = _ref$disablePlacehold === void 0 ? false : _ref$disablePlacehold;
40929
40927
  var addText = "Add a".concat(itemName[0].match(/[aieouAIEOU]/) ? "n" : "", " ").concat(itemName);
40930
40928
  return /*#__PURE__*/React__default.createElement(Box, {
40931
40929
  padding: listPadding,
@@ -40992,12 +40990,7 @@ var EditableList = function EditableList(_ref) {
40992
40990
  extraStyles: ":not(:first-child) { border-left: 2px solid ".concat(BOSTON_BLUE, ";}"),
40993
40991
  dataQa: qaPrefix + " Edit",
40994
40992
  key: "Edit ".concat(item.id)
40995
- }, getEditHref ? /*#__PURE__*/React__default.createElement(InternalLink, {
40996
- to: getEditHref(item),
40997
- fontWeight: "400",
40998
- extraStyles: "margin: 0.5rem; min-width: 0;",
40999
- "aria-label": "Edit ".concat(ariaLabel || itemName)
41000
- }, "Edit") : /*#__PURE__*/React__default.createElement(ButtonWithAction, {
40993
+ }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
41001
40994
  variant: "smallGhost",
41002
40995
  text: "Edit",
41003
40996
  action: function action() {
@@ -45821,8 +45814,9 @@ var disabledBorderColor$1 = GHOST_GREY;
45821
45814
  var disabledColor$2 = MANATEE_GREY;
45822
45815
  var activeBackgroundColor$1 = CORNFLOWER_BLUE;
45823
45816
  var backgroundColor$a = LINK_WATER;
45824
- var borderColor$5 = MOON_RAKER;
45817
+ var borderColor$5 = MANATEE_GREY;
45825
45818
  var color$c = ROYAL_BLUE_VIVID;
45819
+ var textColor$5 = BRIGHT_GREY;
45826
45820
  var fallbackValues$L = {
45827
45821
  disabledBackgroundColor: disabledBackgroundColor$1,
45828
45822
  disabledBorderColor: disabledBorderColor$1,
@@ -45830,36 +45824,37 @@ var fallbackValues$L = {
45830
45824
  activeBackgroundColor: activeBackgroundColor$1,
45831
45825
  backgroundColor: backgroundColor$a,
45832
45826
  borderColor: borderColor$5,
45833
- color: color$c
45827
+ color: color$c,
45828
+ textColor: textColor$5
45834
45829
  };
45835
45830
 
45836
45831
  var Container = styled__default(Box).withConfig({
45837
45832
  displayName: "LinkCardstyled__Container",
45838
45833
  componentId: "sc-l5q1h2-0"
45839
- })(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;", " transition:all .2s ease-in-out;", ""], function (_ref) {
45840
- var isDisabled = _ref.isDisabled,
45841
- theme = _ref.theme;
45842
- return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
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 ");
45843
45838
  }, function (_ref2) {
45844
- var isDisabled = _ref2.isDisabled,
45845
- theme = _ref2.theme;
45846
- 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 ");
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 ");
45847
45842
  });
45848
45843
  var Title$2 = styled__default(Heading$1).withConfig({
45849
45844
  displayName: "LinkCardstyled__Title",
45850
45845
  componentId: "sc-l5q1h2-1"
45851
- })(["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 (_ref3) {
45852
- var isDisabled = _ref3.isDisabled,
45853
- theme = _ref3.theme;
45854
- return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
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, ";");
45855
45850
  });
45856
45851
  var Subtitle = styled__default(Paragraph$1).withConfig({
45857
45852
  displayName: "LinkCardstyled__Subtitle",
45858
45853
  componentId: "sc-l5q1h2-2"
45859
- })(["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_SEMIBOLD, function (_ref4) {
45860
- var isDisabled = _ref4.isDisabled,
45861
- theme = _ref4.theme;
45862
- return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
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, ";");
45863
45858
  });
45864
45859
  var Footer = styled__default(Stack).withConfig({
45865
45860
  displayName: "LinkCardstyled__Footer",
@@ -45878,7 +45873,6 @@ var LinkCard = function LinkCard(_ref) {
45878
45873
  leftContent = _ref.leftContent,
45879
45874
  showRight = _ref.showRight,
45880
45875
  rightContent = _ref.rightContent,
45881
- onClick = _ref.onClick,
45882
45876
  _ref$extraStyles = _ref.extraStyles,
45883
45877
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
45884
45878
  _ref$extraHoverStyles = _ref.extraHoverStyles,
@@ -45888,31 +45882,34 @@ var LinkCard = function LinkCard(_ref) {
45888
45882
  themeValues = _ref.themeValues,
45889
45883
  _ref$titleVariant = _ref.titleVariant,
45890
45884
  titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant,
45891
- _ref$titlePadding = _ref.titlePadding,
45892
45885
  _ref$disabled = _ref.disabled,
45893
45886
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
45894
45887
  _ref$isExternalLink = _ref.isExternalLink,
45895
- isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
45888
+ isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
45889
+ _ref$href = _ref.href,
45890
+ href = _ref$href === void 0 ? "" : _ref$href;
45896
45891
  var _useContext = React.useContext(styled.ThemeContext),
45897
45892
  isMobile = _useContext.isMobile;
45898
45893
  var regex = /\W/g;
45899
45894
  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, "-");
45900
45895
  return /*#__PURE__*/React__default.createElement(Container, {
45896
+ as: "a",
45897
+ role: "link",
45898
+ href: disabled ? undefined : href,
45899
+ tabIndex: disabled ? -1 : 0,
45901
45900
  borderRadius: "8px",
45902
45901
  dataQa: "link-card-".concat(locatorSlug),
45903
45902
  width: "100%",
45904
45903
  maxWidth: isMobile ? "100%" : "288px",
45905
45904
  minWidth: isMobile ? "240px" : "288px",
45906
45905
  minHeight: "141px",
45907
- padding: "24px",
45908
- theme: themeValues,
45906
+ padding: SPACING.MD,
45907
+ themeValues: themeValues,
45909
45908
  extraStyles: extraStyles,
45910
45909
  hoverStyles: extraHoverStyles,
45911
45910
  activeStyles: extraActiveStyles,
45912
- onClick: disabled ? noop$1 : onClick,
45913
45911
  "aria-disabled": disabled,
45914
- isDisabled: disabled,
45915
- role: "group",
45912
+ disabled: disabled,
45916
45913
  "aria-label": "".concat(title, ", ").concat(subtitle)
45917
45914
  }, /*#__PURE__*/React__default.createElement(Stack, {
45918
45915
  childGap: 0,
@@ -45928,9 +45925,9 @@ var LinkCard = function LinkCard(_ref) {
45928
45925
  extraStyles: "align-items: center;"
45929
45926
  }, /*#__PURE__*/React__default.createElement(Title$2, {
45930
45927
  variant: titleVariant,
45931
- theme: themeValues,
45928
+ themeValues: themeValues,
45932
45929
  margin: 0,
45933
- isDisabled: disabled
45930
+ disabled: disabled
45934
45931
  }, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
45935
45932
  linkColor: themeValues.color,
45936
45933
  text: locatorSlug,
@@ -45943,8 +45940,8 @@ var LinkCard = function LinkCard(_ref) {
45943
45940
  width: "100%"
45944
45941
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
45945
45942
  variant: "pS",
45946
- theme: themeValues,
45947
- isDisabled: disabled
45943
+ themeValues: themeValues,
45944
+ disabled: disabled
45948
45945
  }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
45949
45946
  background: "transparent",
45950
45947
  borderWidthOverride: "0 0 0 0",
@@ -51482,12 +51479,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
51482
51479
  var hoverColor$6 = ROYAL_BLUE;
51483
51480
  var activeColor$b = CONGRESS_BLUE;
51484
51481
  var linkColor$6 = ROYAL_BLUE_VIVID;
51485
- var textColor$5 = CHARADE_GREY;
51482
+ var textColor$6 = CHARADE_GREY;
51486
51483
  var fallbackValues$12 = {
51487
51484
  linkColor: linkColor$6,
51488
51485
  hoverColor: hoverColor$6,
51489
51486
  activeColor: activeColor$b,
51490
- textColor: textColor$5
51487
+ textColor: textColor$6
51491
51488
  };
51492
51489
 
51493
51490
  var TOOLTIP_THEME_SOURCE = "Popover";