@thecb/components 3.5.5-beta.0 → 3.5.5
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/.tool-versions +1 -0
- package/dist/index.cjs.js +16 -16
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormInput.js +1 -0
- package/src/components/atoms/layouts/Cover.styled.js +0 -1
- package/src/components/atoms/layouts/Imposter.styled.js +0 -1
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +11 -3
- package/src/components/molecules/content/Content.js +0 -20
- package/src/components/molecules/content/Content.theme.js +0 -60
- package/src/components/molecules/content/blocks/accordion-block/AccordionBlock.js +0 -108
- package/src/components/molecules/content/blocks/accordion-block/index.js +0 -3
- package/src/components/molecules/content/blocks/article-block/ArticleBlock.js +0 -58
- package/src/components/molecules/content/blocks/article-block/index.js +0 -3
- package/src/components/molecules/content/blocks/attached-file-block/AttachedFileBlock.js +0 -60
- package/src/components/molecules/content/blocks/attached-file-block/index.js +0 -3
- 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 +0 -54
- package/src/components/molecules/content/blocks/hero-block/index.js +0 -3
- package/src/components/molecules/content/blocks/highlight-block/HighlightBlock.js +0 -42
- package/src/components/molecules/content/blocks/highlight-block/index.js +0 -3
- package/src/components/molecules/content/blocks/index.js +0 -33
- package/src/components/molecules/content/blocks/info-block/InfoBlock.js +0 -15
- package/src/components/molecules/content/blocks/info-block/index.js +0 -3
- package/src/components/molecules/content/blocks/location-block/LocationBlock.js +0 -228
- package/src/components/molecules/content/blocks/location-block/index.js +0 -3
- package/src/components/molecules/content/blocks/related-links-block/RelatedLinksBlock.js +0 -35
- package/src/components/molecules/content/blocks/related-links-block/index.js +0 -3
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorBlock.js +0 -57
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorForm.styled.js +0 -314
- package/src/components/molecules/content/blocks/screendoor-block/index.js +0 -3
- package/src/components/molecules/content/blocks/tagline-block/TaglineBlock.js +0 -45
- package/src/components/molecules/content/blocks/tagline-block/index.js +0 -3
- package/src/components/molecules/content/blocks/task-block/TaskBlock.js +0 -40
- package/src/components/molecules/content/blocks/task-block/index.js +0 -3
- package/src/components/molecules/content/blocks/text-block/TextBlock.js +0 -40
- package/src/components/molecules/content/blocks/text-block/index.js +0 -3
- package/src/components/molecules/content/header/Header.js +0 -283
- package/src/components/molecules/content/header/Header.theme.js +0 -11
- package/src/components/molecules/content/header/index.js +0 -3
- package/src/components/molecules/content/index.js +0 -3
package/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodejs 10.13.0
|
package/dist/index.cjs.js
CHANGED
|
@@ -6730,7 +6730,7 @@ var Stack = function Stack(_ref) {
|
|
|
6730
6730
|
};
|
|
6731
6731
|
|
|
6732
6732
|
function _templateObject$7() {
|
|
6733
|
-
var data = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n min-height: ", ";\n padding: ", ";\n
|
|
6733
|
+
var data = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n min-height: ", ";\n padding: ", ";\n\n > * {\n margin-top: ", ";\n margin-bottom: ", ";\n }\n\n > :first-child {\n margin-top: 0;\n }\n\n ", "\n\n ", "\n\n > :last-child {\n margin-bottom: 0;\n }\n"]);
|
|
6734
6734
|
|
|
6735
6735
|
_templateObject$7 = function _templateObject() {
|
|
6736
6736
|
return data;
|
|
@@ -6745,19 +6745,16 @@ var CoverOuterContainer = styled__default.div(_templateObject$7(), function (_re
|
|
|
6745
6745
|
var padding = _ref2.padding;
|
|
6746
6746
|
return padding;
|
|
6747
6747
|
}, function (_ref3) {
|
|
6748
|
-
var
|
|
6749
|
-
return
|
|
6748
|
+
var childGap = _ref3.childGap;
|
|
6749
|
+
return childGap;
|
|
6750
6750
|
}, function (_ref4) {
|
|
6751
6751
|
var childGap = _ref4.childGap;
|
|
6752
6752
|
return childGap;
|
|
6753
6753
|
}, function (_ref5) {
|
|
6754
|
-
var
|
|
6755
|
-
return childGap;
|
|
6756
|
-
}, function (_ref6) {
|
|
6757
|
-
var fillCenter = _ref6.fillCenter;
|
|
6754
|
+
var fillCenter = _ref5.fillCenter;
|
|
6758
6755
|
return fillCenter ? "> :nth-child(2) {flex-grow: 1;}" : "";
|
|
6759
|
-
}, function (
|
|
6760
|
-
var centerOverride =
|
|
6756
|
+
}, function (_ref6) {
|
|
6757
|
+
var centerOverride = _ref6.centerOverride;
|
|
6761
6758
|
return centerOverride ? "> :nth-child(2) {margin-top: 0; margin-bottom: auto;}" : "> :nth-child(2) {margin-top: auto; margin-bottom: auto;}";
|
|
6762
6759
|
});
|
|
6763
6760
|
|
|
@@ -6955,7 +6952,7 @@ var Switcher = function Switcher(_ref) {
|
|
|
6955
6952
|
};
|
|
6956
6953
|
|
|
6957
6954
|
function _templateObject$a() {
|
|
6958
|
-
var data = _taggedTemplateLiteral(["\n position: ", ";\n top: ", ";\n left: ", ";\n display: ", ";\n\n ", "\n\n ", "\n
|
|
6955
|
+
var data = _taggedTemplateLiteral(["\n position: ", ";\n top: ", ";\n left: ", ";\n display: ", ";\n\n ", "\n\n ", "\n"]);
|
|
6959
6956
|
|
|
6960
6957
|
_templateObject$a = function _templateObject() {
|
|
6961
6958
|
return data;
|
|
@@ -6983,9 +6980,6 @@ var ImposterWrapper = styled__default.div(_templateObject$a(), function (_ref) {
|
|
|
6983
6980
|
verticalMargin = _ref6.verticalMargin,
|
|
6984
6981
|
horizontalMargin = _ref6.horizontalMargin;
|
|
6985
6982
|
return breakout ? "" : "\n overflow: auto;\n max-width: calc(100% - (".concat(horizontalMargin, " * 2));\n max-height: calc(100% - (").concat(verticalMargin, " * 2));\n ");
|
|
6986
|
-
}, function (_ref7) {
|
|
6987
|
-
var extraStyles = _ref7.extraStyles;
|
|
6988
|
-
return extraStyles;
|
|
6989
6983
|
});
|
|
6990
6984
|
|
|
6991
6985
|
/*
|
|
@@ -18562,6 +18556,7 @@ var FormInput = function FormInput(_ref9) {
|
|
|
18562
18556
|
color: themeValues.linkColor,
|
|
18563
18557
|
weight: themeValues.fontWeight,
|
|
18564
18558
|
hoverStyles: themeValues.hoverFocusStyles,
|
|
18559
|
+
focusStyles: themeValues.hoverFocusStyles,
|
|
18565
18560
|
extraStyles: "cursor: pointer;",
|
|
18566
18561
|
onClick: function onClick() {
|
|
18567
18562
|
return setShowPassword(!showPassword);
|
|
@@ -36126,7 +36121,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36126
36121
|
|
|
36127
36122
|
var obligationSlug = config.obligationSlug;
|
|
36128
36123
|
var createPaymentFromProfile = actions.createPaymentFromProfile,
|
|
36129
|
-
setDetailedObligation = actions.setDetailedObligation
|
|
36124
|
+
setDetailedObligation = actions.setDetailedObligation,
|
|
36125
|
+
navigateToDetailedObligation = actions.navigateToDetailedObligation;
|
|
36130
36126
|
var detailsSlug = config.type === "ACCOUNT" ? "/profile/accounts/details/".concat(obligationSlug) : "/profile/properties/details/".concat(obligationSlug);
|
|
36131
36127
|
|
|
36132
36128
|
var handleClick = function handleClick(obligations) {
|
|
@@ -36135,7 +36131,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36135
36131
|
};
|
|
36136
36132
|
|
|
36137
36133
|
var handleDetailsClick = function handleDetailsClick() {
|
|
36138
|
-
setDetailedObligation(obligations, config
|
|
36134
|
+
setDetailedObligation(obligations, config);
|
|
36135
|
+
navigateToDetailedObligation(detailsSlug);
|
|
36139
36136
|
};
|
|
36140
36137
|
|
|
36141
36138
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -36199,7 +36196,10 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36199
36196
|
}, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36200
36197
|
variant: "tertiary",
|
|
36201
36198
|
text: "Set Up Autopay",
|
|
36202
|
-
action:
|
|
36199
|
+
action: function action() {
|
|
36200
|
+
setDetailedObligation(obligations, config);
|
|
36201
|
+
handleAutopayAction();
|
|
36202
|
+
},
|
|
36203
36203
|
dataQa: "Set Up Autopay",
|
|
36204
36204
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
36205
36205
|
}) : /*#__PURE__*/React__default.createElement(AutopayModalModule, {
|
package/package.json
CHANGED
|
@@ -135,6 +135,7 @@ const FormInput = ({
|
|
|
135
135
|
color={themeValues.linkColor}
|
|
136
136
|
weight={themeValues.fontWeight}
|
|
137
137
|
hoverStyles={themeValues.hoverFocusStyles}
|
|
138
|
+
focusStyles={themeValues.hoverFocusStyles}
|
|
138
139
|
extraStyles={`cursor: pointer;`}
|
|
139
140
|
onClick={() => setShowPassword(!showPassword)}
|
|
140
141
|
aria-label="Show password"
|
|
@@ -6,7 +6,6 @@ export const CoverOuterContainer = styled.div`
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
min-height: ${({ minHeight }) => minHeight};
|
|
8
8
|
padding: ${({ padding }) => padding};
|
|
9
|
-
min-width: ${({ fillCenter }) => (fillCenter ? "100%" : "auto")};
|
|
10
9
|
|
|
11
10
|
> * {
|
|
12
11
|
margin-top: ${({ childGap }) => childGap};
|
|
@@ -20,7 +20,11 @@ const PaymentDetailsActions = ({
|
|
|
20
20
|
const [isLoading, setIsLoading] = useState(false);
|
|
21
21
|
const [modalOpen, toggleModal] = useState(false);
|
|
22
22
|
const { obligationSlug } = config;
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
createPaymentFromProfile,
|
|
25
|
+
setDetailedObligation,
|
|
26
|
+
navigateToDetailedObligation
|
|
27
|
+
} = actions;
|
|
24
28
|
const detailsSlug =
|
|
25
29
|
config.type === "ACCOUNT"
|
|
26
30
|
? `/profile/accounts/details/${obligationSlug}`
|
|
@@ -30,7 +34,8 @@ const PaymentDetailsActions = ({
|
|
|
30
34
|
createPaymentFromProfile(obligations, config);
|
|
31
35
|
};
|
|
32
36
|
const handleDetailsClick = () => {
|
|
33
|
-
setDetailedObligation(obligations, config
|
|
37
|
+
setDetailedObligation(obligations, config);
|
|
38
|
+
navigateToDetailedObligation(detailsSlug);
|
|
34
39
|
};
|
|
35
40
|
return (
|
|
36
41
|
<Box
|
|
@@ -105,7 +110,10 @@ const PaymentDetailsActions = ({
|
|
|
105
110
|
<ButtonWithAction
|
|
106
111
|
variant="tertiary"
|
|
107
112
|
text="Set Up Autopay"
|
|
108
|
-
action={
|
|
113
|
+
action={() => {
|
|
114
|
+
setDetailedObligation(obligations, config);
|
|
115
|
+
handleAutopayAction();
|
|
116
|
+
}}
|
|
109
117
|
dataQa="Set Up Autopay"
|
|
110
118
|
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
111
119
|
/>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { blockRegistry } from "./blocks";
|
|
3
|
-
import { themeComponent } from "../../util/themeUtils";
|
|
4
|
-
import { fallbackValues } from "./Content.theme";
|
|
5
|
-
|
|
6
|
-
const Content = ({
|
|
7
|
-
blockName,
|
|
8
|
-
defaultBlockName = "TextBlock",
|
|
9
|
-
pageType,
|
|
10
|
-
...rest
|
|
11
|
-
}) => {
|
|
12
|
-
console.log("other props", rest);
|
|
13
|
-
console.log("block name is", blockName);
|
|
14
|
-
const Block = blockRegistry?.[blockName] ?? blockRegistry[defaultBlockName];
|
|
15
|
-
console.log("pageType is....", pageType);
|
|
16
|
-
|
|
17
|
-
return <Block {...rest} useDarkText={pageType === "ActionPage"} />;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default themeComponent(Content, "Content", fallbackValues, "default");
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
const lightTextSingle = {
|
|
2
|
-
placeholder: ["#E5E7EC"],
|
|
3
|
-
default: "#FFFFFF"
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
const darkTextSingle = {
|
|
7
|
-
placeholder: ["#292A33"],
|
|
8
|
-
default: "#000000"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const lightText = {
|
|
12
|
-
placeholder: ["#E5E7EC", "#FFFFFF"],
|
|
13
|
-
default: "#FFFFFF"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const darkText = {
|
|
17
|
-
placeholder: ["#292A33", "#000000", "#31A9E1"],
|
|
18
|
-
default: "#000000"
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const darkAccentText = {
|
|
22
|
-
placeholder: ["#0E506D"],
|
|
23
|
-
default: "#0E506D"
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const lightAccentText = {
|
|
27
|
-
placeholder: ["#31A9E1"],
|
|
28
|
-
default: "#31A9E1"
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const textDecoration = "#E5E7EC";
|
|
32
|
-
|
|
33
|
-
const shape = {
|
|
34
|
-
placeholder: "#31A9E1"
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const background = {
|
|
38
|
-
placeholder: "#002A62",
|
|
39
|
-
default: "#002A62"
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const linkColor = {
|
|
43
|
-
default: "#31A9E1"
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const pageBackground = "#F6F6F9";
|
|
47
|
-
|
|
48
|
-
export const fallbackValues = {
|
|
49
|
-
lightTextSingle,
|
|
50
|
-
darkTextSingle,
|
|
51
|
-
lightText,
|
|
52
|
-
darkText,
|
|
53
|
-
lightAccentText,
|
|
54
|
-
darkAccentText,
|
|
55
|
-
textDecoration,
|
|
56
|
-
shape,
|
|
57
|
-
background,
|
|
58
|
-
pageBackground,
|
|
59
|
-
linkColor
|
|
60
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Heading,
|
|
6
|
-
Paragraph,
|
|
7
|
-
CollapsibleSection,
|
|
8
|
-
ExternalLink,
|
|
9
|
-
Motion
|
|
10
|
-
} from "@thecb/components";
|
|
11
|
-
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
12
|
-
|
|
13
|
-
const AccordionBlock = ({
|
|
14
|
-
themeValues,
|
|
15
|
-
description = "",
|
|
16
|
-
title = "",
|
|
17
|
-
accordionItems
|
|
18
|
-
}) => {
|
|
19
|
-
console.log("desciprtion is", description);
|
|
20
|
-
console.log("accordion items are", accordionItems);
|
|
21
|
-
console.log("accordion link color", themeValues.linkColor);
|
|
22
|
-
console.log("theme values...", themeValues);
|
|
23
|
-
const [toggleKeyList, setToggleKeyList] = useState([]);
|
|
24
|
-
const handleCollapsibleSection = index => {
|
|
25
|
-
const newList = toggleKeyList.includes(index)
|
|
26
|
-
? toggleKeyList.filter(i => i !== index)
|
|
27
|
-
: [...toggleKeyList, index];
|
|
28
|
-
|
|
29
|
-
setToggleKeyList(newList);
|
|
30
|
-
};
|
|
31
|
-
const accordionTitle = (
|
|
32
|
-
<Box minWidth="93%" padding="16px">
|
|
33
|
-
<Heading variant="h6" color={themeValues.darkText}>
|
|
34
|
-
{title}
|
|
35
|
-
</Heading>
|
|
36
|
-
</Box>
|
|
37
|
-
);
|
|
38
|
-
const items = accordionItems.map((item, index) => {
|
|
39
|
-
return (
|
|
40
|
-
<Box padding="0" key={index}>
|
|
41
|
-
{item.url ? (
|
|
42
|
-
<li>
|
|
43
|
-
<ExternalLink to={item.url}>
|
|
44
|
-
<Paragraph
|
|
45
|
-
variant="p"
|
|
46
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
47
|
-
color={themeValues.linkColor}
|
|
48
|
-
>
|
|
49
|
-
{item.title}
|
|
50
|
-
</Paragraph>
|
|
51
|
-
</ExternalLink>
|
|
52
|
-
</li>
|
|
53
|
-
) : (
|
|
54
|
-
<li>
|
|
55
|
-
<Paragraph
|
|
56
|
-
variant="p"
|
|
57
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
58
|
-
color={themeValues.darkText}
|
|
59
|
-
>
|
|
60
|
-
{item.title}
|
|
61
|
-
</Paragraph>
|
|
62
|
-
</li>
|
|
63
|
-
)}
|
|
64
|
-
{item.description && (
|
|
65
|
-
<Box>
|
|
66
|
-
<Paragraph variant="pS" color={themeValues.darkText}>
|
|
67
|
-
{item.description}
|
|
68
|
-
</Paragraph>
|
|
69
|
-
</Box>
|
|
70
|
-
)}
|
|
71
|
-
</Box>
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
return (
|
|
75
|
-
<Box
|
|
76
|
-
background="white"
|
|
77
|
-
borderSize="2px"
|
|
78
|
-
borderColor="#cfd4de"
|
|
79
|
-
borderWidthOverride="0 0 2px 0"
|
|
80
|
-
minWidth="100%"
|
|
81
|
-
>
|
|
82
|
-
<CollapsibleSection
|
|
83
|
-
title={accordionTitle}
|
|
84
|
-
customTitle
|
|
85
|
-
toggleSection={() => handleCollapsibleSection(1)}
|
|
86
|
-
isOpen={!toggleKeyList.includes(1)}
|
|
87
|
-
>
|
|
88
|
-
<Motion
|
|
89
|
-
padding="0"
|
|
90
|
-
transition={{ duration: 0.3 }}
|
|
91
|
-
positionTransition
|
|
92
|
-
extraStyles={`transform-origin: 100% 0;`}
|
|
93
|
-
>
|
|
94
|
-
<Box padding="24px" background="#f6f6f9">
|
|
95
|
-
<Stack>{description}</Stack>
|
|
96
|
-
<ul>
|
|
97
|
-
<Box padding="0">
|
|
98
|
-
<Stack>{items}</Stack>
|
|
99
|
-
</Box>
|
|
100
|
-
</ul>
|
|
101
|
-
</Box>
|
|
102
|
-
</Motion>
|
|
103
|
-
</CollapsibleSection>
|
|
104
|
-
</Box>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export default AccordionBlock;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Stack, Heading, Paragraph } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const ArticleBlock = ({
|
|
5
|
-
themeValues,
|
|
6
|
-
description = "",
|
|
7
|
-
headline = "",
|
|
8
|
-
blockIndex,
|
|
9
|
-
variant = "placeholder",
|
|
10
|
-
useDarkText = false
|
|
11
|
-
}) => {
|
|
12
|
-
console.log("article themevalues", themeValues);
|
|
13
|
-
console.log("article description", description);
|
|
14
|
-
console.log("article headline", headline);
|
|
15
|
-
console.log("article variant", variant);
|
|
16
|
-
console.log("useDarkText", useDarkText);
|
|
17
|
-
const paragraphs =
|
|
18
|
-
description.raw.children?.map((string, index) => (
|
|
19
|
-
<Box padding="0">
|
|
20
|
-
<Paragraph
|
|
21
|
-
key={`paragraph-${index}`}
|
|
22
|
-
variant="pL"
|
|
23
|
-
color={themeValues.darkText}
|
|
24
|
-
>
|
|
25
|
-
{string?.children?.[0]?.text ?? ""}
|
|
26
|
-
</Paragraph>
|
|
27
|
-
</Box>
|
|
28
|
-
)) ?? [];
|
|
29
|
-
return (
|
|
30
|
-
<Box maxWidth="100%" minHeight="500px" padding="0">
|
|
31
|
-
<Stack childGap="24px">
|
|
32
|
-
<Box padding="0 32px">
|
|
33
|
-
<Stack childGap="1rem">
|
|
34
|
-
<Heading
|
|
35
|
-
variant="h3"
|
|
36
|
-
color={
|
|
37
|
-
blockIndex === 0 && !useDarkText
|
|
38
|
-
? themeValues.lightText
|
|
39
|
-
: themeValues.darkText
|
|
40
|
-
}
|
|
41
|
-
key="heading"
|
|
42
|
-
extraStyles={`margin-top: 16px;`}
|
|
43
|
-
>
|
|
44
|
-
{headline}
|
|
45
|
-
</Heading>
|
|
46
|
-
</Stack>
|
|
47
|
-
</Box>
|
|
48
|
-
<Box padding="0">
|
|
49
|
-
<Box padding="24px 32px" background="white" borderRadius="4px">
|
|
50
|
-
<Stack>{paragraphs}</Stack>
|
|
51
|
-
</Box>
|
|
52
|
-
</Box>
|
|
53
|
-
</Stack>
|
|
54
|
-
</Box>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default ArticleBlock;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Cluster,
|
|
6
|
-
Paragraph,
|
|
7
|
-
ExternalLink
|
|
8
|
-
} from "@thecb/components";
|
|
9
|
-
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
10
|
-
import { IoIosArrowForward } from "react-icons/io";
|
|
11
|
-
|
|
12
|
-
const AttachedFileBlock = ({ fileName, fileType, file, themeValues }) => {
|
|
13
|
-
console.log("file is...", file);
|
|
14
|
-
return (
|
|
15
|
-
<Box
|
|
16
|
-
background="white"
|
|
17
|
-
minWidth="100%"
|
|
18
|
-
extraStyles={`margin-bottom: 2.5rem`}
|
|
19
|
-
padding="0"
|
|
20
|
-
>
|
|
21
|
-
<Stack childGap="24px">
|
|
22
|
-
<Paragraph key="title">Attached Files</Paragraph>
|
|
23
|
-
<ExternalLink href={`https://media.graphcms.com/${file.handle}`}>
|
|
24
|
-
<Box
|
|
25
|
-
padding="24px 16px 24px 24px"
|
|
26
|
-
background="white"
|
|
27
|
-
borderRadius="1px"
|
|
28
|
-
boxShadow={`inset 0px 3px 0px 0px ${themeValues.lightAccentText},
|
|
29
|
-
0px 1px 3px 0px rgba(0, 0, 0, 0.5)`}
|
|
30
|
-
key="file container"
|
|
31
|
-
minWidth={"100%"}
|
|
32
|
-
>
|
|
33
|
-
<Stack childGap="0.5rem">
|
|
34
|
-
<Paragraph
|
|
35
|
-
variant="pL"
|
|
36
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
37
|
-
color={themeValues.darkText}
|
|
38
|
-
>
|
|
39
|
-
{fileName}
|
|
40
|
-
</Paragraph>
|
|
41
|
-
<Box minWidth="100%" padding="0">
|
|
42
|
-
<Cluster justify="space-between" align="center">
|
|
43
|
-
<Paragraph color={themeValues.darkAccentText}>
|
|
44
|
-
{fileType}
|
|
45
|
-
</Paragraph>
|
|
46
|
-
<IoIosArrowForward
|
|
47
|
-
size="29px"
|
|
48
|
-
color={themeValues.linkColor}
|
|
49
|
-
/>
|
|
50
|
-
</Cluster>
|
|
51
|
-
</Box>
|
|
52
|
-
</Stack>
|
|
53
|
-
</Box>
|
|
54
|
-
</ExternalLink>
|
|
55
|
-
</Stack>
|
|
56
|
-
</Box>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default AttachedFileBlock;
|
package/src/components/molecules/content/blocks/featured-content-block/FeaturedContentBlock.js
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Heading,
|
|
6
|
-
Paragraph,
|
|
7
|
-
Imposter,
|
|
8
|
-
ButtonWithLink
|
|
9
|
-
} from "@thecb/components";
|
|
10
|
-
|
|
11
|
-
const HeroBlock = ({
|
|
12
|
-
themeValues,
|
|
13
|
-
backgroundImage = { url: "" },
|
|
14
|
-
callToAction = "",
|
|
15
|
-
subTitle = "",
|
|
16
|
-
title = "",
|
|
17
|
-
link = ""
|
|
18
|
-
//variant = "placeholder",
|
|
19
|
-
//...rest
|
|
20
|
-
}) => {
|
|
21
|
-
const heroImageBG = `background: url(${backgroundImage.url}); background-size: cover;`;
|
|
22
|
-
return (
|
|
23
|
-
<Box minWidth="100%" minHeight="500px" extraStyles={heroImageBG}>
|
|
24
|
-
<Imposter
|
|
25
|
-
verticalMargin="32px"
|
|
26
|
-
left="48px"
|
|
27
|
-
breakout={false}
|
|
28
|
-
extraStyles={`transform: translate(0, -50%);`}
|
|
29
|
-
>
|
|
30
|
-
<Box
|
|
31
|
-
padding={"32px"}
|
|
32
|
-
minWidth="320px"
|
|
33
|
-
minHeight="360px"
|
|
34
|
-
maxWidth="320px"
|
|
35
|
-
background={themeValues.background}
|
|
36
|
-
>
|
|
37
|
-
<Stack childGap="16px">
|
|
38
|
-
<Fragment>
|
|
39
|
-
<Heading variant="h2" color={themeValues.lightAccentText}>
|
|
40
|
-
{title}
|
|
41
|
-
</Heading>
|
|
42
|
-
<Paragraph variant="pS" color={themeValues.lightText}>
|
|
43
|
-
{subTitle}
|
|
44
|
-
</Paragraph>
|
|
45
|
-
<ButtonWithLink variant="primary" text={callToAction} to={link} />
|
|
46
|
-
</Fragment>
|
|
47
|
-
</Stack>
|
|
48
|
-
</Box>
|
|
49
|
-
</Imposter>
|
|
50
|
-
</Box>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default HeroBlock;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Grid, Cluster, Heading, Paragraph } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const HighlightBlock = ({
|
|
5
|
-
themeValues,
|
|
6
|
-
highlightComponents = []
|
|
7
|
-
//variant = "placeholder"
|
|
8
|
-
}) => {
|
|
9
|
-
console.log("highlight components", highlightComponents);
|
|
10
|
-
const componentBlocks = highlightComponents.map(component => (
|
|
11
|
-
<Box padding="16px" key={component.title}>
|
|
12
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
13
|
-
<Box padding="16px">
|
|
14
|
-
<Box
|
|
15
|
-
padding="0"
|
|
16
|
-
borderRadius="50%"
|
|
17
|
-
extraStyles={`background-image: url(${component.image.url}); background-size: cover;`}
|
|
18
|
-
minHeight="124px"
|
|
19
|
-
minWidth="124px"
|
|
20
|
-
/>
|
|
21
|
-
</Box>
|
|
22
|
-
<Box padding="0" maxWidth="300px">
|
|
23
|
-
<Heading variant="h4" color={themeValues.lightAccentText}>
|
|
24
|
-
{component.title}
|
|
25
|
-
</Heading>
|
|
26
|
-
<Paragraph variant="pS" color={themeValues.lightText}>
|
|
27
|
-
{component.description}
|
|
28
|
-
</Paragraph>
|
|
29
|
-
</Box>
|
|
30
|
-
</Cluster>
|
|
31
|
-
</Box>
|
|
32
|
-
));
|
|
33
|
-
return (
|
|
34
|
-
<Box minWidth="100%" minHeight="500px" background={themeValues.background}>
|
|
35
|
-
<Grid columnGap="1px" minColWidth={"400px"}>
|
|
36
|
-
{componentBlocks}
|
|
37
|
-
</Grid>
|
|
38
|
-
</Box>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default HighlightBlock;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from "react";
|
|
2
|
-
import AccordionBlock from "./accordion-block";
|
|
3
|
-
import ArticleBlock from "./article-block";
|
|
4
|
-
import AttachedFileBlock from "./attached-file-block";
|
|
5
|
-
import HeroBlock from "./hero-block";
|
|
6
|
-
import HighlightBlock from "./highlight-block";
|
|
7
|
-
import InfoBlock from "./info-block";
|
|
8
|
-
import LocationBlock from "./location-block";
|
|
9
|
-
import RelatedLinksBlock from "./related-links-block";
|
|
10
|
-
import ScreendoorBlock from "./screendoor-block";
|
|
11
|
-
import TaglineBlock from "./tagline-block";
|
|
12
|
-
import TaskBlock from "./task-block";
|
|
13
|
-
import TextBlock from "./text-block";
|
|
14
|
-
|
|
15
|
-
export const blockRegistry = {
|
|
16
|
-
Accordion: props => <AccordionBlock {...props} />,
|
|
17
|
-
Article: props => <ArticleBlock {...props} />,
|
|
18
|
-
AttachedFile: props => <AttachedFileBlock {...props} />,
|
|
19
|
-
HeroContainer: props => <HeroBlock {...props} />,
|
|
20
|
-
Highlight: props => <HighlightBlock {...props} />,
|
|
21
|
-
InfoAlert: props => <InfoBlock {...props} />,
|
|
22
|
-
GetInTouch: props => <LocationBlock {...props} />,
|
|
23
|
-
Markdown: () => <Fragment />,
|
|
24
|
-
RelatedPages: props => <RelatedLinksBlock {...props} />,
|
|
25
|
-
ScreendoorForm: props => <ScreendoorBlock {...props} />,
|
|
26
|
-
Tagline: props => <TaglineBlock {...props} />,
|
|
27
|
-
Task: props => <TaskBlock {...props} />,
|
|
28
|
-
Text: props => <TextBlock {...props} />
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
TaglineBlock
|
|
33
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Alert } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const InfoBlock = ({ heading, text }) => (
|
|
5
|
-
<Box
|
|
6
|
-
padding="0"
|
|
7
|
-
minWidth="100%"
|
|
8
|
-
maxWidth="330px"
|
|
9
|
-
extraStyles={`margin-bottom: 1rem;`}
|
|
10
|
-
>
|
|
11
|
-
<Alert heading={heading} text={text} variant="info" showQuitLink={false} />
|
|
12
|
-
</Box>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export default InfoBlock;
|