@codecademy/brand 2.0.0-alpha.02b53329e4.0 → 2.0.0-alpha.044ff6f33e.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.
Files changed (36) hide show
  1. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +3 -2
  2. package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
  3. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +4 -2
  4. package/dist/AppHeader/index.js +5 -2
  5. package/dist/AppHeader/shared/utils.d.ts +1 -0
  6. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +7 -5
  7. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +9 -6
  8. package/dist/GlobalFooter/index.d.ts +1 -0
  9. package/dist/GlobalFooter/index.js +25 -17
  10. package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +14 -14
  11. package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
  12. package/dist/GlobalHeader/index.js +49 -41
  13. package/dist/GlobalHeader/types.d.ts +1 -0
  14. package/dist/LearningOutcomeCard/index.d.ts +11 -13
  15. package/dist/LearningOutcomeCard/index.js +126 -176
  16. package/dist/LearningOutcomeTile/index.d.ts +1 -2
  17. package/dist/LearningOutcomeTile/index.js +4 -2
  18. package/dist/LearningOutcomeTile/types.d.ts +1 -0
  19. package/dist/PlanCardTeams/consts.js +1 -1
  20. package/dist/index.d.ts +0 -2
  21. package/dist/index.js +0 -2
  22. package/dist/lib/resourcesList/index.d.ts +1 -1
  23. package/dist/lib/resourcesList/index.js +11 -2
  24. package/dist/stories/Molecules/LearningOutcomeCard.stories.d.ts +1 -7
  25. package/dist/stories/Molecules/LearningOutcomeCard.stories.js +39 -169
  26. package/package.json +1 -1
  27. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.d.ts +0 -8
  28. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +0 -55
  29. package/dist/LearningOutcomeAssessmentScores/index.d.ts +0 -8
  30. package/dist/LearningOutcomeAssessmentScores/index.js +0 -24
  31. package/dist/LearningOutcomeFlyout/index.d.ts +0 -29
  32. package/dist/LearningOutcomeFlyout/index.js +0 -153
  33. package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.d.ts +0 -6
  34. package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +0 -23
  35. package/dist/stories/Molecules/LearningOutcomeFlyout.stories.d.ts +0 -5
  36. package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +0 -34
@@ -2,13 +2,15 @@ import _styled from "@emotion/styled/base";
2
2
  import { ContentContainer } from '@codecademy/gamut';
3
3
  import { themed } from '@codecademy/gamut-styles';
4
4
  import * as React from 'react';
5
+ import { useContext } from 'react';
6
+ import { LiveLearningHubContext } from '../GlobalHeader';
5
7
  import { FooterLegal } from './FooterLegal';
6
8
  import { FooterNavLinks } from './FooterNavLinks';
