@thecb/components 3.5.18 → 3.6.0-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/.storybook/main.js +1 -1
- package/.storybook/page.js +0 -2
- package/dist/index.cjs.js +364 -350
- package/package.json +2 -2
- package/src/components/atoms/alert/Alert.js +34 -50
- package/src/components/atoms/breadcrumb/Breadcrumb.js +1 -4
- package/src/components/atoms/button-with-action/ButtonWithAction.js +2 -2
- package/src/components/atoms/checkbox/Checkbox.js +0 -1
- package/src/components/atoms/checkbox-list/CheckboxList.js +1 -3
- package/src/components/atoms/display-card/DisplayCard.js +2 -4
- package/src/components/atoms/dropdown/Dropdown.js +4 -4
- package/src/components/atoms/dropdown/Dropdown.stories.js +33 -10
- package/src/components/atoms/form-layouts/FormInput.js +4 -8
- package/src/components/atoms/form-layouts/FormLayouts.stories.js +5 -5
- package/src/components/atoms/hamburger-button/HamburgerButton.js +3 -4
- package/src/components/atoms/icons/AccountsIconSmall.js +13 -6
- package/src/components/atoms/icons/icons.stories.js +1 -1
- package/src/components/atoms/layouts/Box.styled.js +0 -1
- package/src/components/atoms/layouts/Cluster.styled.js +1 -5
- package/src/components/atoms/layouts/Cover.styled.js +1 -0
- package/src/components/atoms/layouts/Imposter.styled.js +1 -0
- package/src/components/atoms/layouts/Sidebar.js +2 -2
- package/src/components/atoms/layouts/Sidebar.styled.js +3 -9
- package/src/components/atoms/nav-footer/NavFooter.js +2 -1
- package/src/components/atoms/nav-header/NavHeader.js +2 -1
- package/src/components/atoms/radio-button/RadioButton.js +0 -1
- package/src/components/atoms/radio-button/RadioButton.stories.js +61 -26
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +0 -1
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +51 -10
- package/src/components/molecules/content/Content.js +20 -0
- package/src/components/molecules/content/Content.theme.js +60 -0
- package/src/components/molecules/content/blocks/accordion-block/AccordionBlock.js +108 -0
- package/src/components/molecules/content/blocks/accordion-block/index.js +3 -0
- package/src/components/molecules/content/blocks/article-block/ArticleBlock.js +58 -0
- package/src/components/molecules/content/blocks/article-block/index.js +3 -0
- package/src/components/molecules/content/blocks/attached-file-block/AttachedFileBlock.js +60 -0
- package/src/components/molecules/content/blocks/attached-file-block/index.js +3 -0
- package/src/components/molecules/content/blocks/featured-content-block/FeaturedContentBlock.js +0 -0
- package/src/components/molecules/content/blocks/featured-content-block/index.js +0 -0
- package/src/components/molecules/content/blocks/hero-block/HeroBlock.js +54 -0
- package/src/components/molecules/content/blocks/hero-block/index.js +3 -0
- package/src/components/molecules/content/blocks/highlight-block/HighlightBlock.js +42 -0
- package/src/components/molecules/content/blocks/highlight-block/index.js +3 -0
- package/src/components/molecules/content/blocks/index.js +33 -0
- package/src/components/molecules/content/blocks/info-block/InfoBlock.js +15 -0
- package/src/components/molecules/content/blocks/info-block/index.js +3 -0
- package/src/components/molecules/content/blocks/location-block/LocationBlock.js +228 -0
- package/src/components/molecules/content/blocks/location-block/index.js +3 -0
- package/src/components/molecules/content/blocks/related-links-block/RelatedLinksBlock.js +35 -0
- package/src/components/molecules/content/blocks/related-links-block/index.js +3 -0
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorBlock.js +57 -0
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorForm.styled.js +314 -0
- package/src/components/molecules/content/blocks/screendoor-block/index.js +3 -0
- package/src/components/molecules/content/blocks/tagline-block/TaglineBlock.js +45 -0
- package/src/components/molecules/content/blocks/tagline-block/index.js +3 -0
- package/src/components/molecules/content/blocks/task-block/TaskBlock.js +40 -0
- package/src/components/molecules/content/blocks/task-block/index.js +3 -0
- package/src/components/molecules/content/blocks/text-block/TextBlock.js +40 -0
- package/src/components/molecules/content/blocks/text-block/index.js +3 -0
- package/src/components/molecules/content/header/Header.js +283 -0
- package/src/components/molecules/content/header/Header.theme.js +11 -0
- package/src/components/molecules/content/header/index.js +3 -0
- package/src/components/molecules/content/index.js +3 -0
- package/src/components/molecules/editable-list/EditableList.js +8 -11
- package/src/components/molecules/nav-menu/NavMenuDesktop.js +1 -2
- package/src/components/molecules/nav-menu/NavMenuMobile.js +1 -7
- package/src/components/molecules/obligation/Obligation.js +7 -9
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +23 -23
- package/src/components/molecules/radio-section/RadioSection.js +3 -7
- package/src/deprecated/components/radio-button/radio-button.js +1 -5
- package/src/deprecated/icons/IconInvalid.js +31 -7
- package/src/deprecated/icons/IconNeutral.js +4 -5
- package/src/deprecated/icons/IconValid.js +33 -8
- package/src/util/general.js +1 -10
- package/.tool-versions +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Box,
|
|
5
|
+
Stack,
|
|
6
|
+
Cluster,
|
|
7
|
+
Heading,
|
|
8
|
+
Paragraph,
|
|
9
|
+
ButtonWithLink
|
|
10
|
+
} from "@thecb/components";
|
|
11
|
+
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
12
|
+
|
|
13
|
+
const TaskBlock = ({ themeValues, headline, text, callToAction, url }) => (
|
|
14
|
+
<Box
|
|
15
|
+
padding="24px 16px"
|
|
16
|
+
boxShadow={`inset 0px 3px 0px 0px rgb(21, 116, 157),
|
|
17
|
+
0px 2px 4px 0px rgba(41, 42, 51, 0.4);`}
|
|
18
|
+
borderRadius="4px"
|
|
19
|
+
background="#ffffff"
|
|
20
|
+
maxWidth="47.5rem"
|
|
21
|
+
>
|
|
22
|
+
<Stack childGap="1.5rem">
|
|
23
|
+
<Heading
|
|
24
|
+
variant="h3"
|
|
25
|
+
color={themeValues.darkText}
|
|
26
|
+
weight={FONT_WEIGHT_SEMIBOLD}
|
|
27
|
+
>
|
|
28
|
+
{headline}
|
|
29
|
+
</Heading>
|
|
30
|
+
<Paragraph color={themeValues.darkText}>{text}</Paragraph>
|
|
31
|
+
<Box padding="0" minWidth="100%">
|
|
32
|
+
<Cluster justify="flex-end" align="center">
|
|
33
|
+
<ButtonWithLink variant="secondary" url={url} text={callToAction} />
|
|
34
|
+
</Cluster>
|
|
35
|
+
</Box>
|
|
36
|
+
</Stack>
|
|
37
|
+
</Box>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export default TaskBlock;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box, Stack, Paragraph } from "@thecb/components";
|
|
3
|
+
|
|
4
|
+
const TextBlock = ({
|
|
5
|
+
themeValues,
|
|
6
|
+
textContent = ""
|
|
7
|
+
//variant = "placeholder"
|
|
8
|
+
}) => {
|
|
9
|
+
const paragraphs =
|
|
10
|
+
textContent
|
|
11
|
+
?.split("\n")
|
|
12
|
+
.filter(string => string !== "")
|
|
13
|
+
.map((string, index) => (
|
|
14
|
+
<Box padding="0">
|
|
15
|
+
<Paragraph
|
|
16
|
+
key={`paragraph-${index}`}
|
|
17
|
+
variant="pL"
|
|
18
|
+
color={themeValues.darkText}
|
|
19
|
+
>
|
|
20
|
+
{string}
|
|
21
|
+
</Paragraph>
|
|
22
|
+
</Box>
|
|
23
|
+
)) ?? [];
|
|
24
|
+
return (
|
|
25
|
+
<Box
|
|
26
|
+
minWidth="100%"
|
|
27
|
+
minHeight="500px"
|
|
28
|
+
padding={"32px 24px"}
|
|
29
|
+
background="white"
|
|
30
|
+
>
|
|
31
|
+
<Stack childGap="24px">
|
|
32
|
+
<Box padding="0">
|
|
33
|
+
<Stack>{paragraphs}</Stack>
|
|
34
|
+
</Box>
|
|
35
|
+
</Stack>
|
|
36
|
+
</Box>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default TextBlock;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import React, { useContext, useState, Fragment } from "react";
|
|
2
|
+
import { ThemeContext } from "styled-components";
|
|
3
|
+
import { IoIosArrowRoundForward } from "react-icons/io";
|
|
4
|
+
import {
|
|
5
|
+
Box,
|
|
6
|
+
Cover,
|
|
7
|
+
Cluster,
|
|
8
|
+
Stack,
|
|
9
|
+
Heading,
|
|
10
|
+
Paragraph,
|
|
11
|
+
//Imposter,
|
|
12
|
+
NavHeader,
|
|
13
|
+
//HamburgerButton,
|
|
14
|
+
ExternalLink,
|
|
15
|
+
InternalLink,
|
|
16
|
+
withWindowSize,
|
|
17
|
+
Switcher,
|
|
18
|
+
Motion,
|
|
19
|
+
Center
|
|
20
|
+
} from "@thecb/components";
|
|
21
|
+
import { Helmet } from "react-helmet";
|
|
22
|
+
import { fallbackValues } from "./Header.theme";
|
|
23
|
+
import { themeComponent } from "../../../util/themeUtils";
|
|
24
|
+
//import { URL_TEST } from "../../constants/regex_constants";
|
|
25
|
+
import {
|
|
26
|
+
FONT_WEIGHT_SEMIBOLD,
|
|
27
|
+
FONT_WEIGHT_BOLD
|
|
28
|
+
} from "../../../constants/style_constants";
|
|
29
|
+
|
|
30
|
+
const Header = ({ navigation, title, themeValues }) => {
|
|
31
|
+
const { isMobile } = useContext(ThemeContext);
|
|
32
|
+
const [navMenuOpen, setNavMenuOpen] = useState();
|
|
33
|
+
const [selectedNavMenu, setSelectedMenu] = useState(0);
|
|
34
|
+
const [isAnimating, setIsAnimating] = useState();
|
|
35
|
+
const headerLogoSrc =
|
|
36
|
+
"https://cb-public-assets.s3-us-west-2.amazonaws.com/mgw/water-works.png";
|
|
37
|
+
const headerLogoLink = "/cms/home";
|
|
38
|
+
const favicon =
|
|
39
|
+
"https://cb-public-assets.s3-us-west-2.amazonaws.com/mgw/water-works.ico";
|
|
40
|
+
const HeaderLogoWrapper = ({ children }) =>
|
|
41
|
+
headerLogoLink ? (
|
|
42
|
+
false ? (
|
|
43
|
+
<ExternalLink href={headerLogoLink}>{children}</ExternalLink>
|
|
44
|
+
) : (
|
|
45
|
+
<InternalLink to={headerLogoLink}>{children}</InternalLink>
|
|
46
|
+
)
|
|
47
|
+
) : (
|
|
48
|
+
<Fragment>{children}</Fragment>
|
|
49
|
+
);
|
|
50
|
+
const headerLogo = (
|
|
51
|
+
<HeaderLogoWrapper>
|
|
52
|
+
<Box padding="0" minHeight="100%">
|
|
53
|
+
<Cover singleChild minHeight="100%">
|
|
54
|
+
<Box padding="0">
|
|
55
|
+
<img
|
|
56
|
+
src={headerLogoSrc}
|
|
57
|
+
height={isMobile ? "42px" : themeValues.logoHeight}
|
|
58
|
+
alt="header logo"
|
|
59
|
+
/>
|
|
60
|
+
</Box>
|
|
61
|
+
</Cover>
|
|
62
|
+
</Box>
|
|
63
|
+
</HeaderLogoWrapper>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const navLinks = navigation?.sections?.map((link, index) => (
|
|
67
|
+
<Box
|
|
68
|
+
padding="2rem 1.5rem"
|
|
69
|
+
borderColor={navMenuOpen ? themeValues.darkText : "transparent"}
|
|
70
|
+
borderSize="4px"
|
|
71
|
+
borderWidthOverride="0 0 4px 0"
|
|
72
|
+
onClick={() => {
|
|
73
|
+
console.log("i'm getting called!");
|
|
74
|
+
setSelectedMenu(index);
|
|
75
|
+
setNavMenuOpen(!navMenuOpen);
|
|
76
|
+
setIsAnimating(true);
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
setIsAnimating(false);
|
|
79
|
+
}, 600);
|
|
80
|
+
}}
|
|
81
|
+
onMouseEnter={() => {
|
|
82
|
+
if (navMenuOpen !== true) {
|
|
83
|
+
setSelectedMenu(index);
|
|
84
|
+
setNavMenuOpen(true);
|
|
85
|
+
setIsAnimating(true);
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
setIsAnimating(false);
|
|
88
|
+
}, 600);
|
|
89
|
+
} else if (selectedNavMenu !== index) {
|
|
90
|
+
setSelectedMenu(index);
|
|
91
|
+
}
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<Heading variant="h5" color={themeValues.darkText}>
|
|
95
|
+
{link?.name}
|
|
96
|
+
</Heading>
|
|
97
|
+
</Box>
|
|
98
|
+
));
|
|
99
|
+
|
|
100
|
+
const navLinksContainer = (
|
|
101
|
+
<Box padding="0" minWidth="100%">
|
|
102
|
+
<Cluster justify="space-between" align="stretch">
|
|
103
|
+
<Box padding="1.5rem">{headerLogo}</Box>
|
|
104
|
+
{navLinks}
|
|
105
|
+
</Cluster>
|
|
106
|
+
</Box>
|
|
107
|
+
);
|
|
108
|
+
console.log("navigation in header is", navigation);
|
|
109
|
+
const navItems =
|
|
110
|
+
navigation?.sections?.map(section => (
|
|
111
|
+
<Fragment key={section?.id}>
|
|
112
|
+
<Box key="title-desc" padding="0">
|
|
113
|
+
<Stack>
|
|
114
|
+
<Box padding="0">
|
|
115
|
+
<Cluster justify="flex-start" align="center">
|
|
116
|
+
<Heading
|
|
117
|
+
variant="h4"
|
|
118
|
+
color={themeValues.darkText}
|
|
119
|
+
weight={FONT_WEIGHT_BOLD}
|
|
120
|
+
>
|
|
121
|
+
{section?.name}
|
|
122
|
+
</Heading>
|
|
123
|
+
<Box padding="0 8px" extraStyles={`margin-top: 8px;`}>
|
|
124
|
+
<IoIosArrowRoundForward
|
|
125
|
+
size="29px"
|
|
126
|
+
color={themeValues.darkText}
|
|
127
|
+
/>
|
|
128
|
+
</Box>
|
|
129
|
+
</Cluster>
|
|
130
|
+
</Box>
|
|
131
|
+
<Box padding="0">
|
|
132
|
+
<Paragraph>{section?.description}</Paragraph>
|
|
133
|
+
</Box>
|
|
134
|
+
</Stack>
|
|
135
|
+
</Box>
|
|
136
|
+
<Box key="linked-items" padding="0" minWidth="70%">
|
|
137
|
+
<Cluster justify="space-around" align="stretch">
|
|
138
|
+
{section?.linkLists?.map(linkList => (
|
|
139
|
+
<Box padding="0" extraStyles={`flex: 1;`}>
|
|
140
|
+
<Stack>
|
|
141
|
+
<Cluster justify="flex-start" align="center">
|
|
142
|
+
<Heading
|
|
143
|
+
variant="h4"
|
|
144
|
+
color={themeValues.darkText}
|
|
145
|
+
weight={FONT_WEIGHT_BOLD}
|
|
146
|
+
>
|
|
147
|
+
{linkList?.name}
|
|
148
|
+
</Heading>
|
|
149
|
+
<Box padding="0 8px" extraStyles={`margin-top: 8px;`}>
|
|
150
|
+
<IoIosArrowRoundForward
|
|
151
|
+
size="29px"
|
|
152
|
+
color={themeValues.darkText}
|
|
153
|
+
/>
|
|
154
|
+
</Box>
|
|
155
|
+
</Cluster>
|
|
156
|
+
<Box padding="24px 0">
|
|
157
|
+
<Stack>
|
|
158
|
+
{linkList?.links?.map(link => (
|
|
159
|
+
<Box padding="0">
|
|
160
|
+
<InternalLink to={link.externalUrl}>
|
|
161
|
+
<Paragraph color={themeValues.darkText}>
|
|
162
|
+
{link.text}
|
|
163
|
+
</Paragraph>
|
|
164
|
+
</InternalLink>
|
|
165
|
+
</Box>
|
|
166
|
+
))}
|
|
167
|
+
</Stack>
|
|
168
|
+
</Box>
|
|
169
|
+
</Stack>
|
|
170
|
+
</Box>
|
|
171
|
+
))}
|
|
172
|
+
<Box padding="0" key="featured-items" extraStyles={`flex: 1;`}>
|
|
173
|
+
<Stack>
|
|
174
|
+
<Heading
|
|
175
|
+
variant="h4"
|
|
176
|
+
weight={FONT_WEIGHT_BOLD}
|
|
177
|
+
color={themeValues.darkText}
|
|
178
|
+
>
|
|
179
|
+
Featured Items
|
|
180
|
+
</Heading>
|
|
181
|
+
{section?.featuredLinks?.links?.map(feat => (
|
|
182
|
+
<Box padding="0" minWidth="100%">
|
|
183
|
+
<Cluster justify="space-between" align="center">
|
|
184
|
+
<InternalLink to={feat.url}>
|
|
185
|
+
<Cluster justify="flex-start" align="center">
|
|
186
|
+
<Heading
|
|
187
|
+
variant="h6"
|
|
188
|
+
weight={FONT_WEIGHT_SEMIBOLD}
|
|
189
|
+
color={themeValues.darkText}
|
|
190
|
+
>
|
|
191
|
+
{feat.text}
|
|
192
|
+
</Heading>
|
|
193
|
+
<Box padding="0 8px" extraStyles={`margin-top: 8px;`}>
|
|
194
|
+
<IoIosArrowRoundForward
|
|
195
|
+
size="29px"
|
|
196
|
+
color={themeValues.darkText}
|
|
197
|
+
/>
|
|
198
|
+
</Box>
|
|
199
|
+
</Cluster>
|
|
200
|
+
</InternalLink>
|
|
201
|
+
</Cluster>
|
|
202
|
+
</Box>
|
|
203
|
+
))}
|
|
204
|
+
</Stack>
|
|
205
|
+
</Box>
|
|
206
|
+
</Cluster>
|
|
207
|
+
</Box>
|
|
208
|
+
</Fragment>
|
|
209
|
+
)) ?? [];
|
|
210
|
+
|
|
211
|
+
const menuWrapper = {
|
|
212
|
+
open: {
|
|
213
|
+
top: "0px",
|
|
214
|
+
transition: {
|
|
215
|
+
duration: 0.5
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
closed: {
|
|
219
|
+
top: "-500px",
|
|
220
|
+
transition: {
|
|
221
|
+
duration: 0.5
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
console.log("nav items are", navItems);
|
|
226
|
+
const menu = (
|
|
227
|
+
<Motion
|
|
228
|
+
padding="0"
|
|
229
|
+
variants={menuWrapper}
|
|
230
|
+
animate={navMenuOpen ? "open" : "closed"}
|
|
231
|
+
extraStyles={`position: absolute; z-index: 3;`}
|
|
232
|
+
positionTransition
|
|
233
|
+
minWidth="100%"
|
|
234
|
+
>
|
|
235
|
+
<Box
|
|
236
|
+
minWidth="100%"
|
|
237
|
+
background={themeValues.menuColor}
|
|
238
|
+
padding="0"
|
|
239
|
+
minHeight="29rem"
|
|
240
|
+
onMouseLeave={() => {
|
|
241
|
+
if (isAnimating === false) {
|
|
242
|
+
setNavMenuOpen(false);
|
|
243
|
+
}
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
<Center maxWidth={isMobile ? "100%" : "76.5rem"} intrinsic={!isMobile}>
|
|
247
|
+
<Cluster justify="center" align="center" minWidth="100%">
|
|
248
|
+
<Box minHeight="29rem" padding="24px 0">
|
|
249
|
+
<Switcher breakpoint="45rem" largeChild="4" largeChildSize="2">
|
|
250
|
+
{navItems[selectedNavMenu]}
|
|
251
|
+
</Switcher>
|
|
252
|
+
</Box>
|
|
253
|
+
</Cluster>
|
|
254
|
+
</Center>
|
|
255
|
+
</Box>
|
|
256
|
+
</Motion>
|
|
257
|
+
);
|
|
258
|
+
console.log("navMenuOpen is....", navMenuOpen);
|
|
259
|
+
return (
|
|
260
|
+
<Box padding="0" role="banner">
|
|
261
|
+
<Helmet>
|
|
262
|
+
<title>{title.text}</title>
|
|
263
|
+
<link rel="shortcut icon" href={favicon} />
|
|
264
|
+
</Helmet>
|
|
265
|
+
<Box
|
|
266
|
+
padding="0"
|
|
267
|
+
extraStyles={`z-index: 25;`}
|
|
268
|
+
boxShadow={`0px 4px 2px 0px rgba(0, 0, 0, 0.19);`}
|
|
269
|
+
>
|
|
270
|
+
<NavHeader
|
|
271
|
+
backgroundColor={"#FFFFFF"}
|
|
272
|
+
leftContent={navLinksContainer}
|
|
273
|
+
isMobile={isMobile}
|
|
274
|
+
/>
|
|
275
|
+
</Box>
|
|
276
|
+
<Box padding="0" minWidth="100%">
|
|
277
|
+
{menu}
|
|
278
|
+
</Box>
|
|
279
|
+
</Box>
|
|
280
|
+
);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export default withWindowSize(themeComponent(Header, "Header", fallbackValues));
|
|
@@ -55,25 +55,24 @@ const EditableList = ({
|
|
|
55
55
|
extraStyles={`box-shadow: 0px 2px 14px 0px rgb(246, 246, 249),
|
|
56
56
|
0px 3px 8px 0px rgb(202, 206, 216);`}
|
|
57
57
|
>
|
|
58
|
-
{items.map(
|
|
58
|
+
{items.map(props => {
|
|
59
59
|
const [modalOpen, toggleModal] = useState(false);
|
|
60
60
|
return (
|
|
61
61
|
<EditableListItem
|
|
62
62
|
listItemSize={
|
|
63
|
-
!!
|
|
63
|
+
!!props.id && props.id === autoPayMethod ? "big" : listItemSize
|
|
64
64
|
}
|
|
65
|
-
key={
|
|
65
|
+
key={props.id}
|
|
66
66
|
>
|
|
67
67
|
<Text variant="p" color={CHARADE_GREY}>
|
|
68
|
-
{renderItem(
|
|
68
|
+
{renderItem(props)}
|
|
69
69
|
</Text>
|
|
70
70
|
<EditableListItemControls>
|
|
71
|
-
{
|
|
71
|
+
{props.isPrimary && (
|
|
72
72
|
<Text
|
|
73
73
|
variant="p"
|
|
74
74
|
color={STORM_GREY}
|
|
75
75
|
extraStyles={`font-style: italic;`}
|
|
76
|
-
key={`Default ${itemName}`}
|
|
77
76
|
>
|
|
78
77
|
Default {itemName}
|
|
79
78
|
</Text>
|
|
@@ -84,11 +83,10 @@ const EditableList = ({
|
|
|
84
83
|
border="2px solid transparent"
|
|
85
84
|
extraStyles={`:not(:first-child) { border-left: 2px solid ${BOSTON_BLUE};}`}
|
|
86
85
|
dataQa={qaPrefix + " Remove"}
|
|
87
|
-
key={`Remove ${item.id}`}
|
|
88
86
|
>
|
|
89
87
|
{useModal ? (
|
|
90
88
|
<Modal
|
|
91
|
-
item={{ ...
|
|
89
|
+
item={{ ...props }}
|
|
92
90
|
{...modalProps}
|
|
93
91
|
modalOpen={modalOpen}
|
|
94
92
|
toggleModal={toggleModal}
|
|
@@ -97,7 +95,7 @@ const EditableList = ({
|
|
|
97
95
|
<ButtonWithAction
|
|
98
96
|
variant="smallGhost"
|
|
99
97
|
text="Remove"
|
|
100
|
-
action={() => removeItem(
|
|
98
|
+
action={() => removeItem(props.id)}
|
|
101
99
|
extraStyles={`min-width: 0;`}
|
|
102
100
|
/>
|
|
103
101
|
)}
|
|
@@ -109,12 +107,11 @@ const EditableList = ({
|
|
|
109
107
|
border="2px solid transparent"
|
|
110
108
|
extraStyles={`:not(:first-child) { border-left: 2px solid ${BOSTON_BLUE};}`}
|
|
111
109
|
dataQa={qaPrefix + " Edit"}
|
|
112
|
-
key={`Edit ${item.id}`}
|
|
113
110
|
>
|
|
114
111
|
<ButtonWithAction
|
|
115
112
|
variant="smallGhost"
|
|
116
113
|
text="Edit"
|
|
117
|
-
action={() => editItem(
|
|
114
|
+
action={() => editItem(props.id)}
|
|
118
115
|
extraStyles={`min-width: 0;`}
|
|
119
116
|
/>
|
|
120
117
|
</Box>
|
|
@@ -4,7 +4,6 @@ import { fallbackValues } from "./NavMenu.theme.js";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
|
|
6
6
|
const NavMenuDesktop = ({
|
|
7
|
-
id,
|
|
8
7
|
top = "125%",
|
|
9
8
|
left = "-100%",
|
|
10
9
|
menuContent = [],
|
|
@@ -18,7 +17,7 @@ const NavMenuDesktop = ({
|
|
|
18
17
|
const menuCarat = `&:after { bottom: 100%; right: 10px; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; border-color: ${themeValues.backgroundColor}00; border-bottom-color: ${themeValues.backgroundColor}; border-width: 10px; margin-left: -10px; }`;
|
|
19
18
|
|
|
20
19
|
return (
|
|
21
|
-
<Imposter
|
|
20
|
+
<Imposter breakout top={top} left={left} visible={visible}>
|
|
22
21
|
<Box
|
|
23
22
|
minWidth="240px"
|
|
24
23
|
padding="1rem 0.5rem"
|
|
@@ -42,15 +42,9 @@ const ImposterMenu = styled(menu)`
|
|
|
42
42
|
top: 72px;
|
|
43
43
|
`;
|
|
44
44
|
|
|
45
|
-
const NavMenuMobile = ({
|
|
46
|
-
id,
|
|
47
|
-
menuContent = [],
|
|
48
|
-
visible = false,
|
|
49
|
-
themeValues
|
|
50
|
-
}) => {
|
|
45
|
+
const NavMenuMobile = ({ menuContent = [], visible = false, themeValues }) => {
|
|
51
46
|
return (
|
|
52
47
|
<ImposterMenu
|
|
53
|
-
id={id}
|
|
54
48
|
initialPose="invisible"
|
|
55
49
|
pose={visible ? "visible" : "invisible"}
|
|
56
50
|
>
|
|
@@ -39,15 +39,13 @@ const Obligation = ({
|
|
|
39
39
|
>
|
|
40
40
|
<Box padding="0">
|
|
41
41
|
<Cluster justify="flex-start" align="center">
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
42
|
+
<IconModule
|
|
43
|
+
icon={config.icon}
|
|
44
|
+
iconDefault={config.iconDefault}
|
|
45
|
+
configIconMap={config.iconMap}
|
|
46
|
+
iconValue={config.iconValue}
|
|
47
|
+
customAttributes={customAttributes}
|
|
48
|
+
/>
|
|
51
49
|
<TitleModule
|
|
52
50
|
title={obligation.description}
|
|
53
51
|
subtitle={obligation.subDescription}
|
|
@@ -54,17 +54,29 @@ const PaymentDetailsActions = ({
|
|
|
54
54
|
borderWidthOverride="0 0 1px 0"
|
|
55
55
|
>
|
|
56
56
|
<Cluster justify="space-between" align="center" nowrap>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
<Box padding="0" width="100%">
|
|
58
|
+
<AmountModule
|
|
59
|
+
totalAmountDue={obligations.reduce(
|
|
60
|
+
(acc, curr) => acc + curr.amountDue,
|
|
61
|
+
0
|
|
62
|
+
)}
|
|
63
|
+
autoPayEnabled={autoPayEnabled}
|
|
64
|
+
isMobile={isMobile}
|
|
65
|
+
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
66
|
+
navigateToSettings={navigateToSettings}
|
|
67
|
+
autoPaySchedule={autoPaySchedule}
|
|
68
|
+
/>
|
|
69
|
+
</Box>
|
|
70
|
+
<Box padding="0" width="100%">
|
|
71
|
+
<ButtonWithAction
|
|
72
|
+
isLoading={isLoading}
|
|
73
|
+
action={() => handleClick(obligations)}
|
|
74
|
+
text="Pay Now"
|
|
75
|
+
variant={isMobile ? "smallSecondary" : "secondary"}
|
|
76
|
+
dataQa="Pay Now"
|
|
77
|
+
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
78
|
+
/>
|
|
79
|
+
</Box>
|
|
68
80
|
</Cluster>
|
|
69
81
|
</Box>
|
|
70
82
|
)}
|
|
@@ -134,18 +146,6 @@ const PaymentDetailsActions = ({
|
|
|
134
146
|
</Box>
|
|
135
147
|
)}
|
|
136
148
|
</Cluster>
|
|
137
|
-
{isMobile && (
|
|
138
|
-
<Box padding="8px 0 0" width="100%">
|
|
139
|
-
<ButtonWithAction
|
|
140
|
-
isLoading={isLoading}
|
|
141
|
-
action={() => handleClick(obligations)}
|
|
142
|
-
text="Pay Now"
|
|
143
|
-
variant={isMobile ? "smallSecondary" : "secondary"}
|
|
144
|
-
dataQa="Pay Now"
|
|
145
|
-
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
146
|
-
/>
|
|
147
|
-
</Box>
|
|
148
|
-
)}
|
|
149
149
|
</Box>
|
|
150
150
|
</Box>
|
|
151
151
|
);
|
|
@@ -122,12 +122,12 @@ const RadioSection = ({
|
|
|
122
122
|
: themeValues.headingBackgroundColor
|
|
123
123
|
}
|
|
124
124
|
onClick={
|
|
125
|
-
|
|
125
|
+
isMobile && supportsTouch
|
|
126
126
|
? noop
|
|
127
127
|
: () => toggleOpenSection(section.id)
|
|
128
128
|
}
|
|
129
129
|
onTouchEnd={
|
|
130
|
-
|
|
130
|
+
isMobile && supportsTouch
|
|
131
131
|
? () => toggleOpenSection(section.id)
|
|
132
132
|
: noop
|
|
133
133
|
}
|
|
@@ -155,11 +155,7 @@ const RadioSection = ({
|
|
|
155
155
|
name={section.id}
|
|
156
156
|
radioOn={openSection === section.id}
|
|
157
157
|
radioFocused={focused === section.id}
|
|
158
|
-
toggleRadio={
|
|
159
|
-
section.disabled
|
|
160
|
-
? noop
|
|
161
|
-
: () => toggleOpenSection(section.id)
|
|
162
|
-
}
|
|
158
|
+
toggleRadio={() => toggleOpenSection(section.id)}
|
|
163
159
|
tabIndex="-1"
|
|
164
160
|
/>
|
|
165
161
|
</Box>
|
|
@@ -36,11 +36,7 @@ const RadioButtonCenter = styled.div`
|
|
|
36
36
|
RadioButtonCenter.defaultProps = defaultTheme;
|
|
37
37
|
|
|
38
38
|
const RadioButton = ({ isSelected, name }) => (
|
|
39
|
-
<RadioButtonBorder
|
|
40
|
-
isSelected={isSelected}
|
|
41
|
-
name={name}
|
|
42
|
-
aria-checked={isSelected}
|
|
43
|
-
>
|
|
39
|
+
<RadioButtonBorder isSelected={isSelected} name={name}>
|
|
44
40
|
{isSelected && <RadioButtonCenter />}
|
|
45
41
|
</RadioButtonBorder>
|
|
46
42
|
);
|