@codecademy/brand 1.20.0-alpha.15f78f2a16.0 → 1.20.0-alpha.33ecd6f65e.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 (26) hide show
  1. package/dist/GlobalHeader/GlobalHeaderItems.js +5 -6
  2. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.ts +18 -0
  3. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.js +57 -0
  4. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.ts +10 -0
  5. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.js +35 -0
  6. package/dist/LearningOutcomeBadges/index.d.ts +2 -0
  7. package/dist/LearningOutcomeBadges/index.js +2 -0
  8. package/dist/LearningOutcomePopover/index.d.ts +10 -0
  9. package/dist/LearningOutcomePopover/index.js +125 -0
  10. package/dist/LearningOutcomeTile/Tile.d.ts +7 -0
  11. package/dist/LearningOutcomeTile/Tile.js +79 -0
  12. package/dist/LearningOutcomeTile/index.d.ts +1 -8
  13. package/dist/LearningOutcomeTile/index.js +79 -92
  14. package/dist/LearningOutcomeTile/types.d.ts +47 -0
  15. package/dist/LearningOutcomeTile/types.js +11 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1 -0
  18. package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.d.ts +6 -0
  19. package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.js +20 -0
  20. package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.d.ts +6 -0
  21. package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.js +10 -0
  22. package/dist/stories/Molecules/LearningOutcomePopover.stories.d.ts +5 -0
  23. package/dist/stories/Molecules/LearningOutcomePopover.stories.js +39 -0
  24. package/dist/stories/Molecules/LearningOutcomeTile.stories.d.ts +1 -0
  25. package/dist/stories/Molecules/LearningOutcomeTile.stories.js +192 -25
  26. package/package.json +2 -2
@@ -220,7 +220,7 @@ const profileBusinessAccount = {
220
220
  icon: PieLineGraphIcon,
221
221
  href: '/business/plans',
222
222
  trackingTarget: 'avatar_business',
223
- text: 'Admin Dashboard',
223
+ text: 'Business Account Management',
224
224
  type: 'link'
225
225
  };
