@thecb/components 8.4.5-beta.7 → 8.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "8.4.5-beta.7",
3
+ "version": "8.4.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -19,7 +19,6 @@ const LinkCard = ({
19
19
  themeValues,
20
20
  titleVariant = "h3"
21
21
  }) => {
22
- console.log("LinkCard themeValues", themeValues);
23
22
  const { isMobile } = useContext(ThemeContext);
24
23
  const regex = /\W/g;
25
24
  const locatorSlug = title.toLowerCase().replaceAll(regex, "-");
@@ -33,7 +32,7 @@ const LinkCard = ({
33
32
  minWidth={isMobile ? "240px" : "288px"}
34
33
  minHeight="141px"
35
34
  padding="24px"
36
- themeValues={themeValues}
35
+ theme={themeValues}
37
36
  extraStyles={extraStyles}
38
37
  hoverStyles={extraHoverStyles}
39
38
  activeStyles={extraActiveStyles}
@@ -47,16 +46,12 @@ const LinkCard = ({
47
46
  fullHeight
48
47
  >
49
48
  <Box padding={0} width="100%">
50
- <Styled.Title
51
- variant={titleVariant}
52
- themeValues={themeValues}
53
- margin={0}
54
- >
49
+ <Styled.Title variant={titleVariant} theme={themeValues} margin={0}>
55
50
  {title}
56
51
  </Styled.Title>
57
52
  </Box>
58
53
  <Box padding={"0 0 40px"} width="100%">
59
- <Styled.Subtitle variant="pS" themeValues={themeValues}>
54
+ <Styled.Subtitle variant="pS" theme={themeValues}>
60
55
  {subtitle}
61
56
  </Styled.Subtitle>
62
57
  </Box>
@@ -66,12 +61,7 @@ const LinkCard = ({
66
61
  padding="0"
67
62
  width="100%"
68
63
  >
69
- <Styled.Footer
70
- themeValues={themeValues}
71
- direction="row"
72
- childGap="6px"
73
- justify="space-between"
74
- >
64
+ <Styled.Footer direction="row" childGap="6px" justify="space-between">
75
65
  {/* To keep rightContent aligned right, use an empty Box as leftContent if none is provided */}
76
66
  {showLeft && !leftContent && <Box />}
77
67
  {showLeft && leftContent}
@@ -84,4 +74,3 @@ const LinkCard = ({
84
74
  };
85
75
 
86
76
  export default themeComponent(LinkCard, "LinkCard", fallbackValues);
87
- // export default LinkCard;
@@ -8,7 +8,7 @@ import { text } from "@storybook/addon-knobs";
8
8
  import Badge from "../../atoms/badge/Badge";
9
9
  import PlusCircleIcon from "../../atoms/icons/PlusCircleIcon";
10
10
  import AutopayIcon from "../../atoms/icons/AutopayIcon";
11
-
11
+ import { CORNFLOWER_BLUE, ROYAL_BLUE_VIVID } from "../../../constants/colors";
12
12
  const groupId = "props";
13
13
 
14
14
  export const linkCard = () => (
@@ -27,20 +27,20 @@ export const linkCard = () => (
27
27
  <Stack direction="row" childGap="6px">
28
28
  <Text
29
29
  variant="pS"
30
- color={themeValues.color}
30
+ color={ROYAL_BLUE_VIVID}
31
31
  extraStyles="text-align: right; color: transparent;"
32
32
  className="show-on-hover"
33
33
  >
34
34
  Find
35
35
  </Text>
36
- <PlusCircleIcon color={themeValues.color} />
36
+ <PlusCircleIcon color={ROYAL_BLUE_VIVID} />
37
37
  </Stack>
38
38
  }
39
39
  extraHoverStyles={`
40
- .show-on-hover {color: ${themeValues.color};}
40
+ .show-on-hover {color: ${ROYAL_BLUE_VIVID};}
41
41
  `}
42
42
  extraActiveStyles={`
43
- background-color: ${themeValues.activeBackgroundColor};
43
+ background-color: ${CORNFLOWER_BLUE};
44
44
  `}
45
45
  />
46
46
  );
@@ -14,9 +14,9 @@ export const Container = styled(Box)`
14
14
  flex-shrink: 0;
15
15
  align-self: stretch;
16
16
  border-radius: 8px;
17
- ${({ themeValues }) => `
18
- background-color: ${themeValues.backgroundColor};
19
- border: 1px solid ${themeValues.borderColor};
17
+ ${({ theme }) => `
18
+ background-color: ${theme.backgroundColor};
19
+ border: 1px solid ${theme.borderColor};
20
20
  `}
21
21
  transition: all .2s ease-in-out;
22
22
 
@@ -32,13 +32,13 @@ export const Container = styled(Box)`
32
32
  }
33
33
 
34
34
  &:hover:not(:active) {
35
- ${({ themeValues }) => `border: 1px solid ${themeValues.borderColor};`}
35
+ ${({ theme }) => `border: 1px solid ${theme.borderColor};`}
36
36
  }
37
37
 
38
38
  &:active {
39
- ${({ themeValues }) => `
40
- background-color: ${themeValues.activeBackgroundColor};
41
- border: 1px solid ${themeValues.color};
39
+ ${({ theme }) => `
40
+ background-color: ${theme.activeBackgroundColor};
41
+ border: 1px solid ${theme.color};
42
42
  ;`}
43
43
  }
44
44
  `;
@@ -54,7 +54,7 @@ export const Title = styled(Heading)`
54
54
  line-height: 150%;
55
55
  background-color: transparent;
56
56
  font-weight: ${FONT_WEIGHT_SEMIBOLD};
57
- ${({ themeValues }) => `color: ${themeValues.color};`};
57
+ ${({ theme }) => `color: ${theme.color};`};
58
58
  `;
59
59
 
60
60
  export const Subtitle = styled(Paragraph)`
@@ -68,7 +68,7 @@ export const Subtitle = styled(Paragraph)`
68
68
  line-height: 150 %;
69
69
  letter-spacing: 0.14px;
70
70
  font-weight: ${FONT_WEIGHT_SEMIBOLD};
71
- ${({ themeValues }) => `color: ${themeValues.color};`};
71
+ ${({ theme }) => `color: ${theme.color};`};
72
72
  `;
73
73
 
74
74
  export const Footer = styled(Stack)`