@thecb/components 8.4.0-beta.1 → 8.4.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
@@ -42845,84 +42845,75 @@ 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;
42858
- var navigate = reactRouterDom.useNavigate();
42859
- return /*#__PURE__*/React__default.createElement(Box, {
42860
- background: "#FEFEFE" // --grays-cool-gray-00
42861
- ,
42862
- border: "1px solid #C4CEF4;" // --primary-color-primary-30
42863
- ,
42864
- padding: 0,
42865
- 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;",
42869
- onClick: function onClick() {
42870
- // @TODO replace with something valid like navigate
42871
- console.log("attempting navigation..."); // window.location.pathname = `/service/${slug}`;
42857
+ path = _ref.path,
42858
+ showLeft = _ref.showLeft,
42859
+ leftContent = _ref.leftContent,
42860
+ showRight = _ref.showRight,
42861
+ rightContent = _ref.rightContent,
42862
+ _ref$onClick = _ref.onClick,
42863
+ onClick = _ref$onClick === void 0 ? function () {
42864
+ return navigate(path);
42865
+ } : _ref$onClick;
42866
+ return function () {
42867
+ var navigate = reactRouterDom.useNavigate();
42868
+ 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 ");
42869
+ return /*#__PURE__*/React__default.createElement(Box, {
42870
+ background: "#FEFEFE" // --grays-cool-gray-00
42871
+ ,
42872
+ border: "1px solid #C4CEF4;" // --primary-color-primary-30
42873
+ ,
42874
+ borderRadius: "8px",
42875
+ dataQa: "link-card-".concat(title),
42876
+ width: "100%",
42877
+ maxWidth: "288px",
42878
+ minWidth: "240px",
42879
+ minHeight: "141px",
42880
+ padding: "16px 24px",
42881
+ extraStyles: " display: flex; flex-direction: column; align-items: flex-start; gap: 40px; flex-shrink: 0; align-self: stretch;",
42882
+ hoverStyles: activeHoverStyles,
42883
+ activeStyles: activeHoverStyles,
42884
+ onClick: onClick
42885
+ }, /*#__PURE__*/React__default.createElement(Stack, {
42886
+ childGap: 0,
42887
+ bottomItem: 3,
42888
+ fullHeight: true
42889
+ }, /*#__PURE__*/React__default.createElement(Box, {
42890
+ padding: "1rem 1rem 0 1rem"
42891
+ }, /*#__PURE__*/React__default.createElement(Heading$1, {
42892
+ variant: "h6",
42893
+ weight: FONT_WEIGHT_SEMIBOLD,
42894
+ color: themeValues.color,
42895
+ margin: 0,
42896
+ 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%;"
42897
+ }, title)), /*#__PURE__*/React__default.createElement(Box, {
42898
+ padding: "0 1rem 40px"
42899
+ /* minHeight={"4.25rem"}*/
42872
42900
 
42873
- navigate("/service/".concat(slug));
42874
- }
42875
- }, /*#__PURE__*/React__default.createElement(Stack, {
42876
- childGap: 0,
42877
- bottomItem: 3,
42878
- fullHeight: true
42879
- }, /*#__PURE__*/React__default.createElement(Box, {
42880
- padding: "1rem 1rem 0 1rem"
42881
- }, /*#__PURE__*/React__default.createElement(Heading$1, {
42882
- variant: "h6",
42883
- weight: FONT_WEIGHT_SEMIBOLD,
42884
- color: themeValues.color,
42885
- margin: 0,
42886
- 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"
42890
- }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
42891
- variant: "pS",
42892
- color: themeValues.color,
42893
- 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, {
42895
- background: "transparent",
42896
- borderWidthOverride: "0 0 0 0",
42897
- padding: "0 1rem 1rem 1rem"
42898
- }, /*#__PURE__*/React__default.createElement(Stack, {
42899
- direction: "row",
42900
- 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
- })))))));
42901
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
42902
+ variant: "pS",
42903
+ color: themeValues.color,
42904
+ 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;"
42905
+ }, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
42906
+ background: "transparent",
42907
+ borderWidthOverride: "0 0 0 0",
42908
+ padding: "0 1rem 1rem 1rem"
42909
+ }, /*#__PURE__*/React__default.createElement(Stack, {
42910
+ direction: "row",
42911
+ justify: "space-between"
42912
+ }, /*#__PURE__*/React__default.createElement(Stack, {
42913
+ direction: "row",
42914
+ childGap: "6px"
42915
+ }, showLeft && leftContent, showRight && rightContent)))));
42916
+ }();
42926
42917
  };
42927
42918
 
42928
42919
  var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I, "default");