7
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
10
  const FooterContainer = /*#__PURE__*/_styled("footer", {
9
11
  target: "e1xir4o10",
10
12
  label: "FooterContainer"
11
- })("border-top:1px solid ", themed('colors.secondary'), ";@media print{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9HbG9iYWxGb290ZXIvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlDcUMiLCJmaWxlIjoiLi4vLi4vc3JjL0dsb2JhbEZvb3Rlci9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb250ZW50Q29udGFpbmVyIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQnO1xuaW1wb3J0IHsgdGhlbWVkIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJ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WluZXI+XG4gICk7XG59O1xuIl19 */"));
13
+ })("border-top:1px solid ", themed('colors.secondary'), ";@media print{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9HbG9iYWxGb290ZXIvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9DcUMiLCJmaWxlIjoiLi4vLi4vc3JjL0dsb2JhbEZvb3Rlci9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb250ZW50Q29udGFpbmVyIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQnO1xuaW1wb3J0IHsgdGhlbWVkIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IHVzZUNvbnRleHQgfSBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB7IExpdmVMZWFybmluZ0h1YkNvbnRleHQgfSBmcm9tICcuLi9HbG9iYWxIZWFkZXInO1xuaW1wb3J0IHsgRm9vdGVyTGVnYWwgfSBmcm9tICcuL0Zvb3RlckxlZ2FsJztcbmltcG9ydCB7IEZvb3Rlck5hdkxpbmtzIH0gZnJvbSAnLi9Gb290ZXJOYXZMaW5rcyc7XG5pbXBvcnQgdHlwZSB7IFJlZmVycmFsUm9ja1VybHMgfSBmcm9tICcuL0Zvb3Rlck5hdkxpbmtzL1JlZmVycmFsUm9jay90eXBlcyc7XG5pbXBvcnQgeyBHbG9iYWxGb290ZXJDbGlja0hhbmRsZXIgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IHR5cGUgR2xvYmFsRm9vdGVyUHJvcHMgPSB7XG4gIGNsYXNzTmF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vbnRleHQuUHJvdmlkZXI+XG4gICk7XG59O1xuIl19 */"));
12
14
  export const GlobalFooter = ({
13
15
  className,
14
16
  hidePricing,
@@ -17,23 +19,29 @@ export const GlobalFooter = ({
17
19
  userGeo,
18
20
  referralRockUrls,
19
21
  isBusinessUser,
20
- isLoggedIn
22
+ isLoggedIn,
23
+ isLiveLearningHubEnabled
21
24
  }) => {
22
- return /*#__PURE__*/_jsx(FooterContainer, {
23
- className: className,
24
- role: "contentinfo",
25
- children: /*#__PURE__*/_jsxs(ContentContainer, {
26
- children: [/*#__PURE__*/_jsx(FooterNavLinks, {
27
- hidePricing: hidePricing,
28
- onClick: onClick,
29
- userGeo: userGeo,
30
- referralRockUrls: referralRockUrls,
31
- isBusinessUser: isBusinessUser,
32
- isLoggedIn: isLoggedIn
33
- }), /*#__PURE__*/_jsx(FooterLegal, {
34
- onClick: onClick,
35
- onMadeInClick: onMadeInClick
36
- })]
25
+ const contextValue = useContext(LiveLearningHubContext);
26
+ const combinedIsLiveLearningHubEnabled = contextValue || !!isLiveLearningHubEnabled;
27
+ return /*#__PURE__*/_jsx(LiveLearningHubContext.Provider, {
28
+ value: combinedIsLiveLearningHubEnabled,
29
+ children: /*#__PURE__*/_jsx(FooterContainer, {
30
+ className: className,
31
+ role: "contentinfo",
32
+ children: /*#__PURE__*/_jsxs(ContentContainer, {
33
+ children: [/*#__PURE__*/_jsx(FooterNavLinks, {
34
+ hidePricing: hidePricing,
35
+ onClick: onClick,
36
+ userGeo: userGeo,
37
+ referralRockUrls: referralRockUrls,
38
+ isBusinessUser: isBusinessUser,
39
+ isLoggedIn: isLoggedIn
40
+ }), /*#__PURE__*/_jsx(FooterLegal, {
41
+ onClick: onClick,
42
+ onMadeInClick: onMadeInClick
43
+ })]
44
+ })
37
45
  })
38
46
  });
39
47
  };
@@ -1,25 +1,25 @@
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) => FormattedAppHeaderItems;
5
- export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User) => 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, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
5
+ export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
6
+ export declare const anonLandingHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
7
+ export declare const anonLandingMobileHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
8
+ export declare const anonLoginHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
9
+ export declare const anonLoginMobileHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
10
+ export declare const anonSignupHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
11
+ export declare const anonSignupMobileHeaderItems: (hidePricing?: boolean, user?: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
12
+ export declare const freeHeaderItems: (user: User, hidePricing?: boolean, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
13
+ export declare const freeMobileHeaderItems: (user: User, hidePricing?: boolean, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
14
14
  export declare const enterpriseHeaderItems: (user: User, props: GlobalHeaderProps) => {
15
15
  left: AppHeaderItem[];
16
16
  right: never[];
17
17
  };
18
- export declare const proHeaderItems: (user: User) => FormattedAppHeaderItems;
19
- export declare const teamsHeaderItems: (user: User) => FormattedAppHeaderItems;
18
+ export declare const proHeaderItems: (user: User, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
19
+ export declare const teamsHeaderItems: (user: User, isLiveLearningHubEnabled?: boolean) => FormattedAppHeaderItems;
20
20
  export declare const enterpriseMobileHeaderItems: (user: User, props: GlobalHeaderProps) => FormattedMobileAppHeaderItems;
21
- export declare const proMobileHeaderItems: (user: User) => FormattedMobileAppHeaderItems;
22
- export declare const teamsMobileHeaderItems: (user: User) => FormattedMobileAppHeaderItems;
21
+ export declare const proMobileHeaderItems: (user: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
22
+ export declare const teamsMobileHeaderItems: (user: User, isLiveLearningHubEnabled?: boolean) => FormattedMobileAppHeaderItems;
23
23
  export declare const loadingHeaderItems: FormattedAppHeaderItems;
24
24
  export declare const loadingMobileHeaderItems: FormattedMobileAppHeaderItems;
25
25
  export declare const simpleHeaderItems: FormattedAppHeaderItems;
@@ -1,4 +1,4 @@
1
- import { addPayment, bootcampCta, businessSolutions, catalogDropdown, communityDropdown, enterpriseLogo, freeProfile, liveLearningHub, loading, login, logo, myHome, myPercipioHome, pricingDropdown, proProfile, resourcesDropdown, signUp, simpleResourcesDropdown, tryProForFree, unpausePro, upgradePlan, upgradeToPro } from './GlobalHeaderItems';
1
+ import { addPayment, bootcampCta, businessSolutions, careerCenter, catalogDropdown, communityDropdown, enterpriseLogo, freeProfile, liveLearningHub, loading, login, logo, myHome, myPercipioHome, pricingDropdown, proProfile, resourcesDropdown, signUp, simpleResourcesDropdown, tryProForFree, unpausePro, upgradePlan, upgradeToPro } from './GlobalHeaderItems';
2
2
  const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
3
3
  ...simpleResourcesDropdown,
4
4
  text: resourcesLabel?.title || simpleResourcesDropdown.text,
@@ -7,12 +7,12 @@ const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
7
7
  text: resourcesLabel?.[item.id] || item.text
8
8
  }))
9
9
  });
10
- const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
10
+ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isLiveLearningHubEnabled) => {
11
11
  const specialLogo = {
12
12
  ...logo,
13
13
  checkMini: true
14
14
  };
15
- const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
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);
@@ -25,7 +25,7 @@ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
25
25
  right: rightItems
26
26
  };
27
27
  };
28
- const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
28
+ const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isLiveLearningHubEnabled) => {
29
29
  const specialLogo = {
30
30
  ...logo,
31
31
  checkMini: true
@@ -38,43 +38,43 @@ const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user) =>
38
38
  if (renderSignUp) {
39
39
  rightItems.push(signUp);
40
40
  }
41
- const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
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,
45
45
  mainMenu: mainMenuItems
46
46
  };
