@codecademy/brand 2.0.0-alpha.64890e8dbf.0 → 2.0.0-alpha.683b4b5c61.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/README.md +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +7 -8
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -4
- package/dist/AppHeader/Search/consts.js +1 -1
- package/dist/AppHeader/index.js +2 -5
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +5 -7
- package/dist/FeatureList/index.js +5 -4
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +6 -9
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +1 -1
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +3 -3
- package/dist/GlobalFooter/index.js +17 -25
- package/dist/GlobalHeader/GlobalHeaderItems.js +6 -3
- package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
- package/dist/GlobalHeader/index.js +46 -49
- package/dist/LandingPage/PageFeaturesEnhanced.js +3 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeCard/index.js +61 -26
- package/dist/LearningOutcomeFlyout/index.js +168 -0
- package/dist/LearningOutcomeTile/index.js +1 -3
- package/dist/PlanCard/index.js +75 -28
- package/dist/index.js +3 -3
- package/dist/lib/catalogList/index.js +3 -3
- package/dist/lib/resourcesList/index.js +2 -11
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +16 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +35 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ We recommend reading the [Browse Stories](https://storybook.js.org/docs/react/ge
|
|
|
24
24
|
|
|
25
25
|
## Writing stories
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
You can find more information about how to write stories [here](https://storybook.js.org/docs/react/writing-stories/introduction).
|
|
28
28
|
|
|
29
29
|
Eventually our stories will be colocated with their respective components, but in the meantime you can find them in the `./stories` folder.
|
|
30
30
|
|
|
@@ -4,7 +4,7 @@ import { TinyBlocks } from '@codecademy/gamut-illustrations';
|
|
|
4
4
|
import { Background } from '@codecademy/gamut-styles';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useContext, useEffect, useRef } from 'react';
|
|
7
|
-
import { HeaderQuizContext
|
|
7
|
+
import { HeaderQuizContext } from '../../../GlobalHeader';
|
|
8
8
|
import { careerPaths, getTopSubjects, liveLearningHubItems, topLanguages } from '../../../lib/catalogList';
|
|
9
9
|
import { DescriptionSectionContainer, LayoutGridAntiAliased, useMegaMenuHeaderResponsiveStyles } from '../../shared';
|
|
10
10
|
import { useAppHeaderDropdownContext } from '../AppHeaderDropdownProvider';
|
|
@@ -31,12 +31,12 @@ const catalogButtonData = {
|
|
|
31
31
|
href: '/catalog',
|
|
32
32
|
trackingTarget: 'topnav_catalog_explore_full'
|
|
33
33
|
};
|
|
34
|
-
const
|
|
35
|
-
text: '
|
|
34
|
+
const uxDesignerCareerPathHighlight = {
|
|
35
|
+
text: 'Want to help shape digital products? Check out the new UX Designer career path.',
|
|
36
36
|
id: 'nav-highlight',
|
|
37
37
|
type: 'link',
|
|
38
|
-
href: '/
|
|
39
|
-
trackingTarget: '
|
|
38
|
+
href: '/learn/paths/ux-designer-career-path',
|
|
39
|
+
trackingTarget: 'topnav_catalog_banner_ux_designer_career_path'
|
|
40
40
|
};
|
|
41
41
|
export const AppHeaderCatalogSection = /*#__PURE__*/React.forwardRef(({
|
|
42
42
|
action,
|
|
@@ -53,7 +53,6 @@ export const AppHeaderCatalogSection = /*#__PURE__*/React.forwardRef(({
|
|
|
53
53
|
showOnboardingQuiz,
|
|
54
54
|
showSortingQuiz
|
|
55
55
|
} = useContext(HeaderQuizContext);
|
|
56
|
-
const isLiveLearningHubEnabled = useContext(LiveLearningHubContext);
|
|
57
56
|
const tabIndex = isOpen === false ? -1 : 0;
|
|
58
57
|
const styles = useMegaMenuHeaderResponsiveStyles();
|
|
59
58
|
const bannerStyles = useBannerResponsiveStyles();
|
|
@@ -63,7 +62,7 @@ export const AppHeaderCatalogSection = /*#__PURE__*/React.forwardRef(({
|
|
|
63
62
|
setFirstItemRef(firstElemRef.current);
|
|
64
63
|
}
|
|
65
64
|
}, [setFirstItemRef, firstElemRef]);
|
|
66
|
-
const navHighlightData =
|
|
65
|
+
const navHighlightData = uxDesignerCareerPathHighlight;
|
|
67
66
|
const topSubjects = getTopSubjects();
|
|
68
67
|
const onClick = (event, linkItem) => {
|
|
69
68
|
handleClose?.();
|
|
@@ -289,7 +288,7 @@ export const AppHeaderCatalogSection = /*#__PURE__*/React.forwardRef(({
|
|
|
289
288
|
})
|
|
290
289
|
})]
|
|
291
290
|
})
|
|
292
|
-
}, "Top career paths"),
|
|
291
|
+
}, "Top career paths"), /*#__PURE__*/_jsx(StyledColumn, {
|
|
293
292
|
as: "li",
|
|
294
293
|
size: 12,
|
|
295
294
|
children: /*#__PURE__*/_jsxs(LayoutGrid, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { useCallback,
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { LiveLearningHubContext } from '../../../GlobalHeader';
|
|
4
3
|
import { getHeaderResourcesList } from '../../../lib/resourcesList';
|
|
5
4
|
import { AnimatedMegaMenuDropdown } from '../../shared';
|
|
6
5
|
import { AppHeaderDropdownProvider } from '../AppHeaderDropdownProvider';
|
|
@@ -24,11 +23,10 @@ export const AppHeaderResourcesDropdown = ({
|
|
|
24
23
|
lastOpenedDropdown,
|
|
25
24
|
setLastOpenedDropdown
|
|
26
25
|
} = useAppHeaderContext();
|
|
27
|
-
const isLiveLearningHubEnabled = useContext(LiveLearningHubContext);
|
|
28
26
|
|
|
29
27
|
// Add scrollbar for short screens after transition (otherwise scrollbar appears and dissapears for adequate heights during transition)
|
|
30
28
|
const [animationCompleteStyles, setAnimationCompleteStyles] = useState(false);
|
|
31
|
-
const headerResourcesList = getHeaderResourcesList(
|
|
29
|
+
const headerResourcesList = getHeaderResourcesList();
|
|
32
30
|
const animationFinished = () => {
|
|
33
31
|
setAnimationCompleteStyles(isOpen);
|
|
34
32
|
if (isOpen && dropdownRef.current) {
|
|
@@ -37,4 +37,4 @@ export const popularContent = [{
|
|
|
37
37
|
type: ContentType.DOC,
|
|
38
38
|
slug: 'html/concepts/elements'
|
|
39
39
|
}];
|
|
40
|
-
export const ALLOWED_HOSTS = ['skillsoft.com', 'percipio.com', 'localhost', 'codecademy.com'];
|
|
40
|
+
export const ALLOWED_HOSTS = ['skillsoft.com', 'percipio.com', 'localhost', 'codecademy.com', 'squads-dev.com'];
|
package/dist/AppHeader/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { LiveLearningHubContext } from '../GlobalHeader';
|
|
2
|
+
import { useMemo, useRef } from 'react';
|
|
4
3
|
import { HeaderHeightArea } from '../HeaderHeightArea';
|
|
5
4
|
import { NotificationsDropdown } from '../Notifications/NotificationsDropdown';
|
|
6
5
|
import { useHeaderNotifications } from '../Notifications/useHeaderNotifications';
|
|
@@ -25,7 +24,6 @@ export const AppHeader = ({
|
|
|
25
24
|
type = 'standard'
|
|
26
25
|
}) => {
|
|
27
26
|
const menuContainerRef = useRef(null);
|
|
28
|
-
const isLiveLearningHubEnabled = useContext(LiveLearningHubContext);
|
|
29
27
|
const [notificationsBell, notificationsView] = useHeaderNotifications({
|
|
30
28
|
settings: notifications,
|
|
31
29
|
Renderer: NotificationsDropdown
|
|
@@ -55,8 +53,7 @@ export const AppHeader = ({
|
|
|
55
53
|
isStandalone,
|
|
56
54
|
isTeams,
|
|
57
55
|
redirectParam,
|
|
58
|
-
spacing: dropdownSpacing
|
|
59
|
-
isLiveLearningHubEnabled
|
|
56
|
+
spacing: dropdownSpacing
|
|
60
57
|
})
|
|
61
58
|
}, item.id);
|
|
62
59
|
});
|
|
@@ -2,13 +2,12 @@ import _styled from "@emotion/styled/base";
|
|
|
2
2
|
import { Anchor, Menu, Text } from '@codecademy/gamut';
|
|
3
3
|
import { ArrowChevronLeftIcon } from '@codecademy/gamut-icons';
|
|
4
4
|
import { css } from '@codecademy/gamut-styles';
|
|
5
|
-
import {
|
|
5
|
+
import { useEffect, useRef } from 'react';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { AppHeaderCatalogSection } from '../../AppHeader/AppHeaderElements/AppHeaderCatalogSection';
|
|
8
8
|
import { AppHeaderLinkSections } from '../../AppHeader/AppHeaderElements/AppHeaderLinkSections';
|
|
9
9
|
import { AppHeaderListItem } from '../../AppHeader/AppHeaderElements/AppHeaderListItem';
|
|
10
10
|
import { AppHeaderResourcesSection } from '../../AppHeader/AppHeaderElements/AppHeaderResourcesSection';
|
|
11
|
-
import { LiveLearningHubContext } from '../../GlobalHeader';
|
|
12
11
|
import { getHeaderResourcesList } from '../../lib/resourcesList';
|
|
13
12
|
import { MobileSubMenuWrapper, MobileUlWrapper } from './elements';
|
|
14
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -21,8 +20,8 @@ const StyledAnchor = /*#__PURE__*/_styled(Anchor, {
|
|
|
21
20
|
my: 24,
|
|
22
21
|
padding: 0,
|
|
23
22
|
width: 'calc(100% - 64px)'
|
|
24
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
25
|
-
const renderHeaderSection = (item, action, handleCloseMainMenu
|
|
23
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpb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pbGVTdWJNZW51V3JhcHBlcj5cbiAgICA8L01vYmlsZVVsV3JhcHBlcj5cbiAgKTtcbn07XG4iXX0= */");
|
|
24
|
+
const renderHeaderSection = (item, action, handleCloseMainMenu) => {
|
|
26
25
|
switch (item.type) {
|
|
27
26
|
case 'catalog-dropdown':
|
|
28
27
|
return /*#__PURE__*/_jsx(AppHeaderCatalogSection, {
|
|
@@ -34,7 +33,7 @@ const renderHeaderSection = (item, action, handleCloseMainMenu, isLiveLearningHu
|
|
|
34
33
|
return /*#__PURE__*/_jsx(AppHeaderResourcesSection, {
|
|
35
34
|
action: action,
|
|
36
35
|
handleClose: handleCloseMainMenu,
|
|
37
|
-
resources: getHeaderResourcesList(
|
|
36
|
+
resources: getHeaderResourcesList()
|
|
38
37
|
});
|
|
39
38
|
default:
|
|
40
39
|
return /*#__PURE__*/_jsx(AppHeaderLinkSections, {
|
|
@@ -50,7 +49,6 @@ export const AppHeaderSubNavMobile = ({
|
|
|
50
49
|
handleCloseMainMenu,
|
|
51
50
|
item
|
|
52
51
|
}) => {
|
|
53
|
-
const isLiveLearningHubEnabled = useContext(LiveLearningHubContext);
|
|
54
52
|
const mainUlWrapper = useRef(null);
|
|
55
53
|
useEffect(() => {
|
|
56
54
|
if (mainUlWrapper?.current) {
|
|
@@ -99,7 +97,7 @@ export const AppHeaderSubNavMobile = ({
|
|
|
99
97
|
variant: "fixed",
|
|
100
98
|
mx: 8,
|
|
101
99
|
width: "calc(100% - 16px)",
|
|
102
|
-
children: renderHeaderSection(item, action, handleCloseMainMenu
|
|
100
|
+
children: renderHeaderSection(item, action, handleCloseMainMenu)
|
|
103
101
|
})]
|
|
104
102
|
})]
|
|
105
103
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { FlexBox, Text } from '@codecademy/gamut';
|
|
3
|
+
import { theme } from '@codecademy/gamut-styles';
|
|
3
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
5
|
const StyledIconContainer = /*#__PURE__*/_styled(FlexBox, {
|
|
5
6
|
target: "e4ma61r0",
|
|
6
7
|
label: "StyledIconContainer"
|
|
7
8
|
})("color:", ({
|
|
8
9
|
iconColor
|
|
9
|
-
}) => iconColor, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10
|
+
}) => iconColor, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9GZWF0dXJlTGlzdC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JrRSIsImZpbGUiOiIuLi8uLi9zcmMvRmVhdHVyZUxpc3QvaW5kZXgudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRmxleEJveCwgVGV4dCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IEdhbXV0SWNvblByb3BzIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5leHBvcnQgdHlwZSBGZWF0dXJlTGlzdEl0ZW0gPSB7XG4gIHRpdGxlOiBzdHJpbmc7XG4gIGRlc2NyaXB0aW9uOiBzdHJpbmcgfCBudWxsO1xuICBpY29uOiBSZWFjdC5Db21wb25lbnRUeXBlPFJlYWN0LlByb3BzV2l0aENoaWxkcmVuPEdhbXV0SWNvblByb3BzPj4gfCBudWxsO1xuICBpY29uQ29sb3I6IHN0cmluZyB8IG51bGw7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIElGZWF0dXJlTGlzdFByb3BzIHtcbiAgZmV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ZWF0dXJlLmRlc2NyaXB0aW9uID8gOCA6IDB9PlxuICAgICAgICAgICAgPFRleHRcbiAgICAgICAgICAgICAgZm9udFNpemU9ezE2fVxuICAgICAgICAgICAgICBmb250V2VpZ2h0PXtmZWF0dXJlLmRlc2NyaXB0aW9uID8gJ2JvbGQnIDogJ25vcm1hbCd9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHtmZWF0dXJlLnRpdGxlfVxuICAgICAgICAgICAgPC9UZXh0PlxuICAgICAgICAgICAge2ZlYXR1cmUuZGVzY3JpcHRpb24gJiYgKFxuICAgICAgICAgICAgICA8VGV4dCBmb250U2l6ZT17MTR9PntmZWF0dXJlLmRlc2NyaXB0aW9ufTwvVGV4dD5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9GbGV4Qm94PlxuICAgICAgICA8L0ZsZXhCb3g+XG4gICAgICApKX1cbiAgICA8L0ZsZXhCb3g+XG4gICk7XG59O1xuIl19 */"));
|
|
10
11
|
export const FeatureList = ({
|
|
11
12
|
featureList
|
|
12
13
|
}) => {
|
|
@@ -18,9 +19,9 @@ export const FeatureList = ({
|
|
|
18
19
|
flexDirection: "row",
|
|
19
20
|
gap: 12,
|
|
20
21
|
alignItems: feature.description ? 'flex-start' : 'center',
|
|
21
|
-
children: [/*#__PURE__*/_jsx(StyledIconContainer, {
|
|
22
|
-
iconColor: feature.iconColor ||
|
|
23
|
-
children:
|
|
22
|
+
children: [feature.icon && /*#__PURE__*/_jsx(StyledIconContainer, {
|
|
23
|
+
iconColor: feature.iconColor || theme.colors.text,
|
|
24
|
+
children: /*#__PURE__*/_jsx(feature.icon, {
|
|
24
25
|
size: feature.description ? 24 : 20
|
|
25
26
|
})
|
|
26
27
|
}), /*#__PURE__*/_jsxs(FlexBox, {
|