@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,27 @@
|
|
|
1
|
+
import { colors } from '@codecademy/gamut-styles';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { LogoProCutout } from '../LogoProCutout';
|
|
4
|
+
import { LogoProCutoutTransparent } from '../LogoProCutoutTransparent';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const ProLogo = props => {
|
|
7
|
+
if (props.variant === 'cutout') {
|
|
8
|
+
const {
|
|
9
|
+
backgroundColor = 'navy',
|
|
10
|
+
cutoutColor = 'white',
|
|
11
|
+
...forwardedProps
|
|
12
|
+
} = props;
|
|
13
|
+
return /*#__PURE__*/_jsx(LogoProCutout, {
|
|
14
|
+
backgroundColor: colors[backgroundColor],
|
|
15
|
+
cutoutColor: colors[cutoutColor],
|
|
16
|
+
...forwardedProps
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const {
|
|
20
|
+
backgroundColor = 'white',
|
|
21
|
+
...forwardedProps
|
|
22
|
+
} = props;
|
|
23
|
+
return /*#__PURE__*/_jsx(LogoProCutoutTransparent, {
|
|
24
|
+
backgroundColor: colors[backgroundColor],
|
|
25
|
+
...forwardedProps
|
|
26
|
+
});
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { colors } from '@codecademy/gamut-styles';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export const ProLogoAlt = ({
|
|
5
|
+
ariaLabel = 'Codecademy Pro Logo',
|
|
6
|
+
backgroundColor = 'yellow',
|
|
7
|
+
textColor = 'black',
|
|
8
|
+
width = 50
|
|
9
|
+
}) => /*#__PURE__*/_jsx("svg", {
|
|
10
|
+
width: width,
|
|
11
|
+
viewBox: "0 0 95 40",
|
|
12
|
+
fill: "none",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
"aria-label": ariaLabel,
|
|
15
|
+
children: /*#__PURE__*/_jsxs("g", {
|
|
16
|
+
fill: colors[backgroundColor],
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
19
|
+
d: "m0 0h74v40h-74zm78 34h17v6h-17z",
|
|
20
|
+
fill: colors[backgroundColor]
|
|
21
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
22
|
+
d: "m13.971 23.67v6.82h-3.971v-20.145h6.82c4.749 0 7.253 2.965 7.253 6.62 0 3.625-2.504 6.705-7.253 6.705zm2.245-9.871h-2.245v6.446h2.245c2.187 0 3.77-1.036 3.77-3.28 0-2.245-1.583-3.166-3.77-3.166zm21.518 16.691-4.46-7.741h-2.821v7.741h-4v-20.145h7.568c4.404 0 6.994 2.62 6.994 6.13 0 1.9-.777 4.317-3.828 5.526l5.151 8.49h-4.604zm-.72-13.986c0-1.784-1.295-2.705-3.51-2.705h-3.051v5.468h3.05c2.216 0 3.511-1.036 3.511-2.763zm16.453-6.504c5.843 0 10.533 4.346 10.533 10.418s-4.69 10.417-10.533 10.417c-5.842 0-10.533-4.345-10.533-10.417s4.691-10.418 10.533-10.418zm0 17.152c3.799 0 6.36-2.878 6.36-6.734 0-3.857-2.561-6.734-6.36-6.734s-6.36 2.877-6.36 6.734c0 3.856 2.561 6.734 6.36 6.734z",
|
|
23
|
+
fill: colors[textColor]
|
|
24
|
+
})]
|
|
25
|
+
})
|
|
26
|
+
});
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
import { Badge, Box, ContentContainer, GridBox, StrokeButton, Text } from '@codecademy/gamut';
|
|
4
|
+
import { DiagonalBDense } from '@codecademy/gamut-patterns';
|
|
5
|
+
import { PausableImage } from '..';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const StyledPattern = /*#__PURE__*/_styled(DiagonalBDense, {
|
|
8
|
+
target: "e72vrs1",
|
|
9
|
+
label: "StyledPattern"
|
|
10
|
+
})("color:", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.colors.yellow, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qcm9kdWN0RmVhdHVyZVNob3djYXNlL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhNEMiLCJmaWxlIjoiLi4vLi4vc3JjL1Byb2R1Y3RGZWF0dXJlU2hvd2Nhc2UvaW5kZXgudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgQmFkZ2UsXG4gIEJveCxcbiAgQ29udGVudENvbnRhaW5lcixcbiAgR3JpZEJveCxcbiAgU3Ryb2tlQnV0dG9uLFxuICBUZXh0LFxufS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c2NyaXB0aW9uLFxuICBjdGEsXG59KSA9PiAoXG4gIDxCb3ggYmc9XCJwYWxlWWVsbG93XCIgcG9zaXRpb249XCJyZWxhdGl2ZVwiPlxuICAgIDxTdHlsZWRQYXR0ZXJuXG4gICAgICBjb2xvcj1cInllbGxvd1wiXG4gICAgICBwb3NpdGlvbj1cImFic29sdXRlXCJcbiAgICAgIGxlZnQ9ezB9XG4gICAgICB0b3A9ezB9XG4gICAgICBib3R0b209ezB9XG4gICAgICB3aWR0aD1cIjQwJVwiXG4gICAgICBwb2ludGVyRXZlbnRzPVwibm9uZVwiXG4gICAgICBkaXNwbGF5PXt7IF86ICdub25lJywgbWQ6ICdibG9jaycgfX1cbiAgICAvPlxuICAgIDxDb250ZW50Q29udGFpbmVyPlxuICAgICAgPEdyaWRCb3hcbiAgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1ucz17eyBfOiAnMWZyJywgbWQ6ICcxZnIgMWZyJyB9fVxuICAgICAgICBnYXA9e3sgXzogNDgsIG1kOiA5NiB9fVxuICAgICAgICBweT17eyBfOiA0OCwgbWQ6IDY0IH19XG4gICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgPlxuICAgICAgICA8Qm94IHBvc2l0aW9uPVwicmVsYXRpdmVcIj5cbiAgICAgICAgICA8U3R5bGVkUGF0dGVyblxuICAgICAgICAgICAgY29sb3I9XCJ5ZWxsb3dcIlxuICAgICAgICAgICAgcG9zaXRpb249XCJhYnNvbHV0ZVwiXG4gICAgICAgICAgICB3aWR0aD1cIjEwMHZ3XCJcbiAgICAgICAgICAgIHRvcD17LTQ4fVxuICAgICAgICAgICAgbGVmdD17eyBfOiAtMTYsIHhzOiAtMzIsIHNtOiAtNjQgfX1cbiAgICAgICAgICAgIGhlaWdodD1cImNhbGMoNTAlICsgNDhweClcIlxuICAgICAgICAgICAgcG9pbnRlckV2ZW50cz1cIm5vbmVcIlxuICAgICAgICAgICAgZGlzcGxheT17eyBtZDogJ25vbmUnIH19XG4gICAgICAgICAgLz5cbiAgICAgICAgICA8Qm94XG4gICAgICAgICAgICB7Li4uKGRpc3BsYXlJbWFnZUJvcmRlclxuICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAxLFxuICAgICAgICAgICAgICAgICAgYm9yZGVyOiAnc29saWQnLFxuICAgICAgICAgICAgICAgICAgYm9yZGVyQ29sb3I6ICduYXZ5LTQwMCcsXG4gICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6ICdsZycsXG4gICAgICAgICAgICAgICAgICBvdmVyZmxvdzogJ2hpZGRlbicsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICA6IHVuZGVmaW5lZCl9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPFBhdXNhYmxlSW1hZ2Ugc3JjPXtpbWFnZS5zcmN9IGFsdD17aW1hZ2UuYWx0fSAvPlxuICAgICAgICAgIDwvQm94PlxuICAgICAgICA8L0JveD5cbiAgICAgICAgPEJveD5cbiAgICAgICAgICB7ZXllYnJvdyAmJiA8Qm94IG1iPXs4fT57ZXllYnJvd308L0JveD59XG5cbiAgICAgICAgICA8VGV4dCBhcz1cImgyXCIgdmFyaWFudD1cInRpdGxlLXhsXCI+XG4gICAgICAgICAgICA8VGV4dCBtcj17OH0gZGlzcGxheT1cImlubGluZVwiPlxuICAgICAgICAgICAgICB7dGl0bGV9XG4gICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICB7dGl0bGVCYWRnZSAmJiAoXG4gICAgICAgICAgICAgIDxTdHlsZWRCYWRnZSB2YXJpYW50PVwidGVydGlhcnlcIiBmb250U2l6ZT17MTR9PlxuICAgICAgICAgICAgICAgIHt0aXRsZUJhZGdlfVxuICAgICAgICAgICAgICA8L1N0eWxlZEJhZGdlPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L1RleHQ+XG5cbiAgICAgICAgICA8VGV4dCBtdD17OH0+e2Rlc2NyaXB0aW9ufTwvVGV4dD5cblxuICAgICAgICAgIHtjdGEgJiYgKFxuICAgICAgICAgICAgPFN0cm9rZUJ1dHRvbiBocmVmPXtjdGEuaHJlZn0gb25DbGljaz17Y3RhLm9uQ2xpY2t9IG10PXsxNn0+XG4gICAgICAgICAgICAgIHtjdGEubGFiZWx9XG4gICAgICAgICAgICA8L1N0cm9rZUJ1dHRvbj5cbiAgICAgICAgICApfVxuICAgICAgICA8L0JveD5cbiAgICAgIDwvR3JpZEJveD5cbiAgICA8L0NvbnRlbnRDb250YWluZXI+XG4gIDwvQm94PlxuKTtcbiJdfQ== */"));
|
|
13
|
+
const StyledBadge = /*#__PURE__*/_styled(Badge, {
|
|
14
|
+
target: "e72vrs0",
|
|
15
|
+
label: "StyledBadge"
|
|
16
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "1nsdp8s",
|
|
18
|
+
styles: "display:inline-block;position:relative;top:-0.5rem"
|
|
19
|
+
} : {
|
|
20
|
+
name: "1nsdp8s",
|
|
21
|
+
styles: "display:inline-block;position:relative;top:-0.5rem/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qcm9kdWN0RmVhdHVyZVNob3djYXNlL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQmlDIiwiZmlsZSI6Ii4uLy4uL3NyYy9Qcm9kdWN0RmVhdHVyZVNob3djYXNlL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEJhZGdlLFxuICBCb3gsXG4gIENvbnRlbnRDb250YWluZXIsXG4gIEdyaWRCb3gsXG4gIFN0cm9rZUJ1dHRvbixcbiAgVGV4dCxcbn0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQnO1xuaW1wb3J0IHsgRGlhZ29uYWxCRGVuc2UgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1wYXR0ZX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UGF0dGVyblxuICAgICAgY29sb3I9XCJ5ZWxsb3dcIlxuICAgICAgcG9zaXRpb249XCJhYnNvbHV0ZVwiXG4gICAgICBsZWZ0PXswfVxuICAgICAgdG9wPXswfVxuICAgICAgYm90dG9tPXswfVxuICAgICAgd2lkdGg9XCI0MCVcIlxuICAgICAgcG9pbnRlckV2ZW50cz1cIm5vbmVcIlxuICAgICAgZGlzcGxheT17eyBfOiAnbm9uZScsIG1kOiAnYmxvY2snIH19XG4gICAgLz5cbiAgICA8Q29udGVudENvbnRhaW5lcj5cbiAgICAgIDxHcmlkQm94XG4gICAgICAgIGdyaWRUZW1wbGF0ZUNvbHVtbnM9e3sgXzogJzFmcicsIG1kOiAnMWZyIDFmcicgfX1cbiAgICAgICAgZ2FwPXt7IF86IDQ4LCBtZDogOTYgfX1cbiAgICAgICAgcHk9e3sgXzogNDgsIG1kOiA2NCB9fVxuICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgID5cbiAgICAgICAgPEJveCBwb3NpdGlvbj1cInJlbGF0aXZlXCI+XG4gICAgICAgICAgPFN0eWxlZFBhdHRlcm5cbiAgICAgICAgICAgIGNvbG9yPVwieWVsbG93XCJcbiAgICAgICAgICAgIHBvc2l0aW9uPVwiYWJzb2x1dGVcIlxuICAgICAgICAgICAgd2lkdGg9XCIxMDB2d1wiXG4gICAgICAgICAgICB0b3A9ey00OH1cbiAgICAgICAgICAgIGxlZnQ9e3sgXzogLTE2LCB4czogLTMyLCBzbTogLTY0IH19XG4gICAgICAgICAgICBoZWlnaHQ9XCJjYWxjKDUwJSArIDQ4cHgpXCJcbiAgICAgICAgICAgIHBvaW50ZXJFdmVudHM9XCJub25lXCJcbiAgICAgICAgICAgIGRpc3BsYXk9e3sgbWQ6ICdub25lJyB9fVxuICAgICAgICAgIC8+XG4gICAgICAgICAgPEJveFxuICAgICAgICAgICAgey4uLihkaXNwbGF5SW1hZ2VCb3JkZXJcbiAgICAgICAgICAgICAgPyB7XG4gICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogMSxcbiAgICAgICAgICAgICAgICAgIGJvcmRlcjogJ3NvbGlkJyxcbiAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiAnbmF2eS00MDAnLFxuICAgICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiAnbGcnLFxuICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgOiB1bmRlZmluZWQpfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYXVzYWJsZUltYWdlIHNyYz17aW1hZ2Uuc3JjfSBhbHQ9e2ltYWdlLmFsdH0gLz5cbiAgICAgICAgICA8L0JveD5cbiAgICAgICAgPC9Cb3g+XG4gICAgICAgIDxCb3g+XG4gICAgICAgICAge2V5ZWJyb3cgJiYgPEJveCBtYj17OH0+e2V5ZWJyb3d9PC9Cb3g+fVxuXG4gICAgICAgICAgPFRleHQgYXM9XCJoMlwiIHZhcmlhbnQ9XCJ0aXRsZS14bFwiPlxuICAgICAgICAgICAgPFRleHQgbXI9ezh9IGRpc3BsYXk9XCJpbmxpbmVcIj5cbiAgICAgICAgICAgICAge3RpdGxlfVxuICAgICAgICAgICAgPC9UZXh0PlxuICAgICAgICAgICAge3RpdGxlQmFkZ2UgJiYgKFxuICAgICAgICAgICAgICA8U3R5bGVkQmFkZ2UgdmFyaWFudD1cInRlcnRpYXJ5XCIgZm9udFNpemU9ezE0fT5cbiAgICAgICAgICAgICAgICB7dGl0bGVCYWRnZX1cbiAgICAgICAgICAgICAgPC9TdHlsZWRCYWRnZT5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9UZXh0PlxuXG4gICAgICAgICAgPFRleHQgbXQ9ezh9PntkZXNjcmlwdGlvbn08L1RleHQ+XG5cbiAgICAgICAgICB7Y3RhICYmIChcbiAgICAgICAgICAgIDxTdHJva2VCdXR0b24gaHJlZj17Y3RhLmhyZWZ9IG9uQ2xpY2s9e2N0YS5vbkNsaWNrfSBtdD17MTZ9PlxuICAgICAgICAgICAgICB7Y3RhLmxhYmVsfVxuICAgICAgICAgICAgPC9TdHJva2VCdXR0b24+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9Cb3g+XG4gICAgICA8L0dyaWRCb3g+XG4gICAgPC9Db250ZW50Q29udGFpbmVyPlxuICA8L0JveD5cbik7XG4iXX0= */",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
});
|
|
24
|
+
export const ProductFeatureShowcase = ({
|
|
25
|
+
image,
|
|
26
|
+
displayImageBorder,
|
|
27
|
+
title,
|
|
28
|
+
titleBadge,
|
|
29
|
+
eyebrow,
|
|
30
|
+
description,
|
|
31
|
+
cta
|
|
32
|
+
}) => /*#__PURE__*/_jsxs(Box, {
|
|
33
|
+
bg: "paleYellow",
|
|
34
|
+
position: "relative",
|
|
35
|
+
children: [/*#__PURE__*/_jsx(StyledPattern, {
|
|
36
|
+
color: "yellow",
|
|
37
|
+
position: "absolute",
|
|
38
|
+
left: 0,
|
|
39
|
+
top: 0,
|
|
40
|
+
bottom: 0,
|
|
41
|
+
width: "40%",
|
|
42
|
+
pointerEvents: "none",
|
|
43
|
+
display: {
|
|
44
|
+
_: 'none',
|
|
45
|
+
md: 'block'
|
|
46
|
+
}
|
|
47
|
+
}), /*#__PURE__*/_jsx(ContentContainer, {
|
|
48
|
+
children: /*#__PURE__*/_jsxs(GridBox, {
|
|
49
|
+
gridTemplateColumns: {
|
|
50
|
+
_: '1fr',
|
|
51
|
+
md: '1fr 1fr'
|
|
52
|
+
},
|
|
53
|
+
gap: {
|
|
54
|
+
_: 48,
|
|
55
|
+
md: 96
|
|
56
|
+
},
|
|
57
|
+
py: {
|
|
58
|
+
_: 48,
|
|
59
|
+
md: 64
|
|
60
|
+
},
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
63
|
+
position: "relative",
|
|
64
|
+
children: [/*#__PURE__*/_jsx(StyledPattern, {
|
|
65
|
+
color: "yellow",
|
|
66
|
+
position: "absolute",
|
|
67
|
+
width: "100vw",
|
|
68
|
+
top: -48,
|
|
69
|
+
left: {
|
|
70
|
+
_: -16,
|
|
71
|
+
xs: -32,
|
|
72
|
+
sm: -64
|
|
73
|
+
},
|
|
74
|
+
height: "calc(50% + 48px)",
|
|
75
|
+
pointerEvents: "none",
|
|
76
|
+
display: {
|
|
77
|
+
md: 'none'
|
|
78
|
+
}
|
|
79
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
80
|
+
...(displayImageBorder ? {
|
|
81
|
+
borderWidth: 1,
|
|
82
|
+
border: 'solid',
|
|
83
|
+
borderColor: 'navy-400',
|
|
84
|
+
borderRadius: 'lg',
|
|
85
|
+
overflow: 'hidden'
|
|
86
|
+
} : undefined),
|
|
87
|
+
children: /*#__PURE__*/_jsx(PausableImage, {
|
|
88
|
+
src: image.src,
|
|
89
|
+
alt: image.alt
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
93
|
+
children: [eyebrow && /*#__PURE__*/_jsx(Box, {
|
|
94
|
+
mb: 8,
|
|
95
|
+
children: eyebrow
|
|
96
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
97
|
+
as: "h2",
|
|
98
|
+
variant: "title-xl",
|
|
99
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
100
|
+
mr: 8,
|
|
101
|
+
display: "inline",
|
|
102
|
+
children: title
|
|
103
|
+
}), titleBadge && /*#__PURE__*/_jsx(StyledBadge, {
|
|
104
|
+
variant: "tertiary",
|
|
105
|
+
fontSize: 14,
|
|
106
|
+
children: titleBadge
|
|
107
|
+
})]
|
|
108
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
109
|
+
mt: 8,
|
|
110
|
+
children: description
|
|
111
|
+
}), cta && /*#__PURE__*/_jsx(StrokeButton, {
|
|
112
|
+
href: cta.href,
|
|
113
|
+
onClick: cta.onClick,
|
|
114
|
+
mt: 16,
|
|
115
|
+
children: cta.label
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Box, FlexBox, GridBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import { CheckFilledIcon, DeleteFilledIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
export const QuizScore = ({
|
|
6
|
+
correctCount,
|
|
7
|
+
layout = 'row',
|
|
8
|
+
smallerFont,
|
|
9
|
+
total,
|
|
10
|
+
numOfRows,
|
|
11
|
+
colorfulIcons,
|
|
12
|
+
percentToPass
|
|
13
|
+
}) => {
|
|
14
|
+
const isRowLayout = layout === 'row';
|
|
15
|
+
const moreThan5Rows = !isRowLayout && numOfRows && numOfRows > 5;
|
|
16
|
+
const quizScore = total < 1 ? 0 : Math.round(correctCount / total * 100);
|
|
17
|
+
const affirmation = quizScore > 70 ? 'Great job!' : 'Practice makes perfect!';
|
|
18
|
+
return /*#__PURE__*/_jsxs(GridBox, {
|
|
19
|
+
gridTemplateColumns: isRowLayout ? {
|
|
20
|
+
_: 'minmax(0,1fr)',
|
|
21
|
+
md: '1fr min-content 1fr'
|
|
22
|
+
} : '',
|
|
23
|
+
gridTemplateRows: isRowLayout ? '' : 'min-content 1fr min-content',
|
|
24
|
+
fontFamily: "accent",
|
|
25
|
+
gap: {
|
|
26
|
+
_: 16,
|
|
27
|
+
sm: 8
|
|
28
|
+
},
|
|
29
|
+
mb: {
|
|
30
|
+
_: !isRowLayout ? 16 : 32,
|
|
31
|
+
sm: 16
|
|
32
|
+
},
|
|
33
|
+
children: [/*#__PURE__*/_jsxs(FlexBox, {
|
|
34
|
+
flexDirection: "column",
|
|
35
|
+
textAlign: "center",
|
|
36
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
37
|
+
fontSize: smallerFont ? 34 : 44,
|
|
38
|
+
children: `${quizScore}%`
|
|
39
|
+
}), percentToPass && quizScore < percentToPass && /*#__PURE__*/_jsx(Text, {
|
|
40
|
+
fontSize: 14,
|
|
41
|
+
children: `Get ${percentToPass}% to pass`
|
|
42
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
children: affirmation
|
|
45
|
+
})]
|
|
46
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
47
|
+
borderRight: 1,
|
|
48
|
+
borderBottom: 1,
|
|
49
|
+
display: {
|
|
50
|
+
_: 'none',
|
|
51
|
+
xs: 'block'
|
|
52
|
+
}
|
|
53
|
+
}), /*#__PURE__*/_jsxs(GridBox, {
|
|
54
|
+
gridTemplateColumns: moreThan5Rows ? 'repeat(2,minmax(0,max-content))' : layout === 'row' ? 'repeat(2,minmax(0,max-content))' : {
|
|
55
|
+
_: 'repeat(2,minmax(0,max-content))',
|
|
56
|
+
xl: '20px 1fr 20px 1fr'
|
|
57
|
+
},
|
|
58
|
+
gridTemplateRows: moreThan5Rows ? '1fr 1fr' : '',
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
columnGap: 16,
|
|
61
|
+
justifyContent: "center",
|
|
62
|
+
display: total === correctCount ? 'flex' : 'grid',
|
|
63
|
+
children: [/*#__PURE__*/_jsx(CheckFilledIcon, {
|
|
64
|
+
color: colorfulIcons ? 'feedback-success' : 'inherit',
|
|
65
|
+
"aria-hidden": true,
|
|
66
|
+
size: 24
|
|
67
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
68
|
+
fontSize: smallerFont ? 16 : 22,
|
|
69
|
+
lineHeight: 2,
|
|
70
|
+
children: `${correctCount} correct`
|
|
71
|
+
}), correctCount < total && /*#__PURE__*/_jsxs(_Fragment, {
|
|
72
|
+
children: [/*#__PURE__*/_jsx(DeleteFilledIcon, {
|
|
73
|
+
color: colorfulIcons ? 'feedback-error' : 'inherit',
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
size: 24
|
|
76
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
77
|
+
fontSize: smallerFont ? 16 : 22,
|
|
78
|
+
lineHeight: 2,
|
|
79
|
+
children: `${total - correctCount} to work on`
|
|
80
|
+
})]
|
|
81
|
+
})]
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
84
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
import { pxRem, theme } from '@codecademy/gamut-styles';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const RatingsBarWrapper = /*#__PURE__*/_styled("div", {
|
|
6
|
+
target: "e150jiwl1",
|
|
7
|
+
label: "RatingsBarWrapper"
|
|
8
|
+
})("border-width:", pxRem(1), ";border-style:solid;border-radius:", pxRem(80), ";background-color:", theme.colors.white, ";height:", pxRem(8), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9SYXRpbmdzQmFyL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQm9DIiwiZmlsZSI6Ii4uLy4uL3NyYy9SYXRpbmdzQmFyL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHB4UmVtLCB0aGVtZSB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgKiBhcyBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmV4cG9ydCB0eXBlIFJhdGluZ3NCYXJQcm9wcyA9IHtcbiAgLyoq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B9XG4gICAgICBhcmlhLWxhYmVsPVwicmF0aW5ncyBiYXJcIlxuICAgICAgYXJpYS1saXZlPVwicG9saXRlXCJcbiAgICA+XG4gICAgICA8QmFyXG4gICAgICAgIGRhdGEtdGVzdGlkPVwicmF0aW5ncy1iYXItYmFyXCJcbiAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICB3aWR0aDogYCR7TWF0aC5tYXgobWluaW11bVBlcmNlbnQsIHBlcmNlbnQpfSVgLFxuICAgICAgICAgIGJveFNoYWRvdzogcGVyY2VudCA+IDAgPyBgJHtweFJlbSgwLjUpfSAwIDAgJHtweFJlbSgwLjUpfWAgOiAnbm9uZScsXG4gICAgICAgIH19XG4gICAgICAvPlxuICAgIDwvUmF0aW5nc0JhcldyYXBwZXI+XG4gICk7XG59O1xuIl19 */"));
|
|
9
|
+
const Bar = /*#__PURE__*/_styled("div", {
|
|
10
|
+
target: "e150jiwl0",
|
|
11
|
+
label: "Bar"
|
|
12
|
+
})("align-items:center;height:100%;display:flex;position:relative;border-radius:inherit;background-color:", theme.colors.yellow, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9SYXRpbmdzQmFyL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3QnNCIiwiZmlsZSI6Ii4uLy4uL3NyYy9SYXRpbmdzQmFyL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHB4UmVtLCB0aGVtZSB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgKiBhcyBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmV4cG9ydCB0eXBlIFJhdGluZ3NCYXJQcm9wcyA9IHtcbiAgLyoqXG4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G4gICAgICBhcmlhLWxhYmVsPVwicmF0aW5ncyBiYXJcIlxuICAgICAgYXJpYS1saXZlPVwicG9saXRlXCJcbiAgICA+XG4gICAgICA8QmFyXG4gICAgICAgIGRhdGEtdGVzdGlkPVwicmF0aW5ncy1iYXItYmFyXCJcbiAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICB3aWR0aDogYCR7TWF0aC5tYXgobWluaW11bVBlcmNlbnQsIHBlcmNlbnQpfSVgLFxuICAgICAgICAgIGJveFNoYWRvdzogcGVyY2VudCA+IDAgPyBgJHtweFJlbSgwLjUpfSAwIDAgJHtweFJlbSgwLjUpfWAgOiAnbm9uZScsXG4gICAgICAgIH19XG4gICAgICAvPlxuICAgIDwvUmF0aW5nc0JhcldyYXBwZXI+XG4gICk7XG59O1xuIl19 */"));
|
|
13
|
+
export const RatingsBar = ({
|
|
14
|
+
minimumPercent = 0,
|
|
15
|
+
percent
|
|
16
|
+
}) => {
|
|
17
|
+
return /*#__PURE__*/_jsx(RatingsBarWrapper, {
|
|
18
|
+
role: "meter",
|
|
19
|
+
"aria-valuenow": percent,
|
|
20
|
+
"aria-valuemin": 0,
|
|
21
|
+
"aria-valuemax": 100,
|
|
22
|
+
"aria-label": "ratings bar",
|
|
23
|
+
"aria-live": "polite",
|
|
24
|
+
children: /*#__PURE__*/_jsx(Bar, {
|
|
25
|
+
"data-testid": "ratings-bar-bar",
|
|
26
|
+
style: {
|
|
27
|
+
width: `${Math.max(minimumPercent, percent)}%`,
|
|
28
|
+
boxShadow: percent > 0 ? `${pxRem(0.5)} 0 0 ${pxRem(0.5)}` : 'none'
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Box, Card, Text } from '@codecademy/gamut';
|
|
2
|
+
import { theme } from '@codecademy/gamut-styles';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export let ResourceType = /*#__PURE__*/function (ResourceType) {
|
|
5
|
+
ResourceType["Article"] = "Article";
|
|
6
|
+
ResourceType["Doc"] = "Doc";
|
|
7
|
+
ResourceType["Blog"] = "Blog Post"; // can be expanded for Cheatsheet, etc...
|
|
8
|
+
return ResourceType;
|
|
9
|
+
}({});
|
|
10
|
+
export const ResourceCard = ({
|
|
11
|
+
title,
|
|
12
|
+
description,
|
|
13
|
+
resourceType,
|
|
14
|
+
headingLevel,
|
|
15
|
+
path,
|
|
16
|
+
...cardProps
|
|
17
|
+
}) => {
|
|
18
|
+
const cardTitle = path ? [resourceType, ...path].join(' / ') : resourceType;
|
|
19
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
20
|
+
variant: "white",
|
|
21
|
+
borderRadius: "md",
|
|
22
|
+
borderColor: "border-primary",
|
|
23
|
+
overflow: "hidden",
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
isInteractive: true,
|
|
27
|
+
p: 0,
|
|
28
|
+
height: "100%",
|
|
29
|
+
...cardProps,
|
|
30
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
31
|
+
px: 12,
|
|
32
|
+
py: 4,
|
|
33
|
+
boxShadow: `inset 0 -1px 0 0 ${theme.colors.navy}`,
|
|
34
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
35
|
+
fontFamily: "accent",
|
|
36
|
+
fontSize: 14,
|
|
37
|
+
children: cardTitle
|
|
38
|
+
})
|
|
39
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
40
|
+
px: 12,
|
|
41
|
+
py: 4,
|
|
42
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
43
|
+
variant: "title-xs",
|
|
44
|
+
as: headingLevel,
|
|
45
|
+
truncate: "ellipsis",
|
|
46
|
+
truncateLines: 2,
|
|
47
|
+
pt: 12,
|
|
48
|
+
pb: 4,
|
|
49
|
+
children: title
|
|
50
|
+
}), description && (typeof description === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
51
|
+
variant: "p-small",
|
|
52
|
+
truncate: "ellipsis",
|
|
53
|
+
truncateLines: 2,
|
|
54
|
+
mb: 16,
|
|
55
|
+
children: description
|
|
56
|
+
}) : description)]
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { Anchor, FlexBox, GridBox, Markdown, Text } from '@codecademy/gamut';
|
|
2
|
+
import { CheckFilledIcon, DeleteFilledIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { pxRem } from '@codecademy/gamut-styles';
|
|
4
|
+
import { createResumeUrlPath } from './helpers';
|
|
5
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const SHOW_REVIEW_SCORE = 0.6;
|
|
7
|
+
const PASSING_SCORE = 0.7;
|
|
8
|
+
export const renderSubScores = ({
|
|
9
|
+
isChallenge,
|
|
10
|
+
subScores,
|
|
11
|
+
pathSlug,
|
|
12
|
+
trackSlug,
|
|
13
|
+
trackingData,
|
|
14
|
+
trackUserClick,
|
|
15
|
+
colorfulIcons
|
|
16
|
+
}) => Object.entries(subScores).map(([subContentId, {
|
|
17
|
+
title: subContentTitle,
|
|
18
|
+
correct: subContentCorrect,
|
|
19
|
+
total: subContentTotal,
|
|
20
|
+
slug: subContentSlug
|
|
21
|
+
}], i) => {
|
|
22
|
+
const subContentPercentCorrect = subContentCorrect / subContentTotal;
|
|
23
|
+
const reviewConceptsPath = createResumeUrlPath({
|
|
24
|
+
pathSlug,
|
|
25
|
+
trackSlug,
|
|
26
|
+
moduleSlug: subContentSlug
|
|
27
|
+
});
|
|
28
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
29
|
+
borderTop: i !== 0 ? 1 : 'none',
|
|
30
|
+
px: 16,
|
|
31
|
+
py: 8,
|
|
32
|
+
justifyContent: "space-between",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
role: "listitem",
|
|
35
|
+
children: [/*#__PURE__*/_jsxs(FlexBox, {
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
children: [colorfulIcons ? subContentPercentCorrect >= PASSING_SCORE ? /*#__PURE__*/_jsx(CheckFilledIcon, {
|
|
38
|
+
minWidth: 16,
|
|
39
|
+
mr: 12,
|
|
40
|
+
color: "feedback-success"
|
|
41
|
+
}) : /*#__PURE__*/_jsx(DeleteFilledIcon, {
|
|
42
|
+
minWidth: 16,
|
|
43
|
+
mr: 12,
|
|
44
|
+
color: "feedback-error"
|
|
45
|
+
}) : null, /*#__PURE__*/_jsxs(_Fragment, {
|
|
46
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
47
|
+
screenreader: true,
|
|
48
|
+
children: colorfulIcons ? `${subContentPercentCorrect >= PASSING_SCORE ? 'passed' : 'failed'}: ` : ''
|
|
49
|
+
}), isChallenge ? /*#__PURE__*/_jsx(Markdown, {
|
|
50
|
+
inline: true,
|
|
51
|
+
spacing: "none",
|
|
52
|
+
text: subContentTitle
|
|
53
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
54
|
+
fontWeight: "bold",
|
|
55
|
+
children: subContentTitle
|
|
56
|
+
})]
|
|
57
|
+
})]
|
|
58
|
+
}), /*#__PURE__*/_jsxs(FlexBox, {
|
|
59
|
+
fontSize: 14,
|
|
60
|
+
minWidth: subContentPercentCorrect < SHOW_REVIEW_SCORE && trackSlug ? '11rem' : '3rem',
|
|
61
|
+
justifyContent: "flex-end",
|
|
62
|
+
children: [subContentPercentCorrect < SHOW_REVIEW_SCORE && trackSlug && /*#__PURE__*/_jsxs(_Fragment, {
|
|
63
|
+
children: [/*#__PURE__*/_jsx(Anchor, {
|
|
64
|
+
"aria-label": `Review concepts for ${subContentTitle}`,
|
|
65
|
+
mr: 16,
|
|
66
|
+
href: reviewConceptsPath,
|
|
67
|
+
onClick: () => trackingData && trackUserClick?.({
|
|
68
|
+
...trackingData,
|
|
69
|
+
course_progress: parseFloat(subContentPercentCorrect.toFixed(4)),
|
|
70
|
+
href: reviewConceptsPath,
|
|
71
|
+
module_id: subContentId
|
|
72
|
+
}),
|
|
73
|
+
children: "Review Concepts"
|
|
74
|
+
}), ' ']
|
|
75
|
+
}), !isChallenge && /*#__PURE__*/_jsx(Text, {
|
|
76
|
+
"aria-label": `${subContentCorrect} out of ${subContentTotal} questions correct`,
|
|
77
|
+
children: `${subContentCorrect} / ${subContentTotal}`
|
|
78
|
+
})]
|
|
79
|
+
})]
|
|
80
|
+
}, subContentId);
|
|
81
|
+
});
|
|
82
|
+
const renderUntestedSubContent = ({
|
|
83
|
+
untestedSubContent,
|
|
84
|
+
lighterBorderColor
|
|
85
|
+
}) => /*#__PURE__*/_jsx(FlexBox, {
|
|
86
|
+
flexDirection: "column",
|
|
87
|
+
borderWidth: 1,
|
|
88
|
+
borderWidthTop: 0,
|
|
89
|
+
borderStyle: "solid",
|
|
90
|
+
borderColor: lighterBorderColor,
|
|
91
|
+
children: untestedSubContent.map(({
|
|
92
|
+
id,
|
|
93
|
+
title
|
|
94
|
+
}, i) => {
|
|
95
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderWidthTop: i === 0 ? 0 : 1,
|
|
98
|
+
borderStyle: "solid",
|
|
99
|
+
borderColor: lighterBorderColor,
|
|
100
|
+
px: 16,
|
|
101
|
+
py: 8,
|
|
102
|
+
justifyContent: "space-between",
|
|
103
|
+
color: lighterBorderColor,
|
|
104
|
+
role: "listitem",
|
|
105
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
106
|
+
flexGrow: 1,
|
|
107
|
+
children: title
|
|
108
|
+
}), /*#__PURE__*/_jsx(FlexBox, {
|
|
109
|
+
fontSize: 14,
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
minWidth: "6.5rem",
|
|
112
|
+
justifyContent: "flex-end",
|
|
113
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
114
|
+
fontFamily: "accent",
|
|
115
|
+
children: "Not tested"
|
|
116
|
+
})
|
|
117
|
+
})]
|
|
118
|
+
}, id);
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
export const SubScores = ({
|
|
122
|
+
colorfulIcons = false,
|
|
123
|
+
isChallenge = false,
|
|
124
|
+
layout = 'row',
|
|
125
|
+
lighterBorderColor = 'navy-400',
|
|
126
|
+
noMaxWidth = false,
|
|
127
|
+
pathSlug,
|
|
128
|
+
showUntestedContent = false,
|
|
129
|
+
subScores,
|
|
130
|
+
trackSlug,
|
|
131
|
+
trackingData,
|
|
132
|
+
trackUserClick,
|
|
133
|
+
untestedSubContent
|
|
134
|
+
}) => {
|
|
135
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
136
|
+
flexDirection: "column",
|
|
137
|
+
maxWidth: noMaxWidth ? '' : pxRem(705),
|
|
138
|
+
role: "list",
|
|
139
|
+
"aria-label": "Unit Subjects",
|
|
140
|
+
children: [/*#__PURE__*/_jsx(FlexBox, {
|
|
141
|
+
flexDirection: "column",
|
|
142
|
+
borderX: 1,
|
|
143
|
+
borderBottom: 1,
|
|
144
|
+
borderTop: isChallenge ? 1 : layout === 'row' ? {
|
|
145
|
+
_: undefined,
|
|
146
|
+
md: 1
|
|
147
|
+
} : undefined,
|
|
148
|
+
children: renderSubScores({
|
|
149
|
+
colorfulIcons,
|
|
150
|
+
isChallenge,
|
|
151
|
+
pathSlug,
|
|
152
|
+
subScores,
|
|
153
|
+
trackSlug,
|
|
154
|
+
trackingData,
|
|
155
|
+
trackUserClick
|
|
156
|
+
})
|
|
157
|
+
}), showUntestedContent && /*#__PURE__*/_jsx(GridBox, {
|
|
158
|
+
bg: "transparent",
|
|
159
|
+
children: untestedSubContent && untestedSubContent?.length > 0 && renderUntestedSubContent({
|
|
160
|
+
untestedSubContent,
|
|
161
|
+
lighterBorderColor
|
|
162
|
+
})
|
|
163
|
+
})]
|
|
164
|
+
});
|
|
165
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import pluralize from 'pluralize';
|
|
2
|
+
export const getContentItemTypeRoutePart = type => {
|
|
3
|
+
return type ? pluralize(type, 2) : '';
|
|
4
|
+
};
|
|
5
|
+
export const createResumeUrlPath = ({
|
|
6
|
+
journeySlug,
|
|
7
|
+
pathSlug,
|
|
8
|
+
trackSlug,
|
|
9
|
+
moduleSlug,
|
|
10
|
+
contentItemType,
|
|
11
|
+
contentItemSlug
|
|
12
|
+
}) => {
|
|
13
|
+
const contentItemTypeRoute = getContentItemTypeRoutePart(contentItemType);
|
|
14
|
+
const journeyUrl = journeySlug ? `/journeys/${journeySlug}` : '';
|
|
15
|
+
if (pathSlug && trackSlug && moduleSlug && contentItemType && contentItemTypeRoute && contentItemSlug) return `${journeyUrl}/paths/${pathSlug}/tracks/${trackSlug}/modules/${moduleSlug}/${contentItemTypeRoute}/${contentItemSlug}`;
|
|
16
|
+
if (pathSlug && trackSlug && moduleSlug) return `${journeyUrl}/paths/${pathSlug}/tracks/${trackSlug}/modules/${moduleSlug}`;
|
|
17
|
+
if (pathSlug && trackSlug) return `${journeyUrl}/paths/${pathSlug}/tracks/${trackSlug}`;
|
|
18
|
+
if (pathSlug) return `${journeyUrl}/paths/${pathSlug}`;
|
|
19
|
+
return journeyUrl;
|
|
20
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Box, GridBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import { pxRem } from '@codecademy/gamut-styles';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { QuizScore } from '../QuizScore';
|
|
5
|
+
import { SubScores } from './SubScores';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const ScoreSummary = ({
|
|
8
|
+
subScores,
|
|
9
|
+
totalCorrect,
|
|
10
|
+
totalQuestions,
|
|
11
|
+
pathSlug,
|
|
12
|
+
trackSlug,
|
|
13
|
+
trackingData,
|
|
14
|
+
untestedSubContent,
|
|
15
|
+
lighterBorderColor = 'navy-400',
|
|
16
|
+
layout = 'row',
|
|
17
|
+
trackUserClick,
|
|
18
|
+
description,
|
|
19
|
+
noMaxWidth = false,
|
|
20
|
+
colorfulIcons = false,
|
|
21
|
+
percentToPass
|
|
22
|
+
}) => {
|
|
23
|
+
let numOfRows = Object.entries(subScores).length;
|
|
24
|
+
if (untestedSubContent) {
|
|
25
|
+
numOfRows += untestedSubContent.length;
|
|
26
|
+
}
|
|
27
|
+
const isRowLayout = layout === 'row';
|
|
28
|
+
return /*#__PURE__*/_jsxs(GridBox, {
|
|
29
|
+
gridTemplateColumns: isRowLayout ? {
|
|
30
|
+
_: 'minmax(0, 1fr)',
|
|
31
|
+
md: '2fr 3fr'
|
|
32
|
+
} : '',
|
|
33
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
34
|
+
zIndex: 1,
|
|
35
|
+
bg: "transparent",
|
|
36
|
+
display: "inline",
|
|
37
|
+
maxWidth: noMaxWidth ? '' : isRowLayout ? {
|
|
38
|
+
_: pxRem(705),
|
|
39
|
+
md: pxRem(500)
|
|
40
|
+
} : pxRem(705),
|
|
41
|
+
mr: isRowLayout ? {
|
|
42
|
+
_: 0,
|
|
43
|
+
md: 24
|
|
44
|
+
} : 0,
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
46
|
+
px: {
|
|
47
|
+
_: 24,
|
|
48
|
+
xs: 32
|
|
49
|
+
},
|
|
50
|
+
pt: 24,
|
|
51
|
+
pb: 8,
|
|
52
|
+
display: isRowLayout ? {
|
|
53
|
+
_: 'flex',
|
|
54
|
+
md: 'block'
|
|
55
|
+
} : 'flex',
|
|
56
|
+
flexDirection: isRowLayout ? {
|
|
57
|
+
_: 'column',
|
|
58
|
+
md: 'row'
|
|
59
|
+
} : 'column',
|
|
60
|
+
justifyContent: isRowLayout ? {
|
|
61
|
+
_: 'center',
|
|
62
|
+
md: ''
|
|
63
|
+
} : 'center',
|
|
64
|
+
border: 1,
|
|
65
|
+
children: /*#__PURE__*/_jsx(QuizScore, {
|
|
66
|
+
correctCount: totalCorrect,
|
|
67
|
+
layout: isRowLayout ? 'column' : 'row',
|
|
68
|
+
total: totalQuestions,
|
|
69
|
+
smallerFont: true,
|
|
70
|
+
numOfRows: numOfRows,
|
|
71
|
+
colorfulIcons: colorfulIcons,
|
|
72
|
+
percentToPass: percentToPass
|
|
73
|
+
})
|
|
74
|
+
}), description && /*#__PURE__*/_jsx(Box, {
|
|
75
|
+
p: 16,
|
|
76
|
+
pb: isRowLayout ? {
|
|
77
|
+
_: 16,
|
|
78
|
+
md: 0
|
|
79
|
+
} : 16,
|
|
80
|
+
border: isRowLayout ? {
|
|
81
|
+
_: 1,
|
|
82
|
+
md: 'none'
|
|
83
|
+
} : 1,
|
|
84
|
+
borderTop: "none",
|
|
85
|
+
textAlign: isRowLayout ? {
|
|
86
|
+
_: 'left',
|
|
87
|
+
md: 'center'
|
|
88
|
+
} : 'left',
|
|
89
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
90
|
+
fontSize: 14,
|
|
91
|
+
children: description
|
|
92
|
+
})
|
|
93
|
+
})]
|
|
94
|
+
}), /*#__PURE__*/_jsx(SubScores, {
|
|
95
|
+
colorfulIcons: colorfulIcons,
|
|
96
|
+
layout: layout,
|
|
97
|
+
lighterBorderColor: lighterBorderColor,
|
|
98
|
+
noMaxWidth: noMaxWidth,
|
|
99
|
+
pathSlug: pathSlug,
|
|
100
|
+
subScores: subScores,
|
|
101
|
+
trackSlug: trackSlug,
|
|
102
|
+
trackingData: trackingData,
|
|
103
|
+
trackUserClick: trackUserClick,
|
|
104
|
+
untestedSubContent: untestedSubContent,
|
|
105
|
+
showUntestedContent: true
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|