@codecademy/brand 2.0.0-alpha.078de545a2.0 → 2.0.0-alpha.183bb4dc4c.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/AppBar/AppBarSection.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +14 -14
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +2 -3
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +5 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.js +9 -9
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -4
- package/dist/AppHeader/index.js +2 -5
- package/dist/AppHeader/shared/elements.d.ts +9 -9
- package/dist/AppHeader/shared/utils.d.ts +0 -1
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +5 -7
- package/dist/Carousel/elements.d.ts +2 -2
- package/dist/DropdownButton/index.d.ts +2 -2
- package/dist/FeatureList/index.js +5 -4
- package/dist/GlobalFooter/FooterHeading.d.ts +2 -2
- package/dist/GlobalFooter/FooterLinks.d.ts +1 -1
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +6 -9
- package/dist/GlobalFooter/FooterSubHeading.d.ts +2 -2
- package/dist/GlobalFooter/index.d.ts +0 -1
- package/dist/GlobalFooter/index.js +17 -25
- package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +14 -14
- package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
- package/dist/GlobalHeader/index.js +41 -49
- package/dist/GlobalHeader/types.d.ts +0 -1
- package/dist/LandingPage/PageFeaturesEnhanced.js +3 -0
- package/dist/LayoutMenu/LayoutMenu.js +3 -4
- package/dist/LayoutMenuVariant/LayoutMenu.js +3 -4
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.ts +1 -1
- package/dist/LearningOutcomeCard/index.d.ts +5 -0
- package/dist/LearningOutcomeCard/index.js +61 -26
- package/dist/LearningOutcomeFlyout/index.d.ts +29 -0
- package/dist/LearningOutcomeFlyout/index.js +153 -0
- package/dist/LearningOutcomeTile/Tile.d.ts +1 -1
- package/dist/LearningOutcomeTile/index.js +1 -3
- package/dist/LearningOutcomeTile/types.d.ts +0 -1
- package/dist/Logo/CodecademyLogo.d.ts +2 -0
- package/dist/Logo/CodecademyLogo.js +19 -0
- package/dist/Logo/CodecademyPremiumLogo.d.ts +2 -0
- package/dist/Logo/CodecademyPremiumLogo.js +35 -0
- package/dist/Logo/CodecademyProAltLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProAltLogo.js +19 -0
- package/dist/Logo/CodecademyProLockupLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProLockupLogo.js +13 -0
- package/dist/Logo/CodecademyProLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademyPro/index.js → Logo/CodecademyProLogo.js} +7 -11
- package/dist/Logo/CodecademyProMonoLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademy/index.js → Logo/CodecademyProMonoLogo.js} +15 -15
- package/dist/Logo/CodecademyProgramLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProgramLogo.js +14 -0
- package/dist/Logo/CodecademyTeamsLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademyTeams/index.js → Logo/CodecademyTeamsLogo.js} +4 -9
- package/dist/Logo/index.d.ts +8 -0
- package/dist/Logo/index.js +30 -0
- package/dist/LogoFromSkillsoft/index.d.ts +227 -0
- package/dist/LogoFromSkillsoft/index.js +55 -0
- package/dist/LogoLXStudio/index.d.ts +3 -0
- package/dist/LogoLXStudio/index.js +47 -0
- package/dist/{Logos/ProLabel/ProLabelCutout → LogoProCutout}/index.d.ts +2 -2
- package/dist/{Logos/ProLabel/ProLabelCutout → LogoProCutout}/index.js +1 -1
- package/dist/LogoProCutoutTransparent/index.d.ts +7 -0
- package/dist/{Logos/ProLabel/ProLabelCutoutTransparent → LogoProCutoutTransparent}/index.js +1 -1
- package/dist/Notifications/elements.d.ts +2 -2
- package/dist/ProLabel/index.d.ts +376 -0
- package/dist/ProLabel/index.js +59 -0
- package/dist/{Logos/ProLabel → ProLogo}/index.d.ts +2 -2
- package/dist/{Logos/ProLabel → ProLogo}/index.js +5 -5
- package/dist/Testimonial/index.d.ts +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/lib/catalogList/index.js +3 -3
- package/dist/lib/resourcesList/index.d.ts +1 -1
- package/dist/lib/resourcesList/index.js +2 -11
- package/dist/stories/Atoms/Logos/Logo.stories.d.ts +13 -0
- package/dist/stories/Atoms/Logos/Logo.stories.js +78 -0
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.d.ts +1 -1
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.js +8 -2
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.d.ts +1 -1
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +1 -1
- package/dist/stories/Atoms/Logos/ProLabel.stories.d.ts +1 -2
- package/dist/stories/Atoms/Logos/ProLabel.stories.js +11 -10
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.d.ts +6 -0
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.js +24 -0
- package/dist/stories/Molecules/AppBar.stories.js +2 -2
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.d.ts +6 -0
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.d.ts +1 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +16 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.d.ts +5 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +34 -0
- package/package.json +1 -1
- package/dist/Logos/LogoCodecademy/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyMini/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyMini/index.js +0 -18
- package/dist/Logos/LogoCodecademyPro/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyTeams/index.d.ts +0 -2
- package/dist/Logos/LogoFromSkillsoft/index.d.ts +0 -3
- package/dist/Logos/LogoFromSkillsoft/index.js +0 -47
- package/dist/Logos/LogoLXStudio/index.d.ts +0 -3
- package/dist/Logos/LogoLXStudio/index.js +0 -40
- package/dist/Logos/ProLabel/ProLabelCutoutTransparent/index.d.ts +0 -7
- package/dist/Logos/index.d.ts +0 -7
- package/dist/Logos/index.js +0 -7
- package/dist/Logos/shared.d.ts +0 -636
- package/dist/Logos/shared.js +0 -16
- package/dist/stories/Atoms/Logos/LogoCodecademy.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademy.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyMini.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyMini.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyPro.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyPro.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyTeams.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyTeams.stories.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addPayment, bootcampCta, businessSolutions,
|
|
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';
|
|
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) => {
|
|
11
11
|
const specialLogo = {
|
|
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]), liveLearningHub, businessSolutions];
|
|
16
16
|
const rightItems = [];
|
|
17
17
|
if (renderLogin) {
|
|
18
18
|
rightItems.push(login);
|
|
@@ -25,7 +25,7 @@ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isLiveLea
|
|
|
25
25
|
right: rightItems
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user
|
|
28
|
+
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
|
|
29
29
|
const specialLogo = {
|
|
30
30
|
...logo,
|
|
31
31
|
checkMini: true
|
|
@@ -38,43 +38,43 @@ 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]), liveLearningHub, 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) => {
|
|
49
|
+
return anonHeaderItems(true, true, hidePricing, user);
|
|
50
50
|
};
|
|
51
|
-
export const anonDefaultMobileHeaderItems = (hidePricing, user
|
|
52
|
-
return anonMobileHeaderItems(true, true, hidePricing, user
|
|
51
|
+
export const anonDefaultMobileHeaderItems = (hidePricing, user) => {
|
|
52
|
+
return anonMobileHeaderItems(true, true, hidePricing, user);
|
|
53
53
|
};
|
|
54
|
-
export const anonLandingHeaderItems = (hidePricing, user
|
|
55
|
-
return anonHeaderItems(true, false, hidePricing, user
|
|
54
|
+
export const anonLandingHeaderItems = (hidePricing, user) => {
|
|
55
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
56
56
|
};
|
|
57
|
-
export const anonLandingMobileHeaderItems = (hidePricing, user
|
|
58
|
-
return anonMobileHeaderItems(true, false, hidePricing, user
|
|
57
|
+
export const anonLandingMobileHeaderItems = (hidePricing, user) => {
|
|
58
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
59
59
|
};
|
|
60
|
-
export const anonLoginHeaderItems = (hidePricing, user
|
|
61
|
-
return anonHeaderItems(false, true, hidePricing, user
|
|
60
|
+
export const anonLoginHeaderItems = (hidePricing, user) => {
|
|
61
|
+
return anonHeaderItems(false, true, hidePricing, user);
|
|
62
62
|
};
|
|
63
|
-
export const anonLoginMobileHeaderItems = (hidePricing, user
|
|
64
|
-
return anonMobileHeaderItems(false, true, hidePricing, user
|
|
63
|
+
export const anonLoginMobileHeaderItems = (hidePricing, user) => {
|
|
64
|
+
return anonMobileHeaderItems(false, true, hidePricing, user);
|
|
65
65
|
};
|
|
66
|
-
export const anonSignupHeaderItems = (hidePricing, user
|
|
67
|
-
return anonHeaderItems(true, false, hidePricing, user
|
|
66
|
+
export const anonSignupHeaderItems = (hidePricing, user) => {
|
|
67
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
68
68
|
};
|
|
69
|
-
export const anonSignupMobileHeaderItems = (hidePricing, user
|
|
70
|
-
return anonMobileHeaderItems(true, false, hidePricing, user
|
|
69
|
+
export const anonSignupMobileHeaderItems = (hidePricing, user) => {
|
|
70
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
71
71
|
};
|
|
72
|
-
export const freeHeaderItems = (user, hidePricing
|
|
72
|
+
export const freeHeaderItems = (user, hidePricing) => {
|
|
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]),
|
|
77
|
+
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, 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, isLiveLearningHubEnabled) =>
|
|
|
84
84
|
right: rightItems
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
export const freeMobileHeaderItems = (user, hidePricing
|
|
87
|
+
export const freeMobileHeaderItems = (user, hidePricing) => {
|
|
88
88
|
const specialLogo = {
|
|
89
89
|
...logo,
|
|
90
90
|
checkMini: true
|
|
@@ -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]), liveLearningHub, 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 =
|
|
116
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []),
|
|
115
|
+
export const proHeaderItems = user => {
|
|
116
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions];
|
|
117
117
|
const rightItems = [];
|
|
118
118
|
rightItems.push(proProfile(user));
|
|
119
119
|
if (user.isPaused) {
|
|
@@ -124,8 +124,8 @@ export const proHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
124
124
|
right: rightItems
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
export const teamsHeaderItems =
|
|
128
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(),
|
|
127
|
+
export const teamsHeaderItems = user => {
|
|
128
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub];
|
|
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 =
|
|
155
|
+
export const proMobileHeaderItems = user => {
|
|
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] : []), liveLearningHub, businessSolutions, proProfile(user)];
|
|
159
159
|
if (user.isPaused) {
|
|
160
160
|
mainMenuItems.push(unpausePro);
|
|
161
161
|
}
|
|
@@ -165,10 +165,10 @@ export const proMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
165
165
|
mainMenu: mainMenuItems
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
|
-
export const teamsMobileHeaderItems =
|
|
168
|
+
export const teamsMobileHeaderItems = user => {
|
|
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(), liveLearningHub, 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
|
|
4
|
+
import { useCallback } 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,29 +16,28 @@ export const HeaderQuizContext = /*#__PURE__*/React.createContext({
|
|
|
16
16
|
|
|
17
17
|
function getAppHeaderItems(props, mobile) {
|
|
18
18
|
const {
|
|
19
|
-
hidePricing
|
|
20
|
-
isLiveLearningHubEnabled
|
|
19
|
+
hidePricing
|
|
21
20
|
} = props;
|
|
22
21
|
switch (props.type) {
|
|
23
22
|
case 'anon':
|
|
24
23
|
switch (props.variant) {
|
|
25
24
|
case 'landing':
|
|
26
|
-
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user
|
|
25
|
+
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user) : anonLandingHeaderItems(hidePricing, props.user);
|
|
27
26
|
case 'login':
|
|
28
|
-
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user
|
|
27
|
+
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user) : anonLoginHeaderItems(hidePricing, props.user);
|
|
29
28
|
case 'signup':
|
|
30
|
-
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user
|
|
29
|
+
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user) : anonSignupHeaderItems(hidePricing, props.user);
|
|
31
30
|
default:
|
|
32
|
-
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user
|
|
31
|
+
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user) : anonDefaultHeaderItems(hidePricing, props.user);
|
|
33
32
|
}
|
|
34
33
|
case 'enterprise':
|
|
35
34
|
return mobile ? enterpriseMobileHeaderItems(props.user, props) : enterpriseHeaderItems(props.user, props);
|
|
36
35
|
case 'free':
|
|
37
|
-
return mobile ? freeMobileHeaderItems(props.user, hidePricing
|
|
36
|
+
return mobile ? freeMobileHeaderItems(props.user, hidePricing) : freeHeaderItems(props.user, hidePricing);
|
|
38
37
|
case 'pro':
|
|
39
|
-
return mobile ? proMobileHeaderItems(props.user
|
|
38
|
+
return mobile ? proMobileHeaderItems(props.user) : proHeaderItems(props.user);
|
|
40
39
|
case 'teams':
|
|
41
|
-
return mobile ? teamsMobileHeaderItems(props.user
|
|
40
|
+
return mobile ? teamsMobileHeaderItems(props.user) : teamsHeaderItems(props.user);
|
|
42
41
|
case 'simple':
|
|
43
42
|
return mobile ? simpleMobileHeaderItems : simpleHeaderItems;
|
|
44
43
|
case 'bootcamp':
|
|
@@ -53,10 +52,6 @@ export const GlobalHeader = props => {
|
|
|
53
52
|
onLinkAction
|
|
54
53
|
} = props;
|
|
55
54
|
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;
|
|
60
55
|
const combinedAction = useCallback((event, item) => {
|
|
61
56
|
action(event, item);
|
|
62
57
|
if (isAppHeaderItemWithHref(item)) onLinkAction?.(event, item);
|
|
@@ -69,41 +64,38 @@ export const GlobalHeader = props => {
|
|
|
69
64
|
showOnboardingQuiz,
|
|
70
65
|
showSortingQuiz
|
|
71
66
|
},
|
|
72
|
-
children: /*#__PURE__*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
|
|
105
|
-
}), props.children]
|
|
106
|
-
})
|
|
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]
|
|
107
99
|
})
|
|
108
100
|
});
|
|
109
101
|
};
|
|
@@ -15,6 +15,7 @@ const rowRenderEach = (items, itemRenderer) => {
|
|
|
15
15
|
},
|
|
16
16
|
as: "ul",
|
|
17
17
|
pl: 0,
|
|
18
|
+
mb: 0,
|
|
18
19
|
gap: {
|
|
19
20
|
sm: 32
|
|
20
21
|
},
|
|
@@ -35,6 +36,7 @@ const gridRenderEach = (maxCols, items, itemRenderer) => {
|
|
|
35
36
|
gap: 32,
|
|
36
37
|
as: "ul",
|
|
37
38
|
pl: 0,
|
|
39
|
+
mb: 0,
|
|
38
40
|
children: items.map(item => /*#__PURE__*/_jsx(Column, {
|
|
39
41
|
size: size,
|
|
40
42
|
as: "li",
|
|
@@ -67,6 +69,7 @@ export const PageFeaturesEnhanced = ({
|
|
|
67
69
|
children: [title && /*#__PURE__*/_jsx(FlexBox, {
|
|
68
70
|
justifyContent: "center",
|
|
69
71
|
textAlign: "center",
|
|
72
|
+
mb: 8,
|
|
70
73
|
children: eyebrow ? /*#__PURE__*/_jsx(TitleWithEyebrow, {
|
|
71
74
|
title: title,
|
|
72
75
|
eyebrow: eyebrow,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { Box, Flyout, StrokeButton } from '@codecademy/gamut';
|
|
2
|
+
import { Box, Flyout, Logo, StrokeButton } from '@codecademy/gamut';
|
|
3
3
|
import { variant } from '@codecademy/gamut-styles';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { LogoCodecademy } from '../Logos';
|
|
7
6
|
import { AccordionMenu } from './AccordionMenu';
|
|
8
7
|
import { LayoutMenuSection } from './LayoutMenuSection';
|
|
9
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -33,7 +32,7 @@ const StyleBox = /*#__PURE__*/_styled(Box, {
|
|
|
33
32
|
paddingLeft: '8px'
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
35
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MYXlvdXRNZW51L0xheW91dE1lbnUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVEaUIiLCJmaWxlIjoiLi4vLi4vc3JjL0xheW91dE1lbnUvTGF5b3V0TWVudS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBCb3gsXG4gIEZseW91dCxcbiAgTG9nbyxcbiAgU3Ryb2tlQnV0dG9uLFxuICBXaXRoQ2hpbGRyZW5Qcm9wLFxufSBmcm9tICdAY29kZWNhZGVteS9nYW11dCc7XG5pbXBvcnQgeyB2YXJpYW50IH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCB7IFNjYWxlIH0gZnJvbSAnQGNvZGVjYWRlbXkvdmFyaWFuY2UvZGlzdC90eXBlcy9jb25maWcnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J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uICAgICAgICA+XG4gICAgICAgICAge21vYmlsZUJ1dHRvblRleHR9XG4gICAgICAgIDwvU3Ryb2tlQnV0dG9uPlxuICAgICAgPC9Cb3g+XG4gICAgICA8U3R5bGVCb3hcbiAgICAgICAgbWVudUhlaWdodD17bWVudUhlaWdodH1cbiAgICAgICAgZGlzcGxheT17eyBfOiAnbm9uZScsIFticmVha3BvaW50XTogJ2Jsb2NrJyB9fVxuICAgICAgICBkYXRhLXRlc3RpZD1cImRlc2t0b3AtbWVudVwiXG4gICAgICA+XG4gICAgICAgIHt0b3BMaW5rTGF5b3V0TWVudVNlY3Rpb25zfVxuICAgICAgICB7YWNjb3JkaW9uTWVudVNlY3Rpb25zfVxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L1N0eWxlQm94PlxuICAgIDwvbmF2PlxuICApO1xufTtcbiJdfQ== */");
|
|
37
36
|
export const LayoutMenu = ({
|
|
38
37
|
closeLabel,
|
|
39
38
|
sections,
|
|
@@ -70,7 +69,7 @@ export const LayoutMenu = ({
|
|
|
70
69
|
closeLabel: closeLabel,
|
|
71
70
|
expanded: expanded,
|
|
72
71
|
onClose: () => setExpanded(false),
|
|
73
|
-
title: /*#__PURE__*/_jsx(
|
|
72
|
+
title: /*#__PURE__*/_jsx(Logo, {
|
|
74
73
|
mb: 32
|
|
75
74
|
}),
|
|
76
75
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { Box, Flyout, StrokeButton } from '@codecademy/gamut';
|
|
2
|
+
import { Box, Flyout, Logo, StrokeButton } from '@codecademy/gamut';
|
|
3
3
|
import { variant } from '@codecademy/gamut-styles';
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
|
-
import { LogoCodecademy } from '../Logos';
|
|
6
5
|
import { AccordionMenu } from './AccordionMenu';
|
|
7
6
|
import { LayoutMenuSection } from './LayoutMenuSection';
|
|
8
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -31,7 +30,7 @@ const StyleBox = /*#__PURE__*/_styled(Box, {
|
|
|
31
30
|
height: '1370px'
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
33
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MYXlvdXRNZW51VmFyaWFudC9MYXlvdXRNZW51LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRGlCIiwiZmlsZSI6Ii4uLy4uL3NyYy9MYXlvdXRNZW51VmFyaWFudC9MYXlvdXRNZW51LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEJveCxcbiAgRmx5b3V0LFxuICBMb2dvLFxuICBTdHJva2VCdXR0b24sXG4gIFdpdGhDaGlsZHJlblByb3AsXG59IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IEdhbXV0SWNvblByb3BzIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHsgdmFyaWFudCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50VHlwZSwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB7IEFjY29yZGlvbk1lbnUsIFNlY3Rpb24sIFNlY3Rpb25JdGVtIH0gZnJvbSAnLi9BY2NvcmRpb25NZW51JztcbmltcG9ydCB7IExheW91dE1lbnVTZWN0aW9uIH0gZnJvbSAnLi9MYXlvdXRNZW51U2VjdGlvbic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9zZUxhYmVsfVxuICAgICAgICAgIGV4cGFuZGVkPXtleHBhbmRlZH1cbiAgICAgICAgICBvbkNsb3NlPXsoKSA9PiBzZXRFeHBhbmRlZChmYWxzZSl9XG4gICAgICAgICAgdGl0bGU9ezxMb2dvIG1iPXszMn0gLz59XG4gICAgICAgID5cbiAgICAgICAgICA8Qm94IHB4PXsyNH0+XG4gICAgICAgICAgICB7dG9wTGlua0xheW91dE1lbnVTZWN0aW9uc31cbiAgICAgICAgICAgIHthY2NvcmRpb25NZW51U2VjdGlvbnN9XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9Cb3g+XG4gICAgICAgIDwvRmx5b3V0PlxuICAgICAgICA8U3Ryb2tlQnV0dG9uXG4gICAgICAgICAgYXJpYS1leHBhbmRlZD17ZXhwYW5kZWR9XG4gICAgICAgICAgdmFyaWFudD1cInNlY29uZGFyeVwiXG4gICAgICAgICAgd2lkdGg9ezF9XG4gICAgICAgICAgaWNvbj17bW9iaWxlQnV0dG9uSWNvbn1cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBzZXRFeHBhbmRlZCh0cnVlKX1cbiAgICAgICAgPlxuICAgICAgICAgIHttb2JpbGVCdXR0b25UZXh0fVxuICAgICAgICA8L1N0cm9rZUJ1dHRvbj5cbiAgICAgIDwvQm94PlxuICAgICAgPFN0eWxlQm94XG4gICAgICAgIG1lbnVIZWlnaHQ9e21lbnVIZWlnaHR9XG4gICAgICAgIGRpc3BsYXk9e3sgXzogJ25vbmUnLCBbYnJlYWtwb2ludF06ICdibG9jaycgfX1cbiAgICAgICAgZGF0YS10ZXN0aWQ9XCJkZXNrdG9wLW1lbnVcIlxuICAgICAgPlxuICAgICAgICB7dG9wTGlua0xheW91dE1lbnVTZWN0aW9uc31cbiAgICAgICAge2FjY29yZGlvbk1lbnVTZWN0aW9uc31cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9TdHlsZUJveD5cbiAgICA8L25hdj5cbiAgKTtcbn07XG4iXX0= */");
|
|
35
34
|
export const LayoutMenu = ({
|
|
36
35
|
closeLabel,
|
|
37
36
|
sections,
|
|
@@ -65,7 +64,7 @@ export const LayoutMenu = ({
|
|
|
65
64
|
closeLabel: closeLabel,
|
|
66
65
|
expanded: expanded,
|
|
67
66
|
onClose: () => setExpanded(false),
|
|
68
|
-
title: /*#__PURE__*/_jsx(
|
|
67
|
+
title: /*#__PURE__*/_jsx(Logo, {
|
|
69
68
|
mb: 32
|
|
70
69
|
}),
|
|
71
70
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Box, FlexBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
export const AssessmentDetail = ({
|
|
5
|
+
isHighestScore,
|
|
6
|
+
score,
|
|
7
|
+
scoreAchievedAt
|
|
8
|
+
}) => {
|
|
9
|
+
const hasPassedAssessment = score && score >= 70;
|
|
10
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
11
|
+
borderColor: "background-hover",
|
|
12
|
+
borderRight: isHighestScore ? 1 : 'none',
|
|
13
|
+
width: "100%",
|
|
14
|
+
p: 16,
|
|
15
|
+
column: true,
|
|
16
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
17
|
+
fontWeight: 700,
|
|
18
|
+
children: isHighestScore ? 'Highest score' : 'Most recent'
|
|
19
|
+
}), score != null ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
20
|
+
children: [/*#__PURE__*/_jsxs(FlexBox, {
|
|
21
|
+
mt: 8,
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
24
|
+
variant: "title-sm",
|
|
25
|
+
"data-testid": "score-percent",
|
|
26
|
+
mr: 4,
|
|
27
|
+
color: hasPassedAssessment ? 'green-700' : undefined,
|
|
28
|
+
children: `${score}%`
|
|
29
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
30
|
+
children: !hasPassedAssessment && /*#__PURE__*/_jsx(Box, {
|
|
31
|
+
"data-testid": "failed-assessment-indicator",
|
|
32
|
+
borderRadius: "full",
|
|
33
|
+
dimensions: 16,
|
|
34
|
+
bg: "orange-500",
|
|
35
|
+
mb: 4
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
}), !!scoreAchievedAt && /*#__PURE__*/_jsx(Text, {
|
|
39
|
+
textColor: "text-secondary",
|
|
40
|
+
children: scoreAchievedAt
|
|
41
|
+
})]
|
|
42
|
+
}) : /*#__PURE__*/_jsxs(FlexBox, {
|
|
43
|
+
column: true,
|
|
44
|
+
color: "text-secondary",
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
46
|
+
fontWeight: 700,
|
|
47
|
+
my: 4,
|
|
48
|
+
"aria-hidden": true,
|
|
49
|
+
children: "-"
|
|
50
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
51
|
+
children: "Not tested yet"
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface AssessmentScoresProps {
|
|
2
|
+
highestScore: number | null | undefined;
|
|
3
|
+
highestScoreAchievedAt: string | null | undefined;
|
|
4
|
+
latestScore: number | null | undefined;
|
|
5
|
+
latestScoreAchievedAt: string | null | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const LearningOutcomeAssessmentScores: React.FC<AssessmentScoresProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { AssessmentDetail } from './AssessmentDetail';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export const LearningOutcomeAssessmentScores = ({
|
|
5
|
+
highestScore,
|
|
6
|
+
highestScoreAchievedAt,
|
|
7
|
+
latestScore,
|
|
8
|
+
latestScoreAchievedAt
|
|
9
|
+
}) => {
|
|
10
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
11
|
+
borderColor: "background-hover",
|
|
12
|
+
border: 1,
|
|
13
|
+
borderRadius: "md",
|
|
14
|
+
width: "100%",
|
|
15
|
+
children: [/*#__PURE__*/_jsx(AssessmentDetail, {
|
|
16
|
+
isHighestScore: true,
|
|
17
|
+
score: highestScore,
|
|
18
|
+
scoreAchievedAt: highestScoreAchievedAt
|
|
19
|
+
}), /*#__PURE__*/_jsx(AssessmentDetail, {
|
|
20
|
+
score: latestScore,
|
|
21
|
+
scoreAchievedAt: latestScoreAchievedAt
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const LearningOutcomeLowAssessmentDot: import("@emotion/styled").StyledComponent<{
|
|
2
2
|
theme?: import("@emotion/react").Theme | undefined;
|
|
3
3
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
4
|
-
} & import("@codecademy/gamut").BoxProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
4
|
+
} & import("@codecademy/gamut").BoxProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onClick" | "slot" | "style" | "title" | "children" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("react").ClassAttributes<HTMLDivElement>> & {
|
|
5
5
|
theme?: import("@emotion/react").Theme;
|
|
6
6
|
} & {
|
|
7
7
|
hasBorder?: boolean;
|
|
@@ -19,6 +19,11 @@ interface LearningOutcomeCardProps {
|
|
|
19
19
|
emphasized?: boolean;
|
|
20
20
|
progress?: number;
|
|
21
21
|
skills?: LearningOutcomeSkill[] | null;
|
|
22
|
+
progressUpdateData?: {
|
|
23
|
+
previousProgress: number;
|
|
24
|
+
progressDuration: number;
|
|
25
|
+
completionDelay?: number;
|
|
26
|
+
};
|
|
22
27
|
}
|
|
23
28
|
export declare const LearningOutcomeCard: React.FC<LearningOutcomeCardProps>;
|
|
24
29
|
export {};
|