@thecb/components 10.4.3-beta.0 → 10.4.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 +20 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -17
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/IconAdd.js +9 -3
- package/src/components/atoms/placeholder/Placeholder.js +5 -5
- package/src/components/atoms/placeholder/Placeholder.stories.js +2 -1
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +50 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const IconAdd = () => (
|
|
3
|
+
const IconAdd = ({ strokeWidth = 1 }) => (
|
|
4
4
|
<svg
|
|
5
5
|
xmlns="http://www.w3.org/2000/svg"
|
|
6
6
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -15,7 +15,7 @@ const IconAdd = () => (
|
|
|
15
15
|
d="M7.91666623 4.78508747L4.78508747 4.78508747 4.78508747 7.91666623 3.74122788 7.91666623 3.74122788 4.78508747 0.609649123 4.78508747 0.609649123 3.74122788 3.74122788 3.74122788 3.74122788 0.609649123 4.78508747 0.609649123 4.78508747 3.74122788 7.91666623 3.74122788z"
|
|
16
16
|
></path>
|
|
17
17
|
</defs>
|
|
18
|
-
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth=
|
|
18
|
+
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth={strokeWidth}>
|
|
19
19
|
<g transform="translate(-407 -563)">
|
|
20
20
|
<g transform="translate(408 562)">
|
|
21
21
|
<g transform="translate(0 2)">
|
|
@@ -25,7 +25,13 @@ const IconAdd = () => (
|
|
|
25
25
|
</mask>
|
|
26
26
|
<use className="fill" xlinkHref="#path-1"></use>
|
|
27
27
|
</g>
|
|
28
|
-
<circle
|
|
28
|
+
<circle
|
|
29
|
+
className="stroke"
|
|
30
|
+
strokeWidth={strokeWidth}
|
|
31
|
+
cx="8.155"
|
|
32
|
+
cy="8.072"
|
|
33
|
+
r="8"
|
|
34
|
+
></circle>
|
|
29
35
|
</g>
|
|
30
36
|
</g>
|
|
31
37
|
</g>
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
IconAdd,
|
|
17
17
|
PaymentMethodAddIcon
|
|
18
18
|
} from "../icons";
|
|
19
|
-
import {
|
|
19
|
+
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
20
20
|
|
|
21
21
|
const getLargeIcon = iconName => {
|
|
22
22
|
switch (iconName) {
|
|
@@ -123,7 +123,7 @@ const Placeholder = ({
|
|
|
123
123
|
stroke: ${
|
|
124
124
|
variant === "large" ? CHARADE_GREY : themeValues.color
|
|
125
125
|
};
|
|
126
|
-
}`}
|
|
126
|
+
} `}
|
|
127
127
|
>
|
|
128
128
|
{variant === "large" ? (
|
|
129
129
|
<Center intrinsic>
|
|
@@ -131,7 +131,7 @@ const Placeholder = ({
|
|
|
131
131
|
<Text
|
|
132
132
|
variant="pS"
|
|
133
133
|
color={themeValues.color}
|
|
134
|
-
weight={
|
|
134
|
+
weight={FONT_WEIGHT_SEMIBOLD}
|
|
135
135
|
extraStyles={`text-align: center;`}
|
|
136
136
|
>
|
|
137
137
|
{text}
|
|
@@ -140,12 +140,12 @@ const Placeholder = ({
|
|
|
140
140
|
) : (
|
|
141
141
|
<Cover singleChild minHeight="100%">
|
|
142
142
|
<Cluster justify="center" align="center">
|
|
143
|
-
<IconAdd />
|
|
143
|
+
<IconAdd strokeWidth="2" />
|
|
144
144
|
<Center intrinsic>
|
|
145
145
|
<Text
|
|
146
146
|
variant="pS"
|
|
147
147
|
color={themeValues.color}
|
|
148
|
-
weight={
|
|
148
|
+
weight={FONT_WEIGHT_SEMIBOLD}
|
|
149
149
|
extraStyles={`padding: 0 0 0 8px; text-align: center;`}
|
|
150
150
|
>
|
|
151
151
|
{text}
|
|
@@ -3,6 +3,7 @@ import Modal from "../modal";
|
|
|
3
3
|
import Text from "../../atoms/text";
|
|
4
4
|
import Paragraph from "../../atoms/paragraph";
|
|
5
5
|
import { Box, Stack, Center } from "../../atoms/layouts";
|
|
6
|
+
import ButtonWithAction from "../../atoms/button-with-action/ButtonWithAction";
|
|
6
7
|
import { fallbackValues } from "./AccountAndRoutingModal.theme";
|
|
7
8
|
import { themeComponent } from "../../../util/themeUtils";
|
|
8
9
|
import { AccountNumberImage, RoutingNumberImage } from "../../atoms/icons";
|
|
@@ -18,57 +19,56 @@ const AccountAndRoutingModal = ({
|
|
|
18
19
|
imageType,
|
|
19
20
|
themeValues,
|
|
20
21
|
dataQa = null
|
|
21
|
-
}) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<Text
|
|
56
|
-
variant="pS"
|
|
57
|
-
onClick={() => toggleOpen(true)}
|
|
58
|
-
onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
|
|
59
|
-
tabIndex="0"
|
|
60
|
-
color={themeValues.linkColor}
|
|
61
|
-
weight={themeValues.fontWeight}
|
|
62
|
-
hoverStyles={themeValues.modalLinkHoverFocus}
|
|
63
|
-
textDecoration={themeValues.linkTextDecoration}
|
|
64
|
-
extraStyles={`cursor: pointer;`}
|
|
65
|
-
role="button"
|
|
66
|
-
className="modal-trigger"
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<Modal
|
|
25
|
+
modalOpen={isOpen}
|
|
26
|
+
hideModal={() => toggleOpen(false)}
|
|
27
|
+
showModal={() => toggleOpen(true)}
|
|
28
|
+
modalHeaderText={title}
|
|
29
|
+
dataQa={dataQa}
|
|
30
|
+
modalBodyText={
|
|
31
|
+
<Box extraStyles="overflow: scroll; max-height: 20rem;">
|
|
32
|
+
<Stack>
|
|
33
|
+
<Paragraph variant="p">{content}</Paragraph>
|
|
34
|
+
{imageType === "Account" ? (
|
|
35
|
+
<Center intrinsic>
|
|
36
|
+
<AccountNumberImage />
|
|
37
|
+
</Center>
|
|
38
|
+
) : imageType === "Routing" ? (
|
|
39
|
+
<Center intrinsic>
|
|
40
|
+
<RoutingNumberImage />
|
|
41
|
+
</Center>
|
|
42
|
+
) : (
|
|
43
|
+
<Fragment />
|
|
44
|
+
)}
|
|
45
|
+
</Stack>
|
|
46
|
+
</Box>
|
|
47
|
+
}
|
|
48
|
+
defaultWrapper={false}
|
|
49
|
+
onlyCloseButton={!acceptText}
|
|
50
|
+
continueButtonText={acceptText}
|
|
51
|
+
continueAction={() => {
|
|
52
|
+
toggleAccepted(true);
|
|
53
|
+
toggleOpen(false);
|
|
54
|
+
}}
|
|
55
|
+
initialFocusSelector={"[name='Close']"}
|
|
67
56
|
>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
)
|
|
57
|
+
<ButtonWithAction
|
|
58
|
+
variant="ghost"
|
|
59
|
+
tabIndex="0"
|
|
60
|
+
onClick={() => toggleOpen(true)}
|
|
61
|
+
onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
|
|
62
|
+
extraStyles="min-width: 0; min-height: 0;margin: 0; padding: 0; text-transform: none;"
|
|
63
|
+
text={
|
|
64
|
+
<Text variant="pS" color="inherit">
|
|
65
|
+
{link}
|
|
66
|
+
</Text>
|
|
67
|
+
}
|
|
68
|
+
/>
|
|
69
|
+
</Modal>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
72
|
|
|
73
73
|
export default themeComponent(
|
|
74
74
|
AccountAndRoutingModal,
|