@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.
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +8 -7
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +4 -2
- package/dist/AppHeader/index.js +5 -2
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +7 -5
- package/dist/FeatureList/index.js +4 -5
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +9 -6
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +1 -1
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +3 -3
- package/dist/GlobalFooter/index.js +25 -17
- package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
- package/dist/GlobalHeader/index.js +49 -41
- package/dist/LandingPage/PageFeaturesEnhanced.js +0 -3
- package/dist/LearningOutcomeCard/index.js +143 -0
- package/dist/LearningOutcomePopover/index.js +125 -0
- package/dist/LearningOutcomeTile/Tile.js +79 -0
- package/dist/LearningOutcomeTile/index.js +116 -0
- package/dist/LearningOutcomeTile/types.js +11 -0
- package/dist/ListSection/index.js +64 -0
- package/dist/Loading/index.js +82 -0
- package/dist/LoadingCurriculumCard/index.js +82 -0
- package/dist/Logo/CodecademyLogo.js +19 -0
- package/dist/Logo/CodecademyPremiumLogo.js +35 -0
- package/dist/Logo/CodecademyProAltLogo.js +19 -0
- package/dist/Logo/CodecademyProLockupLogo.js +13 -0
- package/dist/Logo/CodecademyProLogo.js +21 -0
- package/dist/Logo/CodecademyProMonoLogo.js +22 -0
- package/dist/Logo/CodecademyProgramLogo.js +14 -0
- package/dist/Logo/CodecademyTeamsLogo.js +41 -0
- package/dist/Logo/index.js +30 -0
- package/dist/LogoFromSkillsoft/index.js +55 -0
- package/dist/LogoLXStudio/index.js +47 -0
- package/dist/LogoProCutout/index.js +31 -0
- package/dist/LogoProCutoutTransparent/index.js +31 -0
- package/dist/MarketingToaster/index.js +67 -0
- package/dist/NotFoundContent/index.js +55 -0
- package/dist/NotificationList/EmptyNotification/emptyNotificationContents.js +23 -0
- package/dist/NotificationList/EmptyNotification/index.js +38 -0
- package/dist/NotificationList/NotificationItem.js +151 -0
- package/dist/NotificationList/index.js +46 -0
- package/dist/NotificationList/typings.js +1 -0
- package/dist/Notifications/NotificationBell.js +72 -0
- package/dist/Notifications/NotificationsContents.js +85 -0
- package/dist/Notifications/NotificationsDropdown.js +25 -0
- package/dist/Notifications/__fixtures__/NotificationTestComponent.js +12 -0
- package/dist/Notifications/__fixtures__/stubs.js +8 -0
- package/dist/Notifications/constants.js +4 -0
- package/dist/Notifications/elements.js +21 -0
- package/dist/Notifications/types.js +1 -0
- package/dist/Notifications/useHeaderNotifications.js +37 -0
- package/dist/Notifications/useNotificationButtons.js +56 -0
- package/dist/PageAlerts/PageAlerts.js +75 -0
- package/dist/PageAlerts/PageAlertsProvider.js +34 -0
- package/dist/PageAlerts/index.js +3 -0
- package/dist/PageAlerts/types.js +1 -0
- package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.js +53 -0
- package/dist/PageLayoutWithSidebarMenu/index.js +1 -0
- package/dist/PageSection/index.js +67 -0
- package/dist/PastDue/PastDueModalContents/index.js +30 -0
- package/dist/PastDue/index.js +2 -0
- package/dist/PastDue/pastDueMessages.js +48 -0
- package/dist/PausableImage/BaseImage/index.js +54 -0
- package/dist/PausableImage/index.js +37 -0
- package/dist/PlanCard/PlanCardBanner.js +28 -0
- package/dist/PlanCard/PlanFeature.js +83 -0
- package/dist/PlanCard/PopularBadge.js +13 -0
- package/dist/PlanCard/PricingAmount.js +117 -0
- package/dist/PlanCard/RecommendedBadge.js +24 -0
- package/dist/PlanCard/consts.js +135 -0
- package/dist/PlanCard/index.js +323 -0
- package/dist/PlanCard/types.js +62 -0
- package/dist/PlanCardTeams/consts.js +8 -0
- package/dist/PlanCardTeams/index.js +167 -0
- package/dist/PricingSection/PlanFeature.js +88 -0
- package/dist/PricingSection/PricingCard/PricingAmount.js +84 -0
- package/dist/PricingSection/PricingCard/RecommendedBadge.js +24 -0
- package/dist/PricingSection/PricingCard/consts.js +85 -0
- package/dist/PricingSection/PricingCard/index.js +241 -0
- package/dist/PricingSection/ProductCTA.js +44 -0
- package/dist/PricingSection/Products.js +74 -0
- package/dist/PricingSection/config.js +36 -0
- package/dist/PricingSection/index.js +58 -0
- package/dist/PricingSection/types.js +8 -0
- package/dist/ProLabel/index.js +59 -0
- package/dist/ProLogo/index.js +27 -0
- package/dist/ProLogoAlt/index.js +26 -0
- package/dist/ProductFeatureShowcase/index.js +120 -0
- package/dist/QuizScore/index.js +84 -0
- package/dist/RatingsBar/index.js +32 -0
- package/dist/ResourceCard/index.js +59 -0
- package/dist/ScoreSummary/SubScores.js +165 -0
- package/dist/ScoreSummary/helpers.js +20 -0
- package/dist/ScoreSummary/index.js +108 -0
- package/dist/ScoreSummary/types.js +1 -0
- package/dist/SkillPathCard/index.js +38 -0
- package/dist/SocialMediaSharing/SocialShareIconLink.js +49 -0
- package/dist/SocialMediaSharing/index.js +116 -0
- package/dist/SocialMediaSharingDropdown/index.js +111 -0
- package/dist/Testimonial/index.js +163 -0
- package/dist/index.js +87 -0
- package/dist/lib/breakpointHooks/index.js +60 -0
- package/dist/lib/catalogList/index.js +173 -0
- package/dist/lib/resourcesList/index.js +241 -0
- package/dist/remoteAssets/components.js +1 -0
- package/dist/stories/Atoms/Avatar.stories.js +16 -0
- package/dist/stories/Atoms/BetaSticker.stories.js +22 -0
- package/dist/stories/Atoms/Logos/Logo.stories.js +78 -0
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.js +15 -0
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +11 -0
- package/dist/stories/Atoms/Logos/ProLabel.stories.js +16 -0
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.js +24 -0
- package/dist/stories/Atoms/RatingsBar.stories.js +16 -0
- package/dist/stories/Atoms/Subgrid.stories.js +87 -0
- package/dist/stories/Molecules/AppBar.stories.js +32 -0
- package/dist/stories/Molecules/AppHeader/AppHeader.stories.js +84 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderDropdown.stories.js +67 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderLink.stories.js +52 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderLogo.stories.js +44 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderMainMenuMobile.stories.js +34 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderMobile.stories.js +40 -0
- package/dist/stories/Molecules/AppHeader/AppHeaderSubMenuMobile.stories.js +25 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.js +176 -0
- package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.js +84 -0
- package/dist/stories/Molecules/AppHeader/MockAppHeaderElements.js +90 -0
- package/dist/stories/Molecules/AvatarChooser.stories.js +22 -0
- package/dist/stories/Molecules/BackToTopAnchor.stories.js +51 -0
- package/dist/stories/Molecules/Banner.stories.js +115 -0
- package/dist/stories/Molecules/Carousel.stories.js +47 -0
- package/dist/stories/Molecules/ContentGroupBaseCard.stories.js +173 -0
- package/dist/stories/Molecules/CurriculumCard.stories.js +208 -0
- package/dist/stories/Molecules/CurriculumCards/CareerPathCard.stories.js +92 -0
- package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.js +65 -0
- package/dist/stories/Molecules/CurriculumCards/CourseCard.stories.js +83 -0
- package/dist/stories/Molecules/CurriculumCards/LoadingCurriculumCard.stories.js +20 -0
- package/dist/stories/Molecules/CurriculumCards/SkillPathCard.stories.js +90 -0
- package/dist/stories/Molecules/DropdownButton.stories.js +207 -0
- package/dist/stories/Molecules/EditorialImage.stories.js +17 -0
- package/dist/stories/Molecules/EmptySection.stories.js +168 -0
- package/dist/stories/Molecules/ErrorContents.stories.js +19 -0
- package/dist/stories/Molecules/GridCollapse.stories.js +42 -0
- package/dist/stories/Molecules/HorizontalScrollMenu.examples.js +67 -0
- package/dist/stories/Molecules/HorizontalScrollMenu.stories.js +11 -0
- package/dist/stories/Molecules/HubCard.stories.js +28 -0
- package/dist/stories/Molecules/InfoCard.stories.js +30 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +59 -0
- package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.js +20 -0
- package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.js +10 -0
- package/dist/stories/Molecules/LearningOutcomePopover.stories.js +39 -0
- package/dist/stories/Molecules/LearningOutcomeTile.stories.js +276 -0
- package/dist/stories/Molecules/ListSection.stories.js +97 -0
- package/dist/stories/Molecules/Loading.stories.js +10 -0
- package/dist/stories/Molecules/NotificationList.stories.js +100 -0
- package/dist/stories/Molecules/PageSection.stories.js +67 -0
- package/dist/stories/Molecules/PastDueModalContents.stories.js +62 -0
- package/dist/stories/Molecules/PausableImage.stories.js +16 -0
- package/dist/stories/Molecules/ResourceCard.stories.js +18 -0
- package/dist/stories/Molecules/SocialMediaSharing.stories.js +20 -0
- package/dist/stories/Molecules/SocialMediaSharingDropdown.stories.js +20 -0
- package/dist/stories/Molecules/Testimonial.stories.js +63 -0
- package/dist/stories/Organisms/GlobalFooter.stories.js +29 -0
- package/dist/stories/Organisms/GlobalHeader/About.stories.js +136 -0
- package/dist/stories/Organisms/GlobalHeader/Anon.stories.js +73 -0
- package/dist/stories/Organisms/GlobalHeader/Bootcamp.stories.js +32 -0
- package/dist/stories/Organisms/GlobalHeader/Enterprise.stories.js +108 -0
- package/dist/stories/Organisms/GlobalHeader/Free.stories.js +133 -0
- package/dist/stories/Organisms/GlobalHeader/Pro.stories.js +199 -0
- package/dist/stories/Organisms/GlobalHeader/Simple.stories.js +31 -0
- package/dist/stories/Organisms/GlobalPage.stories.js +142 -0
- package/dist/stories/Organisms/LayoutMenu.stories.js +242 -0
- package/dist/stories/Organisms/LayoutMenuVariant.stories.js +224 -0
- package/dist/stories/Organisms/PageAlerts.example.js +42 -0
- package/dist/stories/Organisms/PageAlerts.stories.js +15 -0
- package/dist/stories/Organisms/PageFeatures.stories.js +183 -0
- package/dist/stories/Organisms/PageHero.stories.js +145 -0
- package/dist/stories/Organisms/PageLayoutWithSidebarMenu.stories.js +34 -0
- package/dist/stories/Organisms/PagePrefooter.stories.js +62 -0
- package/dist/stories/Organisms/PageSingleFeature.stories.js +158 -0
- package/dist/stories/Organisms/PageVideoGallery.stories.js +70 -0
- package/dist/stories/Organisms/PlanCard.stories.js +98 -0
- package/dist/stories/Organisms/PlanCardTeams.stories.js +27 -0
- package/dist/stories/Organisms/ScoreSummary.stories.js +299 -0
- package/package.json +1 -1
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +0 -55
- package/dist/LearningOutcomeAssessmentScores/index.js +0 -24
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Column, FlexBox, GridBox, LayoutGrid } from '@codecademy/gamut';
|
|
2
|
+
import { Subgrid, subgridContext } from '../../index';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: Subgrid,
|
|
6
|
+
args: {}
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
const Item = ({
|
|
10
|
+
children
|
|
11
|
+
}) => /*#__PURE__*/_jsx(FlexBox, {
|
|
12
|
+
as: "li",
|
|
13
|
+
p: 8,
|
|
14
|
+
background: "#eee",
|
|
15
|
+
borderRadius: "md",
|
|
16
|
+
center: true,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
19
|
+
export const Default = {
|
|
20
|
+
render: _args => /*#__PURE__*/_jsxs(LayoutGrid, {
|
|
21
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
22
|
+
size: {
|
|
23
|
+
_: 12,
|
|
24
|
+
sm: 2,
|
|
25
|
+
md: 3
|
|
26
|
+
},
|
|
27
|
+
pr: 8,
|
|
28
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
29
|
+
children: "Sidebar"
|
|
30
|
+
})
|
|
31
|
+
}), /*#__PURE__*/_jsx(subgridContext.Provider, {
|
|
32
|
+
value: {
|
|
33
|
+
_: 12,
|
|
34
|
+
sm: 10,
|
|
35
|
+
md: 9
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/_jsxs(Column, {
|
|
38
|
+
size: {
|
|
39
|
+
sm: 10,
|
|
40
|
+
md: 9
|
|
41
|
+
},
|
|
42
|
+
children: [/*#__PURE__*/_jsxs(GridBox, {
|
|
43
|
+
gridTemplateColumns: {
|
|
44
|
+
_: 'repeat(12, 1fr)',
|
|
45
|
+
sm: 'repeat(10, 1fr)',
|
|
46
|
+
md: 'repeat(9, 1fr)'
|
|
47
|
+
},
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
49
|
+
size: 3,
|
|
50
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
51
|
+
children: "GridBox Column 1"
|
|
52
|
+
})
|
|
53
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
54
|
+
size: 3,
|
|
55
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
56
|
+
children: "GridBox Column 2"
|
|
57
|
+
})
|
|
58
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
59
|
+
size: 3,
|
|
60
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
61
|
+
children: "GridBox Column 3"
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
64
|
+
}), /*#__PURE__*/_jsxs(Subgrid, {
|
|
65
|
+
mt: 8,
|
|
66
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
67
|
+
size: 3,
|
|
68
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
69
|
+
children: "Subgrid Column 1"
|
|
70
|
+
})
|
|
71
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
72
|
+
size: 3,
|
|
73
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
74
|
+
children: "Subgrid Column 2"
|
|
75
|
+
})
|
|
76
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
77
|
+
size: 3,
|
|
78
|
+
children: /*#__PURE__*/_jsx(Item, {
|
|
79
|
+
children: "Subgrid Column 3"
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}),
|
|
86
|
+
name: 'Subgrid'
|
|
87
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AppBar, AppBarSection, Logo } from '../../index';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default {
|
|
4
|
+
component: AppBar,
|
|
5
|
+
subcomponents: {
|
|
6
|
+
AppBarSection
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export const Default = {
|
|
10
|
+
render: () => /*#__PURE__*/_jsx(AppBar, {
|
|
11
|
+
children: /*#__PURE__*/_jsx(AppBarSection, {
|
|
12
|
+
position: "left",
|
|
13
|
+
children: "In Left Position"
|
|
14
|
+
})
|
|
15
|
+
}),
|
|
16
|
+
name: 'AppBar'
|
|
17
|
+
};
|
|
18
|
+
export const Header = {
|
|
19
|
+
render: () => /*#__PURE__*/_jsxs(AppBar, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx(AppBarSection, {
|
|
21
|
+
position: "left",
|
|
22
|
+
children: /*#__PURE__*/_jsx(Logo, {})
|
|
23
|
+
}), /*#__PURE__*/_jsx(AppBarSection, {
|
|
24
|
+
position: "center",
|
|
25
|
+
children: "Pricing"
|
|
26
|
+
}), /*#__PURE__*/_jsx(AppBarSection, {
|
|
27
|
+
position: "right",
|
|
28
|
+
children: "Sign In"
|
|
29
|
+
})]
|
|
30
|
+
}),
|
|
31
|
+
name: 'Header'
|
|
32
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { IconButton } from '@codecademy/gamut';
|
|
2
|
+
import { FaviconIcon, PersonIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { AppHeader } from '../../../index';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: AppHeader,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen'
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
items: {
|
|
12
|
+
left: [{
|
|
13
|
+
id: 'logo-1',
|
|
14
|
+
href: 'http://codecademy.com',
|
|
15
|
+
pro: false,
|
|
16
|
+
trackingTarget: 'tracking-target',
|
|
17
|
+
type: 'logo',
|
|
18
|
+
enterprise: false
|
|
19
|
+
}, {
|
|
20
|
+
id: 'link',
|
|
21
|
+
href: 'http://codecademy.com',
|
|
22
|
+
trackingTarget: 'tracking-target',
|
|
23
|
+
text: 'AppHeaderLink',
|
|
24
|
+
type: 'link'
|
|
25
|
+
}],
|
|
26
|
+
right: [{
|
|
27
|
+
id: 'render-element',
|
|
28
|
+
renderElement: () => /*#__PURE__*/_jsx(IconButton, {
|
|
29
|
+
icon: FaviconIcon,
|
|
30
|
+
tip: "Link",
|
|
31
|
+
tipProps: {
|
|
32
|
+
alignment: 'bottom-center'
|
|
33
|
+
}
|
|
34
|
+
}),
|
|
35
|
+
type: 'render-element'
|
|
36
|
+
}, {
|
|
37
|
+
id: 'text-button',
|
|
38
|
+
text: 'TextButton',
|
|
39
|
+
href: 'http://codecademy.com',
|
|
40
|
+
trackingTarget: 'tracking-target',
|
|
41
|
+
type: 'text-button'
|
|
42
|
+
}, {
|
|
43
|
+
id: 'target',
|
|
44
|
+
text: 'Dropdown Target',
|
|
45
|
+
icon: PersonIcon,
|
|
46
|
+
popover: [{
|
|
47
|
+
id: 'sublink-1',
|
|
48
|
+
text: 'A Link',
|
|
49
|
+
href: 'http://codecademy.com',
|
|
50
|
+
trackingTarget: '',
|
|
51
|
+
type: 'link'
|
|
52
|
+
}, {
|
|
53
|
+
id: 'sublink-2',
|
|
54
|
+
text: 'Another Link',
|
|
55
|
+
href: 'http://codecademy.com',
|
|
56
|
+
trackingTarget: '',
|
|
57
|
+
type: 'link'
|
|
58
|
+
}],
|
|
59
|
+
trackingTarget: '',
|
|
60
|
+
type: 'dropdown'
|
|
61
|
+
}, {
|
|
62
|
+
id: 'fill-button',
|
|
63
|
+
text: 'FillButton',
|
|
64
|
+
href: 'http://codecademy.com',
|
|
65
|
+
trackingTarget: 'tracking-target',
|
|
66
|
+
type: 'fill-button'
|
|
67
|
+
}]
|
|
68
|
+
},
|
|
69
|
+
isStandalone: true,
|
|
70
|
+
search: {
|
|
71
|
+
onEnable: () => {},
|
|
72
|
+
onSearch: () => {},
|
|
73
|
+
onTrackingClick: () => {},
|
|
74
|
+
onSearchAsYouType: () => {}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
export default meta;
|
|
79
|
+
export const Default = {
|
|
80
|
+
render: args => /*#__PURE__*/_jsx(AppHeader, {
|
|
81
|
+
...args
|
|
82
|
+
}),
|
|
83
|
+
name: 'AppHeader'
|
|
84
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Box } from '@codecademy/gamut';
|
|
2
|
+
import { PersonIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { AppHeaderDropdown } from '../../../index';
|
|
4
|
+
import { MOCK_PROFILE_DROPDOWN } from './MockAppHeaderElements';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const meta = {
|
|
7
|
+
component: AppHeaderDropdown,
|
|
8
|
+
args: {
|
|
9
|
+
item: {
|
|
10
|
+
id: 'target',
|
|
11
|
+
text: 'Dropdown Target',
|
|
12
|
+
icon: PersonIcon,
|
|
13
|
+
popover: [{
|
|
14
|
+
id: 'sublink-1',
|
|
15
|
+
text: 'A Link',
|
|
16
|
+
href: 'http://codecademy.com',
|
|
17
|
+
trackingTarget: '',
|
|
18
|
+
type: 'link'
|
|
19
|
+
}, {
|
|
20
|
+
id: 'sublink-2',
|
|
21
|
+
text: 'Another Link',
|
|
22
|
+
href: 'http://codecademy.com',
|
|
23
|
+
trackingTarget: '',
|
|
24
|
+
type: 'link'
|
|
25
|
+
}],
|
|
26
|
+
trackingTarget: '',
|
|
27
|
+
type: 'dropdown'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
export const Default = {
|
|
33
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderDropdown, {
|
|
34
|
+
...args
|
|
35
|
+
}),
|
|
36
|
+
name: 'AppHeaderDropdown'
|
|
37
|
+
};
|
|
38
|
+
export const AppHeaderSeparatedDropdown = {
|
|
39
|
+
render: args => /*#__PURE__*/_jsx(Box, {
|
|
40
|
+
height: "200",
|
|
41
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
42
|
+
position: "absolute",
|
|
43
|
+
left: "225",
|
|
44
|
+
children: /*#__PURE__*/_jsx(AppHeaderDropdown, {
|
|
45
|
+
...args
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
args: {
|
|
50
|
+
item: MOCK_PROFILE_DROPDOWN
|
|
51
|
+
},
|
|
52
|
+
name: 'AppHeaderSeparatedDropdown'
|
|
53
|
+
};
|
|
54
|
+
export const AppHeaderStandaloneDropdown = {
|
|
55
|
+
render: args => /*#__PURE__*/_jsx(Box, {
|
|
56
|
+
height: "200",
|
|
57
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
58
|
+
children: /*#__PURE__*/_jsx(AppHeaderDropdown, {
|
|
59
|
+
...args
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
}),
|
|
63
|
+
args: {
|
|
64
|
+
standalone: true
|
|
65
|
+
},
|
|
66
|
+
name: 'AppHeaderStandaloneDropdown'
|
|
67
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AppHeaderLink } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: AppHeaderLink,
|
|
5
|
+
args: {
|
|
6
|
+
item: {
|
|
7
|
+
id: 'link',
|
|
8
|
+
href: 'http://codecademy.com',
|
|
9
|
+
text: 'Nav Link',
|
|
10
|
+
trackingTarget: 'tracking-target',
|
|
11
|
+
type: 'link'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
export const Default = {
|
|
17
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLink, {
|
|
18
|
+
...args
|
|
19
|
+
}),
|
|
20
|
+
name: 'AppHeaderLink'
|
|
21
|
+
};
|
|
22
|
+
export const CurrentTab = {
|
|
23
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLink, {
|
|
24
|
+
...args
|
|
25
|
+
}),
|
|
26
|
+
name: 'Current Tab',
|
|
27
|
+
args: {
|
|
28
|
+
item: {
|
|
29
|
+
id: 'link-current-tab',
|
|
30
|
+
href: 'http://codecademy.com',
|
|
31
|
+
text: 'Current Tab',
|
|
32
|
+
trackingTarget: 'tracking-target',
|
|
33
|
+
type: 'link'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export const NewTab = {
|
|
38
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLink, {
|
|
39
|
+
...args
|
|
40
|
+
}),
|
|
41
|
+
name: 'New Tab',
|
|
42
|
+
args: {
|
|
43
|
+
item: {
|
|
44
|
+
id: 'link-new-tab',
|
|
45
|
+
href: 'http://codecademy.com',
|
|
46
|
+
newTab: true,
|
|
47
|
+
text: 'New Tab',
|
|
48
|
+
trackingTarget: 'tracking-target',
|
|
49
|
+
type: 'link'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AppHeaderLogo } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: AppHeaderLogo,
|
|
5
|
+
args: {
|
|
6
|
+
item: {
|
|
7
|
+
enterprise: false,
|
|
8
|
+
href: 'http://codecademy.com',
|
|
9
|
+
id: 'pro-logo',
|
|
10
|
+
pro: true,
|
|
11
|
+
trackingTarget: 'test',
|
|
12
|
+
type: 'logo'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLogo, {
|
|
19
|
+
...args
|
|
20
|
+
}),
|
|
21
|
+
name: 'AppHeaderLogo'
|
|
22
|
+
};
|
|
23
|
+
export const Pro = {
|
|
24
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLogo, {
|
|
25
|
+
...args
|
|
26
|
+
}),
|
|
27
|
+
name: 'Pro'
|
|
28
|
+
};
|
|
29
|
+
export const FreeAnon = {
|
|
30
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderLogo, {
|
|
31
|
+
...args
|
|
32
|
+
}),
|
|
33
|
+
name: 'Free + Anon',
|
|
34
|
+
args: {
|
|
35
|
+
item: {
|
|
36
|
+
pro: false,
|
|
37
|
+
href: 'http://codecademy.com',
|
|
38
|
+
trackingTarget: 'test',
|
|
39
|
+
type: 'logo',
|
|
40
|
+
enterprise: false,
|
|
41
|
+
id: 'free-anon-logo'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BookFlipPageIcon, HouseEntranceIcon } from '@codecademy/gamut-icons';
|
|
2
|
+
import { AppHeaderMainMenuMobile } from '../../../index';
|
|
3
|
+
import { MOCK_DROPDOWN_1, MOCK_DROPDOWN_2, MOCK_PROFILE_DROPDOWN } from './MockAppHeaderElements';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: AppHeaderMainMenuMobile,
|
|
7
|
+
args: {
|
|
8
|
+
action: () => {},
|
|
9
|
+
items: [{
|
|
10
|
+
dataTestId: 'header-catalog',
|
|
11
|
+
icon: BookFlipPageIcon,
|
|
12
|
+
id: 'course-catalog',
|
|
13
|
+
text: 'Course Catalog',
|
|
14
|
+
href: '/catalog',
|
|
15
|
+
trackingTarget: 'topnav_catalog',
|
|
16
|
+
type: 'link'
|
|
17
|
+
}, {
|
|
18
|
+
dataTestId: 'header-home',
|
|
19
|
+
icon: HouseEntranceIcon,
|
|
20
|
+
id: 'my-home',
|
|
21
|
+
text: 'My Home',
|
|
22
|
+
href: '/learn',
|
|
23
|
+
trackingTarget: 'topnav_home',
|
|
24
|
+
type: 'link'
|
|
25
|
+
}, MOCK_DROPDOWN_1, MOCK_DROPDOWN_2, MOCK_PROFILE_DROPDOWN]
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
export const Default = {
|
|
30
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderMainMenuMobile, {
|
|
31
|
+
...args
|
|
32
|
+
}),
|
|
33
|
+
name: 'AppHeaderMainMenuMobile'
|
|
34
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AppHeaderMobile } from '../../../index';
|
|
2
|
+
import { MOCK_DROPDOWN_1, MOCK_DROPDOWN_2, MOCK_LINK, MOCK_PROFILE_DROPDOWN } from './MockAppHeaderElements';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: AppHeaderMobile,
|
|
6
|
+
args: {
|
|
7
|
+
action: () => {},
|
|
8
|
+
items: {
|
|
9
|
+
left: [{
|
|
10
|
+
id: 'logo-1',
|
|
11
|
+
href: 'http://codecademy.com',
|
|
12
|
+
pro: false,
|
|
13
|
+
trackingTarget: 'tracking-target',
|
|
14
|
+
type: 'logo',
|
|
15
|
+
enterprise: false
|
|
16
|
+
}],
|
|
17
|
+
right: [{
|
|
18
|
+
id: 'text-button',
|
|
19
|
+
text: 'Log in',
|
|
20
|
+
href: 'http://codecademy.com',
|
|
21
|
+
trackingTarget: 'tracking-target',
|
|
22
|
+
type: 'text-button'
|
|
23
|
+
}, {
|
|
24
|
+
id: 'fill-button',
|
|
25
|
+
text: 'Sign up',
|
|
26
|
+
href: 'http://codecademy.com',
|
|
27
|
+
trackingTarget: 'tracking-target',
|
|
28
|
+
type: 'fill-button'
|
|
29
|
+
}],
|
|
30
|
+
mainMenu: [MOCK_LINK, MOCK_DROPDOWN_1, MOCK_DROPDOWN_2, MOCK_PROFILE_DROPDOWN]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
export const Default = {
|
|
36
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderMobile, {
|
|
37
|
+
...args
|
|
38
|
+
}),
|
|
39
|
+
name: 'AppHeaderMobile'
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AppHeaderSubNavMobile } from '../../../index';
|
|
2
|
+
import { MOCK_DROPDOWN_1, MOCK_PROFILE_DROPDOWN } from './MockAppHeaderElements';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: AppHeaderSubNavMobile,
|
|
6
|
+
args: {
|
|
7
|
+
item: MOCK_DROPDOWN_1
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Default = {
|
|
12
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderSubNavMobile, {
|
|
13
|
+
...args
|
|
14
|
+
}),
|
|
15
|
+
name: 'AppHeaderSubMenuMobile'
|
|
16
|
+
};
|
|
17
|
+
export const AppHeaderSubMenuMobileProfile = {
|
|
18
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderSubNavMobile, {
|
|
19
|
+
...args
|
|
20
|
+
}),
|
|
21
|
+
args: {
|
|
22
|
+
item: MOCK_PROFILE_DROPDOWN
|
|
23
|
+
},
|
|
24
|
+
name: 'AppHeaderSubMenuMobile - Profile'
|
|
25
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Box, FlexBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import { ArrowDashRightIcon, CloudCheckIcon, CommentsIcon, ConversationChatIcon, EarthIcon, GearIcon, LayoutModuleIcon, MiniArrowLeftIcon, PercipioIcon, PersonIcon, SupportIcon, TrashIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { AppHeader, LogoLXStudio } from '../../../index';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: AppHeader,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen'
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
action: () => {},
|
|
12
|
+
dropdownSpacing: 'condensed',
|
|
13
|
+
isStandalone: true,
|
|
14
|
+
hideRightButtonDefaults: true,
|
|
15
|
+
items: {
|
|
16
|
+
left: [{
|
|
17
|
+
id: 'render-element',
|
|
18
|
+
renderElement: () => /*#__PURE__*/_jsx(Box, {
|
|
19
|
+
children: /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
20
|
+
height: 40,
|
|
21
|
+
width: 196.92
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
type: 'render-element'
|
|
25
|
+
}],
|
|
26
|
+
right: [{
|
|
27
|
+
id: 'menu',
|
|
28
|
+
text: 'Menu',
|
|
29
|
+
icon: LayoutModuleIcon,
|
|
30
|
+
isIconOnly: true,
|
|
31
|
+
popover: [{
|
|
32
|
+
id: 'sublink-1',
|
|
33
|
+
text: 'Percipio',
|
|
34
|
+
href: 'http://codecademy.com',
|
|
35
|
+
type: 'link',
|
|
36
|
+
icon: PercipioIcon
|
|
37
|
+
}],
|
|
38
|
+
trackingTarget: '',
|
|
39
|
+
type: 'dropdown'
|
|
40
|
+
}, {
|
|
41
|
+
id: 'profile-dropdown',
|
|
42
|
+
type: 'profile-dropdown',
|
|
43
|
+
avatar: 'https://avatarfiles.alphacoders.com/367/367474.png',
|
|
44
|
+
userDisplayName: 'cinnamoroll',
|
|
45
|
+
popover: [[{
|
|
46
|
+
id: 'sublink-1',
|
|
47
|
+
icon: PersonIcon,
|
|
48
|
+
text: 'My profile',
|
|
49
|
+
href: 'http://codecademy.com',
|
|
50
|
+
type: 'link'
|
|
51
|
+
}, {
|
|
52
|
+
id: 'sublink-2',
|
|
53
|
+
icon: GearIcon,
|
|
54
|
+
text: 'Settings',
|
|
55
|
+
href: 'http://codecademy.com',
|
|
56
|
+
type: 'link'
|
|
57
|
+
}, {
|
|
58
|
+
id: 'sublink-3',
|
|
59
|
+
icon: SupportIcon,
|
|
60
|
+
text: 'Help',
|
|
61
|
+
href: 'http://codecademy.com',
|
|
62
|
+
type: 'link'
|
|
63
|
+
}, {
|
|
64
|
+
id: 'sublink-4',
|
|
65
|
+
icon: TrashIcon,
|
|
66
|
+
text: 'Deleted items',
|
|
67
|
+
href: 'http://codecademy.com',
|
|
68
|
+
type: 'link'
|
|
69
|
+
}, {
|
|
70
|
+
id: 'sublink-5',
|
|
71
|
+
icon: ArrowDashRightIcon,
|
|
72
|
+
text: 'Log out',
|
|
73
|
+
href: 'http://codecademy.com',
|
|
74
|
+
type: 'link'
|
|
75
|
+
}]],
|
|
76
|
+
text: 'string;',
|
|
77
|
+
trackingTarget: 'string'
|
|
78
|
+
}]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
export default meta;
|
|
83
|
+
export const Default = {
|
|
84
|
+
render: args => /*#__PURE__*/_jsx(AppHeader, {
|
|
85
|
+
...args
|
|
86
|
+
}),
|
|
87
|
+
name: 'LXStudio AppHeader'
|
|
88
|
+
};
|
|
89
|
+
export const ButtonsWithTitle = {
|
|
90
|
+
render: args => /*#__PURE__*/_jsx(AppHeader, {
|
|
91
|
+
...args
|
|
92
|
+
}),
|
|
93
|
+
args: {
|
|
94
|
+
action: () => {},
|
|
95
|
+
dropdownSpacing: 'condensed',
|
|
96
|
+
isStandalone: true,
|
|
97
|
+
hideRightButtonDefaults: true,
|
|
98
|
+
items: {
|
|
99
|
+
left: [{
|
|
100
|
+
id: 'exit',
|
|
101
|
+
type: 'text-button',
|
|
102
|
+
text: 'Exit',
|
|
103
|
+
icon: MiniArrowLeftIcon,
|
|
104
|
+
href: ''
|
|
105
|
+
}, {
|
|
106
|
+
id: 'caisy-title',
|
|
107
|
+
renderElement: () => /*#__PURE__*/_jsxs(FlexBox, {
|
|
108
|
+
borderColor: "border-secondary",
|
|
109
|
+
borderLeft: 1,
|
|
110
|
+
center: true,
|
|
111
|
+
height: "100%",
|
|
112
|
+
width: "fit-content",
|
|
113
|
+
pl: 16,
|
|
114
|
+
children: [/*#__PURE__*/_jsx(ConversationChatIcon, {
|
|
115
|
+
size: 26,
|
|
116
|
+
ml: 4,
|
|
117
|
+
color: "primary"
|
|
118
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
119
|
+
as: "h1",
|
|
120
|
+
ml: 16,
|
|
121
|
+
variant: "title-xs",
|
|
122
|
+
children: "CAISY\u2122: Something else entirely"
|
|
123
|
+
})]
|
|
124
|
+
}),
|
|
125
|
+
type: 'render-element'
|
|
126
|
+
}],
|
|
127
|
+
right: [{
|
|
128
|
+
id: 'draft-zone',
|
|
129
|
+
renderElement: () => /*#__PURE__*/_jsxs(FlexBox, {
|
|
130
|
+
center: true,
|
|
131
|
+
color: "text-secondary",
|
|
132
|
+
height: "24px",
|
|
133
|
+
width: "fit-content",
|
|
134
|
+
children: [/*#__PURE__*/_jsx(CloudCheckIcon, {}), /*#__PURE__*/_jsx(Text, {
|
|
135
|
+
ml: 8,
|
|
136
|
+
children: "Draft auto-saved"
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
type: 'render-element'
|
|
140
|
+
}, {
|
|
141
|
+
id: 'globe-button',
|
|
142
|
+
text: 'Language',
|
|
143
|
+
icon: EarthIcon,
|
|
144
|
+
type: 'icon-button',
|
|
145
|
+
href: '',
|
|
146
|
+
variant: 'primary'
|
|
147
|
+
}, {
|
|
148
|
+
id: 'chat-button',
|
|
149
|
+
text: 'Comments',
|
|
150
|
+
icon: CommentsIcon,
|
|
151
|
+
type: 'icon-button',
|
|
152
|
+
href: '',
|
|
153
|
+
variant: 'primary'
|
|
154
|
+
}, {
|
|
155
|
+
id: 'preview-button',
|
|
156
|
+
text: 'Preview',
|
|
157
|
+
type: 'stroke-button',
|
|
158
|
+
href: '',
|
|
159
|
+
variant: 'primary'
|
|
160
|
+
}, {
|
|
161
|
+
id: 'share-button',
|
|
162
|
+
text: 'Share',
|
|
163
|
+
type: 'stroke-button',
|
|
164
|
+
href: '',
|
|
165
|
+
variant: 'primary'
|
|
166
|
+
}, {
|
|
167
|
+
id: 'publish-button',
|
|
168
|
+
text: 'Publish',
|
|
169
|
+
type: 'fill-button',
|
|
170
|
+
href: '',
|
|
171
|
+
variant: 'primary'
|
|
172
|
+
}]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
name: 'LXStudio Buttons with Title'
|
|
176
|
+
};
|