@codecademy/brand 3.17.0-alpha.2758d7b250.0 → 3.18.0-alpha.2de280f935.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/AppHeaderLinkSections/index.js +0 -0
- package/dist/GlobalHeader/GlobalHeaderItems.d.ts +1 -1
- package/dist/GlobalHeader/GlobalHeaderItems.js +27 -25
- package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +10 -10
- package/dist/GlobalHeader/GlobalHeaderVariants.js +24 -24
- package/dist/GlobalHeader/index.d.ts +1 -0
- package/dist/GlobalHeader/index.js +54 -50
- package/dist/GlobalHeader/types.d.ts +1 -0
- package/package.json +1 -1
|
File without changes
|
|
@@ -10,7 +10,7 @@ export declare const catalogDropdown: (hideCareerPaths?: boolean) => AppHeaderCa
|
|
|
10
10
|
export declare const resourcesDropdown: () => AppHeaderResourcesDropdownItem;
|
|
11
11
|
export declare const simpleResourcesDropdown: AppHeaderResourcesSimpleDropdownItem;
|
|
12
12
|
export declare const communityDropdown: () => AppHeaderSimpleDropdownItem;
|
|
13
|
-
export declare const pricingDropdown: AppHeaderSimpleDropdownItem;
|
|
13
|
+
export declare const pricingDropdown: (isInRevampedBlpExperimentVariant?: boolean) => AppHeaderSimpleDropdownItem;
|
|
14
14
|
export declare const upgradePlan: AppHeaderLinkItem;
|
|
15
15
|
export declare const businessSolutions: AppHeaderLinkItem;
|
|
16
16
|
export declare const careerCenter: AppHeaderLinkItem;
|
|
@@ -155,31 +155,33 @@ export const communityDropdown = () => ({
|
|
|
155
155
|
trackingTarget: 'topnav_community',
|
|
156
156
|
type: 'dropdown'
|
|
157
157
|
});
|
|
158
|
-
export const pricingDropdown = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
158
|
+
export const pricingDropdown = isInRevampedBlpExperimentVariant => {
|
|
159
|
+
return {
|
|
160
|
+
icon: AccountingCoinsIcon,
|
|
161
|
+
id: 'pricing',
|
|
162
|
+
text: 'Pricing',
|
|
163
|
+
popover: [{
|
|
164
|
+
id: 'pro-membership',
|
|
165
|
+
href: '/pricing',
|
|
166
|
+
trackingTarget: 'topnav_pro_membership',
|
|
167
|
+
text: 'For Individuals',
|
|
168
|
+
type: 'link'
|
|
169
|
+
}, {
|
|
170
|
+
id: 'for-students',
|
|
171
|
+
href: '/student-center',
|
|
172
|
+
trackingTarget: 'topnav_pricing_students',
|
|
173
|
+
text: 'For Students',
|
|
174
|
+
type: 'link'
|
|
175
|
+
}, {
|
|
176
|
+
id: 'for-teams',
|
|
177
|
+
href: isInRevampedBlpExperimentVariant ? '/business/pricing' : '/business#section-pricing-table',
|
|
178
|
+
trackingTarget: 'topnav_pricing_business',
|
|
179
|
+
text: 'For Business',
|
|
180
|
+
type: 'link'
|
|
181
|
+
}],
|
|
182
|
+
trackingTarget: 'topnav_pricing',
|
|
183
|
+
type: 'dropdown'
|
|
184
|
+
};
|
|
183
185
|
};
|
|
184
186
|
export const upgradePlan = {
|
|
185
187
|
icon: ArrowThickCircleUpIcon,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AppHeaderItem, FormattedAppHeaderItems, FormattedMobileAppHeaderItems } from '../AppHeader/shared';
|
|
2
2
|
import { GlobalHeaderProps } from '.';
|
|
3
3
|
import { User } from './types';
|
|
4
|
-
export declare const anonDefaultHeaderItems: (hidePricing?: boolean, user?: User, isBlpHeroExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
5
|
-
export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User, isBlpHeroExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
6
|
-
export declare const anonLandingHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
7
|
-
export declare const anonLandingMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
8
|
-
export declare const anonLoginHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
9
|
-
export declare const anonLoginMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
10
|
-
export declare const anonSignupHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
11
|
-
export declare const anonSignupMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
12
|
-
export declare const freeHeaderItems: (user: User, hidePricing?: boolean) => FormattedAppHeaderItems;
|
|
13
|
-
export declare const freeMobileHeaderItems: (user: User, hidePricing?: boolean) => FormattedMobileAppHeaderItems;
|
|
4
|
+
export declare const anonDefaultHeaderItems: (hidePricing?: boolean, user?: User, isBlpHeroExperimentVariant?: boolean, isInRevampedBlpExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
5
|
+
export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User, isBlpHeroExperimentVariant?: boolean, isInRevampedBlpExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
6
|
+
export declare const anonLandingHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
7
|
+
export declare const anonLandingMobileHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
8
|
+
export declare const anonLoginHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
9
|
+
export declare const anonLoginMobileHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
10
|
+
export declare const anonSignupHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
11
|
+
export declare const anonSignupMobileHeaderItems: (hidePricing?: boolean, user?: User, isInRevampedBlpExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
12
|
+
export declare const freeHeaderItems: (user: User, hidePricing?: boolean, isInRevampedBlpExperimentVariant?: boolean) => FormattedAppHeaderItems;
|
|
13
|
+
export declare const freeMobileHeaderItems: (user: User, hidePricing?: boolean, isInRevampedBlpExperimentVariant?: boolean) => FormattedMobileAppHeaderItems;
|
|
14
14
|
export declare const enterpriseHeaderItems: (user: User, props: GlobalHeaderProps) => {
|
|
15
15
|
left: AppHeaderItem[];
|
|
16
16
|
right: never[];
|
|
@@ -11,12 +11,12 @@ const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
|
|
|
11
11
|
text: resourcesLabel?.[item.id] || item.text
|
|
12
12
|
}))
|
|
13
13
|
});
|
|
14
|
-
const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isBlpHeroExperimentVariant) => {
|
|
14
|
+
const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant) => {
|
|
15
15
|
const specialLogo = {
|
|
16
16
|
...logo,
|
|
17
17
|
checkMini: true
|
|
18
18
|
};
|
|
19
|
-
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
19
|
+
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown(isInRevampedBlpExperimentVariant)]), liveLearningHub, businessSolutions];
|
|
20
20
|
const rightItems = [];
|
|
21
21
|
if (isBusinessPage(isBlpHeroExperimentVariant)) {
|
|
22
22
|
if (renderSignUp) {
|
|
@@ -38,7 +38,7 @@ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isBlpHero
|
|
|
38
38
|
right: rightItems
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isBlpHeroExperimentVariant) => {
|
|
41
|
+
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant) => {
|
|
42
42
|
const specialLogo = {
|
|
43
43
|
...logo,
|
|
44
44
|
checkMini: true
|
|
@@ -60,43 +60,43 @@ const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isB
|
|
|
60
60
|
rightItems.push(signUp);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
63
|
+
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown(isInRevampedBlpExperimentVariant)]), liveLearningHub, businessSolutions];
|
|
64
64
|
return {
|
|
65
65
|
left: leftItems,
|
|
66
66
|
right: rightItems,
|
|
67
67
|
mainMenu: mainMenuItems
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
export const anonDefaultHeaderItems = (hidePricing, user, isBlpHeroExperimentVariant) => {
|
|
71
|
-
return anonHeaderItems(true, true, hidePricing, user, isBlpHeroExperimentVariant);
|
|
70
|
+
export const anonDefaultHeaderItems = (hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant) => {
|
|
71
|
+
return anonHeaderItems(true, true, hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant);
|
|
72
72
|
};
|
|
73
|
-
export const anonDefaultMobileHeaderItems = (hidePricing, user, isBlpHeroExperimentVariant) => {
|
|
74
|
-
return anonMobileHeaderItems(true, true, hidePricing, user, isBlpHeroExperimentVariant);
|
|
73
|
+
export const anonDefaultMobileHeaderItems = (hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant) => {
|
|
74
|
+
return anonMobileHeaderItems(true, true, hidePricing, user, isBlpHeroExperimentVariant, isInRevampedBlpExperimentVariant);
|
|
75
75
|
};
|
|
76
|
-
export const anonLandingHeaderItems = (hidePricing, user) => {
|
|
77
|
-
return anonHeaderItems(true, false, hidePricing, user);
|
|
76
|
+
export const anonLandingHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
77
|
+
return anonHeaderItems(true, false, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
78
78
|
};
|
|
79
|
-
export const anonLandingMobileHeaderItems = (hidePricing, user) => {
|
|
80
|
-
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
79
|
+
export const anonLandingMobileHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
80
|
+
return anonMobileHeaderItems(true, false, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
81
81
|
};
|
|
82
|
-
export const anonLoginHeaderItems = (hidePricing, user) => {
|
|
83
|
-
return anonHeaderItems(false, true, hidePricing, user);
|
|
82
|
+
export const anonLoginHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
83
|
+
return anonHeaderItems(false, true, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
84
84
|
};
|
|
85
|
-
export const anonLoginMobileHeaderItems = (hidePricing, user) => {
|
|
86
|
-
return anonMobileHeaderItems(false, true, hidePricing, user);
|
|
85
|
+
export const anonLoginMobileHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
86
|
+
return anonMobileHeaderItems(false, true, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
87
87
|
};
|
|
88
|
-
export const anonSignupHeaderItems = (hidePricing, user) => {
|
|
89
|
-
return anonHeaderItems(true, false, hidePricing, user);
|
|
88
|
+
export const anonSignupHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
89
|
+
return anonHeaderItems(true, false, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
90
90
|
};
|
|
91
|
-
export const anonSignupMobileHeaderItems = (hidePricing, user) => {
|
|
92
|
-
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
91
|
+
export const anonSignupMobileHeaderItems = (hidePricing, user, isInRevampedBlpExperimentVariant) => {
|
|
92
|
+
return anonMobileHeaderItems(true, false, hidePricing, user, false, isInRevampedBlpExperimentVariant);
|
|
93
93
|
};
|
|
94
|
-
export const freeHeaderItems = (user, hidePricing) => {
|
|
94
|
+
export const freeHeaderItems = (user, hidePricing, isInRevampedBlpExperimentVariant) => {
|
|
95
95
|
const specialLogo = {
|
|
96
96
|
...logo,
|
|
97
97
|
checkMini: true
|
|
98
98
|
};
|
|
99
|
-
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
99
|
+
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown(isInRevampedBlpExperimentVariant)]), liveLearningHub, businessSolutions];
|
|
100
100
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
101
101
|
const rightItems = [];
|
|
102
102
|
rightItems.push(freeProfile(user));
|
|
@@ -106,7 +106,7 @@ export const freeHeaderItems = (user, hidePricing) => {
|
|
|
106
106
|
right: rightItems
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
|
-
export const freeMobileHeaderItems = (user, hidePricing) => {
|
|
109
|
+
export const freeMobileHeaderItems = (user, hidePricing, isInRevampedBlpExperimentVariant) => {
|
|
110
110
|
const specialLogo = {
|
|
111
111
|
...logo,
|
|
112
112
|
checkMini: true
|
|
@@ -114,7 +114,7 @@ export const freeMobileHeaderItems = (user, hidePricing) => {
|
|
|
114
114
|
const leftItems = [specialLogo];
|
|
115
115
|
const rightItems = [];
|
|
116
116
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
117
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions, freeProfile(user), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
|
|
117
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown(isInRevampedBlpExperimentVariant)]), liveLearningHub, businessSolutions, freeProfile(user), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
|
|
118
118
|
return {
|
|
119
119
|
left: leftItems,
|
|
120
120
|
right: rightItems,
|
|
@@ -4,5 +4,6 @@ export * from './types';
|
|
|
4
4
|
export declare const LiveLearningHubContext: React.Context<boolean>;
|
|
5
5
|
export declare const GlobalNavRedesignContext: React.Context<boolean>;
|
|
6
6
|
export declare const BlpHeroExperimentContext: React.Context<boolean>;
|
|
7
|
+
export declare const RevampedBlpExperimentContext: React.Context<boolean>;
|
|
7
8
|
export type GlobalHeaderProps = AnonHeader | FreeHeader | ProHeader | EnterpriseHeader | TeamsHeader | LoadingHeader | SimpleHeader | SimpleBootcampHeader;
|
|
8
9
|
export declare const GlobalHeader: React.FC<GlobalHeaderProps>;
|
|
@@ -10,6 +10,7 @@ export * from './types';
|
|
|
10
10
|
export const LiveLearningHubContext = /*#__PURE__*/React.createContext(false);
|
|
11
11
|
export const GlobalNavRedesignContext = /*#__PURE__*/React.createContext(false);
|
|
12
12
|
export const BlpHeroExperimentContext = /*#__PURE__*/React.createContext(false);
|
|
13
|
+
export const RevampedBlpExperimentContext = /*#__PURE__*/React.createContext(false);
|
|
13
14
|
|
|
14
15
|
// Overloading getAppHeaderItems function to return different types based on mobile parameter
|
|
15
16
|
|
|
@@ -24,18 +25,18 @@ function getAppHeaderItems(props, mobile, dynamicDataLoading) {
|
|
|
24
25
|
case 'anon':
|
|
25
26
|
switch (props.variant) {
|
|
26
27
|
case 'landing':
|
|
27
|
-
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user) : anonLandingHeaderItems(hidePricing, props.user);
|
|
28
|
+
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant) : anonLandingHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant);
|
|
28
29
|
case 'login':
|
|
29
|
-
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user) : anonLoginHeaderItems(hidePricing, props.user);
|
|
30
|
+
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant) : anonLoginHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant);
|
|
30
31
|
case 'signup':
|
|
31
|
-
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user) : anonSignupHeaderItems(hidePricing, props.user);
|
|
32
|
+
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant) : anonSignupHeaderItems(hidePricing, props.user, props.isInRevampedBlpExperimentVariant);
|
|
32
33
|
default:
|
|
33
|
-
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user, props.isBlpHeroExperimentVariant) : anonDefaultHeaderItems(hidePricing, props.user, props.isBlpHeroExperimentVariant);
|
|
34
|
+
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user, props.isBlpHeroExperimentVariant, props.isInRevampedBlpExperimentVariant) : anonDefaultHeaderItems(hidePricing, props.user, props.isBlpHeroExperimentVariant, props.isInRevampedBlpExperimentVariant);
|
|
34
35
|
}
|
|
35
36
|
case 'enterprise':
|
|
36
37
|
return mobile ? enterpriseMobileHeaderItems(props.user, props) : enterpriseHeaderItems(props.user, props);
|
|
37
38
|
case 'free':
|
|
38
|
-
return mobile ? freeMobileHeaderItems(props.user, hidePricing) : freeHeaderItems(props.user, hidePricing);
|
|
39
|
+
return mobile ? freeMobileHeaderItems(props.user, hidePricing, props.isInRevampedBlpExperimentVariant) : freeHeaderItems(props.user, hidePricing, props.isInRevampedBlpExperimentVariant);
|
|
39
40
|
case 'pro':
|
|
40
41
|
return mobile ? proMobileHeaderItems(props.user) : proHeaderItems(props.user);
|
|
41
42
|
case 'teams':
|
|
@@ -76,51 +77,54 @@ export const GlobalHeader = props => {
|
|
|
76
77
|
value: !!props.displayGlobalNavRedesign,
|
|
77
78
|
children: /*#__PURE__*/_jsx(BlpHeroExperimentContext.Provider, {
|
|
78
79
|
value: !!props.isBlpHeroExperimentVariant,
|
|
79
|
-
children: /*#__PURE__*/_jsx(
|
|
80
|
-
value:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
80
|
+
children: /*#__PURE__*/_jsx(RevampedBlpExperimentContext.Provider, {
|
|
81
|
+
value: !!props.isInRevampedBlpExperimentVariant,
|
|
82
|
+
children: /*#__PURE__*/_jsx(GlobalHeaderItemClickContext.Provider, {
|
|
83
|
+
value: {
|
|
84
|
+
globalHeaderItemClick: combinedAction
|
|
85
|
+
},
|
|
86
|
+
children: /*#__PURE__*/_jsx(GlobalHeaderDynamicDataContext.Provider, {
|
|
87
|
+
value: useMemo(() => ({
|
|
88
|
+
globalHeaderDynamicData: dynamicData ?? null
|
|
89
|
+
}), [dynamicData]),
|
|
90
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
91
|
+
as: "header",
|
|
92
|
+
position: "sticky",
|
|
93
|
+
top: 0,
|
|
94
|
+
zIndex: theme.elements.headerZ,
|
|
95
|
+
overflow: {
|
|
96
|
+
_: 'hidden',
|
|
97
|
+
sm: 'visible'
|
|
98
|
+
} // Prevent tooltip overflow on mobile
|
|
99
|
+
,
|
|
100
|
+
children: [/*#__PURE__*/_jsx(AppHeader, {
|
|
101
|
+
action: combinedAction,
|
|
102
|
+
items: getAppHeaderItems(props, false, dynamicDataLoading ?? false),
|
|
103
|
+
search: props.search,
|
|
104
|
+
...(props.type === 'anon' ? {
|
|
105
|
+
redirectParam: props.redirectParam
|
|
106
|
+
} : hideNotification ? {} : {
|
|
107
|
+
notifications: props.notifications
|
|
108
|
+
}),
|
|
109
|
+
hideRightButtonDefaults: hideNotification,
|
|
110
|
+
isAnon: props.type === 'anon',
|
|
111
|
+
isTeams: props.type === 'teams',
|
|
112
|
+
type: hideNotification ? 'enterprise' : 'standard'
|
|
113
|
+
}), /*#__PURE__*/_jsx(AppHeaderMobile, {
|
|
114
|
+
action: combinedAction,
|
|
115
|
+
items: getAppHeaderItems(props, true, dynamicDataLoading ?? false),
|
|
116
|
+
...(props.type === 'anon' || hideNotification ? {} : {
|
|
117
|
+
notifications: props.notifications
|
|
118
|
+
}),
|
|
119
|
+
search: props.search,
|
|
120
|
+
redirectParam: props.type === 'anon' ? props.redirectParam : undefined,
|
|
121
|
+
isEnterprise: props.type === 'enterprise',
|
|
122
|
+
isAnon: props.type === 'anon',
|
|
123
|
+
isSimple: props.type === 'simple',
|
|
124
|
+
hideRightMenuButton: props.type === 'simple' || props.type === 'loading',
|
|
125
|
+
navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
|
|
126
|
+
}), props.children]
|
|
127
|
+
})
|
|
124
128
|
})
|
|
125
129
|
})
|
|
126
130
|
})
|
|
@@ -33,6 +33,7 @@ interface BaseHeader extends WithChildrenProp, AppHeaderAction {
|
|
|
33
33
|
search: AppHeaderSearch;
|
|
34
34
|
displayGlobalNavRedesign?: boolean;
|
|
35
35
|
isBlpHeroExperimentVariant?: boolean;
|
|
36
|
+
isInRevampedBlpExperimentVariant?: boolean;
|
|
36
37
|
dynamicData?: GlobalHeaderDynamicData | null;
|
|
37
38
|
dynamicDataLoading?: boolean;
|
|
38
39
|
}
|
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": "3.
|
|
4
|
+
"version": "3.18.0-alpha.2de280f935.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|