@thecb/components 11.9.0 → 11.10.0-beta.1
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 +30 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +30 -12
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card-type/CardType.js +9 -1
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +3 -3
- package/src/components/atoms/icons/AmExSmallIcon.js +2 -0
- package/src/components/atoms/icons/DiscoverSmallIcon.js +2 -0
- package/src/components/atoms/icons/GenericCardLarge.js +1 -1
- package/src/components/atoms/icons/GenericSmallIcon.js +2 -0
- package/src/components/atoms/icons/MasterCardSmallIcon.js +2 -0
- package/src/components/atoms/icons/VisaSmallIcon.js +2 -0
- package/src/components/molecules/radio-section/InnerRadioSection.js +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -15814,7 +15814,7 @@ var GenericCardLarge = function GenericCardLarge() {
|
|
|
15814
15814
|
fill: "none",
|
|
15815
15815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15816
15816
|
role: "img",
|
|
15817
|
-
"aria-label": "
|
|
15817
|
+
"aria-label": "Credit card"
|
|
15818
15818
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
15819
15819
|
width: "36",
|
|
15820
15820
|
height: "24",
|
|
@@ -18692,7 +18692,9 @@ var VisaSmallIcon = function VisaSmallIcon() {
|
|
|
18692
18692
|
height: "16",
|
|
18693
18693
|
viewBox: "0 0 24 16",
|
|
18694
18694
|
fill: "none",
|
|
18695
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18695
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18696
|
+
role: "img",
|
|
18697
|
+
"aria-label": "Visa"
|
|
18696
18698
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
18697
18699
|
fillRule: "evenodd",
|
|
18698
18700
|
clipRule: "evenodd",
|
|
@@ -18719,7 +18721,9 @@ var AmExSmallIcon = function AmExSmallIcon() {
|
|
|
18719
18721
|
height: "16",
|
|
18720
18722
|
viewBox: "0 0 24 16",
|
|
18721
18723
|
fill: "none",
|
|
18722
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18724
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18725
|
+
role: "img",
|
|
18726
|
+
"aria-label": "American Express"
|
|
18723
18727
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
18724
18728
|
clipPath: "url(#clip0_3693_1095)"
|
|
18725
18729
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
@@ -18818,7 +18822,9 @@ var DiscoverSmallIcon = function DiscoverSmallIcon() {
|
|
|
18818
18822
|
height: "16",
|
|
18819
18823
|
viewBox: "0 0 24 16",
|
|
18820
18824
|
fill: "none",
|
|
18821
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18825
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18826
|
+
role: "img",
|
|
18827
|
+
"aria-label": "Discover"
|
|
18822
18828
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
18823
18829
|
clipPath: "url(#clip0_3818_267)"
|
|
18824
18830
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
@@ -18943,7 +18949,9 @@ var GenericSmallIcon = function GenericSmallIcon() {
|
|
|
18943
18949
|
height: "16",
|
|
18944
18950
|
viewBox: "0 0 24 16",
|
|
18945
18951
|
fill: "none",
|
|
18946
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18952
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18953
|
+
role: "img",
|
|
18954
|
+
"aria-label": "Credit card"
|
|
18947
18955
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
18948
18956
|
width: "24",
|
|
18949
18957
|
height: "16",
|
|
@@ -18964,7 +18972,9 @@ var MasterCardSmallIcon = function MasterCardSmallIcon() {
|
|
|
18964
18972
|
height: "16",
|
|
18965
18973
|
viewBox: "0 0 24 16",
|
|
18966
18974
|
fill: "none",
|
|
18967
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18975
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18976
|
+
role: "img",
|
|
18977
|
+
"aria-label": "Mastercard"
|
|
18968
18978
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
18969
18979
|
width: "24",
|
|
18970
18980
|
height: "16",
|
|
@@ -26357,11 +26367,18 @@ var cardBrands = {
|
|
|
26357
26367
|
large: GenericCardLarge
|
|
26358
26368
|
}
|
|
26359
26369
|
};
|
|
26370
|
+
var normalizeType = function normalizeType(type) {
|
|
26371
|
+
if (!type) return undefined;
|
|
26372
|
+
var lower = type.toLowerCase();
|
|
26373
|
+
if (lower === "mastercard") return "master_card";
|
|
26374
|
+
return lower;
|
|
26375
|
+
};
|
|
26360
26376
|
var CardType = function CardType(_ref) {
|
|
26361
26377
|
var type = _ref.type,
|
|
26362
26378
|
_ref$size = _ref.size,
|
|
26363
26379
|
size = _ref$size === void 0 ? "small" : _ref$size;
|
|
26364
|
-
var
|
|
26380
|
+
var normalizedType = normalizeType(type);
|
|
26381
|
+
var _ref2 = cardBrands[normalizedType] || cardBrands["default"],
|
|
26365
26382
|
label = _ref2.label,
|
|
26366
26383
|
IconComponent = _ref2[size];
|
|
26367
26384
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -26441,7 +26458,7 @@ var CreditCardWrapper = styled.div.withConfig({
|
|
|
26441
26458
|
var CCIconWrapper = styled.div.withConfig({
|
|
26442
26459
|
displayName: "FormattedCreditCard__CCIconWrapper",
|
|
26443
26460
|
componentId: "sc-s0ta5l-1"
|
|
26444
|
-
})(["margin-right:16px;width:
|
|
26461
|
+
})(["margin-right:16px;width:36px;height:auto;display:flex;"]);
|
|
26445
26462
|
var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
26446
26463
|
var lastFour = _ref.lastFour,
|
|
26447
26464
|
type = _ref.type,
|
|
@@ -26450,14 +26467,15 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
26450
26467
|
expirationStatus = _ref.expirationStatus,
|
|
26451
26468
|
themeValues = _ref.themeValues;
|
|
26452
26469
|
return /*#__PURE__*/React__default.createElement(CreditCardWrapper, null, /*#__PURE__*/React__default.createElement(CCIconWrapper, null, /*#__PURE__*/React__default.createElement(CardType, {
|
|
26453
|
-
type: type
|
|
26470
|
+
type: type,
|
|
26471
|
+
size: "large"
|
|
26454
26472
|
})), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26455
26473
|
childGap: "0"
|
|
26456
26474
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
26457
26475
|
padding: "0"
|
|
26458
26476
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26459
26477
|
variant: "p",
|
|
26460
|
-
padding: "0
|
|
26478
|
+
padding: "0",
|
|
26461
26479
|
color: themeValues.textColor,
|
|
26462
26480
|
textAlign: "left",
|
|
26463
26481
|
extraStyles: "display: inline-block;"
|
|
@@ -48906,10 +48924,10 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
|
|
|
48906
48924
|
componentId: "sc-1wtp6qc-0"
|
|
48907
48925
|
})(["height:", ";width:", ";", " transition:opacity 0.3s ease;"], function (_ref2) {
|
|
48908
48926
|
var isMobile = _ref2.isMobile;
|
|
48909
|
-
return isMobile ? "
|
|
48927
|
+
return isMobile ? "16px" : "24px";
|
|
48910
48928
|
}, function (_ref3) {
|
|
48911
48929
|
var isMobile = _ref3.isMobile;
|
|
48912
|
-
return isMobile ? "
|
|
48930
|
+
return isMobile ? "24px" : "36px";
|
|
48913
48931
|
}, function (_ref4) {
|
|
48914
48932
|
var fade = _ref4.fade;
|
|
48915
48933
|
return fade && "opacity: 0.4;";
|