47
47
  };
48
- export const anonDefaultHeaderItems = (hidePricing, user) => {
49
- return anonHeaderItems(true, true, hidePricing, user);
48
+ export const anonDefaultHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
49
+ return anonHeaderItems(true, true, hidePricing, user, isLiveLearningHubEnabled);
50
50
  };
51
- export const anonDefaultMobileHeaderItems = (hidePricing, user) => {
52
- return anonMobileHeaderItems(true, true, hidePricing, user);
51
+ export const anonDefaultMobileHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
52
+ return anonMobileHeaderItems(true, true, hidePricing, user, isLiveLearningHubEnabled);
53
53
  };
54
- export const anonLandingHeaderItems = (hidePricing, user) => {
55
- return anonHeaderItems(true, false, hidePricing, user);
54
+ export const anonLandingHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
55
+ return anonHeaderItems(true, false, hidePricing, user, isLiveLearningHubEnabled);
56
56
  };
57
- export const anonLandingMobileHeaderItems = (hidePricing, user) => {
58
- return anonMobileHeaderItems(true, false, hidePricing, user);
57
+ export const anonLandingMobileHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
58
+ return anonMobileHeaderItems(true, false, hidePricing, user, isLiveLearningHubEnabled);
59
59
  };
60
- export const anonLoginHeaderItems = (hidePricing, user) => {
61
- return anonHeaderItems(false, true, hidePricing, user);
60
+ export const anonLoginHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
61
+ return anonHeaderItems(false, true, hidePricing, user, isLiveLearningHubEnabled);
62
62
  };