226
226
  const profileHelpCenter = {
@@ -300,12 +300,11 @@ export const proProfile = user => {
300
300
  topSection.push(profileAccount);
301
301
  }
302
302
  topSection.push(profileMyHome);
303
- topSection.push(profileHelpCenter);
304
- topSection.push(profileFeedback);
305
- const teamsAdminSection = [];
306
303
  if ((user?.isAccountManager || user?.isBusinessAdmin) && !user?.hideBusinessAccount) {
307
- teamsAdminSection.push(profileBusinessAccount);
304
+ topSection.push(profileBusinessAccount);
308
305
  }
306
+ topSection.push(profileHelpCenter);
307
+ topSection.push(profileFeedback);
309
308
  const middleSection = [];
310
309
  if (user.isAdmin) {
311
310
  middleSection.push(profileAdmin);
@@ -317,7 +316,7 @@ export const proProfile = user => {
317
316
  middleSection.push(profileReportBug);
318
317
  }
319
318
  const bottomSection = [profileLogOut];
320
- const popover = [topSection, teamsAdminSection, middleSection, bottomSection];
319
+ const popover = [topSection, middleSection, bottomSection];
321
320
  return {
322
321
  avatar: user.avatar,
323
322
  userDisplayName: user.displayName,
@@ -0,0 +1,18 @@
1
+ import { TextProps } from '@codecademy/gamut';
2
+ export declare enum LearningOutcomeLevels {
3
+ One = 1,
4
+ Two = 2,
5
+ Three = 3
6
+ }
7
+ export declare const learningOutcomeLabels: {
8
+ 1: string;
9
+ 2: string;
10
+ 3: string;
11
+ };
12
+ interface LearningOutcomeLevelBadgeProps extends Pick<TextProps, 'textColor'> {
13
+ level: LearningOutcomeLevels;
14
+ size?: 'sm' | 'base';
15
+ removeBackground?: boolean;
16
+ }
17
+ export declare const LearningOutcomeLevelBadge: React.FC<LearningOutcomeLevelBadgeProps>;
18
+ export {};
@@ -0,0 +1,57 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { Badge, FlexBox, Text } from '@codecademy/gamut';
3
+ import { css, variant } from '@codecademy/gamut-styles';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export let LearningOutcomeLevels = /*#__PURE__*/function (LearningOutcomeLevels) {
6
+ LearningOutcomeLevels[LearningOutcomeLevels["One"] = 1] = "One";
7
+ LearningOutcomeLevels[LearningOutcomeLevels["Two"] = 2] = "Two";
8
+ LearningOutcomeLevels[LearningOutcomeLevels["Three"] = 3] = "Three";
9
+ return LearningOutcomeLevels;
10
+ }({});
11
+ export const learningOutcomeLabels = {
12
+ [LearningOutcomeLevels.One]: 'Subskill',
13
+ [LearningOutcomeLevels.Two]: 'Skill',
14
+ [LearningOutcomeLevels.Three]: 'Skill set'
15
+ };
16
+ const StyledBadge = /*#__PURE__*/_styled(Badge, {
17
+ target: "e187pstn0",
18
+ label: "StyledBadge"
19
+ })(css({
20
+ borderColor: 'border-tertiary'
21
+ }), variant({
22
+ prop: 'level',
23
+ variants: {
24
+ [LearningOutcomeLevels.One]: {
25
+ bg: 'background-selected'
26
+ },
27
+ [LearningOutcomeLevels.Two]: {
28
+ bg: 'green-100'
29
+ },
30
+ [LearningOutcomeLevels.Three]: {
31
+ bg: 'blue-100'
32
+ }
33
+ }
34
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVCYWRnZXMvTGVhcm5pbmdPdXRjb21lTGV2ZWxCYWRnZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JvQiIsImZpbGUiOiIuLi8uLi9zcmMvTGVhcm5pbmdPdXRjb21lQmFkZ2VzL0xlYXJuaW5nT3V0Y29tZUxldmVsQmFkZ2UudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQmFkZ2UsIEZsZXhCb3gsIFRleHQsIFRleHRQcm9wcyB9IGZyb20gJ0Bjb2R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NvbWVMZXZlbEJhZGdlUHJvcHMgZXh0ZW5kcyBQaWNrPFRleHRQcm9wcywgJ3RleHRDb2xvcic+IHtcbiAgbGV2ZWw6IExlYXJuaW5nT3V0Y29tZUxldmVscztcbiAgc2l6ZT86ICdzbScgfCAnYmFzZSc7XG4gIHJlbW92ZUJhY2tncm91bmQ/OiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgTGVhcm5pbmdPdXRjb21lTGV2ZWxCYWRnZTogUmVhY3QuRkM8XG4gIExlYXJuaW5nT3V0Y29tZUxldmVsQmFkZ2VQcm9wc1xuPiA9ICh7IGxldmVsLCBzaXplID0gJ3NtJywgdGV4dENvbG9yLCByZW1vdmVCYWNrZ3JvdW5kIH0pID0+IHtcbiAgcmV0dXJuIChcbiAgICA8RmxleEJveFxuICAgICAgYmc9e3JlbW92ZUJhY2tncm91bmQgPyAndHJhbnNwYXJlbnQnIDogJ3doaXRlJ31cbiAgICAgIGhlaWdodD1cIm1pbi1jb250ZW50XCJcbiAgICAgIHdpZHRoPVwibWluLWNvbnRlbnRcIlxuICAgICAgYm9yZGVyUmFkaXVzPVwieGxcIlxuICAgID5cbiAgICAgIDxTdHlsZWRCYWRnZVxuICAgICAgICBkYXRhLXRlc3RpZD1cImxlYXJuaW5nLW91dGNvbWUtYmFkZ2VcIlxuICAgICAgICBzaXplPXtzaXplfVxuICAgICAgICB2YXJpYW50PVwidGVydGlhcnlcIlxuICAgICAgICBsZXZlbD17bGV2ZWx9XG4gICAgICA+XG4gICAgICAgIDxUZXh0IGNvbG9yPXt0ZXh0Q29sb3IgfHwgJ3RleHQnfT57bGVhcm5pbmdPdXRjb21lTGFiZWxzW2xldmVsXX08L1RleHQ+XG4gICAgICA8L1N0eWxlZEJhZGdlPlxuICAgIDwvRmxleEJveD5cbiAgKTtcbn07XG4iXX0= */");
35
+ export const LearningOutcomeLevelBadge = ({
36
+ level,
37
+ size = 'sm',
38
+ textColor,
39
+ removeBackground
40
+ }) => {
41
+ return /*#__PURE__*/_jsx(FlexBox, {
42
+ bg: removeBackground ? 'transparent' : 'white',
43
+ height: "min-content",
44
+ width: "min-content",
45
+ borderRadius: "xl",
46
+ children: /*#__PURE__*/_jsx(StyledBadge, {
47
+ "data-testid": "learning-outcome-badge",
48
+ size: size,
49
+ variant: "tertiary",
50
+ level: level,
51
+ children: /*#__PURE__*/_jsx(Text, {
52
+ color: textColor || 'text',
53
+ children: learningOutcomeLabels[level]
54
+ })
55
+ })
56
+ });
57
+ };
@@ -0,0 +1,10 @@
1
+ export declare const LearningOutcomeLowAssessmentDot: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme | undefined;
3
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
4
+ } & import("@codecademy/gamut").BoxProps & Pick<import("react").DetailedHTMLProps<import("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 import("react").ClassAttributes<HTMLDivElement>> & {
5
+ theme?: import("@emotion/react").Theme;
6
+ } & {
7
+ hasBorder?: boolean;
8
+ small?: boolean;
9
+ }, {}, {}>;
10
+ export declare const LearningOutcomeLowAssessmentBadge: React.FC;
@@ -0,0 +1,35 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { Badge, Box, Text } from '@codecademy/gamut';
3
+ import { css, states } from '@codecademy/gamut-styles';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export const LearningOutcomeLowAssessmentDot = /*#__PURE__*/_styled(Box, {
6
+ target: "ege7mnh0",
7
+ label: "LearningOutcomeLowAssessmentDot"
8
+ })(css({
9
+ bg: 'orange-500',
10
+ borderRadius: 'full',
11
+ height: 16,
12
+ width: 16
13
+ }), states({
14
+ hasBorder: {
15
+ border: 2,
16
+ borderColor: 'background-contrast'
17
+ },
18
+ small: {
19
+ height: 8,
20
+ width: 8
21
+ }
22
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVCYWRnZXMvTGVhcm5pbmdPdXRjb21lTG93QXNzZXNzbWVudEJhZGdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJK0MiLCJmaWxlIjoiLi4vLi4vc3JjL0xlYXJuaW5nT3V0Y29tZUJhZGdlcy9MZWFybmluZ091dGNvbWVMb3dBc3Nlc3NtZW50QmFkZ2UudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQmFkZ2UsIEJveCwgVGV4dCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IGNzcywgc3RhdGVzIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuZXhwb3J0IGNvbnN0IExlYXJuaW5nT3V0Y29tZUxvd0Fzc2Vzc21lbnREb3QgPSBzdHlsZWQoQm94KTx7XG4gIGhhc0JvcmRlcj86IGJvb2xlYW47XG4gIHNtYWxsPzogYm9vbGVhbjtcbn0+KFxuICBjc3Moe1xuICAgIGJnOiAnb3JhbmdlLTUwMCcsXG4gICAgYm9yZGVyUmFkaXVzOiAnZnVsbCcsXG4gICAgaGVpZ2h0OiAxNixcbiAgICB3aWR0aDogMTYsXG4gIH0pLFxuICBzdGF0ZXMoe1xuICAgIGhhc0JvcmRlcjoge1xuICAgICAgYm9yZGVyOiAyLFxuICAgICAgYm9yZGVyQ29sb3I6ICdiYWNrZ3JvdW5kLWNvbnRyYXN0JyxcbiAgICB9LFxuICAgIHNtYWxsOiB7XG4gICAgICBoZWlnaHQ6IDgsXG4gICAgICB3aWR0aDogOCxcbiAgICB9LFxuICB9KVxuKTtcblxuZXhwb3J0IGNvbnN0IExlYXJuaW5nT3V0Y29tZUxvd0Fzc2Vzc21lbnRCYWRnZTogUmVhY3QuRkMgPSAoKSA9PiB7XG4gIHJldHVybiAoXG4gICAgPEJhZGdlIHZhcmlhbnQ9XCJjdXN0b21cIiBzaXplPVwic21cIiBiZz1cIm9yYW5nZS0xMDBcIj5cbiAgICAgIDxMZWFybmluZ091dGNvbWVMb3dBc3Nlc3NtZW50RG90IHNtYWxsIC8+XG4gICAgICA8VGV4dCBtbD17NH0+TmVlZHMgcmV2aWV3PC9UZXh0PlxuICAgIDwvQmFkZ2U+XG4gICk7XG59O1xuIl19 */");
23
+ export const LearningOutcomeLowAssessmentBadge = () => {
24
+ return /*#__PURE__*/_jsxs(Badge, {
25
+ variant: "custom",
26
+ size: "sm",
27
+ bg: "orange-100",
28
+ children: [/*#__PURE__*/_jsx(LearningOutcomeLowAssessmentDot, {
29
+ small: true
30
+ }), /*#__PURE__*/_jsx(Text, {
31
+ ml: 4,
32
+ children: "Needs review"
33
+ })]
34
+ });
35
+ };
@@ -0,0 +1,2 @@
1
+ export * from './LearningOutcomeLevelBadge';
2
+ export * from './LearningOutcomeLowAssessmentBadge';
@@ -0,0 +1,2 @@
1
+ export * from './LearningOutcomeLevelBadge';
2
+ export * from './LearningOutcomeLowAssessmentBadge';
@@ -0,0 +1,10 @@
1
+ import { LearningOutcomePopoverDetailsProps } from '../LearningOutcomeTile/types';
2
+ interface LearningOutcomePopoverProps {
3
+ activeElRef: React.RefObject<HTMLDivElement> | React.RefObject<HTMLAnchorElement>;
4
+ id: string;
5
+ isOpen: boolean;
6
+ learningOutcomeDetails: LearningOutcomePopoverDetailsProps;
7
+ horizontalOffset?: number;
8
+ }
9
+ export declare const LearningOutcomePopover: React.FC<LearningOutcomePopoverProps>;
10
+ export {};
@@ -0,0 +1,125 @@
1
+ import { FlexBox, Popover, Text } from '@codecademy/gamut';
2
+ import { SmallCheckIcon } from '@codecademy/gamut-icons';
3
+ import { LearningOutcomeLevelBadge, LearningOutcomeLowAssessmentBadge } from '../LearningOutcomeBadges';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const POPOVER_WIDTH = 332;
6
+ const POPOVER_HORIZONTAL_PADDING = 16;
7
+ const ASSESSMENT_WIDTH = (POPOVER_WIDTH - POPOVER_HORIZONTAL_PADDING * 2) / 2;
8
+ const Assessment = ({
9
+ score,
10
+ type,
11
+ noBorderLeft
12
+ }) => /*#__PURE__*/_jsxs(FlexBox, {
13
+ borderTop: 1,
14
+ borderBottom: 1,
15
+ borderRight: 1,
16
+ borderLeft: !noBorderLeft ? 1 : undefined,
17
+ borderColor: "background-hover",
18
+ p: 8,
19
+ gap: 4,
20
+ width: ASSESSMENT_WIDTH,
21
+ children: [/*#__PURE__*/_jsx(Text, {
22
+ variant: "p-small",
23
+ color: "text-secondary",
24
+ children: type === 'highest' ? 'Highest score:' : 'Most recent:'
25
+ }), score != null ? /*#__PURE__*/_jsx(Text, {
26
+ variant: "p-small",
27
+ color: score && score >= 70 ? 'green-700' : 'text',
28
+ fontWeight: 700,
29
+ children: `${score}%`
30
+ }) : /*#__PURE__*/_jsx(Text, {
31
+ variant: "p-small",
32
+ color: "text-disabled",
33
+ children: "-"
34
+ })]
35
+ });
36
+ export const LearningOutcomePopover = ({
37
+ activeElRef,
38
+ isOpen,
39
+ learningOutcomeDetails,
40
+ ...rest
41
+ }) => {
42
+ const {
43
+ level,
44
+ outcome,
45
+ latestScore,
46
+ highestScore,
47
+ percentComplete = 0
48
+ } = learningOutcomeDetails || {};
49
+ const lowLatestAssessment = Boolean(latestScore != null && latestScore < 70);
50
+ const renderProgress = () => /*#__PURE__*/_jsxs(FlexBox, {
51
+ alignItems: "center",
52
+ children: [Boolean(percentComplete === 100) && /*#__PURE__*/_jsx(FlexBox, {
53
+ width: 16,
54
+ height: 16,
55
+ borderRadius: "md",
56
+ bg: "primary",
57
+ mr: 8,
58
+ alignItems: "center",
59
+ justifyContent: "center",
60
+ children: /*#__PURE__*/_jsx(SmallCheckIcon, {
61
+ size: 11,
62
+ color: "white"
63
+ })
64
+ }), /*#__PURE__*/_jsx(Text, {
65
+ color: "text",
66
+ variant: "p-small",
67
+ children: `${percentComplete}% progress`
68
+ })]
69
+ });
70
+ return /*#__PURE__*/_jsx(Popover, {
71
+ ...rest,
72
+ isOpen: isOpen,
73
+ targetRef: activeElRef,
74
+ position: "above",
75
+ beak: "center",
76
+ outline: true,
77
+ skipFocusTrap: true,
78
+ children: /*#__PURE__*/_jsxs(FlexBox, {
79
+ width: POPOVER_WIDTH,
80
+ pt: 24,
81
+ pb: 4,
82
+ px: POPOVER_HORIZONTAL_PADDING,
83
+ gap: 24,
84
+ column: true,
85
+ children: [/*#__PURE__*/_jsxs(FlexBox, {
86
+ gap: 16,
87
+ column: true,
88
+ children: [/*#__PURE__*/_jsxs(FlexBox, {
89
+ justifyContent: "space-between",
90
+ children: [!!level && /*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
91
+ level: level
92
+ }), lowLatestAssessment && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentBadge, {})]
93
+ }), /*#__PURE__*/_jsx(Text, {
94
+ color: "text",
95
+ textAlign: "left",
96
+ variant: "title-xs",
97
+ whiteSpace: "break-spaces",
98
+ children: outcome
99
+ }), renderProgress()]
100
+ }), /*#__PURE__*/_jsxs(FlexBox, {
101
+ alignItems: "flex-start",
102
+ gap: 4,
103
+ pt: 16,
104
+ pb: 12,
105
+ borderTop: 1,
106
+ borderColor: "background-hover",
107
+ column: true,
108
+ children: [/*#__PURE__*/_jsx(Text, {
109
+ variant: "p-small",
110
+ fontWeight: 700,
111
+ children: "Evaluation results"
112
+ }), /*#__PURE__*/_jsxs(FlexBox, {
113
+ children: [/*#__PURE__*/_jsx(Assessment, {
114
+ score: highestScore,
115
+ type: "highest"
116
+ }), /*#__PURE__*/_jsx(Assessment, {
117
+ score: latestScore,
118
+ type: "latest",
119
+ noBorderLeft: true
120
+ })]
121
+ })]
122
+ })]
123
+ })
124
+ });
125
+ };
@@ -0,0 +1,7 @@
1
+ import { TileProps } from './types';
2
+ export declare const Tile: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ } & import("@codecademy/gamut").FlexBoxProps & Pick<import("react").DetailedHTMLProps<import("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 import("react").ClassAttributes<HTMLDivElement>> & {
6
+ theme?: import("@emotion/react").Theme;
7
+ } & TileProps, {}, {}>;
@@ -0,0 +1,79 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { FlexBox } from '@codecademy/gamut';
3
+ import { variant } from '@codecademy/gamut-styles';
4
+ import { Progress } from './types';
5
+ const tileStyles = {
6
+ alignItems: 'center',
7
+ justifyContent: 'center',
8
+ borderRadius: 'md',
9
+ position: 'relative'
10
+ };
11
+ const hoverVariants = hover => variant({
12
+ prop: 'progress',
13
+ variants: {
14
+ [Progress.notStarted]: {
15
+ '&:hover': {
16
+ bg: hover ? 'background-hover' : undefined
17
+ }
18
+ },
19
+ [Progress.inProgress]: {
20
+ '&:hover': {
21
+ bg: hover ? 'rgba(85, 51, 255, 0.12)' : undefined,
22
+ borderColor: hover ? 'rgba(85, 51, 255, 0.12)' : undefined
23
+ } // this is primary-hover color with 12% opacity (LXP-7705 when lighter primary-hover color is available)
24
+ },
25
+ [Progress.completed]: {
26
+ '&:hover': {
27
+ bg: hover ? 'primary-hover' : undefined
28
+ }
29
+ }
30
+ }
31
+ });
32
+ const sizeVariants = size => variant({
33
+ prop: 'progress',
34
+ base: {
35
+ border: size === 'small' ? 1 : 2
36
+ },
37
+ variants: {
38
+ [Progress.notStarted]: {
39
+ width: size === 'small' ? 32 : 40,
40
+ height: size === 'small' ? 24 : 40
41
+ },
42
+ [Progress.inProgress]: {
43
+ width: size === 'small' ? 32 : 40,
44
+ height: size === 'small' ? 24 : 40
45
+ },
46
+ [Progress.completed]: {
47
+ width: size === 'small' ? 20 : 40,
48
+ height: size === 'small' ? 20 : 40
49
+ }
50
+ }
51
+ });
52
+ export const Tile = /*#__PURE__*/_styled(FlexBox, {
53
+ target: "e4znlwe0",
54
+ label: "Tile"
55
+ })(props => ({
56
+ ...hoverVariants(props.hover)(props),
57
+ ...sizeVariants(props.size)(props),
58
+ ...variant({
59
+ prop: 'progress',
60
+ base: {
61
+ ...tileStyles
62
+ },
63
+ variants: {
64
+ [Progress.notStarted]: {
65
+ bg: 'background-selected',
66
+ borderColor: 'background-hover'
67
+ },
68
+ [Progress.inProgress]: {
69
+ bg: 'rgba(58, 16, 229, 0.12)',
70
+ // this is primary color with 12% opacity (LXP-7705 when lighter primary color is available)
71
+ borderColor: 'primary'
72
+ },
73
+ [Progress.completed]: {
74
+ bg: 'primary',
75
+ borderColor: 'border-tertiary'
76
+ }
77
+ }
78
+ })(props)
79
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL1RpbGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNEb0IiLCJmaWxlIjoiLi4vLi4vc3JjL0xlYXJuaW5nT3V0Y29tZVRpbGUvVGlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGbGV4Qm94IH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQnO1xuaW1wb3J0IHsgdmFyaWFudCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IFByb2dyZXNzLCBTaXplVHlwZSwgVGlsZVByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IHRpbGVTdHlsZXMgPSB7XG4gIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXG4gIGJvcmRlclJhZGl1czogJ21kJyxcbiAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG59IGFzIGNvbnN0O1xuXG5jb25zdCBob3ZlclZhcmlhbnRzID0gKGhvdmVyOiBib29sZWFuKSA9PlxuICB2YXJpYW50KHtcbiAgICBwcm9wOiAncHJvZ3Jlc3MnLFxuICAgIHZhcmlhbnRzOiB7XG4gICAgICBbUHJvZ3Jlc3Mubm90U3RhcnRlZF06IHtcbiAgICAgICAgJyY6aG92ZXInOiB7IG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AgIH0sXG4gICAgICBbUHJvZ3Jlc3MuY29tcGxldGVkXToge1xuICAgICAgICBiZzogJ3ByaW1hcnknLFxuICAgICAgICBib3JkZXJDb2xvcjogJ2JvcmRlci10ZXJ0aWFyeScsXG4gICAgICB9LFxuICAgIH0sXG4gIH0pKHByb3BzKSxcbn0pKTtcbiJdfQ== */");
@@ -1,9 +1,2 @@
1
- type SizeType = 'small' | 'normal';
2
- interface LearningOutcomeTileProps {
3
- progressPercentage: number | undefined;
4
- assessmentPercentage?: number;
5
- hover?: boolean;
6
- size?: SizeType;
7
- }
1
+ import { LearningOutcomeTileProps } from './types';
8
2
  export declare const LearningOutcomeTile: React.FC<LearningOutcomeTileProps>;
9
- export {};
@@ -1,127 +1,114 @@
1
1
  import _styled from "@emotion/styled/base";
2
- import { Box, FlexBox, Text } from '@codecademy/gamut';
2
+ import { Anchor, Text } from '@codecademy/gamut';
3
3
  import { SmallCheckIcon } from '@codecademy/gamut-icons';
4
4
  import { variant } from '@codecademy/gamut-styles';
5
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
6
- var Progress = /*#__PURE__*/function (Progress) {
7
- Progress["notStarted"] = "notStarted";
8
- Progress["inProgress"] = "inProgress";
9
- Progress["completed"] = "completed";
10
- return Progress;
11
- }(Progress || {});
12
- const tileStyles = {
13
- alignItems: 'center',
14
- justifyContent: 'center',
15
- borderRadius: 'md',
16
- borderColor: 'border-tertiary',
17
- cursor: 'default',
18
- position: 'relative'
19
- };
20
- const hoverVariants = hover => variant({
21
- prop: 'progress',
22
- variants: {
23
- [Progress.notStarted]: {
24
- '&:hover': {
25
- bg: hover ? 'background-hover' : undefined
26
- }
27
- },
28
- [Progress.inProgress]: {
29
- '&:hover': {
30
- bg: hover ? 'background-hover' : undefined
31
- }
32
- },
33
- [Progress.completed]: {
34
- '&:hover': {
35
- bg: hover ? 'primary-hover' : undefined
36
- }
37
- }
38
- }
39
- });
40
- const sizeVariants = size => variant({
41
- prop: 'progress',
42
- base: {
43
- border: size === 'small' ? 'none' : 2
44
- },
45
- variants: {
46
- [Progress.notStarted]: {
47
- width: size === 'small' ? 32 : 40,
48
- height: size === 'small' ? 24 : 40
49
- },
50
- [Progress.inProgress]: {
51
- width: size === 'small' ? 32 : 40,
52
- height: size === 'small' ? 24 : 40
53
- },
54
- [Progress.completed]: {
55
- width: size === 'small' ? 20 : 40,
56
- height: size === 'small' ? 20 : 40
57
- }
58
- }
59
- });
60
- const Tile = /*#__PURE__*/_styled(FlexBox, {
5
+ import { useEffect, useRef, useState } from 'react';
6
+ import { learningOutcomeLabels, LearningOutcomeLowAssessmentDot } from '../LearningOutcomeBadges';
7
+ import { LearningOutcomePopover } from '../LearningOutcomePopover';
8
+ import { Tile } from './Tile';
9
+ import { Progress } from './types';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const ProgressText = /*#__PURE__*/_styled(Text, {
61
12
  target: "ei97hfv0",
62
- label: "Tile"
13
+ label: "ProgressText"
63
14
  })(props => ({
64
- ...hoverVariants(props.hover)(props),
65
- ...sizeVariants(props.size)(props),
66
15
  ...variant({
67
16
  prop: 'progress',
68
17
  base: {
69
- ...tileStyles
18
+ fontSize: 14
70
19
  },
71
20
  variants: {
72
21
  [Progress.notStarted]: {
73
- bg: 'background-selected'
22
+ color: 'text-secondary',
23
+ fontWeight: 400
74
24
  },
75
25
  [Progress.inProgress]: {
76
- bg: 'background-selected'
26
+ color: 'primary',
27
+ fontWeight: props.isSmall ? 400 : 700
77
28
  },
78
- [Progress.completed]: {
79
- bg: 'primary'
80
- }
29
+ [Progress.completed]: {}
81
30
  }
82
31
  })(props)
83
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjo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ICBzaXplPXtzaXplID09PSAnc21hbGwnID8gMTIgOiAxNn1cbiAgICAgICAgICAgIHRleHRDb2xvcj1cImJhY2tncm91bmQtY29udHJhc3RcIlxuICAgICAgICAgIC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPFRleHQgZm9udFNpemU9ezE0fSBmb250V2VpZ2h0PXs3MDB9PlxuICAgICAgICAgICAge3Byb2dyZXNzVGV4dH1cbiAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICl9XG4gICAgICAgIHtzaXplICE9PSAnc21hbGwnICYmIGxvd0Fzc2Vzc21lbnQgJiYgKFxuICAgICAgICAgIDxCb3hcbiAgICAgICAgICAgIGJnPVwib3JhbmdlLTUwMFwiXG4gICAgICAgICAgICBib3JkZXI9ezJ9XG4gICAgICAgICAgICBib3JkZXJDb2xvcj1cImJhY2tncm91bmQtY29udHJhc3RcIlxuICAgICAgICAgICAgYm9yZGVyUmFkaXVzPVwiZnVsbFwiXG4gICAgICAgICAgICBoZWlnaHQ9ezE2fVxuICAgICAgICAgICAgd2lkdGg9ezE2fVxuICAgICAgICAgICAgcG9zaXRpb249XCJhYnNvbHV0ZVwiXG4gICAgICAgICAgICB0b3A9XCItMjAlXCJcbiAgICAgICAgICAgIHJpZ2h0PVwiLTIwJVwiXG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgIDwvVGlsZT5cbiAgICA8Lz5cbiAgKTtcbn07XG4iXX0= */");
84
- const progressState = progressPercentage => {
85
- if (!progressPercentage || progressPercentage === 0) {
32
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQnFCIiwiZmlsZSI6Ii4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL2luZGV4Ln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GVyXG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgIDwvVGlsZT5cbiAgICAgIHtpc09wZW4gJiYgKFxuICAgICAgICA8TGVhcm5pbmdPdXRjb21lUG9wb3ZlclxuICAgICAgICAgIGFjdGl2ZUVsUmVmPXthY3RpdmVFbFJlZn1cbiAgICAgICAgICBob3Jpem9udGFsT2Zmc2V0PXtpc1NtYWxsICYmIGlzQ29tcGxldGVkID8gMTU5IDogaXNTbWFsbCA/IDE1MyA6IDE1MH1cbiAgICAgICAgICBpZD17YCR7aWR9LXBvcG92ZXJgfVxuICAgICAgICAgIGlzT3Blbj17aXNPcGVufVxuICAgICAgICAgIGxlYXJuaW5nT3V0Y29tZURldGFpbHM9e1xuICAgICAgICAgICAgbGVhcm5pbmdPdXRjb21lRGV0YWlscyBhcyBMZWFybmluZ091dGNvbWVQb3BvdmVyRGV0YWlsc1Byb3BzXG4gICAgICAgICAgfVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8L0FuY2hvcj5cbiAgKTtcbn07XG4iXX0= */");
33
+ const progressState = percentComplete => {
34
+ if (percentComplete === 0) {
86
35
  return Progress.notStarted;
87
36
  }
88
- if (progressPercentage > 0 && progressPercentage < 100) {
37
+ if (percentComplete > 0 && percentComplete < 100) {
89
38
  return Progress.inProgress;
90
39
  }
91
40
  return Progress.completed;
92
41
  };
93
42
  export const LearningOutcomeTile = ({
94
- assessmentPercentage,
95
- progressPercentage,
43
+ href,
44
+ learningOutcomeDetails,
96
45
  hover = false,
46
+ popover = false,
97
47
  size = 'normal'
98
48
  }) => {
99
- const lowAssessment = assessmentPercentage && assessmentPercentage < 70;
100
- const progress = progressState(progressPercentage);
101
- const progressText = progress === Progress.inProgress ? `${progressPercentage}%` : '';
102
- return /*#__PURE__*/_jsx(_Fragment, {
103
- children: /*#__PURE__*/_jsxs(Tile, {
49
+ const {
50
+ id,
51
+ level,
52
+ outcome,
53
+ latestScore,
54
+ percentComplete
55
+ } = learningOutcomeDetails;
56
+ const [isOpen, setIsOpen] = useState(false);
57
+ const activeElRef = useRef(null);
58
+ useEffect(() => {
59
+ if (isOpen) {
60
+ // If the popover is open, we want to focus the active element
61
+ activeElRef.current?.focus();
62
+ }
63
+ }, [isOpen]);
64
+ const popoverProps = popover && hover ? {
65
+ ref: activeElRef,
66
+ onMouseEnter: () => setIsOpen(true),
67
+ onMouseLeave: () => setIsOpen(false),
68
+ onFocus: () => setIsOpen(true),
69
+ // For keyboard users
70
+ onBlur: () => setIsOpen(false),
71
+ // Close on blur
72
+ 'aria-describedby': `${id}-popover`
73
+ } : {};
74
+ const highestScore = popover ? learningOutcomeDetails?.highestScore : undefined;
75
+ const percentCompleteValue = percentComplete ?? 0;
76
+ const progress = progressState(percentCompleteValue);
77
+ const isCompleted = progress === Progress.completed;
78
+ const isSmall = size === 'small';
79
+ const hasLowLatestAssessment = Boolean(latestScore != null && latestScore < 70);
80
+ const showLowAssessmentDot = hasLowLatestAssessment && !isSmall;
81
+ const lowAssessmentLabel = hasLowLatestAssessment ? 'Most recent assessment score is below 70%, needs review. ' : '';
82
+ const defaultAriaLabel = `${learningOutcomeLabels[level]}: ${outcome} ${lowAssessmentLabel}Progress ${percentCompleteValue}% completed.`;
83
+ const evaluationValuesLabel = isOpen && (highestScore || latestScore) ? `Evaluation Values - ${highestScore ? `Highest assessment score ${highestScore}. ` : ''}${latestScore ? `Recent assessment score ${latestScore}.` : ''}` : '';
84
+ return /*#__PURE__*/_jsxs(Anchor, {
85
+ "aria-label": `${defaultAriaLabel} ${evaluationValuesLabel}`,
86
+ variant: "interface",
87
+ href: href,
88
+ ...popoverProps,
89
+ children: [/*#__PURE__*/_jsxs(Tile, {
104
90
  hover: hover,
105
91
  progress: progress,
106
92
  size: size,
107
- children: [progress === Progress.completed ? /*#__PURE__*/_jsx(SmallCheckIcon, {
108
- size: size === 'small' ? 12 : 16,
93
+ children: [isCompleted ? /*#__PURE__*/_jsx(SmallCheckIcon, {
94
+ size: isSmall ? 12 : 16,
109
95
  textColor: "background-contrast"
110
- }) : /*#__PURE__*/_jsx(Text, {
111
- fontSize: 14,
112
- fontWeight: 700,
113
- children: progressText
114
- }), size !== 'small' && lowAssessment && /*#__PURE__*/_jsx(Box, {
115
- bg: "orange-500",
116
- border: 2,
117
- borderColor: "background-contrast",
118
- borderRadius: "full",
119
- height: 16,
120
- width: 16,
96
+ }) : /*#__PURE__*/_jsx(ProgressText, {
97
+ progress: progress,
98
+ isSmall: isSmall,
99
+ children: `${percentCompleteValue}%`
100
+ }), showLowAssessmentDot && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentDot, {
121
101
  position: "absolute",
122
102
  top: "-20%",
123
- right: "-20%"
103
+ right: "-20%",
104
+ hasBorder: true
124
105
  })]
125
- })
106
+ }), isOpen && /*#__PURE__*/_jsx(LearningOutcomePopover, {
107
+ activeElRef: activeElRef,
108
+ horizontalOffset: isSmall && isCompleted ? 159 : isSmall ? 153 : 150,
109
+ id: `${id}-popover`,
110
+ isOpen: isOpen,
111
+ learningOutcomeDetails: learningOutcomeDetails
112
+ })]
126
113
  });
127
114
  };
@@ -0,0 +1,47 @@
1
+ import { LearningOutcomeLevels } from '../LearningOutcomeBadges';
2
+ export declare enum Progress {
3
+ notStarted = "notStarted",
4
+ inProgress = "inProgress",
5
+ completed = "completed"
6
+ }
7
+ export type SizeType = 'small' | 'normal';
8
+ export interface TileProps {
9
+ hover: boolean;
10
+ progress: Progress;
11
+ size: SizeType;
12
+ }
13
+ interface LearningOutcomeTileDetailsProps {
14
+ id: string;
15
+ level: LearningOutcomeLevels;
16
+ outcome: string;
17
+ percentComplete: number | undefined | null;
18
+ latestScore?: number;
19
+ }
20
+ export interface LearningOutcomePopoverDetailsProps {
21
+ id: string;
22
+ level: LearningOutcomeLevels;
23
+ outcome: string;
24
+ percentComplete: number | undefined | null;
25
+ latestScore?: number;
26
+ highestScore?: number;
27
+ }
28
+ interface WithHoverAndWithPopover {
29
+ learningOutcomeDetails: LearningOutcomePopoverDetailsProps;
30
+ hover: true;
31
+ popover: true;
32
+ }
33
+ interface WithHoverAndWithoutPopover {
34
+ learningOutcomeDetails: LearningOutcomeTileDetailsProps;
35
+ hover: true;
36
+ popover: false;
37
+ }
38
+ interface WithoutHoverAndWithoutPopover {
39
+ learningOutcomeDetails: LearningOutcomeTileDetailsProps;
40
+ hover?: false;
41
+ popover?: false;
42
+ }
43
+ export type LearningOutcomeTileProps = {
44
+ href: string;
45
+ size?: SizeType;
46
+ } & (WithHoverAndWithPopover | WithHoverAndWithoutPopover | WithoutHoverAndWithoutPopover);
47
+ export {};
@@ -0,0 +1,11 @@
1
+ export let Progress = /*#__PURE__*/function (Progress) {
2
+ Progress["notStarted"] = "notStarted";
3
+ Progress["inProgress"] = "inProgress";
4
+ Progress["completed"] = "completed";
5
+ return Progress;
6
+ }({});
7
+
8
+ /* The following interfaces define the props for the LearningOutcomeTile component based on different states of hover and popover.
9
+ When hover is true, popover prop is required (either true or false).
10
+ When hover is false, popover prop is optional and defaults to false.
11
+ */
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from './InfoCard';
45
45
  export * from './Konamimojisplosion';
46
46
  export * from './LandingPage';
47
47
  export * from './LayoutMenu';
48
+ export * from './LearningOutcomeBadges';
48
49
  export * from './LearningOutcomeCard';
49
50
  export * from './LearningOutcomeTile';
50
51
  export * from './lib/breakpointHooks';
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ export * from './InfoCard';
45
45
  export * from './Konamimojisplosion';
46
46
  export * from './LandingPage';
47
47
  export * from './LayoutMenu';
48
+ export * from './LearningOutcomeBadges';
48
49
  export * from './LearningOutcomeCard';
49
50
  export * from './LearningOutcomeTile';
50
51
  export * from './lib/breakpointHooks';
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { LearningOutcomeLevelBadge } from '../../LearningOutcomeBadges';
3
+ declare const meta: Meta<typeof LearningOutcomeLevelBadge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LearningOutcomeLevelBadge>;
6
+ export declare const AllLevels: Story;
@@ -0,0 +1,20 @@
1
+ import { FlexBox } from '@codecademy/gamut';
2
+ import { LearningOutcomeLevelBadge } from '../../LearningOutcomeBadges';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const meta = {
5
+ component: LearningOutcomeLevelBadge
6
+ };
7
+ export default meta;
8
+ export const AllLevels = {
9
+ render: () => /*#__PURE__*/_jsxs(FlexBox, {
10
+ gap: 16,
11
+ children: [/*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
12
+ level: 1
13
+ }), /*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
14
+ level: 2
15
+ }), /*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
16
+ level: 3
17
+ })]
18
+ }),
19
+ name: 'Learning Outcome Level Badge - All Levels'
20
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { LearningOutcomeLowAssessmentBadge } from '../../LearningOutcomeBadges';
3
+ declare const meta: Meta<typeof LearningOutcomeLowAssessmentBadge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LearningOutcomeLowAssessmentBadge>;
6
+ export declare const Default: Story;
@@ -0,0 +1,10 @@
1
+ import { LearningOutcomeLowAssessmentBadge } from '../../LearningOutcomeBadges';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ const meta = {
4
+ component: LearningOutcomeLowAssessmentBadge
5
+ };
6
+ export default meta;
7
+ export const Default = {
8
+ render: () => /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentBadge, {}),
9
+ name: 'Learning Outcome Low Assessment Badge - Default'
10
+ };
@@ -0,0 +1,5 @@
1
+ import type { Meta } from '@storybook/react';
2
+ import { LearningOutcomePopover } from '../../LearningOutcomePopover';
3
+ declare const meta: Meta<typeof LearningOutcomePopover>;
4
+ export default meta;
5
+ export declare const Example: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { Box, FillButton, FlexBox } from '@codecademy/gamut';
2
+ import { useRef, useState } from 'react';
3
+ import { LearningOutcomePopover } from '../../LearningOutcomePopover';
4
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const meta = {
6
+ component: LearningOutcomePopover,
7
+ args: {}
8
+ };
9
+ export default meta;
10
+ export const Example = () => {
11
+ const [open, setOpen] = useState(false);
12
+ const activeElRef = useRef(null);
13
+ const toggleOpen = () => setOpen(!open);
14
+ return /*#__PURE__*/_jsxs(_Fragment, {
15
+ children: [/*#__PURE__*/_jsx(Box, {
16
+ ref: activeElRef,
17
+ children: /*#__PURE__*/_jsx(FillButton, {
18
+ onClick: toggleOpen,
19
+ children: "Open Popover"
20
+ })
21
+ }), /*#__PURE__*/_jsx(FlexBox, {
22
+ width: "100%",
23
+ children: /*#__PURE__*/_jsx(LearningOutcomePopover, {
24
+ id: "learning-outcome-popover",
25
+ activeElRef: activeElRef,
26
+ isOpen: open,
27
+ learningOutcomeDetails: {
28
+ id: '1',
29
+ level: 2,
30
+ outcome: 'Understand the basics of React',
31
+ latestScore: 68,
32
+ highestScore: 100,
33
+ percentComplete: 75
34
+ },
35
+ horizontalOffset: 90
36
+ })
37
+ })]
38
+ });
39
+ };
@@ -5,5 +5,6 @@ export default meta;
5
5
  type Story = StoryObj<typeof LearningOutcomeTile>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithLowAssessments: Story;
8
+ export declare const WithPopover: Story;
8
9
  export declare const Small: Story;
9
10
  export declare const DarkMode: Story;
@@ -5,8 +5,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const meta = {
6
6
  component: LearningOutcomeTile,
7
7
  args: {
8
- progressPercentage: 50,
9
- assessmentPercentage: 100,
8
+ learningOutcomeDetails: {
9
+ id: '1',
10
+ percentComplete: 0,
11
+ level: 2,
12
+ outcome: 'Apply programming fundamentals'
13
+ },
10
14
  size: 'normal'
11
15
  }
12
16
  };
@@ -16,57 +20,179 @@ export const Default = {
16
20
  gap: 16,
17
21
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
18
22
  ...args,
19
- progressPercentage: 0,
23
+ popover: false,
20
24
  hover: true
21
25
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
22
26
  ...args,
27
+ learningOutcomeDetails: {
28
+ id: '2',
29
+ level: 2,
30
+ outcome: 'Apply programming fundamentals',
31
+ percentComplete: 50
32
+ },
33
+ popover: false,
23
34
  hover: true
24
35
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
25
36
  ...args,
26
- progressPercentage: 100,
37
+ learningOutcomeDetails: {
38
+ id: '3',
39
+ level: 3,
40
+ outcome: 'Apply programming fundamentals',
41
+ percentComplete: 100
42
+ },
43
+ popover: false,
27
44
  hover: true
28
45
  })]
29
46
  }),
30
- name: 'Learning Outcome Skill Tile - Default'
47
+ name: 'Learning Outcome Tile - Default'
31
48
  };
32
49
  export const WithLowAssessments = {
33
50
  render: args => /*#__PURE__*/_jsxs(FlexBox, {
34
51
  gap: 16,
35
52
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
36
53
  ...args,
37
- progressPercentage: 0,
38
- assessmentPercentage: 68,
54
+ learningOutcomeDetails: {
55
+ id: '1',
56
+ level: 2,
57
+ outcome: 'Apply programming fundamentals',
58
+ percentComplete: 0,
59
+ latestScore: 50
60
+ },
61
+ popover: false,
39
62
  hover: true
40
63
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
41
64
  ...args,
42
- assessmentPercentage: 68,
65
+ learningOutcomeDetails: {
66
+ id: '2',
67
+ level: 2,
68
+ outcome: 'Apply programming fundamentals',
69
+ percentComplete: 50,
70
+ latestScore: 50
71
+ },
72
+ popover: false,
43
73
  hover: true
44
74
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
45
75
  ...args,
46
- progressPercentage: 100,
47
- assessmentPercentage: 68,
76
+ learningOutcomeDetails: {
77
+ id: '3',
78
+ level: 2,
79
+ outcome: 'Apply programming fundamentals',
80
+ percentComplete: 100,
81
+ latestScore: 50
82
+ },
83
+ popover: false,
48
84
  hover: true
49
85
  })]
50
86
  }),
51
- name: 'Learning Outcome Skill Tile - Small'
87
+ name: 'Learning Outcome Tile - with Low Assessment Indicator'
88
+ };
89
+ export const WithPopover = {
90
+ render: args => /*#__PURE__*/_jsxs(FlexBox, {
91
+ gap: 16,
92
+ children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
93
+ ...args,
94
+ learningOutcomeDetails: {
95
+ id: '1',
96
+ level: 1,
97
+ outcome: 'Understand the basics of programming',
98
+ percentComplete: 0
99
+ },
100
+ hover: true,
101
+ popover: true
102
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
103
+ ...args,
104
+ learningOutcomeDetails: {
105
+ id: '2',
106
+ level: 2,
107
+ outcome: 'Apply programming fundamentals',
108
+ percentComplete: 50,
109
+ highestScore: 65,
110
+ latestScore: 50
111
+ },
112
+ hover: true,
113
+ popover: true
114
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
115
+ ...args,
116
+ learningOutcomeDetails: {
117
+ id: '3',
118
+ level: 3,
119
+ outcome: 'Master advanced programming concepts',
120
+ percentComplete: 100,
121
+ highestScore: 70,
122
+ latestScore: 70
123
+ },
124
+ hover: true,
125
+ popover: true
126
+ })]
127
+ }),
128
+ name: 'Learning Outcome Tile - with Popover'
52
129
  };
53
130
  export const Small = {
54
131
  render: args => /*#__PURE__*/_jsxs(FlexBox, {
55
132
  gap: 16,
56
133
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
57
134
  ...args,
58
- progressPercentage: 0,
59
- size: "small"
135
+ size: "small",
136
+ popover: false,
137
+ hover: true
138
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
139
+ ...args,
140
+ size: "small",
141
+ learningOutcomeDetails: {
142
+ id: '2',
143
+ level: 2,
144
+ outcome: 'Apply programming fundamentals',
145
+ percentComplete: 50
146
+ },
147
+ popover: false,
148
+ hover: true
149
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
150
+ ...args,
151
+ size: "small",
152
+ learningOutcomeDetails: {
153
+ id: '3',
154
+ level: 2,
155
+ outcome: 'Apply programming fundamentals',
156
+ percentComplete: 100
157
+ },
158
+ popover: false,
159
+ hover: true
160
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
161
+ ...args,
162
+ size: "small",
163
+ learningOutcomeDetails: {
164
+ id: '2',
165
+ percentComplete: 0,
166
+ outcome: 'Apply programming fundamentals',
167
+ level: 2
168
+ },
169
+ hover: true,
170
+ popover: true
60
171
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
61
172
  ...args,
62
- size: "small"
173
+ size: "small",
174
+ learningOutcomeDetails: {
175
+ id: '2',
176
+ percentComplete: 50,
177
+ outcome: 'Apply programming fundamentals',
178
+ level: 2
179
+ },
180
+ hover: true,
181
+ popover: true
63
182
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
64
183
  ...args,
65
- progressPercentage: 100,
66
- size: "small"
184
+ size: "small",
185
+ learningOutcomeDetails: {
186
+ id: '3',
187
+ percentComplete: 100,
188
+ outcome: 'Apply programming fundamentals',
189
+ level: 2
190
+ },
191
+ hover: true,
192
+ popover: true
67
193
  })]
68
194
  }),
69
- name: 'Learning Outcome Skill Tile - Small'
195
+ name: 'Learning Outcome Tile - Small'
70
196
  };
71
197
  export const DarkMode = {
72
198
  render: args => /*#__PURE__*/_jsx(Background, {
@@ -76,34 +202,75 @@ export const DarkMode = {
76
202
  gap: 16,
77
203
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
78
204
  ...args,
79
- progressPercentage: 0,
80
- assessmentPercentage: 68,
205
+ learningOutcomeDetails: {
206
+ id: '1',
207
+ level: 2,
208
+ outcome: 'Apply programming fundamentals',
209
+ percentComplete: 0,
210
+ latestScore: 50
211
+ },
212
+ popover: false,
81
213
  hover: true
82
214
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
83
215
  ...args,
84
- assessmentPercentage: 68,
216
+ learningOutcomeDetails: {
217
+ id: '2',
218
+ level: 2,
219
+ outcome: 'Apply programming fundamentals',
220
+ percentComplete: 50,
221
+ latestScore: 50
222
+ },
223
+ popover: false,
85
224
  hover: true
86
225
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
87
226
  ...args,
88
- progressPercentage: 100,
89
- assessmentPercentage: 68,
227
+ learningOutcomeDetails: {
228
+ id: '3',
229
+ level: 2,
230
+ outcome: 'Apply programming fundamentals',
231
+ percentComplete: 100,
232
+ latestScore: 50
233
+ },
234
+ popover: false,
90
235
  hover: true
91
236
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
92
237
  ...args,
93
- progressPercentage: 0,
238
+ learningOutcomeDetails: {
239
+ id: '4',
240
+ level: 2,
241
+ outcome: 'Apply programming fundamentals',
242
+ percentComplete: 0,
243
+ latestScore: 50
244
+ },
94
245
  size: "small",
246
+ popover: false,
95
247
  hover: true
96
248
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
97
249
  ...args,
250
+ learningOutcomeDetails: {
251
+ id: '5',
252
+ level: 2,
253
+ outcome: 'Apply programming fundamentals',
254
+ percentComplete: 50,
255
+ latestScore: 50
256
+ },
98
257
  size: "small",
258
+ popover: false,
99
259
  hover: true
100
260
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
101
261
  ...args,
102
- progressPercentage: 100,
262
+ learningOutcomeDetails: {
263
+ id: '6',
264
+ level: 2,
265
+ outcome: 'Apply programming fundamentals',
266
+ percentComplete: 100,
267
+ latestScore: 50
268
+ },
103
269
  size: "small",
270
+ popover: false,
104
271
  hover: true
105
272
  })]
106
273
  })
107
274
  }),
108
- name: 'Learning Outcome Skill Tile - Dark Mode'
275
+ name: 'Learning Outcome Tile - Dark Mode'
109
276
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "1.20.0-alpha.15f78f2a16.0",
4
+ "version": "1.20.0-alpha.33ecd6f65e.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",
@@ -31,7 +31,7 @@
31
31
  "@codecademy/gamut-illustrations": "*",
32
32
  "@codecademy/gamut-patterns": "*",
33
33
  "@codecademy/gamut-styles": "*",
34
- "@codecademy/tracking": "*",
34
+ "@codecademy/tracking": "1.1.1",
35
35
  "@codecademy/variance": "*",
36
36
  "@emotion/react": "^11.4.0",
37
37
  "@emotion/styled": "^11.3.0",