@codecademy/brand 1.19.0-alpha.c43bcf7814.0 → 1.19.0-alpha.c60780a59d.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.
@@ -1,10 +1,9 @@
1
1
  import { LearningOutcomePopoverDetailsProps } from '../LearningOutcomeTile/types';
2
2
  interface LearningOutcomePopoverProps {
3
- activeElRef: React.RefObject<HTMLDivElement>;
3
+ activeElRef: React.RefObject<HTMLDivElement> | React.RefObject<HTMLAnchorElement>;
4
4
  id: string;
5
5
  isOpen: boolean;
6
6
  learningOutcomeDetails: LearningOutcomePopoverDetailsProps;
7
- setIsOpen: (isOpen: boolean) => void;
8
7
  horizontalOffset?: number;
9
8
  }
10
9
  export declare const LearningOutcomePopover: React.FC<LearningOutcomePopoverProps>;
@@ -1,98 +1,41 @@
1
- import { Box, FlexBox, Popover, Text } from '@codecademy/gamut';
1
+ import { FlexBox, Popover, Text } from '@codecademy/gamut';
2
2
  import { SmallCheckIcon } from '@codecademy/gamut-icons';
3
3
  import { LearningOutcomeLevelBadge, LearningOutcomeLowAssessmentBadge } from '../LearningOutcomeBadges';
4
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;
5
8
  const Assessment = ({
6
9
  score,
7
- type
10
+ type,
11
+ noBorderLeft
8
12
  }) => /*#__PURE__*/_jsxs(FlexBox, {
9
- mx: 8,
10
- my: 4,
13
+ borderTop: 1,
14
+ borderBottom: 1,
15
+ borderRight: 1,
16
+ borderLeft: !noBorderLeft ? 1 : undefined,
17
+ borderColor: "background-hover",
18
+ p: 8,
11
19
  gap: 4,
12
- alignItems: "center",
13
- column: true,
20
+ width: ASSESSMENT_WIDTH,
14
21
  children: [/*#__PURE__*/_jsx(Text, {
15
22
  variant: "p-small",
16
23
  color: "text-secondary",
17
- children: type === 'highest' ? 'High' : 'Recent'
18
- }), /*#__PURE__*/_jsx(Text, {
24
+ children: type === 'highest' ? 'Highest score:' : 'Most recent:'
25
+ }), score != null ? /*#__PURE__*/_jsx(Text, {
19
26
  variant: "p-small",
20
27
  color: score && score >= 70 ? 'green-700' : 'text',
21
28
  fontWeight: 700,
22
- children: score != null ? `${score}%` : '-'
29
+ children: `${score}%`
30
+ }) : /*#__PURE__*/_jsx(Text, {
31
+ variant: "p-small",
32
+ color: "text-disabled",
33
+ children: "-"
23
34
  })]
24
35
  });