63
- export const anonLoginMobileHeaderItems = (hidePricing, user) => {
64
- return anonMobileHeaderItems(false, true, hidePricing, user);
63
+ export const anonLoginMobileHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
64
+ return anonMobileHeaderItems(false, true, hidePricing, user, isLiveLearningHubEnabled);
65
65
  };
66
- export const anonSignupHeaderItems = (hidePricing, user) => {
67
- return anonHeaderItems(true, false, hidePricing, user);
66
+ export const anonSignupHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
67
+ return anonHeaderItems(true, false, hidePricing, user, isLiveLearningHubEnabled);
68
68
  };
69
- export const anonSignupMobileHeaderItems = (hidePricing, user) => {
70
- return anonMobileHeaderItems(true, false, hidePricing, user);
69
+ export const anonSignupMobileHeaderItems = (hidePricing, user, isLiveLearningHubEnabled) => {
70
+ return anonMobileHeaderItems(true, false, hidePricing, user, isLiveLearningHubEnabled);
71
71
  };
72
- export const freeHeaderItems = (user, hidePricing) => {
72
+ export const freeHeaderItems = (user, hidePricing, isLiveLearningHubEnabled) => {
73
73
  const specialLogo = {
74
74
  ...logo,
75
75
  checkMini: true
76
76
  };
77
- const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
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));
@@ -84,7 +84,7 @@ export const freeHeaderItems = (user, hidePricing) => {
84
84
  right: rightItems
85
85
  };
86
86
  };
87
- export const freeMobileHeaderItems = (user, hidePricing) => {
87
+ export const freeMobileHeaderItems = (user, hidePricing, isLiveLearningHubEnabled) => {
88
88
  const specialLogo = {
89
89
  ...logo,
90
90
  checkMini: true
@@ -92,7 +92,7 @@ export const freeMobileHeaderItems = (user, hidePricing) => {
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]), liveLearningHub, businessSolutions, freeProfile(user, true), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
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,
@@ -112,8 +112,8 @@ export const enterpriseHeaderItems = (user, props) => {
112
112
  right: []
113
113
  };
114
114
  };
115
- export const proHeaderItems = user => {
116
- const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions];
115
+ export const proHeaderItems = (user, isLiveLearningHubEnabled) => {
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) {
@@ -124,8 +124,8 @@ export const proHeaderItems = user => {
124
124
  right: rightItems
125
125
  };
126
126
  };
127
- export const teamsHeaderItems = user => {
128
- const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub];
127
+ export const teamsHeaderItems = (user, isLiveLearningHubEnabled) => {
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);
@@ -152,10 +152,10 @@ export const enterpriseMobileHeaderItems = (user, props) => {
152
152
  mainMenu: mainMenuItems
153
153
  };
154
154
  };
155
- export const proMobileHeaderItems = user => {
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] : []), liveLearningHub, businessSolutions, proProfile(user)];
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
  }
@@ -165,10 +165,10 @@ export const proMobileHeaderItems = user => {
165
165
  mainMenu: mainMenuItems
166
166
  };
167
167
  };
168
- export const teamsMobileHeaderItems = user => {
168
+ export const teamsMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
169
169
  const leftItems = [logo];
170
170
  const rightItems = [];
171
- const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub, proProfile(user)];
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
  }
@@ -1,7 +1,7 @@
1
1
  import { Box } from '@codecademy/gamut';
2
2
  import { useTheme } from '@emotion/react';
3
3
  import * as React from 'react';
4
- import { useCallback } from 'react';
4
+ import { useCallback, useContext } from 'react';
5
5
  import { AppHeader, AppHeaderMobile, isAppHeaderItemWithHref } from '..';
