@thecb/components 4.0.15-beta.0 → 4.0.16
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
CHANGED
|
@@ -37695,9 +37695,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
37695
37695
|
subtotal = _ref.subtotal,
|
|
37696
37696
|
total = _ref.total,
|
|
37697
37697
|
themeValues = _ref.themeValues;
|
|
37698
|
-
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
37699
|
-
childGap: "16px"
|
|
37700
|
-
}, lineItemElems, /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37698
|
+
return /*#__PURE__*/React__default.createElement(Stack, null, lineItemElems, /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37701
37699
|
padding: "0.5rem 0"
|
|
37702
37700
|
}, /*#__PURE__*/React__default.createElement(LabeledAmount$1, {
|
|
37703
37701
|
variant: themeValues.labeledAmountSubtotal,
|
|
@@ -37800,19 +37798,13 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37800
37798
|
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
37801
37799
|
key: fee.label
|
|
37802
37800
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37803
|
-
padding: "
|
|
37801
|
+
padding: "0.25rem 0"
|
|
37804
37802
|
}), /*#__PURE__*/React__default.createElement(LabeledAmount$1, _extends({
|
|
37805
37803
|
key: fee.label,
|
|
37806
37804
|
variant: themeValues.labeledAmountSubtotal
|
|
37807
37805
|
}, fee)));
|
|
37808
37806
|
});
|
|
37809
|
-
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack, {
|
|
37810
|
-
childGap: "0"
|
|
37811
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37812
|
-
padding: "4.5px"
|
|
37813
|
-
}), /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37814
|
-
padding: "8px"
|
|
37815
|
-
}), /*#__PURE__*/React__default.createElement(PaymentDetailsContent, {
|
|
37807
|
+
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(PaymentDetailsContent, {
|
|
37816
37808
|
lineItemElems: lineItemElems,
|
|
37817
37809
|
feeElems: feeElems,
|
|
37818
37810
|
subtotal: subtotal,
|
|
@@ -37835,11 +37827,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37835
37827
|
variant: "h5",
|
|
37836
37828
|
weight: "700",
|
|
37837
37829
|
as: "h1"
|
|
37838
|
-
}, titleText), /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37839
|
-
variant: "h5",
|
|
37840
|
-
weight: "700",
|
|
37841
|
-
as: "h1"
|
|
37842
|
-
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37830
|
+
}, titleText), displayCurrency(total))) : /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37843
37831
|
as: "h1",
|
|
37844
37832
|
variant: "h3",
|
|
37845
37833
|
weight: "700",
|
|
@@ -37970,7 +37958,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
37970
37958
|
fields = _ref.fields,
|
|
37971
37959
|
actions = _ref.actions,
|
|
37972
37960
|
showErrors = _ref.showErrors,
|
|
37973
|
-
fees = _ref.fees,
|
|
37974
37961
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
37975
37962
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit;
|
|
37976
37963
|
|
|
@@ -38105,13 +38092,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
38105
38092
|
onChange: toggleCheckbox,
|
|
38106
38093
|
checked: defaultMethod.value,
|
|
38107
38094
|
hidden: hideDefaultPayment
|
|
38108
|
-
}), !!(fees === null || fees === void 0 ? void 0 : fees.value) && /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
38109
|
-
heading: "Processing Fee",
|
|
38110
|
-
text: "There is a processing fee of ".concat(fees.type === "FLAT" ? "".concat(displayCurrency(fees.value)) : "".concat(fees.value * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
|
|
38111
|
-
return "with a minimum of ".concat(displayCurrency(a), " ");
|
|
38112
|
-
})(fees.minimumInCents), "on all bank account payments."),
|
|
38113
|
-
variant: "info",
|
|
38114
|
-
showQuitLink: false
|
|
38115
38095
|
})));
|
|
38116
38096
|
};
|
|
38117
38097
|
|
|
@@ -38168,7 +38148,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
38168
38148
|
fields = _ref.fields,
|
|
38169
38149
|
actions = _ref.actions,
|
|
38170
38150
|
showErrors = _ref.showErrors,
|
|
38171
|
-
fees = _ref.fees,
|
|
38172
38151
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
38173
38152
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
38174
38153
|
isMobile = _ref.isMobile;
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ const PaymentDetailsContent = ({
|
|
|
18
18
|
total,
|
|
19
19
|
themeValues
|
|
20
20
|
}) => (
|
|
21
|
-
<Stack
|
|
21
|
+
<Stack>
|
|
22
22
|
{lineItemElems}
|
|
23
23
|
<SolidDivider />
|
|
24
24
|
<Box padding="0.5rem 0">
|
|
@@ -99,7 +99,7 @@ const PaymentDetails = ({
|
|
|
99
99
|
));
|
|
100
100
|
const feeElems = fees.map(fee => (
|
|
101
101
|
<Fragment key={fee.label}>
|
|
102
|
-
<Box padding="
|
|
102
|
+
<Box padding="0.25rem 0" />
|
|
103
103
|
<LabeledAmount
|
|
104
104
|
key={fee.label}
|
|
105
105
|
variant={themeValues.labeledAmountSubtotal}
|
|
@@ -108,10 +108,8 @@ const PaymentDetails = ({
|
|
|
108
108
|
</Fragment>
|
|
109
109
|
));
|
|
110
110
|
const content = isCollapsible ? (
|
|
111
|
-
<Stack
|
|
112
|
-
<Box padding="4.5px" />
|
|
111
|
+
<Stack>
|
|
113
112
|
<SolidDivider />
|
|
114
|
-
<Box padding="8px" />
|
|
115
113
|
<PaymentDetailsContent
|
|
116
114
|
{...{ lineItemElems, feeElems, subtotal, total, themeValues }}
|
|
117
115
|
/>
|
|
@@ -129,9 +127,7 @@ const PaymentDetails = ({
|
|
|
129
127
|
<Heading variant="h5" weight="700" as="h1">
|
|
130
128
|
{titleText}
|
|
131
129
|
</Heading>
|
|
132
|
-
|
|
133
|
-
{displayCurrency(total)}
|
|
134
|
-
</Heading>
|
|
130
|
+
{displayCurrency(total)}
|
|
135
131
|
</Cluster>
|
|
136
132
|
</Box>
|
|
137
133
|
) : (
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
-
import { ifElse, isNil, always } from "ramda";
|
|
4
3
|
import Checkbox from "../../atoms/checkbox";
|
|
5
4
|
import {
|
|
6
5
|
required,
|
|
@@ -14,9 +13,8 @@ import {
|
|
|
14
13
|
FormInputColumn,
|
|
15
14
|
FormContainer
|
|
16
15
|
} from "../../atoms/form-layouts";
|
|
17
|
-
import Alert from "../../atoms/alert";
|
|
18
16
|
import AccountAndRoutingModal from "../account-and-routing-modal";
|
|
19
|
-
import {
|
|
17
|
+
import { noop } from "../../../util/general";
|
|
20
18
|
|
|
21
19
|
const ModalWrapper = styled.div``;
|
|
22
20
|
|
|
@@ -30,7 +28,6 @@ const PaymentFormACH = ({
|
|
|
30
28
|
fields,
|
|
31
29
|
actions,
|
|
32
30
|
showErrors,
|
|
33
|
-
fees,
|
|
34
31
|
handleSubmit = noop
|
|
35
32
|
}) => {
|
|
36
33
|
if (clearOnDismount) {
|
|
@@ -165,22 +162,6 @@ const PaymentFormACH = ({
|
|
|
165
162
|
hidden={hideDefaultPayment}
|
|
166
163
|
/>
|
|
167
164
|
)}
|
|
168
|
-
{!!fees?.value && (
|
|
169
|
-
<Alert
|
|
170
|
-
heading="Processing Fee"
|
|
171
|
-
text={`There is a processing fee of ${
|
|
172
|
-
fees.type === "FLAT"
|
|
173
|
-
? `${displayCurrency(fees.value)}`
|
|
174
|
-
: `${fees.value * 100}%`
|
|
175
|
-
} ${ifElse(
|
|
176
|
-
isNil,
|
|
177
|
-
always(""),
|
|
178
|
-
a => `with a minimum of ${displayCurrency(a)} `
|
|
179
|
-
)(fees.minimumInCents)}on all bank account payments.`}
|
|
180
|
-
variant="info"
|
|
181
|
-
showQuitLink={false}
|
|
182
|
-
/>
|
|
183
|
-
)}
|
|
184
165
|
</FormInputColumn>
|
|
185
166
|
</FormContainer>
|
|
186
167
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import { required, hasLength, matchesRegex } from "redux-freeform";
|
|
3
|
-
import {
|
|
4
|
-
import { checkCardBrand, displayCurrency, noop } from "../../../util/general";
|
|
3
|
+
import { checkCardBrand, noop } from "../../../util/general";
|
|
5
4
|
import { expirationDateFormat, creditCardFormat } from "../../../util/formats";
|
|
6
5
|
import {
|
|
7
6
|
FormInput,
|
|
@@ -10,7 +9,6 @@ import {
|
|
|
10
9
|
FormInputRow
|
|
11
10
|
} from "../../atoms/form-layouts";
|
|
12
11
|
import { Box } from "../../atoms/layouts";
|
|
13
|
-
import Alert from "../../atoms/alert";
|
|
14
12
|
|
|
15
13
|
const nameOnCardErrors = {
|
|
16
14
|
[required.error]: "Name is required"
|
|
@@ -40,7 +38,6 @@ const PaymentFormCard = ({
|
|
|
40
38
|
fields,
|
|
41
39
|
actions,
|
|
42
40
|
showErrors,
|
|
43
|
-
fees,
|
|
44
41
|
handleSubmit = noop,
|
|
45
42
|
isMobile
|
|
46
43
|
}) => {
|