@thecb/components 8.4.0-beta.2 → 8.4.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "8.4.0-beta.2",
3
+ "version": "8.4.0-beta.4",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -8,6 +8,7 @@ import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
8
8
  import { Box, Stack } from "../../atoms/layouts";
9
9
  import { themeComponent } from "../../../util/themeUtils";
10
10
  import { fallbackValues } from "./LinkCard.theme";
11
+ import { LINK_WATER, MOON_RAKER } from "../../../constants/colors";
11
12
  // import PlusCircleIcon from "../../atoms/icons/PlusCircleIcon";
12
13
  // import ArrowRightIcon from "../../atoms/icons/ArrowRightIcon";
13
14
 
@@ -20,23 +21,25 @@ const LinkCard = ({
20
21
  showLeft,
21
22
  leftContent,
22
23
  showRight,
23
- rightContent
24
+ rightContent,
25
+ onClick,
26
+ extraStyles = "",
27
+ extraHoverStyles = ""
24
28
  }) => {
25
- const navigate = useNavigate();
26
29
  const activeHoverStyles = `
27
30
  border-radius: 8px;
28
31
  cursor: pointer;
29
32
  border: 1px solid ${themeValues.color};
30
- background: var(--primary-color-primary-10, #EBEFFB);
33
+ background: ${LINK_WATER};
31
34
  /* Primitives/New Shadow/3-Pressed-New */
32
35
  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);
33
- .show-on-hover {color: ${themeValues.color};}
36
+ ${extraHoverStyles}
34
37
  `;
35
38
 
36
39
  return (
37
40
  <Box
38
- background="#FEFEFE" // --grays-cool-gray-00
39
- border="1px solid #C4CEF4;" // --primary-color-primary-30
41
+ background={`${LINK_WATER}`}
42
+ border={`1px solid ${MOON_RAKER};`}
40
43
  borderRadius="8px"
41
44
  dataQa={`link-card-${title}`}
42
45
  width="100%"
@@ -44,21 +47,21 @@ const LinkCard = ({
44
47
  minWidth="240px"
45
48
  minHeight="141px"
46
49
  padding="16px 24px"
47
- extraStyles="
50
+ extraStyles={`
48
51
  display: flex;
49
52
  flex-direction: column;
50
53
  align-items: flex-start;
51
54
  gap: 40px;
52
55
  flex-shrink: 0;
53
- align-self: stretch;"
56
+ align-self: stretch;
57
+ ${extraStyles}
58
+ `}
54
59
  hoverStyles={activeHoverStyles}
55
60
  activeStyles={activeHoverStyles}
56
- onClick={() => {
57
- navigate(path);
58
- }}
61
+ onClick={onClick}
59
62
  >
60
63
  <Stack childGap={0} bottomItem={3} fullHeight>
61
- <Box padding={"1rem 1rem 0 1rem"}>
64
+ <Box padding={"1rem 0 0 0"}>
62
65
  <Heading
63
66
  variant="h6"
64
67
  weight={FONT_WEIGHT_SEMIBOLD}
@@ -69,7 +72,7 @@ const LinkCard = ({
69
72
  {title}
70
73
  </Heading>
71
74
  </Box>
72
- <Box padding={"0 1rem 40px"} /* minHeight={"4.25rem"}*/>
75
+ <Box padding={"0 0 40px"}>
73
76
  <Paragraph
74
77
  variant="pS"
75
78
  color={themeValues.color}
@@ -97,8 +100,10 @@ const LinkCard = ({
97
100
  padding="0 1rem 1rem 1rem"
98
101
  >
99
102
  <Stack direction="row" justify="space-between">
100
- {showLeft && leftContent}
101
- {showRight && rightContent}
103
+ <Stack direction="row" childGap="6px">
104
+ {showLeft && leftContent}
105
+ {showRight && rightContent}
106
+ </Stack>
102
107
 
103
108
  {/* <Stack direction="row" childGap="6px">
104
109
  <Text
@@ -11,6 +11,9 @@ export interface LinkCardProps {
11
11
  leftContent?: JSX.Element;
12
12
  showRight?: boolean;
13
13
  rightContent?: JSX.Element;
14
+ onClick: () => void;
15
+ extraHoverStyles?: string;
16
+ extraStyles?: string;
14
17
  }
15
18
 
16
19
  export const LinkCard: React.FC<Expand<LinkCardProps> &
@@ -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
- // WHITE
9
+ const LINK_WATER = "#EBEFFB";
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,