6
6
  import { anonDefaultHeaderItems, anonDefaultMobileHeaderItems, anonLandingHeaderItems, anonLandingMobileHeaderItems, anonLoginHeaderItems, anonLoginMobileHeaderItems, anonSignupHeaderItems, anonSignupMobileHeaderItems, enterpriseHeaderItems, enterpriseMobileHeaderItems, freeHeaderItems, freeMobileHeaderItems, loadingHeaderItems, loadingMobileHeaderItems, proHeaderItems, proMobileHeaderItems, simpleBootcampHeaderItems, simpleBootcampMobileHeaderItems, simpleHeaderItems, simpleMobileHeaderItems, teamsHeaderItems, teamsMobileHeaderItems } from './GlobalHeaderVariants';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -16,28 +16,29 @@ export const HeaderQuizContext = /*#__PURE__*/React.createContext({
16
16
 
17
17
  function getAppHeaderItems(props, mobile) {
18
18
  const {
19
- hidePricing
19
+ hidePricing,
20
+ isLiveLearningHubEnabled
20
21
  } = props;
21
22
  switch (props.type) {
22
23
  case 'anon':
23
24
  switch (props.variant) {
24
25
  case 'landing':
25
- return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user) : anonLandingHeaderItems(hidePricing, props.user);
26
+ return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled) : anonLandingHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled);
26
27
  case 'login':
27
- return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user) : anonLoginHeaderItems(hidePricing, props.user);
28
+ return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled) : anonLoginHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled);
28
29
  case 'signup':
29
- return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user) : anonSignupHeaderItems(hidePricing, props.user);
30
+ return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled) : anonSignupHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled);
30
31
  default:
31
- return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user) : anonDefaultHeaderItems(hidePricing, props.user);
32
+ return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled) : anonDefaultHeaderItems(hidePricing, props.user, isLiveLearningHubEnabled);
32
33
  }
33
34
  case 'enterprise':
34
35
  return mobile ? enterpriseMobileHeaderItems(props.user, props) : enterpriseHeaderItems(props.user, props);
35
36
  case 'free':
36
- return mobile ? freeMobileHeaderItems(props.user, hidePricing) : freeHeaderItems(props.user, hidePricing);
37
+ return mobile ? freeMobileHeaderItems(props.user, hidePricing, isLiveLearningHubEnabled) : freeHeaderItems(props.user, hidePricing, isLiveLearningHubEnabled);
37
38
  case 'pro':
38
- return mobile ? proMobileHeaderItems(props.user) : proHeaderItems(props.user);
39
+ return mobile ? proMobileHeaderItems(props.user, isLiveLearningHubEnabled) : proHeaderItems(props.user, isLiveLearningHubEnabled);
39
40
  case 'teams':
40
- return mobile ? teamsMobileHeaderItems(props.user) : teamsHeaderItems(props.user);
41
+ return mobile ? teamsMobileHeaderItems(props.user, isLiveLearningHubEnabled) : teamsHeaderItems(props.user, isLiveLearningHubEnabled);
41
42
  case 'simple':
42
43
  return mobile ? simpleMobileHeaderItems : simpleHeaderItems;
43
44
  case 'bootcamp':
@@ -52,6 +53,10 @@ export const GlobalHeader = props => {
52
53
  onLinkAction
53
54
  } = props;
54
55
  const theme = useTheme();
