@thecb/components 12.0.0-beta.2 → 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 +41 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +41 -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 +28 -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,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
|
|
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;
|
|
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-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
|
-
|
|
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:
|
|
45847
|
-
var
|
|
45848
|
-
|
|
45849
|
-
return "color: ".concat(
|
|
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:
|
|
45855
|
-
var
|
|
45856
|
-
|
|
45857
|
-
return "color: ".concat(
|
|
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,26 +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(
|
|
45896
|
-
as:
|
|
45898
|
+
return /*#__PURE__*/React__default.createElement(LinkWrapper, {
|
|
45899
|
+
as: reactRouterDom.Link,
|
|
45900
|
+
to: disabled ? undefined : href,
|
|
45897
45901
|
role: "link",
|
|
45898
|
-
|
|
45899
|
-
tabIndex: disabled ? -1 : 0,
|
|
45900
|
-
borderRadius: "8px",
|
|
45902
|
+
isMobile: isMobile,
|
|
45901
45903
|
dataQa: "link-card-".concat(locatorSlug),
|
|
45902
|
-
|
|
45904
|
+
theme: themeValues,
|
|
45903
45905
|
extraStyles: extraStyles,
|
|
45904
45906
|
hoverStyles: extraHoverStyles,
|
|
45905
45907
|
activeStyles: extraActiveStyles,
|
|
45906
45908
|
"aria-disabled": disabled,
|
|
45907
|
-
|
|
45909
|
+
isDisabled: disabled,
|
|
45908
45910
|
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
45909
45911
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45910
45912
|
childGap: 0,
|
|
@@ -45920,9 +45922,9 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45920
45922
|
extraStyles: "align-items: center;"
|
|
45921
45923
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
45922
45924
|
variant: titleVariant,
|
|
45923
|
-
|
|
45925
|
+
theme: themeValues,
|
|
45924
45926
|
margin: 0,
|
|
45925
|
-
|
|
45927
|
+
isDisabled: disabled
|
|
45926
45928
|
}, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
45927
45929
|
linkColor: themeValues.color,
|
|
45928
45930
|
text: locatorSlug,
|
|
@@ -45935,8 +45937,8 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45935
45937
|
width: "100%"
|
|
45936
45938
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
45937
45939
|
variant: "pS",
|
|
45938
|
-
|
|
45939
|
-
|
|
45940
|
+
theme: themeValues,
|
|
45941
|
+
isDisabled: disabled
|
|
45940
45942
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
45941
45943
|
background: "transparent",
|
|
45942
45944
|
borderWidthOverride: "0 0 0 0",
|
|
@@ -50922,7 +50924,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
50922
50924
|
var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$10);
|
|
50923
50925
|
|
|
50924
50926
|
var TextWrapStyles = styled.css(["word-wrap:break-word;overflow-wrap:break-word;white-space:normal;max-width:100%;"]);
|
|
50925
|
-
var Container
|
|
50927
|
+
var Container = styled__default(Box).withConfig({
|
|
50926
50928
|
displayName: "ContactCardstyled__Container",
|
|
50927
50929
|
componentId: "sc-1v62a1n-0"
|
|
50928
50930
|
})(["height:fit-content;display:flex;padding:1rem;flex-direction:column;align-items:flex-start;gap:1.5rem;border-radius:8px;", ""], function (_ref) {
|
|
@@ -50960,7 +50962,7 @@ var ContactCard = function ContactCard(_ref) {
|
|
|
50960
50962
|
externalLinkColor: ROYAL_BLUE_VIVID
|
|
50961
50963
|
};
|
|
50962
50964
|
var linkThemeValues = createThemeValues(themeContext, linkFallbackValues, "Link", linkVariant);
|
|
50963
|
-
return /*#__PURE__*/React__default.createElement(Container
|
|
50965
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
50964
50966
|
borderRadius: "8px",
|
|
50965
50967
|
background: WHITE,
|
|
50966
50968
|
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
@@ -51474,12 +51476,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
51474
51476
|
var hoverColor$6 = ROYAL_BLUE;
|
|
51475
51477
|
var activeColor$b = CONGRESS_BLUE;
|
|
51476
51478
|
var linkColor$6 = ROYAL_BLUE_VIVID;
|
|
51477
|
-
var textColor$
|
|
51479
|
+
var textColor$5 = CHARADE_GREY;
|
|
51478
51480
|
var fallbackValues$12 = {
|
|
51479
51481
|
linkColor: linkColor$6,
|
|
51480
51482
|
hoverColor: hoverColor$6,
|
|
51481
51483
|
activeColor: activeColor$b,
|
|
51482
|
-
textColor: textColor$
|
|
51484
|
+
textColor: textColor$5
|
|
51483
51485
|
};
|
|
51484
51486
|
|
|
51485
51487
|
var TOOLTIP_THEME_SOURCE = "Popover";
|