@thecb/components 11.2.4-beta.0 → 11.2.4-beta.1

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": "11.2.4-beta.0",
3
+ "version": "11.2.4-beta.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,6 +21,7 @@ const ExternalLink = forwardRef(
21
21
  tabIndex = "0",
22
22
  dataQa,
23
23
  ariaLabel,
24
+ isUnderlined = true,
24
25
  children
25
26
  },
26
27
  ref
@@ -60,6 +61,7 @@ const ExternalLink = forwardRef(
60
61
  rel={newTab ? "noopener" : ""}
61
62
  data-qa={dataQa}
62
63
  aria-label={ariaLabel}
64
+ isUnderlined={isUnderlined}
63
65
  ref={ref}
64
66
  >
65
67
  {safeChildren(children, <span />)}
@@ -22,15 +22,18 @@ export const StyledExternalLink = styled(
22
22
  font-weight: ${({ weight }) => weight};
23
23
  font-family: ${({ fontFamily }) => fontFamily};
24
24
  line-height: ${({ lineheight }) => lineheight};
25
- text-decoration: ${LINK_TEXT_DECORATION};
25
+ text-decoration: ${({ isUnderlined }) =>
26
+ isUnderlined ? LINK_TEXT_DECORATION : "none"};
26
27
 
27
28
  &:hover {
28
29
  color: ${({ hoverColor }) => hoverColor};
30
+ text-decoration: ${LINK_TEXT_DECORATION};
29
31
  }
30
32
 
31
33
  &:focus {
32
34
  outline: 3px solid ${ROYAL_BLUE};
33
35
  outline-offset: 2px;
36
+ text-decoration: ${LINK_TEXT_DECORATION};
34
37
  }
35
38
 
36
39
  &:active {
@@ -19,7 +19,8 @@ const InternalLink = forwardRef(
19
19
  margin,
20
20
  tabIndex = "0",
21
21
  dataQa,
22
- extraStyles = ``
22
+ extraStyles = ``,
23
+ isUnderlined = true
23
24
  },
24
25
  ref
25
26
  ) => {
@@ -46,6 +47,7 @@ const InternalLink = forwardRef(
46
47
  tabIndex={tabIndex}
47
48
  extrastyles={extraStyles}
48
49
  data-qa={dataQa}
50
+ isUnderlined={isUnderlined}
49
51
  ref={ref}
50
52
  >
51
53
  {safeChildren(children, <span />)}
@@ -28,15 +28,18 @@ export const StyledInternalLink = styled(
28
28
  font-size: ${({ fontSize }) => fontSize};
29
29
  font-family: ${({ fontFamily }) => fontFamily};
30
30
  margin: ${({ margin }) => margin};
31
- text-decoration: ${LINK_TEXT_DECORATION};
31
+ text-decoration: ${({ isUnderlined }) =>
32
+ isUnderlined ? LINK_TEXT_DECORATION : "none"};
32
33
 
33
34
  &:hover {
34
35
  color: ${({ hoverColor }) => hoverColor};
36
+ text-decoration: ${LINK_TEXT_DECORATION};
35
37
  }
36
38
 
37
39
  &:focus {
38
40
  outline: 3px solid ${ROYAL_BLUE};
39
41
  outline-offset: 2px;
42
+ text-decoration: ${LINK_TEXT_DECORATION};
40
43
  }
41
44
 
42
45
  &:active {
@@ -42,7 +42,7 @@ const ContactCard = ({
42
42
  background={WHITE}
43
43
  boxShadow="0px 2px 4px rgba(0, 0, 0, 0.25)"
44
44
  dataQa={createIdFromString(title, "contact-card")}
45
- maxWidth={isMobile ? "100%" : "208px"}
45
+ maxWidth="100%"
46
46
  minWidth={isMobile ? "240px" : "208px"}
47
47
  minHeight="141px"
48
48
  padding="1.5rem"
@@ -108,14 +108,15 @@ const ContactCard = ({
108
108
  dataQa={linkID}
109
109
  href={link.link}
110
110
  newTab={true}
111
+ isUnderlined={false}
111
112
  extraStyles={`
112
- flex-direction: row;
113
- align-items: center;
114
- align-content: flex-start;
115
- justify-content: space-between;
116
- word-break: break-word;
117
- ${TextWrapStyles}
118
- `}
113
+ flex-direction: row;
114
+ align-items: center;
115
+ align-content: flex-start;
116
+ justify-content: space-between;
117
+ word-break: break-word;
118
+ ${TextWrapStyles}
119
+ `}
119
120
  size={FONT_SIZE.SM}
120
121
  lineHeight="1.313rem"
121
122
  >
@@ -132,10 +133,14 @@ const ContactCard = ({
132
133
  to={link.link}
133
134
  dataQa={linkID}
134
135
  fontSize={FONT_SIZE.SM}
136
+ color={linkThemeValues.externalLinkColor}
137
+ isUnderlined={false}
138
+ active={false}
139
+ lineheight="1.313rem"
135
140
  extraStyles={`
136
- word-break: break-word;
137
- ${TextWrapStyles}
138
- `}
141
+ word-break: break-word;
142
+ ${TextWrapStyles}
143
+ `}
139
144
  >
140
145
  {link.text}
141
146
  </InternalLink>
@@ -60,6 +60,10 @@ export const BasicContactCard = {
60
60
  content:
61
61
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod",
62
62
  links: [
63
+ {
64
+ text: "Wallet Login",
65
+ link: "/login"
66
+ },
63
67
  {
64
68
  text: "Cityville Home",
65
69
  link: "https://cityville-demos.uat.cityba.se/"