56
+
57
+ // Use context to get the live learning hub value, fallback to props for backward compatibility
58
+ const contextValue = useContext(LiveLearningHubContext);
59
+ const isLiveLearningHubEnabled = contextValue || !!props.isLiveLearningHubEnabled;
55
60
  const combinedAction = useCallback((event, item) => {
56
61
  action(event, item);
57
62
  if (isAppHeaderItemWithHref(item)) onLinkAction?.(event, item);
@@ -64,38 +69,41 @@ export const GlobalHeader = props => {
64
69
  showOnboardingQuiz,
65
70
  showSortingQuiz
66
71
  },
67
- children: /*#__PURE__*/_jsxs(Box, {
68
- as: "header",
69
- position: "sticky",
70
- top: 0,
71
- zIndex: theme.elements.headerZ,
72
- children: [/*#__PURE__*/_jsx(AppHeader, {
73
- action: combinedAction,
74
- items: getAppHeaderItems(props, false),
75
- search: props.search,
76
- ...(props.type === 'anon' ? {
77
- redirectParam: props.redirectParam
78
- } : hideNotification ? {} : {
79
- notifications: props.notifications
80
- }),
81
- hideRightButtonDefaults: hideNotification,
82
- isAnon: props.type === 'anon',
83
- isTeams: props.type === 'teams',
84
- type: hideNotification ? 'enterprise' : 'standard'
85
- }), /*#__PURE__*/_jsx(AppHeaderMobile, {
86
- action: combinedAction,
87
- items: getAppHeaderItems(props, true),
88
- ...(props.type === 'anon' || hideNotification ? {} : {
89
- notifications: props.notifications
90
- }),
91
- search: props.search,
92
- redirectParam: props.type === 'anon' ? props.redirectParam : undefined,
93
- isEnterprise: props.type === 'enterprise',
94
- isAnon: props.type === 'anon',
95
- isSimple: props.type === 'simple',
96
- hideRightMenuButton: props.type === 'simple' || props.type === 'loading',
97
- navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
98
- }), props.children]
72
+ children: /*#__PURE__*/_jsx(LiveLearningHubContext.Provider, {
73
+ value: isLiveLearningHubEnabled,
74
+ children: /*#__PURE__*/_jsxs(Box, {
75
+ as: "header",
76
+ position: "sticky",
77
+ top: 0,
78
+ zIndex: theme.elements.headerZ,
79
+ children: [/*#__PURE__*/_jsx(AppHeader, {
80
+ action: combinedAction,
81
+ items: getAppHeaderItems(props, false),
82
+ search: props.search,
83
+ ...(props.type === 'anon' ? {
84
+ redirectParam: props.redirectParam
85
+ } : hideNotification ? {} : {
86
+ notifications: props.notifications
87
+ }),
88
+ hideRightButtonDefaults: hideNotification,
89
+ isAnon: props.type === 'anon',
90
+ isTeams: props.type === 'teams',
91
+ type: hideNotification ? 'enterprise' : 'standard'
92
+ }), /*#__PURE__*/_jsx(AppHeaderMobile, {
93
+ action: combinedAction,
94
+ items: getAppHeaderItems(props, true),
95
+ ...(props.type === 'anon' || hideNotification ? {} : {
96
+ notifications: props.notifications
97
+ }),
98
+ search: props.search,
99
+ redirectParam: props.type === 'anon' ? props.redirectParam : undefined,
100
+ isEnterprise: props.type === 'enterprise',
101
+ isAnon: props.type === 'anon',
102
+ isSimple: props.type === 'simple',
103
+ hideRightMenuButton: props.type === 'simple' || props.type === 'loading',
104
+ navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
105
+ }), props.children]
106
+ })
99
107
  })
100
108
  });
101
109
  };
@@ -30,6 +30,7 @@ interface BaseHeader extends WithChildrenProp, AppHeaderAction {
30
30
  hideEnterpriseHeader?: boolean;
31
31
  localizedLabels?: localizedLabels;
32
32
  search: AppHeaderSearch;
33
+ isLiveLearningHubEnabled?: boolean;
33
34
  }
34
35
  export type User = {
35
36
  avatar: string;
@@ -1,5 +1,14 @@
1
1
  import { HeadingTags } from '@codecademy/gamut';
2
- import { LearningOutcomeLevels } from '../LearningOutcomeBadges';
2
+ declare enum LearningOutcomeLevels {
3
+ One = 1,
4
+ Two = 2,
5
+ Three = 3
6
+ }
7
+ export declare const levelTagText: {
8
+ 1: string;
9
+ 2: string;
10
+ 3: string;
11
+ };
3
12
  interface LearningOutcomeSkill {
4
13
  title?: string | null | undefined;
5
14
  }
@@ -7,20 +16,9 @@ interface LearningOutcomeCardProps {
7
16
  level: LearningOutcomeLevels | null | undefined;
8
17
  outcome: string;
9
18
  headingLevel?: HeadingTags;
10
- isInteractive?: boolean;
11
- mode?: 'emphasized' | 'base';
19
+ emphasized?: boolean;
12
20
  progress?: number;
13
21
  skills?: LearningOutcomeSkill[] | null;
14
- /**
15
- * Optional prop for progress updates, used to animate the radial progress from a previous value to the current value.
16
- * Need to provide previousProgress and progressDuraion to animate the radial progress.
17
- * If progress is 100, completionDelay needs to be provided instead of progressDuration to delay the display of the completion icon.
18
- */
19
- progressUpdateData?: {
20
- previousProgress: number;
21
- progressDuration?: number;
22
- completionDelay?: number;
23
- };
24
22
  }
25
23
  export declare const LearningOutcomeCard: React.FC<LearningOutcomeCardProps>;
26
24
  export {};