@thecb/components 12.0.0-beta.5 → 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 -33
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -33
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- 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 -16
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -26306,9 +26306,13 @@ var BankItemWrapper = styled.div.withConfig({
|
|
|
26306
26306
|
displayName: "FormattedBankAccount__BankItemWrapper",
|
|
26307
26307
|
componentId: "sc-18hcgw4-0"
|
|
26308
26308
|
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
26309
|
+
var BankIconWrapper = styled.div.withConfig({
|
|
26310
|
+
displayName: "FormattedBankAccount__BankIconWrapper",
|
|
26311
|
+
componentId: "sc-18hcgw4-1"
|
|
26312
|
+
})(["margin-right:8px;width:36px;height:auto;display:flex;"]);
|
|
26309
26313
|
var BankAccountText = styled.h4.withConfig({
|
|
26310
26314
|
displayName: "FormattedBankAccount__BankAccountText",
|
|
26311
|
-
componentId: "sc-18hcgw4-
|
|
26315
|
+
componentId: "sc-18hcgw4-2"
|
|
26312
26316
|
})(["color:", ";font-size:1rem;font-weight:400;line-height:1.5rem;text-align:left;margin-right:0.5rem;display:inline-block;"], function (_ref) {
|
|
26313
26317
|
var color = _ref.color;
|
|
26314
26318
|
return color;
|
|
@@ -26320,10 +26324,7 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
|
|
|
26320
26324
|
accountType = _ref2.accountType,
|
|
26321
26325
|
autoPay = _ref2.autoPay,
|
|
26322
26326
|
themeValues = _ref2.themeValues;
|
|
26323
|
-
return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(
|
|
26324
|
-
padding: "0.25rem 0 0 0",
|
|
26325
|
-
extraStyles: "margin-right: 1rem;"
|
|
26326
|
-
}, /*#__PURE__*/React__default.createElement(BankIcon, null)), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26327
|
+
return /*#__PURE__*/React__default.createElement(BankItemWrapper, null, /*#__PURE__*/React__default.createElement(BankIconWrapper, null, /*#__PURE__*/React__default.createElement(BankIconLarge, null)), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26327
26328
|
childGap: "0"
|
|
26328
26329
|
}, accountType === CHECKING && /*#__PURE__*/React__default.createElement(BankAccountText, {
|
|
26329
26330
|
color: themeValues.textColor
|
|
@@ -26378,7 +26379,7 @@ var CardType = function CardType(_ref) {
|
|
|
26378
26379
|
var _ref2 = cardBrands[normalizedType] || cardBrands["default"],
|
|
26379
26380
|
label = _ref2.label,
|
|
26380
26381
|
IconComponent = _ref2[size];
|
|
26381
|
-
return /*#__PURE__*/React__default.createElement(
|
|
26382
|
+
return /*#__PURE__*/React__default.createElement(IconComponent, null);
|
|
26382
26383
|
};
|
|
26383
26384
|
|
|
26384
26385
|
var textColor$2 = "".concat(CHARADE_GREY);
|
|
@@ -26455,7 +26456,7 @@ var CreditCardWrapper = styled.div.withConfig({
|
|
|
26455
26456
|
var CCIconWrapper = styled.div.withConfig({
|
|
26456
26457
|
displayName: "FormattedCreditCard__CCIconWrapper",
|
|
26457
26458
|
componentId: "sc-s0ta5l-1"
|
|
26458
|
-
})(["margin-right:
|
|
26459
|
+
})(["margin-right:8px;width:36px;height:auto;display:flex;"]);
|
|
26459
26460
|
var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
26460
26461
|
var lastFour = _ref.lastFour,
|
|
26461
26462
|
type = _ref.type,
|
|
@@ -27564,7 +27565,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27564
27565
|
borderWidth: "1px",
|
|
27565
27566
|
borderStyle: "solid",
|
|
27566
27567
|
borderRadius: "12px",
|
|
27567
|
-
margin: "6px
|
|
27568
|
+
margin: "6px 8px 6px 6px",
|
|
27568
27569
|
height: "24px",
|
|
27569
27570
|
width: "24px",
|
|
27570
27571
|
variants: buttonBorder,
|
|
@@ -45821,30 +45822,30 @@ var fallbackValues$L = {
|
|
|
45821
45822
|
var LinkWrapper = styled(Link).withConfig({
|
|
45822
45823
|
displayName: "LinkCardstyled__LinkWrapper",
|
|
45823
45824
|
componentId: "sc-l5q1h2-0"
|
|
45824
|
-
})(["
|
|
45825
|
-
var
|
|
45826
|
-
theme = _ref
|
|
45827
|
-
|
|
45828
|
-
|
|
45829
|
-
|
|
45830
|
-
|
|
45831
|
-
return
|
|
45825
|
+
})(["", ""], function (_ref) {
|
|
45826
|
+
var disabled = _ref.disabled,
|
|
45827
|
+
theme = _ref.$theme,
|
|
45828
|
+
extraStyles = _ref.extraStyles,
|
|
45829
|
+
disabledStyles = _ref.disabledStyles,
|
|
45830
|
+
hoverStyles = _ref.hoverStyles,
|
|
45831
|
+
activeStyles = _ref.activeStyles;
|
|
45832
|
+
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 ");
|
|
45832
45833
|
});
|
|
45833
45834
|
var Title$2 = styled(Heading$1).withConfig({
|
|
45834
45835
|
displayName: "LinkCardstyled__Title",
|
|
45835
45836
|
componentId: "sc-l5q1h2-1"
|
|
45836
|
-
})(["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 (
|
|
45837
|
-
var
|
|
45838
|
-
theme =
|
|
45839
|
-
return
|
|
45837
|
+
})(["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) {
|
|
45838
|
+
var disabled = _ref2.disabled,
|
|
45839
|
+
theme = _ref2.$theme;
|
|
45840
|
+
return disabled ? theme.disabledColor : theme.color;
|
|
45840
45841
|
});
|
|
45841
45842
|
var Subtitle = styled(Paragraph$1).withConfig({
|
|
45842
45843
|
displayName: "LinkCardstyled__Subtitle",
|
|
45843
45844
|
componentId: "sc-l5q1h2-2"
|
|
45844
|
-
})(["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 (
|
|
45845
|
-
var
|
|
45846
|
-
theme =
|
|
45847
|
-
return
|
|
45845
|
+
})(["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) {
|
|
45846
|
+
var disabled = _ref3.disabled,
|
|
45847
|
+
theme = _ref3.$theme;
|
|
45848
|
+
return disabled ? theme.disabledColor : theme.textColor;
|
|
45848
45849
|
});
|
|
45849
45850
|
var Footer = styled(Stack).withConfig({
|
|
45850
45851
|
displayName: "LinkCardstyled__Footer",
|
|
@@ -45876,24 +45877,27 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45876
45877
|
_ref$disabled = _ref.disabled,
|
|
45877
45878
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
45878
45879
|
_ref$isExternalLink = _ref.isExternalLink,
|
|
45879
|
-
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink
|
|
45880
|
+
isExternalLink = _ref$isExternalLink === void 0 ? false : _ref$isExternalLink,
|
|
45881
|
+
key = _ref.key;
|
|
45880
45882
|
var _useContext = useContext(ThemeContext),
|
|
45881
45883
|
isMobile = _useContext.isMobile;
|
|
45882
45884
|
var regex = /\W/g;
|
|
45883
45885
|
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, "-");
|
|
45884
45886
|
return /*#__PURE__*/React__default.createElement(LinkWrapper, {
|
|
45887
|
+
key: key || locatorSlug,
|
|
45885
45888
|
as: Link,
|
|
45886
45889
|
to: disabled ? undefined : href,
|
|
45887
45890
|
role: "link",
|
|
45888
45891
|
isMobile: isMobile,
|
|
45889
|
-
|
|
45890
|
-
theme: themeValues,
|
|
45892
|
+
$theme: themeValues,
|
|
45891
45893
|
extraStyles: extraStyles,
|
|
45892
45894
|
hoverStyles: extraHoverStyles,
|
|
45893
45895
|
activeStyles: extraActiveStyles,
|
|
45894
45896
|
"aria-disabled": disabled,
|
|
45895
|
-
|
|
45896
|
-
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
45897
|
+
disabled: disabled,
|
|
45898
|
+
"aria-label": "".concat(title, ", ").concat(subtitle),
|
|
45899
|
+
"data-qa": "link-card-".concat(locatorSlug),
|
|
45900
|
+
tabIndex: disabled ? -1 : 0
|
|
45897
45901
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
45898
45902
|
childGap: 0,
|
|
45899
45903
|
bottomItem: 3,
|
|
@@ -45908,9 +45912,9 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45908
45912
|
extraStyles: "align-items: center;"
|
|
45909
45913
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
45910
45914
|
variant: titleVariant,
|
|
45911
|
-
theme: themeValues,
|
|
45915
|
+
$theme: themeValues,
|
|
45912
45916
|
margin: 0,
|
|
45913
|
-
|
|
45917
|
+
disabled: disabled
|
|
45914
45918
|
}, title), isExternalLink && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
45915
45919
|
linkColor: themeValues.color,
|
|
45916
45920
|
text: locatorSlug,
|
|
@@ -45923,8 +45927,8 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
45923
45927
|
width: "100%"
|
|
45924
45928
|
}, /*#__PURE__*/React__default.createElement(Subtitle, {
|
|
45925
45929
|
variant: "pS",
|
|
45926
|
-
theme: themeValues,
|
|
45927
|
-
|
|
45930
|
+
$theme: themeValues,
|
|
45931
|
+
disabled: disabled
|
|
45928
45932
|
}, subtitle)), /*#__PURE__*/React__default.createElement(Box, {
|
|
45929
45933
|
background: "transparent",
|
|
45930
45934
|
borderWidthOverride: "0 0 0 0",
|