@thecb/components 11.10.4-beta.0 → 11.10.4-beta.2
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 +20 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -25
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormInput.js +9 -16
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.js +2 -2
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.theme.js +2 -2
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +2 -2
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.theme.js +2 -2
- package/src/components/molecules/editable-list/EditableList.js +3 -0
- package/src/util/formats.js +3 -6
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { fallbackValues } from "./FormLayouts.theme.js";
|
|
|
5
5
|
import { themeComponent } from "../../../util/themeUtils";
|
|
6
6
|
import { createIdFromString } from "../../../util/general.js";
|
|
7
7
|
import Text from "../text";
|
|
8
|
+
import ButtonWithAction from "../button-with-action";
|
|
8
9
|
import { Box, Cluster, Stack } from "../layouts";
|
|
9
10
|
import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
|
|
10
11
|
import { ERROR_COLOR, ROYAL_BLUE } from "../../../constants/colors";
|
|
@@ -171,7 +172,7 @@ const FormInput = ({
|
|
|
171
172
|
</Cluster>
|
|
172
173
|
) : (
|
|
173
174
|
<Box padding="0" minWidth="100%">
|
|
174
|
-
<Cluster justify="space-between" align="center">
|
|
175
|
+
<Cluster justify="space-between" align="center" overflow>
|
|
175
176
|
{labelDisplayOverride ? (
|
|
176
177
|
labelDisplayOverride
|
|
177
178
|
) : (
|
|
@@ -191,22 +192,14 @@ const FormInput = ({
|
|
|
191
192
|
</Text>
|
|
192
193
|
)}
|
|
193
194
|
{type === "password" && (
|
|
194
|
-
<
|
|
195
|
-
variant=
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
hoverStyles={themeValues.hoverFocusStyles}
|
|
199
|
-
extraStyles={`text-decoration: underline; cursor: pointer; &:focus { outline-offset: -2px; }`}
|
|
200
|
-
onClick={() => setShowPassword(!showPassword)}
|
|
201
|
-
tabIndex="0"
|
|
195
|
+
<ButtonWithAction
|
|
196
|
+
variant="smallGhost"
|
|
197
|
+
text={showPassword ? "Hide" : "Show"}
|
|
198
|
+
action={() => setShowPassword(!showPassword)}
|
|
202
199
|
aria-label={showPassword ? "Hide Password" : "Show password"}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
>
|
|
208
|
-
{showPassword ? "Hide" : "Show"}
|
|
209
|
-
</Text>
|
|
200
|
+
extraStyles={`margin: 0; min-width: auto;`}
|
|
201
|
+
textExtraStyles={`color: ${themeValues.linkColor};`}
|
|
202
|
+
/>
|
|
210
203
|
)}
|
|
211
204
|
{isMobile && decorator && (
|
|
212
205
|
<Box padding="0 0 0 auto">{decorator}</Box>
|
|
@@ -50,8 +50,8 @@ const FormattedBankAccount = ({
|
|
|
50
50
|
<Text
|
|
51
51
|
variant="p"
|
|
52
52
|
color={themeValues.autopayTextColor}
|
|
53
|
-
extraStyles={`font-style: italic
|
|
54
|
-
>{`Autopay
|
|
53
|
+
extraStyles={`font-style: italic;`}
|
|
54
|
+
>{`Autopay Enabled`}</Text>
|
|
55
55
|
)}
|
|
56
56
|
</Stack>
|
|
57
57
|
</BankItemWrapper>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CHARADE_GREY,
|
|
1
|
+
import { CHARADE_GREY, REGENT_GREY } from "../../../constants/colors";
|
|
2
2
|
|
|
3
3
|
const textColor = `${CHARADE_GREY}`;
|
|
4
|
-
const autopayTextColor = `${
|
|
4
|
+
const autopayTextColor = `${REGENT_GREY}`;
|
|
5
5
|
|
|
6
6
|
export const fallbackValues = {
|
|
7
7
|
textColor,
|
|
@@ -55,8 +55,8 @@ const FormattedCreditCard = ({
|
|
|
55
55
|
<Text
|
|
56
56
|
variant="p"
|
|
57
57
|
color={themeValues.autopayTextColor}
|
|
58
|
-
extraStyles={`font-style: italic
|
|
59
|
-
>{`Autopay
|
|
58
|
+
extraStyles={`font-style: italic;`}
|
|
59
|
+
>{`Autopay Enabled`}</Text>
|
|
60
60
|
)}
|
|
61
61
|
</Stack>
|
|
62
62
|
</CreditCardWrapper>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CHARADE_GREY,
|
|
1
|
+
import { CHARADE_GREY, REGENT_GREY } from "../../../constants/colors";
|
|
2
2
|
|
|
3
3
|
const textColor = `${CHARADE_GREY}`;
|
|
4
|
-
const autopayTextColor = `${
|
|
4
|
+
const autopayTextColor = `${REGENT_GREY}`;
|
|
5
5
|
|
|
6
6
|
export const fallbackValues = {
|
|
7
7
|
textColor,
|
|
@@ -23,6 +23,7 @@ const EditableList = ({
|
|
|
23
23
|
titleWeight = "400",
|
|
24
24
|
canAdd = true,
|
|
25
25
|
addItem,
|
|
26
|
+
addItemDestination,
|
|
26
27
|
removeItem,
|
|
27
28
|
editItem,
|
|
28
29
|
itemName,
|
|
@@ -168,6 +169,8 @@ const EditableList = ({
|
|
|
168
169
|
<Box padding={items.length === 0 ? "0" : "1rem 0 0"}>
|
|
169
170
|
<Placeholder
|
|
170
171
|
text={addText}
|
|
172
|
+
isLink={!!addItemDestination}
|
|
173
|
+
destination={addItemDestination}
|
|
171
174
|
action={addItem}
|
|
172
175
|
dataQa={"Add " + qaPrefix}
|
|
173
176
|
aria-label={addText}
|
package/src/util/formats.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { createFormat } from "formatted-input";
|
|
3
3
|
import Text from "../components/atoms/text";
|
|
4
|
-
import { ASH_GREY, FIRE_YELLOW
|
|
4
|
+
import { ASH_GREY, FIRE_YELLOW } from "../constants/colors";
|
|
5
5
|
export const formatDelimiter = "_";
|
|
6
6
|
|
|
7
7
|
export const phoneFormats = [
|
|
@@ -101,8 +101,7 @@ export const renderCardStatus = (
|
|
|
101
101
|
<Text
|
|
102
102
|
as={as}
|
|
103
103
|
variant="pXS"
|
|
104
|
-
|
|
105
|
-
color={STORM_GREY}
|
|
104
|
+
color={ASH_GREY}
|
|
106
105
|
extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
|
|
107
106
|
>
|
|
108
107
|
Exp Date {expireDate}
|
|
@@ -113,7 +112,6 @@ export const renderCardStatus = (
|
|
|
113
112
|
<Text
|
|
114
113
|
as={as}
|
|
115
114
|
variant="pXS"
|
|
116
|
-
fontSize=".75rem"
|
|
117
115
|
color={FIRE_YELLOW}
|
|
118
116
|
extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
|
|
119
117
|
>
|
|
@@ -125,8 +123,7 @@ export const renderCardStatus = (
|
|
|
125
123
|
<Text
|
|
126
124
|
as={as}
|
|
127
125
|
variant="pXS"
|
|
128
|
-
|
|
129
|
-
color={STORM_GREY}
|
|
126
|
+
color={ASH_GREY}
|
|
130
127
|
extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
|
|
131
128
|
>
|
|
132
129
|
Expired
|