@codecademy/brand 2.0.0-alpha.2bc261aded.0 → 2.0.0-alpha.3a7b7c993e.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 (29) hide show
  1. package/README.md +1 -1
  2. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +7 -8
  3. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -4
  4. package/dist/AppHeader/Search/consts.js +1 -1
  5. package/dist/AppHeader/index.js +2 -5
  6. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +5 -7
  7. package/dist/FeatureList/index.js +5 -4
  8. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +6 -9
  9. package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +1 -1
  10. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +3 -3
  11. package/dist/GlobalFooter/index.js +17 -25
  12. package/dist/GlobalHeader/GlobalHeaderItems.js +6 -3
  13. package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
  14. package/dist/GlobalHeader/index.js +46 -49
  15. package/dist/LandingPage/PageFeaturesEnhanced.js +3 -0
  16. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
  17. package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
  18. package/dist/LearningOutcomeCard/index.js +187 -127
  19. package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.js +23 -0
  20. package/dist/LearningOutcomeFlyout/index.js +181 -0
  21. package/dist/LearningOutcomeTile/index.js +2 -4
  22. package/dist/PlanCard/index.js +75 -28
  23. package/dist/index.js +3 -3
  24. package/dist/lib/catalogList/index.js +3 -3
  25. package/dist/lib/resourcesList/index.js +2 -11
  26. package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
  27. package/dist/stories/Molecules/LearningOutcomeCard.stories.js +169 -39
  28. package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +44 -0
  29. package/package.json +1 -1
@@ -56,7 +56,7 @@ export const footerResourcesList = [{
56
56
  trackingTarget: 'workspaces',
57
57
  text: 'Workspaces'
58
58
  }];
