@codecademy/brand 1.0.0-alpha.f0787e883d.0 → 1.0.1-alpha.7fe5ab08e4.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/AbbreviatedCommunityEventCard/index.js +1 -2
- package/dist/AppBar/AppBarSection.js +1 -1
- package/dist/AppBarDeprecated/styles/index.module.scss +2 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.ts +0 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js +2 -4
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +14 -14
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.js +6 -6
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.d.ts +0 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +15 -12
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js +2 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +5 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +20 -3
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +30 -19
- package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesSection/index.js +2 -2
- package/dist/AppHeader/Search/DefaultResults.js +1 -2
- package/dist/AppHeader/Search/QuizAndHelpCenterLinks.d.ts +0 -1
- package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js +11 -9
- package/dist/AppHeader/Search/SearchButton.js +1 -3
- package/dist/AppHeader/Search/SearchPane.d.ts +1 -3
- package/dist/AppHeader/Search/SearchPane.js +76 -70
- package/dist/AppHeader/Search/SearchWorker/PromiseLookup.d.ts +18 -0
- package/dist/AppHeader/Search/SearchWorker/PromiseLookup.js +35 -0
- package/dist/AppHeader/Search/SearchWorker/index.d.ts +4 -34
- package/dist/AppHeader/Search/SearchWorker/index.js +22 -73
- package/dist/AppHeader/Search/SearchWorker/src.d.ts +1 -2
- package/dist/AppHeader/Search/SearchWorker/src.js +253 -199
- package/dist/AppHeader/Search/SearchWorker/types.d.ts +32 -0
- package/dist/AppHeader/Search/SearchWorker/types.js +5 -0
- package/dist/AppHeader/Search/SearchWorker/worker.d.ts +2 -0
- package/dist/AppHeader/Search/SearchWorker/worker.js +32 -0
- package/dist/AppHeader/Search/useHeaderSearch.d.ts +1 -3
- package/dist/AppHeader/Search/useHeaderSearch.js +2 -4
- package/dist/AppHeader/index.d.ts +1 -2
- package/dist/AppHeader/index.js +12 -16
- package/dist/AppHeader/shared/elements.d.ts +10 -272
- package/dist/AppHeader/shared/elements.js +9 -8
- package/dist/AppHeader/shared/types.d.ts +10 -2
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +45 -40
- package/dist/AppHeaderMobile/index.d.ts +0 -1
- package/dist/AppHeaderMobile/index.js +36 -19
- package/dist/Avatar/index.js +2 -3
- package/dist/AvatarChooser/index.js +2 -4
- package/dist/Carousel/elements.d.ts +4 -4
- package/dist/Carousel/index.js +7 -6
- package/dist/CertificationPathCard/__tests__/__fixtures__/index.d.ts +2 -0
- package/dist/CertificationPathCard/index.d.ts +18 -0
- package/dist/CertificationPathCard/index.js +39 -0
- package/dist/CommunityEventCard/index.js +1 -2
- package/dist/ContentGroupBaseCard/index.d.ts +5 -0
- package/dist/ContentGroupBaseCard/index.js +14 -5
- package/dist/DropdownButton/DropdownList.js +1 -1
- package/dist/DropdownButton/index.d.ts +312 -1
- package/dist/DropdownButton/index.js +9 -6
- package/dist/EmptySection/index.d.ts +1 -1
- package/dist/EmptySection/index.js +31 -10
- package/dist/GlobalFooter/FooterHeading.d.ts +2 -2
- package/dist/GlobalFooter/FooterHeading.js +5 -3
- package/dist/GlobalFooter/FooterLegal/LegalLinks.js +1 -2
- package/dist/GlobalFooter/FooterLegal/MadeIn.js +1 -2
- package/dist/GlobalFooter/FooterLinks.d.ts +1 -1
- package/dist/GlobalFooter/FooterLinks.js +4 -5
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +10 -10
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.d.ts +0 -1
- package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js +11 -20
- package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js +3 -6
- package/dist/GlobalFooter/FooterSubHeading.d.ts +2 -2
- package/dist/GlobalFooter/FooterSubHeading.js +4 -3
- package/dist/GlobalHeader/GlobalHeaderItems.d.ts +2 -3
- package/dist/GlobalHeader/GlobalHeaderItems.js +3 -10
- package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +4 -4
- package/dist/GlobalHeader/GlobalHeaderVariants.js +11 -11
- package/dist/GlobalHeader/index.d.ts +4 -2
- package/dist/GlobalHeader/index.js +45 -48
- package/dist/GlobalHeader/types.d.ts +1 -5
- package/dist/GlobalPage/index.d.ts +1 -1
- package/dist/Grid/GridCollapse.js +6 -8
- package/dist/HorizontalScrollMenu/index.js +2 -4
- package/dist/LandingPage/Feature.js +1 -2
- package/dist/LayoutMenuVariant/AccordionMenu.d.ts +2 -0
- package/dist/LayoutMenuVariant/AccordionMenu.js +3 -4
- package/dist/LayoutMenuVariant/LayoutMenuSection.js +2 -2
- package/dist/LayoutMenuVariant/SectionItemLink.d.ts +2 -1
- package/dist/LayoutMenuVariant/SectionItemLink.js +2 -1
- package/dist/ListSection/index.js +1 -2
- package/dist/Loading/styles.module.scss +1 -1
- package/dist/LoadingCurriculumCard/index.js +1 -1
- package/dist/Logo/index.js +1 -0
- package/dist/LogoFromSkillsoft/index.js +1 -1
- package/dist/MarketingToaster/index.js +2 -4
- package/dist/NotificationList/NotificationItem.js +3 -3
- package/dist/Notifications/elements.d.ts +2 -2
- package/dist/PageAlerts/PageAlerts.js +2 -4
- package/dist/PausableImage/BaseImage/index.js +1 -2
- package/dist/PausableImage/index.js +1 -2
- package/dist/PlanCard/PricingAmount.d.ts +1 -1
- package/dist/PlanCard/PricingAmount.js +4 -4
- package/dist/PlanCard/consts.js +1 -1
- package/dist/PlanCard/index.d.ts +1 -2
- package/dist/PlanCard/index.js +14 -26
- package/dist/PlanCardTeams/index.js +1 -2
- package/dist/PricingSection/PlanFeature.js +2 -4
- package/dist/PricingSection/PricingCard/index.js +1 -2
- package/dist/ProLabel/index.d.ts +1 -1
- package/dist/ProLabel/index.js +1 -1
- package/dist/ProductFeatureShowcase/index.js +1 -2
- package/dist/ResourceCard/index.d.ts +4 -3
- package/dist/ResourceCard/index.js +5 -2
- package/dist/ScoreSummary/types.d.ts +0 -12
- package/dist/SocialMediaSharing/SocialShareIconLink.js +2 -2
- package/dist/SocialMediaSharingDropdown/index.d.ts +4 -1
- package/dist/SocialMediaSharingDropdown/index.js +11 -2
- package/dist/Testimonial/index.d.ts +1 -1
- package/dist/Testimonial/index.js +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/catalogList/index.js +2 -9
- package/dist/stories/Atoms/Subgrid.stories.js +1 -1
- package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.d.ts +9 -0
- package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.js +65 -0
- package/dist/stories/Organisms/GlobalFooter.stories.d.ts +0 -1
- package/dist/stories/Organisms/GlobalFooter.stories.js +0 -7
- package/dist/stories/Organisms/GlobalHeader/About.stories.js +8 -8
- package/dist/stories/Organisms/GlobalPage.stories.js +4 -4
- package/dist/stories/Organisms/PlanCard.stories.js +2 -3
- package/package.json +5 -6
- package/dist/StudyPlan/ContentItemDetail.d.ts +0 -10
- package/dist/StudyPlan/ContentItemDetail.js +0 -114
- package/dist/StudyPlan/CreateStudyPlanSectionContent.d.ts +0 -14
- package/dist/StudyPlan/CreateStudyPlanSectionContent.js +0 -90
- package/dist/StudyPlan/ShowMoreContentItemsButton.d.ts +0 -9
- package/dist/StudyPlan/ShowMoreContentItemsButton.js +0 -44
- package/dist/StudyPlan/StudyPlanDeleteDialog.d.ts +0 -6
- package/dist/StudyPlan/StudyPlanDeleteDialog.js +0 -26
- package/dist/StudyPlan/StudyPlanDescription.d.ts +0 -10
- package/dist/StudyPlan/StudyPlanDescription.js +0 -50
- package/dist/StudyPlan/StudyPlanModal/StudyPlanForm.d.ts +0 -10
- package/dist/StudyPlan/StudyPlanModal/StudyPlanForm.js +0 -138
- package/dist/StudyPlan/StudyPlanModal/StudyPlanModalFooter.d.ts +0 -14
- package/dist/StudyPlan/StudyPlanModal/StudyPlanModalFooter.js +0 -64
- package/dist/StudyPlan/StudyPlanModal/index.d.ts +0 -18
- package/dist/StudyPlan/StudyPlanModal/index.js +0 -120
- package/dist/StudyPlan/SuggestedContentItemsSectionHeader.d.ts +0 -8
- package/dist/StudyPlan/SuggestedContentItemsSectionHeader.js +0 -58
- package/dist/StudyPlan/assets/studyPlanBanner.svg +0 -9
- package/dist/StudyPlan/helpers.d.ts +0 -75
- package/dist/StudyPlan/helpers.js +0 -165
- package/dist/StudyPlan/index.d.ts +0 -8
- package/dist/StudyPlan/index.js +0 -8
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StudyPlanInputValues } from '../helpers';
|
|
3
|
-
interface StudyPlanModalFooterProps {
|
|
4
|
-
hasStudyPlanFormInputErrors?: boolean;
|
|
5
|
-
handleDeleteStudyPlanClick: () => void;
|
|
6
|
-
isEditModal?: boolean;
|
|
7
|
-
isSaveLoading: boolean;
|
|
8
|
-
onCreateStudyPlanSave: () => void;
|
|
9
|
-
onRequestClose: () => void;
|
|
10
|
-
studyPlanInputValues: StudyPlanInputValues;
|
|
11
|
-
targetTimeFrameInWeeks: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const StudyPlanModalFooter: React.FC<StudyPlanModalFooterProps>;
|
|
14
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { FillButton, FlexBox, StrokeButton, Text, TextButton } from '@codecademy/gamut';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { formatStudyPlanSummaryText, formatTargetTimeFrameText } from '../helpers';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export const StudyPlanModalFooter = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
hasStudyPlanFormInputErrors,
|
|
8
|
-
handleDeleteStudyPlanClick,
|
|
9
|
-
isEditModal,
|
|
10
|
-
isSaveLoading,
|
|
11
|
-
onCreateStudyPlanSave,
|
|
12
|
-
onRequestClose,
|
|
13
|
-
studyPlanInputValues,
|
|
14
|
-
targetTimeFrameInWeeks
|
|
15
|
-
} = _ref;
|
|
16
|
-
const {
|
|
17
|
-
sessionsPerWeek,
|
|
18
|
-
sessionLength
|
|
19
|
-
} = studyPlanInputValues;
|
|
20
|
-
const primaryCtaText = isEditModal ? 'Update study plan' : 'Make study plan';
|
|
21
|
-
const targetTimeFrameText = formatTargetTimeFrameText(targetTimeFrameInWeeks);
|
|
22
|
-
const targetStudyPlanSummaryTime = formatStudyPlanSummaryText(sessionLength, sessionsPerWeek, targetTimeFrameText);
|
|
23
|
-
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
24
|
-
column: true,
|
|
25
|
-
mt: 24,
|
|
26
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
27
|
-
mb: 16,
|
|
28
|
-
children: targetStudyPlanSummaryTime
|
|
29
|
-
}), /*#__PURE__*/_jsxs(FlexBox, {
|
|
30
|
-
justifyContent: {
|
|
31
|
-
_: 'flex-start',
|
|
32
|
-
xs: isEditModal ? 'space-between' : 'flex-end'
|
|
33
|
-
},
|
|
34
|
-
flexDirection: {
|
|
35
|
-
_: 'column',
|
|
36
|
-
xs: 'row'
|
|
37
|
-
},
|
|
38
|
-
gap: 8,
|
|
39
|
-
mt: 12,
|
|
40
|
-
children: [isEditModal && /*#__PURE__*/_jsx(FlexBox, {
|
|
41
|
-
children: /*#__PURE__*/_jsx(StrokeButton, {
|
|
42
|
-
variant: "danger",
|
|
43
|
-
onClick: handleDeleteStudyPlanClick,
|
|
44
|
-
children: "Delete"
|
|
45
|
-
})
|
|
46
|
-
}), /*#__PURE__*/_jsxs(FlexBox, {
|
|
47
|
-
children: [!isEditModal && /*#__PURE__*/_jsx(TextButton, {
|
|
48
|
-
"data-testid": "secondary-modal-cta",
|
|
49
|
-
onClick: onRequestClose,
|
|
50
|
-
mr: 12,
|
|
51
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
52
|
-
color: "black",
|
|
53
|
-
children: "Cancel"
|
|
54
|
-
})
|
|
55
|
-
}), /*#__PURE__*/_jsx(FillButton, {
|
|
56
|
-
disabled: hasStudyPlanFormInputErrors || isSaveLoading,
|
|
57
|
-
onClick: onCreateStudyPlanSave,
|
|
58
|
-
"data-testid": "primary-modal-cta",
|
|
59
|
-
children: primaryCtaText
|
|
60
|
-
})]
|
|
61
|
-
})]
|
|
62
|
-
})]
|
|
63
|
-
});
|
|
64
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StudyPlanInputValues } from '../helpers';
|
|
3
|
-
interface StudyPlanModalProps {
|
|
4
|
-
containerTimeToComplete?: number | null;
|
|
5
|
-
containerPercentComplete?: number | null;
|
|
6
|
-
containerTitle?: string | null;
|
|
7
|
-
containerType?: string;
|
|
8
|
-
handleDeleteStudyPlanClick: () => void;
|
|
9
|
-
isEditModal?: boolean;
|
|
10
|
-
isOpen: boolean;
|
|
11
|
-
isSaveLoading: boolean;
|
|
12
|
-
onCreateStudyPlanSave: () => void;
|
|
13
|
-
onRequestClose: () => void;
|
|
14
|
-
setStudyPlanInputValues: React.Dispatch<React.SetStateAction<StudyPlanInputValues>>;
|
|
15
|
-
studyPlanInputValues: StudyPlanInputValues;
|
|
16
|
-
}
|
|
17
|
-
export declare const StudyPlanModal: React.FC<StudyPlanModalProps>;
|
|
18
|
-
export {};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Box, FlexBox, Modal, Text } from '@codecademy/gamut';
|
|
2
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import formImage from '../assets/studyPlanBanner.svg';
|
|
4
|
-
import { calculateTargetTimeFrame, calculateTimeLeftToComplete, formatContainerTimeToCompleteText, formatContainerType, formatFormErrorMessage, validateStudyPlanFormInput } from '../helpers';
|
|
5
|
-
import { StudyPlanForm } from './StudyPlanForm';
|
|
6
|
-
import { StudyPlanModalFooter } from './StudyPlanModalFooter';
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
export const StudyPlanModal = _ref => {
|
|
9
|
-
let {
|
|
10
|
-
containerTimeToComplete,
|
|
11
|
-
containerPercentComplete,
|
|
12
|
-
containerTitle,
|
|
13
|
-
containerType = 'Course',
|
|
14
|
-
handleDeleteStudyPlanClick,
|
|
15
|
-
isEditModal,
|
|
16
|
-
isOpen,
|
|
17
|
-
isSaveLoading,
|
|
18
|
-
onCreateStudyPlanSave,
|
|
19
|
-
onRequestClose,
|
|
20
|
-
setStudyPlanInputValues,
|
|
21
|
-
studyPlanInputValues
|
|
22
|
-
} = _ref;
|
|
23
|
-
const [studyPlanInputError, setStudyPlanInputError] = useState({
|
|
24
|
-
sessionLength: undefined,
|
|
25
|
-
sessionsPerWeek: undefined
|
|
26
|
-
});
|
|
27
|
-
const hasStudyPlanFormInputErrors = !!studyPlanInputError.sessionLength || !!studyPlanInputError.sessionsPerWeek;
|
|
28
|
-
const handleStudyPlanFormInputChange = e => {
|
|
29
|
-
const {
|
|
30
|
-
name,
|
|
31
|
-
value
|
|
32
|
-
} = e.target;
|
|
33
|
-
const {
|
|
34
|
-
isValidFormInputValue
|
|
35
|
-
} = validateStudyPlanFormInput(name, value);
|
|
36
|
-
const errorMessage = formatFormErrorMessage(name, value);
|
|
37
|
-
if (!isValidFormInputValue) {
|
|
38
|
-
return setStudyPlanInputError(prev => ({
|
|
39
|
-
...prev,
|
|
40
|
-
[name]: errorMessage
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
setStudyPlanInputError(prev => ({
|
|
44
|
-
...prev,
|
|
45
|
-
[name]: undefined
|
|
46
|
-
}));
|
|
47
|
-
setStudyPlanInputValues(prev => ({
|
|
48
|
-
...prev,
|
|
49
|
-
[name]: Number(value)
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
52
|
-
const timeLeftToCompleteContainer = calculateTimeLeftToComplete(containerTimeToComplete, containerPercentComplete);
|
|
53
|
-
const containerTimeToCompleteText = formatContainerTimeToCompleteText(timeLeftToCompleteContainer, containerTitle);
|
|
54
|
-
const targetTimeFrameInWeeks = useMemo(() => {
|
|
55
|
-
return calculateTargetTimeFrame(studyPlanInputValues.sessionsPerWeek, studyPlanInputValues.sessionLength, containerPercentComplete, containerTimeToComplete);
|
|
56
|
-
}, [containerPercentComplete, containerTimeToComplete, studyPlanInputValues.sessionLength, studyPlanInputValues.sessionsPerWeek]);
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
setStudyPlanInputValues(prev => ({
|
|
59
|
-
...prev,
|
|
60
|
-
targetTimeFrame: targetTimeFrameInWeeks * 7 // save to db as days,
|
|
61
|
-
}));
|
|
62
|
-
}, [targetTimeFrameInWeeks, setStudyPlanInputValues]);
|
|
63
|
-
const modalTitleText = `${formatContainerType(containerType)} study plan`;
|
|
64
|
-
const modalTitle = /*#__PURE__*/_jsx(Box, {
|
|
65
|
-
pb: 12,
|
|
66
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
67
|
-
children: modalTitleText
|
|
68
|
-
})
|
|
69
|
-
});
|
|
70
|
-
return /*#__PURE__*/_jsx(Modal, {
|
|
71
|
-
isOpen: isOpen,
|
|
72
|
-
onRequestClose: onRequestClose,
|
|
73
|
-
title: modalTitle,
|
|
74
|
-
size: "small",
|
|
75
|
-
children: /*#__PURE__*/_jsxs(FlexBox, {
|
|
76
|
-
height: "100%",
|
|
77
|
-
"data-testid": "study-plan-modal",
|
|
78
|
-
column: true,
|
|
79
|
-
p: 0,
|
|
80
|
-
mb: 4,
|
|
81
|
-
children: [/*#__PURE__*/_jsx(FlexBox, {
|
|
82
|
-
maxHeight: 94,
|
|
83
|
-
center: true,
|
|
84
|
-
width: "100%",
|
|
85
|
-
mb: 12,
|
|
86
|
-
children: /*#__PURE__*/_jsx(Box, {
|
|
87
|
-
width: "100%",
|
|
88
|
-
height: 94,
|
|
89
|
-
minWidth: "calc(100% + 48px)",
|
|
90
|
-
position: "relative",
|
|
91
|
-
backgroundImage: `url(${formImage})`
|
|
92
|
-
})
|
|
93
|
-
}), /*#__PURE__*/_jsxs(FlexBox, {
|
|
94
|
-
overflowY: "auto",
|
|
95
|
-
overflowX: "hidden",
|
|
96
|
-
height: "100%",
|
|
97
|
-
column: true,
|
|
98
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
99
|
-
mb: 24,
|
|
100
|
-
mt: 16,
|
|
101
|
-
children: containerTimeToCompleteText
|
|
102
|
-
}), /*#__PURE__*/_jsx(StudyPlanForm, {
|
|
103
|
-
handleInputChange: handleStudyPlanFormInputChange,
|
|
104
|
-
studyPlanInputErrorMessage: studyPlanInputError,
|
|
105
|
-
studyPlanInputValues: studyPlanInputValues,
|
|
106
|
-
targetTimeFrameInWeeks: targetTimeFrameInWeeks
|
|
107
|
-
}), /*#__PURE__*/_jsx(StudyPlanModalFooter, {
|
|
108
|
-
hasStudyPlanFormInputErrors: hasStudyPlanFormInputErrors,
|
|
109
|
-
handleDeleteStudyPlanClick: handleDeleteStudyPlanClick,
|
|
110
|
-
isEditModal: isEditModal,
|
|
111
|
-
isSaveLoading: isSaveLoading,
|
|
112
|
-
onCreateStudyPlanSave: onCreateStudyPlanSave,
|
|
113
|
-
onRequestClose: onRequestClose,
|
|
114
|
-
studyPlanInputValues: studyPlanInputValues,
|
|
115
|
-
targetTimeFrameInWeeks: targetTimeFrameInWeeks
|
|
116
|
-
})]
|
|
117
|
-
})]
|
|
118
|
-
})
|
|
119
|
-
});
|
|
120
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface SuggestedContentItemsSectionHeaderProps {
|
|
3
|
-
title: string;
|
|
4
|
-
totalSuggestedContentItemsProgress?: number;
|
|
5
|
-
isEnrolledSyllabus?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const SuggestedContentItemsSectionHeader: React.FC<SuggestedContentItemsSectionHeaderProps>;
|
|
8
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Box, FlexBox, RadialProgress, Text } from '@codecademy/gamut';
|
|
2
|
-
import { CheckIcon } from '@codecademy/gamut-icons';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export const SuggestedContentItemsSectionHeader = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
title,
|
|
8
|
-
totalSuggestedContentItemsProgress,
|
|
9
|
-
isEnrolledSyllabus
|
|
10
|
-
} = _ref;
|
|
11
|
-
const totalProgressAriaLabel = `Study plan suggested content progress is ${totalSuggestedContentItemsProgress}%`;
|
|
12
|
-
const isTotalProgressCompleted = totalSuggestedContentItemsProgress === 100;
|
|
13
|
-
const shouldShowTotalProgress = totalSuggestedContentItemsProgress !== undefined;
|
|
14
|
-
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
15
|
-
center: true,
|
|
16
|
-
fontWeight: 700,
|
|
17
|
-
justifyContent: "flex-start",
|
|
18
|
-
gap: 16,
|
|
19
|
-
mb: isEnrolledSyllabus ? {
|
|
20
|
-
_: 8,
|
|
21
|
-
sm: 12
|
|
22
|
-
} : 12,
|
|
23
|
-
children: [shouldShowTotalProgress && /*#__PURE__*/_jsx(_Fragment, {
|
|
24
|
-
children: isTotalProgressCompleted ? /*#__PURE__*/_jsx(FlexBox, {
|
|
25
|
-
center: true,
|
|
26
|
-
dimensions: 44,
|
|
27
|
-
bg: "yellow",
|
|
28
|
-
color: "black",
|
|
29
|
-
borderRadius: "full",
|
|
30
|
-
"aria-label": "Study plan suggested content progress is 100%",
|
|
31
|
-
children: /*#__PURE__*/_jsx(CheckIcon, {
|
|
32
|
-
size: 24
|
|
33
|
-
})
|
|
34
|
-
}) : /*#__PURE__*/_jsx(Box, {
|
|
35
|
-
height: 44,
|
|
36
|
-
"aria-label": totalProgressAriaLabel,
|
|
37
|
-
children: /*#__PURE__*/_jsx(RadialProgress, {
|
|
38
|
-
"aria-hidden": true,
|
|
39
|
-
baseColor: "var(--color-paleYellow)",
|
|
40
|
-
color: "var(--color-yellow-500)",
|
|
41
|
-
size: 44,
|
|
42
|
-
value: totalSuggestedContentItemsProgress,
|
|
43
|
-
children: /*#__PURE__*/_jsx(Box, {
|
|
44
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
45
|
-
"aria-hidden": true,
|
|
46
|
-
fontSize: 14,
|
|
47
|
-
textAlign: "center",
|
|
48
|
-
children: `${totalSuggestedContentItemsProgress}%`
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
54
|
-
fontSize: isEnrolledSyllabus ? 22 : 20,
|
|
55
|
-
children: title
|
|
56
|
-
})]
|
|
57
|
-
});
|
|
58
|
-
};
|