@thecb/components 10.2.0 → 10.4.0-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 +2967 -2970
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2967 -2970
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.js +5 -7
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +1 -4
- package/src/components/atoms/button-with-link/ButtonWithLink.js +1 -5
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/layouts/Box.styled.js +0 -15
- package/src/components/molecules/obligation/Obligation.js +4 -1
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +5 -4
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -68,7 +68,6 @@ const ButtonWithAction = forwardRef(
|
|
|
68
68
|
text,
|
|
69
69
|
textWrap = false,
|
|
70
70
|
isLoading = false,
|
|
71
|
-
disabled = false,
|
|
72
71
|
loadingColor = "white",
|
|
73
72
|
dataQa = null,
|
|
74
73
|
textExtraStyles,
|
|
@@ -115,8 +114,8 @@ const ButtonWithAction = forwardRef(
|
|
|
115
114
|
color: #FFFFFF;
|
|
116
115
|
cursor: default;
|
|
117
116
|
&:focus {
|
|
118
|
-
|
|
119
|
-
outline
|
|
117
|
+
box-shadow: 0 0 10px #6D717E;
|
|
118
|
+
outline: none;
|
|
120
119
|
}
|
|
121
120
|
${extraDisabledStyles}
|
|
122
121
|
`;
|
|
@@ -130,12 +129,11 @@ const ButtonWithAction = forwardRef(
|
|
|
130
129
|
minWidth={themeValues.minWidth}
|
|
131
130
|
background={themeValues.backgroundColor}
|
|
132
131
|
border={themeValues.border}
|
|
133
|
-
hoverStyles={
|
|
134
|
-
activeStyles={
|
|
132
|
+
hoverStyles={hoverStyles}
|
|
133
|
+
activeStyles={activeStyles}
|
|
135
134
|
disabledStyles={disabledStyles}
|
|
136
|
-
aria-disabled={disabled}
|
|
137
135
|
as="button"
|
|
138
|
-
onClick={isLoading
|
|
136
|
+
onClick={isLoading ? undefined : action}
|
|
139
137
|
borderRadius="2px"
|
|
140
138
|
theme={themeContext}
|
|
141
139
|
extraStyles={`margin: 0.5rem; ${extraStyles}`}
|
|
@@ -18,15 +18,12 @@ const variants = {
|
|
|
18
18
|
const defaultValue = "primary";
|
|
19
19
|
const groupId = "props";
|
|
20
20
|
|
|
21
|
-
const buttonHandler = () => console.log("Button selected");
|
|
22
|
-
|
|
23
21
|
export const buttonWithAction = () => (
|
|
24
22
|
<ButtonWithAction
|
|
25
23
|
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
26
24
|
text={text("text", "button", "props")}
|
|
27
25
|
isLoading={boolean("isLoading", false, "props")}
|
|
28
|
-
action={text("action",
|
|
29
|
-
disabled={boolean("disabled", false, "props")}
|
|
26
|
+
action={text("action", undefined, "props")}
|
|
30
27
|
/>
|
|
31
28
|
);
|
|
32
29
|
|
|
@@ -57,11 +57,7 @@ const ButtonWithLink = ({
|
|
|
57
57
|
text-decoration: none; }`}
|
|
58
58
|
dataQa={dataQa}
|
|
59
59
|
>
|
|
60
|
-
<ButtonWithAction
|
|
61
|
-
{...otherProps}
|
|
62
|
-
disabled={disabled}
|
|
63
|
-
extraStyles={extraStyles}
|
|
64
|
-
/>
|
|
60
|
+
<ButtonWithAction {...otherProps} extraStyles={extraStyles} />
|
|
65
61
|
</ButtonWithLinkWrapper>
|
|
66
62
|
);
|
|
67
63
|
};
|
|
Binary file
|
|
@@ -107,21 +107,6 @@ export const BoxWrapper = styled(
|
|
|
107
107
|
: ``}
|
|
108
108
|
`}
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
&[aria-disabled="true"] {
|
|
112
|
-
${({ disabledStyles, as }) =>
|
|
113
|
-
css`
|
|
114
|
-
${disabledStyles}
|
|
115
|
-
${as === "button"
|
|
116
|
-
? ` > * > span {
|
|
117
|
-
${disabledStyles}
|
|
118
|
-
border: none;
|
|
119
|
-
outline: none;
|
|
120
|
-
box-shadow: none;
|
|
121
|
-
}`
|
|
122
|
-
: ``}
|
|
123
|
-
`}
|
|
124
|
-
}
|
|
125
110
|
|
|
126
111
|
& * {
|
|
127
112
|
color: ${({ color }) => color};
|
|
@@ -36,7 +36,8 @@ const Obligation = ({
|
|
|
36
36
|
inactive = false,
|
|
37
37
|
inactiveLookupTitle = "",
|
|
38
38
|
inactiveLookupInput = "Account",
|
|
39
|
-
inactiveLookupValue = ""
|
|
39
|
+
inactiveLookupValue = "",
|
|
40
|
+
isInCustomerManagement = false
|
|
40
41
|
}) => {
|
|
41
42
|
/*
|
|
42
43
|
The value of obligations is always an array. It can contain:
|
|
@@ -137,6 +138,7 @@ const Obligation = ({
|
|
|
137
138
|
description={description}
|
|
138
139
|
subDescription={subDescription}
|
|
139
140
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
141
|
+
isInCustomerManagement={isInCustomerManagement}
|
|
140
142
|
/>
|
|
141
143
|
)}
|
|
142
144
|
</Stack>
|
|
@@ -160,6 +162,7 @@ const Obligation = ({
|
|
|
160
162
|
description={description}
|
|
161
163
|
subDescription={subDescription}
|
|
162
164
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
165
|
+
isInCustomerManagement={isInCustomerManagement}
|
|
163
166
|
/>
|
|
164
167
|
)}
|
|
165
168
|
</Box>
|
|
@@ -23,7 +23,8 @@ const PaymentDetailsActions = ({
|
|
|
23
23
|
dueDate,
|
|
24
24
|
description,
|
|
25
25
|
subDescription,
|
|
26
|
-
allowedPaymentInstruments
|
|
26
|
+
allowedPaymentInstruments,
|
|
27
|
+
isInCustomerManagement = false
|
|
27
28
|
}) => {
|
|
28
29
|
const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
29
30
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -109,7 +110,7 @@ const PaymentDetailsActions = ({
|
|
|
109
110
|
padding={isMobile ? "0 8px 0 0" : "0"}
|
|
110
111
|
extraStyles={isMobile && `flex-grow: 1;`}
|
|
111
112
|
>
|
|
112
|
-
{autoPayAvailable && !autoPayEnabled ? (
|
|
113
|
+
{autoPayAvailable && !autoPayEnabled && !isInCustomerManagement ? (
|
|
113
114
|
<ButtonWithAction
|
|
114
115
|
variant="tertiary"
|
|
115
116
|
text={`Set Up ${planType}`}
|
|
@@ -140,7 +141,7 @@ const PaymentDetailsActions = ({
|
|
|
140
141
|
/>
|
|
141
142
|
)}
|
|
142
143
|
</Box>
|
|
143
|
-
{!isMobile && (
|
|
144
|
+
{!isMobile && !isInCustomerManagement && (
|
|
144
145
|
<Box padding={"0"}>
|
|
145
146
|
<ButtonWithAction
|
|
146
147
|
isLoading={isLoading}
|
|
@@ -152,7 +153,7 @@ const PaymentDetailsActions = ({
|
|
|
152
153
|
</Box>
|
|
153
154
|
)}
|
|
154
155
|
</Cluster>
|
|
155
|
-
{isMobile && (
|
|
156
|
+
{isMobile && !isInCustomerManagement && (
|
|
156
157
|
<Box padding="8px 0 0" width="100%">
|
|
157
158
|
<ButtonWithAction
|
|
158
159
|
isLoading={isLoading}
|