@thecb/components 8.0.3-beta.3 → 8.0.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 +120 -95
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +120 -95
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card/Card.js +5 -5
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +21 -8
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.theme.js +8 -0
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +2 -4
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- /package/src/components/atoms/icons/{ExternalLinkicon.js → ExternalLinkIcon.js} +0 -0
package/package.json
CHANGED
|
@@ -34,10 +34,6 @@ const Card = ({
|
|
|
34
34
|
width = "276px",
|
|
35
35
|
children
|
|
36
36
|
}) => {
|
|
37
|
-
console.log(
|
|
38
|
-
"themeValues.imageBackgroundColor",
|
|
39
|
-
themeValues.imageBackgroundColor
|
|
40
|
-
);
|
|
41
37
|
const hasImage = Image || imgSrc;
|
|
42
38
|
const numberOfChildren =
|
|
43
39
|
(Array.isArray(children) ? children.length : 1) +
|
|
@@ -70,7 +66,11 @@ const Card = ({
|
|
|
70
66
|
)}
|
|
71
67
|
<Stack direction="row" childGap="0">
|
|
72
68
|
{Image && !imgSrc && (
|
|
73
|
-
<Box
|
|
69
|
+
<Box
|
|
70
|
+
minHeight={imgHeight}
|
|
71
|
+
padding="0"
|
|
72
|
+
background={themeValues.imageBackgroundColor}
|
|
73
|
+
>
|
|
74
74
|
<Cover minHeight={imgHeight} singleChild>
|
|
75
75
|
<Center intrinsic>
|
|
76
76
|
<Image alt={imgAltText} />
|
|
@@ -2,8 +2,9 @@ import React from "react";
|
|
|
2
2
|
import { Cluster } from "../../atoms/layouts";
|
|
3
3
|
import Text from "../text";
|
|
4
4
|
import styled from "styled-components";
|
|
5
|
-
import { colors } from "../../../constants";
|
|
6
5
|
import { noop } from "../../../util/general";
|
|
6
|
+
import { themeComponent } from "../../../util/themeUtils";
|
|
7
|
+
import { fallbackValues } from "./RadioButtonWithLabel.theme";
|
|
7
8
|
|
|
8
9
|
const HiddenRadioInput = styled.input`
|
|
9
10
|
// can still select the element with the keyboard, but it's invisible and doesn't interfere with the spacing of other elements around it
|
|
@@ -18,7 +19,7 @@ const Circle = styled.div`
|
|
|
18
19
|
margin-right: 8px;
|
|
19
20
|
width: 1.5rem;
|
|
20
21
|
height 1.5rem;
|
|
21
|
-
border: 1px solid ${
|
|
22
|
+
border: ${({ inactiveBorderColor }) => `1px solid ${inactiveBorderColor}`};
|
|
22
23
|
border-radius: 50%;
|
|
23
24
|
box-sizing: border-box;
|
|
24
25
|
padding: 2px;
|
|
@@ -27,7 +28,7 @@ const Circle = styled.div`
|
|
|
27
28
|
width: 100%;
|
|
28
29
|
height: 100%;
|
|
29
30
|
display: block;
|
|
30
|
-
background: ${
|
|
31
|
+
background: ${({ activeColor }) => activeColor};
|
|
31
32
|
border-radius: 50%;
|
|
32
33
|
transform: scale(0);
|
|
33
34
|
}
|
|
@@ -40,10 +41,10 @@ const InputAndLabelContainer = styled(Cluster)`
|
|
|
40
41
|
transition: transform 0.15s;
|
|
41
42
|
}
|
|
42
43
|
${HiddenRadioInput}:checked + label ${Circle} {
|
|
43
|
-
border: 1px solid ${
|
|
44
|
+
border: ${({ activeColor }) => `1px solid ${activeColor};`}
|
|
44
45
|
}
|
|
45
46
|
${HiddenRadioInput}:focus + label ${Circle} { {
|
|
46
|
-
box-shadow: 0px 0px 2px 1px ${
|
|
47
|
+
box-shadow: ${({ activeColor }) => `0px 0px 2px 1px ${activeColor};`}
|
|
47
48
|
}
|
|
48
49
|
`;
|
|
49
50
|
|
|
@@ -54,10 +55,15 @@ const RadioButtonWithLabel = ({
|
|
|
54
55
|
groupName,
|
|
55
56
|
setValue,
|
|
56
57
|
ariaInvalid,
|
|
58
|
+
themeValues,
|
|
57
59
|
index,
|
|
58
60
|
handleChange = noop // optional, for custom event handling in ingesting app
|
|
59
61
|
}) => (
|
|
60
|
-
<InputAndLabelContainer
|
|
62
|
+
<InputAndLabelContainer
|
|
63
|
+
align="center"
|
|
64
|
+
childGap="0.5rem"
|
|
65
|
+
activeColor={themeValues.activeColor}
|
|
66
|
+
>
|
|
61
67
|
<HiddenRadioInput
|
|
62
68
|
aria-invalid={ariaInvalid}
|
|
63
69
|
style={{ marginTop: 0 }}
|
|
@@ -83,10 +89,17 @@ const RadioButtonWithLabel = ({
|
|
|
83
89
|
}
|
|
84
90
|
`}
|
|
85
91
|
>
|
|
86
|
-
<Circle
|
|
92
|
+
<Circle
|
|
93
|
+
activeColor={themeValues.activeColor}
|
|
94
|
+
inactiveBorderColor={themeValues.inactiveBorderColor}
|
|
95
|
+
/>
|
|
87
96
|
{labelText}
|
|
88
97
|
</Text>
|
|
89
98
|
</InputAndLabelContainer>
|
|
90
99
|
);
|
|
91
100
|
|
|
92
|
-
export default
|
|
101
|
+
export default themeComponent(
|
|
102
|
+
RadioButtonWithLabel,
|
|
103
|
+
"RadioButtonWithLabel",
|
|
104
|
+
fallbackValues
|
|
105
|
+
);
|
|
@@ -39,7 +39,7 @@ const AutopayModal = ({
|
|
|
39
39
|
? "checking account payment method"
|
|
40
40
|
: "payment method";
|
|
41
41
|
|
|
42
|
-
return `To setup ${planText} you must have a saved ${methodRequired} and address
|
|
42
|
+
return `To setup ${planText} you must have a saved ${methodRequired} and address. Do you want to save these now?`;
|
|
43
43
|
};
|
|
44
44
|
const plan = isPaymentPlan ? "your payment plan" : "autopay";
|
|
45
45
|
const shortPlan = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
@@ -57,9 +57,7 @@ const AutopayModal = ({
|
|
|
57
57
|
: ""
|
|
58
58
|
}`
|
|
59
59
|
: generateMethodNeededText(plan, allowedPaymentInstruments),
|
|
60
|
-
continueButtonText: autoPayActive
|
|
61
|
-
? `Disable ${shortPlan}`
|
|
62
|
-
: "Add to Profile",
|
|
60
|
+
continueButtonText: autoPayActive ? `Disable ${shortPlan}` : "Add",
|
|
63
61
|
useDangerButton: autoPayActive,
|
|
64
62
|
continueAction: autoPayActive
|
|
65
63
|
? () => {
|
|
@@ -35,7 +35,7 @@ const RemoveAccountModalModule = ({
|
|
|
35
35
|
hideModal={() => setModalIsOpen(false)}
|
|
36
36
|
modalOpen={modalIsOpen}
|
|
37
37
|
modalHeaderText={`Remove ${accountType}`}
|
|
38
|
-
modalBodyText={`Are you sure you want to remove the ${identifier} ${accounts}
|
|
38
|
+
modalBodyText={`Are you sure you want to remove the ${identifier} ${accounts}? Any autopay scheduled against ${
|
|
39
39
|
obligations.length > 1 ? "them" : "it"
|
|
40
40
|
} will be deactivated.`}
|
|
41
41
|
continueButtonText="Remove"
|