@thecb/components 12.0.0-beta.8 → 12.0.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 +33 -38
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +33 -38
- 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 +16 -20
- package/src/components/molecules/link-card/LinkCard.stories.js +19 -16
- package/src/components/molecules/link-card/LinkCard.styled.js +6 -7
- package/src/components/molecules/link-card/LinkCard.theme.js +5 -2
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +10 -17
package/dist/index.cjs.js
CHANGED
|
@@ -15099,7 +15099,8 @@ var AutopayOnIcon = function AutopayOnIcon(_ref) {
|
|
|
15099
15099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15100
15100
|
width: "12",
|
|
15101
15101
|
height: "13",
|
|
15102
|
-
viewBox: "0 0 12 13"
|
|
15102
|
+
viewBox: "0 0 12 13",
|
|
15103
|
+
"aria-hidden": "true"
|
|
15103
15104
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
15104
15105
|
fill: "none",
|
|
15105
15106
|
fillRule: "evenodd",
|
|
@@ -45826,6 +45827,7 @@ var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
|
45826
45827
|
var backgroundColor$a = LINK_WATER;
|
|
45827
45828
|
var borderColor$5 = MOON_RAKER;
|
|
45828
45829
|
var color$c = ROYAL_BLUE_VIVID;
|
|
45830
|
+
var textColor$5 = BRIGHT_GREY;
|
|
45829
45831
|
var fallbackValues$L = {
|
|
45830
45832
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
45831
45833
|
disabledBorderColor: disabledBorderColor$1,
|
|
@@ -45833,19 +45835,20 @@ var fallbackValues$L = {
|
|
|
45833
45835
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
45834
45836
|
backgroundColor: backgroundColor$a,
|
|
45835
45837
|
borderColor: borderColor$5,
|
|
45836
|
-
color: color$c
|
|
45838
|
+
color: color$c,
|
|
45839
|
+
textColor: textColor$5
|
|
45837
45840
|
};
|
|
45838
45841
|
|
|
45839
|
-
var
|
|
45840
|
-
displayName: "
|
|
45842
|
+
var StyledAnchor = styled__default("a").withConfig({
|
|
45843
|
+
displayName: "LinkCardstyled__StyledAnchor",
|
|
45841
45844
|
componentId: "sc-l5q1h2-0"
|
|
45842
45845
|
})(["", ""], function (_ref) {
|
|
45843
|
-
var disabled = _ref
|
|
45846
|
+
var disabled = _ref.$disabled,
|
|
45844
45847
|
theme = _ref.$theme,
|
|
45845
|
-
extraStyles = _ref
|
|
45846
|
-
disabledStyles = _ref
|
|
45847
|
-
hoverStyles = _ref
|
|
45848
|
-
activeStyles = _ref
|
|
45848
|
+
extraStyles = _ref.$extraStyles,
|
|
45849
|
+
disabledStyles = _ref.$disabledStyles,
|
|
45850
|
+
hoverStyles = _ref.$hoverStyles,
|
|
45851
|
+
activeStyles = _ref.$activeStyles;
|
|
45849
45852
|
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 ");
|
|
45850
45853
|
});
|
|
45851
45854
|
var Title$2 = styled__default(Heading$1).withConfig({
|
|
@@ -45894,27 +45897,23 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45894
45897
|
_ref$disabled = _ref.disabled,
|
|
45895
45898
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
45896
45899
|
_ref$isExternalLink = _ref.isExternalLink,
|
|
45897
|
-
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink
|
|
45898
|
-
key = _ref.key;
|
|
45899
|
-
var _useContext = React.useContext(styled.ThemeContext),
|
|
45900
|
-
isMobile = _useContext.isMobile;
|
|
45900
|
+
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink;
|
|
45901
45901
|
var regex = /\W/g;
|
|
45902
45902
|
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, "-");
|
|
45903
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45904
|
-
key:
|
|
45905
|
-
|
|
45906
|
-
|
|
45907
|
-
|
|
45908
|
-
|
|
45909
|
-
$theme: themeValues,
|
|
45910
|
-
extraStyles: extraStyles,
|
|
45911
|
-
hoverStyles: extraHoverStyles,
|
|
45912
|
-
activeStyles: extraActiveStyles,
|
|
45903
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, {
|
|
45904
|
+
key: "link-card-".concat(locatorSlug),
|
|
45905
|
+
href: disabled ? undefined : href,
|
|
45906
|
+
rel: isExternalLink ? "noopener noreferrer" : undefined,
|
|
45907
|
+
target: isExternalLink ? "_blank" : undefined,
|
|
45908
|
+
tabIndex: disabled ? -1 : 0,
|
|
45913
45909
|
"aria-disabled": disabled,
|
|
45914
|
-
disabled: disabled,
|
|
45910
|
+
$disabled: disabled,
|
|
45915
45911
|
"aria-label": "".concat(title, ", ").concat(subtitle),
|
|
45916
45912
|
"data-qa": "link-card-".concat(locatorSlug),
|
|
45917
|
-
|
|
45913
|
+
$theme: themeValues,
|
|
45914
|
+
$extraStyles: disabled ? "pointer-events: none; ".concat(extraStyles) : extraStyles,
|
|
45915
|
+
$hoverStyles: extraHoverStyles,
|
|
45916
|
+
$activeStyles: extraActiveStyles
|
|
45918
45917
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45919
45918
|
childGap: 0,
|
|
45920
45919
|
bottomItem: 3,
|
|
@@ -46227,7 +46226,6 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46227
46226
|
} : navigateToSettings,
|
|
46228
46227
|
isLoading: deactivatingSchedule
|
|
46229
46228
|
};
|
|
46230
|
-
var modalLinkHoverFocus = "\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;\n ";
|
|
46231
46229
|
var hoverStyles = "text-decoration: underline;";
|
|
46232
46230
|
var activeStyles = "text-decoration: underline;";
|
|
46233
46231
|
var renderAutoPayControl = function renderAutoPayControl() {
|
|
@@ -46262,28 +46260,25 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46262
46260
|
{
|
|
46263
46261
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46264
46262
|
padding: "0",
|
|
46263
|
+
role: "button",
|
|
46264
|
+
tabIndex: "0",
|
|
46265
46265
|
onClick: onClick || function () {
|
|
46266
46266
|
toggleModal(true);
|
|
46267
46267
|
},
|
|
46268
|
+
onKeyDown: onKeyPress || function (e) {
|
|
46269
|
+
e.key === "Enter" && toggleModal(true);
|
|
46270
|
+
},
|
|
46268
46271
|
hoverStyles: hoverStyles,
|
|
46269
46272
|
activeStyles: activeStyles,
|
|
46270
|
-
extraStyles: "cursor: pointer;"
|
|
46273
|
+
extraStyles: "cursor: pointer; margin-bottom: 5px;",
|
|
46274
|
+
dataQa: "".concat(shortPlan, " On")
|
|
46271
46275
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
46272
46276
|
justify: isMobile ? "flex-start" : "flex-end",
|
|
46273
46277
|
align: "center"
|
|
46274
46278
|
}, /*#__PURE__*/React__default.createElement(AutopayOnIcon, null), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
46275
46279
|
variant: "pS",
|
|
46276
|
-
onClick: onClick || function () {
|
|
46277
|
-
return toggleModal(true);
|
|
46278
|
-
},
|
|
46279
|
-
onKeyPress: onKeyPress || function (e) {
|
|
46280
|
-
e.key === "Enter" && toggleModal(true);
|
|
46281
|
-
},
|
|
46282
|
-
tabIndex: "0",
|
|
46283
|
-
dataQa: "".concat(shortPlan, " On"),
|
|
46284
46280
|
color: SEA_GREEN,
|
|
46285
46281
|
weight: FONT_WEIGHT_REGULAR,
|
|
46286
|
-
hoverStyles: modalLinkHoverFocus,
|
|
46287
46282
|
extraStyles: "padding-left: 0.25rem;",
|
|
46288
46283
|
disabled: disableActions
|
|
46289
46284
|
}, "".concat(shortPlan, " ").concat(nextAutopayDate))));
|
|
@@ -51484,12 +51479,12 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
51484
51479
|
var hoverColor$6 = ROYAL_BLUE;
|
|
51485
51480
|
var activeColor$b = CONGRESS_BLUE;
|
|
51486
51481
|
var linkColor$6 = ROYAL_BLUE_VIVID;
|
|
51487
|
-
var textColor$
|
|
51482
|
+
var textColor$6 = CHARADE_GREY;
|
|
51488
51483
|
var fallbackValues$12 = {
|
|
51489
51484
|
linkColor: linkColor$6,
|
|
51490
51485
|
hoverColor: hoverColor$6,
|
|
51491
51486
|
activeColor: activeColor$b,
|
|
51492
|
-
textColor: textColor$
|
|
51487
|
+
textColor: textColor$6
|
|
51493
51488
|
};
|
|
51494
51489
|
|
|
51495
51490
|
var TOOLTIP_THEME_SOURCE = "Popover";
|