@codecademy/brand 2.0.0-alpha.4e24057d69.0 → 2.0.0-alpha.5000e6813b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AbbreviatedCommunityEventCard/index.js +98 -0
- package/dist/AppBar/AppBarSection.js +41 -0
- package/dist/AppBar/index.js +20 -0
- package/dist/AppBarDeprecated/AppBarSectionDeprecated.js +25 -0
- package/dist/AppBarDeprecated/index.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js +98 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.js +63 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +440 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js +157 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderDropdownLink.js +25 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderMenuItem.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/types.js +1 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/index.js +2 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.js +26 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +70 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +53 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.js +32 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.js +57 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.js +88 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.js +50 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderMenuNavButton.js +38 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.js +36 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.js +19 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +113 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesSection/index.js +194 -0
- package/dist/AppHeader/Search/DefaultResults.js +112 -0
- package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js +80 -0
- package/dist/AppHeader/Search/SearchButton.js +58 -0
- package/dist/AppHeader/Search/SearchPane.js +518 -0
- package/dist/AppHeader/Search/SearchWorker/PromiseLookup.js +35 -0
- package/dist/AppHeader/Search/SearchWorker/index.js +24 -0
- package/dist/AppHeader/Search/SearchWorker/src.js +307 -0
- package/dist/AppHeader/Search/SearchWorker/types.js +5 -0
- package/dist/AppHeader/Search/SearchWorker/worker.js +31 -0
- package/dist/AppHeader/Search/consts.js +40 -0
- package/dist/AppHeader/Search/hooks/useUrlChangeDetection.js +14 -0
- package/dist/AppHeader/Search/safelyRedirect.js +49 -0
- package/dist/AppHeader/Search/types.js +1 -0
- package/dist/AppHeader/Search/useHeaderSearch.js +39 -0
- package/dist/AppHeader/index.js +77 -0
- package/dist/AppHeader/shared/elements.js +151 -0
- package/dist/AppHeader/shared/index.js +4 -0
- package/dist/AppHeader/shared/keyboardNav.js +67 -0
- package/dist/AppHeader/shared/mockAppHeaderItems.js +10 -0
- package/dist/AppHeader/shared/testTypes.js +0 -0
- package/dist/AppHeader/shared/types.js +1 -0
- package/dist/AppHeader/shared/utils.js +103 -0
- package/dist/AppHeader/utils/types.js +1 -0
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/MobileSearchBar.js +77 -0
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +111 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/elements.js +30 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +104 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuTarget/index.js +60 -0
- package/dist/AppHeaderMobile/index.js +226 -0
- package/dist/Avatar/Avatar.stories.js +15 -0
- package/dist/Avatar/index.js +45 -0
- package/dist/AvatarChooser/index.js +105 -0
- package/dist/BackToTopAnchor/index.js +38 -0
- package/dist/Banner/index.js +102 -0
- package/dist/BetaSticker/index.js +57 -0
- package/dist/CareerPathCard/index.js +41 -0
- package/dist/Carousel/elements.js +14 -0
- package/dist/Carousel/index.js +242 -0
- package/dist/CertificationPathCard/index.js +42 -0
- package/dist/CommunityEventCard/EventTypeIcon.js +59 -0
- package/dist/CommunityEventCard/index.js +305 -0
- package/dist/CommunityEventToast/index.js +32 -0
- package/dist/ContentGroupBaseCard/helpers.js +12 -0
- package/dist/ContentGroupBaseCard/index.js +178 -0
- package/dist/ContentGroupBaseCard/shared.js +76 -0
- package/dist/ContentGroupBaseCard/types.js +12 -0
- package/dist/CourseCard/index.js +47 -0
- package/dist/CurriculumCard/BottomTag/index.js +26 -0
- package/dist/CurriculumCard/Difficulty/helpers.js +13 -0
- package/dist/CurriculumCard/Difficulty/index.js +47 -0
- package/dist/CurriculumCard/Difficulty/types.js +20 -0
- package/dist/CurriculumCard/Footer/index.js +54 -0
- package/dist/CurriculumCard/Image/index.js +56 -0
- package/dist/CurriculumCard/Subtitle/helpers.js +8 -0
- package/dist/CurriculumCard/Subtitle/index.js +34 -0
- package/dist/CurriculumCard/index.js +129 -0
- package/dist/DropdownButton/DropdownList.js +73 -0
- package/dist/DropdownButton/index.js +169 -0
- package/dist/DropdownButton/useDynamicPopoverPosition.js +55 -0
- package/dist/DropdownButton/useDynamicPopoverPosition.test.js +85 -0
- package/dist/EditorialImage/index.js +22 -0
- package/dist/EmptySection/index.js +183 -0
- package/dist/ErrorContents/index.js +48 -0
- package/dist/FeatureList/index.js +41 -0
- package/dist/GlobalFooter/FooterHeading.js +30 -0
- package/dist/GlobalFooter/FooterLegal/LegalLinks.js +43 -0
- package/dist/GlobalFooter/FooterLegal/MadeIn.js +64 -0
- package/dist/GlobalFooter/FooterLegal/index.js +22 -0
- package/dist/GlobalFooter/FooterLinks.js +53 -0
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +298 -0
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +299 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +268 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralFields.js +29 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralForm.js +74 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralLinkSocialMediaSharing.js +86 -0
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/types.js +1 -0
- package/dist/GlobalFooter/FooterNavLinks/SocialMediaLinks.js +50 -0
- package/dist/GlobalFooter/FooterNavLinks/index.js +45 -0
- package/dist/GlobalFooter/FooterSubHeading.js +22 -0
- package/dist/GlobalFooter/index.js +39 -0
- package/dist/GlobalFooter/types.js +1 -0
- package/dist/GlobalHeader/GlobalHeaderItems.js +405 -0
- package/dist/GlobalHeader/GlobalHeaderVariants.js +211 -0
- package/dist/GlobalHeader/index.js +101 -0
- package/dist/GlobalHeader/types.js +1 -0
- package/dist/GlobalHeader/urlHelpers.js +21 -0
- package/dist/GlobalPage/index.js +53 -0
- package/dist/Grid/GridCollapse.js +199 -0
- package/dist/Grid/GridCollapse.test.js +96 -0
- package/dist/Grid/Subgrid.js +37 -0
- package/dist/Grid/getCSSFromColumnCount.js +7 -0
- package/dist/Grid/index.js +3 -0
- package/dist/HeaderHeightArea/index.js +40 -0
- package/dist/HeaderHeightArea/useIsInHeaderRegion.js +15 -0
- package/dist/HorizontalScrollMenu/index.js +75 -0
- package/dist/HubCard/index.js +38 -0
- package/dist/InfoCard/index.js +157 -0
- package/dist/Konamimojisplosion/Konamimojisplosion.js +7 -0
- package/dist/Konamimojisplosion/index.js +2 -0
- package/dist/Konamimojisplosion/useKonamimojisplosion.js +34 -0
- package/dist/LandingPage/CTA.js +11 -0
- package/dist/LandingPage/Description.js +14 -0
- package/dist/LandingPage/Feature.js +96 -0
- package/dist/LandingPage/PageFAQs.js +42 -0
- package/dist/LandingPage/PageFeatures.js +112 -0
- package/dist/LandingPage/PageFeaturesEnhanced.js +159 -0
- package/dist/LandingPage/PageFeaturesWithReferences.js +136 -0
- package/dist/LandingPage/PageHero.js +22 -0
- package/dist/LandingPage/PagePrefooter.js +74 -0
- package/dist/LandingPage/PageSingleFeature.js +128 -0
- package/dist/LandingPage/PageTestimonials.js +113 -0
- package/dist/LandingPage/PageVideoGallery.js +49 -0
- package/dist/LandingPage/Title.js +28 -0
- package/dist/LandingPage/TitleWithEyebrow.js +40 -0
- package/dist/LandingPage/index.js +14 -0
- package/dist/LandingPage/types.js +1 -0
- package/dist/LayoutMenu/AccordionMenu.js +68 -0
- package/dist/LayoutMenu/LayoutMenu.js +96 -0
- package/dist/LayoutMenu/LayoutMenuSection.js +34 -0
- package/dist/LayoutMenu/SectionItemLink.js +16 -0
- package/dist/LayoutMenu/SelectedSectionItem.js +17 -0
- package/dist/LayoutMenu/index.js +3 -0
- package/dist/LayoutMenuVariant/AccordionMenu.js +85 -0
- package/dist/LayoutMenuVariant/LayoutMenu.js +92 -0
- package/dist/LayoutMenuVariant/LayoutMenuSection.js +42 -0
- package/dist/LayoutMenuVariant/SectionItemLink.js +17 -0
- package/dist/LayoutMenuVariant/index.js +2 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.js +57 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.js +35 -0
- package/dist/LearningOutcomeBadges/index.js +2 -0
- package/dist/LearningOutcomeCard/index.js +178 -0
- package/dist/LearningOutcomeFlyout/index.js +168 -0
- package/dist/LearningOutcomePopover/index.js +125 -0
- package/dist/LearningOutcomeTile/Tile.js +79 -0
- package/dist/LearningOutcomeTile/index.js +114 -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 +370 -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 +232 -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/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +75 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +35 -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 +2 -2
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { Box, FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { SparkleIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { DropdownButton } from '../../index';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const items = [{
|
|
6
|
+
id: 'one',
|
|
7
|
+
text: 'I have an href',
|
|
8
|
+
href: '#'
|
|
9
|
+
}, {
|
|
10
|
+
id: 'two',
|
|
11
|
+
text: 'I have an onClick',
|
|
12
|
+
// eslint-disable-next-line no-console
|
|
13
|
+
clickHandler: () => console.log('hi')
|
|
14
|
+
}];
|
|
15
|
+
const extraItems = [{
|
|
16
|
+
id: 'three',
|
|
17
|
+
text: 'I have an href & onClick',
|
|
18
|
+
href: '#',
|
|
19
|
+
// eslint-disable-next-line no-console
|
|
20
|
+
clickHandler: () => console.log('hi')
|
|
21
|
+
}, 'separator', {
|
|
22
|
+
id: 'four',
|
|
23
|
+
text: 'I have an href & onClick & icon',
|
|
24
|
+
href: '#',
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
clickHandler: () => console.log('hi'),
|
|
27
|
+
icon: SparkleIcon
|
|
28
|
+
}];
|
|
29
|
+
const meta = {
|
|
30
|
+
component: DropdownButton,
|
|
31
|
+
args: {
|
|
32
|
+
buttonType: 'fill',
|
|
33
|
+
dropdownItems: items,
|
|
34
|
+
variant: 'primary'
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
controls: {
|
|
38
|
+
include: ['align', 'buttonType', 'children', 'dropDownItems', 'horizontalOffset', 'iconSize', 'isMenu', 'onClick', 'size', 'tipProps', 'variant', 'verticalOffset']
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
export const Default = {
|
|
44
|
+
args: {
|
|
45
|
+
dropdownItems: [...items, ...extraItems],
|
|
46
|
+
isMenu: false
|
|
47
|
+
},
|
|
48
|
+
render: args => /*#__PURE__*/_jsx(DropdownButton, {
|
|
49
|
+
...args,
|
|
50
|
+
children: "click me"
|
|
51
|
+
}),
|
|
52
|
+
name: 'DropdownButton'
|
|
53
|
+
};
|
|
54
|
+
export const DropdownButtonTypes = {
|
|
55
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
56
|
+
justifyContent: "space-between",
|
|
57
|
+
p: 40,
|
|
58
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
59
|
+
width: "fit-content",
|
|
60
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
61
|
+
...args,
|
|
62
|
+
buttonType: "fill",
|
|
63
|
+
children: "Fill"
|
|
64
|
+
})
|
|
65
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
66
|
+
width: "fit-content",
|
|
67
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
68
|
+
...args,
|
|
69
|
+
buttonType: "stroke",
|
|
70
|
+
children: "Stroke"
|
|
71
|
+
})
|
|
72
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
73
|
+
width: "fit-content",
|
|
74
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
75
|
+
...args,
|
|
76
|
+
buttonType: "text",
|
|
77
|
+
children: "Text"
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
80
|
+
width: "fit-content",
|
|
81
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
82
|
+
...args,
|
|
83
|
+
buttonType: "kebab"
|
|
84
|
+
})
|
|
85
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
86
|
+
width: "fit-content",
|
|
87
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
88
|
+
...args,
|
|
89
|
+
buttonType: "horizontalKebab"
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
export const DropdownButtonVariants = {
|
|
95
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
96
|
+
justifyContent: "space-around",
|
|
97
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
98
|
+
width: "fit-content",
|
|
99
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
100
|
+
...args,
|
|
101
|
+
buttonType: "stroke",
|
|
102
|
+
children: "Stroke primary"
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
105
|
+
width: "fit-content",
|
|
106
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
107
|
+
...args,
|
|
108
|
+
buttonType: "stroke",
|
|
109
|
+
variant: "secondary",
|
|
110
|
+
children: "Stroke secondary"
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
};
|
|
115
|
+
export const DropdownTextButtonSizes = {
|
|
116
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
117
|
+
justifyContent: "space-around",
|
|
118
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
119
|
+
alignSelf: "center",
|
|
120
|
+
width: "fit-content",
|
|
121
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
122
|
+
...args,
|
|
123
|
+
buttonType: "fill",
|
|
124
|
+
size: "small",
|
|
125
|
+
children: "Fill small"
|
|
126
|
+
})
|
|
127
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
128
|
+
alignSelf: "center",
|
|
129
|
+
width: "fit-content",
|
|
130
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
131
|
+
...args,
|
|
132
|
+
buttonType: "fill",
|
|
133
|
+
size: "normal",
|
|
134
|
+
children: "Fill normal"
|
|
135
|
+
})
|
|
136
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
137
|
+
alignSelf: "center",
|
|
138
|
+
width: "fit-content",
|
|
139
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
140
|
+
...args,
|
|
141
|
+
buttonType: "fill",
|
|
142
|
+
size: "large",
|
|
143
|
+
children: "Fill large"
|
|
144
|
+
})
|
|
145
|
+
})]
|
|
146
|
+
})
|
|
147
|
+
};
|
|
148
|
+
export const DropdownIconButtonSizes = {
|
|
149
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
150
|
+
row: true,
|
|
151
|
+
justifyContent: "space-around",
|
|
152
|
+
mt: 16,
|
|
153
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
154
|
+
alignSelf: "center",
|
|
155
|
+
width: "fit-content",
|
|
156
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
157
|
+
...args,
|
|
158
|
+
buttonType: "kebab",
|
|
159
|
+
size: "small",
|
|
160
|
+
iconSize: 12
|
|
161
|
+
})
|
|
162
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
163
|
+
alignSelf: "center",
|
|
164
|
+
width: "fit-content",
|
|
165
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
166
|
+
...args,
|
|
167
|
+
buttonType: "kebab",
|
|
168
|
+
size: "normal"
|
|
169
|
+
})
|
|
170
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
171
|
+
alignSelf: "center",
|
|
172
|
+
width: "fit-content",
|
|
173
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
174
|
+
...args,
|
|
175
|
+
buttonType: "kebab",
|
|
176
|
+
size: "large",
|
|
177
|
+
iconSize: 20
|
|
178
|
+
})
|
|
179
|
+
})]
|
|
180
|
+
})
|
|
181
|
+
};
|
|
182
|
+
export const DropdownPopoverAlignment = {
|
|
183
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
184
|
+
row: true,
|
|
185
|
+
justifyContent: "space-around",
|
|
186
|
+
mt: 16,
|
|
187
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
188
|
+
width: "fit-content",
|
|
189
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
190
|
+
...args,
|
|
191
|
+
buttonType: "text",
|
|
192
|
+
size: "small",
|
|
193
|
+
align: "left",
|
|
194
|
+
children: "Align left"
|
|
195
|
+
})
|
|
196
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
197
|
+
width: "fit-content",
|
|
198
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
199
|
+
...args,
|
|
200
|
+
buttonType: "text",
|
|
201
|
+
size: "small",
|
|
202
|
+
align: "right",
|
|
203
|
+
children: "Align right"
|
|
204
|
+
})
|
|
205
|
+
})]
|
|
206
|
+
})
|
|
207
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EditorialImage } from '../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: EditorialImage,
|
|
5
|
+
args: {
|
|
6
|
+
image: 'https://images.ctfassets.net/go6kr6r0ykrq/4NI4czS6Y3DeaBBlVAoPTL/5a95deb01518e0cbb27bac8c6e00eaf6/broadway_2_70.jpg',
|
|
7
|
+
alt: 'A picture of two Codecademy employees.',
|
|
8
|
+
caption: 'You can remove this caption.'
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = {
|
|
13
|
+
render: args => /*#__PURE__*/_jsx(EditorialImage, {
|
|
14
|
+
...args
|
|
15
|
+
}),
|
|
16
|
+
name: 'EditorialImage'
|
|
17
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Column, FillButton, LayoutGrid, Text } from '@codecademy/gamut';
|
|
2
|
+
import { NumberBlocks } from '@codecademy/gamut-illustrations';
|
|
3
|
+
import { DropdownButton, EmptySection } from '../../index';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: EmptySection,
|
|
7
|
+
args: {
|
|
8
|
+
bodyText: 'Body text',
|
|
9
|
+
headingText: 'Heading text',
|
|
10
|
+
illustration: NumberBlocks
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const IllustrationOnTheRight = {
|
|
15
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
16
|
+
...args,
|
|
17
|
+
children: /*#__PURE__*/_jsx(FillButton, {
|
|
18
|
+
children: "Do Something"
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
name: 'Illustration on the right'
|
|
22
|
+
};
|
|
23
|
+
export const IllustrationOnTheLeft = {
|
|
24
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
25
|
+
...args,
|
|
26
|
+
children: /*#__PURE__*/_jsx(FillButton, {
|
|
27
|
+
children: "Do Something"
|
|
28
|
+
})
|
|
29
|
+
}),
|
|
30
|
+
name: 'Illustration on the left',
|
|
31
|
+
args: {
|
|
32
|
+
illustrationPosition: 'left'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const DotsStretchToTheLeft = {
|
|
36
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
37
|
+
...args,
|
|
38
|
+
children: /*#__PURE__*/_jsx(FillButton, {
|
|
39
|
+
children: "Do Something"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
name: 'Dots stretch to the left'
|
|
43
|
+
};
|
|
44
|
+
export const DotsStretchToTheRight = {
|
|
45
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
46
|
+
...args,
|
|
47
|
+
children: /*#__PURE__*/_jsx(FillButton, {
|
|
48
|
+
children: "Do Something"
|
|
49
|
+
})
|
|
50
|
+
}),
|
|
51
|
+
name: 'Dots stretch to the right',
|
|
52
|
+
args: {
|
|
53
|
+
stretchDirection: 'right'
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export const UsingADropdownButton = {
|
|
57
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
58
|
+
...args,
|
|
59
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
60
|
+
dropdownItems: [{
|
|
61
|
+
id: '1',
|
|
62
|
+
text: 'Option 1'
|
|
63
|
+
}, {
|
|
64
|
+
id: '2',
|
|
65
|
+
text: 'Option 2'
|
|
66
|
+
}, {
|
|
67
|
+
id: '3',
|
|
68
|
+
text: 'Option 3'
|
|
69
|
+
}],
|
|
70
|
+
children: "Click me!"
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
name: 'Using a dropdown button',
|
|
74
|
+
args: {
|
|
75
|
+
stretchDirection: 'left'
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
export const AnotherSectionOnTheLeft = {
|
|
79
|
+
render: args => /*#__PURE__*/_jsxs(LayoutGrid, {
|
|
80
|
+
gap: 16,
|
|
81
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
82
|
+
size: {
|
|
83
|
+
_: 12,
|
|
84
|
+
sm: 4,
|
|
85
|
+
md: 3
|
|
86
|
+
},
|
|
87
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
88
|
+
children: `<other section>`
|
|
89
|
+
})
|
|
90
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
91
|
+
size: {
|
|
92
|
+
_: 12,
|
|
93
|
+
sm: 8,
|
|
94
|
+
md: 9
|
|
95
|
+
},
|
|
96
|
+
children: /*#__PURE__*/_jsx(EmptySection, {
|
|
97
|
+
...args,
|
|
98
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
99
|
+
dropdownItems: [{
|
|
100
|
+
id: '1',
|
|
101
|
+
text: 'Option 1'
|
|
102
|
+
}, {
|
|
103
|
+
id: '2',
|
|
104
|
+
text: 'Option 2'
|
|
105
|
+
}, {
|
|
106
|
+
id: '3',
|
|
107
|
+
text: 'Option 3'
|
|
108
|
+
}],
|
|
109
|
+
children: "Click me!"
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
name: 'Another section on the left',
|
|
115
|
+
args: {
|
|
116
|
+
stretchDirection: 'right'
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
export const AnotherSectionOnTheRight = {
|
|
120
|
+
render: args => /*#__PURE__*/_jsxs(LayoutGrid, {
|
|
121
|
+
gap: 16,
|
|
122
|
+
children: [/*#__PURE__*/_jsxs(Column, {
|
|
123
|
+
size: {
|
|
124
|
+
_: 12,
|
|
125
|
+
sm: 8,
|
|
126
|
+
md: 9
|
|
127
|
+
},
|
|
128
|
+
children: [/*#__PURE__*/_jsx(EmptySection, {
|
|
129
|
+
...args,
|
|
130
|
+
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
131
|
+
dropdownItems: [{
|
|
132
|
+
id: '1',
|
|
133
|
+
text: 'Option 1'
|
|
134
|
+
}, {
|
|
135
|
+
id: '2',
|
|
136
|
+
text: 'Option 2'
|
|
137
|
+
}, {
|
|
138
|
+
id: '3',
|
|
139
|
+
text: 'Option 3'
|
|
140
|
+
}],
|
|
141
|
+
children: "Click me!"
|
|
142
|
+
})
|
|
143
|
+
}), ' ']
|
|
144
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
145
|
+
size: {
|
|
146
|
+
_: 12,
|
|
147
|
+
sm: 4,
|
|
148
|
+
md: 3
|
|
149
|
+
},
|
|
150
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
151
|
+
children: `<other section>`
|
|
152
|
+
})
|
|
153
|
+
})]
|
|
154
|
+
}),
|
|
155
|
+
name: 'Another section on the right',
|
|
156
|
+
args: {
|
|
157
|
+
stretchDirection: 'left'
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
export const Playground = {
|
|
161
|
+
render: args => /*#__PURE__*/_jsx(EmptySection, {
|
|
162
|
+
...args,
|
|
163
|
+
children: /*#__PURE__*/_jsx(FillButton, {
|
|
164
|
+
children: "Do Something"
|
|
165
|
+
})
|
|
166
|
+
}),
|
|
167
|
+
name: 'Playground'
|
|
168
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ErrorContents } from '../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: ErrorContents
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export const Default = {
|
|
8
|
+
render: args => /*#__PURE__*/_jsx(ErrorContents, {
|
|
9
|
+
...args
|
|
10
|
+
}),
|
|
11
|
+
name: 'ErrorContents'
|
|
12
|
+
};
|
|
13
|
+
export const SupportInformation = {
|
|
14
|
+
render: args => /*#__PURE__*/_jsx(ErrorContents, {
|
|
15
|
+
...args,
|
|
16
|
+
supportInformation: [['User ID', 'abc123'], ['Timestamp', '123456789']]
|
|
17
|
+
}),
|
|
18
|
+
name: 'SupportInformation'
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { GridCollapse } from '../../index';
|
|
3
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: GridCollapse,
|
|
6
|
+
args: {
|
|
7
|
+
as: 'ol',
|
|
8
|
+
columnCount: {
|
|
9
|
+
_: 3
|
|
10
|
+
},
|
|
11
|
+
initialMaxShown: {
|
|
12
|
+
_: 6
|
|
13
|
+
},
|
|
14
|
+
pageSize: {
|
|
15
|
+
_: 6
|
|
16
|
+
},
|
|
17
|
+
onExpandClick: () => {},
|
|
18
|
+
expandLabel: 'Show more',
|
|
19
|
+
collapseLabel: 'Show fewer',
|
|
20
|
+
gap: 8
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
const Item = ({
|
|
25
|
+
number
|
|
26
|
+
}) => /*#__PURE__*/_jsxs(FlexBox, {
|
|
27
|
+
as: "li",
|
|
28
|
+
p: 8,
|
|
29
|
+
background: "#eee",
|
|
30
|
+
borderRadius: "md",
|
|
31
|
+
center: true,
|
|
32
|
+
children: ["Item ", number + 1]
|
|
33
|
+
});
|
|
34
|
+
export const Default = {
|
|
35
|
+
render: args => /*#__PURE__*/_jsx(GridCollapse, {
|
|
36
|
+
...args,
|
|
37
|
+
children: [...Array(20)].map((_, i) => /*#__PURE__*/_jsx(Item, {
|
|
38
|
+
number: i
|
|
39
|
+
}))
|
|
40
|
+
}),
|
|
41
|
+
name: 'GridCollapse'
|
|
42
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Box, ContentContainer } from '@codecademy/gamut';
|
|
2
|
+
import { ContainerDifficulty, CurriculumCard, HorizontalScrollMenu } from '../../index';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const courseData = [{
|
|
5
|
+
id: 'a',
|
|
6
|
+
title: 'JavaScript',
|
|
7
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
8
|
+
scope: {
|
|
9
|
+
Lesson: 24
|
|
10
|
+
},
|
|
11
|
+
text: 'course'
|
|
12
|
+
}, {
|
|
13
|
+
id: 'b',
|
|
14
|
+
title: 'Python',
|
|
15
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
16
|
+
scope: {
|
|
17
|
+
Lesson: 32
|
|
18
|
+
},
|
|
19
|
+
text: 'course'
|
|
20
|
+
}, {
|
|
21
|
+
id: 'c',
|
|
22
|
+
title: 'Go',
|
|
23
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
24
|
+
scope: {
|
|
25
|
+
Lesson: 5
|
|
26
|
+
},
|
|
27
|
+
text: 'course'
|
|
28
|
+
}, {
|
|
29
|
+
id: 'd',
|
|
30
|
+
title: 'React',
|
|
31
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
32
|
+
scope: {
|
|
33
|
+
Lesson: 18
|
|
34
|
+
},
|
|
35
|
+
text: 'course'
|
|
36
|
+
}, {
|
|
37
|
+
id: 'e',
|
|
38
|
+
title: 'Intro to Django',
|
|
39
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
40
|
+
scope: {
|
|
41
|
+
Lesson: 29
|
|
42
|
+
},
|
|
43
|
+
text: 'course'
|
|
44
|
+
}, {
|
|
45
|
+
id: 'f',
|
|
46
|
+
title: 'PHP',
|
|
47
|
+
difficulty: ContainerDifficulty.Beginner,
|
|
48
|
+
scope: {
|
|
49
|
+
Lesson: 52
|
|
50
|
+
},
|
|
51
|
+
text: 'course'
|
|
52
|
+
}];
|
|
53
|
+
export const HorizontalScrollMenuExample = () => {
|
|
54
|
+
return /*#__PURE__*/_jsx(ContentContainer, {
|
|
55
|
+
my: 32,
|
|
56
|
+
children: /*#__PURE__*/_jsx(HorizontalScrollMenu, {
|
|
57
|
+
children: courseData.map(props => /*#__PURE__*/_jsx(Box, {
|
|
58
|
+
minWidth: 400,
|
|
59
|
+
maxWidth: 400,
|
|
60
|
+
mx: 16,
|
|
61
|
+
children: /*#__PURE__*/_jsx(CurriculumCard, {
|
|
62
|
+
...props
|
|
63
|
+
})
|
|
64
|
+
}, props.id))
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HorizontalScrollMenu } from '../../index';
|
|
2
|
+
import { HorizontalScrollMenuExample } from './HorizontalScrollMenu.examples';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: HorizontalScrollMenu
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export const Default = {
|
|
9
|
+
render: () => /*#__PURE__*/_jsx(HorizontalScrollMenuExample, {}),
|
|
10
|
+
name: 'Horizontal Scroll Menu'
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HubCard } from '../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: HubCard,
|
|
5
|
+
args: {
|
|
6
|
+
title: 'Subject Title',
|
|
7
|
+
eyebrowTitle: 'Card Eyebrow',
|
|
8
|
+
backgroundPosition: 'left',
|
|
9
|
+
backgroundImage: 'https://static-assets.codecademy.com/assets/components/cards/explore-category-card/language/javascript.svg'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
render: args => /*#__PURE__*/_jsx(HubCard, {
|
|
15
|
+
...args
|
|
16
|
+
}),
|
|
17
|
+
name: 'HubCard'
|
|
18
|
+
};
|
|
19
|
+
export const BackgroundRight = {
|
|
20
|
+
render: args => /*#__PURE__*/_jsx(HubCard, {
|
|
21
|
+
...args
|
|
22
|
+
}),
|
|
23
|
+
name: 'Background Right',
|
|
24
|
+
args: {
|
|
25
|
+
backgroundImage: 'https://static-assets.codecademy.com/assets/components/cards/explore-category-card/subject/data-science.svg',
|
|
26
|
+
backgroundPosition: 'right'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InfoCard } from '../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: InfoCard,
|
|
5
|
+
args: {
|
|
6
|
+
topText: 'Portfolio Project ',
|
|
7
|
+
title: 'Portfolio Website',
|
|
8
|
+
subtitle: 'This is a portfolio project.',
|
|
9
|
+
body: "In this project, you'll use knowledge of Express.js to build a small JSON API to serve up famous and interesting quotes about computers, technology, and programming.",
|
|
10
|
+
href: 'https://www.codecademy.com/learn'
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Default = {
|
|
15
|
+
render: args => /*#__PURE__*/_jsx(InfoCard, {
|
|
16
|
+
...args
|
|
17
|
+
}),
|
|
18
|
+
name: 'Info Card'
|
|
19
|
+
};
|
|
20
|
+
export const InfoCardWithBottomTags = {
|
|
21
|
+
render: args => /*#__PURE__*/_jsx(InfoCard, {
|
|
22
|
+
...args
|
|
23
|
+
}),
|
|
24
|
+
name: 'Info Card with bottom tags',
|
|
25
|
+
args: {
|
|
26
|
+
bottomLeftText: 'Independent, 5hrs',
|
|
27
|
+
bottomRightTagText: 'Portfolio Ready',
|
|
28
|
+
bottomRightTagColor: 'pink'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Background } from '@codecademy/gamut-styles';
|
|
2
|
+
import { LearningOutcomeCard } from '../../LearningOutcomeCard';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: LearningOutcomeCard,
|
|
6
|
+
args: {
|
|
7
|
+
level: 1,
|
|
8
|
+
outcome: 'Implement sorting algorithms in Java.',
|
|
9
|
+
skills: [{
|
|
10
|
+
title: 'java'
|
|
11
|
+
}, {
|
|
12
|
+
title: 'skill'
|
|
13
|
+
}, {
|
|
14
|
+
title: 'computer science'
|
|
15
|
+
}]
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export const Default = {
|
|
20
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
21
|
+
...args
|
|
22
|
+
}),
|
|
23
|
+
name: 'Learning Outcome Simple Card'
|
|
24
|
+
};
|
|
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
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
name: 'Emphasized Card'
|
|
35
|
+
};
|
|
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
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
name: 'Emphasized card displaying progress, for use in the Learning Environment'
|
|
47
|
+
};
|
|
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'
|
|
59
|
+
};
|
|
60
|
+
export const EmphasizedCardWithAnimation = {
|
|
61
|
+
render: args => /*#__PURE__*/_jsx(Background, {
|
|
62
|
+
bg: "navy",
|
|
63
|
+
p: 24,
|
|
64
|
+
children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
65
|
+
emphasized: true,
|
|
66
|
+
progress: 80,
|
|
67
|
+
progressUpdateData: {
|
|
68
|
+
previousProgress: 50,
|
|
69
|
+
progressDuration: 500
|
|
70
|
+
},
|
|
71
|
+
...args
|
|
72
|
+
})
|
|
73
|
+
}),
|
|
74
|
+
name: 'Emphasized card first displays 50% progress then animates until showing 80%, for use in the Learning Environment'
|
|
75
|
+
};
|