@thecb/components 5.9.0-beta.5 → 5.9.1
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 +1344 -407
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1391 -453
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -4
- package/src/components/atoms/add-obligation/AddObligation.js +1 -3
- package/src/components/atoms/amount-callout/AmountCallout.theme.js +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +0 -2
- package/src/components/atoms/icons/AutopayOnIcon.js +10 -4
- package/src/components/atoms/layouts/Box.styled.js +5 -3
- package/src/components/atoms/layouts/Cluster.js +1 -1
- package/src/components/atoms/layouts/Cluster.styled.js +1 -1
- package/src/components/atoms/text/Text.js +0 -2
- package/src/components/atoms/text/Text.styled.js +0 -1
- package/src/components/molecules/obligation/Obligation.js +16 -46
- package/src/components/molecules/obligation/modules/AmountModule.js +0 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +47 -80
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +10 -20
- package/src/components/molecules/obligation/modules/InactiveTitleModule.js +2 -2
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +10 -9
- package/src/components/molecules/obligation/modules/index.js +1 -3
- package/src/components/molecules/tab-sidebar/TabSidebar.js +2 -3
- package/src/components/templates/center-single/CenterSingle.js +1 -2
- package/src/components/templates/center-stack/CenterStack.js +1 -2
- package/src/components/templates/default-page-template/DefaultPageTemplate.js +1 -2
- package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +1 -2
- package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -2
- package/src/components/templates/templates.theme.js +1 -1
- package/src/constants/colors.js +8 -10
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +0 -62
- package/src/deprecated/.DS_Store +0 -0
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "../templates.theme";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import withWindowResize from "../../withWindowSize";
|
|
6
6
|
import { Box, Center, Cover } from "../../atoms/layouts";
|
|
7
|
-
import { COOL_GREY_05 } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
const CenterSingle = ({
|
|
10
9
|
header,
|
|
@@ -24,7 +23,7 @@ const CenterSingle = ({
|
|
|
24
23
|
<Box
|
|
25
24
|
padding="0"
|
|
26
25
|
minWidth="100%"
|
|
27
|
-
background={
|
|
26
|
+
background={themeValues.pageBackground}
|
|
28
27
|
extraStyles="flex-grow: 1;"
|
|
29
28
|
>
|
|
30
29
|
<Cover centerOverride={isMobile && !centeredMobileContent}>
|
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "../templates.theme";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import withWindowResize from "../../withWindowSize";
|
|
6
6
|
import { Box, Center, Cover, Stack } from "../../atoms/layouts";
|
|
7
|
-
import { COOL_GREY_05 } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
const CenterStack = ({
|
|
10
9
|
header,
|
|
@@ -24,7 +23,7 @@ const CenterStack = ({
|
|
|
24
23
|
<Box
|
|
25
24
|
padding="0"
|
|
26
25
|
minWidth="100%"
|
|
27
|
-
background={
|
|
26
|
+
background={themeValues.pageBackground}
|
|
28
27
|
extraStyles="flex-grow: 1;"
|
|
29
28
|
>
|
|
30
29
|
<Cover>
|
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "../templates.theme";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import withWindowResize from "../../withWindowSize";
|
|
6
6
|
import { Box, Center, Cover } from "../../atoms/layouts";
|
|
7
|
-
import { COOL_GREY_05 } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
const CenterSingle = ({
|
|
10
9
|
header,
|
|
@@ -23,7 +22,7 @@ const CenterSingle = ({
|
|
|
23
22
|
<Box
|
|
24
23
|
padding="0"
|
|
25
24
|
minWidth="100%"
|
|
26
|
-
background={
|
|
25
|
+
background={themeValues.pageBackground}
|
|
27
26
|
extraStyles="flex-grow: 1;"
|
|
28
27
|
>
|
|
29
28
|
<Cover childGap="0" fillCenter>
|
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "../templates.theme";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import withWindowResize from "../../withWindowSize";
|
|
6
6
|
import { Box, Center, Cover, Sidebar } from "../../atoms/layouts";
|
|
7
|
-
import { COOL_GREY_05 } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
const SidebarSingleContent = ({
|
|
10
9
|
header,
|
|
@@ -29,7 +28,7 @@ const SidebarSingleContent = ({
|
|
|
29
28
|
<Box
|
|
30
29
|
padding="0"
|
|
31
30
|
minWidth="100%"
|
|
32
|
-
background={
|
|
31
|
+
background={themeValues.pageBackground}
|
|
33
32
|
extraStyles="flex-grow: 1;"
|
|
34
33
|
>
|
|
35
34
|
<Cover centerOverride={!sidebarVerticalCenter}>
|
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "../templates.theme";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import withWindowResize from "../../withWindowSize";
|
|
6
6
|
import { Box, Center, Cover, Sidebar, Stack } from "../../atoms/layouts";
|
|
7
|
-
import { COOL_GREY_05 } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
const SidebarStackContent = ({
|
|
10
9
|
header,
|
|
@@ -30,7 +29,7 @@ const SidebarStackContent = ({
|
|
|
30
29
|
<Box
|
|
31
30
|
padding="0"
|
|
32
31
|
minWidth="100%"
|
|
33
|
-
background={
|
|
32
|
+
background={themeValues.pageBackground}
|
|
34
33
|
key="page-bg"
|
|
35
34
|
extraStyles="flex-grow: 1;"
|
|
36
35
|
>
|
package/src/constants/colors.js
CHANGED
|
@@ -15,26 +15,25 @@ const AQUA_HAZE_WHITE = "#F7F9FA";
|
|
|
15
15
|
const BLEACH_WHITE = "#FEF4d7";
|
|
16
16
|
const CATSKILL_WHITE = "#EAF2F6";
|
|
17
17
|
// GREY
|
|
18
|
-
const ATHENS_GREY = "#F6F6F9";
|
|
18
|
+
const ATHENS_GREY = "#F6F6F9";
|
|
19
19
|
const ALTO_GREY = "#d1d1d1";
|
|
20
20
|
const SILVER_GREY = "#cdcdcd";
|
|
21
21
|
const PEWTER_GREY = "#DFE1E4";
|
|
22
22
|
const ASH_GREY = "#979797";
|
|
23
23
|
const IRON_GREY = "#d5d8dc";
|
|
24
|
-
const GHOST_GREY = "#CACED8";
|
|
24
|
+
const GHOST_GREY = "#CACED8";
|
|
25
25
|
const DUSTY_GREY = "#9B9B9B";
|
|
26
26
|
const REGENT_GREY = "#959EA7";
|
|
27
|
-
const STORM_GREY = "#6D717E";
|
|
27
|
+
const STORM_GREY = "#6D717E";
|
|
28
28
|
const TROUT_GREY = "#515660";
|
|
29
29
|
const MINESHAFT_GREY = "#333333";
|
|
30
30
|
const SOOT_GREY = "#999999";
|
|
31
31
|
const FIREFLY_GREY = "#091325";
|
|
32
|
-
const BRIGHT_GREY = "#3B414D";
|
|
33
|
-
const CHARADE_GREY = "#292A33";
|
|
34
|
-
const GRECIAN_GREY = "#E5E7EC";
|
|
32
|
+
const BRIGHT_GREY = "#3B414D";
|
|
33
|
+
const CHARADE_GREY = "#292A33";
|
|
34
|
+
const GRECIAN_GREY = "#E5E7EC";
|
|
35
35
|
const BLACK_SQUEEZE = "#EAF2F7";
|
|
36
|
-
const GREY_CHATEAU = "#959CA8";
|
|
37
|
-
const COOL_GREY_05 = "#fbfcfd"; // CBS-050
|
|
36
|
+
const GREY_CHATEAU = "#959CA8";
|
|
38
37
|
// BLUE
|
|
39
38
|
const CLOUDBURST_BLUE = "#26395c";
|
|
40
39
|
const ZODIAC_BLUE = "#14284b";
|
|
@@ -68,7 +67,7 @@ const MUSTARD_YELLOW = "#FFD459";
|
|
|
68
67
|
const FIRE_YELLOW = "#B34A00";
|
|
69
68
|
// ORANGE
|
|
70
69
|
const CARROT_ORANGE = "#ED9620";
|
|
71
|
-
const ZEST_ORANGE = "#
|
|
70
|
+
const ZEST_ORANGE = "#F47820";
|
|
72
71
|
const APRICOT_ORANGE = "#FFE8D8";
|
|
73
72
|
// RED
|
|
74
73
|
const RED = "#FF0000";
|
|
@@ -139,7 +138,6 @@ export {
|
|
|
139
138
|
BRIGHT_GREY,
|
|
140
139
|
CHARADE_GREY,
|
|
141
140
|
GRECIAN_GREY,
|
|
142
|
-
COOL_GREY_05,
|
|
143
141
|
BLACK_SQUEEZE,
|
|
144
142
|
GREY_CHATEAU,
|
|
145
143
|
CLOUDBURST_BLUE,
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import Modal from "../../modal";
|
|
3
|
-
import ButtonWithAction from "../../../atoms/button-with-action";
|
|
4
|
-
import { Box } from "../../../atoms/layouts";
|
|
5
|
-
|
|
6
|
-
const RemoveAccountModalModule = ({
|
|
7
|
-
agencyName,
|
|
8
|
-
obligations = [],
|
|
9
|
-
removeAccount,
|
|
10
|
-
accountType,
|
|
11
|
-
isMobile
|
|
12
|
-
}) => {
|
|
13
|
-
const [modalIsOpen, setModalIsOpen] = useState(false);
|
|
14
|
-
const lastItem = [...obligations].pop();
|
|
15
|
-
const accounts = obligations.length
|
|
16
|
-
? obligations.reduce((acc, curr) => {
|
|
17
|
-
const account = curr.details.description;
|
|
18
|
-
const formattedAccount =
|
|
19
|
-
curr !== lastItem ? `${account} and ` : `${account}`;
|
|
20
|
-
return formattedAccount === agencyName
|
|
21
|
-
? agencyName
|
|
22
|
-
: acc + formattedAccount;
|
|
23
|
-
}, `${agencyName} - `)
|
|
24
|
-
: "";
|
|
25
|
-
const identifier =
|
|
26
|
-
accountType === "Account" && obligations.length > 1
|
|
27
|
-
? "accounts"
|
|
28
|
-
: accountType === "Property" && obligations.length > 1
|
|
29
|
-
? "properties"
|
|
30
|
-
: accountType.toLowerCase();
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<Modal
|
|
34
|
-
showModal={() => setModalIsOpen(true)}
|
|
35
|
-
hideModal={() => setModalIsOpen(false)}
|
|
36
|
-
modalOpen={modalIsOpen}
|
|
37
|
-
modalHeaderText={`Remove ${accountType}`}
|
|
38
|
-
modalBodyText={`Are you sure you want to remove the ${identifier} ${accounts} from your profile? Any autopay scheduled against ${
|
|
39
|
-
obligations.length > 1 ? "them" : "it"
|
|
40
|
-
} will be deactivated.`}
|
|
41
|
-
continueButtonText="Remove"
|
|
42
|
-
continueAction={() => {
|
|
43
|
-
removeAccount();
|
|
44
|
-
setModalIsOpen(false);
|
|
45
|
-
}}
|
|
46
|
-
useDangerButton
|
|
47
|
-
>
|
|
48
|
-
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
49
|
-
<ButtonWithAction
|
|
50
|
-
text="Remove"
|
|
51
|
-
variant="secondary"
|
|
52
|
-
action={() => setModalIsOpen(true)}
|
|
53
|
-
dataQa="Remove Account"
|
|
54
|
-
extraStyles={
|
|
55
|
-
isMobile ? `flex-grow: 1; width: 100%; margin: 0;` : `flex-grow: 1;`
|
|
56
|
-
}
|
|
57
|
-
/>
|
|
58
|
-
</Box>
|
|
59
|
-
</Modal>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
export default RemoveAccountModalModule;
|
package/src/deprecated/.DS_Store
DELETED
|
Binary file
|