@codecademy/brand 1.26.0-alpha.a637f012cc.0 → 1.26.0-alpha.a6e7975a97.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/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +4 -0
- package/dist/GlobalHeader/GlobalHeaderItems.d.ts +1 -1
- package/dist/GlobalHeader/GlobalHeaderItems.js +2 -2
- package/dist/GlobalHeader/GlobalHeaderVariants.js +8 -8
- package/dist/lib/catalogList/index.js +2 -2
- package/dist/lib/resourcesList/index.js +3 -3
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ export declare const loading: AppHeaderRenderElementItem;
|
|
|
4
4
|
export declare const logo: AppHeaderLogoItem;
|
|
5
5
|
export declare const enterpriseLogo: (user: User, removeAnchorLink?: boolean) => AppHeaderLogoItem;
|
|
6
6
|
export declare const myHome: AppHeaderLinkItem;
|
|
7
|
-
export declare const liveLearningHub:
|
|
7
|
+
export declare const liveLearningHub: AppHeaderLinkItem;
|
|
8
8
|
export declare const myPercipioHome: (user: User, customTitle?: string) => AppHeaderLinkItem;
|
|
9
9
|
export declare const catalogDropdown: (hideCareerPaths?: boolean) => AppHeaderCatalogDropdownItem;
|
|
10
10
|
export declare const resourcesDropdown: () => AppHeaderResourcesDropdownItem;
|
|
@@ -47,7 +47,7 @@ export const myHome = {
|
|
|
47
47
|
trackingTarget: 'topnav_home',
|
|
48
48
|
type: 'link'
|
|
49
49
|
};
|
|
50
|
-
export const liveLearningHub =
|
|
50
|
+
export const liveLearningHub = {
|
|
51
51
|
dataTestId: 'header-live-learning-hub',
|
|
52
52
|
icon: OnlineClassStudentIcon,
|
|
53
53
|
id: 'live-learning-hub',
|
|
@@ -56,7 +56,7 @@ export const liveLearningHub = () => ({
|
|
|
56
56
|
trackingTarget: 'topnav_live_learning_hub',
|
|
57
57
|
type: 'link',
|
|
58
58
|
badge: renderNewBadge(4)
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
export const myPercipioHome = (user, customTitle) => {
|
|
61
61
|
return {
|
|
62
62
|
dataTestId: 'header-percihome',
|
|
@@ -12,7 +12,7 @@ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isLiveLea
|
|
|
12
12
|
...logo,
|
|
13
13
|
checkMini: true
|
|
14
14
|
};
|
|
15
|
-
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
15
|
+
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions];
|
|
16
16
|
const rightItems = [];
|
|
17
17
|
if (renderLogin) {
|
|
18
18
|
rightItems.push(login);
|
|
@@ -38,7 +38,7 @@ const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isL
|
|
|
38
38
|
if (renderSignUp) {
|
|
39
39
|
rightItems.push(signUp);
|
|
40
40
|
}
|
|
41
|
-
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
41
|
+
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions];
|
|
42
42
|
return {
|
|
43
43
|
left: leftItems,
|
|
44
44
|
right: rightItems,
|
|
@@ -74,7 +74,7 @@ export const freeHeaderItems = (user, hidePricing, isLiveLearningHubEnabled) =>
|
|
|
74
74
|
...logo,
|
|
75
75
|
checkMini: true
|
|
76
76
|
};
|
|
77
|
-
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
77
|
+
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions];
|
|
78
78
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
79
79
|
const rightItems = [];
|
|
80
80
|
rightItems.push(freeProfile(user));
|
|
@@ -92,7 +92,7 @@ export const freeMobileHeaderItems = (user, hidePricing, isLiveLearningHubEnable
|
|
|
92
92
|
const leftItems = [specialLogo];
|
|
93
93
|
const rightItems = [];
|
|
94
94
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
95
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
95
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions, freeProfile(user, true), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
|
|
96
96
|
return {
|
|
97
97
|
left: leftItems,
|
|
98
98
|
right: rightItems,
|
|
@@ -113,7 +113,7 @@ export const enterpriseHeaderItems = (user, props) => {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
export const proHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
116
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []),
|
|
116
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions];
|
|
117
117
|
const rightItems = [];
|
|
118
118
|
rightItems.push(proProfile(user));
|
|
119
119
|
if (user.isPaused) {
|
|
@@ -125,7 +125,7 @@ export const proHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
export const teamsHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
128
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(),
|
|
128
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), isLiveLearningHubEnabled ? liveLearningHub : careerCenter];
|
|
129
129
|
const rightItems = [];
|
|
130
130
|
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
131
131
|
rightItems.push(addPayment);
|
|
@@ -155,7 +155,7 @@ export const enterpriseMobileHeaderItems = (user, props) => {
|
|
|
155
155
|
export const proMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
156
156
|
const leftItems = [logo];
|
|
157
157
|
const rightItems = [];
|
|
158
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []),
|
|
158
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, businessSolutions, proProfile(user)];
|
|
159
159
|
if (user.isPaused) {
|
|
160
160
|
mainMenuItems.push(unpausePro);
|
|
161
161
|
}
|
|
@@ -168,7 +168,7 @@ export const proMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
168
168
|
export const teamsMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
169
169
|
const leftItems = [logo];
|
|
170
170
|
const rightItems = [];
|
|
171
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(),
|
|
171
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), isLiveLearningHubEnabled ? liveLearningHub : careerCenter, proProfile(user)];
|
|
172
172
|
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
173
173
|
mainMenuItems.push(addPayment);
|
|
174
174
|
}
|
|
@@ -43,7 +43,7 @@ export const liveLearningHubItems = {
|
|
|
43
43
|
description: 'Build skills faster through live learning with expert instructors.',
|
|
44
44
|
data: [{
|
|
45
45
|
id: 'bootcamps',
|
|
46
|
-
href: '/live-learning
|
|
46
|
+
href: '/live-learning',
|
|
47
47
|
text: 'Bootcamps',
|
|
48
48
|
description: 'Lorem ipsum dolor sit amet, consectetur',
|
|
49
49
|
trackingTarget: 'topnav_catalog_live_learning_bootcamps',
|
|
@@ -52,7 +52,7 @@ export const liveLearningHubItems = {
|
|
|
52
52
|
badge: renderNewBadge()
|
|
53
53
|
}, {
|
|
54
54
|
id: 'gk',
|
|
55
|
-
href: '/live-learning#
|
|
55
|
+
href: '/live-learning#GKLiveLearning',
|
|
56
56
|
text: 'GK x Codecademy',
|
|
57
57
|
description: 'Lorem ipsum dolor sit amet, consectetur',
|
|
58
58
|
trackingTarget: 'topnav_catalog_live_learning_gk_codecademy',
|
|
@@ -83,7 +83,7 @@ export const getHeaderResourcesList = isLiveLearningHubEnabled => {
|
|
|
83
83
|
trackingTarget: 'topnav_resources_inspiration_learning_tips',
|
|
84
84
|
type: 'link',
|
|
85
85
|
newTab: true
|
|
86
|
-
},
|
|
86
|
+
}, isLiveLearningHubEnabled ? {
|
|
87
87
|
id: 'career-center',
|
|
88
88
|
href: '/career-center',
|
|
89
89
|
text: 'Career Center',
|
|
@@ -92,7 +92,7 @@ export const getHeaderResourcesList = isLiveLearningHubEnabled => {
|
|
|
92
92
|
type: 'link',
|
|
93
93
|
newTab: true,
|
|
94
94
|
badge: renderNewBadge()
|
|
95
|
-
}
|
|
95
|
+
} : {
|
|
96
96
|
id: 'job-readiness-check',
|
|
97
97
|
href: '/job-readiness',
|
|
98
98
|
text: 'Job-readiness checker',
|
|
@@ -101,7 +101,7 @@ export const getHeaderResourcesList = isLiveLearningHubEnabled => {
|
|
|
101
101
|
type: 'link',
|
|
102
102
|
newTab: true,
|
|
103
103
|
badge: renderNewBadge()
|
|
104
|
-
}]
|
|
104
|
+
}]
|
|
105
105
|
};
|
|
106
106
|
return [{
|
|
107
107
|
title: 'Docs',
|
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.26.0-alpha.
|
|
4
|
+
"version": "1.26.0-alpha.a6e7975a97.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|