@thecb/components 10.4.0-beta.7 → 10.4.0-beta.9
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 +40 -33
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +40 -33
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/link-card/LinkCard.js +14 -3
- package/src/components/molecules/link-card/LinkCard.stories.js +40 -36
- package/src/components/molecules/link-card/LinkCard.styled.js +41 -32
- package/src/components/molecules/link-card/LinkCard.theme.js +16 -8
package/dist/index.cjs.js
CHANGED
|
@@ -42648,23 +42648,31 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
|
|
|
42648
42648
|
var MISC_BILL_ICON = "MISC_SINGLE_BILL";
|
|
42649
42649
|
var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, ACCOUNTS_GENERIC_ICON, AccountGenericIcon), ACCOUNTS_CONSTRUCTION_ICON, AccountConstructionIcon), ACCOUNTS_HEALTH_ICON, AccountMedicalIcon), ACCOUNTS_DENTAL_ICON, AccountDentalIcon), ACCOUNTS_UTILITY_ELECTRIC_ICON, AccountElectricIcon), ACCOUNTS_UTILITY_GARBAGE_ICON, AccountGarbageIcon), ACCOUNTS_UTILITY_GAS_ICON, AccountGasIcon), ACCOUNTS_UTILITY_WATER_ICON, AccountWaterIcon), PROPERTIES_PERSONAL_ICON, PropertyPersonalIcon), PROPERTIES_GARAGE_ICON, PropertyGarageIcon), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, PROPERTIES_BUSINESS_ICON, PropertyBusinessIcon), PROPERTIES_STOREFRONT_ICON, PropertyStorefrontIcon), PROPERTIES_APARTMENT_ICON, PropertyApartmentIcon), PROPERTIES_LAND_ICON, PropertyLandIcon), PROPERTIES_CAR_ICON, PropertyCarIcon), PROPERTIES_MOTORCYCLE_ICON, PropertyMotorcycleIcon), PROPERTIES_COMMERCIAL_AUTO_ICON, PropertyCommercialVehicleIcon), MISC_BILL_ICON, AccountBillIcon));
|
|
42650
42650
|
|
|
42651
|
+
var disabledBackgroundColor$1 = {
|
|
42652
|
+
primary: TRANSPARENT
|
|
42653
|
+
};
|
|
42654
|
+
var disabledBorderColor$1 = {
|
|
42655
|
+
primary: GHOST_GREY
|
|
42656
|
+
};
|
|
42657
|
+
var disabledColor$1 = {
|
|
42658
|
+
primary: MANATEE_GREY
|
|
42659
|
+
};
|
|
42651
42660
|
var activeBackgroundColor$1 = {
|
|
42652
|
-
primary:
|
|
42653
|
-
disabled: "".concat(TRANSPARENT)
|
|
42661
|
+
primary: CORNFLOWER_BLUE
|
|
42654
42662
|
};
|
|
42655
42663
|
var backgroundColor$9 = {
|
|
42656
|
-
primary:
|
|
42657
|
-
disabled: "".concat(TRANSPARENT)
|
|
42664
|
+
primary: LINK_WATER
|
|
42658
42665
|
};
|
|
42659
42666
|
var borderColor$5 = {
|
|
42660
|
-
primary:
|
|
42661
|
-
disabled: "".concat(GHOST_GREY)
|
|
42667
|
+
primary: MOON_RAKER
|
|
42662
42668
|
};
|
|
42663
42669
|
var color$b = {
|
|
42664
|
-
primary:
|
|
42665
|
-
disabled: "".concat(MANATEE_GREY)
|
|
42670
|
+
primary: ROYAL_BLUE_VIVID
|
|
42666
42671
|
};
|
|
42667
42672
|
var fallbackValues$I = {
|
|
42673
|
+
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
42674
|
+
disabledBorderColor: disabledBorderColor$1,
|
|
42675
|
+
disabledColor: disabledColor$1,
|
|
42668
42676
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
42669
42677
|
backgroundColor: backgroundColor$9,
|
|
42670
42678
|
borderColor: borderColor$5,
|
|
@@ -42674,35 +42682,30 @@ var fallbackValues$I = {
|
|
|
42674
42682
|
var Container = styled__default(Box).withConfig({
|
|
42675
42683
|
displayName: "LinkCardstyled__Container",
|
|
42676
42684
|
componentId: "sc-l5q1h2-0"
|
|
42677
|
-
})(["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
|
|
42678
|
-
var
|
|
42679
|
-
|
|
42685
|
+
})(["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) {
|
|
42686
|
+
var isDisabled = _ref.isDisabled,
|
|
42687
|
+
theme = _ref.theme;
|
|
42688
|
+
return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
|
|
42680
42689
|
}, function (_ref2) {
|
|
42681
|
-
var
|
|
42682
|
-
|
|
42683
|
-
},
|
|
42684
|
-
var disabled = _ref3.disabled;
|
|
42685
|
-
return "\n ".concat(disabled ? "none" : "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 ");
|
|
42686
|
-
}, function (_ref4) {
|
|
42687
|
-
var theme = _ref4.theme;
|
|
42688
|
-
return "border: 1px solid ".concat(theme.borderColor, ";");
|
|
42689
|
-
}, function (_ref5) {
|
|
42690
|
-
var theme = _ref5.theme;
|
|
42691
|
-
return "\n background-color: ".concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n ;");
|
|
42690
|
+
var isDisabled = _ref2.isDisabled,
|
|
42691
|
+
theme = _ref2.theme;
|
|
42692
|
+
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 ");
|
|
42692
42693
|
});
|
|
42693
42694
|
var Title$2 = styled__default(Heading$1).withConfig({
|
|
42694
42695
|
displayName: "LinkCardstyled__Title",
|
|
42695
42696
|
componentId: "sc-l5q1h2-1"
|
|
42696
|
-
})(["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 (
|
|
42697
|
-
var
|
|
42698
|
-
|
|
42697
|
+
})(["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) {
|
|
42698
|
+
var isDisabled = _ref3.isDisabled,
|
|
42699
|
+
theme = _ref3.theme;
|
|
42700
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
|
|
42699
42701
|
});
|
|
42700
42702
|
var Subtitle = styled__default(Paragraph$1).withConfig({
|
|
42701
42703
|
displayName: "LinkCardstyled__Subtitle",
|
|
42702
42704
|
componentId: "sc-l5q1h2-2"
|
|
42703
|
-
})(["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
|
|
42704
|
-
var
|
|
42705
|
-
|
|
42705
|
+
})(["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) {
|
|
42706
|
+
var isDisabled = _ref4.isDisabled,
|
|
42707
|
+
theme = _ref4.theme;
|
|
42708
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
|
|
42706
42709
|
});
|
|
42707
42710
|
var Footer = styled__default(Stack).withConfig({
|
|
42708
42711
|
displayName: "LinkCardstyled__Footer",
|
|
@@ -42710,8 +42713,7 @@ var Footer = styled__default(Stack).withConfig({
|
|
|
42710
42713
|
})(["align-items:center;width:100%;"]);
|
|
42711
42714
|
|
|
42712
42715
|
var LinkCard = function LinkCard(_ref) {
|
|
42713
|
-
var _ref$
|
|
42714
|
-
_ref$title = _ref.title,
|
|
42716
|
+
var _ref$title = _ref.title,
|
|
42715
42717
|
title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
|
|
42716
42718
|
_ref$subtitle = _ref.subtitle,
|
|
42717
42719
|
subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
|
|
@@ -42748,7 +42750,10 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42748
42750
|
hoverStyles: extraHoverStyles,
|
|
42749
42751
|
activeStyles: extraActiveStyles,
|
|
42750
42752
|
onClick: disabled ? noop$1 : onClick,
|
|
42751
|
-
"aria-disabled": disabled
|
|
42753
|
+
"aria-disabled": disabled,
|
|
42754
|
+
isDisabled: disabled,
|
|
42755
|
+
role: "group",
|
|
42756
|
+
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
42752
42757
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
42753
42758
|
childGap: 0,
|
|
42754
42759
|
bottomItem: 3,
|
|
@@ -42763,13 +42768,15 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42763
42768
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
42764
42769
|
variant: titleVariant,
|
|
42765
42770
|
theme: themeValues,
|
|
42766
|
-
margin: 0
|
|
42771
|
+
margin: 0,
|
|
42772
|
+
isDisabled: disabled
|
|
42767
42773
|
}, title)), /*#__PURE__*/React__default.createElement(Box, {
|
|
42768
42774
|
padding: "0 0 40px",
|
|
42769
42775
|
width: "100%"
|
|
42770
42776
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
42771
42777
|
variant: "pS",
|
|
42772
|
-
theme: themeValues
|
|
42778
|
+
theme: themeValues,
|
|
42779
|
+
isDisabled: disabled
|
|
42773
42780
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
42774
42781
|
background: "transparent",
|
|
42775
42782
|
borderWidthOverride: "0 0 0 0",
|