@thecb/components 11.2.6-beta.1 → 11.2.6-beta.2

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.6-beta.1",
3
+ "version": "11.2.6-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -58,9 +58,9 @@ const ExternalLink = forwardRef(
58
58
  activeColor={themeValues.activeColor}
59
59
  fontFamily={themeValues.fontFamily}
60
60
  tabIndex={tabIndex}
61
- extrastyles={`${
61
+ extrastyles={`text-decoration: ${
62
62
  isUnderlined ? LINK_TEXT_DECORATION : "none"
63
- } ${extraStyles}`}
63
+ }; ${extraStyles}`}
64
64
  rel={newTab ? "noopener" : ""}
65
65
  data-qa={dataQa}
66
66
  aria-label={ariaLabel}
@@ -46,9 +46,9 @@ const InternalLink = forwardRef(
46
46
  hoverColor={themeValues.hoverColor}
47
47
  activeColor={themeValues.activeColor}
48
48
  tabIndex={tabIndex}
49
- extrastyles={`${
49
+ extrastyles={`text-decoration: ${
50
50
  isUnderlined ? LINK_TEXT_DECORATION : "none"
51
- } ${extraStyles}`}
51
+ }; ${extraStyles}`}
52
52
  data-qa={dataQa}
53
53
  ref={ref}
54
54
  >
@@ -30,68 +30,66 @@ const HeroImage = ({
30
30
 
31
31
  return (
32
32
  <>
33
- {imageUrl && (
34
- <Styled.HeroImageContainer
35
- minWidth={minWidth}
36
- minHeight={minHeight}
37
- padding={paddingOverride ?? (isMobile ? "2rem" : "3rem 5.75rem")}
38
- extraStyles={Styled.getHeroImageVariantStyles({
39
- imageUrl,
40
- isMobile,
41
- variant,
42
- gradientColorPrimary: themeValues.gradientColorPrimary,
43
- gradientColorSecondary: themeValues.gradientColorSecondary
44
- })}
33
+ <Styled.HeroImageContainer
34
+ minWidth={minWidth}
35
+ minHeight={minHeight}
36
+ padding={paddingOverride ?? (isMobile ? "2rem" : "3rem 5.75rem")}
37
+ extraStyles={Styled.getHeroImageVariantStyles({
38
+ imageUrl,
39
+ isMobile,
40
+ variant,
41
+ heroPrimaryColor: themeValues.heroPrimaryColor,
42
+ heroSecondaryColor: themeValues.heroSecondaryColor
43
+ })}
44
+ >
45
+ <Center
46
+ maxWidth={"78.5rem"}
47
+ width={"100%"}
48
+ intrinsic
49
+ extraStyles={`
50
+ flex-flow: unset;
51
+ justify-content: flex-start;
52
+ flex-wrap: nowrap;"
53
+ `}
45
54
  >
46
- <Center
47
- maxWidth={"78.5rem"}
48
- width={"100%"}
49
- intrinsic
50
- extraStyles={`
51
- flex-flow: unset;
52
- justify-content: flex-start;
53
- flex-wrap: nowrap;"
54
- `}
55
+ <Stack
56
+ childGap={contentSpacing}
57
+ extraStyles={`max-width: ${isMobile ? "100%" : "50%"};`}
55
58
  >
56
- <Stack
57
- childGap={contentSpacing}
58
- extraStyles={`max-width: ${isMobile ? "100%" : "50%"};`}
59
- >
60
- <Stack childGap="0">
61
- <Title
62
- variant="hero"
63
- as={headingVariant}
64
- weight={FONT_WEIGHT_BOLD}
65
- color={themeValues.textColor}
66
- extraStyles={`line-height: ${isMobile ? "125%" : "115%"};`}
67
- >
68
- {heading}
69
- </Title>
70
- <Title
71
- variant={"large"}
72
- as={secondaryHeadingVariant}
73
- weight={FONT_WEIGHT_SEMIBOLD}
74
- fontSize={isMobile ? "1.5rem" : "2rem"}
75
- color={themeValues.textColor}
76
- extraStyles={`line-height: ${isMobile ? "150%" : "115%"};`}
77
- >
78
- {subheading}
79
- </Title>
80
- </Stack>
81
- <Box padding="0">
82
- <Paragraph
83
- color={themeValues.textColor}
84
- extraStyles={`line-height: ${
85
- isMobile ? "150%" : "115%"
86
- }; ${!isMobile && `font-size: 1.125rem;`}`}
87
- >
88
- {description}
89
- </Paragraph>
90
- </Box>
59
+ <Stack childGap="0">
60
+ <Title
61
+ variant="hero"
62
+ as={headingVariant}
63
+ weight={FONT_WEIGHT_BOLD}
64
+ color={themeValues.heroTextColor}
65
+ extraStyles={`line-height: ${isMobile ? "125%" : "115%"};`}
66
+ >
67
+ {heading}
68
+ </Title>
69
+ <Title
70
+ variant={"large"}
71
+ as={secondaryHeadingVariant}
72
+ weight={FONT_WEIGHT_SEMIBOLD}
73
+ fontSize={isMobile ? "1.5rem" : "2rem"}
74
+ color={themeValues.heroTextColor}
75
+ extraStyles={`line-height: ${isMobile ? "150%" : "115%"};`}
76
+ >
77
+ {subheading}
78
+ </Title>
91
79
  </Stack>
92
- </Center>
93
- </Styled.HeroImageContainer>
94
- )}
80
+ <Box padding="0">
81
+ <Paragraph
82
+ color={themeValues.heroTextColor}
83
+ extraStyles={`line-height: ${
84
+ isMobile ? "150%" : "115%"
85
+ }; ${!isMobile && `font-size: 1.125rem;`}`}
86
+ >
87
+ {description}
88
+ </Paragraph>
89
+ </Box>
90
+ </Stack>
91
+ </Center>
92
+ </Styled.HeroImageContainer>
95
93
  </>
96
94
  );
97
95
  };
@@ -11,10 +11,7 @@ const meta = {
11
11
  heading: "Cityville",
12
12
  subheading: "Payment Center",
13
13
  description:
14
- "Find and make payments quickly and conveniently from your computer or phone.",
15
- imageUrl:
16
- "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?q=80&w=1844&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
17
- contentSpacing: "0.5rem"
14
+ "Find and make payments quickly and conveniently from your computer or phone."
18
15
  },
19
16
  argTypes: {
20
17
  heading: {
@@ -92,6 +89,17 @@ export const DesktopV1 = {
92
89
  args: {
93
90
  variant: "v1",
94
91
  minWidth: "1000px",
95
- minHeight: "274px"
92
+ minHeight: "274px",
93
+ imageUrl:
94
+ "https://cb-public-assets.s3-us-west-2.amazonaws.com/cityville/hero.png"
95
+ }
96
+ };
97
+
98
+ export const NoImage = {
99
+ args: {
100
+ variant: "v1",
101
+ minWidth: "1000px",
102
+ minHeight: "274px",
103
+ imageUrl: undefined
96
104
  }
97
105
  };
@@ -6,21 +6,21 @@ export const getHeroImageVariantStyles = ({
6
6
  imageUrl,
7
7
  isMobile,
8
8
  variant,
9
- gradientColorPrimary,
10
- gradientColorSecondary
9
+ heroPrimaryColor,
10
+ heroSecondaryColor
11
11
  }) => {
12
12
  return css`
13
13
  background: ${!isMobile
14
14
  ? `linear-gradient(
15
15
  90deg,
16
- ${gradientColorPrimary} 33%,
16
+ ${heroPrimaryColor} 33%,
17
17
  transparent 100%
18
18
  )`
19
19
  : `linear-gradient(
20
- ${rgba(gradientColorPrimary, 0.8)},
21
- ${rgba(gradientColorPrimary, 0.8)}
20
+ ${rgba(heroPrimaryColor, 0.8)},
21
+ ${rgba(heroPrimaryColor, 0.8)}
22
22
  )`},
23
- url(${imageUrl}) center / cover no-repeat;
23
+ url(${imageUrl}) center / cover no-repeat, ${heroPrimaryColor};
24
24
  `;
25
25
  };
26
26
 
@@ -4,12 +4,12 @@ import {
4
4
  WHITE
5
5
  } from "../../../constants/colors";
6
6
 
7
- const gradientColorPrimary = ROYAL_BLUE_VIVID;
8
- const gradientColorSecondary = MATISSE_BLUE;
9
- const textColor = WHITE;
7
+ const heroPrimaryColor = ROYAL_BLUE_VIVID;
8
+ const heroSecondaryColor = MATISSE_BLUE;
9
+ const heroTextColor = WHITE;
10
10
 
11
11
  export const fallbackValues = {
12
- gradientColorPrimary,
13
- gradientColorSecondary,
14
- textColor
12
+ heroPrimaryColor,
13
+ heroSecondaryColor,
14
+ heroTextColor
15
15
  };
@@ -37,6 +37,7 @@ const RegistrationBanner = ({
37
37
  justify="space-between"
38
38
  overflow="visible"
39
39
  isMobile={isMobile}
40
+ nowrap
40
41
  >
41
42
  <Box padding="0" textAlign="left">
42
43
  <Heading
@@ -46,18 +47,18 @@ const RegistrationBanner = ({
46
47
  variant={titleVariant}
47
48
  weight={FONT_WEIGHT_SEMIBOLD}
48
49
  >
49
- Register for a {clientName} Wallet Account
50
+ Register for a {clientName} Wallet
50
51
  </Heading>
51
52
  <Text
52
53
  extraStyles={`
53
54
  display: block;
54
55
  padding: ${isMobile ? ".125rem 0 1rem" : "0"}
55
56
  `}
56
- fontSize={isMobile ? FONT_SIZE.SM : FONT_SIZE.LG}
57
+ fontSize={isMobile ? FONT_SIZE.MD : FONT_SIZE.LG}
57
58
  color={themeValues.secondaryColor}
58
59
  >
59
- Save payment methods and information for fast, easy, and safe
60
- payments with {clientName}
60
+ Save payment methods and billing information for fast, easy, and
61
+ safe payments with {clientName}
61
62
  </Text>
62
63
  </Box>
63
64
  <Styled.ButtonContainer
@@ -73,7 +74,11 @@ const RegistrationBanner = ({
73
74
  fontWeight={FONT_WEIGHT_SEMIBOLD}
74
75
  url={registrationLink}
75
76
  >
76
- <Cluster justify="center" align="center">
77
+ <Cluster
78
+ justify="center"
79
+ align="center"
80
+ extraStyles="min-width: 100%"
81
+ >
77
82
  <Text
78
83
  extraStyles="margin-right: 0.5rem"
79
84
  fontSize={isMobile ? FONT_SIZE.MD : FONT_SIZE.LG}
@@ -6,12 +6,12 @@ import { adjustHexColor } from "../../../util/general";
6
6
  export const BannerContainer = styled(Cluster)`
7
7
  background: ${({ themeValues }) =>
8
8
  adjustHexColor(themeValues.background, 10, "lighten")};
9
- padding: ${({ isMobile }) => (isMobile ? "1rem 2rem" : " 2rem 8.25rem")};
9
+ padding: 2rem;
10
10
  `;
11
11
 
12
12
  export const ContentContainer = styled(Cluster)`
13
13
  padding: 0;
14
- width: ${({ isMobile }) => (isMobile ? "296px" : " 1176px")};
14
+ width: ${({ isMobile }) => (isMobile ? "100%" : " 1224px")};
15
15
  > div {
16
16
  flex-direction: ${({ isMobile }) => (isMobile ? "column" : "row")};
17
17
  }
@@ -19,8 +19,10 @@ export const ContentContainer = styled(Cluster)`
19
19
 
20
20
  export const ButtonContainer = styled(Stack)`
21
21
  align-items: center;
22
- > a {
23
- width: ${({ isMobile }) => (isMobile ? "296px" : "222px")};
22
+ width: ${({ isMobile }) => (isMobile ? "100%" : "222px")};
23
+ padding-left: ${({ isMobile }) => (isMobile ? "0" : "2rem")};
24
+ > * {
25
+ width: inherit;
24
26
  }
25
27
  `;
26
28
 
@@ -37,6 +37,7 @@ const TabSidebar = ({ links, isMobile, themeValues, minHeight = "100%" }) => (
37
37
  key={`${route}-${index}`}
38
38
  extraStyles={`text-decoration: none;
39
39
  &:hover {
40
+ text-decoration: none;
40
41
  ${
41
42
  active
42
43
  ? `> * {