59
- export const getHeaderResourcesList = isLiveLearningHubEnabled => {
59
+ export const getHeaderResourcesList = () => {
60
60
  const inspirationSection = {
61
61
  title: 'Inspiration & career',
62
62
  links: [{
@@ -83,7 +83,7 @@ export const getHeaderResourcesList = isLiveLearningHubEnabled => {
83
83
  trackingTarget: 'topnav_resources_inspiration_learning_tips',
84
84
  type: 'link',
85
85
  newTab: true
86
- }, isLiveLearningHubEnabled ? {
86
+ }, {
87
87
  id: 'career-center',
88
88
  href: '/career-center',
89
89
  text: 'Career Center',
@@ -92,15 +92,6 @@ export const getHeaderResourcesList = isLiveLearningHubEnabled => {
92
92
  type: 'link',
93
93
  newTab: true,
94
94
  badge: renderNewBadge()
95
- } : {
96
- id: 'job-readiness-check',
97
- href: '/job-readiness',
98
- text: 'Job-readiness checker',
99
- description: 'Analyze your compatibility with tech roles using AI.',
100
- trackingTarget: 'topnav_resources_inspiration_job_readiness_checker',
101
- type: 'link',
102
- newTab: true,
103
- badge: renderNewBadge()
104
95
  }]
105
96
  };
106
97
  return [{
@@ -0,0 +1,23 @@
1
+ import { LearningOutcomeAssessmentScores } from '../../LearningOutcomeAssessmentScores';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ const meta = {
4
+ component: LearningOutcomeAssessmentScores,
5
+ args: {}
6
+ };
7
+ export default meta;
8
+ export const Example = () => {
9
+ return /*#__PURE__*/_jsx(LearningOutcomeAssessmentScores, {
10
+ highestScore: 100,
11
+ highestScoreAchievedAt: "10/01",
12
+ latestScore: 50,
13
+ latestScoreAchievedAt: "10/23"
14
+ });
15
+ };
16
+ export const NoScores = () => {
17
+ return /*#__PURE__*/_jsx(LearningOutcomeAssessmentScores, {
18
+ highestScore: null,
19
+ highestScoreAchievedAt: null,
20
+ latestScore: null,
21
+ latestScoreAchievedAt: null
22
+ });
23
+ };
@@ -1,59 +1,189 @@
1
- import { Background } from '@codecademy/gamut-styles';
1
+ import { FlexBox } from '@codecademy/gamut';
2
2
  import { LearningOutcomeCard } from '../../LearningOutcomeCard';
3
- import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  const meta = {
5
5
  component: LearningOutcomeCard,
6
6
  args: {
7
+ outcome: 'Implement sorting algorithms in Java.'
8
+ }
9
+ };
10
+ export default meta;
11
+ export const Base = {
12
+ render: args => /*#__PURE__*/_jsxs(FlexBox, {
13
+ gap: 16,
14
+ children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
15
+ ...args,
16
+ level: 1
17
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
18
+ ...args,
19
+ level: 2
20
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
21
+ ...args,
22
+ level: 3
23
+ })]
24
+ }),
25
+ name: 'Base card'
26
+ };
27
+ export const BaseCardWithHover = {
28
+ render: args => /*#__PURE__*/_jsxs(FlexBox, {
29
+ gap: 16,
30
+ children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
31
+ ...args,
32
+ level: 1,
33
+ isInteractive: true
34
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
35
+ ...args,
36
+ level: 2,
37
+ isInteractive: true
38
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
39
+ ...args,
40
+ level: 3,
41
+ isInteractive: true
42
+ })]
43
+ }),
44
+ name: 'Base card with hover'
45
+ };
46
+ export const BaseCardWithTopics = {
47
+ render: args => /*#__PURE__*/_jsxs(FlexBox, {
48
+ gap: 16,
49
+ children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
50
+ ...args,
51
+ level: 1,
52
+ skills: [{
53
+ title: 'java'
54
+ }, {
55
+ title: 'skill'
56
+ }, {
57
+ title: 'computer science'
58
+ }]
59
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
60
+ ...args,
61
+ level: 2,
62
+ skills: [{
63
+ title: 'java'
64
+ }, {
65
+ title: 'skill'
66
+ }, {
67
+ title: 'computer science'
68
+ }]
69
+ }), /*#__PURE__*/_jsx(LearningOutcomeCard, {
70
+ ...args,
71
+ level: 3,
72
+ skills: [{
73
+ title: 'java'
74
+ }, {
75
+ title: 'skill'
76
+ }, {
77
+ title: 'computer science'
78
+ }]
79
+ })]
80
+ }),
81
+ name: 'Base card with topics'
82
+ };
83
+ export const EmphasizedCard = {
84
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
85
+ ...args,
7
86
  level: 1,
8
- outcome: 'Implement sorting algorithms in Java.',
87
+ mode: "emphasized"
88
+ }),
89
+ name: 'Emphasized card'
90
+ };
91
+ export const EmphasizedCardWithHover = {
92
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
93
+ ...args,
94
+ level: 2,
95
+ mode: "emphasized",
96
+ isInteractive: true
97
+ }),
98
+ name: 'Emphasized card with hover'
99
+ };
100
+ export const EmphasizedCardWithTopics = {
101
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
102
+ ...args,
103
+ level: 3,
9
104
  skills: [{
10
105
  title: 'java'
11
106
  }, {
12
107
  title: 'skill'
13
108
  }, {
14
109
  title: 'computer science'
15
- }]
16
- }
110
+ }],
111
+ mode: "emphasized",
112
+ isInteractive: true
113
+ }),
114
+ name: 'Emphasized card with topics'
17
115
  };
18
- export default meta;
19
- export const Default = {
116
+ export const EmphasizedCardWithProgress = {
20
117
  render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
21
- ...args
118
+ ...args,
119
+ level: 2,
120
+ progress: 60,
121
+ skills: [{
122
+ title: 'java'
123
+ }, {
124
+ title: 'skill'
125
+ }, {
126
+ title: 'computer science'
127
+ }],
128
+ mode: "emphasized",
129
+ isInteractive: true
22
130
  }),
23
- name: 'Learning Outcome Simple Card'
131
+ name: 'Emphasized card with progress'
24
132
  };
25
- export const EmphasizedCard = {
26
- render: args => /*#__PURE__*/_jsx(Background, {
27
- bg: "navy",
28
- p: 24,
29
- children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
30
- emphasized: true,
31
- ...args
32
- })
133
+ export const EmphasizedCardWithProgress100 = {
134
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
135
+ ...args,
136
+ level: 3,
137
+ progress: 100,
138
+ skills: [{
139
+ title: 'java'
140
+ }, {
141
+ title: 'skill'
142
+ }, {
143
+ title: 'computer science'
144
+ }],
145
+ mode: "emphasized",
146
+ isInteractive: true
33
147
  }),
