@thecb/components 12.0.0-beta.6 → 12.0.0-beta.7
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 -36
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -36
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/card-type/CardType.js +1 -5
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.js +11 -5
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +30 -30
- package/src/components/molecules/link-card/LinkCard.js +11 -8
- package/src/components/molecules/link-card/LinkCard.stories.js +6 -147
- package/src/components/molecules/link-card/LinkCard.styled.js +27 -17
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -26314,9 +26314,13 @@ var BankItemWrapper = styled__default.div.withConfig({
|
|
|
26314
26314
|
displayName: "FormattedBankAccount__BankItemWrapper",
|
|
26315
26315
|
componentId: "sc-18hcgw4-0"
|
|
26316
26316
|
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
26317
|
+
var BankIconWrapper = styled__default.div.withConfig({
|
|
26318
|
+
displayName: "FormattedBankAccount__BankIconWrapper",
|
|
26319
|
+
componentId: "sc-18hcgw4-1"
|
|
26320
|
+
})(["margin-right:8px;width:36px;height:auto;display:flex;"]);
|
|
26317
26321
|
var BankAccountText = styled__default.h4.withConfig({
|
|
26318
26322
|
displayName: "FormattedBankAccount__BankAccountText",
|
|
26319
|
-
componentId: "sc-18hcgw4-
|
|
26323
|
+
componentId: "sc-18hcgw4-2"
|
|
26320
26324
|
})(["color:", ";font-size:1rem;font-weight:400;line-height:1.5rem;text-align:left;margin-right:0.5rem;display:inline-block;"], function (_ref) {
|
|
26321
26325
|
var color = _ref.color;
|
|
26322
26326
|
return color;
|
|
@@ -26328,10 +26332,7 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
|
|
|
26328
26332
|
accountType = _ref2.accountType,
|
|
26329
26333
|
autoPay = _ref2.autoPay,
|
|
26330
26334
|
themeValues = _ref2.themeValues;
|
|
26331
|
-
return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(
|
|
26332
|
-
padding: "0.25rem 0 0 0",
|
|
26333
|
-
extraStyles: "margin-right: 1rem;"
|
|
26334
|
-
}, /*#__PURE__*/React__default.createElement(BankIcon, null)), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26335
|
+
return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(BankIconWrapper, null, /*#__PURE__*/React__default.createElement(BankIconLarge, null)), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26335
26336
|
childGap: "0"
|
|
26336
26337
|
}, accountType === CHECKING && /*#__PURE__*/React__default.createElement(BankAccountText, {
|
|
26337
26338
|
color: themeValues.textColor
|
|
@@ -26386,7 +26387,7 @@ var CardType = function CardType(_ref) {
|
|
|
26386
26387
|
var _ref2 = cardBrands[normalizedType] || cardBrands["default"],
|
|
26387
26388
|
label = _ref2.label,
|
|
26388
26389
|
IconComponent = _ref2[size];
|
|
26389
|
-
return /*#__PURE__*/React__default.createElement(
|
|
26390
|
+
return /*#__PURE__*/React__default.createElement(IconComponent, null);
|
|
26390
26391
|
};
|
|
26391
26392
|
|
|
26392
26393
|
var textColor$2 = "".concat(CHARADE_GREY);
|
|
@@ -26463,7 +26464,7 @@ var CreditCardWrapper = styled__default.div.withConfig({
|
|
|
26463
26464
|
var CCIconWrapper = styled__default.div.withConfig({
|
|
26464
26465
|
displayName: "FormattedCreditCard__CCIconWrapper",
|
|
26465
26466
|
componentId: "sc-s0ta5l-1"
|
|
26466
|
-
})(["margin-right:
|
|
26467
|
+
})(["margin-right:8px;width:36px;height:auto;display:flex;"]);
|
|
26467
26468
|
var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
26468
26469
|
var lastFour = _ref.lastFour,
|
|
26469
26470
|
type = _ref.type,
|
|
@@ -27572,7 +27573,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27572
27573
|
borderWidth: "1px",
|
|
27573
27574
|
borderStyle: "solid",
|
|
27574
27575
|
borderRadius: "12px",
|
|
27575
|
-
margin: "6px
|
|
27576
|
+
margin: "6px 8px 6px 6px",
|
|
27576
27577
|
height: "24px",
|
|
27577
27578
|
width: "24px",
|
|
27578
27579
|
variants: buttonBorder,
|
|
@@ -45829,33 +45830,30 @@ var fallbackValues$L = {
|
|
|
45829
45830
|
var LinkWrapper = styled__default(reactRouterDom.Link).withConfig({
|
|
45830
45831
|
displayName: "LinkCardstyled__LinkWrapper",
|
|
45831
45832
|
componentId: "sc-l5q1h2-0"
|
|
45832
|
-
})(["
|
|
45833
|
-
var
|
|
45834
|
-
theme = _ref
|
|
45835
|
-
|
|
45836
|
-
|
|
45837
|
-
|
|
45838
|
-
|
|
45839
|
-
},
|
|
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 ");
|
|
45833
|
+
})(["", ""], function (_ref) {
|
|
45834
|
+
var disabled = _ref.disabled,
|
|
45835
|
+
theme = _ref.$theme,
|
|
45836
|
+
extraStyles = _ref.extraStyles,
|
|
45837
|
+
disabledStyles = _ref.disabledStyles,
|
|
45838
|
+
hoverStyles = _ref.hoverStyles,
|
|
45839
|
+
activeStyles = _ref.activeStyles;
|
|
45840
|
+
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 ");
|
|
45843
45841
|
});
|
|
45844
45842
|
var Title$2 = styled__default(Heading$1).withConfig({
|
|
45845
45843
|
displayName: "LinkCardstyled__Title",
|
|
45846
45844
|
componentId: "sc-l5q1h2-1"
|
|
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 (
|
|
45848
|
-
var
|
|
45849
|
-
theme =
|
|
45850
|
-
return
|
|
45845
|
+
})(["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) {
|
|
45846
|
+
var disabled = _ref2.disabled,
|
|
45847
|
+
theme = _ref2.$theme;
|
|
45848
|
+
return disabled ? theme.disabledColor : theme.color;
|
|
45851
45849
|
});
|
|
45852
45850
|
var Subtitle = styled__default(Paragraph$1).withConfig({
|
|
45853
45851
|
displayName: "LinkCardstyled__Subtitle",
|
|
45854
45852
|
componentId: "sc-l5q1h2-2"
|
|
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 (
|
|
45856
|
-
var
|
|
45857
|
-
theme =
|
|
45858
|
-
return
|
|
45853
|
+
})(["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) {
|
|
45854
|
+
var disabled = _ref3.disabled,
|
|
45855
|
+
theme = _ref3.$theme;
|
|
45856
|
+
return disabled ? theme.disabledColor : theme.textColor;
|
|
45859
45857
|
});
|
|
45860
45858
|
var Footer = styled__default(Stack).withConfig({
|
|
45861
45859
|
displayName: "LinkCardstyled__Footer",
|
|
@@ -45887,24 +45885,27 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45887
45885
|
_ref$disabled = _ref.disabled,
|
|
45888
45886
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
45889
45887
|
_ref$isExternalLink = _ref.isExternalLink,
|
|
45890
|
-
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink
|
|
45888
|
+
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
|
|
45889
|
+
key = _ref.key;
|
|
45891
45890
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
45892
45891
|
isMobile = _useContext.isMobile;
|
|
45893
45892
|
var regex = /\W/g;
|
|
45894
45893
|
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
45894
|
return /*#__PURE__*/React__default.createElement(LinkWrapper, {
|
|
45895
|
+
key: key || locatorSlug,
|
|
45896
45896
|
as: reactRouterDom.Link,
|
|
45897
45897
|
to: disabled ? undefined : href,
|
|
45898
45898
|
role: "link",
|
|
45899
45899
|
isMobile: isMobile,
|
|
45900
|
-
|
|
45901
|
-
theme: themeValues,
|
|
45900
|
+
$theme: themeValues,
|
|
45902
45901
|
extraStyles: extraStyles,
|
|
45903
45902
|
hoverStyles: extraHoverStyles,
|
|
45904
45903
|
activeStyles: extraActiveStyles,
|
|
45905
45904
|
"aria-disabled": disabled,
|
|
45906
|
-
|
|
45907
|
-
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
45905
|
+
disabled: disabled,
|
|
45906
|
+
"aria-label": "".concat(title, ", ").concat(subtitle),
|
|
45907
|
+
"data-qa": "link-card-".concat(locatorSlug),
|
|
45908
|
+
tabIndex: disabled ? -1 : 0
|
|
45908
45909
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45909
45910
|
childGap: 0,
|
|
45910
45911
|
bottomItem: 3,
|
|
@@ -45919,9 +45920,9 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45919
45920
|
extraStyles: "align-items: center;"
|
|
45920
45921
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
45921
45922
|
variant: titleVariant,
|
|
45922
|
-
theme: themeValues,
|
|
45923
|
+
$theme: themeValues,
|
|
45923
45924
|
margin: 0,
|
|
45924
|
-
|
|
45925
|
+
disabled: disabled
|
|
45925
45926
|
}, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
45926
45927
|
linkColor: themeValues.color,
|
|
45927
45928
|
text: locatorSlug,
|
|
@@ -45934,8 +45935,8 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45934
45935
|
width: "100%"
|
|
45935
45936
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
45936
45937
|
variant: "pS",
|
|
45937
|
-
theme: themeValues,
|
|
45938
|
-
|
|
45938
|
+
$theme: themeValues,
|
|
45939
|
+
disabled: disabled
|
|
45939
45940
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
45940
45941
|
background: "transparent",
|
|
45941
45942
|
borderWidthOverride: "0 0 0 0",
|