@thecb/components 4.0.14 → 4.0.17-beta.0
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 +28 -27
- package/package.json +1 -1
- package/src/components/atoms/layouts/examples/sidebar-example/SidebarExample.js +1 -1
- package/src/components/atoms/radio-button/RadioButton.js +9 -9
- package/src/components/molecules/payment-details/PaymentDetails.js +8 -4
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +1 -20
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -4
- package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +1 -1
- package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -1
- package/.tool-versions +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19917,9 +19917,7 @@ var ERRORS = {
|
|
|
19917
19917
|
"71": "Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19918
19918
|
"72": "Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19919
19919
|
"73": "Please provide a valid CSS variable.\n\n",
|
|
19920
|
-
"74": "CSS variable not found
|
|
19921
|
-
"75": "important requires a valid style object, got a %s instead.\n\n",
|
|
19922
|
-
"76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
|
|
19920
|
+
"74": "CSS variable not found.\n"
|
|
19923
19921
|
};
|
|
19924
19922
|
/**
|
|
19925
19923
|
* super basic version of sprintf
|
|
@@ -20717,13 +20715,13 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
20717
20715
|
var buttonCenter = {
|
|
20718
20716
|
on: {
|
|
20719
20717
|
backgroundColor: themeValues.activeColor,
|
|
20720
|
-
height: "
|
|
20721
|
-
width: "
|
|
20718
|
+
height: "16px",
|
|
20719
|
+
width: "16px"
|
|
20722
20720
|
},
|
|
20723
20721
|
onFocused: {
|
|
20724
20722
|
backgroundColor: themeValues.activeColor,
|
|
20725
|
-
height: "
|
|
20726
|
-
width: "
|
|
20723
|
+
height: "16px",
|
|
20724
|
+
width: "16px"
|
|
20727
20725
|
},
|
|
20728
20726
|
offFocused: {
|
|
20729
20727
|
backgroundColor: "transparent",
|
|
@@ -20750,16 +20748,16 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
20750
20748
|
}), /*#__PURE__*/React__default.createElement(Motion, {
|
|
20751
20749
|
borderWidth: "1px",
|
|
20752
20750
|
borderStyle: "solid",
|
|
20753
|
-
borderRadius: "
|
|
20754
|
-
margin: "
|
|
20755
|
-
height: "
|
|
20756
|
-
width: "
|
|
20751
|
+
borderRadius: "12px",
|
|
20752
|
+
margin: "4px 14px 4px 4px",
|
|
20753
|
+
height: "24px",
|
|
20754
|
+
width: "24px",
|
|
20757
20755
|
variants: buttonBorder,
|
|
20758
20756
|
display: "flex",
|
|
20759
20757
|
extraStyles: "justify-content: center; align-items: center;"
|
|
20760
20758
|
}, /*#__PURE__*/React__default.createElement(Motion, {
|
|
20761
20759
|
variants: buttonCenter,
|
|
20762
|
-
borderRadius: "
|
|
20760
|
+
borderRadius: "8px"
|
|
20763
20761
|
})));
|
|
20764
20762
|
};
|
|
20765
20763
|
|
|
@@ -37697,7 +37695,9 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
37697
37695
|
subtotal = _ref.subtotal,
|
|
37698
37696
|
total = _ref.total,
|
|
37699
37697
|
themeValues = _ref.themeValues;
|
|
37700
|
-
return /*#__PURE__*/React__default.createElement(Stack,
|
|
37698
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
37699
|
+
childGap: "16px"
|
|
37700
|
+
}, lineItemElems, /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37701
37701
|
padding: "0.5rem 0"
|
|
37702
37702
|
}, /*#__PURE__*/React__default.createElement(LabeledAmount$1, {
|
|
37703
37703
|
variant: themeValues.labeledAmountSubtotal,
|
|
@@ -37800,13 +37800,19 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37800
37800
|
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
37801
37801
|
key: fee.label
|
|
37802
37802
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37803
|
-
padding: "
|
|
37803
|
+
padding: "4px 0"
|
|
37804
37804
|
}), /*#__PURE__*/React__default.createElement(LabeledAmount$1, _extends({
|
|
37805
37805
|
key: fee.label,
|
|
37806
37806
|
variant: themeValues.labeledAmountSubtotal
|
|
37807
37807
|
}, fee)));
|
|
37808
37808
|
});
|
|
37809
|
-
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack,
|
|
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, {
|
|
37810
37816
|
lineItemElems: lineItemElems,
|
|
37811
37817
|
feeElems: feeElems,
|
|
37812
37818
|
subtotal: subtotal,
|
|
@@ -37829,7 +37835,11 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37829
37835
|
variant: "h5",
|
|
37830
37836
|
weight: "700",
|
|
37831
37837
|
as: "h1"
|
|
37832
|
-
}, titleText),
|
|
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, {
|
|
37833
37843
|
as: "h1",
|
|
37834
37844
|
variant: "h3",
|
|
37835
37845
|
weight: "700",
|
|
@@ -37960,7 +37970,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
37960
37970
|
fields = _ref.fields,
|
|
37961
37971
|
actions = _ref.actions,
|
|
37962
37972
|
showErrors = _ref.showErrors,
|
|
37963
|
-
fees = _ref.fees,
|
|
37964
37973
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
37965
37974
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit;
|
|
37966
37975
|
|
|
@@ -38095,13 +38104,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
38095
38104
|
onChange: toggleCheckbox,
|
|
38096
38105
|
checked: defaultMethod.value,
|
|
38097
38106
|
hidden: hideDefaultPayment
|
|
38098
|
-
}), !!(fees === null || fees === void 0 ? void 0 : fees.value) && /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
38099
|
-
heading: "Processing Fee",
|
|
38100
|
-
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) {
|
|
38101
|
-
return "with a minimum of ".concat(displayCurrency(a), " ");
|
|
38102
|
-
})(fees.minimumInCents), "on all bank account payments."),
|
|
38103
|
-
variant: "info",
|
|
38104
|
-
showQuitLink: false
|
|
38105
38107
|
})));
|
|
38106
38108
|
};
|
|
38107
38109
|
|
|
@@ -38158,7 +38160,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
38158
38160
|
fields = _ref.fields,
|
|
38159
38161
|
actions = _ref.actions,
|
|
38160
38162
|
showErrors = _ref.showErrors,
|
|
38161
|
-
fees = _ref.fees,
|
|
38162
38163
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
38163
38164
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
38164
38165
|
isMobile = _ref.isMobile;
|
|
@@ -39355,7 +39356,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
39355
39356
|
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
39356
39357
|
width: sidebarTargetWidth,
|
|
39357
39358
|
childGap: sidebarContentGap,
|
|
39358
|
-
|
|
39359
|
+
sidebarOnRight: sidebarOnRight,
|
|
39359
39360
|
contentMinWidth: mainContentMinWidth
|
|
39360
39361
|
}, sidebarOnRight ? /*#__PURE__*/React__default.createElement(React.Fragment, null) : sidebarContent, mainContent, sidebarOnRight ? sidebarContent : /*#__PURE__*/React__default.createElement(React.Fragment, null))))), footer ? footer : /*#__PURE__*/React__default.createElement(Box, {
|
|
39361
39362
|
padding: "0"
|
|
@@ -39417,7 +39418,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
39417
39418
|
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
39418
39419
|
width: sidebarTargetWidth,
|
|
39419
39420
|
childGap: sidebarContentGap,
|
|
39420
|
-
|
|
39421
|
+
sidebarOnRight: sidebarOnRight,
|
|
39421
39422
|
contentMinWidth: mainContentMinWidth,
|
|
39422
39423
|
key: "content-sidebar"
|
|
39423
39424
|
}, sidebarOnRight ? /*#__PURE__*/React__default.createElement(React.Fragment, {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import Sidebar from "../../Sidebar";
|
|
4
4
|
|
|
5
5
|
const SidebarExample = ({ width, onRight, childGap, children }) => (
|
|
6
|
-
<Sidebar width={width}
|
|
6
|
+
<Sidebar width={width} sidebarOnRight={onRight} childGap={childGap}>
|
|
7
7
|
{children}
|
|
8
8
|
</Sidebar>
|
|
9
9
|
);
|
|
@@ -40,13 +40,13 @@ const RadioButton = ({
|
|
|
40
40
|
const buttonCenter = {
|
|
41
41
|
on: {
|
|
42
42
|
backgroundColor: themeValues.activeColor,
|
|
43
|
-
height: "
|
|
44
|
-
width: "
|
|
43
|
+
height: "16px",
|
|
44
|
+
width: "16px"
|
|
45
45
|
},
|
|
46
46
|
onFocused: {
|
|
47
47
|
backgroundColor: themeValues.activeColor,
|
|
48
|
-
height: "
|
|
49
|
-
width: "
|
|
48
|
+
height: "16px",
|
|
49
|
+
width: "16px"
|
|
50
50
|
},
|
|
51
51
|
offFocused: {
|
|
52
52
|
backgroundColor: "transparent",
|
|
@@ -85,15 +85,15 @@ const RadioButton = ({
|
|
|
85
85
|
<Motion
|
|
86
86
|
borderWidth="1px"
|
|
87
87
|
borderStyle="solid"
|
|
88
|
-
borderRadius="
|
|
89
|
-
margin="
|
|
90
|
-
height="
|
|
91
|
-
width="
|
|
88
|
+
borderRadius="12px"
|
|
89
|
+
margin="4px 14px 4px 4px"
|
|
90
|
+
height="24px"
|
|
91
|
+
width="24px"
|
|
92
92
|
variants={buttonBorder}
|
|
93
93
|
display="flex"
|
|
94
94
|
extraStyles={`justify-content: center; align-items: center;`}
|
|
95
95
|
>
|
|
96
|
-
<Motion variants={buttonCenter} borderRadius="
|
|
96
|
+
<Motion variants={buttonCenter} borderRadius="8px" />
|
|
97
97
|
</Motion>
|
|
98
98
|
</Motion>
|
|
99
99
|
);
|
|
@@ -18,7 +18,7 @@ const PaymentDetailsContent = ({
|
|
|
18
18
|
total,
|
|
19
19
|
themeValues
|
|
20
20
|
}) => (
|
|
21
|
-
<Stack>
|
|
21
|
+
<Stack childGap="16px">
|
|
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="4px 0" />
|
|
103
103
|
<LabeledAmount
|
|
104
104
|
key={fee.label}
|
|
105
105
|
variant={themeValues.labeledAmountSubtotal}
|
|
@@ -108,8 +108,10 @@ const PaymentDetails = ({
|
|
|
108
108
|
</Fragment>
|
|
109
109
|
));
|
|
110
110
|
const content = isCollapsible ? (
|
|
111
|
-
<Stack>
|
|
111
|
+
<Stack childGap="0">
|
|
112
|
+
<Box padding="4.5px" />
|
|
112
113
|
<SolidDivider />
|
|
114
|
+
<Box padding="8px" />
|
|
113
115
|
<PaymentDetailsContent
|
|
114
116
|
{...{ lineItemElems, feeElems, subtotal, total, themeValues }}
|
|
115
117
|
/>
|
|
@@ -127,7 +129,9 @@ const PaymentDetails = ({
|
|
|
127
129
|
<Heading variant="h5" weight="700" as="h1">
|
|
128
130
|
{titleText}
|
|
129
131
|
</Heading>
|
|
130
|
-
|
|
132
|
+
<Heading variant="h5" weight="700" as="h1">
|
|
133
|
+
{displayCurrency(total)}
|
|
134
|
+
</Heading>
|
|
131
135
|
</Cluster>
|
|
132
136
|
</Box>
|
|
133
137
|
) : (
|
|
@@ -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
|
}) => {
|
|
@@ -44,7 +44,7 @@ const SidebarSingleContent = ({
|
|
|
44
44
|
<Sidebar
|
|
45
45
|
width={sidebarTargetWidth}
|
|
46
46
|
childGap={sidebarContentGap}
|
|
47
|
-
|
|
47
|
+
sidebarOnRight={sidebarOnRight}
|
|
48
48
|
contentMinWidth={mainContentMinWidth}
|
|
49
49
|
>
|
|
50
50
|
{sidebarOnRight ? <Fragment /> : sidebarContent}
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|