@codecademy/brand 3.0.0-alpha.da574fc3ea.0 → 3.1.0-alpha.0155f9e803.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 (57) hide show
  1. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/MarketingBanner.d.ts +3 -0
  2. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/MarketingBanner.js +83 -0
  3. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.d.ts +10 -0
  4. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.js +232 -0
  5. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/consts.d.ts +13 -0
  6. package/dist/AppHeader/AppHeaderElements/{AppHeaderCatalogSectionVariant → AppHeaderCatalogDropdown}/consts.js +17 -4
  7. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js +13 -7
  8. package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.d.ts +10 -0
  9. package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.js +82 -0
  10. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.d.ts +1 -0
  11. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.js +5 -2
  12. package/dist/AppHeader/AppHeaderElements/AppHeaderFeatureCard/index.d.ts +4 -0
  13. package/dist/AppHeader/AppHeaderElements/AppHeaderFeatureCard/index.js +52 -0
  14. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.d.ts +11 -0
  15. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.js +140 -0
  16. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/consts.d.ts +18 -0
  17. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/consts.js +273 -0
  18. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +31 -5
  19. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/AppHeaderSection.test.js +83 -0
  20. package/dist/AppHeader/AppHeaderElements/{AppHeaderCatalogSectionVariant → AppHeaderSection}/NavSection.d.ts +2 -2
  21. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/NavSection.js +79 -0
  22. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/PanelLayout.d.ts +10 -0
  23. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/PanelLayout.js +54 -0
  24. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/index.d.ts +17 -0
  25. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/index.js +86 -0
  26. package/dist/AppHeader/AppHeaderElements/AppHeaderSectionVariant/NavSection.d.ts +15 -0
  27. package/dist/AppHeader/AppHeaderElements/AppHeaderSectionVariant/NavSection.js +79 -0
  28. package/dist/AppHeaderMobile/AppHeaderCatalogSectonVariantMobile/index.d.ts +4 -0
  29. package/dist/AppHeaderMobile/AppHeaderCatalogSectonVariantMobile/index.js +63 -0
  30. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +34 -14
  31. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +12 -5
  32. package/dist/GlobalHeader/GlobalHeaderItems.d.ts +2 -0
  33. package/dist/GlobalHeader/GlobalHeaderItems.js +18 -1
  34. package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +2 -2
  35. package/dist/GlobalHeader/GlobalHeaderVariants.js +39 -17
  36. package/dist/GlobalHeader/index.d.ts +1 -0
  37. package/dist/GlobalHeader/index.js +46 -42
  38. package/dist/GlobalHeader/types.d.ts +33 -0
  39. package/dist/LearningOutcomeCard/index.js +3 -3
  40. package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.d.ts +2 -1
  41. package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.js +26 -7
  42. package/dist/LearningOutcomeFlyout/index.d.ts +5 -47
  43. package/dist/LearningOutcomeFlyout/index.js +32 -21
  44. package/dist/LearningOutcomeFlyout/types.d.ts +49 -0
  45. package/dist/LearningOutcomeFlyout/types.js +5 -0
  46. package/dist/index.d.ts +0 -1
  47. package/dist/index.js +0 -1
  48. package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +8 -4
  49. package/package.json +1 -1
  50. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavPanels.d.ts +0 -4
  51. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavPanels.js +0 -98
  52. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavSection.js +0 -67
  53. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/consts.d.ts +0 -7
  54. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/index.d.ts +0 -11
  55. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/index.js +0 -68
  56. package/dist/CourseRecommendationsLink/index.d.ts +0 -3
  57. package/dist/CourseRecommendationsLink/index.js +0 -27
