@thecb/components 8.4.0-beta.3 → 8.4.0-beta.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/dist/index.cjs.js +54 -60
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +54 -60
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/link-card/LinkCard.js +15 -17
- package/src/components/molecules/link-card/index.d.ts +2 -1
- package/src/constants/colors.js +4 -1
package/package.json
CHANGED
|
@@ -1,63 +1,61 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { useNavigate } from "react-router-dom";
|
|
3
2
|
import Heading from "../../atoms/heading";
|
|
4
3
|
import Paragraph from "../../atoms/paragraph";
|
|
5
|
-
// import { Text } from "../../atoms/text";
|
|
6
|
-
// import { ROYAL_BLUE_VIVID } from "../../../constants/colors";
|
|
7
4
|
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
8
5
|
import { Box, Stack } from "../../atoms/layouts";
|
|
9
6
|
import { themeComponent } from "../../../util/themeUtils";
|
|
10
7
|
import { fallbackValues } from "./LinkCard.theme";
|
|
11
|
-
|
|
12
|
-
// import ArrowRightIcon from "../../atoms/icons/ArrowRightIcon";
|
|
8
|
+
import { LINK_WATER, MOON_RAKER } from "../../../constants/colors";
|
|
13
9
|
|
|
14
10
|
const LinkCard = ({
|
|
15
11
|
variant = "default",
|
|
16
12
|
title = "Test Workflow",
|
|
17
13
|
subtitle = "Link your benefit plan",
|
|
18
14
|
themeValues,
|
|
19
|
-
path,
|
|
20
15
|
showLeft,
|
|
21
16
|
leftContent,
|
|
22
17
|
showRight,
|
|
23
18
|
rightContent,
|
|
24
|
-
onClick
|
|
19
|
+
onClick,
|
|
20
|
+
extraStyles = "",
|
|
21
|
+
extraHoverStyles = ""
|
|
25
22
|
}) => {
|
|
26
|
-
const navigate = useNavigate();
|
|
27
23
|
const activeHoverStyles = `
|
|
28
24
|
border-radius: 8px;
|
|
29
25
|
cursor: pointer;
|
|
30
26
|
border: 1px solid ${themeValues.color};
|
|
31
|
-
background:
|
|
27
|
+
background: ${LINK_WATER};
|
|
32
28
|
/* Primitives/New Shadow/3-Pressed-New */
|
|
33
29
|
box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.10), 0px 5px 11px 0px rgba(41, 42, 51, 0.10), 0px 4px 19px 0px rgba(41, 42, 51, 0.09), 0px 27px 26px 0px rgba(41, 42, 51, 0.05), 0px 56px 31px 0px rgba(41, 42, 51, 0.01), 0px 80px 33px 0px rgba(41, 42, 51, 0.00);
|
|
34
|
-
|
|
30
|
+
${extraHoverStyles}
|
|
35
31
|
`;
|
|
36
32
|
|
|
37
33
|
return (
|
|
38
34
|
<Box
|
|
39
|
-
background=
|
|
40
|
-
border=
|
|
35
|
+
background={LINK_WATER}
|
|
36
|
+
border={`1px solid ${MOON_RAKER};`}
|
|
41
37
|
borderRadius="8px"
|
|
42
38
|
dataQa={`link-card-${title}`}
|
|
43
39
|
width="100%"
|
|
44
40
|
maxWidth="288px"
|
|
45
41
|
minWidth="240px"
|
|
46
42
|
minHeight="141px"
|
|
47
|
-
padding="
|
|
48
|
-
extraStyles=
|
|
43
|
+
padding="24px"
|
|
44
|
+
extraStyles={`
|
|
49
45
|
display: flex;
|
|
50
46
|
flex-direction: column;
|
|
51
47
|
align-items: flex-start;
|
|
52
48
|
gap: 40px;
|
|
53
49
|
flex-shrink: 0;
|
|
54
|
-
align-self: stretch;
|
|
50
|
+
align-self: stretch;
|
|
51
|
+
${extraStyles}
|
|
52
|
+
`}
|
|
55
53
|
hoverStyles={activeHoverStyles}
|
|
56
54
|
activeStyles={activeHoverStyles}
|
|
57
55
|
onClick={onClick}
|
|
58
56
|
>
|
|
59
57
|
<Stack childGap={0} bottomItem={3} fullHeight>
|
|
60
|
-
<Box padding={
|
|
58
|
+
<Box padding={0}>
|
|
61
59
|
<Heading
|
|
62
60
|
variant="h6"
|
|
63
61
|
weight={FONT_WEIGHT_SEMIBOLD}
|
|
@@ -68,7 +66,7 @@ const LinkCard = ({
|
|
|
68
66
|
{title}
|
|
69
67
|
</Heading>
|
|
70
68
|
</Box>
|
|
71
|
-
<Box padding={"0
|
|
69
|
+
<Box padding={"0 0 40px"}>
|
|
72
70
|
<Paragraph
|
|
73
71
|
variant="pS"
|
|
74
72
|
color={themeValues.color}
|
|
@@ -5,13 +5,14 @@ export interface LinkCardProps {
|
|
|
5
5
|
variant?: string; // "default" is only one
|
|
6
6
|
title?: string; // title
|
|
7
7
|
subtitle?: string; // beneath title
|
|
8
|
-
slug: string; // path segment of button on click (/service/${slug})
|
|
9
8
|
themeValues?: any;
|
|
10
9
|
showLeft?: boolean;
|
|
11
10
|
leftContent?: JSX.Element;
|
|
12
11
|
showRight?: boolean;
|
|
13
12
|
rightContent?: JSX.Element;
|
|
14
13
|
onClick: () => void;
|
|
14
|
+
extraHoverStyles?: string;
|
|
15
|
+
extraStyles?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const LinkCard: React.FC<Expand<LinkCardProps> &
|
package/src/constants/colors.js
CHANGED
|
@@ -6,7 +6,7 @@ to the one generated by name-that-color.
|
|
|
6
6
|
*/
|
|
7
7
|
const BLACK = "#000000";
|
|
8
8
|
const TRANSPARENT = "transparent";
|
|
9
|
-
|
|
9
|
+
const LINK_WATER = "#FEFEFE";
|
|
10
10
|
const WHITE = "#FFFFFF";
|
|
11
11
|
const SOLITUDE_WHITE = "#EBEDF1";
|
|
12
12
|
const SEASHELL_WHITE = "#F1F1F1";
|
|
@@ -45,6 +45,7 @@ const MARINER_BLUE = "#2E75D2";
|
|
|
45
45
|
const CURIOUS_BLUE = "#27A9E1";
|
|
46
46
|
const SELAGO_BLUE = "#F2F8FD";
|
|
47
47
|
const ONAHAU_BLUE = "#D1ECFF";
|
|
48
|
+
const MOON_RAKER = "#C4CEF4";
|
|
48
49
|
const PICKLED_BLUE = "#2C3E50";
|
|
49
50
|
const CERULEAN_BLUE = "#0D8DC4";
|
|
50
51
|
const FOAM_BLUE = "#EFF4FD";
|
|
@@ -143,6 +144,7 @@ export {
|
|
|
143
144
|
BLACK,
|
|
144
145
|
TRANSPARENT,
|
|
145
146
|
WHITE,
|
|
147
|
+
LINK_WATER,
|
|
146
148
|
SOLITUDE_WHITE,
|
|
147
149
|
SEASHELL_WHITE,
|
|
148
150
|
ALABASTER_WHITE,
|
|
@@ -180,6 +182,7 @@ export {
|
|
|
180
182
|
CURIOUS_BLUE,
|
|
181
183
|
SELAGO_BLUE,
|
|
182
184
|
ONAHAU_BLUE,
|
|
185
|
+
MOON_RAKER,
|
|
183
186
|
PICKLED_BLUE,
|
|
184
187
|
CERULEAN_BLUE,
|
|
185
188
|
FOAM_BLUE,
|