@thecb/components 12.0.0-beta.8 → 12.0.0
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 +37 -42
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -42
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/AutopayOnIcon.js +1 -0
- package/src/components/molecules/link-card/LinkCard.js +18 -22
- package/src/components/molecules/link-card/LinkCard.stories.js +19 -16
- package/src/components/molecules/link-card/LinkCard.styled.js +8 -9
- package/src/components/molecules/link-card/LinkCard.theme.js +5 -2
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +10 -17
package/dist/index.esm.js
CHANGED
|
@@ -15091,7 +15091,8 @@ var AutopayOnIcon = function AutopayOnIcon(_ref) {
|
|
|
15091
15091
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15092
15092
|
width: "12",
|
|
15093
15093
|
height: "13",
|
|
15094
|
-
viewBox: "0 0 12 13"
|
|
15094
|
+
viewBox: "0 0 12 13",
|
|
15095
|
+
"aria-hidden": "true"
|
|
15095
15096
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
15096
15097
|
fill: "none",
|
|
15097
15098
|
fillRule: "evenodd",
|
|
@@ -45818,6 +45819,7 @@ var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
|
45818
45819
|
var backgroundColor$a = LINK_WATER;
|
|
45819
45820
|
var borderColor$5 = MOON_RAKER;
|
|
45820
45821
|
var color$c = ROYAL_BLUE_VIVID;
|
|
45822
|
+
var textColor$5 = BRIGHT_GREY;
|
|
45821
45823
|
var fallbackValues$L = {
|
|
45822
45824
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
45823
45825
|
disabledBorderColor: disabledBorderColor$1,
|
|
@@ -45825,26 +45827,27 @@ var fallbackValues$L = {
|
|
|
45825
45827
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
45826
45828
|
backgroundColor: backgroundColor$a,
|
|
45827
45829
|
borderColor: borderColor$5,
|
|
45828
|
-
color: color$c
|
|
45830
|
+
color: color$c,
|
|
45831
|
+
textColor: textColor$5
|
|
45829
45832
|
};
|
|
45830
45833
|
|
|
45831
|
-
var
|
|
45832
|
-
displayName: "
|
|
45834
|
+
var StyledAnchor = styled("a").withConfig({
|
|
45835
|
+
displayName: "LinkCardstyled__StyledAnchor",
|
|
45833
45836
|
componentId: "sc-l5q1h2-0"
|
|
45834
45837
|
})(["", ""], function (_ref) {
|
|
45835
|
-
var disabled = _ref
|
|
45838
|
+
var disabled = _ref.$disabled,
|
|
45836
45839
|
theme = _ref.$theme,
|
|
45837
|
-
extraStyles = _ref
|
|
45838
|
-
disabledStyles = _ref
|
|
45839
|
-
hoverStyles = _ref
|
|
45840
|
-
activeStyles = _ref
|
|
45840
|
+
extraStyles = _ref.$extraStyles,
|
|
45841
|
+
disabledStyles = _ref.$disabledStyles,
|
|
45842
|
+
hoverStyles = _ref.$hoverStyles,
|
|
45843
|
+
activeStyles = _ref.$activeStyles;
|
|
45841
45844
|
return "\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 40px;\n flex-shrink: 0;\n padding: 24px;\n align-self: stretch;\n border-radius: 8px;\n text-decoration: none;\n background-color: ".concat(disabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid\n ").concat(disabled ? theme.disabledBorderColor : theme.borderColor, ";\n transition: all 0.2s ease-in-out;\n ").concat(extraStyles || "", "\n\n ").concat(disabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(theme.disabledBorderColor, ";\n ").concat(disabledStyles || "", "\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 ".concat(hoverStyles || "", "\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 ").concat(activeStyles || "", "\n }\n "), "\n ");
|
|
45842
45845
|
});
|
|
45843
45846
|
var Title$2 = styled(Heading$1).withConfig({
|
|
45844
45847
|
displayName: "LinkCardstyled__Title",
|
|
45845
45848
|
componentId: "sc-l5q1h2-1"
|
|
45846
45849
|
})(["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:", ";color:", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref2) {
|
|
45847
|
-
var disabled = _ref2
|
|
45850
|
+
var disabled = _ref2.$disabled,
|
|
45848
45851
|
theme = _ref2.$theme;
|
|
45849
45852
|
return disabled ? theme.disabledColor : theme.color;
|
|
45850
45853
|
});
|
|
@@ -45852,7 +45855,7 @@ var Subtitle = styled(Paragraph$1).withConfig({
|
|
|
45852
45855
|
displayName: "LinkCardstyled__Subtitle",
|
|
45853
45856
|
componentId: "sc-l5q1h2-2"
|
|
45854
45857
|
})(["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:", ";color:", ";"], FONT_WEIGHT_REGULAR, function (_ref3) {
|
|
45855
|
-
var disabled = _ref3
|
|
45858
|
+
var disabled = _ref3.$disabled,
|
|
45856
45859
|
theme = _ref3.$theme;
|
|
45857
45860
|
return disabled ? theme.disabledColor : theme.textColor;
|
|
45858
45861
|
});
|
|
@@ -45886,27 +45889,23 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45886
45889
|
_ref$disabled = _ref.disabled,
|
|
45887
45890
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
45888
45891
|
_ref$isExternalLink = _ref.isExternalLink,
|
|
45889
|
-
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink
|
|
45890
|
-
key = _ref.key;
|
|
45891
|
-
var _useContext = useContext(ThemeContext),
|
|
45892
|
-
isMobile = _useContext.isMobile;
|
|
45892
|
+
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
|
|
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
|
-
key:
|
|
45897
|
-
|
|
45898
|
-
|
|
45899
|
-
|
|
45900
|
-
|
|
45901
|
-
$theme: themeValues,
|
|
45902
|
-
extraStyles: extraStyles,
|
|
45903
|
-
hoverStyles: extraHoverStyles,
|
|
45904
|
-
activeStyles: extraActiveStyles,
|
|
45895
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, {
|
|
45896
|
+
key: "link-card-".concat(locatorSlug),
|
|
45897
|
+
href: disabled ? undefined : href,
|
|
45898
|
+
rel: isExternalLink ? "noopener noreferrer" : undefined,
|
|
45899
|
+
target: isExternalLink ? "_blank" : undefined,
|
|
45900
|
+
tabIndex: disabled ? -1 : 0,
|
|
45905
45901
|
"aria-disabled": disabled,
|
|
45906
|
-
disabled: disabled,
|
|
45902
|
+
$disabled: disabled,
|
|
45907
45903
|
"aria-label": "".concat(title, ", ").concat(subtitle),
|
|
45908
45904
|
"data-qa": "link-card-".concat(locatorSlug),
|
|
45909
|
-
|
|
45905
|
+
$theme: themeValues,
|
|
45906
|
+
$extraStyles: disabled ? "pointer-events: none; ".concat(extraStyles) : extraStyles,
|
|
45907
|
+
$hoverStyles: extraHoverStyles,
|
|
45908
|
+
$activeStyles: extraActiveStyles
|
|
45910
45909
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45911
45910
|
childGap: 0,
|
|
45912
45911
|
bottomItem: 3,
|
|
@@ -45923,7 +45922,7 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45923
45922
|
variant: titleVariant,
|
|
45924
45923
|
$theme: themeValues,
|
|
45925
45924
|
margin: 0,
|
|
45926
|
-
disabled: disabled
|
|
45925
|
+
$disabled: disabled
|
|
45927
45926
|
}, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
45928
45927
|
linkColor: themeValues.color,
|
|
45929
45928
|
text: locatorSlug,
|
|
@@ -45937,7 +45936,7 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45937
45936
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
45938
45937
|
variant: "pS",
|
|
45939
45938
|
$theme: themeValues,
|
|
45940
|
-
disabled: disabled
|
|
45939
|
+
$disabled: disabled
|
|
45941
45940
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
45942
45941
|
background: "transparent",
|
|
45943
45942
|
borderWidthOverride: "0 0 0 0",
|
|
@@ -46219,7 +46218,6 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46219
46218
|
} : navigateToSettings,
|
|
46220
46219
|
isLoading: deactivatingSchedule
|
|
46221
46220
|
};
|
|
46222
|
-
var modalLinkHoverFocus = "\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;\n ";
|
|
46223
46221
|
var hoverStyles = "text-decoration: underline;";
|
|
46224
46222
|
var activeStyles = "text-decoration: underline;";
|
|
46225
46223
|
var renderAutoPayControl = function renderAutoPayControl() {
|
|
@@ -46254,28 +46252,25 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46254
46252
|
{
|
|
46255
46253
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46256
46254
|
padding: "0",
|
|
46255
|
+
role: "button",
|
|
46256
|
+
tabIndex: "0",
|
|
46257
46257
|
onClick: onClick || function () {
|
|
46258
46258
|
toggleModal(true);
|
|
46259
46259
|
},
|
|
46260
|
+
onKeyDown: onKeyPress || function (e) {
|
|
46261
|
+
e.key === "Enter" && toggleModal(true);
|
|
46262
|
+
},
|
|
46260
46263
|
hoverStyles: hoverStyles,
|
|
46261
46264
|
activeStyles: activeStyles,
|
|
46262
|
-
extraStyles: "cursor: pointer;"
|
|
46265
|
+
extraStyles: "cursor: pointer; margin-bottom: 5px;",
|
|
46266
|
+
dataQa: "".concat(shortPlan, " On")
|
|
46263
46267
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
46264
46268
|
justify: isMobile ? "flex-start" : "flex-end",
|
|
46265
46269
|
align: "center"
|
|
46266
46270
|
}, /*#__PURE__*/React__default.createElement(AutopayOnIcon, null), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
46267
46271
|
variant: "pS",
|
|
46268
|
-
onClick: onClick || function () {
|
|
46269
|
-
return toggleModal(true);
|
|
46270
|
-
},
|
|
46271
|
-
onKeyPress: onKeyPress || function (e) {
|
|
46272
|
-
e.key === "Enter" && toggleModal(true);
|
|
46273
|
-
},
|
|
46274
|
-
tabIndex: "0",
|
|
46275
|
-
dataQa: "".concat(shortPlan, " On"),
|
|
46276
46272
|
color: SEA_GREEN,
|
|
46277
46273
|
weight: FONT_WEIGHT_REGULAR,
|
|
46278
|
-
hoverStyles: modalLinkHoverFocus,
|
|
46279
46274
|
extraStyles: "padding-left: 0.25rem;",
|
|
46280
46275
|
disabled: disableActions
|
|
46281
46276
|
}, "".concat(shortPlan, " ").concat(nextAutopayDate))));
|
|
@@ -51476,12 +51471,12 @@ var TurnstileWidget = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
51476
51471
|
var hoverColor$6 = ROYAL_BLUE;
|
|
51477
51472
|
var activeColor$b = CONGRESS_BLUE;
|
|
51478
51473
|
var linkColor$6 = ROYAL_BLUE_VIVID;
|
|
51479
|
-
var textColor$
|
|
51474
|
+
var textColor$6 = CHARADE_GREY;
|
|
51480
51475
|
var fallbackValues$12 = {
|
|
51481
51476
|
linkColor: linkColor$6,
|
|
51482
51477
|
hoverColor: hoverColor$6,
|
|
51483
51478
|
activeColor: activeColor$b,
|
|
51484
|
-
textColor: textColor$
|
|
51479
|
+
textColor: textColor$6
|
|
51485
51480
|
};
|
|
51486
51481
|
|
|
51487
51482
|
var TOOLTIP_THEME_SOURCE = "Popover";
|