@@ -0,0 +1,52 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { Box, Card, FlexBox, Text } from '@codecademy/gamut';
3
+ import { GridDense } from '@codecademy/gamut-patterns';
4
+ import { theme } from '@codecademy/gamut-styles';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const StyledCard = /*#__PURE__*/_styled(Card, {
7
+ target: "e1lwunvl0",
8
+ label: "StyledCard"
9
+ })("&:hover{color:", ({
10
+ theme
11
+ }) => theme.colors.primary, ";border-color:", ({
12
+ theme
13
+ }) => theme.colors.primary, ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9BcHBIZWFkZXIvQXBwSGVhZGVyRWxlbWVudHMvQXBwSGVhZGVyRmVhdHVyZUNhcmQvaW5kZXgudHN4Il0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kZXJDb2xvcj1cImJvcmRlci10ZXJ0aWFyeVwiXG4gICAgICBkaXNwbGF5PVwiZmxleFwiXG4gICAgICBhbGlnbkl0ZW1zPVwiZmxleC1zdGFydFwiXG4gICAgICBmbGV4RGlyZWN0aW9uPVwiY29sdW1uXCJcbiAgICAgIGhlaWdodD1cIjEwMCVcIlxuICAgID5cbiAgICAgIDxGbGV4Qm94IGFsaWduSXRlbXM9XCJjZW50ZXJcIiBnYXA9ezh9PlxuICAgICAgICA8Qm94XG4gICAgICAgICAgYmFja2dyb3VuZD17dGhlbWUuY29sb3JzWyduYXZ5LTIwMCddfVxuICAgICAgICAgIGJvcmRlclJhZGl1cz1cIm1kXCJcbiAgICAgICAgICBwPXs0fVxuICAgICAgICAgIGhlaWdodD17MjZ9XG4gICAgICAgID5cbiAgICAgICAgICB7aXRlbS5pY29ufVxuICAgICAgICA8L0JveD5cbiAgICAgICAgPFRleHQgdmFyaWFudD1cInRpdGxlLXhzXCI+e2l0ZW0ubGlua0l0ZW0udGV4dH08L1RleHQ+XG4gICAgICA8L0ZsZXhCb3g+XG4gICAgICA8Qm94IHdpZHRoPVwiMTAwJVwiPlxuICAgICAgICA8R3JpZERlbnNlIGhlaWdodD17NH0gLz5cbiAgICAgIDwvQm94PlxuICAgICAgPFRleHQgdmFyaWFudD1cInAtYmFzZVwiIGZvbnRTaXplPXsxNH0+XG4gICAgICAgIHtpdGVtLmRlc2NyaXB0aW9ufVxuICAgICAgPC9UZXh0PlxuICAgIDwvU3R5bGVkQ2FyZD5cbiAgKTtcbn07XG4iXX0= */"));
14
+ export const AppHeaderFeatureCard = ({
15
+ item
16
+ }) => {
17
+ return /*#__PURE__*/_jsxs(StyledCard, {
18
+ isInteractive: true,
19
+ px: 8,
20
+ py: 24,
21
+ borderRadius: "lg",
22
+ border: 1,
23
+ borderColor: "border-tertiary",
24
+ display: "flex",
25
+ alignItems: "flex-start",
26
+ flexDirection: "column",
27
+ height: "100%",
28
+ children: [/*#__PURE__*/_jsxs(FlexBox, {
29
+ alignItems: "center",
30
+ gap: 8,
31
+ children: [/*#__PURE__*/_jsx(Box, {
32
+ background: theme.colors['navy-200'],
33
+ borderRadius: "md",
34
+ p: 4,
35
+ height: 26,
36
+ children: item.icon
37
+ }), /*#__PURE__*/_jsx(Text, {
38
+ variant: "title-xs",
39
+ children: item.linkItem.text
40
+ })]
41
+ }), /*#__PURE__*/_jsx(Box, {
42
+ width: "100%",
43
+ children: /*#__PURE__*/_jsx(GridDense, {
44
+ height: 4
45
+ })
46
+ }), /*#__PURE__*/_jsx(Text, {
47
+ variant: "p-base",
48
+ fontSize: 14,
49
+ children: item.description
50
+ })]
51
+ });
52
+ };
@@ -0,0 +1,11 @@
1
+ import { AppHeaderCardItem } from './consts';
2
+ type NavPanelProps = {
3
+ tabIndex?: number;
4
+ links: AppHeaderCardItem[];
5
+ };
6
+ export declare const DocsPanel: ({ tabIndex }: NavPanelProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const LearningToolsPanel: ({ tabIndex }: NavPanelProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const PracticeToolsPanel: ({ tabIndex }: NavPanelProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const InspirationPanel: ({ tabIndex }: NavPanelProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const FeatureCardPanel: ({ tabIndex, links }: NavPanelProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,140 @@
1
+ import { Anchor, Box, FlexBox, GridBox } from '@codecademy/gamut';
2
+ import { useGlobalHeaderItemClick } from '../../../GlobalHeader/context';
3
+ import { useAppHeaderDropdownContext } from '../AppHeaderDropdownProvider';
4
+ import { AppHeaderFeatureCard } from '../AppHeaderFeatureCard';
5
+ import { PanelLayout } from '../AppHeaderSection/PanelLayout';
6
+ import { docsLinks, inspirationLinks, learningToolsLinks, practiceToolsLinks } from './consts';
7
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const DocsPanel = ({
9
+ tabIndex = 0
10
+ }) => {
11
+ const {
12
+ globalHeaderItemClick
13
+ } = useGlobalHeaderItemClick();
14
+ const {
15
+ handleClose
16
+ } = useAppHeaderDropdownContext();
17
+ const description = /*#__PURE__*/_jsxs(_Fragment, {
18
+ children: [/*#__PURE__*/_jsx(Box, {
19
+ mb: 8,
20
+ children: "Docs is a community-driven resource for all things programming. Even if you don't have a Codecademy account, you can quickly find definitions and explanations for most coding languages, frameworks, and technical concepts."
21
+ }), "Interested in helping build it?", ' ', /*#__PURE__*/_jsx(Anchor, {
22
+ tabIndex: tabIndex,
23
+ href: "/docs/contribute",
24
+ children: "Contribute to Docs"
25
+ })]
26
+ });
27
+ return /*#__PURE__*/_jsx(PanelLayout, {
28
+ heading: "Docs",
29
+ description: description,
30
+ linkItem: {
31
+ type: 'link',
32
+ href: '/docs',
33
+ text: 'Explore all Docs',
34
+ trackingTarget: 'topnav_resources_docs',
35
+ id: 'docs'
36
+ },
37
+ tabIndex: tabIndex,
38
+ children: /*#__PURE__*/_jsx(GridBox, {
39
+ gridTemplateColumns: {
40
+ _: '1fr',
41
+ lg: '1fr 1fr 1fr'
42
+ },
43
+ gap: 8,
44
+ pl: 0,
45
+ as: "ul",
46
+ listStyle: "none",
47
+ children: docsLinks.map(item => /*#__PURE__*/_jsx(Anchor, {
48
+ variant: "interface",
49
+ href: item.href,
50
+ onClick: event => {
51
+ globalHeaderItemClick(event, item);
52
+ handleClose();
53
+ },
54
+ tabIndex: tabIndex,
55
+ as: "li",
56
+ children: /*#__PURE__*/_jsxs(FlexBox, {
57
+ height: 48,
58
+ px: 16,
59
+ py: 8,
60
+ borderRadius: "md",
61
+ border: 1,
62
+ borderColor: "border-tertiary",
63
+ alignItems: "center",
64
+ children: [item.text, item.badge]
65
+ }, `${item.id}`)
66
+ }, `${item.id}`))
67
+ })
68
+ });
69
+ };
70
+ export const LearningToolsPanel = ({
71
+ tabIndex = 0
72
+ }) => {
73
+ return /*#__PURE__*/_jsx(PanelLayout, {
74
+ heading: "Learning tools",
75
+ description: "Explore free resources that help you understand key concepts and stay on track. From articles and cheatsheets to videos and projects, these tools support you throughout your learning journey.",
76
+ children: /*#__PURE__*/_jsx(FeatureCardPanel, {
77
+ links: learningToolsLinks,
78
+ tabIndex: tabIndex
79
+ })
80
+ });
81
+ };
82
+ export const PracticeToolsPanel = ({
83
+ tabIndex = 0
84
+ }) => {
85
+ return /*#__PURE__*/_jsx(PanelLayout, {
86
+ heading: "Practice tools",
87
+ description: "Build confidence and reinforce what you've learned through hands-on practice. Tackle real coding challenges, simulate job interviews, and test your skills in interactive workspaces.",
88
+ children: /*#__PURE__*/_jsx(FeatureCardPanel, {
89
+ links: practiceToolsLinks,
90
+ tabIndex: tabIndex
91
+ })
92
+ });
93
+ };
94
+ export const InspirationPanel = ({
95
+ tabIndex = 0
96
+ }) => {
97
+ return /*#__PURE__*/_jsx(PanelLayout, {
98
+ heading: "Inspiration",
99
+ description: "Discover what's happening inside Codecademy and beyond. You'll find engineering deep dives, coding tips, job hunt insights, career growth advice, and inspiring stories from other learners.",
100
+ children: /*#__PURE__*/_jsx(FeatureCardPanel, {
101
+ links: inspirationLinks,
102
+ tabIndex: tabIndex
103
+ })
104
+ });
105
+ };
106
+ export const FeatureCardPanel = ({
107
+ tabIndex = 0,
108
+ links
109
+ }) => {
110
+ const {
111
+ globalHeaderItemClick
112
+ } = useGlobalHeaderItemClick();
113
+ const {
114
+ handleClose
115
+ } = useAppHeaderDropdownContext();
116
+ return /*#__PURE__*/_jsx(GridBox, {
117
+ gridTemplateColumns: {
118
+ _: '1fr',
119
+ lg: '1fr 1fr'
120
+ },
121
+ gridTemplateRows: {
122
+ _: '1fr',
123
+ lg: '1fr 1fr'
124
+ },
125
+ gap: 16,
126
+ children: links.map(item => /*#__PURE__*/_jsx(Anchor, {
127
+ variant: "interface",
128
+ href: item.linkItem.href,
129
+ onClick: event => {
130
+ globalHeaderItemClick(event, item.linkItem);
131
+ handleClose();
132
+ },
133
+ tabIndex: tabIndex,
134
+ height: "100%",
135
+ children: /*#__PURE__*/_jsx(AppHeaderFeatureCard, {
136
+ item: item
137
+ })
138
+ }, `${item.linkItem.id}`))
139
+ });
140
+ };
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { AppHeaderLinkItem, AppHeaderResourcesDropdownItem } from '../../shared';
3
+ export type NavSectionConfig = {
4
+ item: AppHeaderResourcesDropdownItem;
5
+ panel: React.ComponentType<{
6
+ tabIndex?: number;
7
+ }>;
8
+ };
9
+ export declare const RESOURCES_NAV_SECTIONS: NavSectionConfig[];
10
+ export declare const docsLinks: AppHeaderLinkItem[];
11
+ export type AppHeaderCardItem = {
12
+ linkItem: AppHeaderLinkItem;
13
+ icon: React.ReactNode;
14
+ description: string;
15
+ };
16
+ export declare const learningToolsLinks: AppHeaderCardItem[];
17
+ export declare const practiceToolsLinks: AppHeaderCardItem[];
18
+ export declare const inspirationLinks: AppHeaderCardItem[];
@@ -0,0 +1,273 @@
1
+ import { ArticleIcon, BriefcaseIcon, BulbIcon, CommentsIcon, DiamondIcon, FileIcon, InfoCircleIcon, NotebookIcon, ProjectsIcon, RulerTriangleIcon, SearchIcon, VideoPlayerMovieIcon } from '@codecademy/gamut-icons';
2
+ import React from 'react';
3
+ import { DocsPanel, InspirationPanel, LearningToolsPanel, PracticeToolsPanel } from './NavPanels';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export const RESOURCES_NAV_SECTIONS = [{
6
+ item: {
7
+ icon: FileIcon,
8
+ text: 'Docs',
9
+ id: 'docs',
10
+ type: 'resources-dropdown',
11
+ trackingTarget: 'topnav_resources_docs'
12
+ },
13
+ panel: DocsPanel
14
+ }, {
15
+ item: {
16
+ icon: RulerTriangleIcon,
17
+ text: 'Learning tools',
18
+ id: 'learning-tools',
19
+ type: 'resources-dropdown',
20
+ trackingTarget: 'topnav_resources_learning_tools'
21
+ },
22
+ panel: LearningToolsPanel
23
+ }, {
24
+ item: {
25
+ icon: DiamondIcon,
26
+ text: 'Practice tools',
27
+ id: 'practice-tools',
28
+ type: 'resources-dropdown',
29
+ trackingTarget: 'topnav_resources_practice_tools'
30
+ },
31
+ panel: PracticeToolsPanel
32
+ }, {
33
+ item: {
34
+ icon: BulbIcon,
35
+ text: 'Inspiration',
36
+ id: 'inspiration',
37
+ type: 'resources-dropdown',
38
+ trackingTarget: 'topnav_resources_inspiration'
39
+ },
40
+ panel: InspirationPanel
41
+ }];
42
+ export const docsLinks = [{
43
+ id: 'c',
44
+ href: '/resources/docs/c',
45
+ trackingTarget: 'topnav_resources_docs_c',
46
+ text: 'C',
47
+ type: 'link'
48
+ }, {
49
+ id: 'html',
50
+ href: '/resources/docs/html',
51
+ trackingTarget: 'topnav_resources_docs_html',
52
+ text: 'HTML',
53
+ type: 'link'
54
+ }, {
55
+ id: 'python',
56
+ href: '/resources/docs/python',
57
+ trackingTarget: 'topnav_resources_docs_python',
58
+ text: 'Python',
59
+ type: 'link'
60
+ }, {
61
+ id: 'cpp',
62
+ href: '/resources/docs/cpp',
63
+ trackingTarget: 'topnav_resources_docs_cpp',
64
+ text: 'C++',
65
+ type: 'link'
66
+ }, {
67
+ id: 'java',
68
+ href: '/resources/docs/java',
69
+ trackingTarget: 'topnav_resources_docs_java',
70
+ text: 'Java',
71
+ type: 'link'
72
+ }, {
73
+ id: 'react',
74
+ href: '/resources/docs/react',
75
+ trackingTarget: 'topnav_resources_docs_react',
76
+ text: 'React',
77
+ type: 'link'
78
+ }, {
79
+ id: 'css',
80
+ href: '/resources/docs/css',
81
+ trackingTarget: 'topnav_resources_docs_css',
82
+ text: 'CSS',
83
+ type: 'link'
84
+ }, {
85
+ id: 'javascript',
86
+ href: '/resources/docs/javascript',
87
+ trackingTarget: 'topnav_resources_docs_javascript',
88
+ text: 'JavaScript',
89
+ type: 'link'
90
+ }, {
91
+ id: 'sql',
92
+ href: '/resources/docs/sql',
93
+ trackingTarget: 'topnav_resources_docs_sql',
94
+ text: 'SQL',
95
+ type: 'link'
96
+ }, {
97
+ id: 'git',
98
+ href: '/resources/docs/git',
99
+ trackingTarget: 'topnav_resources_docs_git',
100
+ text: 'Git',
101
+ type: 'link'
102
+ }, {
103
+ id: 'php',
104
+ href: '/resources/docs/php',
105
+ trackingTarget: 'topnav_resources_docs_php',
106
+ text: 'PHP',
107
+ type: 'link'
108
+ }, {
109
+ id: 'uiux',
110
+ href: '/resources/docs/uiux',
111
+ trackingTarget: 'topnav_resources_docs_uiux',
112
+ text: 'UI/UX',
113
+ type: 'link'
114
+ }, {
115
+ id: 'markdown',
116
+ href: '/resources/docs/markdown',
117
+ trackingTarget: 'topnav_resources_docs_markdown',
118
+ text: 'Markdown',
119
+ type: 'link'
120
+ }, {
121
+ id: 'data-science',
122
+ href: '/resources/docs/data-science',
123
+ trackingTarget: 'topnav_resources_docs_data_science',
124
+ text: 'Data science',
125
+ type: 'link'
126
+ }, {
127
+ id: 'ai',
128
+ href: '/resources/docs/ai',
129
+ trackingTarget: 'topnav_resources_docs_ai',
130
+ text: 'AI',
131
+ type: 'link'
132
+ }, {
133
+ id: 'data-visualization',
134
+ href: '/resources/docs/data-visualization',
135
+ trackingTarget: 'topnav_resources_docs_data_visualization',
136
+ text: 'Data visualization',
137
+ type: 'link'
138
+ }, {
139
+ id: 'typescript',
140
+ href: '/resources/docs/typescript',
141
+ trackingTarget: 'topnav_resources_docs_typescript',
142
+ text: 'TypeScript',
143
+ type: 'link'
144
+ }, {
145
+ id: 'ruby',
146
+ href: '/resources/docs/ruby',
147
+ trackingTarget: 'topnav_resources_docs_ruby',
148
+ text: 'Ruby',
149
+ type: 'link'
150
+ }];
151
+ export const learningToolsLinks = [{
152
+ linkItem: {
153
+ id: 'articles',
154
+ href: '/articles',
155
+ trackingTarget: 'topnav_resources_articles',
156
+ text: 'Articles',
157
+ type: 'link'
158
+ },
159
+ icon: /*#__PURE__*/_jsx(ArticleIcon, {}),
160
+ description: "Articles are more in-depth explanations about concepts covered in Codecademy courses. Here you'll learn more about workflows that developers use every day, and take your coding skills to the next level."
161
+ }, {
162
+ linkItem: {
163
+ id: 'cheatsheets',
164
+ href: '/resources/cheatsheets/all',
165
+ trackingTarget: 'topnav_resources_cheatsheets',
166
+ text: 'Cheatsheets',
167
+ type: 'link'
168
+ },
169
+ icon: /*#__PURE__*/_jsx(NotebookIcon, {}),
170
+ description: 'Quick-reference guides that summarize key concepts taught in our courses and paths across various programming languages, tools, and technologies.'
171
+ }, {
172
+ linkItem: {
173
+ id: 'videos',
174
+ href: '/resources/videos',
175
+ trackingTarget: 'topnav_resources_videos',
176
+ text: 'Videos',
177
+ type: 'link'
178
+ },
179
+ icon: /*#__PURE__*/_jsx(VideoPlayerMovieIcon, {}),
180
+ description: 'Watch our best programming videos for beginner, intermediate, and advanced learners about languages, frameworks, and more.'
181
+ }, {
182
+ linkItem: {
183
+ id: 'projects',
184
+ href: '/projects',
185
+ trackingTarget: 'topnav_resources_projects',
186
+ text: 'Projects',
187
+ type: 'link'
188
+ },
189
+ icon: /*#__PURE__*/_jsx(ProjectsIcon, {}),
190
+ description: "Projects let you apply what you're learning. Practice new skills, connect concepts, or put it all together to create something of your own."
191
+ }];
192
+ export const practiceToolsLinks = [{
193
+ linkItem: {
194
+ id: 'code-challenges',
195
+ href: '/code-challenges',
196
+ trackingTarget: 'topnav_resources_code_challenges',
197
+ text: 'Code Challenges',
198
+ type: 'link'
199
+ },
200
+ icon: /*#__PURE__*/_jsx(ArticleIcon, {}),
201
+ description: "Test your knowledge with code challenges based on real-world technical interviews from companies like Google, Amazon, and Meta. Practice for your job search — or for fun. Don't worry if you get stuck. We'll recommend the right courses to help you."
202
+ }, {
203
+ linkItem: {
204
+ id: 'workspaces',
205
+ href: '/pages/workspaces',
206
+ trackingTarget: 'topnav_resources_workspaces',
207
+ text: 'Workspaces',
208
+ type: 'link'
209
+ },
210
+ icon: /*#__PURE__*/_jsx(VideoPlayerMovieIcon, {}),
211
+ description: 'Practice building projects in 13 popular languages and libraries, tinker with code, and share your work—all without leaving your browser.'
212
+ }, {
213
+ linkItem: {
214
+ id: 'job-readiness',
215
+ href: '/job-readiness',
216
+ trackingTarget: 'topnav_resources_job_readiness',
217
+ text: 'Job-Readiness Checker',
218
+ type: 'link'
219
+ },
220
+ icon: /*#__PURE__*/_jsx(NotebookIcon, {}),
221
+ description: "Add a LinkedIn or ZipRecruiter job posting to analyze how your skills fit the job. You'll need to add more information for jobs found on other websites."
222
+ }, {
223
+ linkItem: {
224
+ id: 'interview-simulator',
225
+ href: '/interview-simulator',
226
+ trackingTarget: 'topnav_resources_interview_simulator',
227
+ text: 'Interview Simulator',
228
+ type: 'link'
229
+ },
230
+ icon: /*#__PURE__*/_jsx(ProjectsIcon, {}),
231
+ description: 'Discover your potential through interviewing. Identify your strengths, get actionable feedback, and boost your confidence with customized practice — at any stage in your tech career.'
232
+ }];
233
+ export const inspirationLinks = [{
234
+ linkItem: {
235
+ id: 'learner-stories',
236
+ href: '/resources/blog/category/get-inspired',
237
+ trackingTarget: 'topnav_resources_learner_stories',
238
+ text: 'Learner stories',
239
+ type: 'link'
240
+ },
241
+ icon: /*#__PURE__*/_jsx(CommentsIcon, {}),
242
+ description: 'Learn how coding can change your life (and the world) for the better.'
243
+ }, {
244
+ linkItem: {
245
+ id: 'learning-tips',
246
+ href: '/resources/blog/category/learning-tips',
247
+ trackingTarget: 'topnav_resources_learning_tips',
248
+ text: 'Learning Tips',
249
+ type: 'link'
250
+ },
251
+ icon: /*#__PURE__*/_jsx(InfoCircleIcon, {}),
252
+ description: "Learning to code — or thinking about it? Here's how to get started, plus tips and tricks for staying motivated."
253
+ }, {
254
+ linkItem: {
255
+ id: 'career-advice',
256
+ href: '/resources/blog/category/career',
257
+ trackingTarget: 'topnav_resources_career_advice',
258
+ text: 'Career Advice',
259
+ type: 'link'
260
+ },
261
+ icon: /*#__PURE__*/_jsx(BriefcaseIcon, {}),
262
+ description: 'Explore different tech jobs and learn how to advance in your career and maintain work-life balance.'
263
+ }, {
264
+ linkItem: {
265
+ id: 'finding-a-job',
266
+ href: '/resources/blog/category/finding-a-job',
267
+ trackingTarget: 'topnav_resources_finding_a_job',
268
+ text: 'Finding a Job',
269
+ type: 'link'
270
+ },
271
+ icon: /*#__PURE__*/_jsx(SearchIcon, {}),
272
+ description: 'Want to break into the tech industry? Learn how to write a standout resume, build a professional portfolio, prepare for technical interviews, and negotiate job offers.'
273
+ }];
@@ -1,12 +1,27 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react';
1
+ import _styled from "@emotion/styled/base";
2
+ import { ColorMode } from '@codecademy/gamut-styles';
3
+ import { useCallback, useContext, useEffect, useRef, useState } from 'react';
2
4
  import * as React from 'react';
5
+ import { GlobalNavRedesignContext } from '../../../GlobalHeader';
3
6
  import { getHeaderResourcesList } from '../../../lib/resourcesList';
4
7
  import { AnimatedMegaMenuDropdown } from '../../shared';
5
8
  import { AppHeaderDropdownProvider } from '../AppHeaderDropdownProvider';
6
9
  import { AppHeaderDropdownNavButton } from '../AppHeaderNavButton/AppHeaderDropdownNavButton';
7
10
  import { useAppHeaderContext } from '../AppHeaderProvider';
8
11
  import { AppHeaderResourcesSection } from '../AppHeaderResourcesSection';
12
+ import { AppHeaderSection } from '../AppHeaderSection';
13
+ import { RESOURCES_NAV_SECTIONS } from './consts';
9
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const StyledAnimatedMegaMenuDropdown = /*#__PURE__*/_styled(AnimatedMegaMenuDropdown, {
16
+ target: "ekdg1bw0",
17
+ label: "StyledAnimatedMegaMenuDropdown"
18
+ })("left:", ({
19
+ isAnon,
20
+ displayGlobalNavRedesign
21
+ }) => displayGlobalNavRedesign ? '-58px' : isAnon ? '-9rem' : '-14rem', ";@media (min-width: 1261px){left:", ({
22
+ isAnon,
23
+ displayGlobalNavRedesign
24
+ }) => displayGlobalNavRedesign ? '-152px' : isAnon ? '-9rem' : '-14rem', ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64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R2xvYmFsTmF2UmVkZXNpZ24gPyAwIDogMSkgOiAwLFxuICAgICAgICAgIGhlaWdodDogaXNPcGVuID8gJ2ZpdC1jb250ZW50JyA6IDAsXG4gICAgICAgIH19XG4gICAgICAgIHRyYW5zaXRpb249e3sgZHVyYXRpb246IDAuMTc1IH19XG4gICAgICAgIGFyaWEtaGlkZGVuPXshaXNPcGVufVxuICAgICAgICBkYXRhLXRlc3RpZD1cInJlc291cmNlcy1tZW51LWRyb3Bkb3duXCJcbiAgICAgICAgb25BbmltYXRpb25Db21wbGV0ZT17YW5pbWF0aW9uRmluaXNoZWR9XG4gICAgICA+XG4gICAgICAgIHtkaXNwbGF5R2xvYmFsTmF2UmVkZXNpZ24gPyAoXG4gICAgICAgICAgPENvbG9yTW9kZSBtb2RlPVwibGlnaHRcIj5cbiAgICAgICAgICAgIDxBcHBIZWFkZXJTZWN0aW9uXG4gICAgICAgICAgICAgIGlzT3Blbj17aXNPcGVufVxuICAgICAgICAgICAgICByZWY9e2NvbnRhaW5lclJlZn1cbiAgICAgICAgICAgICAgbmF2U2VjdGlvbnM9e1JFU09VUkNFU19OQVZfU0VDVElPTlN9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvQ29sb3JNb2RlPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDxBcHBIZWFkZXJSZXNvdXJjZXNTZWN0aW9uXG4gICAgICAgICAgICBhY3Rpb249e2FjdGlvbn1cbiAgICAgICAgICAgIHJlZj17Y29udGFpbmVyUmVmfVxuICAgICAgICAgICAgaWQ9e2BtZW51LWNvbnRhaW5lciR7aXRlbS50ZXh0fWB9XG4gICAgICAgICAgICBpc09wZW49e2lzT3Blbn1cbiAgICAgICAgICAgIGhhbmRsZUNsb3NlPXsoKSA9PiBzZXRJc09wZW4oZmFsc2UpfVxuICAgICAgICAgICAgcmVzb3VyY2VzPXtoZWFkZXJSZXNvdXJjZXNMaXN0fVxuICAgICAgICAgIC8+XG4gICAgICAgICl9XG4gICAgICA8L1N0eWxlZEFuaW1hdGVkTWVnYU1lbnVEcm9wZG93bj5cbiAgICA8L0FwcEhlYWRlckRyb3Bkb3duUHJvdmlkZXI+XG4gICk7XG59O1xuIl19 */"));
10
25
  export const AppHeaderResourcesDropdown = ({
11
26
  action,
12
27
  item,
@@ -68,6 +83,7 @@ export const AppHeaderResourcesDropdown = ({
68
83
  document.removeEventListener('blur', handleClickOutside);
69
84
  };
70
85
  }, [containerRef, handleClose, isOpen]);
86
+ const displayGlobalNavRedesign = useContext(GlobalNavRedesignContext);
71
87
  return /*#__PURE__*/_jsxs(AppHeaderDropdownProvider, {
72
88
  handleClose: handleClose,
73
89
  children: [/*#__PURE__*/_jsx(AppHeaderDropdownNavButton, {
@@ -75,7 +91,9 @@ export const AppHeaderResourcesDropdown = ({
75
91
  handleOnClick: handleOnClick,
76
92
  isOpen: isOpen,
77
93
  title: text
78
- }), /*#__PURE__*/_jsx(AnimatedMegaMenuDropdown, {
94
+ }), /*#__PURE__*/_jsx(StyledAnimatedMegaMenuDropdown, {
95
+ isAnon: isAnon,
96
+ displayGlobalNavRedesign: displayGlobalNavRedesign,
79
97
  tabIndex: -1 // prevent from interfering with AppHeader focus logic
80
98
  ,
81
99
  ref: dropdownRef,
@@ -84,14 +102,15 @@ export const AppHeaderResourcesDropdown = ({
84
102
  minWidth: '64rem',
85
103
  left: isAnon ? '-14.5rem' : '-19.5rem',
86
104
  overflowY: 'auto',
87
- maxHeight: animationCompleteStyles ? '85vh' : 0
105
+ maxHeight: animationCompleteStyles ? '85vh' : 0,
106
+ backgroundColor: displayGlobalNavRedesign ? 'transparent' : ''
88
107
  },
89
108
  initial: {
90
109
  borderWidth: 0,
91
110
  height: 0
92
111
  },
93
112
  animate: {
94
- borderWidth: isOpen ? 1 : 0,
113
+ borderWidth: isOpen ? displayGlobalNavRedesign ? 0 : 1 : 0,
95
114
  height: isOpen ? 'fit-content' : 0
96
115
  },
97
116
  transition: {
@@ -100,7 +119,14 @@ export const AppHeaderResourcesDropdown = ({
100
119
  "aria-hidden": !isOpen,
101
120
  "data-testid": "resources-menu-dropdown",
102
121
  onAnimationComplete: animationFinished,
103
- children: /*#__PURE__*/_jsx(AppHeaderResourcesSection, {
122
+ children: displayGlobalNavRedesign ? /*#__PURE__*/_jsx(ColorMode, {
123
+ mode: "light",
124
+ children: /*#__PURE__*/_jsx(AppHeaderSection, {
125
+ isOpen: isOpen,
126
+ ref: containerRef,
127
+ navSections: RESOURCES_NAV_SECTIONS
128
+ })
129
+ }) : /*#__PURE__*/_jsx(AppHeaderResourcesSection, {
104
130
  action: action,
105
131
  ref: containerRef,
106
132
  id: `menu-container${item.text}`,
@@ -0,0 +1,83 @@
1
+ import { setupRtl } from '@codecademy/gamut-tests';
2
+ import userEvent from '@testing-library/user-event';
3
+ import React from 'react';
4
+ import { GlobalHeaderItemClickContext } from '../../../GlobalHeader/context';
5
+ import { CATALOG_NAV_SECTIONS } from '../AppHeaderCatalogDropdown/consts';
6
+ import { AppHeaderSection } from '.';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const mockOnClick = jest.fn();
9
+ const mockKeyDownEvents = jest.fn();
10
+ const mockItem = {
11
+ text: 'catalog',
12
+ id: 'the-catalog',
13
+ type: 'catalog-dropdown',
14
+ trackingTarget: 'catalog-dropdown'
15
+ };
16
+ const defaultProps = {
17
+ item: mockItem,
18
+ isOpen: true,
19
+ keyDownEvents: mockKeyDownEvents
20
+ };
21
+ const mockContextValue = {
22
+ globalHeaderItemClick: mockOnClick
23
+ };
24
+ describe('AppHeaderSection', () => {
25
+ const renderView = setupRtl(AppHeaderSection, defaultProps).options({
26
+ wrapper: ({
27
+ children
28
+ }) => /*#__PURE__*/_jsx(GlobalHeaderItemClickContext.Provider, {
29
+ value: mockContextValue,
30
+ children: children
31
+ })
32
+ });
33
+ it('renders the component ', () => {
34
+ const {
35
+ view
36
+ } = renderView({
37
+ navSections: CATALOG_NAV_SECTIONS
38
+ });
39
+ expect(view.getByRole('heading', {
40
+ name: 'Course topics'
41
+ })).toBeInTheDocument();
42
+ });
43
+ describe('tab navigation', () => {
44
+ it('starts with the first tab active by default', () => {
45
+ const {
46
+ view
47
+ } = renderView({
48
+ navSections: CATALOG_NAV_SECTIONS
49
+ });
50
+ const courseTopicsButton = view.getByTestId('nav-section-course-topics');
51
+ expect(courseTopicsButton).toHaveAttribute('aria-expanded', 'true');
52
+ });
53
+ it('switches active tab when clicking on different sections', async () => {
54
+ const {
55
+ view
56
+ } = renderView({
57
+ navSections: CATALOG_NAV_SECTIONS
58
+ });
59
+ const careerPathsButton = view.getByTestId('nav-section-career-paths');
60
+ await userEvent.click(careerPathsButton);
61
+ expect(careerPathsButton).toHaveAttribute('aria-expanded', 'true');
62
+ const courseTopicsButton = view.getByTestId('nav-section-course-topics');
63
+ expect(courseTopicsButton).toHaveAttribute('aria-expanded', 'false');
64
+ });
65
+ it('calls tracking with correct parameters when clicking nav section', async () => {
66
+ const {
67
+ view
68
+ } = renderView({
69
+ navSections: CATALOG_NAV_SECTIONS
70
+ });
71
+ const careerPathsButton = view.getByTestId('nav-section-career-paths');
72
+ await userEvent.click(careerPathsButton);
73
+ expect(mockOnClick).toHaveBeenCalledTimes(1);
74
+ expect(mockOnClick).toHaveBeenCalledWith(expect.anything(),
75
+ // event object
76
+ expect.objectContaining({
77
+ id: 'career-paths',
78
+ type: 'catalog-dropdown'
79
+ }) // tracking parameters
80
+ );
81
+ });
82
+ });
83
+ });