@thecb/components 7.8.3-beta.1 → 7.8.3
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 +151 -176
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +151 -176
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/layouts/Cluster.d.ts +1 -0
- package/src/components/atoms/layouts/Cluster.js +2 -0
- package/src/components/molecules/pagination/Pagination.js +44 -20
- package/src/components/molecules/pagination/index.d.ts +1 -0
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +8 -33
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +10 -35
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.js +1 -3
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +2 -3
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -6665,7 +6665,7 @@ var ClusterInnerWrapper = styled.div.withConfig({
|
|
|
6665
6665
|
return childGap;
|
|
6666
6666
|
});
|
|
6667
6667
|
|
|
6668
|
-
var _excluded$6 = ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "justifySelf", "alignSelf", "flexGrow", "extraStyles", "children"];
|
|
6668
|
+
var _excluded$6 = ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "justifySelf", "alignSelf", "flexGrow", "extraStyles", "children", "innerWrapperAs"];
|
|
6669
6669
|
/*
|
|
6670
6670
|
Cluster components suit any groups of elements that differ in
|
|
6671
6671
|
length and are liable to wrap. Buttons that appear together at the
|
|
@@ -6689,6 +6689,8 @@ var Cluster = function Cluster(_ref) {
|
|
|
6689
6689
|
flexGrow = _ref.flexGrow,
|
|
6690
6690
|
extraStyles = _ref.extraStyles,
|
|
6691
6691
|
children = _ref.children,
|
|
6692
|
+
_ref$innerWrapperAs = _ref.innerWrapperAs,
|
|
6693
|
+
innerWrapperAs = _ref$innerWrapperAs === void 0 ? "div" : _ref$innerWrapperAs,
|
|
6692
6694
|
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
6693
6695
|
|
|
6694
6696
|
return /*#__PURE__*/React.createElement(ClusterWrapper, _extends({
|
|
@@ -6704,7 +6706,8 @@ var Cluster = function Cluster(_ref) {
|
|
|
6704
6706
|
childGap: childGap,
|
|
6705
6707
|
minHeight: minHeight,
|
|
6706
6708
|
minWidth: minWidth,
|
|
6707
|
-
$nowrap: nowrap
|
|
6709
|
+
$nowrap: nowrap,
|
|
6710
|
+
as: innerWrapperAs
|
|
6708
6711
|
}, safeChildren(children, /*#__PURE__*/React.createElement(Fragment$1, null))));
|
|
6709
6712
|
};
|
|
6710
6713
|
|
|
@@ -46550,6 +46553,7 @@ var PrevNextPlaceholder = function PrevNextPlaceholder(_ref) {
|
|
|
46550
46553
|
|
|
46551
46554
|
var PrevNextButton = function PrevNextButton(_ref2) {
|
|
46552
46555
|
var action = _ref2.action,
|
|
46556
|
+
ariaLabel = _ref2.ariaLabel,
|
|
46553
46557
|
arrowColor = _ref2.arrowColor,
|
|
46554
46558
|
borderRadius = _ref2.borderRadius,
|
|
46555
46559
|
buttonHeight = _ref2.buttonHeight,
|
|
@@ -46559,12 +46563,14 @@ var PrevNextButton = function PrevNextButton(_ref2) {
|
|
|
46559
46563
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46560
46564
|
padding: "0",
|
|
46561
46565
|
minHeight: buttonHeight,
|
|
46562
|
-
extraStyles: "max-height: ".concat(buttonHeight, ";")
|
|
46566
|
+
extraStyles: "max-height: ".concat(buttonHeight, ";"),
|
|
46567
|
+
as: "li"
|
|
46563
46568
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46564
46569
|
action: action,
|
|
46565
46570
|
contentOverride: true,
|
|
46566
46571
|
dataQa: type,
|
|
46567
|
-
|
|
46572
|
+
"aria-label": ariaLabel,
|
|
46573
|
+
extraStyles: "\n background-color: ".concat(numberColor, ";\n border-color: ").concat(numberColor, ";\n border-radius: ").concat(borderRadius, ";\n margin: 0;\n max-height: ").concat(buttonHeight, ";\n min-height: 100%;\n min-width: ").concat(buttonWidth, ";\n padding: 0;\n ")
|
|
46568
46574
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
46569
46575
|
padding: "0",
|
|
46570
46576
|
extraStyles: type === "prev" && "transform: scaleX(-1)"
|
|
@@ -46588,26 +46594,30 @@ var getPagesPanel = function getPagesPanel(page, pagesCount) {
|
|
|
46588
46594
|
|
|
46589
46595
|
if (page > space + 1) {
|
|
46590
46596
|
pages.push({
|
|
46591
|
-
isDelimiter: true
|
|
46597
|
+
isDelimiter: true,
|
|
46598
|
+
id: "first-delimiter"
|
|
46592
46599
|
});
|
|
46593
46600
|
}
|
|
46594
46601
|
|
|
46595
46602
|
for (var j = Math.max(1, page - space) + 1; j < Math.min(lastPageNumber, page + space); j++) {
|
|
46596
46603
|
pages.push({
|
|
46597
46604
|
index: j,
|
|
46598
|
-
isButton: true
|
|
46605
|
+
isButton: true,
|
|
46606
|
+
id: "page-".concat(j)
|
|
46599
46607
|
});
|
|
46600
46608
|
}
|
|
46601
46609
|
|
|
46602
46610
|
if (page < lastPageNumber - space) {
|
|
46603
46611
|
pages.push({
|
|
46604
|
-
isDelimiter: true
|
|
46612
|
+
isDelimiter: true,
|
|
46613
|
+
id: "last-delimiter"
|
|
46605
46614
|
});
|
|
46606
46615
|
}
|
|
46607
46616
|
|
|
46608
46617
|
pages.push({
|
|
46609
46618
|
index: lastPageNumber,
|
|
46610
|
-
isButton: true
|
|
46619
|
+
isButton: true,
|
|
46620
|
+
id: "page-".concat(lastPageNumber)
|
|
46611
46621
|
});
|
|
46612
46622
|
var activePage = pages.find(function (p) {
|
|
46613
46623
|
return p.index === page;
|
|
@@ -46642,18 +46652,26 @@ var Pagination = function Pagination(_ref3) {
|
|
|
46642
46652
|
pageNext = _ref3.pageNext,
|
|
46643
46653
|
pagePrevious = _ref3.pagePrevious,
|
|
46644
46654
|
setCurrentPage = _ref3.setCurrentPage,
|
|
46655
|
+
ariaLabel = _ref3.ariaLabel,
|
|
46645
46656
|
themeValues = _ref3.themeValues;
|
|
46646
46657
|
|
|
46647
46658
|
var _useContext = useContext(ThemeContext),
|
|
46648
46659
|
isMobile = _useContext.isMobile;
|
|
46649
46660
|
|
|
46650
|
-
var extraStyles = "\n min-width: ".concat(buttonWidth, "; min-height: 100%; padding: 0;\n border-radius: ").concat(borderRadius, ";\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n > * > span {\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, "\n }\n margin: 0;\n &:hover {\n background-color: ").concat(themeValues.hoverBackgroundColor, "\n }\n
|
|
46651
|
-
var
|
|
46661
|
+
var extraStyles = "\n min-width: ".concat(buttonWidth, "; min-height: 100%; padding: 0;\n border-radius: ").concat(borderRadius, ";\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n > * > span {\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, "\n }\n margin: 0;\n &:hover {\n background-color: ").concat(themeValues.hoverBackgroundColor, "\n }\n ");
|
|
46662
|
+
var currentPageStyles = "\n border: ".concat(activeBorderWidth, " solid ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, ";\n color: ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.activeColor, ";\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n &:focus {\n box-shadow: none;\n }\n &:hover {\n background-color: initial;\n border: ").concat(activeBorderWidth, " solid ").concat(numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor, ";\n background-color: ").concat(themeValues.activeBackgroundColor, ";\n }\n ");
|
|
46652
46663
|
return /*#__PURE__*/React.createElement(Cluster, {
|
|
46653
46664
|
justify: "center",
|
|
46654
|
-
childGap: childGap
|
|
46665
|
+
childGap: childGap,
|
|
46666
|
+
overflow: true,
|
|
46667
|
+
as: "nav",
|
|
46668
|
+
role: "navigation",
|
|
46669
|
+
innerWrapperAs: "ul",
|
|
46670
|
+
"aria-label": ariaLabel,
|
|
46671
|
+
extraStyles: "> ul { padding: 0px; > li { list-style-type: none; } };"
|
|
46655
46672
|
}, currentPage > 1 ? /*#__PURE__*/React.createElement(PrevNextButton, {
|
|
46656
46673
|
action: pagePrevious,
|
|
46674
|
+
ariaLabel: "Previous Page",
|
|
46657
46675
|
arrowColor: arrowColor !== null && arrowColor !== void 0 ? arrowColor : themeValues.arrowColor,
|
|
46658
46676
|
borderRadius: borderRadius,
|
|
46659
46677
|
buttonHeight: buttonHeight,
|
|
@@ -46675,33 +46693,37 @@ var Pagination = function Pagination(_ref3) {
|
|
|
46675
46693
|
}, "".concat(currentPage, " of ").concat(pageCount)))) : getPagesPanel(currentPage, pageCount).map(function (item, index) {
|
|
46676
46694
|
return item.isButton ? /*#__PURE__*/React.createElement(Box, {
|
|
46677
46695
|
padding: "0",
|
|
46678
|
-
extraStyles: "max-height: ".concat(buttonHeight, ";")
|
|
46696
|
+
extraStyles: "max-height: ".concat(buttonHeight, ";"),
|
|
46697
|
+
as: "li",
|
|
46698
|
+
key: item.id
|
|
46679
46699
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46680
46700
|
variant: "ghost",
|
|
46681
|
-
key: item.index,
|
|
46682
46701
|
text: item.index,
|
|
46683
|
-
|
|
46684
|
-
|
|
46702
|
+
"aria-current": item.active ? "page" : undefined,
|
|
46703
|
+
"aria-label": "".concat(item.index == pageCount ? "Last Page, " : "", "page ").concat(item.index),
|
|
46685
46704
|
action: !item.active ? function () {
|
|
46686
46705
|
return setCurrentPage({
|
|
46687
46706
|
pageNumber: item.index
|
|
46688
46707
|
});
|
|
46689
46708
|
} : noop,
|
|
46690
46709
|
textExtraStyles: "font-size: ".concat(fontSize, "; font-weight: ").concat(fontWeight, ";"),
|
|
46691
|
-
extraStyles: extraStyles,
|
|
46710
|
+
extraStyles: "".concat(extraStyles).concat(item.active ? currentPageStyles : ""),
|
|
46692
46711
|
dataQa: index
|
|
46693
46712
|
}, item.index)) : /*#__PURE__*/React.createElement(Box, {
|
|
46694
|
-
padding: "0 10px"
|
|
46713
|
+
padding: "0 10px",
|
|
46714
|
+
as: "li",
|
|
46715
|
+
key: item.id
|
|
46695
46716
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
46696
46717
|
justify: "flex-end"
|
|
46697
46718
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
46698
|
-
key: index,
|
|
46699
46719
|
variant: "pXL",
|
|
46700
46720
|
weight: fontWeight,
|
|
46701
|
-
color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor
|
|
46702
|
-
|
|
46721
|
+
color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor,
|
|
46722
|
+
role: "presentation"
|
|
46723
|
+
}, "…")));
|
|
46703
46724
|
}), currentPage < pageCount ? /*#__PURE__*/React.createElement(PrevNextButton, {
|
|
46704
46725
|
action: pageNext,
|
|
46726
|
+
ariaLabel: "Next Page",
|
|
46705
46727
|
arrowColor: arrowColor !== null && arrowColor !== void 0 ? arrowColor : themeValues.arrowColor,
|
|
46706
46728
|
borderRadius: borderRadius,
|
|
46707
46729
|
buttonHeight: buttonHeight,
|
|
@@ -47121,101 +47143,6 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
47121
47143
|
|
|
47122
47144
|
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$L, "default");
|
|
47123
47145
|
|
|
47124
|
-
var backgroundColor$c = {
|
|
47125
|
-
"default": "#ffffff",
|
|
47126
|
-
footer: "#ffffff"
|
|
47127
|
-
};
|
|
47128
|
-
var linkColor$6 = {
|
|
47129
|
-
"default": "#3176AA",
|
|
47130
|
-
footer: "#ffffff"
|
|
47131
|
-
};
|
|
47132
|
-
var border$3 = {
|
|
47133
|
-
"default": "#cdcdcd",
|
|
47134
|
-
footer: "#cdcdcd"
|
|
47135
|
-
};
|
|
47136
|
-
var fontSize$b = {
|
|
47137
|
-
"default": "1rem",
|
|
47138
|
-
footer: "0.875rem"
|
|
47139
|
-
};
|
|
47140
|
-
var lineHeight$5 = {
|
|
47141
|
-
"default": "1.5rem",
|
|
47142
|
-
footer: "1.25rem"
|
|
47143
|
-
};
|
|
47144
|
-
var fontWeight$8 = {
|
|
47145
|
-
"default": FONT_WEIGHT_REGULAR,
|
|
47146
|
-
footer: FONT_WEIGHT_SEMIBOLD
|
|
47147
|
-
};
|
|
47148
|
-
var standardInteractionStyles = "\n &:hover {\n outline: none; \n text-decoration: underline;\n }\n &:focus {\n outline: 3px solid #3181E3;\n outline-offset: 2px;\n }\n";
|
|
47149
|
-
var modalLinkHoverFocus$2 = {
|
|
47150
|
-
"default": standardInteractionStyles,
|
|
47151
|
-
footer: standardInteractionStyles
|
|
47152
|
-
};
|
|
47153
|
-
var fallbackValues$M = {
|
|
47154
|
-
backgroundColor: backgroundColor$c,
|
|
47155
|
-
linkColor: linkColor$6,
|
|
47156
|
-
border: border$3,
|
|
47157
|
-
fontSize: fontSize$b,
|
|
47158
|
-
lineHeight: lineHeight$5,
|
|
47159
|
-
fontWeight: fontWeight$8,
|
|
47160
|
-
modalLinkHoverFocus: modalLinkHoverFocus$2
|
|
47161
|
-
};
|
|
47162
|
-
|
|
47163
|
-
var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
47164
|
-
var link = _ref.link,
|
|
47165
|
-
_ref$title = _ref.title,
|
|
47166
|
-
title = _ref$title === void 0 ? "Terms & Conditions" : _ref$title,
|
|
47167
|
-
isOpen = _ref.isOpen,
|
|
47168
|
-
toggleOpen = _ref.toggleOpen,
|
|
47169
|
-
toggleAccepted = _ref.toggleAccepted,
|
|
47170
|
-
acceptText = _ref.acceptText,
|
|
47171
|
-
terms = _ref.terms,
|
|
47172
|
-
variant = _ref.variant,
|
|
47173
|
-
_ref$linkVariant = _ref.linkVariant,
|
|
47174
|
-
linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
|
|
47175
|
-
themeValues = _ref.themeValues;
|
|
47176
|
-
return /*#__PURE__*/React.createElement(Modal$1, {
|
|
47177
|
-
modalOpen: isOpen,
|
|
47178
|
-
hideModal: function hideModal() {
|
|
47179
|
-
return toggleOpen(false);
|
|
47180
|
-
},
|
|
47181
|
-
showModal: function showModal() {
|
|
47182
|
-
return toggleOpen(true);
|
|
47183
|
-
},
|
|
47184
|
-
modalHeaderText: title,
|
|
47185
|
-
modalBodyText: /*#__PURE__*/React.createElement(Box, {
|
|
47186
|
-
background: themeValues.backgroundColor,
|
|
47187
|
-
border: "1px solid ".concat(themeValues.border),
|
|
47188
|
-
borderRadius: "3px",
|
|
47189
|
-
extraStyles: "overflow: scroll; max-height: 20rem;"
|
|
47190
|
-
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
47191
|
-
variant: "p",
|
|
47192
|
-
extraStyles: "& a { text-decoration: underline; }"
|
|
47193
|
-
}, terms)),
|
|
47194
|
-
defaultWrapper: false,
|
|
47195
|
-
onlyCloseButton: !acceptText,
|
|
47196
|
-
continueButtonText: acceptText,
|
|
47197
|
-
continueAction: function continueAction() {
|
|
47198
|
-
toggleAccepted(true);
|
|
47199
|
-
toggleOpen(false);
|
|
47200
|
-
}
|
|
47201
|
-
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
47202
|
-
variant: linkVariant,
|
|
47203
|
-
onClick: function onClick() {
|
|
47204
|
-
return toggleOpen(true);
|
|
47205
|
-
},
|
|
47206
|
-
onKeyPress: function onKeyPress(e) {
|
|
47207
|
-
return e.key === "Enter" && toggleOpen(true);
|
|
47208
|
-
},
|
|
47209
|
-
tabIndex: "0",
|
|
47210
|
-
color: themeValues.linkColor,
|
|
47211
|
-
weight: themeValues.fontWeight,
|
|
47212
|
-
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
47213
|
-
extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
|
|
47214
|
-
}, link));
|
|
47215
|
-
};
|
|
47216
|
-
|
|
47217
|
-
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$M, "default");
|
|
47218
|
-
|
|
47219
47146
|
var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
47220
47147
|
var _routingNumberErrors, _accountNumberErrors;
|
|
47221
47148
|
|
|
@@ -47234,10 +47161,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47234
47161
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
47235
47162
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
47236
47163
|
saveToWallet = _ref.saveToWallet,
|
|
47237
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
47238
|
-
termsContent = _ref.termsContent,
|
|
47239
|
-
_ref$termsTitle = _ref.termsTitle,
|
|
47240
|
-
termsTitle = _ref$termsTitle === void 0 ? "Terms & Conditions" : _ref$termsTitle;
|
|
47164
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked;
|
|
47241
47165
|
|
|
47242
47166
|
if (clearOnDismount) {
|
|
47243
47167
|
useEffect$1(function () {
|
|
@@ -47257,13 +47181,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47257
47181
|
showAccount = _useState4[0],
|
|
47258
47182
|
toggleShowAccount = _useState4[1];
|
|
47259
47183
|
|
|
47260
|
-
var _useState5 = useState(false),
|
|
47261
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
47262
|
-
termsModalOpen = _useState6[0],
|
|
47263
|
-
setTermsModalOpen = _useState6[1];
|
|
47264
|
-
|
|
47265
|
-
var showTerms = !!termsContent;
|
|
47266
|
-
|
|
47267
47184
|
var nameErrors = _defineProperty({}, required.error, "Name is required");
|
|
47268
47185
|
|
|
47269
47186
|
var routingNumberErrors = (_routingNumberErrors = {}, _defineProperty(_routingNumberErrors, required.error, "Routing number is required"), _defineProperty(_routingNumberErrors, hasLength.error, "Routing number must be 9 digits"), _defineProperty(_routingNumberErrors, isRoutingNumber.error, "Invalid routing number"), _routingNumberErrors);
|
|
@@ -47372,24 +47289,12 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47372
47289
|
onChange: toggleCheckbox,
|
|
47373
47290
|
checked: defaultMethod.value,
|
|
47374
47291
|
hidden: hideDefaultPayment
|
|
47375
|
-
}),
|
|
47376
|
-
childGap: "4px"
|
|
47377
|
-
}, showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
47292
|
+
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
47378
47293
|
name: "bank checkbox",
|
|
47379
|
-
title: "Save checking account to wallet
|
|
47294
|
+
title: "Save checking account to wallet",
|
|
47380
47295
|
checked: walletCheckboxMarked,
|
|
47381
47296
|
onChange: saveToWallet
|
|
47382
|
-
})
|
|
47383
|
-
singleChild: true
|
|
47384
|
-
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
47385
|
-
childGap: 0
|
|
47386
|
-
}, /*#__PURE__*/React.createElement(Text$1, null, "View\xA0"), /*#__PURE__*/React.createElement(TermsAndConditionsModal$1, {
|
|
47387
|
-
link: termsTitle,
|
|
47388
|
-
terms: termsContent,
|
|
47389
|
-
title: termsTitle,
|
|
47390
|
-
isOpen: termsModalOpen,
|
|
47391
|
-
toggleOpen: setTermsModalOpen
|
|
47392
|
-
}))))));
|
|
47297
|
+
})));
|
|
47393
47298
|
};
|
|
47394
47299
|
|
|
47395
47300
|
var formConfig$6 = {
|
|
@@ -47443,20 +47348,11 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
47443
47348
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
47444
47349
|
saveToWallet = _ref.saveToWallet,
|
|
47445
47350
|
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
47446
|
-
deniedCards = _ref.deniedCards
|
|
47447
|
-
termsContent = _ref.termsContent,
|
|
47448
|
-
_ref$termsTitle = _ref.termsTitle,
|
|
47449
|
-
termsTitle = _ref$termsTitle === void 0 ? "Terms & Conditions" : _ref$termsTitle;
|
|
47351
|
+
deniedCards = _ref.deniedCards;
|
|
47450
47352
|
|
|
47451
47353
|
var _useContext = useContext(ThemeContext),
|
|
47452
47354
|
isMobile = _useContext.isMobile;
|
|
47453
47355
|
|
|
47454
|
-
var _useState = useState(false),
|
|
47455
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
47456
|
-
termsModalOpen = _useState2[0],
|
|
47457
|
-
setTermsModalOpen = _useState2[1];
|
|
47458
|
-
|
|
47459
|
-
var showTerms = !!termsContent;
|
|
47460
47356
|
useEffect$1(function () {
|
|
47461
47357
|
if (deniedCards) {
|
|
47462
47358
|
deniedCards.map(function (card) {
|
|
@@ -47565,24 +47461,12 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
47565
47461
|
return e.key === "Enter" && handleSubmit(e);
|
|
47566
47462
|
},
|
|
47567
47463
|
autocomplete: "billing postal-code"
|
|
47568
|
-
})),
|
|
47569
|
-
childGap: "4px"
|
|
47570
|
-
}, showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
47464
|
+
})), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
47571
47465
|
name: "credit card checkbox",
|
|
47572
|
-
title: "Save credit card to wallet
|
|
47466
|
+
title: "Save credit card to wallet",
|
|
47573
47467
|
checked: walletCheckboxMarked,
|
|
47574
47468
|
onChange: saveToWallet
|
|
47575
|
-
})
|
|
47576
|
-
singleChild: true
|
|
47577
|
-
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
47578
|
-
childGap: 0
|
|
47579
|
-
}, /*#__PURE__*/React.createElement(Text$1, null, "View\xA0"), /*#__PURE__*/React.createElement(TermsAndConditionsModal$1, {
|
|
47580
|
-
link: termsTitle,
|
|
47581
|
-
terms: termsContent,
|
|
47582
|
-
title: termsTitle,
|
|
47583
|
-
isOpen: termsModalOpen,
|
|
47584
|
-
toggleOpen: setTermsModalOpen
|
|
47585
|
-
}))))));
|
|
47469
|
+
})));
|
|
47586
47470
|
};
|
|
47587
47471
|
|
|
47588
47472
|
var PaymentFormCard$1 = withWindowSize(PaymentFormCard);
|
|
@@ -47863,7 +47747,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
|
|
|
47863
47747
|
var bodyBackgroundColor$1 = "#eeeeee";
|
|
47864
47748
|
var borderColor$5 = "".concat(GREY_CHATEAU);
|
|
47865
47749
|
var focusStyles = "outline: none;";
|
|
47866
|
-
var fallbackValues$
|
|
47750
|
+
var fallbackValues$M = {
|
|
47867
47751
|
headingBackgroundColor: headingBackgroundColor$1,
|
|
47868
47752
|
headingDisabledColor: headingDisabledColor,
|
|
47869
47753
|
bodyBackgroundColor: bodyBackgroundColor$1,
|
|
@@ -48051,7 +47935,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48051
47935
|
})));
|
|
48052
47936
|
};
|
|
48053
47937
|
|
|
48054
|
-
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$
|
|
47938
|
+
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$M);
|
|
48055
47939
|
|
|
48056
47940
|
var RegistrationForm = function RegistrationForm(_ref) {
|
|
48057
47941
|
var _emailErrorMessages, _passwordErrorMessage;
|
|
@@ -48348,7 +48232,7 @@ var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
|
|
|
48348
48232
|
var activeTabBackground = "#FFFFFF";
|
|
48349
48233
|
var activeTabAccent = "#15749D";
|
|
48350
48234
|
var activeTabHover = "#B8D5E1";
|
|
48351
|
-
var fallbackValues$
|
|
48235
|
+
var fallbackValues$N = {
|
|
48352
48236
|
activeTabBackground: activeTabBackground,
|
|
48353
48237
|
activeTabAccent: activeTabAccent,
|
|
48354
48238
|
activeTabHover: activeTabHover
|
|
@@ -48427,12 +48311,12 @@ var Tabs = function Tabs(_ref) {
|
|
|
48427
48311
|
}))));
|
|
48428
48312
|
};
|
|
48429
48313
|
|
|
48430
|
-
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$
|
|
48314
|
+
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$N);
|
|
48431
48315
|
|
|
48432
48316
|
var activeTabBackground$1 = "#FFFFFF";
|
|
48433
48317
|
var activeTabAccent$1 = "#15749D";
|
|
48434
48318
|
var activeTabHover$1 = "#B8D5E1";
|
|
48435
|
-
var fallbackValues$
|
|
48319
|
+
var fallbackValues$O = {
|
|
48436
48320
|
activeTabBackground: activeTabBackground$1,
|
|
48437
48321
|
activeTabAccent: activeTabAccent$1,
|
|
48438
48322
|
activeTabHover: activeTabHover$1
|
|
@@ -48488,7 +48372,100 @@ var TabSidebar = function TabSidebar(_ref) {
|
|
|
48488
48372
|
})));
|
|
48489
48373
|
};
|
|
48490
48374
|
|
|
48491
|
-
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$
|
|
48375
|
+
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$O);
|
|
48376
|
+
|
|
48377
|
+
var backgroundColor$c = {
|
|
48378
|
+
"default": "#ffffff",
|
|
48379
|
+
footer: "#ffffff"
|
|
48380
|
+
};
|
|
48381
|
+
var linkColor$6 = {
|
|
48382
|
+
"default": "#3176AA",
|
|
48383
|
+
footer: "#ffffff"
|
|
48384
|
+
};
|
|
48385
|
+
var border$3 = {
|
|
48386
|
+
"default": "#cdcdcd",
|
|
48387
|
+
footer: "#cdcdcd"
|
|
48388
|
+
};
|
|
48389
|
+
var fontSize$b = {
|
|
48390
|
+
"default": "1rem",
|
|
48391
|
+
footer: "0.875rem"
|
|
48392
|
+
};
|
|
48393
|
+
var lineHeight$5 = {
|
|
48394
|
+
"default": "1.5rem",
|
|
48395
|
+
footer: "1.25rem"
|
|
48396
|
+
};
|
|
48397
|
+
var fontWeight$8 = {
|
|
48398
|
+
"default": FONT_WEIGHT_REGULAR,
|
|
48399
|
+
footer: FONT_WEIGHT_SEMIBOLD
|
|
48400
|
+
};
|
|
48401
|
+
var standardInteractionStyles = "\n &:hover {\n outline: none; \n text-decoration: underline;\n }\n &:focus {\n outline: 3px solid #3181E3;\n outline-offset: 2px;\n }\n";
|
|
48402
|
+
var modalLinkHoverFocus$2 = {
|
|
48403
|
+
"default": standardInteractionStyles,
|
|
48404
|
+
footer: standardInteractionStyles
|
|
48405
|
+
};
|
|
48406
|
+
var fallbackValues$P = {
|
|
48407
|
+
backgroundColor: backgroundColor$c,
|
|
48408
|
+
linkColor: linkColor$6,
|
|
48409
|
+
border: border$3,
|
|
48410
|
+
fontSize: fontSize$b,
|
|
48411
|
+
lineHeight: lineHeight$5,
|
|
48412
|
+
fontWeight: fontWeight$8,
|
|
48413
|
+
modalLinkHoverFocus: modalLinkHoverFocus$2
|
|
48414
|
+
};
|
|
48415
|
+
|
|
48416
|
+
var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
48417
|
+
var link = _ref.link,
|
|
48418
|
+
_ref$title = _ref.title,
|
|
48419
|
+
title = _ref$title === void 0 ? "Terms & Conditions" : _ref$title,
|
|
48420
|
+
isOpen = _ref.isOpen,
|
|
48421
|
+
toggleOpen = _ref.toggleOpen,
|
|
48422
|
+
toggleAccepted = _ref.toggleAccepted,
|
|
48423
|
+
acceptText = _ref.acceptText,
|
|
48424
|
+
terms = _ref.terms,
|
|
48425
|
+
variant = _ref.variant,
|
|
48426
|
+
themeValues = _ref.themeValues;
|
|
48427
|
+
return /*#__PURE__*/React.createElement(Modal$1, {
|
|
48428
|
+
modalOpen: isOpen,
|
|
48429
|
+
hideModal: function hideModal() {
|
|
48430
|
+
return toggleOpen(false);
|
|
48431
|
+
},
|
|
48432
|
+
showModal: function showModal() {
|
|
48433
|
+
return toggleOpen(true);
|
|
48434
|
+
},
|
|
48435
|
+
modalHeaderText: title,
|
|
48436
|
+
modalBodyText: /*#__PURE__*/React.createElement(Box, {
|
|
48437
|
+
background: themeValues.backgroundColor,
|
|
48438
|
+
border: "1px solid ".concat(themeValues.border),
|
|
48439
|
+
borderRadius: "3px",
|
|
48440
|
+
extraStyles: "overflow: scroll; max-height: 20rem;"
|
|
48441
|
+
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
48442
|
+
variant: "p",
|
|
48443
|
+
extraStyles: "& a { text-decoration: underline; }"
|
|
48444
|
+
}, terms)),
|
|
48445
|
+
defaultWrapper: false,
|
|
48446
|
+
onlyCloseButton: !acceptText,
|
|
48447
|
+
continueButtonText: acceptText,
|
|
48448
|
+
continueAction: function continueAction() {
|
|
48449
|
+
toggleAccepted(true);
|
|
48450
|
+
toggleOpen(false);
|
|
48451
|
+
}
|
|
48452
|
+
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
48453
|
+
variant: variant === "default" ? "pS" : "pXS",
|
|
48454
|
+
onClick: function onClick() {
|
|
48455
|
+
return toggleOpen(true);
|
|
48456
|
+
},
|
|
48457
|
+
onKeyPress: function onKeyPress(e) {
|
|
48458
|
+
return e.key === "Enter" && toggleOpen(true);
|
|
48459
|
+
},
|
|
48460
|
+
tabIndex: "0",
|
|
48461
|
+
color: themeValues.linkColor,
|
|
48462
|
+
weight: themeValues.fontWeight,
|
|
48463
|
+
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
48464
|
+
extraStyles: "display: inline-block; width: fit-content;"
|
|
48465
|
+
}, link));
|
|
48466
|
+
};
|
|
48467
|
+
|
|
48468
|
+
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$P, "default");
|
|
48492
48469
|
|
|
48493
48470
|
var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
48494
48471
|
var onCheck = _ref.onCheck,
|
|
@@ -48496,8 +48473,7 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
|
48496
48473
|
html = _ref.html,
|
|
48497
48474
|
terms = _ref.terms,
|
|
48498
48475
|
_ref$error = _ref.error,
|
|
48499
|
-
error = _ref$error === void 0 ? false : _ref$error
|
|
48500
|
-
linkVariant = _ref.linkVariant;
|
|
48476
|
+
error = _ref$error === void 0 ? false : _ref$error;
|
|
48501
48477
|
|
|
48502
48478
|
var _useState = useState(false),
|
|
48503
48479
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -48518,8 +48494,7 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
|
48518
48494
|
link: "Learn More",
|
|
48519
48495
|
terms: terms,
|
|
48520
48496
|
isOpen: showTerms,
|
|
48521
|
-
toggleOpen: toggleShowTerms
|
|
48522
|
-
linkVariant: linkVariant
|
|
48497
|
+
toggleOpen: toggleShowTerms
|
|
48523
48498
|
})))));
|
|
48524
48499
|
};
|
|
48525
48500
|
|