@codecademy/brand 2.0.0-alpha.a3eb12cdcb.0 → 2.0.0-alpha.a67c1b58ff.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 (183) hide show
  1. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +8 -7
  2. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +4 -2
  3. package/dist/AppHeader/index.js +5 -2
  4. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +7 -5
  5. package/dist/FeatureList/index.js +4 -5
  6. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +9 -6
  7. package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +1 -1
  8. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +3 -3
  9. package/dist/GlobalFooter/index.js +25 -17
  10. package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
  11. package/dist/GlobalHeader/index.js +49 -41
  12. package/dist/LandingPage/PageFeaturesEnhanced.js +0 -3
  13. package/dist/LearningOutcomeCard/index.js +143 -0
  14. package/dist/LearningOutcomePopover/index.js +125 -0
  15. package/dist/LearningOutcomeTile/Tile.js +79 -0
  16. package/dist/LearningOutcomeTile/index.js +116 -0
  17. package/dist/LearningOutcomeTile/types.js +11 -0
  18. package/dist/ListSection/index.js +64 -0
  19. package/dist/Loading/index.js +82 -0
  20. package/dist/LoadingCurriculumCard/index.js +82 -0
  21. package/dist/Logo/CodecademyLogo.js +19 -0
  22. package/dist/Logo/CodecademyPremiumLogo.js +35 -0
  23. package/dist/Logo/CodecademyProAltLogo.js +19 -0
  24. package/dist/Logo/CodecademyProLockupLogo.js +13 -0
  25. package/dist/Logo/CodecademyProLogo.js +21 -0
  26. package/dist/Logo/CodecademyProMonoLogo.js +22 -0
  27. package/dist/Logo/CodecademyProgramLogo.js +14 -0
  28. package/dist/Logo/CodecademyTeamsLogo.js +41 -0
  29. package/dist/Logo/index.js +30 -0
  30. package/dist/LogoFromSkillsoft/index.js +55 -0
  31. package/dist/LogoLXStudio/index.js +47 -0
  32. package/dist/LogoProCutout/index.js +31 -0
  33. package/dist/LogoProCutoutTransparent/index.js +31 -0
  34. package/dist/MarketingToaster/index.js +67 -0
  35. package/dist/NotFoundContent/index.js +55 -0
  36. package/dist/NotificationList/EmptyNotification/emptyNotificationContents.js +23 -0
  37. package/dist/NotificationList/EmptyNotification/index.js +38 -0
  38. package/dist/NotificationList/NotificationItem.js +151 -0
  39. package/dist/NotificationList/index.js +46 -0
  40. package/dist/NotificationList/typings.js +1 -0
  41. package/dist/Notifications/NotificationBell.js +72 -0
  42. package/dist/Notifications/NotificationsContents.js +85 -0
  43. package/dist/Notifications/NotificationsDropdown.js +25 -0
  44. package/dist/Notifications/__fixtures__/NotificationTestComponent.js +12 -0
  45. package/dist/Notifications/__fixtures__/stubs.js +8 -0
  46. package/dist/Notifications/constants.js +4 -0
  47. package/dist/Notifications/elements.js +21 -0
  48. package/dist/Notifications/types.js +1 -0
  49. package/dist/Notifications/useHeaderNotifications.js +37 -0
  50. package/dist/Notifications/useNotificationButtons.js +56 -0
  51. package/dist/PageAlerts/PageAlerts.js +75 -0
  52. package/dist/PageAlerts/PageAlertsProvider.js +34 -0
  53. package/dist/PageAlerts/index.js +3 -0
  54. package/dist/PageAlerts/types.js +1 -0
  55. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.js +53 -0
  56. package/dist/PageLayoutWithSidebarMenu/index.js +1 -0
  57. package/dist/PageSection/index.js +67 -0
  58. package/dist/PastDue/PastDueModalContents/index.js +30 -0
  59. package/dist/PastDue/index.js +2 -0
  60. package/dist/PastDue/pastDueMessages.js +48 -0
  61. package/dist/PausableImage/BaseImage/index.js +54 -0
  62. package/dist/PausableImage/index.js +37 -0
  63. package/dist/PlanCard/PlanCardBanner.js +28 -0
  64. package/dist/PlanCard/PlanFeature.js +83 -0
  65. package/dist/PlanCard/PopularBadge.js +13 -0
  66. package/dist/PlanCard/PricingAmount.js +117 -0
  67. package/dist/PlanCard/RecommendedBadge.js +24 -0
  68. package/dist/PlanCard/consts.js +135 -0
  69. package/dist/PlanCard/index.js +323 -0
  70. package/dist/PlanCard/types.js +62 -0
  71. package/dist/PlanCardTeams/consts.js +8 -0
  72. package/dist/PlanCardTeams/index.js +167 -0
  73. package/dist/PricingSection/PlanFeature.js +88 -0
  74. package/dist/PricingSection/PricingCard/PricingAmount.js +84 -0
  75. package/dist/PricingSection/PricingCard/RecommendedBadge.js +24 -0
  76. package/dist/PricingSection/PricingCard/consts.js +85 -0
  77. package/dist/PricingSection/PricingCard/index.js +241 -0
  78. package/dist/PricingSection/ProductCTA.js +44 -0
  79. package/dist/PricingSection/Products.js +74 -0
  80. package/dist/PricingSection/config.js +36 -0
  81. package/dist/PricingSection/index.js +58 -0
  82. package/dist/PricingSection/types.js +8 -0
  83. package/dist/ProLabel/index.js +59 -0
  84. package/dist/ProLogo/index.js +27 -0
  85. package/dist/ProLogoAlt/index.js +26 -0
  86. package/dist/ProductFeatureShowcase/index.js +120 -0
  87. package/dist/QuizScore/index.js +84 -0
  88. package/dist/RatingsBar/index.js +32 -0
  89. package/dist/ResourceCard/index.js +59 -0
  90. package/dist/ScoreSummary/SubScores.js +165 -0
  91. package/dist/ScoreSummary/helpers.js +20 -0
  92. package/dist/ScoreSummary/index.js +108 -0
  93. package/dist/ScoreSummary/types.js +1 -0
  94. package/dist/SkillPathCard/index.js +38 -0
  95. package/dist/SocialMediaSharing/SocialShareIconLink.js +49 -0
  96. package/dist/SocialMediaSharing/index.js +116 -0
  97. package/dist/SocialMediaSharingDropdown/index.js +111 -0
  98. package/dist/Testimonial/index.js +163 -0
  99. package/dist/index.js +87 -0
  100. package/dist/lib/breakpointHooks/index.js +60 -0
  101. package/dist/lib/catalogList/index.js +173 -0
  102. package/dist/lib/resourcesList/index.js +241 -0
  103. package/dist/remoteAssets/components.js +1 -0
  104. package/dist/stories/Atoms/Avatar.stories.js +16 -0
  105. package/dist/stories/Atoms/BetaSticker.stories.js +22 -0
  106. package/dist/stories/Atoms/Logos/Logo.stories.js +78 -0
  107. package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.js +15 -0
  108. package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +11 -0
  109. package/dist/stories/Atoms/Logos/ProLabel.stories.js +16 -0
  110. package/dist/stories/Atoms/Logos/ProLogoAlt.stories.js +24 -0
  111. package/dist/stories/Atoms/RatingsBar.stories.js +16 -0
  112. package/dist/stories/Atoms/Subgrid.stories.js +87 -0
  113. package/dist/stories/Molecules/AppBar.stories.js +32 -0
  114. package/dist/stories/Molecules/AppHeader/AppHeader.stories.js +84 -0
  115. package/dist/stories/Molecules/AppHeader/AppHeaderDropdown.stories.js +67 -0
  116. package/dist/stories/Molecules/AppHeader/AppHeaderLink.stories.js +52 -0
  117. package/dist/stories/Molecules/AppHeader/AppHeaderLogo.stories.js +44 -0
  118. package/dist/stories/Molecules/AppHeader/AppHeaderMainMenuMobile.stories.js +34 -0
  119. package/dist/stories/Molecules/AppHeader/AppHeaderMobile.stories.js +40 -0
  120. package/dist/stories/Molecules/AppHeader/AppHeaderSubMenuMobile.stories.js +25 -0
  121. package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.js +176 -0
  122. package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.js +84 -0
  123. package/dist/stories/Molecules/AppHeader/MockAppHeaderElements.js +90 -0
  124. package/dist/stories/Molecules/AvatarChooser.stories.js +22 -0
  125. package/dist/stories/Molecules/BackToTopAnchor.stories.js +51 -0
  126. package/dist/stories/Molecules/Banner.stories.js +115 -0
  127. package/dist/stories/Molecules/Carousel.stories.js +47 -0
  128. package/dist/stories/Molecules/ContentGroupBaseCard.stories.js +173 -0
  129. package/dist/stories/Molecules/CurriculumCard.stories.js +208 -0
  130. package/dist/stories/Molecules/CurriculumCards/CareerPathCard.stories.js +92 -0
  131. package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.js +65 -0
  132. package/dist/stories/Molecules/CurriculumCards/CourseCard.stories.js +83 -0
  133. package/dist/stories/Molecules/CurriculumCards/LoadingCurriculumCard.stories.js +20 -0
  134. package/dist/stories/Molecules/CurriculumCards/SkillPathCard.stories.js +90 -0
  135. package/dist/stories/Molecules/DropdownButton.stories.js +207 -0
  136. package/dist/stories/Molecules/EditorialImage.stories.js +17 -0
  137. package/dist/stories/Molecules/EmptySection.stories.js +168 -0
  138. package/dist/stories/Molecules/ErrorContents.stories.js +19 -0
  139. package/dist/stories/Molecules/GridCollapse.stories.js +42 -0
  140. package/dist/stories/Molecules/HorizontalScrollMenu.examples.js +67 -0
  141. package/dist/stories/Molecules/HorizontalScrollMenu.stories.js +11 -0
  142. package/dist/stories/Molecules/HubCard.stories.js +28 -0
  143. package/dist/stories/Molecules/InfoCard.stories.js +30 -0
  144. package/dist/stories/Molecules/LearningOutcomeCard.stories.js +59 -0
  145. package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.js +20 -0
  146. package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.js +10 -0
  147. package/dist/stories/Molecules/LearningOutcomePopover.stories.js +39 -0
  148. package/dist/stories/Molecules/LearningOutcomeTile.stories.js +276 -0
  149. package/dist/stories/Molecules/ListSection.stories.js +97 -0
  150. package/dist/stories/Molecules/Loading.stories.js +10 -0
  151. package/dist/stories/Molecules/NotificationList.stories.js +100 -0
  152. package/dist/stories/Molecules/PageSection.stories.js +67 -0
  153. package/dist/stories/Molecules/PastDueModalContents.stories.js +62 -0
  154. package/dist/stories/Molecules/PausableImage.stories.js +16 -0
  155. package/dist/stories/Molecules/ResourceCard.stories.js +18 -0
  156. package/dist/stories/Molecules/SocialMediaSharing.stories.js +20 -0
  157. package/dist/stories/Molecules/SocialMediaSharingDropdown.stories.js +20 -0
  158. package/dist/stories/Molecules/Testimonial.stories.js +63 -0
  159. package/dist/stories/Organisms/GlobalFooter.stories.js +29 -0
  160. package/dist/stories/Organisms/GlobalHeader/About.stories.js +136 -0
  161. package/dist/stories/Organisms/GlobalHeader/Anon.stories.js +73 -0
  162. package/dist/stories/Organisms/GlobalHeader/Bootcamp.stories.js +32 -0
  163. package/dist/stories/Organisms/GlobalHeader/Enterprise.stories.js +108 -0
  164. package/dist/stories/Organisms/GlobalHeader/Free.stories.js +133 -0
  165. package/dist/stories/Organisms/GlobalHeader/Pro.stories.js +199 -0
  166. package/dist/stories/Organisms/GlobalHeader/Simple.stories.js +31 -0
  167. package/dist/stories/Organisms/GlobalPage.stories.js +142 -0
  168. package/dist/stories/Organisms/LayoutMenu.stories.js +242 -0
  169. package/dist/stories/Organisms/LayoutMenuVariant.stories.js +224 -0
  170. package/dist/stories/Organisms/PageAlerts.example.js +42 -0
  171. package/dist/stories/Organisms/PageAlerts.stories.js +15 -0
  172. package/dist/stories/Organisms/PageFeatures.stories.js +183 -0
  173. package/dist/stories/Organisms/PageHero.stories.js +145 -0
  174. package/dist/stories/Organisms/PageLayoutWithSidebarMenu.stories.js +34 -0
  175. package/dist/stories/Organisms/PagePrefooter.stories.js +62 -0
  176. package/dist/stories/Organisms/PageSingleFeature.stories.js +158 -0
  177. package/dist/stories/Organisms/PageVideoGallery.stories.js +70 -0
  178. package/dist/stories/Organisms/PlanCard.stories.js +98 -0
  179. package/dist/stories/Organisms/PlanCardTeams.stories.js +27 -0
  180. package/dist/stories/Organisms/ScoreSummary.stories.js +299 -0
  181. package/package.json +1 -1
  182. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +0 -55
  183. package/dist/LearningOutcomeAssessmentScores/index.js +0 -24
