@thecb/components 5.9.0-beta.7 → 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.
Files changed (35) hide show
  1. package/dist/index.cjs.js +1348 -419
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1395 -465
  4. package/dist/index.esm.js.map +1 -1
  5. package/package.json +3 -4
  6. package/src/components/atoms/amount-callout/AmountCallout.theme.js +1 -1
  7. package/src/components/atoms/button-with-action/ButtonWithAction.js +0 -2
  8. package/src/components/atoms/button-with-link/ButtonWithLink.js +1 -10
  9. package/src/components/atoms/icons/AutopayOnIcon.js +10 -4
  10. package/src/components/atoms/layouts/Box.styled.js +5 -3
  11. package/src/components/atoms/layouts/Cluster.js +1 -1
  12. package/src/components/atoms/layouts/Cluster.styled.js +1 -1
  13. package/src/components/atoms/link/ExternalLink.js +0 -2
  14. package/src/components/atoms/link/InternalLink.js +0 -2
  15. package/src/components/atoms/placeholder/Placeholder.js +1 -1
  16. package/src/components/atoms/text/Text.js +0 -2
  17. package/src/components/atoms/text/Text.styled.js +0 -1
  18. package/src/components/molecules/obligation/Obligation.js +16 -46
  19. package/src/components/molecules/obligation/modules/AmountModule.js +0 -1
  20. package/src/components/molecules/obligation/modules/AutopayModalModule.js +47 -80
  21. package/src/components/molecules/obligation/modules/InactiveControlsModule.js +10 -20
  22. package/src/components/molecules/obligation/modules/InactiveTitleModule.js +2 -2
  23. package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +9 -8
  24. package/src/components/molecules/obligation/modules/index.js +1 -3
  25. package/src/components/molecules/tab-sidebar/TabSidebar.js +2 -3
  26. package/src/components/molecules/workflow-tile/WorkflowTile.js +0 -1
  27. package/src/components/templates/center-single/CenterSingle.js +1 -2
  28. package/src/components/templates/center-stack/CenterStack.js +1 -2
  29. package/src/components/templates/default-page-template/DefaultPageTemplate.js +1 -2
  30. package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +1 -2
  31. package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -2
  32. package/src/components/templates/templates.theme.js +1 -1
  33. package/src/constants/colors.js +8 -10
  34. package/src/.DS_Store +0 -0
  35. package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +0 -62
