@codecademy/brand 1.22.0 → 1.23.0-alpha.56f053dc94.0
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/FeatureList/index.d.ts +11 -0
- package/dist/FeatureList/index.js +40 -0
- package/dist/LandingPage/CTA.d.ts +1 -0
- package/dist/LandingPage/Feature.d.ts +9 -1
- package/dist/LandingPage/Feature.js +15 -7
- package/dist/LandingPage/LiveLearning/PageFeatures.d.ts +10 -0
- package/dist/LandingPage/LiveLearning/PageFeatures.js +167 -0
- package/dist/LandingPage/PageFAQs.d.ts +10 -0
- package/dist/LandingPage/PageFAQs.js +41 -0
- package/dist/LandingPage/PageFeaturedLiveCourse.d.ts +8 -0
- package/dist/LandingPage/PageFeaturedLiveCourse.js +105 -0
- package/dist/LandingPage/PageFeatures.js +47 -45
- package/dist/LandingPage/PageFeaturesWithReferences.d.ts +19 -0
- package/dist/LandingPage/PageFeaturesWithReferences.js +144 -0
- package/dist/LandingPage/PageLiveLearningCourses.d.ts +40 -0
- package/dist/LandingPage/PageLiveLearningCourses.js +244 -0
- package/dist/LandingPage/PageSingleFeature.d.ts +5 -0
- package/dist/LandingPage/PageSingleFeature.js +6 -1
- package/dist/LandingPage/PageTestimonials.d.ts +21 -0
- package/dist/LandingPage/PageTestimonials.js +115 -0
- package/dist/LandingPage/TitleWithEyebrow.d.ts +3 -0
- package/dist/LandingPage/TitleWithEyebrow.js +5 -1
- package/dist/LandingPage/index.d.ts +7 -0
- package/dist/LandingPage/index.js +8 -1
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WithChildrenProp } from '@codecademy/gamut';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Eyebrow } from './PageSingleFeature';
|
|
4
|
+
import { LandingPageBaseProps } from './types';
|
|
5
|
+
export interface LiveLearningTestimonialItem {
|
|
6
|
+
image: {
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
jobTitle: string;
|
|
12
|
+
company: string;
|
|
13
|
+
shortQuote: string;
|
|
14
|
+
longQuote: string;
|
|
15
|
+
href: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PageTestimonialsProps extends LandingPageBaseProps, WithChildrenProp {
|
|
18
|
+
eyebrow?: Eyebrow;
|
|
19
|
+
testimonials?: LiveLearningTestimonialItem[];
|
|
20
|
+
}
|
|
21
|
+
export declare const PageTestimonials: React.FC<PageTestimonialsProps>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Box, Column, LayoutGrid, Text } from '@codecademy/gamut';
|
|
2
|
+
import { DataTransferVerticalIcon, PersonFilledIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Avatar } from '../Avatar';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const TestimonialCard = ({
|
|
7
|
+
testimonial
|
|
8
|
+
}) => {
|
|
9
|
+
const fullName = testimonial?.firstName + ' ' + testimonial?.lastName;
|
|
10
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
11
|
+
borderColor: "black",
|
|
12
|
+
borderStyle: "solid",
|
|
13
|
+
borderWidth: 1,
|
|
14
|
+
height: "100%",
|
|
15
|
+
p: {
|
|
16
|
+
xl: 96,
|
|
17
|
+
lg: 64,
|
|
18
|
+
md: 32,
|
|
19
|
+
sm: 32,
|
|
20
|
+
xs: 24,
|
|
21
|
+
_: 24
|
|
22
|
+
},
|
|
23
|
+
children: [/*#__PURE__*/_jsx(DataTransferVerticalIcon, {
|
|
24
|
+
size: 28
|
|
25
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
26
|
+
mt: 12,
|
|
27
|
+
mb: 32,
|
|
28
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
29
|
+
fontWeight: "bold",
|
|
30
|
+
lineHeight: {
|
|
31
|
+
sm: 'base'
|
|
32
|
+
},
|
|
33
|
+
fontSize: 18,
|
|
34
|
+
children: testimonial?.longQuote
|
|
35
|
+
})
|
|
36
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
37
|
+
display: "flex",
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
gap: 12,
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
42
|
+
background: "#66C4FF",
|
|
43
|
+
borderRadius: "full",
|
|
44
|
+
width: 64,
|
|
45
|
+
height: 64,
|
|
46
|
+
display: "flex",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
justifyContent: "center",
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
borderColor: "black",
|
|
51
|
+
borderStyle: "solid",
|
|
52
|
+
minWidth: 64,
|
|
53
|
+
minHeight: 64,
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
children: testimonial?.image?.url ? /*#__PURE__*/_jsx(Avatar, {
|
|
56
|
+
src: testimonial?.image?.url,
|
|
57
|
+
alt: fullName || 'N/A',
|
|
58
|
+
size: 64,
|
|
59
|
+
disableDropshadow: true
|
|
60
|
+
}) : /*#__PURE__*/_jsx(PersonFilledIcon, {
|
|
61
|
+
color: "black",
|
|
62
|
+
size: 60,
|
|
63
|
+
mt: 12,
|
|
64
|
+
borderRadius: "full"
|
|
65
|
+
})
|
|
66
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
67
|
+
display: "flex",
|
|
68
|
+
flexDirection: "column",
|
|
69
|
+
gap: 4,
|
|
70
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
71
|
+
fontWeight: "bold",
|
|
72
|
+
fontSize: 16,
|
|
73
|
+
children: fullName
|
|
74
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
75
|
+
fontSize: 16,
|
|
76
|
+
color: "gray-800",
|
|
77
|
+
children: testimonial?.jobTitle
|
|
78
|
+
})]
|
|
79
|
+
})]
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
const TestimonialCards = ({
|
|
84
|
+
testimonials
|
|
85
|
+
}) => {
|
|
86
|
+
const totalCount = testimonials?.length || 0;
|
|
87
|
+
return testimonials?.map((item, index) => {
|
|
88
|
+
const isLastItem = index === totalCount - 1;
|
|
89
|
+
const isAloneAtSm = isLastItem && totalCount % 2 === 1;
|
|
90
|
+
return /*#__PURE__*/_jsx(Column, {
|
|
91
|
+
size: {
|
|
92
|
+
_: 12,
|
|
93
|
+
xs: 12,
|
|
94
|
+
sm: isAloneAtSm ? 12 : 6,
|
|
95
|
+
md: 4,
|
|
96
|
+
lg: 4,
|
|
97
|
+
xl: 4
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/_jsx(TestimonialCard, {
|
|
100
|
+
testimonial: item
|
|
101
|
+
})
|
|
102
|
+
}, item.lastName.replaceAll(' ', '-'));
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
export const PageTestimonials = ({
|
|
106
|
+
testimonials,
|
|
107
|
+
testId
|
|
108
|
+
}) => {
|
|
109
|
+
return /*#__PURE__*/_jsx(LayoutGrid, {
|
|
110
|
+
"data-testid": testId,
|
|
111
|
+
children: testimonials && testimonials?.length > 0 && /*#__PURE__*/_jsx(TestimonialCards, {
|
|
112
|
+
testimonials: testimonials
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { TextProps } from '@codecademy/gamut';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Eyebrow } from './PageSingleFeature';
|
|
3
4
|
export interface TitleWithEyebrowProps {
|
|
4
5
|
eyebrow: Eyebrow;
|
|
5
6
|
title: string | undefined;
|
|
6
7
|
isPageHeading: boolean | undefined;
|
|
8
|
+
titleStyle?: Omit<TextProps, 'as' | 'truncateLines' | 'truncate'>;
|
|
9
|
+
eyebrowStyle?: Omit<TextProps, 'as' | 'truncateLines' | 'truncate'>;
|
|
7
10
|
}
|
|
8
11
|
export declare const TitleWithEyebrow: React.FC<TitleWithEyebrowProps>;
|
|
@@ -5,7 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
export const TitleWithEyebrow = ({
|
|
6
6
|
title,
|
|
7
7
|
eyebrow,
|
|
8
|
-
isPageHeading
|
|
8
|
+
isPageHeading,
|
|
9
|
+
titleStyle,
|
|
10
|
+
eyebrowStyle
|
|
9
11
|
}) => /*#__PURE__*/_jsxs("div", {
|
|
10
12
|
children: [/*#__PURE__*/_jsx(Title, {
|
|
11
13
|
isPageHeading: isPageHeading,
|
|
@@ -18,6 +20,7 @@ export const TitleWithEyebrow = ({
|
|
|
18
20
|
mb: 16,
|
|
19
21
|
display: "block",
|
|
20
22
|
color: eyebrow.accent ? 'blue' : undefined,
|
|
23
|
+
...eyebrowStyle,
|
|
21
24
|
children: eyebrow.text
|
|
22
25
|
})
|
|
23
26
|
}), /*#__PURE__*/_jsx(Text, {
|
|
@@ -31,6 +34,7 @@ export const TitleWithEyebrow = ({
|
|
|
31
34
|
},
|
|
32
35
|
fontWeight: 700,
|
|
33
36
|
lineHeight: "title",
|
|
37
|
+
...titleStyle,
|
|
34
38
|
children: title
|
|
35
39
|
})]
|
|
36
40
|
});
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export * from './PageHero';
|
|
2
2
|
export * from './PageSingleFeature';
|
|
3
3
|
export * from './PageFeatures';
|
|
4
|
+
export * from './LiveLearning/PageFeatures';
|
|
5
|
+
export * from './PageFeaturesWithReferences';
|
|
4
6
|
export * from './PagePrefooter';
|
|
5
7
|
export * from './PageVideoGallery';
|
|
6
8
|
export * from './types';
|
|
7
9
|
export * from './Title';
|
|
8
10
|
export * from './TitleWithEyebrow';
|
|
9
11
|
export * from './Description';
|
|
12
|
+
export * from './PageLiveLearningCourses';
|
|
13
|
+
export * from './PageTestimonials';
|
|
14
|
+
export * from './PageFAQs';
|
|
15
|
+
export * from './PageFeaturedLiveCourse';
|
|
16
|
+
export * from '../FeatureList';
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export * from './PageHero';
|
|
2
2
|
export * from './PageSingleFeature';
|
|
3
3
|
export * from './PageFeatures';
|
|
4
|
+
export * from './LiveLearning/PageFeatures';
|
|
5
|
+
export * from './PageFeaturesWithReferences';
|
|
4
6
|
export * from './PagePrefooter';
|
|
5
7
|
export * from './PageVideoGallery';
|
|
6
8
|
export * from './types';
|
|
7
9
|
export * from './Title';
|
|
8
10
|
export * from './TitleWithEyebrow';
|
|
9
|
-
export * from './Description';
|
|
11
|
+
export * from './Description';
|
|
12
|
+
export * from './PageLiveLearningCourses';
|
|
13
|
+
export * from './PageTestimonials';
|
|
14
|
+
export * from './PageFAQs';
|
|
15
|
+
export * from './PageFeaturedLiveCourse';
|
|
16
|
+
export * from '../FeatureList';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/brand",
|
|
3
3
|
"description": "Brand component library for Codecademy",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0-alpha.56f053dc94.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@codecademy/gamut-illustrations": "*",
|
|
32
32
|
"@codecademy/gamut-patterns": "*",
|
|
33
33
|
"@codecademy/gamut-styles": "*",
|
|
34
|
-
"@codecademy/tracking": "1.
|
|
34
|
+
"@codecademy/tracking": "1.2.0-alpha.56f053dc94.0",
|
|
35
35
|
"@codecademy/variance": "*",
|
|
36
36
|
"@emotion/react": "^11.4.0",
|
|
37
37
|
"@emotion/styled": "^11.3.0",
|