@@ -0,0 +1,199 @@
1
+ import { Box } from '@codecademy/gamut';
2
+ import { GlobalHeader } from '../../../index';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ const meta = {
5
+ component: GlobalHeader,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ },
9
+ decorators: [Story => {
10
+ return /*#__PURE__*/_jsx(Box, {
11
+ style: {
12
+ width: '100%'
13
+ },
14
+ children: Story()
15
+ });
16
+ }]
17
+ };
18
+ export default meta;
19
+ export const ProUserDefault = {
20
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
21
+ action: () => {},
22
+ notifications: {
23
+ notifications: [{
24
+ campaign: 'existence_is_pain',
25
+ date: '5 hours',
26
+ id: '1',
27
+ link: 'https://codecademy.com',
28
+ text: "Look at me! I'm Mr. Notification!",
29
+ unread: true
30
+ }],
31
+ onEnable: () => {},
32
+ actions: {
33
+ clear: () => {},
34
+ click: () => {},
35
+ dismiss: () => {},
36
+ read: () => {},
37
+ track: () => {}
38
+ }
39
+ },
40
+ search: {
41
+ onEnable: () => {},
42
+ onSearch: () => {},
43
+ onTrackingClick: () => {},
44
+ onSearchAsYouType: () => {}
45
+ },
46
+ type: "pro",
47
+ user: {
48
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
49
+ displayName: 'Codey'
50
+ }
51
+ }),
52
+ name: 'Pro User - Default'
53
+ };
54
+ export const ProUserPaused = {
55
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
56
+ action: () => {},
57
+ notifications: {
58
+ notifications: [{
59
+ campaign: 'existence_is_pain',
60
+ date: '5 hours',
61
+ id: '1',
62
+ link: 'https://codecademy.com',
63
+ text: "Look at me! I'm Mr. Notification!",
64
+ unread: true
65
+ }],
66
+ onEnable: () => {},
67
+ actions: {
68
+ clear: () => {},
69
+ click: () => {},
70
+ dismiss: () => {},
71
+ read: () => {},
72
+ track: () => {}
73
+ }
74
+ },
75
+ search: {
76
+ onEnable: () => {},
77
+ onSearch: () => {},
78
+ onTrackingClick: () => {},
79
+ onSearchAsYouType: () => {}
80
+ },
81
+ type: "pro",
82
+ user: {
83
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
84
+ displayName: 'Codey',
85
+ isPaused: true
86
+ }
87
+ }),
88
+ name: 'Pro User - Paused'
89
+ };
90
+ export const ProUserAdmin = {
91
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
92
+ action: () => {},
93
+ notifications: {
94
+ notifications: [{
95
+ campaign: 'existence_is_pain',
96
+ date: '5 hours',
97
+ id: '1',
98
+ link: 'https://codecademy.com',
99
+ text: "Look at me! I'm Mr. Notification!",
100
+ unread: true
101
+ }],
102
+ onEnable: () => {},
103
+ actions: {
104
+ clear: () => {},
105
+ click: () => {},
106
+ dismiss: () => {},
107
+ read: () => {},
108
+ track: () => {}
109
+ }
110
+ },
111
+ search: {
112
+ onEnable: () => {},
113
+ onSearch: () => {},
114
+ onTrackingClick: () => {},
115
+ onSearchAsYouType: () => {}
116
+ },
117
+ type: "pro",
118
+ user: {
119
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
120
+ displayName: 'Codey',
121
+ isAdmin: true
122
+ }
123
+ }),
124
+ name: 'Pro User - Admin'
125
+ };
126
+ export const ProUserCustomerSupport = {
127
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
128
+ action: () => {},
129
+ notifications: {
130
+ notifications: [{
131
+ campaign: 'existence_is_pain',
132
+ date: '5 hours',
133
+ id: '1',
134
+ link: 'https://codecademy.com',
135
+ text: "Look at me! I'm Mr. Notification!",
136
+ unread: true
137
+ }],
138
+ onEnable: () => {},
139
+ actions: {
140
+ clear: () => {},
141
+ click: () => {},
142
+ dismiss: () => {},
143
+ read: () => {},
144
+ track: () => {}
145
+ }
146
+ },
147
+ search: {
148
+ onEnable: () => {},
149
+ onSearch: () => {},
150
+ onTrackingClick: () => {},
151
+ onSearchAsYouType: () => {}
152
+ },
153
+ type: "pro",
154
+ user: {
155
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
156
+ displayName: 'Codey',
157
+ isAdmin: true,
158
+ isCustomerSupport: true
159
+ }
160
+ }),
161
+ name: 'Pro User - Customer Support'
162
+ };
163
+ export const ProUserProLiteSubscription = {
164
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
165
+ action: () => {},
166
+ notifications: {
167
+ notifications: [{
168
+ campaign: 'existence_is_pain',
169
+ date: '5 hours',
170
+ id: '1',
171
+ link: 'https://codecademy.com',
172
+ text: "Look at me! I'm Mr. Notification!",
173
+ unread: true
174
+ }],
175
+ onEnable: () => {},
176
+ actions: {
177
+ clear: () => {},
178
+ click: () => {},
179
+ dismiss: () => {},
180
+ read: () => {},
181
+ track: () => {}
182
+ }
183
+ },
184
+ search: {
185
+ onEnable: () => {},
186
+ onSearch: () => {},
187
+ onTrackingClick: () => {},
188
+ onSearchAsYouType: () => {}
189
+ },
190
+ type: "pro",
191
+ user: {
192
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
193
+ displayName: 'Codey',
194
+ isAdmin: true,
195
+ isCustomerSupport: true
196
+ }
197
+ }),
198
+ name: 'Pro User - Pro Lite Subscription'
199
+ };
@@ -0,0 +1,31 @@
1
+ import { Box } from '@codecademy/gamut';
2
+ import { GlobalHeader } from '../../../GlobalHeader';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ const meta = {
5
+ component: GlobalHeader,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ },
9
+ decorators: [Story => {
10
+ return /*#__PURE__*/_jsx(Box, {
11
+ style: {
12
+ width: '100%'
13
+ },
14
+ children: Story()
15
+ });
16
+ }]
17
+ };
18
+ export default meta;
19
+ export const Simple = {
20
+ render: () => /*#__PURE__*/_jsx(GlobalHeader, {
21
+ action: () => {},
22
+ search: {
23
+ onEnable: () => {},
24
+ onSearch: () => {},
25
+ onTrackingClick: () => {},
26
+ onSearchAsYouType: () => {}
27
+ },
28
+ type: "simple"
29
+ }),
30
+ name: 'Simple'
31
+ };
@@ -0,0 +1,142 @@
1
+ import { Box, ContentContainer, SkipToContentTarget, Text } from '@codecademy/gamut';
2
+ import { GlobalPage } from '../../index';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const header = {
5
+ action: () => {},
6
+ search: {
7
+ onEnable: () => {},
8
+ onTrackingClick: () => {},
9
+ onSearch: () => {},
10
+ onSearchAsYouType: () => {}
11
+ },
12
+ notifications: {
13
+ actions: {
14
+ clear: () => null,
15
+ click: _notification => null,
16
+ dismiss: _notification => null,
17
+ read: _notifications => null,
18
+ track: _target => null
19
+ },
20
+ notifications: [],
21
+ onEnable: () => null
22
+ },
23
+ type: 'free',
24
+ user: {
25
+ avatar: 'https://www.gravatar.com/avatar/1c959a9a1e2f9f9f1ac06b05cccc1d60?s=150&d=retro',
26
+ displayName: 'Codey'
27
+ }
28
+ };
29
+ const defaultArgs = {
30
+ footer: {
31
+ onClick: () => {}
32
+ },
33
+ header
34
+ };
35
+ const meta = {
36
+ component: GlobalPage,
37
+ parameters: {
38
+ layout: 'fullscreen'
39
+ },
40
+ decorators: [Story => {
41
+ return /*#__PURE__*/_jsx(Box, {
42
+ style: {
43
+ width: '100%'
44
+ },
45
+ children: Story()
46
+ });
47
+ }]
48
+ };
49
+ export default meta;
50
+ export const Default = {
51
+ render: args => /*#__PURE__*/_jsx(Box, {
52
+ position: "relative",
53
+ zIndex: 0,
54
+ children: /*#__PURE__*/_jsx(GlobalPage, {
55
+ ...args,
56
+ children: /*#__PURE__*/_jsx(ContentContainer, {
57
+ children: /*#__PURE__*/_jsx(Text, {
58
+ as: "h1",
59
+ children: "Page content goes here!"
60
+ })
61
+ })
62
+ })
63
+ }),
64
+ name: 'GlobalPage',
65
+ args: defaultArgs
66
+ };
67
+ export const Banner = {
68
+ render: args => /*#__PURE__*/_jsx(Box, {
69
+ position: "relative",
70
+ zIndex: 0,
71
+ children: /*#__PURE__*/_jsx(GlobalPage, {
72
+ ...args,
73
+ children: /*#__PURE__*/_jsx(ContentContainer, {
74
+ children: /*#__PURE__*/_jsx(Text, {
75
+ as: "h1",
76
+ children: "Page content goes here!"
77
+ })
78
+ })
79
+ })
80
+ }),
81
+ name: 'Banner',
82
+ args: {
83
+ ...defaultArgs,
84
+ banner: {
85
+ children: "I'm a banner!",
86
+ onClose: () => {}
87
+ }
88
+ }
89
+ };
90
+ export const Modal = {
91
+ render: args => /*#__PURE__*/_jsx(Box, {
92
+ position: "relative",
93
+ zIndex: 0,
94
+ children: /*#__PURE__*/_jsx(GlobalPage, {
95
+ ...args,
96
+ children: /*#__PURE__*/_jsxs(ContentContainer, {
97
+ children: [/*#__PURE__*/_jsx(Text, {
98
+ as: "h1",
99
+ children: "Page content goes here!"
100
+ }), /*#__PURE__*/_jsx(Text, {
101
+ as: "h2",
102
+ children: "Toggle modal isOpen to view modal"
103
+ })]
104
+ })
105
+ })
106
+ }),
107
+ name: 'Modal',
108
+ args: {
109
+ ...defaultArgs,
110
+ modal: {
111
+ isOpen: false,
112
+ title: "I'm a modal!",
113
+ onRequestClose: () => {}
114
+ }
115
+ }
116
+ };
117
+ export const SkipToContent = {
118
+ render: args => /*#__PURE__*/_jsx(Box, {
119
+ position: "relative",
120
+ zIndex: 0,
121
+ children: /*#__PURE__*/_jsx(GlobalPage, {
122
+ ...args,
123
+ children: /*#__PURE__*/_jsxs(ContentContainer, {
124
+ children: ["Todo: soon, we'll have a layout menu component as an example!", /*#__PURE__*/_jsxs(SkipToContentTarget, {
125
+ id: "custom-id",
126
+ children: [/*#__PURE__*/_jsx(Text, {
127
+ as: "h1",
128
+ children: "Page content goes here!"
129
+ }), /*#__PURE__*/_jsx(Text, {
130
+ as: "p",
131
+ children: "I am after the skip target."
132
+ })]
133
+ })]
134
+ })
135
+ })
136
+ }),
137
+ name: 'SkipToContent',
138
+ args: {
139
+ ...defaultArgs,
140
+ skipToContentId: 'custom-id'
141
+ }
142
+ };
@@ -0,0 +1,242 @@
1
+ import { Box } from '@codecademy/gamut';
2
+ import { LayoutMenu, SectionItemLink, SelectedSectionItem } from '../../index';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const defaults = {
5
+ href: '',
6
+ onClick: () => {}
7
+ };
8
+ const meta = {
9
+ component: LayoutMenu,
10
+ args: {
11
+ sections: [{
12
+ title: 'Languages',
13
+ slug: 'language',
14
+ items: [{
15
+ title: 'HTML & CSS',
16
+ slug: 'html-css',
17
+ href: '/catalog/language/html-css',
18
+ onClick: () => null
19
+ }, {
20
+ title: 'Python',
21
+ slug: 'python',
22
+ href: '/catalog/language/python',
23
+ onClick: () => null
24
+ }]
25
+ }, {
26
+ title: 'Subjects',
27
+ slug: 'subject',
28
+ items: [{
29
+ title: 'Data Science',
30
+ slug: 'data-science',
31
+ href: '/catalog/subject/data-science',
32
+ onClick: () => null
33
+ }, {
34
+ title: 'Computer Science',
35
+ slug: 'computer-science',
36
+ href: '/catalog/subject/computer-science',
37
+ onClick: () => null
38
+ }]
39
+ }],
40
+ onSectionToggle: slug => {
41
+ // eslint-disable-next-line no-console
42
+ console.log(`You could add event tracking here. You have access to the slug: ${slug}`);
43
+ },
44
+ mobileButtonText: 'Click Me'
45
+ }
46
+ };
47
+ export default meta;
48
+ export const Default = {
49
+ render: args => /*#__PURE__*/_jsx(LayoutMenu, {
50
+ ...args
51
+ }),
52
+ name: 'LayoutMenu'
53
+ };
54
+ export const WithSelectedItem = {
55
+ render: args => /*#__PURE__*/_jsx(LayoutMenu, {
56
+ ...args,
57
+ selectedItem: "python"
58
+ }),
59
+ name: 'With Selected Item'
60
+ };
61
+ export const WithAdditionalLinks = {
62
+ render: args => /*#__PURE__*/_jsxs(LayoutMenu, {
63
+ ...args,
64
+ children: [/*#__PURE__*/_jsx(Box, {
65
+ pb: 32,
66
+ children: /*#__PURE__*/_jsx(SelectedSectionItem, {
67
+ children: "Full Catalog"
68
+ })
69
+ }), /*#__PURE__*/_jsx(Box, {
70
+ pb: 32,
71
+ children: /*#__PURE__*/_jsx(SectionItemLink, {
72
+ href: defaults.href,
73
+ onClick: () => window.location.href = 'https://www.codecademy.com/explore/sorting-quiz',
74
+ children: "Where do I begin?"
75
+ })
76
+ })]
77
+ }),
78
+ name: 'With Additional Links'
79
+ };
80
+ export const WithAdditionalLinksOnTopAndBottom = {
81
+ render: args => /*#__PURE__*/_jsx(LayoutMenu, {
82
+ ...args,
83
+ selectedItem: "top-link",
84
+ topLinkSections: [{
85
+ title: 'A top link!',
86
+ slug: 'top-link',
87
+ href: '/not-a-real-link',
88
+ onClick: () => null
89
+ }, {
90
+ title: 'Another link!',
91
+ slug: 'test-link-2',
92
+ href: '/do-not-press-me',
93
+ onClick: () => null
94
+ }],
95
+ children: /*#__PURE__*/_jsx(Box, {
96
+ pb: 32,
97
+ children: /*#__PURE__*/_jsx(SectionItemLink, {
98
+ href: defaults.href,
99
+ onClick: () => window.location.href = 'https://www.codecademy.com/explore/sorting-quiz',
100
+ children: "Where do I begin?"
101
+ })
102
+ })
103
+ }),
104
+ name: 'With Additional Links on Top and Bottom'
105
+ };
106
+ export const WithSetMenuHeight = {
107
+ render: args => /*#__PURE__*/_jsxs(LayoutMenu, {
108
+ ...args,
109
+ menuHeight: "sm",
110
+ sections: [{
111
+ title: 'Languages',
112
+ slug: 'language',
113
+ items: [{
114
+ title: 'Python',
115
+ slug: 'python',
116
+ ...defaults
117
+ }, {
118
+ title: 'HTML & CSS',
119
+ slug: 'html-css',
120
+ ...defaults
121
+ }, {
122
+ title: 'JavaScript',
123
+ slug: 'javascript',
124
+ ...defaults
125
+ }, {
126
+ title: 'SQL',
127
+ slug: 'sql',
128
+ ...defaults
129
+ }, {
130
+ title: 'C++',
131
+ slug: 'c-plus-plus',
132
+ ...defaults
133
+ }, {
134
+ title: 'Java',
135
+ slug: 'java',
136
+ ...defaults
137
+ }, {
138
+ title: 'R',
139
+ slug: 'r',
140
+ ...defaults
141
+ }, {
142
+ title: 'Go',
143
+ slug: 'go',
144
+ ...defaults
145
+ }, {
146
+ title: 'C#',
147
+ slug: 'c-sharp',
148
+ ...defaults
149
+ }, {
150
+ title: 'PHP',
151
+ slug: 'php',
152
+ ...defaults
153
+ }, {
154
+ title: 'Ruby',
155
+ slug: 'ruby',
156
+ ...defaults
157
+ }, {
158
+ title: 'Swift',
159
+ slug: 'swift',
160
+ ...defaults
161
+ }, {
162
+ title: 'Bash/Shell',
163
+ slug: 'bash',
164
+ ...defaults
165
+ }, {
166
+ title: 'Kotlin',
167
+ slug: 'kotlin',
168
+ ...defaults
169
+ }, {
170
+ title: 'C',
171
+ slug: 'c',
172
+ ...defaults
173
+ }]
174
+ }, {
175
+ title: 'Subjects',
176
+ slug: 'subject',
177
+ items: [{
178
+ title: 'Computer Science',
179
+ slug: 'computer-science',
180
+ ...defaults
181
+ }, {
182
+ title: 'Machine Learning',
183
+ slug: 'machine-learning',
184
+ ...defaults
185
+ }, {
186
+ title: 'Data Visualization',
187
+ slug: 'data-visualization',
188
+ ...defaults
189
+ }, {
190
+ title: 'Web Development',
191
+ slug: 'web-development',
192
+ ...defaults
193
+ }, {
194
+ title: 'Web Design',
195
+ slug: 'web-design',
196
+ ...defaults
197
+ }, {
198
+ title: 'Data Science',
199
+ slug: 'data-science',
200
+ ...defaults
201
+ }, {
202
+ title: 'Mobile Development',
203
+ slug: 'mobile-development',
204
+ ...defaults
205
+ }, {
206
+ title: 'Developer Tools',
207
+ slug: 'developer-tools',
208
+ ...defaults
209
+ }, {
210
+ title: 'Code Foundations',
211
+ slug: 'code-foundations',
212
+ ...defaults
213
+ }, {
214
+ title: 'Game Development',
215
+ slug: 'game-development',
216
+ ...defaults
217
+ }, {
218
+ title: 'Interview Prep',
219
+ slug: 'interview-prep',
220
+ ...defaults
221
+ }, {
222
+ title: 'Cybersecurity',
223
+ slug: 'cybersecurity',
224
+ ...defaults
225
+ }]
226
+ }],
227
+ children: [/*#__PURE__*/_jsx(Box, {
228
+ pb: 32,
229
+ children: /*#__PURE__*/_jsx(SelectedSectionItem, {
230
+ children: "Full Catalog"
231
+ })
232
+ }), /*#__PURE__*/_jsx(Box, {
233
+ pb: 32,
234
+ children: /*#__PURE__*/_jsx(SectionItemLink, {
235
+ href: defaults.href,
236
+ onClick: () => window.location.href = 'https://www.codecademy.com/explore/sorting-quiz',
237
+ children: "Where do I begin?"
238
+ })
239
+ })]
240
+ }),
241
+ name: 'With Set Menu Height'
242
+ };