@@ -18,9 +18,7 @@ const PaymentDetailsActions = ({
18
18
  autoPaySchedule,
19
19
  paymentPlanSchedule,
20
20
  isPaymentPlan,
21
- nextAutopayDate,
22
- obligationAssocID,
23
- dueDate
21
+ nextAutopayDate
24
22
  }) => {
25
23
  const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
26
24
  const [isLoading, setIsLoading] = useState(false);
@@ -40,7 +38,7 @@ const PaymentDetailsActions = ({
40
38
  createPaymentFromProfile(obligations, config);
41
39
  };
42
40
  const handleDetailsClick = () => {
43
- setDetailedObligation(obligations, config, obligationAssocID);
41
+ setDetailedObligation(obligations, config);
44
42
  navigateToDetailedObligation(detailsSlug);
45
43
  };
46
44
  return (
@@ -122,23 +120,26 @@ const PaymentDetailsActions = ({
122
120
  modalOpen={modalOpen}
123
121
  navigateToSettings={navigateToSettings}
124
122
  deactivatePaymentSchedule={deactivatePaymentSchedule}
125
- controlType="tertiary"
123
+ buttonLinkType
126
124
  isMobile={isMobile}
127
125
  paymentPlanSchedule={paymentPlanSchedule}
128
126
  isPaymentPlan={isPaymentPlan}
129
127
  nextAutopayDate={nextAutopayDate}
130
- dueDate={dueDate}
131
128
  />
132
129
  )}
133
130
  </Box>
134
131
  {!isMobile && (
135
- <Box padding={"0"}>
132
+ <Box
133
+ padding={isMobile ? "0 0 0 8px" : "0"}
134
+ extraStyles={isMobile && `flex-grow: 1;`}
135
+ >
136
136
  <ButtonWithAction
137
137
  isLoading={isLoading}
138
138
  action={() => handleClick(obligations)}
139
139
  text="Pay Now"
140
140
  variant={isMobile ? "smallSecondary" : "secondary"}
141
141
  dataQa="Pay Now"
142
+ extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
142
143
  />
143
144
  </Box>
144
145
  )}
@@ -151,7 +152,7 @@ const PaymentDetailsActions = ({
151
152
  text="Pay Now"
152
153
  variant={isMobile ? "smallSecondary" : "secondary"}
153
154
  dataQa="Pay Now"
154
- extraStyles={isMobile && `flex-grow: 1; width: 100%; margin: 0;`}
155
+ extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
155
156
  />
156
157
  </Box>
157
158
  )}
@@ -4,7 +4,6 @@ import AmountModule from "./AmountModule";
4
4
  import PaymentDetailsActions from "./PaymentDetailsActions";
5
5
  import InactiveControlsModule from "./InactiveControlsModule";
6
6
  import InactiveTitleModule from "./InactiveTitleModule";
7
- import RemoveAccountModalModule from "./RemoveAccountModalModule";
8
7
 
9
8
  export {
10
9
  IconModule,
@@ -12,6 +11,5 @@ export {
12
11
  AmountModule,
13
12
  PaymentDetailsActions,
14
13
  InactiveControlsModule,
15
- InactiveTitleModule,
16
- RemoveAccountModalModule
14
+ InactiveTitleModule
17
15
  };
@@ -4,8 +4,7 @@ import {
4
4
  BRIGHT_GREY,
5
5
  GHOST_GREY,
6
6
  ATHENS_GREY,
7
- TRANSPARENT,
8
- COOL_GREY_05
7
+ TRANSPARENT
9
8
  } from "../../../constants/colors";
10
9
  import Text from "../../atoms/text";
11
10
  import { InternalLink } from "../../atoms/link";
@@ -19,7 +18,7 @@ import { fallbackValues } from "./TabSidebar.theme";
19
18
  const TabSidebar = ({ links, isMobile, themeValues }) => (
20
19
  <Box
21
20
  padding="0"
22
- background={COOL_GREY_05}
21
+ background={ATHENS_GREY}
23
22
  minHeight="100%"
24
23
  role="region"
25
24
  aria-label="Profile tabs"
@@ -51,7 +51,6 @@ const WorkflowTile = ({
51
51
  url={`/service/${slug}`}
52
52
  extraStyles={`width: 100%;`}
53
53
  linkExtraStyles={`justify-content: center;`}
54
- dataQa={slug}
55
54
  />
56
55
  </Box>
57
56
  </Stack>
@@ -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={COOL_GREY_05}
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={COOL_GREY_05}
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={COOL_GREY_05}
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={COOL_GREY_05}
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={COOL_GREY_05}
32
+ background={themeValues.pageBackground}
34
33
  key="page-bg"
35
34
  extraStyles="flex-grow: 1;"
36
35
  >
@@ -1,4 +1,4 @@
1
- const pageBackground = "#FBFCFD";
1
+ const pageBackground = "#F6F6F9";
2
2
 
3
3
  export const fallbackValues = {
4
4
  pageBackground
@@ -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"; // CBS-100
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"; // CBS-300
24
+ const GHOST_GREY = "#CACED8";
25
25
  const DUSTY_GREY = "#9B9B9B";
26
26
  const REGENT_GREY = "#959EA7";
27
- const STORM_GREY = "#6D717E"; // CBS-700
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"; // CBS-800
33
- const CHARADE_GREY = "#292A33"; // CBS-900
34
- const GRECIAN_GREY = "#E5E7EC"; // CBS-200
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"; // CBS-500
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 = "#B84A00";
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
@@ -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;