25
- const ProgressAndAssessment = ({
26
- highestScore,
27
- latestScore,
28
- percentComplete
29
- }) => {
30
- const renderProgress = () => {
31
- if (!percentComplete) {
32
- return /*#__PURE__*/_jsx(Text, {
33
- color: "text-secondary",
34
- variant: "p-small",
35
- children: "Not started yet"
36
- });
37
- }
38
- if (percentComplete < 100) {
39
- return /*#__PURE__*/_jsx(Text, {
40
- color: "text",
41
- variant: "p-small",
42
- children: `${percentComplete}% complete`
43
- });
44
- }
45
- return /*#__PURE__*/_jsxs(FlexBox, {
46
- children: [/*#__PURE__*/_jsx(FlexBox, {
47
- width: 16,
48
- height: 16,
49
- borderRadius: "md",
50
- bg: "primary",
51
- mr: 4,
52
- alignItems: "center",
53
- justifyContent: "center",
54
- children: /*#__PURE__*/_jsx(SmallCheckIcon, {
55
- size: 11,
56
- color: "white"
57
- })
58
- }), /*#__PURE__*/_jsx(Text, {
59
- color: "text",
60
- variant: "p-small",
61
- children: "Completed"
62
- })]
63
- });
64
- };
65
- const renderAssessment = () => /*#__PURE__*/_jsxs(FlexBox, {
66
- alignItems: "center",
67
- children: [/*#__PURE__*/_jsx(Assessment, {
68
- score: highestScore,
69
- type: "highest"
70
- }), /*#__PURE__*/_jsx(Box, {
71
- width: 1,
72
- height: 24,
73
- borderRight: 1,
74
- borderColor: "background-hover",
75
- mx: 4
76
- }), /*#__PURE__*/_jsx(Assessment, {
77
- score: latestScore,
78
- type: "latest"
79
- })]
80
- });
81
- return /*#__PURE__*/_jsxs(FlexBox, {
82
- borderTop: 1,
83
- borderColor: "background-hover",
84
- alignItems: "center",
85
- justifyContent: "space-between",
86
- gap: 8,
87
- py: 4,
88
- pl: 4,
89
- children: [renderProgress(), renderAssessment()]
90
- });
91
- };
92
36
  export const LearningOutcomePopover = ({
93
37
  activeElRef,
94
38
  isOpen,
95
- setIsOpen,
96
39
  learningOutcomeDetails,
97
40
  ...rest
98
41
  }) => {
@@ -101,38 +44,80 @@ export const LearningOutcomePopover = ({
101
44
  outcome,
102
45
  latestScore,
103
46
  highestScore,
104
- percentComplete
47
+ percentComplete = 0
105
48
  } = learningOutcomeDetails || {};
106
49
  const lowLatestAssessment = Boolean(latestScore != null && latestScore < 70);
50
+ const renderProgress = () => /*#__PURE__*/_jsxs(FlexBox, {
51
+ children: [Boolean(percentComplete === 100) && /*#__PURE__*/_jsx(FlexBox, {
52
+ width: 16,
53
+ height: 16,
54
+ borderRadius: "md",
55
+ bg: "primary",
56
+ mr: 4,
57
+ alignItems: "center",
58
+ justifyContent: "center",
59
+ children: /*#__PURE__*/_jsx(SmallCheckIcon, {
60
+ size: 11,
61
+ color: "white"
62
+ })
63
+ }), /*#__PURE__*/_jsx(Text, {
64
+ color: "text",
65
+ variant: "p-small",
66
+ children: `${percentComplete}% progress`
67
+ })]
68
+ });
107
69
  return /*#__PURE__*/_jsx(Popover, {
108
70
  ...rest,
109
71
  isOpen: isOpen,
110
72
  targetRef: activeElRef,
111
- onRequestClose: () => setIsOpen(false),
112
73
  position: "above",
113
74
  beak: "center",
114
75
  outline: true,
76
+ skipFocusTrap: true,
115
77
  children: /*#__PURE__*/_jsxs(FlexBox, {
78
+ width: POPOVER_WIDTH,
116
79
  pt: 24,
117
- px: 16,
118
- gap: 16,
80
+ pb: 4,
81
+ px: POPOVER_HORIZONTAL_PADDING,
82
+ gap: 24,
119
83
  column: true,
120
84
  children: [/*#__PURE__*/_jsxs(FlexBox, {
121
- justifyContent: "space-between",
122
- children: [!!level && /*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
123
- level: level
124
- }), lowLatestAssessment && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentBadge, {})]
125
- }), /*#__PURE__*/_jsx(Text, {
126
- color: "text",
127
- fontWeight: 400,
128
- textAlign: "left",
129
- variant: "title-xs",
130
- whiteSpace: "break-spaces",
131
- children: outcome
132
- }), /*#__PURE__*/_jsx(ProgressAndAssessment, {
133
- highestScore: highestScore,
134
- latestScore: latestScore,
135
- percentComplete: percentComplete
85
+ gap: 16,
86
+ column: true,
87
+ children: [/*#__PURE__*/_jsxs(FlexBox, {
88
+ justifyContent: "space-between",
89
+ children: [!!level && /*#__PURE__*/_jsx(LearningOutcomeLevelBadge, {
90
+ level: level
91
+ }), lowLatestAssessment && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentBadge, {})]
92
+ }), /*#__PURE__*/_jsx(Text, {
93
+ color: "text",
94
+ textAlign: "left",
95
+ variant: "title-xs",
96
+ whiteSpace: "break-spaces",
97
+ children: outcome
98
+ }), renderProgress()]
99
+ }), /*#__PURE__*/_jsxs(FlexBox, {
100
+ alignItems: "flex-start",
101
+ gap: 4,
102
+ pt: 16,
103
+ pb: 12,
104
+ borderTop: 1,
105
+ borderColor: "background-hover",
106
+ column: true,
107
+ children: [/*#__PURE__*/_jsx(Text, {
108
+ variant: "p-small",
109
+ fontWeight: 700,
110
+ children: "Evaluation results"
111
+ }), /*#__PURE__*/_jsxs(FlexBox, {
112
+ children: [/*#__PURE__*/_jsx(Assessment, {
113
+ score: highestScore,
114
+ type: "highest"
115
+ }), /*#__PURE__*/_jsx(Assessment, {
116
+ score: latestScore,
117
+ type: "latest",
118
+ noBorderLeft: true
119
+ })]
120
+ })]
136
121
  })]
137
122
  })
138
123
  });
@@ -6,8 +6,6 @@ const tileStyles = {
6
6
  alignItems: 'center',
7
7
  justifyContent: 'center',
8
8
  borderRadius: 'md',
9
- borderColor: 'border-tertiary',
10
- cursor: 'default',
11
9
  position: 'relative'
12
10
  };
13
11
  const hoverVariants = hover => variant({
@@ -20,8 +18,8 @@ const hoverVariants = hover => variant({
20
18
  },
21
19
  [Progress.inProgress]: {
22
20
  '&:hover': {
23
- bg: hover ? 'background-hover' : undefined
24
- }
21
+ bg: hover ? 'rgba(85, 51, 255, 0.12)' : undefined
22
+ } // this is primary-hover color with 12% opacity
25
23
  },
26
24
  [Progress.completed]: {
27
25
  '&:hover': {
@@ -33,7 +31,7 @@ const hoverVariants = hover => variant({
33
31
  const sizeVariants = size => variant({
34
32
  prop: 'progress',
35
33
  base: {
36
- border: size === 'small' ? 'none' : 2
34
+ border: size === 'small' ? 1 : 2
37
35
  },
38
36
  variants: {
39
37
  [Progress.notStarted]: {
@@ -63,14 +61,18 @@ export const Tile = /*#__PURE__*/_styled(FlexBox, {
63
61
  },
64
62
  variants: {
65
63
  [Progress.notStarted]: {
66
- bg: 'background-selected'
64
+ bg: 'background-selected',
65
+ borderColor: 'background-hover'
67
66
  },
68
67
  [Progress.inProgress]: {
69
- bg: 'background-selected'
68
+ bg: 'rgba(58, 16, 229, 0.12)',
69
+ // this is primary color with 12% opacity
70
+ borderColor: 'primary'
70
71
  },
71
72
  [Progress.completed]: {
72
- bg: 'primary'
73
+ bg: 'primary',
74
+ borderColor: 'border-tertiary'
73
75
  }
74
76
  }
75
77
  })(props)
76
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL1RpbGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFEb0IiLCJmaWxlIjoiLi4vLi4vc3JjL0xlYXJuaW5nT3V0Y29tZVRpbGUvVGlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGbGV4Qm94IH0gZnJvbSAnQGNvZGVjYW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IHtcbiAgICAgICAgYmc6ICdiYWNrZ3JvdW5kLXNlbGVjdGVkJyxcbiAgICAgIH0sXG4gICAgICBbUHJvZ3Jlc3MuaW5Qcm9ncmVzc106IHtcbiAgICAgICAgYmc6ICdiYWNrZ3JvdW5kLXNlbGVjdGVkJyxcbiAgICAgIH0sXG4gICAgICBbUHJvZ3Jlc3MuY29tcGxldGVkXToge1xuICAgICAgICBiZzogJ3ByaW1hcnknLFxuICAgICAgfSxcbiAgICB9LFxuICB9KShwcm9wcyksXG59KSk7XG4iXX0= */");
78
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL1RpbGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFEb0IiLCJmaWxlIjoiLi4vLi4vc3JjL0xlYXJuaW5nT3V0Y29tZVRpbGUvVGlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGbGV4Qm94IH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQnO1xuaW1wb3J0IHsgdmFyaWFudCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IFByb2dyZXNzLCBTaXplVHlwZSwgVGlsZVByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IHRpbGVTdHlsZXMgPSB7XG4gIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXG4gIGJvcmRlclJhZGl1czogJ21kJyxcbiAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG59IGFzIGNvbnN0O1xuXG5jb25zdCBob3ZlclZhcmlhbnRzID0gKGhvdmVyOiBib29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4gICAgICAgIGJvcmRlckNvbG9yOiAnYm9yZGVyLXRlcnRpYXJ5JyxcbiAgICAgIH0sXG4gICAgfSxcbiAgfSkocHJvcHMpLFxufSkpO1xuIl19 */");
@@ -1,13 +1,37 @@
1
- import { Text } from '@codecademy/gamut';
1
+ import _styled from "@emotion/styled/base";
2
+ import { Anchor, Text } from '@codecademy/gamut';
2
3
  import { SmallCheckIcon } from '@codecademy/gamut-icons';
3
- import { useRef, useState } from 'react';
4
- import { LearningOutcomeLowAssessmentDot } from '../LearningOutcomeBadges';
4
+ import { variant } from '@codecademy/gamut-styles';
5
+ import { useEffect, useRef, useState } from 'react';
6
+ import { learningOutcomeLabels, LearningOutcomeLowAssessmentDot } from '../LearningOutcomeBadges';
5
7
  import { LearningOutcomePopover } from '../LearningOutcomePopover';
6
8
  import { Tile } from './Tile';
7
9
  import { Progress } from './types';
8
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const ProgressText = /*#__PURE__*/_styled(Text, {
12
+ target: "ei97hfv0",
13
+ label: "ProgressText"
14
+ })(props => ({
15
+ ...variant({
16
+ prop: 'progress',
17
+ base: {
18
+ fontSize: 14
19
+ },
20
+ variants: {
21
+ [Progress.notStarted]: {
22
+ color: 'text-secondary',
23
+ fontWeight: 400
24
+ },
25
+ [Progress.inProgress]: {
26
+ color: 'primary',
27
+ fontWeight: props.isSmall ? 400 : 700
28
+ },
29
+ [Progress.completed]: {}
30
+ }
31
+ })(props)
32
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVUaWxlL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQnFCIiwiZmlsZSI6Ii4uLy4uL3NyYy9MZWFybmluZ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xuICAgICAgICAgICAgaGFzQm9yZGVyXG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgIDwvVGlsZT5cbiAgICAgIHtpc09wZW4gJiYgKFxuICAgICAgICA8TGVhcm5pbmdPdXRjb21lUG9wb3ZlclxuICAgICAgICAgIGFjdGl2ZUVsUmVmPXthY3RpdmVFbFJlZn1cbiAgICAgICAgICBob3Jpem9udGFsT2Zmc2V0PXtpc1NtYWxsICYmIGlzQ29tcGxldGVkID8gMTU5IDogaXNTbWFsbCA/IDE1MyA6IDE1MH1cbiAgICAgICAgICBpZD17YCR7aWR9LXBvcG92ZXJgfVxuICAgICAgICAgIGlzT3Blbj17aXNPcGVufVxuICAgICAgICAgIGxlYXJuaW5nT3V0Y29tZURldGFpbHM9e1xuICAgICAgICAgICAgbGVhcm5pbmdPdXRjb21lRGV0YWlscyBhcyBMZWFybmluZ091dGNvbWVQb3BvdmVyRGV0YWlsc1Byb3BzXG4gICAgICAgICAgfVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8L0FuY2hvcj5cbiAgKTtcbn07XG4iXX0= */");
9
33
  const progressState = percentComplete => {
10
- if (!percentComplete || percentComplete === 0) {
34
+ if (percentComplete === 0) {
11
35
  return Progress.notStarted;
12
36
  }
13
37
  if (percentComplete > 0 && percentComplete < 100) {
@@ -16,21 +40,29 @@ const progressState = percentComplete => {
16
40
  return Progress.completed;
17
41
  };
18
42
  export const LearningOutcomeTile = ({
43
+ href,
19
44
  learningOutcomeDetails,
20
- popover = false,
21
45
  hover = false,
46
+ popover = false,
22
47
  size = 'normal'
23
48
  }) => {
24
49
  const {
25
50
  id,
51
+ level,
52
+ outcome,
26
53
  latestScore,
27
54
  percentComplete
28
- } = learningOutcomeDetails || {};
55
+ } = learningOutcomeDetails;
29
56
  const [isOpen, setIsOpen] = useState(false);
30
57
  const activeElRef = useRef(null);
31
- const hoverProps = popover && hover ? {
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 ? {
32
65
  ref: activeElRef,
33
- tabIndex: 0,
34
66
  onMouseEnter: () => setIsOpen(true),
35
67
  onMouseLeave: () => setIsOpen(false),
36
68
  onFocus: () => setIsOpen(true),
@@ -39,34 +71,43 @@ export const LearningOutcomeTile = ({
39
71
  // Close on blur
40
72
  'aria-describedby': `${id}-popover`
41
73
  } : {};
42
- const lowLatestAssessment = Boolean(latestScore != null && latestScore < 70);
43
- const progress = progressState(percentComplete);
44
- const progressText = progress === Progress.inProgress ? `${percentComplete}%` : '';
45
- return /*#__PURE__*/_jsxs(_Fragment, {
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,
46
89
  children: [/*#__PURE__*/_jsxs(Tile, {
47
90
  hover: hover,
48
91
  progress: progress,
49
92
  size: size,
50
- ...hoverProps,
51
- children: [progress === Progress.completed ? /*#__PURE__*/_jsx(SmallCheckIcon, {
52
- size: size === 'small' ? 12 : 16,
93
+ children: [isCompleted ? /*#__PURE__*/_jsx(SmallCheckIcon, {
94
+ size: isSmall ? 12 : 16,
53
95
  textColor: "background-contrast"
54
- }) : /*#__PURE__*/_jsx(Text, {
55
- fontSize: 14,
56
- fontWeight: 700,
57
- children: progressText
58
- }), size !== 'small' && lowLatestAssessment && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentDot, {
96
+ }) : /*#__PURE__*/_jsx(ProgressText, {
97
+ progress: progress,
98
+ isSmall: isSmall,
99
+ children: `${percentCompleteValue}%`
100
+ }), showLowAssessmentDot && /*#__PURE__*/_jsx(LearningOutcomeLowAssessmentDot, {
59
101
  position: "absolute",
60
102
  top: "-20%",
61
103
  right: "-20%",
62
104
  hasBorder: true
63
105
  })]
64
106
  }), isOpen && /*#__PURE__*/_jsx(LearningOutcomePopover, {
65
- id: `${id}-popover`,
66
107
  activeElRef: activeElRef,
108
+ horizontalOffset: isSmall && isCompleted ? 159 : isSmall ? 153 : 150,
109
+ id: `${id}-popover`,
67
110
  isOpen: isOpen,
68
- setIsOpen: setIsOpen,
69
- horizontalOffset: size === 'small' ? 150 : 175,
70
111
  learningOutcomeDetails: learningOutcomeDetails
71
112
  })]
72
113
  });
@@ -1,3 +1,4 @@
1
+ import { LearningOutcomeLevels } from '../LearningOutcomeBadges';
1
2
  export declare enum Progress {
2
3
  notStarted = "notStarted",
3
4
  inProgress = "inProgress",
@@ -11,28 +12,36 @@ export interface TileProps {
11
12
  }
12
13
  interface LearningOutcomeTileDetailsProps {
13
14
  id: string;
14
- percentComplete: number | undefined;
15
+ level: LearningOutcomeLevels;
16
+ outcome: string;
17
+ percentComplete: number | undefined | null;
15
18
  latestScore?: number;
16
19
  }
17
20
  export interface LearningOutcomePopoverDetailsProps {
18
21
  id: string;
19
- percentComplete: number | undefined;
20
- level: number;
22
+ level: LearningOutcomeLevels;
21
23
  outcome: string;
24
+ percentComplete: number | undefined | null;
22
25
  latestScore?: number;
23
26
  highestScore?: number;
24
27
  }
25
- interface LearningOutcomeTileWithPopover {
28
+ interface WithHoverAndWithPopover {
26
29
  learningOutcomeDetails: LearningOutcomePopoverDetailsProps;
27
- hover?: boolean;
30
+ hover: true;
28
31
  popover: true;
29
- size?: SizeType;
30
32
  }
31
- interface LearningOutcomeTileWithoutPopover {
33
+ interface WithHoverAndWithoutPopover {
32
34
  learningOutcomeDetails: LearningOutcomeTileDetailsProps;
33
- hover?: boolean;
34
- popover?: boolean;
35
- size?: SizeType;
35
+ hover: true;
36
+ popover: false;
36
37
  }
37
- export type LearningOutcomeTileProps = LearningOutcomeTileWithPopover | LearningOutcomeTileWithoutPopover;
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);
38
47
  export {};
@@ -3,4 +3,9 @@ export let Progress = /*#__PURE__*/function (Progress) {
3
3
  Progress["inProgress"] = "inProgress";
4
4
  Progress["completed"] = "completed";
5
5
  return Progress;
6
- }({});
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
+ */
@@ -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,40 @@
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
+ setIsOpen: setOpen,
28
+ learningOutcomeDetails: {
29
+ id: '1',
30
+ level: 2,
31
+ outcome: 'Understand the basics of React',
32
+ latestScore: 68,
33
+ highestScore: 100,
34
+ percentComplete: 75
35
+ },
36
+ horizontalOffset: 90
37
+ })
38
+ })]
39
+ });
40
+ };
@@ -7,7 +7,9 @@ const meta = {
7
7
  args: {
8
8
  learningOutcomeDetails: {
9
9
  id: '1',
10
- percentComplete: 0
10
+ percentComplete: 0,
11
+ level: 2,
12
+ outcome: 'Apply programming fundamentals'
11
13
  },
12
14
  size: 'normal'
13
15
  }
@@ -18,20 +20,27 @@ export const Default = {
18
20
  gap: 16,
19
21
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
20
22
  ...args,
23
+ popover: false,
21
24
  hover: true
22
25
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
23
26
  ...args,
24
27
  learningOutcomeDetails: {
25
28
  id: '2',
29
+ level: 2,
30
+ outcome: 'Apply programming fundamentals',
26
31
  percentComplete: 50
27
32
  },
33
+ popover: false,
28
34
  hover: true
29
35
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
30
36
  ...args,
31
37
  learningOutcomeDetails: {
32
38
  id: '3',
39
+ level: 3,
40
+ outcome: 'Apply programming fundamentals',
33
41
  percentComplete: 100
34
42
  },
43
+ popover: false,
35
44
  hover: true
36
45
  })]
37
46
  }),
@@ -44,25 +53,34 @@ export const WithLowAssessments = {
44
53
  ...args,
45
54
  learningOutcomeDetails: {
46
55
  id: '1',
56
+ level: 2,
57
+ outcome: 'Apply programming fundamentals',
47
58
  percentComplete: 0,
48
59
  latestScore: 50
49
60
  },
61
+ popover: false,
50
62
  hover: true
51
63
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
52
64
  ...args,
53
65
  learningOutcomeDetails: {
54
66
  id: '2',
67
+ level: 2,
68
+ outcome: 'Apply programming fundamentals',
55
69
  percentComplete: 50,
56
70
  latestScore: 50
57
71
  },
72
+ popover: false,
58
73
  hover: true
59
74
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
60
75
  ...args,
61
76
  learningOutcomeDetails: {
62
77
  id: '3',
78
+ level: 2,
79
+ outcome: 'Apply programming fundamentals',
63
80
  percentComplete: 100,
64
81
  latestScore: 50
65
82
  },
83
+ popover: false,
66
84
  hover: true
67
85
  })]
68
86
  }),
@@ -114,23 +132,64 @@ export const Small = {
114
132
  gap: 16,
115
133
  children: [/*#__PURE__*/_jsx(LearningOutcomeTile, {
116
134
  ...args,
117
- hover: true,
118
- size: "small"
135
+ size: "small",
136
+ popover: false,
137
+ hover: true
119
138
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
120
139
  ...args,
140
+ size: "small",
121
141
  learningOutcomeDetails: {
122
142
  id: '2',
143
+ level: 2,
144
+ outcome: 'Apply programming fundamentals',
123
145
  percentComplete: 50
124
146
  },
125
- hover: true,
126
- size: "small"
147
+ popover: false,
148
+ hover: true
127
149
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
128
150
  ...args,
151
+ size: "small",
129
152
  learningOutcomeDetails: {
130
153
  id: '3',
154
+ level: 2,
155
+ outcome: 'Apply programming fundamentals',
131
156
  percentComplete: 100
132
157
  },
133
- size: "small"
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
171
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
172
+ ...args,
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
182
+ }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
183
+ ...args,
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
134
193
  })]
135
194
  }),
136
195
  name: 'Learning Outcome Tile - Small'
@@ -145,52 +204,70 @@ export const DarkMode = {
145
204
  ...args,
146
205
  learningOutcomeDetails: {
147
206
  id: '1',
207
+ level: 2,
208
+ outcome: 'Apply programming fundamentals',
148
209
  percentComplete: 0,
149
210
  latestScore: 50
150
211
  },
212
+ popover: false,
151
213
  hover: true
152
214
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
153
215
  ...args,
154
216
  learningOutcomeDetails: {
155
217
  id: '2',
218
+ level: 2,
219
+ outcome: 'Apply programming fundamentals',
156
220
  percentComplete: 50,
157
221
  latestScore: 50
158
222
  },
223
+ popover: false,
159
224
  hover: true
160
225
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
161
226
  ...args,
162
227
  learningOutcomeDetails: {
163
228
  id: '3',
229
+ level: 2,
230
+ outcome: 'Apply programming fundamentals',
164
231
  percentComplete: 100,
165
232
  latestScore: 50
166
233
  },
234
+ popover: false,
167
235
  hover: true
168
236
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
169
237
  ...args,
170
238
  learningOutcomeDetails: {
171
239
  id: '4',
240
+ level: 2,
241
+ outcome: 'Apply programming fundamentals',
172
242
  percentComplete: 0,
173
243
  latestScore: 50
174
244
  },
175
245
  size: "small",
246
+ popover: false,
176
247
  hover: true
177
248
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
178
249
  ...args,
179
250
  learningOutcomeDetails: {
180
251
  id: '5',
252
+ level: 2,
253
+ outcome: 'Apply programming fundamentals',
181
254
  percentComplete: 50,
182
255
  latestScore: 50
183
256
  },
184
257
  size: "small",
258
+ popover: false,
185
259
  hover: true
186
260
  }), /*#__PURE__*/_jsx(LearningOutcomeTile, {
187
261
  ...args,
188
262
  learningOutcomeDetails: {
189
263
  id: '6',
264
+ level: 2,
265
+ outcome: 'Apply programming fundamentals',
190
266
  percentComplete: 100,
191
267
  latestScore: 50
192
268
  },
193
269
  size: "small",
270
+ popover: false,
194
271
  hover: true
195
272
  })]
196
273
  })
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.19.0-alpha.c43bcf7814.0",
4
+ "version": "1.19.0-alpha.c60780a59d.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",
@@ -1,39 +0,0 @@
1
- @import "~@codecademy/gamut-styles/utils";
2
-
3
- $appbar-gutter: px-rem(8px);
4
- $appbar-tab-width: px-rem(48px);
5
- $appbar-z: 14;
6
-
7
- .wrapper {
8
- display: flex;
9
- align-items: center;
10
- height: 100%;
11
- z-index: $appbar-z;
12
- }
13
-
14
- .section {
15
- display: flex;
16
- align-items: center;
17
- height: 100%;
18
- z-index: 1;
19
- }
20
-
21
- .sectionRight {
22
- justify-content: flex-end;
23
- white-space: nowrap;
24
- }
25
-
26
- .sectionLeft {
27
- flex: 1;
28
- }
29
-
30
- .sectionRight,
31
- .sectionLeft {
32
- flex: 1;
33
- }
34
-
35
- .sectionCenter {
36
- flex: 2;
37
- justify-content: center;
38
- text-align: center;
39
- }
@@ -1,36 +0,0 @@
1
- @import "~@codecademy/gamut-styles/utils";
2
-
3
- .imageContainer {
4
- position: relative;
5
- width: calc(100% - 1rem);
6
- @include screen-size-gte($grid-xs-min) {
7
- width: inherit;
8
- }
9
- }
10
-
11
- .image {
12
- width: 100%;
13
- position: relative;
14
- }
15
-
16
- .imageContainer::before {
17
- content: "";
18
- position: absolute;
19
- left: 1rem;
20
- top: 2rem;
21
- background-image: url("../assets/dots.svg");
22
- background-repeat: repeat;
23
- height: calc(100% - 1rem);
24
- width: 100%;
25
- z-index: 0;
26
- filter: invert(19%) sepia(50%) saturate(3200%) hue-rotate(-24deg)
27
- brightness(95%) contrast(97%);
28
- }
29
-
30
- .caption {
31
- color: $color-white;
32
- opacity: 0.7;
33
- font-weight: bold;
34
- margin: 1rem 1rem 0;
35
- display: block;
36
- }
@@ -1,45 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="120" height="40" viewBox="0 0 120 40">
2
- <g>
3
- <g>
4
- <g>
5
- <path d="M110.13477,0H9.53468c-.3667,0-.729,0-1.09473.002-.30615.002-.60986.00781-.91895.0127A13.21476,13.21476,0,0,0,5.5171.19141a6.66509,6.66509,0,0,0-1.90088.627A6.43779,6.43779,0,0,0,1.99757,1.99707,6.25844,6.25844,0,0,0,.81935,3.61816a6.60119,6.60119,0,0,0-.625,1.90332,12.993,12.993,0,0,0-.1792,2.002C.00587,7.83008.00489,8.1377,0,8.44434V31.5586c.00489.3105.00587.6113.01515.9219a12.99232,12.99232,0,0,0,.1792,2.0019,6.58756,6.58756,0,0,0,.625,1.9043A6.20778,6.20778,0,0,0,1.99757,38.001a6.27445,6.27445,0,0,0,1.61865,1.1787,6.70082,6.70082,0,0,0,1.90088.6308,13.45514,13.45514,0,0,0,2.0039.1768c.30909.0068.6128.0107.91895.0107C8.80567,40,9.168,40,9.53468,40H110.13477c.3594,0,.7246,0,1.084-.002.3047,0,.6172-.0039.9219-.0107a13.279,13.279,0,0,0,2-.1768,6.80432,6.80432,0,0,0,1.9082-.6308,6.27742,6.27742,0,0,0,1.6172-1.1787,6.39482,6.39482,0,0,0,1.1816-1.6143,6.60413,6.60413,0,0,0,.6191-1.9043,13.50643,13.50643,0,0,0,.1856-2.0019c.0039-.3106.0039-.6114.0039-.9219.0078-.3633.0078-.7246.0078-1.0938V9.53613c0-.36621,0-.72949-.0078-1.09179,0-.30664,0-.61426-.0039-.9209a13.5071,13.5071,0,0,0-.1856-2.002,6.6177,6.6177,0,0,0-.6191-1.90332,6.46619,6.46619,0,0,0-2.7988-2.7998,6.76754,6.76754,0,0,0-1.9082-.627,13.04394,13.04394,0,0,0-2-.17676c-.3047-.00488-.6172-.01074-.9219-.01269-.3594-.002-.7246-.002-1.084-.002Z" style="fill: #a6a6a6"/>
6
- <path d="M8.44483,39.125c-.30468,0-.602-.0039-.90429-.0107a12.68714,12.68714,0,0,1-1.86914-.1631,5.88381,5.88381,0,0,1-1.65674-.5479,5.40573,5.40573,0,0,1-1.397-1.0166,5.32082,5.32082,0,0,1-1.02051-1.3965,5.72186,5.72186,0,0,1-.543-1.6572,12.41351,12.41351,0,0,1-.1665-1.875c-.00634-.2109-.01464-.9131-.01464-.9131V8.44434S.88185,7.75293.8877,7.5498a12.37039,12.37039,0,0,1,.16553-1.87207,5.7555,5.7555,0,0,1,.54346-1.6621A5.37349,5.37349,0,0,1,2.61183,2.61768,5.56543,5.56543,0,0,1,4.01417,1.59521a5.82309,5.82309,0,0,1,1.65332-.54394A12.58589,12.58589,0,0,1,7.543.88721L8.44532.875H111.21387l.9131.0127a12.38493,12.38493,0,0,1,1.8584.16259,5.93833,5.93833,0,0,1,1.6709.54785,5.59374,5.59374,0,0,1,2.415,2.41993,5.76267,5.76267,0,0,1,.5352,1.64892,12.995,12.995,0,0,1,.1738,1.88721c.0029.2832.0029.5874.0029.89014.0079.375.0079.73193.0079,1.09179V30.4648c0,.3633,0,.7178-.0079,1.0752,0,.3252,0,.6231-.0039.9297a12.73126,12.73126,0,0,1-.1709,1.8535,5.739,5.739,0,0,1-.54,1.67,5.48029,5.48029,0,0,1-1.0156,1.3857,5.4129,5.4129,0,0,1-1.3994,1.0225,5.86168,5.86168,0,0,1-1.668.5498,12.54218,12.54218,0,0,1-1.8692.1631c-.2929.0068-.5996.0107-.8974.0107l-1.084.002Z"/>
7
- </g>
8
- <g id="_Group_" data-name="&lt;Group&gt;">
9
- <g id="_Group_2" data-name="&lt;Group&gt;">
10
- <g id="_Group_3" data-name="&lt;Group&gt;">
11
- <path id="_Path_" data-name="&lt;Path&gt;" d="M24.76888,20.30068a4.94881,4.94881,0,0,1,2.35656-4.15206,5.06566,5.06566,0,0,0-3.99116-2.15768c-1.67924-.17626-3.30719,1.00483-4.1629,1.00483-.87227,0-2.18977-.98733-3.6085-.95814a5.31529,5.31529,0,0,0-4.47292,2.72787c-1.934,3.34842-.49141,8.26947,1.3612,10.97608.9269,1.32535,2.01018,2.8058,3.42763,2.7533,1.38706-.05753,1.9051-.88448,3.5794-.88448,1.65876,0,2.14479.88448,3.591.8511,1.48838-.02416,2.42613-1.33124,3.32051-2.66914a10.962,10.962,0,0,0,1.51842-3.09251A4.78205,4.78205,0,0,1,24.76888,20.30068Z" style="fill: #fff"/>
12
- <path id="_Path_2" data-name="&lt;Path&gt;" d="M22.03725,12.21089a4.87248,4.87248,0,0,0,1.11452-3.49062,4.95746,4.95746,0,0,0-3.20758,1.65961,4.63634,4.63634,0,0,0-1.14371,3.36139A4.09905,4.09905,0,0,0,22.03725,12.21089Z" style="fill: #fff"/>
13
- </g>
14
- </g>
15
- <g>
16
- <path d="M42.30227,27.13965h-4.7334l-1.13672,3.35645H34.42727l4.4834-12.418h2.083l4.4834,12.418H43.438ZM38.0591,25.59082h3.752l-1.84961-5.44727h-.05176Z" style="fill: #fff"/>
17
- <path d="M55.15969,25.96973c0,2.81348-1.50586,4.62109-3.77832,4.62109a3.0693,3.0693,0,0,1-2.84863-1.584h-.043v4.48438h-1.8584V21.44238H48.4302v1.50586h.03418a3.21162,3.21162,0,0,1,2.88281-1.60059C53.645,21.34766,55.15969,23.16406,55.15969,25.96973Zm-1.91016,0c0-1.833-.94727-3.03809-2.39258-3.03809-1.41992,0-2.375,1.23047-2.375,3.03809,0,1.82422.95508,3.0459,2.375,3.0459C52.30227,29.01563,53.24953,27.81934,53.24953,25.96973Z" style="fill: #fff"/>
18
- <path d="M65.12453,25.96973c0,2.81348-1.50586,4.62109-3.77832,4.62109a3.0693,3.0693,0,0,1-2.84863-1.584h-.043v4.48438h-1.8584V21.44238H58.395v1.50586h.03418A3.21162,3.21162,0,0,1,61.312,21.34766C63.60988,21.34766,65.12453,23.16406,65.12453,25.96973Zm-1.91016,0c0-1.833-.94727-3.03809-2.39258-3.03809-1.41992,0-2.375,1.23047-2.375,3.03809,0,1.82422.95508,3.0459,2.375,3.0459C62.26711,29.01563,63.21438,27.81934,63.21438,25.96973Z" style="fill: #fff"/>
19
- <path d="M71.71047,27.03613c.1377,1.23145,1.334,2.04,2.96875,2.04,1.56641,0,2.69336-.80859,2.69336-1.91895,0-.96387-.67969-1.541-2.28906-1.93652l-1.60937-.3877c-2.28027-.55078-3.33887-1.61719-3.33887-3.34766,0-2.14258,1.86719-3.61426,4.51855-3.61426,2.624,0,4.42285,1.47168,4.4834,3.61426h-1.876c-.1123-1.23926-1.13672-1.9873-2.63379-1.9873s-2.52148.75684-2.52148,1.8584c0,.87793.6543,1.39453,2.25488,1.79l1.36816.33594c2.54785.60254,3.60645,1.626,3.60645,3.44238,0,2.32324-1.85059,3.77832-4.79395,3.77832-2.75391,0-4.61328-1.4209-4.7334-3.667Z" style="fill: #fff"/>
20
- <path d="M83.34621,19.2998v2.14258h1.72168v1.47168H83.34621v4.99121c0,.77539.34473,1.13672,1.10156,1.13672a5.80752,5.80752,0,0,0,.61133-.043v1.46289a5.10351,5.10351,0,0,1-1.03223.08594c-1.833,0-2.54785-.68848-2.54785-2.44434V22.91406H80.16262V21.44238H81.479V19.2998Z" style="fill: #fff"/>
21
- <path d="M86.065,25.96973c0-2.84863,1.67773-4.63867,4.29395-4.63867,2.625,0,4.29492,1.79,4.29492,4.63867,0,2.85645-1.66113,4.63867-4.29492,4.63867C87.72609,30.6084,86.065,28.82617,86.065,25.96973Zm6.69531,0c0-1.9541-.89551-3.10742-2.40137-3.10742s-2.40039,1.16211-2.40039,3.10742c0,1.96191.89453,3.10645,2.40039,3.10645S92.76027,27.93164,92.76027,25.96973Z" style="fill: #fff"/>
22
- <path d="M96.18606,21.44238h1.77246v1.541h.043a2.1594,2.1594,0,0,1,2.17773-1.63574,2.86616,2.86616,0,0,1,.63672.06934v1.73828a2.59794,2.59794,0,0,0-.835-.1123,1.87264,1.87264,0,0,0-1.93652,2.083v5.37012h-1.8584Z" style="fill: #fff"/>
23
- <path d="M109.3843,27.83691c-.25,1.64355-1.85059,2.77148-3.89844,2.77148-2.63379,0-4.26855-1.76465-4.26855-4.5957,0-2.83984,1.64355-4.68164,4.19043-4.68164,2.50488,0,4.08008,1.7207,4.08008,4.46582v.63672h-6.39453v.1123a2.358,2.358,0,0,0,2.43555,2.56445,2.04834,2.04834,0,0,0,2.09082-1.27344Zm-6.28223-2.70215h4.52637a2.1773,2.1773,0,0,0-2.2207-2.29785A2.292,2.292,0,0,0,103.10207,25.13477Z" style="fill: #fff"/>
24
- </g>
25
- </g>
26
- </g>
27
- <g id="_Group_4" data-name="&lt;Group&gt;">
28
- <g>
29
- <path d="M37.82619,8.731a2.63964,2.63964,0,0,1,2.80762,2.96484c0,1.90625-1.03027,3.002-2.80762,3.002H35.67092V8.731Zm-1.22852,5.123h1.125a1.87588,1.87588,0,0,0,1.96777-2.146,1.881,1.881,0,0,0-1.96777-2.13379h-1.125Z" style="fill: #fff"/>
30
- <path d="M41.68068,12.44434a2.13323,2.13323,0,1,1,4.24707,0,2.13358,2.13358,0,1,1-4.24707,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C44.57522,13.99463,45.01369,13.42432,45.01369,12.44434Z" style="fill: #fff"/>
31
- <path d="M51.57326,14.69775h-.92187l-.93066-3.31641h-.07031l-.92676,3.31641h-.91309l-1.24121-4.50293h.90137l.80664,3.436h.06641l.92578-3.436h.85254l.92578,3.436h.07031l.80273-3.436h.88867Z" style="fill: #fff"/>
32
- <path d="M53.85354,10.19482H54.709v.71533h.06641a1.348,1.348,0,0,1,1.34375-.80225,1.46456,1.46456,0,0,1,1.55859,1.6748v2.915h-.88867V12.00586c0-.72363-.31445-1.0835-.97168-1.0835a1.03294,1.03294,0,0,0-1.0752,1.14111v2.63428h-.88867Z" style="fill: #fff"/>
33
- <path d="M59.09377,8.437h.88867v6.26074h-.88867Z" style="fill: #fff"/>
34
- <path d="M61.21779,12.44434a2.13346,2.13346,0,1,1,4.24756,0,2.1338,2.1338,0,1,1-4.24756,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C64.11232,13.99463,64.5508,13.42432,64.5508,12.44434Z" style="fill: #fff"/>
35
- <path d="M66.4009,13.42432c0-.81055.60352-1.27783,1.6748-1.34424l1.21973-.07031v-.38867c0-.47559-.31445-.74414-.92187-.74414-.49609,0-.83984.18213-.93848.50049h-.86035c.09082-.77344.81836-1.26953,1.83984-1.26953,1.12891,0,1.76563.562,1.76563,1.51318v3.07666h-.85547v-.63281h-.07031a1.515,1.515,0,0,1-1.35254.707A1.36026,1.36026,0,0,1,66.4009,13.42432Zm2.89453-.38477v-.37646l-1.09961.07031c-.62012.0415-.90137.25244-.90137.64941,0,.40527.35156.64111.835.64111A1.0615,1.0615,0,0,0,69.29543,13.03955Z" style="fill: #fff"/>
36
- <path d="M71.34816,12.44434c0-1.42285.73145-2.32422,1.86914-2.32422a1.484,1.484,0,0,1,1.38086.79h.06641V8.437h.88867v6.26074h-.85156v-.71143h-.07031a1.56284,1.56284,0,0,1-1.41406.78564C72.0718,14.772,71.34816,13.87061,71.34816,12.44434Zm.918,0c0,.95508.4502,1.52979,1.20313,1.52979.749,0,1.21191-.583,1.21191-1.52588,0-.93848-.46777-1.52979-1.21191-1.52979C72.72121,10.91846,72.26613,11.49707,72.26613,12.44434Z" style="fill: #fff"/>
37
- <path d="M79.23,12.44434a2.13323,2.13323,0,1,1,4.24707,0,2.13358,2.13358,0,1,1-4.24707,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C82.12453,13.99463,82.563,13.42432,82.563,12.44434Z" style="fill: #fff"/>
38
- <path d="M84.66945,10.19482h.85547v.71533h.06641a1.348,1.348,0,0,1,1.34375-.80225,1.46456,1.46456,0,0,1,1.55859,1.6748v2.915H87.605V12.00586c0-.72363-.31445-1.0835-.97168-1.0835a1.03294,1.03294,0,0,0-1.0752,1.14111v2.63428h-.88867Z" style="fill: #fff"/>
39
- <path d="M93.51516,9.07373v1.1416h.97559v.74854h-.97559V13.2793c0,.47168.19434.67822.63672.67822a2.96657,2.96657,0,0,0,.33887-.02051v.74023a2.9155,2.9155,0,0,1-.4834.04541c-.98828,0-1.38184-.34766-1.38184-1.21582v-2.543h-.71484v-.74854h.71484V9.07373Z" style="fill: #fff"/>
40
- <path d="M95.70461,8.437h.88086v2.48145h.07031a1.3856,1.3856,0,0,1,1.373-.80664,1.48339,1.48339,0,0,1,1.55078,1.67871v2.90723H98.69v-2.688c0-.71924-.335-1.0835-.96289-1.0835a1.05194,1.05194,0,0,0-1.13379,1.1416v2.62988h-.88867Z" style="fill: #fff"/>
41
- <path d="M104.76125,13.48193a1.828,1.828,0,0,1-1.95117,1.30273A2.04531,2.04531,0,0,1,100.73,12.46045a2.07685,2.07685,0,0,1,2.07617-2.35254c1.25293,0,2.00879.856,2.00879,2.27V12.688h-3.17969v.0498a1.1902,1.1902,0,0,0,1.19922,1.29,1.07934,1.07934,0,0,0,1.07129-.5459Zm-3.126-1.45117h2.27441a1.08647,1.08647,0,0,0-1.1084-1.1665A1.15162,1.15162,0,0,0,101.63527,12.03076Z" style="fill: #fff"/>
42
- </g>
43
- </g>
44
- </g>
45
- </svg>
@@ -1,131 +0,0 @@
1
- @import "~@codecademy/gamut-styles/utils";
2
-
3
- $c-offset: 169;
4
- $inner-offset: 287;
5
- $outer-offset: 361;
6
- $underline-offset: 77;
7
- $animation-duration: 3s;
8
-
9
- @keyframes draw-c {
10
- 50% {
11
- stroke-dashoffset: 0;
12
- }
13
- }
14
- @keyframes draw-c-fast {
15
- 10% {
16
- stroke-dashoffset: $c-offset;
17
- }
18
- 50% {
19
- stroke-dashoffset: 0;
20
- }
21
- 85% {
22
- stroke-dashoffset: $c-offset;
23
- }
24
- }
25
-
26
- @keyframes draw-inner {
27
- 50% {
28
- stroke-dashoffset: 0;
29
- }
30
- }
31
- @keyframes draw-inner-fast {
32
- 10% {
33
- stroke-dashoffset: $inner-offset;
34
- }
35
- 50% {
36
- stroke-dashoffset: 0;
37
- }
38
- 85% {
39
- stroke-dashoffset: $inner-offset;
40
- }
41
- }
42
-
43
- @keyframes draw-outer {
44
- 50% {
45
- stroke-dashoffset: 0;
46
- }
47
- }
48
- @keyframes draw-outer-fast {
49
- 10% {
50
- stroke-dashoffset: $outer-offset;
51
- }
52
- 50% {
53
- stroke-dashoffset: 0;
54
- }
55
- 85% {
56
- stroke-dashoffset: $outer-offset;
57
- }
58
- }
59
-
60
- @keyframes draw-underline {
61
- 50% {
62
- stroke-dashoffset: 0;
63
- }
64
- }
65
- @keyframes draw-underline-fast {
66
- 10% {
67
- stroke-dashoffset: $underline-offset;
68
- }
69
- 50% {
70
- stroke-dashoffset: 0;
71
- }
72
- 85% {
73
- stroke-dashoffset: $underline-offset;
74
- }
75
- }
76
-
77
- .fullPage {
78
- width: 100%;
79
- height: viewport-height(-($height-header));
80
- }
81
-
82
- .loading {
83
- width: px-rem(120px);
84
- }
85
-
86
- .underline {
87
- stroke-dasharray: $underline-offset;
88
- stroke-dashoffset: $underline-offset;
89
- }
90
- .c {
91
- stroke-dasharray: $c-offset;
92
- stroke-dashoffset: $c-offset;
93
- }
94
- .inner {
95
- stroke-dasharray: $inner-offset;
96
- stroke-dashoffset: $inner-offset;
97
- }
98
- .outer {
99
- stroke-dasharray: $outer-offset;
100
- stroke-dashoffset: $outer-offset;
101
- }
102
-
103
- .path {
104
- &.underline {
105
- animation: draw-underline $animation-duration infinite;
106
- }
107
- &.c {
108
- animation: draw-c $animation-duration infinite;
109
- }
110
- &.outer {
111
- animation: draw-outer $animation-duration infinite;
112
- }
113
- &.inner {
114
- animation: draw-inner $animation-duration infinite;
115
- }
116
- }
117
-
118
- .pathTwo {
119
- &.underline {
120
- animation: draw-underline-fast $animation-duration infinite;
121
- }
122
- &.c {
123
- animation: draw-c-fast $animation-duration infinite;
124
- }
125
- &.outer {
126
- animation: draw-outer-fast $animation-duration infinite;
127
- }
128
- &.inner {
129
- animation: draw-inner-fast $animation-duration infinite;
130
- }
131
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 324 122" width="324" height="122"><path fill="#141E3B" fill-rule="nonzero" stroke="#141E3B" d="M8.676 0h7.376v1.058H8.676V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm36.275 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm27.206 0h7.376v1.058h-7.376V0Zm9.07 0h7.375v1.058h-7.376V0Zm9.068 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.068 0h7.376v1.058h-7.376V0Zm9.07 0h7.375v1.058h-7.376V0Zm27.206 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm36.275 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0Zm9.069 0h7.376v1.058h-7.376V0ZM2.78 7.534H3.81V20.08H2.78V7.534Zm12.878 12.26-.998.439L9.07 7.776l1.013-.424 5.577 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm14.33-12.26h1.027V20.08h-1.028V7.534Zm12.877 12.26-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm27.207 0-.998.439-5.592-12.457 1.012-.424 5.578 12.442Zm5.26-12.26h1.027V20.08h-1.027V7.534Zm12.877 12.26-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm29.293.363h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm34.19-.363-.998.439-5.593-12.457 1.013-.424 5.577 12.442Zm5.26-12.26h1.027V20.08h-1.028V7.534Zm12.877 12.26-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm14.33-12.26h1.027V20.08h-1.028V7.534Zm12.877 12.26-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm27.207 0-.998.439-5.592-12.457 1.012-.424 5.578 12.442ZM6.59 39.951l-.998.439L0 27.933l1.013-.424L6.59 39.951Zm18.138 0-.998.439-5.592-12.457 1.012-.424 5.578 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm9.07 0-.998.439-5.593-12.457 1.013-.424 5.577 12.442Zm2.085.363h7.376v1.058h-7.376v-1.058Zm16.052-.363-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm18.138 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm27.207 0-.998.439-5.592-12.457 1.012-.424 5.578 12.442Zm5.26-12.26h1.027v12.547h-1.027V27.691Zm12.877 12.26-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm27.207 0-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm18.138 0-.998.439-5.592-12.457 1.012-.424 5.578 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442Zm9.07 0-.998.439-5.593-12.457 1.013-.424 5.577 12.442Zm2.085.363h7.376v1.058h-7.376v-1.058Zm16.052-.363-.998.439-5.592-12.457 1.013-.424 5.577 12.442Zm27.206 0-.997.439-5.593-12.457 1.013-.424 5.577 12.442ZM15.66 60.108l-.998.438L9.07 48.09l1.013-.423 5.577 12.442Zm18.138 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm2.085.363h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058H54.02v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm34.19-.363-.998.438-5.593-12.457 1.013-.423 5.577 12.442Zm18.137 0-.998.438-5.592-12.457 1.013-.423 5.577 12.442Zm27.207 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm9.068 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm9.07 0-.998.438-5.593-12.457 1.013-.423 5.577 12.442Zm27.206 0-.998.438-5.592-12.457 1.013-.423 5.577 12.442Zm18.138 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm2.085.363h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm34.19-.363-.998.438-5.593-12.457 1.013-.423 5.577 12.442ZM24.727 80.265l-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm5.26-12.26h1.027v12.547h-1.027V68.005Zm5.894 12.623h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058H54.02v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058ZM84.4 68.005h1.028v12.547H84.4V68.005Zm12.878 12.26-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm27.206 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm18.138 0-.998.438-5.592-12.457 1.013-.423 5.577 12.442Zm27.206 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm9.07 0-.998.438-5.593-12.457 1.013-.423 5.577 12.442Zm9.068 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm27.207 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm5.26-12.26h1.027v12.547h-1.027V68.005Zm5.894 12.623h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm12.243-12.623h1.028v12.547h-1.028V68.005Zm12.878 12.26-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm27.206 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442ZM88.21 100.422l-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm18.137 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm2.086.363h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm16.051-.363-.998.438-5.592-12.457 1.013-.423 5.577 12.442Zm18.138 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm2.086.363h7.376v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm9.068 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm9.069 0h7.376v1.058h-7.376v-1.058Zm16.052-.363-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm54.413 0-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm18.137 0-.997.438-5.593-12.457 1.013-.423 5.577 12.442Zm2.086.363h7.376v1.058h-7.376v-1.058Zm9.07 0h7.375v1.058h-7.376v-1.058Zm16.051-.363-.998.438-5.592-12.457 1.013-.423L324 100.422ZM97.279 120.579l-.998.438-5.592-12.457 1.012-.423 5.578 12.442Zm5.26-12.26h1.027v12.547h-1.027v-12.548Zm5.894 12.623h7.376V122h-7.376v-1.058Zm9.07 0h7.375V122h-7.376v-1.058Zm12.242-12.624h1.028v12.548h-1.028v-12.548Zm12.878 12.26-.998.44-5.592-12.458 1.013-.423 5.577 12.442Zm5.26-12.26h1.028v12.548h-1.028v-12.548Zm5.895 12.624h7.376V122h-7.376v-1.058Zm9.068 0h7.376V122h-7.376v-1.058Zm9.07 0h7.375V122h-7.376v-1.058Zm9.068 0h7.376V122h-7.376v-1.058Zm9.069 0h7.376V122h-7.376v-1.058Zm9.069 0h7.376V122h-7.376v-1.058Zm9.069 0h7.376V122h-7.376v-1.058Zm12.243-12.624h1.027v12.548h-1.027v-12.548Zm67.29 12.26-.997.44-5.592-12.458 1.012-.423 5.578 12.442Zm5.26-12.26h1.028v12.548h-1.027v-12.548Zm5.895 12.624h7.376V122h-7.376v-1.058Zm9.07 0h7.375V122h-7.376v-1.058Zm12.242-12.624h1.028v12.548h-1.028v-12.548Z"/></svg>
@@ -1 +0,0 @@
1
- <svg width="109" height="74" xmlns="http://www.w3.org/2000/svg"><path d="M45.874 51.23c0-8.02-3.844-14.489-9.738-18.37L51 0H23.834L3.588 38.294C1.794 41.657 0 47.608 0 51.23 0 63.909 10.508 74 23.578 74c12.301 0 22.296-10.09 22.296-22.77zm57.974 0c0 12.68-9.787 22.77-22.409 22.77C68.303 74 58 63.91 58 51.23c0-3.622 1.545-9.573 3.348-12.936L81.697 0H109L94.06 32.86c6.182 3.881 9.788 10.35 9.788 18.37z" fill="#008A27" fill-rule="evenodd"/></svg>
@@ -1 +0,0 @@
1
- <svg width="6" height="6" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><path d="M1 1h1v1H1zm0 1h1v1H1zm1-1h1v1H2zM1 0h1v1H1zM0 1h1v1H0zM4 4h1v1H4zm0 1h1v1H4zm1-1h1v1H5zM4 3h1v1H4zM3 4h1v1H3z"/></g></svg>
@@ -1 +0,0 @@
1
- <svg width="109" height="74" xmlns="http://www.w3.org/2000/svg"><path d="M45.874 51.23c0-8.02-3.844-14.489-9.738-18.37L51 0H23.834L3.588 38.294C1.794 41.657 0 47.608 0 51.23 0 63.909 10.508 74 23.578 74c12.301 0 22.296-10.09 22.296-22.77zm57.974 0c0 12.68-9.787 22.77-22.409 22.77C68.303 74 58 63.91 58 51.23c0-3.622 1.545-9.573 3.348-12.936L81.697 0H109L94.06 32.86c6.182 3.881 9.788 10.35 9.788 18.37z" fill="#AEE938" fill-rule="evenodd"/></svg>
@@ -1,5 +0,0 @@
1
- <svg width="33" height="25" viewBox="0 0 33 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- d="M13.95 11.791H8.4L15 0H7.65L0 11.0448V25H13.95V11.791ZM31.95 11.791H26.4L33 0H25.65L18 11.0448V25H31.95V11.791Z"
4
- fill="#1557FF" />
5
- </svg>
@@ -1 +0,0 @@
1
- <svg width="186" height="120" xmlns="http://www.w3.org/2000/svg"><path d="M-13 136c13.757-8.504 11.55-21.74 25.306-30.244 13.757-8.504 19.152-1.142 32.909-9.647 13.757-8.504 8.362-15.866 22.12-24.37 13.757-8.504 19.152-1.15 32.917-9.655 13.758-8.505 8.353-15.857 22.111-24.361 13.766-8.504 19.16-1.152 32.917-9.656 13.767-8.504 8.363-15.857 22.12-24.361C180.505 1.78 183.198.663 185.643 0H202v136H-13z" fill="#FF9F3C" fill-rule="evenodd"/></svg>
package/dist/png.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare module '*.png' {
2
- const imageUrl: string;
3
- export default imageUrl;
4
- }
@@ -1 +0,0 @@
1
- declare module 'react-freezeframe';
package/dist/svg.d.ts DELETED
@@ -1,8 +0,0 @@
1
- declare module '*.svg' {
2
- type AssetURL = string;
3
- const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
4
- const content: string;
5
-
6
- export { ReactComponent };
7
- export default content;
8
- }
package/dist/theme.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { CoreTheme } from '@codecademy/gamut-styles';
2
-
3
- declare module '@emotion/react' {
4
- export interface Theme extends CoreTheme {}
5
- }