@codecademy/brand 1.0.0-alpha.620719fc92.0 → 1.0.0-alpha.6b25e8a68f.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/AppBar/AppBarSection.js +1 -1
  2. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.ts +0 -1
  3. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js +2 -4
  4. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +14 -14
  5. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.js +6 -6
  6. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.d.ts +0 -1
  7. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +15 -12
  8. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +5 -5
  9. package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.d.ts +1 -1
  10. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.ts +1 -1
  11. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesSection/index.js +2 -2
  12. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.d.ts +0 -1
  13. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js +11 -8
  14. package/dist/AppHeader/Search/SearchButton.js +1 -3
  15. package/dist/AppHeader/Search/SearchPane.d.ts +1 -3
  16. package/dist/AppHeader/Search/SearchPane.js +72 -66
  17. package/dist/AppHeader/Search/SearchWorker/PromiseLookup.d.ts +18 -0
  18. package/dist/AppHeader/Search/SearchWorker/PromiseLookup.js +35 -0
  19. package/dist/AppHeader/Search/SearchWorker/index.d.ts +4 -34
  20. package/dist/AppHeader/Search/SearchWorker/index.js +22 -73
  21. package/dist/AppHeader/Search/SearchWorker/src.d.ts +1 -2
  22. package/dist/AppHeader/Search/SearchWorker/src.js +253 -199
  23. package/dist/AppHeader/Search/SearchWorker/types.d.ts +32 -0
  24. package/dist/AppHeader/Search/SearchWorker/types.js +5 -0
  25. package/dist/AppHeader/Search/SearchWorker/worker.d.ts +2 -0
  26. package/dist/AppHeader/Search/SearchWorker/worker.js +32 -0
  27. package/dist/AppHeader/Search/useHeaderSearch.d.ts +1 -3
  28. package/dist/AppHeader/Search/useHeaderSearch.js +2 -4
  29. package/dist/AppHeader/index.d.ts +1 -2
  30. package/dist/AppHeader/index.js +11 -16
  31. package/dist/AppHeader/shared/elements.d.ts +10 -272
  32. package/dist/AppHeader/shared/elements.js +9 -7
  33. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +1 -1
  34. package/dist/AppHeaderMobile/index.d.ts +0 -1
  35. package/dist/AppHeaderMobile/index.js +6 -8
  36. package/dist/Avatar/index.js +1 -1
  37. package/dist/Carousel/elements.d.ts +4 -4
  38. package/dist/Carousel/index.js +7 -4
  39. package/dist/CertificationPathCard/__tests__/__fixtures__/index.d.ts +2 -0
  40. package/dist/CertificationPathCard/index.d.ts +18 -0
  41. package/dist/CertificationPathCard/index.js +39 -0
  42. package/dist/ContentGroupBaseCard/index.d.ts +5 -0
  43. package/dist/ContentGroupBaseCard/index.js +14 -5
  44. package/dist/DropdownButton/DropdownList.js +1 -1
  45. package/dist/DropdownButton/index.d.ts +312 -1
  46. package/dist/DropdownButton/index.js +9 -6
  47. package/dist/EmptySection/index.d.ts +1 -1
  48. package/dist/EmptySection/index.js +31 -10
  49. package/dist/GlobalFooter/FooterHeading.d.ts +4 -4
  50. package/dist/GlobalFooter/FooterHeading.js +12 -25
  51. package/dist/GlobalFooter/FooterLinks.d.ts +1 -1
  52. package/dist/GlobalFooter/FooterLinks.js +10 -19
  53. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +28 -46
  54. package/dist/GlobalFooter/FooterSubHeading.d.ts +2 -2
  55. package/dist/GlobalFooter/FooterSubHeading.js +9 -18
  56. package/dist/GlobalHeader/GlobalHeaderItems.d.ts +0 -1
  57. package/dist/GlobalHeader/GlobalHeaderItems.js +0 -8
  58. package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +4 -4
  59. package/dist/GlobalHeader/GlobalHeaderVariants.js +11 -11
  60. package/dist/GlobalHeader/index.d.ts +4 -2
  61. package/dist/GlobalHeader/index.js +45 -48
  62. package/dist/GlobalHeader/types.d.ts +0 -4
  63. package/dist/Grid/GridCollapse.js +16 -23
  64. package/dist/LayoutMenuVariant/AccordionMenu.d.ts +2 -0
  65. package/dist/LayoutMenuVariant/AccordionMenu.js +3 -3
  66. package/dist/LayoutMenuVariant/LayoutMenuSection.js +2 -1
  67. package/dist/LayoutMenuVariant/SectionItemLink.d.ts +2 -1
  68. package/dist/LayoutMenuVariant/SectionItemLink.js +2 -1
  69. package/dist/LoadingCurriculumCard/index.js +1 -1
  70. package/dist/Logo/index.d.ts +4 -1
  71. package/dist/Logo/index.js +6 -2
  72. package/dist/LogoFromSkillsoft/index.js +1 -1
  73. package/dist/NotificationList/NotificationItem.js +3 -3
  74. package/dist/Notifications/elements.d.ts +2 -2
  75. package/dist/PlanCard/PricingAmount.d.ts +1 -1
  76. package/dist/PlanCard/PricingAmount.js +4 -4
  77. package/dist/PlanCard/consts.js +1 -1
  78. package/dist/PlanCard/index.d.ts +1 -2
  79. package/dist/PlanCard/index.js +14 -22
  80. package/dist/ProLabel/index.d.ts +1 -1
  81. package/dist/ProLabel/index.js +1 -1
  82. package/dist/ResourceCard/index.d.ts +4 -3
  83. package/dist/ResourceCard/index.js +6 -3
  84. package/dist/SocialMediaSharing/SocialShareIconLink.js +2 -2
  85. package/dist/SocialMediaSharingDropdown/index.d.ts +4 -1
  86. package/dist/SocialMediaSharingDropdown/index.js +11 -2
  87. package/dist/Testimonial/index.d.ts +1 -1
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/lib/catalogList/index.js +2 -9
  91. package/dist/stories/Atoms/Subgrid.stories.js +1 -1
  92. package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.d.ts +9 -0
  93. package/dist/stories/Molecules/CurriculumCards/CertificationPathCard.stories.js +65 -0
  94. package/dist/stories/Organisms/GlobalHeader/About.stories.js +8 -8
  95. package/dist/stories/Organisms/GlobalPage.stories.js +4 -4
  96. package/dist/stories/Organisms/PlanCard.stories.js +2 -3
  97. package/package.json +4 -5
  98. package/dist/StudyPlan/ContentItemDetail.d.ts +0 -10
  99. package/dist/StudyPlan/ContentItemDetail.js +0 -114
  100. package/dist/StudyPlan/CreateStudyPlanSectionContent.d.ts +0 -14
  101. package/dist/StudyPlan/CreateStudyPlanSectionContent.js +0 -90
  102. package/dist/StudyPlan/ShowMoreContentItemsButton.d.ts +0 -9
  103. package/dist/StudyPlan/ShowMoreContentItemsButton.js +0 -44
  104. package/dist/StudyPlan/StudyPlanDeleteDialog.d.ts +0 -6
  105. package/dist/StudyPlan/StudyPlanDeleteDialog.js +0 -26
  106. package/dist/StudyPlan/StudyPlanDescription.d.ts +0 -10
  107. package/dist/StudyPlan/StudyPlanDescription.js +0 -50
  108. package/dist/StudyPlan/StudyPlanModal/StudyPlanForm.d.ts +0 -10
  109. package/dist/StudyPlan/StudyPlanModal/StudyPlanForm.js +0 -138
  110. package/dist/StudyPlan/StudyPlanModal/StudyPlanModalFooter.d.ts +0 -14
  111. package/dist/StudyPlan/StudyPlanModal/StudyPlanModalFooter.js +0 -64
  112. package/dist/StudyPlan/StudyPlanModal/index.d.ts +0 -18
  113. package/dist/StudyPlan/StudyPlanModal/index.js +0 -120
  114. package/dist/StudyPlan/SuggestedContentItemsSectionHeader.d.ts +0 -8
  115. package/dist/StudyPlan/SuggestedContentItemsSectionHeader.js +0 -58
  116. package/dist/StudyPlan/assets/studyPlanBanner.svg +0 -9
  117. package/dist/StudyPlan/helpers.d.ts +0 -75
  118. package/dist/StudyPlan/helpers.js +0 -165
  119. package/dist/StudyPlan/index.d.ts +0 -8
  120. package/dist/StudyPlan/index.js +0 -8
