@thecb/components 12.0.0-beta.2 → 12.0.0-beta.4
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 +38 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +38 -39
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/link-card/LinkCard.js +15 -15
- package/src/components/molecules/link-card/LinkCard.stories.js +142 -163
- package/src/components/molecules/link-card/LinkCard.styled.js +27 -27
- package/src/components/molecules/link-card/LinkCard.theme.js +4 -6
- package/src/components/molecules/link-card/index.d.ts +1 -3
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 =
|
|
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,39 @@ 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
|
|
45832
|
-
displayName: "
|
|
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;align-self:stretch;border-radius:8px;
|
|
45835
|
-
var
|
|
45836
|
-
|
|
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-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
|
|
45840
|
-
|
|
45841
|
-
return
|
|
45836
|
+
var isDisabled = _ref2.isDisabled,
|
|
45837
|
+
theme = _ref2.theme;
|
|
45838
|
+
return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
|
|
45839
|
+
}, function (_ref3) {
|
|
45840
|
+
var isDisabled = _ref3.isDisabled,
|
|
45841
|
+
theme = _ref3.theme;
|
|
45842
|
+
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
45843
|
});
|
|
45843
45844
|
var Title$2 = styled__default(Heading$1).withConfig({
|
|
45844
45845
|
displayName: "LinkCardstyled__Title",
|
|
45845
45846
|
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:
|
|
45847
|
-
var
|
|
45848
|
-
|
|
45849
|
-
return "color: ".concat(
|
|
45847
|
+
})(["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 (_ref4) {
|
|
45848
|
+
var isDisabled = _ref4.isDisabled,
|
|
45849
|
+
theme = _ref4.theme;
|
|
45850
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
|
|
45850
45851
|
});
|
|
45851
45852
|
var Subtitle = styled__default(Paragraph$1).withConfig({
|
|
45852
45853
|
displayName: "LinkCardstyled__Subtitle",
|
|
45853
45854
|
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:
|
|
45855
|
-
var
|
|
45856
|
-
|
|
45857
|
-
return "color: ".concat(
|
|
45855
|
+
})(["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 (_ref5) {
|
|
45856
|
+
var isDisabled = _ref5.isDisabled,
|
|
45857
|
+
theme = _ref5.theme;
|
|
45858
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.textColor, ";");
|
|
45858
45859
|
});
|
|
45859
45860
|
var Footer = styled__default(Stack).withConfig({
|
|
45860
45861
|
displayName: "LinkCardstyled__Footer",
|
|
@@ -45873,6 +45874,7 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45873
45874
|
leftContent = _ref.leftContent,
|
|
45874
45875
|
showRight = _ref.showRight,
|
|
45875
45876
|
rightContent = _ref.rightContent,
|
|
45877
|
+
href = _ref.href,
|
|
45876
45878
|
_ref$extraStyles = _ref.extraStyles,
|
|
45877
45879
|
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
45878
45880
|
_ref$extraHoverStyles = _ref.extraHoverStyles,
|
|
@@ -45885,26 +45887,23 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45885
45887
|
_ref$disabled = _ref.disabled,
|
|
45886
45888
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
45887
45889
|
_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;
|
|
45890
|
+
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
|
|
45891
45891
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
45892
45892
|
isMobile = _useContext.isMobile;
|
|
45893
45893
|
var regex = /\W/g;
|
|
45894
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, "-");
|
|
45895
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45896
|
-
as:
|
|
45895
|
+
return /*#__PURE__*/React__default.createElement(LinkWrapper, {
|
|
45896
|
+
as: reactRouterDom.Link,
|
|
45897
|
+
to: disabled ? undefined : href,
|
|
45897
45898
|
role: "link",
|
|
45898
|
-
|
|
45899
|
-
tabIndex: disabled ? -1 : 0,
|
|
45900
|
-
borderRadius: "8px",
|
|
45899
|
+
isMobile: isMobile,
|
|
45901
45900
|
dataQa: "link-card-".concat(locatorSlug),
|
|
45902
|
-
|
|
45901
|
+
theme: themeValues,
|
|
45903
45902
|
extraStyles: extraStyles,
|
|
45904
45903
|
hoverStyles: extraHoverStyles,
|
|
45905
45904
|
activeStyles: extraActiveStyles,
|
|
45906
45905
|
"aria-disabled": disabled,
|
|
45907
|
-
|
|
45906
|
+
isDisabled: disabled,
|
|
45908
45907
|
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
45909
45908
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45910
45909
|
childGap: 0,
|
|
@@ -45920,9 +45919,9 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45920
45919
|
extraStyles: "align-items: center;"
|
|
45921
45920
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
45922
45921
|
variant: titleVariant,
|
|
45923
|
-
|
|
45922
|
+
theme: themeValues,
|
|
45924
45923
|
margin: 0,
|
|
45925
|
-
|
|
45924
|
+
isDisabled: disabled
|
|
45926
45925
|
}, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
45927
45926
|
linkColor: themeValues.color,
|
|
45928
45927
|
text: locatorSlug,
|
|
@@ -45935,8 +45934,8 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45935
45934
|
width: "100%"
|
|
45936
45935
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
45937
45936
|
variant: "pS",
|
|
45938
|
-
|
|
45939
|
-
|
|
45937
|
+
theme: themeValues,
|
|
45938
|
+
isDisabled: disabled
|
|
45940
45939
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
45941
45940
|
background: "transparent",
|
|
45942
45941
|
borderWidthOverride: "0 0 0 0",
|
|
@@ -50922,7 +50921,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
50922
50921
|
var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$10);
|
|
50923
50922
|
|
|
50924
50923
|
var TextWrapStyles = styled.css(["word-wrap:break-word;overflow-wrap:break-word;white-space:normal;max-width:100%;"]);
|
|
50925
|
-
var Container
|
|
50924
|
+
var Container = styled__default(Box).withConfig({
|
|
50926
50925
|
displayName: "ContactCardstyled__Container",
|
|
50927
50926
|
componentId: "sc-1v62a1n-0"
|
|
50928
50927
|
})(["height:fit-content;display:flex;padding:1rem;flex-direction:column;align-items:flex-start;gap:1.5rem;border-radius:8px;", ""], function (_ref) {
|
|
@@ -50960,7 +50959,7 @@ var ContactCard = function ContactCard(_ref) {
|
|
|
50960
50959
|
externalLinkColor: ROYAL_BLUE_VIVID
|
|
50961
50960
|
};
|
|
50962
50961
|
var linkThemeValues = createThemeValues(themeContext, linkFallbackValues, "Link", linkVariant);
|
|
50963
|
-
return /*#__PURE__*/React__default.createElement(Container
|
|
50962
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
50964
50963
|
borderRadius: "8px",
|
|
50965
50964
|
background: WHITE,
|
|
50966
50965
|
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
@@ -51474,12 +51473,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
51474
51473
|
var hoverColor$6 = ROYAL_BLUE;
|
|
51475
51474
|
var activeColor$b = CONGRESS_BLUE;
|
|
51476
51475
|
var linkColor$6 = ROYAL_BLUE_VIVID;
|
|
51477
|
-
var textColor$
|
|
51476
|
+
var textColor$5 = CHARADE_GREY;
|
|
51478
51477
|
var fallbackValues$12 = {
|
|
51479
51478
|
linkColor: linkColor$6,
|
|
51480
51479
|
hoverColor: hoverColor$6,
|
|
51481
51480
|
activeColor: activeColor$b,
|
|
51482
|
-
textColor: textColor$
|
|
51481
|
+
textColor: textColor$5
|
|
51483
51482
|
};
|
|
51484
51483
|
|
|
51485
51484
|
var TOOLTIP_THEME_SOURCE = "Popover";
|