@thecb/components 8.4.0-beta.1 → 8.4.0-beta.2

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
@@ -42845,32 +42845,39 @@ var fallbackValues$I = {
42845
42845
  color: color$b
42846
42846
  };
42847
42847
 
42848
+ // import ArrowRightIcon from "../../atoms/icons/ArrowRightIcon";
42849
+
42848
42850
  var LinkCard = function LinkCard(_ref) {
42849
42851
  var _ref$variant = _ref.variant,
42850
- _ref$workflowName = _ref.workflowName,
42851
- workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
42852
- _ref$workflowDescript = _ref.workflowDescription,
42853
- workflowDescription = _ref$workflowDescript === void 0 ? "Link your benefit plan" : _ref$workflowDescript,
42854
- _ref$workflowActionNa = _ref.workflowActionName,
42855
- workflowActionName = _ref$workflowActionNa === void 0 ? "Link an account" : _ref$workflowActionNa,
42852
+ _ref$title = _ref.title,
42853
+ title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
42854
+ _ref$subtitle = _ref.subtitle,
42855
+ subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
42856
42856
  themeValues = _ref.themeValues,
42857
- slug = _ref.slug;
42857
+ path = _ref.path,
42858
+ showLeft = _ref.showLeft,
42859
+ leftContent = _ref.leftContent,
42860
+ showRight = _ref.showRight,
42861
+ rightContent = _ref.rightContent;
42858
42862
  var navigate = reactRouterDom.useNavigate();
42863
+ var activeHoverStyles = "\n border-radius: 8px;\n cursor: pointer;\n border: 1px solid ".concat(themeValues.color, ";\n background: var(--primary-color-primary-10, #EBEFFB);\n /* Primitives/New Shadow/3-Pressed-New */\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.10), 0px 5px 11px 0px rgba(41, 42, 51, 0.10), 0px 4px 19px 0px rgba(41, 42, 51, 0.09), 0px 27px 26px 0px rgba(41, 42, 51, 0.05), 0px 56px 31px 0px rgba(41, 42, 51, 0.01), 0px 80px 33px 0px rgba(41, 42, 51, 0.00);\n .show-on-hover {color: ").concat(themeValues.color, ";}\n ");
42859
42864
  return /*#__PURE__*/React__default.createElement(Box, {
42860
42865
  background: "#FEFEFE" // --grays-cool-gray-00
42861
42866
  ,
42862
42867
  border: "1px solid #C4CEF4;" // --primary-color-primary-30
42863
42868
  ,
42864
- padding: 0,
42865
42869
  borderRadius: "8px",
42866
- dataQa: "link-card-".concat(workflowDescription),
42867
- hoverStyles: "\n border-radius: 8px;\n cursor: pointer;\n border: 1px solid ".concat(ROYAL_BLUE_VIVID, ";\n background: var(--primary-color-primary-10, #EBEFFB);\n /* Primitives/New Shadow/3-Pressed-New */\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.10), 0px 5px 11px 0px rgba(41, 42, 51, 0.10), 0px 4px 19px 0px rgba(41, 42, 51, 0.09), 0px 27px 26px 0px rgba(41, 42, 51, 0.05), 0px 56px 31px 0px rgba(41, 42, 51, 0.01), 0px 80px 33px 0px rgba(41, 42, 51, 0.00);\n .show-on-hover {color: ").concat(ROYAL_BLUE_VIVID, ";}\n "),
42868
- extraStyles: "display: flex; width: 288px; min-width: 240px; max-width: 288px; min-height: 141px; padding: 16px 24px; flex-direction: column; align-items: flex-start; gap: 40px; flex-shrink: 0; align-self: stretch;",
42870
+ dataQa: "link-card-".concat(title),
42871
+ width: "100%",
42872
+ maxWidth: "288px",
42873
+ minWidth: "240px",
42874
+ minHeight: "141px",
42875
+ padding: "16px 24px",
42876
+ extraStyles: " display: flex; flex-direction: column; align-items: flex-start; gap: 40px; flex-shrink: 0; align-self: stretch;",
42877
+ hoverStyles: activeHoverStyles,
42878
+ activeStyles: activeHoverStyles,
42869
42879
  onClick: function onClick() {
42870
- // @TODO replace with something valid like navigate
42871
- console.log("attempting navigation..."); // window.location.pathname = `/service/${slug}`;
42872
-
42873
- navigate("/service/".concat(slug));
42880
+ navigate(path);
42874
42881
  }
42875
42882
  }, /*#__PURE__*/React__default.createElement(Stack, {
42876
42883
  childGap: 0,
@@ -42884,45 +42891,22 @@ var LinkCard = function LinkCard(_ref) {
42884
42891
  color: themeValues.color,
42885
42892
  margin: 0,
42886
42893
  extraStyles: "display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; align-self: stretch; overflow: hidden; text-overflow: ellipsis; font-family: Public Sans; font-size: 16px; font-style: normal; font-weight: 600; line-height: 150%;"
42887
- }, workflowName)), /*#__PURE__*/React__default.createElement(Box, {
42888
- padding: "0 1rem 0",
42889
- minHeight: "4.25rem"
42894
+ }, title)), /*#__PURE__*/React__default.createElement(Box, {
42895
+ padding: "0 1rem 40px"
42896
+ /* minHeight={"4.25rem"}*/
42897
+
42890
42898
  }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
42891
42899
  variant: "pS",
42892
42900
  color: themeValues.color,
42893
42901
  extraStyles: "overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; align-self: stretch; /* CB Standard/Desktop/D - P Small - Regular */ font-family: Public Sans; font-size: 14px; font-style: normal; font-weight: 400; line-height: 150%; /* 21px */ letter-spacing: 0.14px;"
42894
- }, workflowDescription)), /*#__PURE__*/React__default.createElement(Box, {
42902
+ }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
42895
42903
  background: "transparent",
42896
42904
  borderWidthOverride: "0 0 0 0",
42897
42905
  padding: "0 1rem 1rem 1rem"
42898
42906
  }, /*#__PURE__*/React__default.createElement(Stack, {
42899
42907
  direction: "row",
42900
42908
  justify: "space-between"
42901
- }, /*#__PURE__*/React__default.createElement(Box, {
42902
- background: "transparent",
42903
- borderWidthOverride: "0 0 0 0",
42904
- padding: "0"
42905
- }, /*#__PURE__*/React__default.createElement(Badge$1, {
42906
- label: "Autopay Available",
42907
- Icon: AutopayIcon
42908
- })), /*#__PURE__*/React__default.createElement(Stack, {
42909
- direction: "row",
42910
- childGap: "6px"
42911
- }, workflowActionName === "Link an account" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Text$1, {
42912
- variant: "pS",
42913
- color: themeValues.color,
42914
- extraStyles: "text-align: right; color: transparent;",
42915
- className: "show-on-hover"
42916
- }, "Find"), /*#__PURE__*/React__default.createElement(PlusCircleIcon, {
42917
- color: themeValues.color
42918
- })), workflowActionName === "Pay now" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Text$1, {
42919
- variant: "pS",
42920
- color: themeValues.color,
42921
- extraStyles: "text-align: right; color: transparent;",
42922
- className: "show-on-hover"
42923
- }, "Pay"), /*#__PURE__*/React__default.createElement(ArrowRightIcon, {
42924
- color: themeValues.color
42925
- })))))));
42909
+ }, showLeft && leftContent, showRight && rightContent))));
42926
42910
  };
42927
42911
 
42928
42912
  var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I, "default");