34
- name: 'Emphasized Card'
148
+ name: 'Emphasized card with 100% progress'
35
149
  };
36
- export const EmphasizedCardWithProgress = {
37
- render: args => /*#__PURE__*/_jsx(Background, {
38
- bg: "navy",
39
- p: 24,
40
- children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
41
- emphasized: true,
42
- progress: 60,
43
- ...args
44
- })
150
+ export const EmphasizedCardWithProgressAnimation = {
151
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
152
+ ...args,
153
+ level: 2,
154
+ progress: 80,
155
+ progressUpdateData: {
156
+ previousProgress: 50,
157
+ progressDuration: 500
158
+ },
159
+ skills: [{
160
+ title: 'java'
161
+ }, {
162
+ title: 'skill'
163
+ }, {
164
+ title: 'computer science'
165
+ }],
166
+ mode: "emphasized"
45
167
  }),
46
- name: 'Emphasized card displaying progress, for use in the Learning Environment'
168
+ name: 'Emphasized card with progress with animation'
47
169
  };
48
- export const EmphasizedCardWithProgress100 = {
49
- render: args => /*#__PURE__*/_jsx(Background, {
50
- bg: "navy",
51
- p: 24,
52
- children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
53
- emphasized: true,
54
- progress: 100,
55
- ...args
56
- })
57
- }),
58
- name: 'Emphasized card displaying 100% progress, for use in the Learning Environment'
170
+ export const EmphasizedCardWithProgress100Animation = {
171
+ render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
172
+ ...args,
173
+ level: 2,
174
+ progress: 100,
175
+ progressUpdateData: {
176
+ previousProgress: 50,
177
+ completionDelay: 500
178
+ },
179
+ skills: [{
180
+ title: 'java'
181
+ }, {
182
+ title: 'skill'
183
+ }, {
184
+ title: 'computer science'
185
+ }],
186
+ mode: "emphasized"
187
+ }),
188
+ name: 'Emphasized card with 100% progress with animation'
59
189
  };
@@ -0,0 +1,44 @@
1
+ import { FillButton, FlexBox } from '@codecademy/gamut';
2
+ import { useState } from 'react';
3
+ import { LearningOutcomeFlyout } from '../../LearningOutcomeFlyout';
4
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const meta = {
6
+ component: LearningOutcomeFlyout,
7
+ args: {}
8
+ };
9
+ export default meta;
10
+ export const Example = () => {
11
+ const [isExpanded, setIsExpanded] = useState(false);
12
+ const toggleOpen = () => setIsExpanded(!isExpanded);
13
+ return /*#__PURE__*/_jsxs(_Fragment, {
14
+ children: [/*#__PURE__*/_jsx(FillButton, {
15
+ onClick: toggleOpen,
16
+ children: "Open Flyout"
17
+ }), /*#__PURE__*/_jsx(FlexBox, {
18
+ width: "100%",
19
+ children: /*#__PURE__*/_jsx(LearningOutcomeFlyout, {
20
+ expanded: isExpanded,
21
+ learningOutcome: {
22
+ highestScore: 100,
23
+ highestScoreAchievedAt: '10/01',
24
+ latestScore: 68,
25
+ latestScoreAchievedAt: '10/01',
26
+ level: 2,
27
+ outcome: 'Understand the basics of React',
28
+ percentComplete: 75,
29
+ parentLOs: [{
30
+ id: '1',
31
+ outcome: 'Build a React component',
32
+ level: 3
33
+ }, {
34
+ id: '2',
35
+ outcome: 'Manage state in React',
36
+ level: 3
37
+ }]
38
+ },
39
+ learningOutcomeHref: "/learning-outcomes/123",
40
+ onClose: () => setIsExpanded(false)
41
+ })
42
+ })]
43
+ });
44
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "2.0.0-alpha.2bc261aded.0",
4
+ "version": "2.0.0-alpha.3a7b7c993e.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",