@@ -4,27 +4,30 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  export let ResourceType = /*#__PURE__*/function (ResourceType) {
5
5
  ResourceType["Article"] = "Article";
6
6
  ResourceType["Doc"] = "Doc";
7
+ ResourceType["Blog"] = "Blog Post"; // can be expanded for Cheatsheet, etc...
7
8
  return ResourceType;
8
- }({}); // can be expanded for Cheatsheet, etc...
9
+ }({});
9
10
  export const ResourceCard = _ref => {
10
11
  let {
11
12
  title,
12
13
  description,
13
14
  resourceType,
14
15
  headingLevel,
15
- path
16
+ path,
17
+ ...cardProps
16
18
  } = _ref;
17
19
  const cardTitle = path ? [resourceType, ...path].join(' / ') : resourceType;
18
20
  return /*#__PURE__*/_jsxs(Card, {
19
21
  variant: "white",
20
22
  borderRadius: "md",
21
- borderColor: "navy",
23
+ borderColor: "border-primary",
22
24
  overflow: "hidden",
23
25
  display: "flex",
24
26
  flexDirection: "column",
25
27
  shadow: "medium",
26
28
  p: 0,
27
29
  height: "100%",
30
+ ...cardProps,
28
31
  children: [/*#__PURE__*/_jsx(Box, {
29
32
  px: 12,
30
33
  py: 4,
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const IconLink = /*#__PURE__*/_styled(Box, {
6
6
  target: "e1axyiz20",
7
7
  label: "IconLink"
8
- })(process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Tb2NpYWxNZWRpYVNoYXJpbmcvU29jaWFsU2hhcmVJY29uTGluay50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSzRCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Tb2NpYWxNZWRpYVNoYXJpbmcvU29jaWFsU2hhcmVJY29uTGluay50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBbmNob3IsIEJveCB9IGZyb20gJ0Bjb2RlY2FkZW15L2d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0ZXh0XCJcbiAgICAgIC8+XG4gICAgPC9JY29uTGluaz5cbiAgKTtcbn07XG4iXX0= */").withComponent(Anchor, {
8
+ })(process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Tb2NpYWxNZWRpYVNoYXJpbmcvU29jaWFsU2hhcmVJY29uTGluay50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSzRCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Tb2NpYWxNZWRpYVNoYXJpbmcvU29jaWFsU2hhcmVJY29uTGluay50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBbmNob3IsIEJveCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IEdhbXV0SWNvblByb3BzIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnO1xuXG5jb25zdCBJY29uTGluayA9IHN0eWxlZChCb3gpYGAud2l0aENvbXBvbmVudChBbmNob3IpO1xuXG5jb25zdCBnZXRUaXRsZUlkID0gKGlkOiBzdHJpbmcsIHNlY3Rpb25JZD86IHN0cmluZykgPT5cbiAgc2VjdGlvbklkID8gYCR7c2VjdGlvbklkfS0ke2lkfWAgOiBpZDtcblxuZXhwb3J0IHR5cGUgQmFzZVNvY2lhbFNoYXJlUHJvcHMgPSB7XG4gIHNlY3Rpb25JZD86IHN0cmluZztcbiAgc2l6ZT86ICdzbWFsbCcgfCAnbm9ybWFsJztcbn07XG5cbmV4cG9ydCB0eXBlIFNvY2lhbFNoYXJlSWNvbkxpbmtQcm9wcyA9IEJhc2VTb2NpYWxTaGFyZVByb3BzICYge1xuICBpY29uOiBSZWFjdC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AgICBhcmlhLWxhYmVsPXtgc2hhcmUgb24gJHtpZH1gfVxuICAgICAgcD17OH1cbiAgICAgIGxpbmVIZWlnaHQ9ezB9XG4gICAgICBib3JkZXJTdHlsZT1cInNvbGlkXCJcbiAgICAgIGJvcmRlcldpZHRoPXtzaXplID09PSAnc21hbGwnID8gMSA6IDJ9XG4gICAgICBib3JkZXJDb2xvcj1cImJvcmRlci1wcmltYXJ5XCJcbiAgICAgIGJvcmRlclJhZGl1cz1cImZ1bGxcIlxuICAgID5cbiAgICAgIDxJY29uQ29tcG9uZW50XG4gICAgICAgIHRpdGxlPXtpZH1cbiAgICAgICAgdGl0bGVJZD17Z2V0VGl0bGVJZChpZCwgc2VjdGlvbklkKX1cbiAgICAgICAgc2l6ZT17c2l6ZSA9PT0gJ3NtYWxsJyA/IDE2IDogMjR9XG4gICAgICAgIGNvbG9yPVwidGV4dFwiXG4gICAgICAvPlxuICAgIDwvSWNvbkxpbms+XG4gICk7XG59O1xuIl19 */").withComponent(Anchor, {
9
9
  target: "e1axyiz21",
10
10
  label: "IconLink"
11
11
  });
@@ -38,7 +38,7 @@ export const SocialShareIconLink = _ref => {
38
38
  lineHeight: 0,
39
39
  borderStyle: "solid",
40
40
  borderWidth: size === 'small' ? 1 : 2,
41
- borderColor: "text",
41
+ borderColor: "border-primary",
42
42
  borderRadius: "full",
43
43
  children: /*#__PURE__*/_jsx(IconComponent, {
44
44
  title: id,
@@ -6,7 +6,10 @@ export type SocialMediaSharingDropdownProps = {
6
6
  mention?: string;
7
7
  action?: (e: React.MouseEvent, target: string) => void;
8
8
  defaultPosition?: PopoverProps['position'];
9
- addAlert?: (message: string) => void;
9
+ addAlert?: (alert: {
10
+ message: string;
11
+ onClose: () => void;
12
+ }) => void;
10
13
  };
11
14
  export declare const onClickWrapper: (e: React.MouseEvent, id: string, href: string, action?: SocialMediaSharingDropdownProps["action"]) => void;
12
15
  export declare const SocialMediaSharingDropdown: React.FC<SocialMediaSharingDropdownProps>;
@@ -3,7 +3,7 @@
3
3
  * */
4
4
  import { Alert, FlexBox, Text } from '@codecademy/gamut';
5
5
  import { LinkIcon, ShareIcon } from '@codecademy/gamut-icons';
6
- import { useState } from 'react';
6
+ import { useRef, useState } from 'react';
7
7
  import { DropdownButton } from '../DropdownButton';
8
8
  import { createShareLink, SOCIAL_SHARING_PLATFORMS } from '../SocialMediaSharing';
9
9
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -28,17 +28,25 @@ export const SocialMediaSharingDropdown = _ref => {
28
28
  addAlert
29
29
  } = _ref;
30
30
  const [showClipboardAlert, setShowClipboardAlert] = useState(false);
31
+ const dropdownRef = useRef(null);
32
+ const focusDropdown = () => dropdownRef.current?.focus({
33
+ preventScroll: true
34
+ });
31
35
  const copyUrlToClipboard = async e => {
32
36
  action?.(e, `link_share`);
33
37
  await navigator.clipboard.writeText(url);
34
38
  if (addAlert) {
35
- addAlert(clipboardAlertMessage);
39
+ addAlert({
40
+ message: clipboardAlertMessage,
41
+ onClose: focusDropdown
42
+ });
36
43
  } else {
37
44
  setShowClipboardAlert(true);
38
45
  }
39
46
  };
40
47
  return /*#__PURE__*/_jsxs(_Fragment, {
41
48
  children: [/*#__PURE__*/_jsxs(DropdownButton, {
49
+ ref: dropdownRef,
42
50
  "data-testid": "social-share-dropdown",
43
51
  isMenu: true,
44
52
  buttonType: "text",
@@ -92,6 +100,7 @@ export const SocialMediaSharingDropdown = _ref => {
92
100
  children: /*#__PURE__*/_jsx(Alert, {
93
101
  onClose: () => {
94
102
  setShowClipboardAlert(false);
103
+ focusDropdown();
95
104
  },
96
105
  type: "success",
97
106
  placement: "inline",
@@ -8,7 +8,7 @@ declare const TestimonialCard: import("@emotion/styled").StyledComponent<Omit<im
8
8
  declare const TestimonialContent: import("@emotion/styled").StyledComponent<{
9
9
  theme?: import("@emotion/react").Theme | undefined;
10
10
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
11
- } & import("@codecademy/gamut").BoxProps & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onClick" | "children" | "style" | "title" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof React.ClassAttributes<HTMLDivElement>> & {
11
+ } & import("@codecademy/gamut").BoxProps & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onClick" | "slot" | "style" | "title" | "children" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof React.ClassAttributes<HTMLDivElement>> & {
12
12
  theme?: import("@emotion/react").Theme;
13
13
  } & import("@codecademy/variance/dist/types/config").VariantProps<"variant", false | "horizontal" | "vertical">, {}, {}>;
14
14
  export type TestimonialProps = ComponentProps<typeof TestimonialCard> & ComponentProps<typeof TestimonialContent> & {
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './Banner';
19
19
  export * from './BetaSticker';
20
20
  export * from './CareerPathCard';
21
21
  export * from './Carousel';
22
+ export * from './CertificationPathCard';
22
23
  export * from './CommunityEventCard';
23
24
  export * from './CommunityEventToast';
24
25
  export * from './ContentGroupBaseCard';
@@ -75,7 +76,6 @@ export * from './ScoreSummary/types';
75
76
  export * from './SkillPathCard';
76
77
  export * from './SocialMediaSharing';
77
78
  export * from './SocialMediaSharingDropdown';
78
- export * from './StudyPlan';
79
79
  export * from './Testimonial';
80
80
  export type { AnonHeaderVariant } from './GlobalHeader/types';
81
81
  export type { AppHeaderNotificationSettings } from './Notifications/types';
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ export * from './Banner';
19
19
  export * from './BetaSticker';
20
20
  export * from './CareerPathCard';
21
21
  export * from './Carousel';
22
+ export * from './CertificationPathCard';
22
23
  export * from './CommunityEventCard';
23
24
  export * from './CommunityEventToast';
24
25
  export * from './ContentGroupBaseCard';
@@ -75,5 +76,4 @@ export * from './ScoreSummary/types';
75
76
  export * from './SkillPathCard';
76
77
  export * from './SocialMediaSharing';
77
78
  export * from './SocialMediaSharingDropdown';
78
- export * from './StudyPlan';
79
79
  export * from './Testimonial';
@@ -1,5 +1,3 @@
1
- import { Badge } from '@codecademy/gamut';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
1
  export const careerPaths = [{
4
2
  id: 'full-stack-engineer-career-path',
5
3
  href: '/learn/paths/full-stack-engineer-career-path',
@@ -28,7 +26,7 @@ export const careerPaths = [{
28
26
  id: 'computer-science',
29
27
  href: '/learn/paths/computer-science',
30
28
  trackingTarget: 'topnav_catalog_career_computer-science',
31
- text: 'Computer science',
29
+ text: 'Computer Science',
32
30
  type: 'link'
33
31
  }, {
34
32
  id: 'data-science',
@@ -102,12 +100,7 @@ export const topLanguages = [{
102
100
  href: '/catalog/subject/information-technology',
103
101
  trackingTarget: 'topnav_catalog_skill_it',
104
102
  text: 'IT',
105
- type: 'link',
106
- badge: /*#__PURE__*/_jsx(Badge, {
107
- variant: "accent",
108
- size: "sm",
109
- children: "New"
110
- })
103
+ type: 'link'
111
104
  }, {
112
105
  id: 'cybersecurity',
113
106
  href: '/catalog/subject/cybersecurity',
@@ -20,7 +20,7 @@ const Item = _ref => {
20
20
  });
21
21
  };
22
22
  export const Default = {
23
- render: args => /*#__PURE__*/_jsxs(LayoutGrid, {
23
+ render: _args => /*#__PURE__*/_jsxs(LayoutGrid, {
24
24
  children: [/*#__PURE__*/_jsx(Column, {
25
25
  size: {
26
26
  _: 12,
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CertificationPathCard } from '../../../index';
3
+ declare const meta: Meta<typeof CertificationPathCard>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CertificationPathCard>;
6
+ export declare const Default: Story;
7
+ export declare const CertificationPathCardWithProviderLogo: Story;
8
+ export declare const CertificationPathCardWithTimeToComplete: Story;
9
+ export declare const CertificationPathCardWithEnrollmentStatus: Story;
@@ -0,0 +1,65 @@
1
+ import { Box, Column, LayoutGrid } from '@codecademy/gamut';
2
+ import { CertificationPathCard, CourseDifficulty, EnrollmentStatus } from '../../../index';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const meta = {
5
+ component: CertificationPathCard,
6
+ args: {
7
+ title: 'CLF-C02: AWS Certified Cloud Practitioner',
8
+ courseCount: 16,
9
+ shortDescription: 'Master AWS Cloud fundamentals, security, and migration strategies to prepare for the AWS Certified Cloud Practitioner exam (CLF-C02) and enhance your cloud skills.',
10
+ difficulty: CourseDifficulty.Beginner
11
+ }
12
+ };
13
+ export default meta;
14
+ export const Default = {
15
+ render: args => /*#__PURE__*/_jsx(Box, {
16
+ pb: 8,
17
+ children: /*#__PURE__*/_jsx(CertificationPathCard, {
18
+ ...args
19
+ })
20
+ }),
21
+ name: 'CertificationPathCard'
22
+ };
23
+ export const CertificationPathCardWithProviderLogo = {
24
+ render: args => /*#__PURE__*/_jsx(Box, {
25
+ pb: 8,
26
+ children: /*#__PURE__*/_jsx(CertificationPathCard, {
27
+ ...args,
28
+ certificationProvider: {
29
+ name: 'AWS',
30
+ logoUrl: 'https://static-assets.codecademy.com/assets/certification-provider-logos/v1/aws.svg'
31
+ }
32
+ })
33
+ }),
34
+ name: 'CertificationPathCard with Provider Logo'
35
+ };
36
+ export const CertificationPathCardWithTimeToComplete = {
37
+ render: args => /*#__PURE__*/_jsx(Box, {
38
+ pb: 8,
39
+ children: /*#__PURE__*/_jsx(CertificationPathCard, {
40
+ ...args,
41
+ timeToComplete: 10
42
+ })
43
+ }),
44
+ name: 'CertificationPathCard with Time to Complete'
45
+ };
46
+ export const CertificationPathCardWithEnrollmentStatus = {
47
+ render: args => /*#__PURE__*/_jsxs(LayoutGrid, {
48
+ gap: 24,
49
+ pb: 8,
50
+ children: [/*#__PURE__*/_jsx(Column, {
51
+ size: 6,
52
+ children: /*#__PURE__*/_jsx(CertificationPathCard, {
53
+ ...args,
54
+ enrollmentStatus: EnrollmentStatus.InProgress
55
+ })
56
+ }), /*#__PURE__*/_jsx(Column, {
57
+ size: 6,
58
+ children: /*#__PURE__*/_jsx(CertificationPathCard, {
59
+ ...args,
60
+ enrollmentStatus: EnrollmentStatus.Completed
61
+ })
62
+ })]
63
+ }),
64
+ name: 'CertificationPathCard with Enrollment Status'
65
+ };
@@ -52,10 +52,10 @@ export const GlobalHeaderWithSearchAndNotifications = {
52
52
  notifications: {
53
53
  actions: {
54
54
  clear: () => null,
55
- click: notification => null,
56
- dismiss: notification => null,
57
- read: notifications => null,
58
- track: target => null
55
+ click: _notification => null,
56
+ dismiss: _notification => null,
57
+ read: _notifications => null,
58
+ track: _target => null
59
59
  },
60
60
  notifications: [],
61
61
  onEnable: () => null
@@ -83,10 +83,10 @@ export const GlobalHeaderOverBackgroundColor = {
83
83
  notifications: {
84
84
  actions: {
85
85
  clear: () => null,
86
- click: notification => null,
87
- dismiss: notification => null,
88
- read: notifications => null,
89
- track: target => null
86
+ click: _notification => null,
87
+ dismiss: _notification => null,
88
+ read: _notifications => null,
89
+ track: _target => null
90
90
  },
91
91
  notifications: [],
92
92
  onEnable: () => null
@@ -12,10 +12,10 @@ const header = {
12
12
  notifications: {
13
13
  actions: {
14
14
  clear: () => null,
15
- click: notification => null,
16
- dismiss: notification => null,
17
- read: notifications => null,
18
- track: target => null
15
+ click: _notification => null,
16
+ dismiss: _notification => null,
17
+ read: _notifications => null,
18
+ track: _target => null
19
19
  },
20
20
  notifications: [],
21
21
  onEnable: () => null
@@ -12,8 +12,7 @@ const meta = {
12
12
  termMonths: 1,
13
13
  planType: 'pro-silver',
14
14
  isMultiple: true,
15
- moneyBackGuaranteeExperiment: false,
16
- rateLimitAIExperient: false,
15
+ inUpsellModal: false,
17
16
  isIndiaUser: false,
18
17
  ctaHref: 'www.email.com',
19
18
  ctaLabel: 'Click Me'
@@ -27,7 +26,7 @@ export const Default = {
27
26
  name: 'Plan Card'
28
27
  };
29
28
  export const Radio = {
30
- render: function Render(args) {
29
+ render: function Render(_args) {
31
30
  const [selected, setSelected] = useState('plus');
32
31
  return /*#__PURE__*/_jsxs(GridBox, {
33
32
  role: "radiogroup",
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "1.0.0-alpha.620719fc92.0",
4
+ "version": "1.0.0-alpha.6b25e8a68f.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/tracking": "1.0.43",
8
7
  "@emotion/is-prop-valid": "1.2.1",
9
8
  "@splidejs/react-splide": "^0.7.12",
10
9
  "@splidejs/splide": "4.1.3",
11
10
  "classnames": "^2.3.2",
12
11
  "date-fns": "^2.30.0",
13
12
  "emojisplosion": "^2.6.1",
14
- "framer-motion": "^6.5.1",
13
+ "framer-motion": "^11.18.0",
15
14
  "freezeframe": "^5.0.2",
16
15
  "intersection-observer": "^0.12.0",
17
16
  "ismobilejs": "^1.1.1",
@@ -32,6 +31,7 @@
32
31
  "@codecademy/gamut-illustrations": "*",
33
32
  "@codecademy/gamut-patterns": "*",
34
33
  "@codecademy/gamut-styles": "*",
34
+ "@codecademy/tracking": "*",
35
35
  "@codecademy/variance": "*",
36
36
  "@emotion/react": "^11.4.0",
37
37
  "@emotion/styled": "^11.3.0",
@@ -46,6 +46,5 @@
46
46
  "*.scss",
47
47
  "dist/**/[A-Z]**/[A-Z]*.js",
48
48
  "dist/**/[A-Z]**/index.js"
49
- ],
50
- "gitHead": "3995c56be8027db77b4671f23bc70172e233e816"
49
+ ]
51
50
  }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { StudyPlanContentItemType } from './helpers';
3
- interface ContentItemDetailProps {
4
- contentItem: StudyPlanContentItemType;
5
- Icon: React.ReactNode;
6
- isContentItemCompleted?: boolean;
7
- isEnrolledSyllabus?: boolean;
8
- }
9
- export declare const ContentItemDetail: React.FC<ContentItemDetailProps>;
10
- export {};
@@ -1,114 +0,0 @@
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, FlexBox, Text } from '@codecademy/gamut';
4
- import React, { useMemo } from 'react';
5
- import { formatContentItemTimeToComplete, formatContentItemTypeTitle } from './helpers';
6
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
7
- const StyledTitle = /*#__PURE__*/_styled(Text, {
8
- target: "e7grikn0",
9
- label: "StyledTitle"
10
- })(process.env.NODE_ENV === "production" ? {
11
- name: "195s9y5",
12
- styles: "display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;word-break:break-all"
13
- } : {
14
- name: "195s9y5",
15
- styles: "display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;word-break:break-all",
16
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TdHVkeVBsYW4vQ29udGVudEl0ZW1EZXRhaWwudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVnQyIsImZpbGUiOiIuLi8uLi9zcmMvU3R1ZHlQbGFuL0NvbnRlbnRJdGVtRGV0YWlsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJhZGdlLCBCb3gsIEZsZXhCb3gsIFRleHQgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgUmVhY3QsIHsgdXNlTWVtbyB9IGZyb20gJ3JlYWN0JztcblxuaW1wb3J0IHtcbiAgZm9ybWF0Q29udGVudEl0ZW1UaW1lVG9Db21wbGV0ZSxcbiAgZm9ybWF0Q29udGVudEl0ZW1UeXBlVGl0bGUsXG4gIFN0dWR5UGxhbkNvbnRlbnRJdGVtVHlwZSxcbn0gZnJvbSAnLi9oZWxwZXJzJztcblxuY29uc3QgU3R5bGVkVGl0bGUgPSBzdHlsZWQoVGV4dClgXG4gIGRpc3BsYXk6IC13ZWJraXQtYm94O1xuICAtd2Via2l0LWxpbmUtY2xhbXA6IDE7XG4gIC13ZWJraXQtYm94LW9yaWVudDogdmVydGljYWw7XG4gIHdvcmQtYnJlYWs6IGJyZWFrLWFsbDtcbmA7XG5cbmludGVyZmFjZSBDb250ZW50SXRlbURldGFpbFByb3BzIHtcbiAgY29udGVudEl0ZW06IFN0dWR5UGxhbkNvbnRlbnRJdGVtVHlwZTtcbiAgSWNvbjogUmVhY3QuUmVhY3ROb2RlO1xuICBpc0NvbnRlbnRJdGV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92ZXJmbG93PVwiaGlkZGVuXCI+XG4gICAgICAgICAgICB7dGl0bGV9XG4gICAgICAgICAgPC9TdHlsZWRUaXRsZT5cbiAgICAgICAgICA8RmxleEJveCB3aGl0ZVNwYWNlPVwibm93cmFwXCI+XG4gICAgICAgICAgICA8VGV4dCB0ZXh0Q29sb3I9XCJ0ZXh0LXNlY29uZGFyeVwiPntjb250ZW50SXRlbVR5cGV9PC9UZXh0PlxuICAgICAgICAgICAgeyFpc0NvbnRlbnRJdGVtQ29tcGxldGVkICYmIChcbiAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICA8RmxleEJveCBteD17NH0gYXJpYS1oaWRkZW4+XG4gICAgICAgICAgICAgICAgICDigKJcbiAgICAgICAgICAgICAgICA8L0ZsZXhCb3g+XG4gICAgICAgICAgICAgICAgPFRleHQgdGV4dENvbG9yPVwidGV4dC1zZWNvbmRhcnlcIj57dGltZVRvQ29tcGxldGV9PC9UZXh0PlxuICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9GbGV4Qm94PlxuICAgICAgICA8L0ZsZXhCb3g+XG4gICAgICA8L0ZsZXhCb3g+XG4gICAgICB7c2hvdWxkU2hvd1hQQmFkZ2UgJiYgKFxuICAgICAgICA8QmFkZ2UgbWw9ezE2fSBzaXplPVwiYmFzZVwiIHZhcmlhbnQ9XCJzZWNvbmRhcnlcIj5cbiAgICAgICAgICB7YCR7cG90ZW50aWFsU2tpbGxYUH0gWFBgfVxuICAgICAgICA8L0JhZGdlPlxuICAgICAgKX1cbiAgICA8L0ZsZXhCb3g+XG4gICk7XG59O1xuIl19 */",
17
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
18
- });
19
- export const ContentItemDetail = _ref => {
20
- let {
21
- contentItem: {
22
- experience,
23
- metrics,
24
- skillIds,
25
- title,
26
- type
27
- },
28
- Icon,
29
- isContentItemCompleted,
30
- isEnrolledSyllabus
31
- } = _ref;
32
- const shouldShowXPBadge = experience !== 0 && !isContentItemCompleted;
33
- const contentItemTimeToComplete = metrics.medianTimeToCompleteMinutes || 0;
34
- const potentialSkillXP = useMemo(() => {
35
- return experience * (skillIds?.length || 1);
36
- }, [experience, skillIds]);
37
- const timeToComplete = useMemo(() => {
38
- return formatContentItemTimeToComplete(contentItemTimeToComplete, true);
39
- }, [contentItemTimeToComplete]);
40
- const contentItemType = useMemo(() => {
41
- return formatContentItemTypeTitle(type || '');
42
- }, [type]);
43
- return /*#__PURE__*/_jsxs(FlexBox, {
44
- borderBottom: 1,
45
- borderColor: "background-disabled",
46
- center: true,
47
- justifyContent: "space-between",
48
- pr: {
49
- _: 0,
50
- sm: 12
51
- },
52
- py: {
53
- _: 12,
54
- sm: 4
55
- },
56
- ml: {
57
- _: isEnrolledSyllabus ? 0 : -4,
58
- xs: 0
59
- },
60
- children: [/*#__PURE__*/_jsxs(FlexBox, {
61
- center: true,
62
- gap: isEnrolledSyllabus ? 0 : {
63
- _: 4,
64
- sm: 8
65
- },
66
- pl: {
67
- _: 0,
68
- sm: 12
69
- },
70
- children: [/*#__PURE__*/_jsx(Box, {
71
- "aria-label": isContentItemCompleted ? 'Completed content item,' : '',
72
- pt: 8,
73
- mr: isContentItemCompleted ? 8 : 16,
74
- mb: isContentItemCompleted ? 8 : 0,
75
- children: Icon
76
- }), /*#__PURE__*/_jsxs(FlexBox, {
77
- gap: {
78
- _: 0,
79
- sm: 16
80
- },
81
- flexDirection: {
82
- _: 'column',
83
- sm: 'row'
84
- },
85
- textAlign: "start",
86
- children: [/*#__PURE__*/_jsx(StyledTitle, {
87
- fontWeight: 700,
88
- overflow: "hidden",
89
- children: title
90
- }), /*#__PURE__*/_jsxs(FlexBox, {
91
- whiteSpace: "nowrap",
92
- children: [/*#__PURE__*/_jsx(Text, {
93
- textColor: "text-secondary",
94
- children: contentItemType
95
- }), !isContentItemCompleted && /*#__PURE__*/_jsxs(_Fragment, {
96
- children: [/*#__PURE__*/_jsx(FlexBox, {
97
- mx: 4,
98
- "aria-hidden": true,
99
- children: "\u2022"
100
- }), /*#__PURE__*/_jsx(Text, {
101
- textColor: "text-secondary",
102
- children: timeToComplete
103
- })]
104
- })]
105
- })]
106
- })]
107
- }), shouldShowXPBadge && /*#__PURE__*/_jsx(Badge, {
108
- ml: 16,
109
- size: "base",
110
- variant: "secondary",
111
- children: `${potentialSkillXP} XP`
112
- })]
113
- });
114
- };
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- interface CallToActionConfig {
3
- text: string;
4
- onClick: () => void;
5
- }
6
- interface CreateStudyPlanSectionContentProps {
7
- description: string;
8
- isColumnView?: boolean;
9
- primaryCta: CallToActionConfig;
10
- secondaryCta?: CallToActionConfig;
11
- title: string;
12
- }
13
- export declare const CreateStudyPlanSectionContent: React.FC<CreateStudyPlanSectionContentProps>;
14
- export {};
@@ -1,90 +0,0 @@
1
- import { Badge, FlexBox, Text, TextButton } from '@codecademy/gamut';
2
- import React from 'react';
3
- import { getShouldDisplayNewBadge } from './helpers';
4
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
5
- export const CreateStudyPlanSectionContent = _ref => {
6
- let {
7
- description,
8
- isColumnView,
9
- primaryCta,
10
- secondaryCta,
11
- title
12
- } = _ref;
13
- const {
14
- onClick,
15
- text
16
- } = primaryCta;
17
- const shouldShowDismissButton = secondaryCta?.text && secondaryCta?.onClick;
18
- const shouldDisplayNewBadge = getShouldDisplayNewBadge();
19
- const headerContent = /*#__PURE__*/_jsxs(FlexBox, {
20
- column: true,
21
- children: [/*#__PURE__*/_jsxs(FlexBox, {
22
- children: [/*#__PURE__*/_jsx(Text, {
23
- fontWeight: 700,
24
- children: title
25
- }), shouldDisplayNewBadge && /*#__PURE__*/_jsx(Badge, {
26
- size: "sm",
27
- variant: "accent",
28
- ml: 8,
29
- mt: 4,
30
- children: "New"
31
- })]
32
- }), /*#__PURE__*/_jsx(Text, {
33
- mt: isColumnView ? 8 : 4,
34
- children: description
35
- })]
36
- });
37
- const primaryButton = /*#__PURE__*/_jsx(TextButton, {
38
- border: 2,
39
- p: 8,
40
- mb: isColumnView ? 8 : 0,
41
- onClick: onClick,
42
- children: /*#__PURE__*/_jsx(Text, {
43
- textColor: "black",
44
- children: text
45
- })
46
- });
47
- return /*#__PURE__*/_jsx(_Fragment, {
48
- children: isColumnView ? /*#__PURE__*/_jsxs(FlexBox, {
49
- column: true,
50
- children: [headerContent, /*#__PURE__*/_jsxs(FlexBox, {
51
- mt: 12,
52
- gap: 8,
53
- children: [primaryButton, shouldShowDismissButton && /*#__PURE__*/_jsx(TextButton, {
54
- onClick: secondaryCta.onClick,
55
- py: 8,
56
- px: 4,
57
- children: /*#__PURE__*/_jsx(Text, {
58
- textColor: "black",
59
- children: secondaryCta.text
60
- })
61
- })]
62
- })]
63
- }) : /*#__PURE__*/_jsxs(FlexBox, {
64
- alignItems: {
65
- _: 'flex-start',
66
- md: 'center'
67
- },
68
- flexDirection: {
69
- _: 'column',
70
- md: 'row'
71
- },
72
- justifyContent: {
73
- _: 'flex-start',
74
- md: 'space-between'
75
- },
76
- width: "100%",
77
- children: [headerContent, /*#__PURE__*/_jsx(FlexBox, {
78
- ml: {
79
- _: 0,
80
- md: 24
81
- },
82
- mt: {
83
- _: 16,
84
- md: 0
85
- },
86
- children: primaryButton
87
- })]
88
- })
89
- });
90
- };