@codecademy/brand 2.0.0-alpha.1c2a15af92.0 → 2.0.0-alpha.1d5fdc8d0a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AppBar/AppBarSection.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +14 -14
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +5 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.d.ts +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.js +9 -9
- package/dist/AppHeader/Search/consts.js +1 -1
- package/dist/AppHeader/shared/elements.d.ts +9 -9
- package/dist/Carousel/elements.d.ts +2 -2
- package/dist/DropdownButton/index.d.ts +2 -2
- package/dist/GlobalFooter/FooterHeading.d.ts +2 -2
- package/dist/GlobalFooter/FooterLinks.d.ts +1 -1
- package/dist/GlobalFooter/FooterSubHeading.d.ts +2 -2
- package/dist/LayoutMenu/LayoutMenu.js +3 -4
- package/dist/LayoutMenuVariant/LayoutMenu.js +3 -4
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.ts +1 -1
- package/dist/LearningOutcomeCard/index.d.ts +9 -12
- package/dist/LearningOutcomeCard/index.js +165 -143
- package/dist/LearningOutcomeFlyout/index.d.ts +29 -0
- package/dist/LearningOutcomeFlyout/index.js +153 -0
- package/dist/LearningOutcomeTile/Tile.d.ts +1 -1
- package/dist/LearningOutcomeTile/index.d.ts +2 -1
- package/dist/LearningOutcomeTile/index.js +2 -4
- package/dist/LearningOutcomeTile/types.d.ts +0 -1
- package/dist/Logo/CodecademyLogo.d.ts +2 -0
- package/dist/Logo/CodecademyLogo.js +19 -0
- package/dist/Logo/CodecademyPremiumLogo.d.ts +2 -0
- package/dist/Logo/CodecademyPremiumLogo.js +35 -0
- package/dist/Logo/CodecademyProAltLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProAltLogo.js +19 -0
- package/dist/Logo/CodecademyProLockupLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProLockupLogo.js +13 -0
- package/dist/Logo/CodecademyProLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademyPro/index.js → Logo/CodecademyProLogo.js} +7 -11
- package/dist/Logo/CodecademyProMonoLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademy/index.js → Logo/CodecademyProMonoLogo.js} +15 -15
- package/dist/Logo/CodecademyProgramLogo.d.ts +2 -0
- package/dist/Logo/CodecademyProgramLogo.js +14 -0
- package/dist/Logo/CodecademyTeamsLogo.d.ts +2 -0
- package/dist/{Logos/LogoCodecademyTeams/index.js → Logo/CodecademyTeamsLogo.js} +4 -9
- package/dist/Logo/index.d.ts +8 -0
- package/dist/Logo/index.js +30 -0
- package/dist/LogoFromSkillsoft/index.d.ts +227 -0
- package/dist/LogoFromSkillsoft/index.js +55 -0
- package/dist/LogoLXStudio/index.d.ts +3 -0
- package/dist/LogoLXStudio/index.js +47 -0
- package/dist/{Logos/ProLabel/ProLabelCutout → LogoProCutout}/index.d.ts +2 -2
- package/dist/{Logos/ProLabel/ProLabelCutout → LogoProCutout}/index.js +1 -1
- package/dist/LogoProCutoutTransparent/index.d.ts +7 -0
- package/dist/{Logos/ProLabel/ProLabelCutoutTransparent → LogoProCutoutTransparent}/index.js +1 -1
- package/dist/Notifications/elements.d.ts +2 -2
- package/dist/PlanCard/index.js +28 -66
- package/dist/ProLabel/index.d.ts +376 -0
- package/dist/ProLabel/index.js +59 -0
- package/dist/{Logos/ProLabel → ProLogo}/index.d.ts +2 -2
- package/dist/{Logos/ProLabel → ProLogo}/index.js +5 -5
- package/dist/Testimonial/index.d.ts +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/stories/Atoms/Logos/Logo.stories.d.ts +13 -0
- package/dist/stories/Atoms/Logos/Logo.stories.js +78 -0
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.d.ts +1 -1
- package/dist/stories/Atoms/Logos/LogoFromSkillsoft.stories.js +8 -2
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.d.ts +1 -1
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +1 -1
- package/dist/stories/Atoms/Logos/ProLabel.stories.d.ts +1 -3
- package/dist/stories/Atoms/Logos/ProLabel.stories.js +10 -23
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.d.ts +6 -0
- package/dist/stories/Atoms/Logos/ProLogoAlt.stories.js +24 -0
- package/dist/stories/Molecules/AppBar.stories.js +2 -2
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.d.ts +6 -0
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.d.ts +7 -2
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +168 -54
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.d.ts +5 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +34 -0
- package/package.json +1 -1
- package/dist/Logos/LogoCodecademy/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyMini/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyMini/index.js +0 -18
- package/dist/Logos/LogoCodecademyPro/index.d.ts +0 -2
- package/dist/Logos/LogoCodecademyTeams/index.d.ts +0 -2
- package/dist/Logos/LogoFromSkillsoft/index.d.ts +0 -3
- package/dist/Logos/LogoFromSkillsoft/index.js +0 -47
- package/dist/Logos/LogoLXStudio/index.d.ts +0 -3
- package/dist/Logos/LogoLXStudio/index.js +0 -40
- package/dist/Logos/ProLabel/ProLabelCutoutTransparent/index.d.ts +0 -7
- package/dist/Logos/index.d.ts +0 -7
- package/dist/Logos/index.js +0 -7
- package/dist/Logos/shared.d.ts +0 -636
- package/dist/Logos/shared.js +0 -16
- package/dist/stories/Atoms/Logos/LogoCodecademy.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademy.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyMini.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyMini.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyPro.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyPro.stories.js +0 -8
- package/dist/stories/Atoms/Logos/LogoCodecademyTeams.stories.d.ts +0 -6
- package/dist/stories/Atoms/Logos/LogoCodecademyTeams.stories.js +0 -8
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Logo } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: Logo
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export const Default = {
|
|
8
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
9
|
+
...args
|
|
10
|
+
}),
|
|
11
|
+
name: 'Default',
|
|
12
|
+
args: {
|
|
13
|
+
type: 'default'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const Pro = {
|
|
17
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
18
|
+
...args
|
|
19
|
+
}),
|
|
20
|
+
name: 'Pro',
|
|
21
|
+
args: {
|
|
22
|
+
type: 'pro'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const ProAlt = {
|
|
26
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
27
|
+
...args
|
|
28
|
+
}),
|
|
29
|
+
name: 'Pro Alt',
|
|
30
|
+
args: {
|
|
31
|
+
type: 'proAlt'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export const ProLockup = {
|
|
35
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
36
|
+
...args
|
|
37
|
+
}),
|
|
38
|
+
name: 'Pro Lockup',
|
|
39
|
+
args: {
|
|
40
|
+
type: 'proLockup'
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export const Program = {
|
|
44
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
45
|
+
...args
|
|
46
|
+
}),
|
|
47
|
+
name: 'Program',
|
|
48
|
+
args: {
|
|
49
|
+
type: 'program'
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export const ProMono = {
|
|
53
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
54
|
+
...args
|
|
55
|
+
}),
|
|
56
|
+
name: 'Pro Mono',
|
|
57
|
+
args: {
|
|
58
|
+
type: 'proMono'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export const Premium = {
|
|
62
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
63
|
+
...args
|
|
64
|
+
}),
|
|
65
|
+
name: 'Premium',
|
|
66
|
+
args: {
|
|
67
|
+
type: 'premium'
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const Teams = {
|
|
71
|
+
render: args => /*#__PURE__*/_jsx(Logo, {
|
|
72
|
+
...args
|
|
73
|
+
}),
|
|
74
|
+
name: 'Teams',
|
|
75
|
+
args: {
|
|
76
|
+
type: 'teams'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { LogoFromSkillsoft } from '../../../
|
|
2
|
+
import { LogoFromSkillsoft } from '../../../index';
|
|
3
3
|
declare const meta: Meta<typeof LogoFromSkillsoft>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LogoFromSkillsoft>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { LogoFromSkillsoft } from '../../../
|
|
1
|
+
import { LogoFromSkillsoft } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
const meta = {
|
|
3
4
|
args: {
|
|
4
5
|
height: 40
|
|
@@ -6,4 +7,9 @@ const meta = {
|
|
|
6
7
|
component: LogoFromSkillsoft
|
|
7
8
|
};
|
|
8
9
|
export default meta;
|
|
9
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
render: args => /*#__PURE__*/_jsx(LogoFromSkillsoft, {
|
|
12
|
+
...args
|
|
13
|
+
}),
|
|
14
|
+
name: 'LogoFromSkillsoft'
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { LogoLXStudio } from '../../../
|
|
2
|
+
import { LogoLXStudio } from '../../../index';
|
|
3
3
|
declare const meta: Meta<typeof LogoLXStudio>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LogoLXStudio>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ProLabel } from '../../../
|
|
2
|
+
import { ProLabel } from '../../../index';
|
|
3
3
|
declare const meta: Meta<typeof ProLabel>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof ProLabel>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const Cutout: Story;
|
|
8
|
-
export declare const Transparent: Story;
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ProLabel } from '../../../Logos/ProLabel';
|
|
1
|
+
import { ProLabel } from '../../../index';
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
const meta = {
|
|
5
|
-
component: ProLabel
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Default = {
|
|
4
|
+
component: ProLabel,
|
|
9
5
|
args: {
|
|
10
|
-
|
|
6
|
+
mode: 'light',
|
|
7
|
+
height: 40
|
|
11
8
|
}
|
|
12
9
|
};
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
args: {
|
|
20
|
-
variant: 'transparent'
|
|
21
|
-
},
|
|
22
|
-
render: args => /*#__PURE__*/_jsx(Background, {
|
|
23
|
-
bg: "navy",
|
|
24
|
-
p: 8,
|
|
25
|
-
children: /*#__PURE__*/_jsx(ProLabel, {
|
|
26
|
-
...args
|
|
27
|
-
})
|
|
28
|
-
})
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Default = {
|
|
12
|
+
render: args => /*#__PURE__*/_jsx(ProLabel, {
|
|
13
|
+
...args
|
|
14
|
+
}),
|
|
15
|
+
name: 'ProLabel'
|
|
29
16
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProLogoAlt } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: ProLogoAlt,
|
|
5
|
+
argTypes: {
|
|
6
|
+
backgroundColor: {
|
|
7
|
+
control: {
|
|
8
|
+
type: 'select'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
textColor: {
|
|
12
|
+
control: {
|
|
13
|
+
type: 'select'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export const Default = {
|
|
20
|
+
render: args => /*#__PURE__*/_jsx(ProLogoAlt, {
|
|
21
|
+
...args
|
|
22
|
+
}),
|
|
23
|
+
name: 'ProLogoAlt'
|
|
24
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppBar, AppBarSection,
|
|
1
|
+
import { AppBar, AppBarSection, Logo } from '../../index';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
export default {
|
|
4
4
|
component: AppBar,
|
|
@@ -19,7 +19,7 @@ export const Header = {
|
|
|
19
19
|
render: () => /*#__PURE__*/_jsxs(AppBar, {
|
|
20
20
|
children: [/*#__PURE__*/_jsx(AppBarSection, {
|
|
21
21
|
position: "left",
|
|
22
|
-
children: /*#__PURE__*/_jsx(
|
|
22
|
+
children: /*#__PURE__*/_jsx(Logo, {})
|
|
23
23
|
}), /*#__PURE__*/_jsx(AppBarSection, {
|
|
24
24
|
position: "center",
|
|
25
25
|
children: "Pricing"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react';
|
|
2
|
+
import { LearningOutcomeAssessmentScores } from '../../LearningOutcomeAssessmentScores';
|
|
3
|
+
declare const meta: Meta<typeof LearningOutcomeAssessmentScores>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Example: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const NoScores: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LearningOutcomeAssessmentScores } from '../../LearningOutcomeAssessmentScores';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: LearningOutcomeAssessmentScores,
|
|
5
|
+
args: {}
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export const Example = () => {
|
|
9
|
+
return /*#__PURE__*/_jsx(LearningOutcomeAssessmentScores, {
|
|
10
|
+
highestScore: 100,
|
|
11
|
+
highestScoreAchievedAt: "10/01",
|
|
12
|
+
latestScore: 50,
|
|
13
|
+
latestScoreAchievedAt: "10/23"
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
export const NoScores = () => {
|
|
17
|
+
return /*#__PURE__*/_jsx(LearningOutcomeAssessmentScores, {
|
|
18
|
+
highestScore: null,
|
|
19
|
+
highestScoreAchievedAt: null,
|
|
20
|
+
latestScore: null,
|
|
21
|
+
latestScoreAchievedAt: null
|
|
22
|
+
});
|
|
23
|
+
};
|
|
@@ -3,8 +3,13 @@ import { LearningOutcomeCard } from '../../LearningOutcomeCard';
|
|
|
3
3
|
declare const meta: Meta<typeof LearningOutcomeCard>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LearningOutcomeCard>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Base: Story;
|
|
7
|
+
export declare const BaseCardWithHover: Story;
|
|
8
|
+
export declare const BaseCardWithTopics: Story;
|
|
7
9
|
export declare const EmphasizedCard: Story;
|
|
10
|
+
export declare const EmphasizedCardWithHover: Story;
|
|
11
|
+
export declare const EmphasizedCardWithTopics: Story;
|
|
8
12
|
export declare const EmphasizedCardWithProgress: Story;
|
|
9
13
|
export declare const EmphasizedCardWithProgress100: Story;
|
|
10
|
-
export declare const
|
|
14
|
+
export declare const EmphasizedCardWithProgressAnimation: Story;
|
|
15
|
+
export declare const EmphasizedCardWithProgress100Animation: Story;
|
|
@@ -1,75 +1,189 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlexBox } from '@codecademy/gamut';
|
|
2
2
|
import { LearningOutcomeCard } from '../../LearningOutcomeCard';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
const meta = {
|
|
5
5
|
component: LearningOutcomeCard,
|
|
6
6
|
args: {
|
|
7
|
+
outcome: 'Implement sorting algorithms in Java.'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Base = {
|
|
12
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
13
|
+
gap: 16,
|
|
14
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
15
|
+
...args,
|
|
16
|
+
level: 1
|
|
17
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
18
|
+
...args,
|
|
19
|
+
level: 2
|
|
20
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
21
|
+
...args,
|
|
22
|
+
level: 3
|
|
23
|
+
})]
|
|
24
|
+
}),
|
|
25
|
+
name: 'Base card'
|
|
26
|
+
};
|
|
27
|
+
export const BaseCardWithHover = {
|
|
28
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
29
|
+
gap: 16,
|
|
30
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
31
|
+
...args,
|
|
32
|
+
level: 1,
|
|
33
|
+
isInteractive: true
|
|
34
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
35
|
+
...args,
|
|
36
|
+
level: 2,
|
|
37
|
+
isInteractive: true
|
|
38
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
39
|
+
...args,
|
|
40
|
+
level: 3,
|
|
41
|
+
isInteractive: true
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
name: 'Base card with hover'
|
|
45
|
+
};
|
|
46
|
+
export const BaseCardWithTopics = {
|
|
47
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
48
|
+
gap: 16,
|
|
49
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
50
|
+
...args,
|
|
51
|
+
level: 1,
|
|
52
|
+
skills: [{
|
|
53
|
+
title: 'java'
|
|
54
|
+
}, {
|
|
55
|
+
title: 'skill'
|
|
56
|
+
}, {
|
|
57
|
+
title: 'computer science'
|
|
58
|
+
}]
|
|
59
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
60
|
+
...args,
|
|
61
|
+
level: 2,
|
|
62
|
+
skills: [{
|
|
63
|
+
title: 'java'
|
|
64
|
+
}, {
|
|
65
|
+
title: 'skill'
|
|
66
|
+
}, {
|
|
67
|
+
title: 'computer science'
|
|
68
|
+
}]
|
|
69
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
70
|
+
...args,
|
|
71
|
+
level: 3,
|
|
72
|
+
skills: [{
|
|
73
|
+
title: 'java'
|
|
74
|
+
}, {
|
|
75
|
+
title: 'skill'
|
|
76
|
+
}, {
|
|
77
|
+
title: 'computer science'
|
|
78
|
+
}]
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
name: 'Base card with topics'
|
|
82
|
+
};
|
|
83
|
+
export const EmphasizedCard = {
|
|
84
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
85
|
+
...args,
|
|
7
86
|
level: 1,
|
|
8
|
-
|
|
87
|
+
mode: "emphasized"
|
|
88
|
+
}),
|
|
89
|
+
name: 'Emphasized card'
|
|
90
|
+
};
|
|
91
|
+
export const EmphasizedCardWithHover = {
|
|
92
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
93
|
+
...args,
|
|
94
|
+
level: 2,
|
|
95
|
+
mode: "emphasized",
|
|
96
|
+
isInteractive: true
|
|
97
|
+
}),
|
|
98
|
+
name: 'Emphasized card with hover'
|
|
99
|
+
};
|
|
100
|
+
export const EmphasizedCardWithTopics = {
|
|
101
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
102
|
+
...args,
|
|
103
|
+
level: 3,
|
|
9
104
|
skills: [{
|
|
10
105
|
title: 'java'
|
|
11
106
|
}, {
|
|
12
107
|
title: 'skill'
|
|
13
108
|
}, {
|
|
14
109
|
title: 'computer science'
|
|
15
|
-
}]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export default meta;
|
|
19
|
-
export const Default = {
|
|
20
|
-
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
21
|
-
...args
|
|
110
|
+
}],
|
|
111
|
+
mode: "emphasized",
|
|
112
|
+
isInteractive: true
|
|
22
113
|
}),
|
|
23
|
-
name: '
|
|
24
|
-
};
|
|
25
|
-
export const EmphasizedCard = {
|
|
26
|
-
render: args => /*#__PURE__*/_jsx(Background, {
|
|
27
|
-
bg: "navy",
|
|
28
|
-
p: 24,
|
|
29
|
-
children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
30
|
-
emphasized: true,
|
|
31
|
-
...args
|
|
32
|
-
})
|
|
33
|
-
}),
|
|
34
|
-
name: 'Emphasized Card'
|
|
114
|
+
name: 'Emphasized card with topics'
|
|
35
115
|
};
|
|
36
116
|
export const EmphasizedCardWithProgress = {
|
|
37
|
-
render: args => /*#__PURE__*/_jsx(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
117
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
118
|
+
...args,
|
|
119
|
+
level: 2,
|
|
120
|
+
progress: 60,
|
|
121
|
+
skills: [{
|
|
122
|
+
title: 'java'
|
|
123
|
+
}, {
|
|
124
|
+
title: 'skill'
|
|
125
|
+
}, {
|
|
126
|
+
title: 'computer science'
|
|
127
|
+
}],
|
|
128
|
+
mode: "emphasized",
|
|
129
|
+
isInteractive: true
|
|
45
130
|
}),
|
|
46
|
-
name: 'Emphasized card
|
|
131
|
+
name: 'Emphasized card with progress'
|
|
47
132
|
};
|
|
48
133
|
export const EmphasizedCardWithProgress100 = {
|
|
49
|
-
render: args => /*#__PURE__*/_jsx(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
134
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
135
|
+
...args,
|
|
136
|
+
level: 3,
|
|
137
|
+
progress: 100,
|
|
138
|
+
skills: [{
|
|
139
|
+
title: 'java'
|
|
140
|
+
}, {
|
|
141
|
+
title: 'skill'
|
|
142
|
+
}, {
|
|
143
|
+
title: 'computer science'
|
|
144
|
+
}],
|
|
145
|
+
mode: "emphasized",
|
|
146
|
+
isInteractive: true
|
|
57
147
|
}),
|
|
58
|
-
name: 'Emphasized card
|
|
148
|
+
name: 'Emphasized card with 100% progress'
|
|
59
149
|
};
|
|
60
|
-
export const
|
|
61
|
-
render: args => /*#__PURE__*/_jsx(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
150
|
+
export const EmphasizedCardWithProgressAnimation = {
|
|
151
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
152
|
+
...args,
|
|
153
|
+
level: 2,
|
|
154
|
+
progress: 80,
|
|
155
|
+
progressUpdateData: {
|
|
156
|
+
previousProgress: 50,
|
|
157
|
+
progressDuration: 500
|
|
158
|
+
},
|
|
159
|
+
skills: [{
|
|
160
|
+
title: 'java'
|
|
161
|
+
}, {
|
|
162
|
+
title: 'skill'
|
|
163
|
+
}, {
|
|
164
|
+
title: 'computer science'
|
|
165
|
+
}],
|
|
166
|
+
mode: "emphasized"
|
|
167
|
+
}),
|
|
168
|
+
name: 'Emphasized card with progress with animation'
|
|
169
|
+
};
|
|
170
|
+
export const EmphasizedCardWithProgress100Animation = {
|
|
171
|
+
render: args => /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
172
|
+
...args,
|
|
173
|
+
level: 2,
|
|
174
|
+
progress: 100,
|
|
175
|
+
progressUpdateData: {
|
|
176
|
+
previousProgress: 50,
|
|
177
|
+
completionDelay: 500
|
|
178
|
+
},
|
|
179
|
+
skills: [{
|
|
180
|
+
title: 'java'
|
|
181
|
+
}, {
|
|
182
|
+
title: 'skill'
|
|
183
|
+
}, {
|
|
184
|
+
title: 'computer science'
|
|
185
|
+
}],
|
|
186
|
+
mode: "emphasized"
|
|
73
187
|
}),
|
|
74
|
-
name: 'Emphasized card
|
|
188
|
+
name: 'Emphasized card with 100% progress with animation'
|
|
75
189
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react';
|
|
2
|
+
import { LearningOutcomeFlyout } from '../../LearningOutcomeFlyout';
|
|
3
|
+
declare const meta: Meta<typeof LearningOutcomeFlyout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Example: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FillButton, FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { LearningOutcomeFlyout } from '../../LearningOutcomeFlyout';
|
|
4
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: LearningOutcomeFlyout,
|
|
7
|
+
args: {}
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Example = () => {
|
|
11
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
12
|
+
const toggleOpen = () => setIsExpanded(!isExpanded);
|
|
13
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
14
|
+
children: [/*#__PURE__*/_jsx(FillButton, {
|
|
15
|
+
onClick: toggleOpen,
|
|
16
|
+
children: "Open Flyout"
|
|
17
|
+
}), /*#__PURE__*/_jsx(FlexBox, {
|
|
18
|
+
width: "100%",
|
|
19
|
+
children: /*#__PURE__*/_jsx(LearningOutcomeFlyout, {
|
|
20
|
+
expanded: isExpanded,
|
|
21
|
+
learningOutcome: {
|
|
22
|
+
highestScore: 100,
|
|
23
|
+
highestScoreAchievedAt: '10/01',
|
|
24
|
+
latestScore: 68,
|
|
25
|
+
latestScoreAchievedAt: '10/01',
|
|
26
|
+
level: 2,
|
|
27
|
+
outcome: 'Understand the basics of React',
|
|
28
|
+
percentComplete: 75
|
|
29
|
+
},
|
|
30
|
+
onClose: () => setIsExpanded(false)
|
|
31
|
+
})
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
};
|
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": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.1d5fdc8d0a.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StyledSVGWrapper } from '../shared';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
export const LogoCodecademyMini = ({
|
|
4
|
-
height = 30,
|
|
5
|
-
...rest
|
|
6
|
-
}) => {
|
|
7
|
-
return /*#__PURE__*/_jsxs(StyledSVGWrapper, {
|
|
8
|
-
...rest,
|
|
9
|
-
height: height,
|
|
10
|
-
viewBox: "0 0 28 22",
|
|
11
|
-
children: [/*#__PURE__*/_jsx("title", {
|
|
12
|
-
children: "Codecademy Logo Mini"
|
|
13
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
14
|
-
d: "M19.1955 0.043956C19.1955 0.043956 19.1955 0.0659341 19.1955 0.043956C19.2179 0.0879121 19.2402 0.131868 19.2626 0.197802V21.7582C19.2626 21.8242 19.2402 21.8681 19.2179 21.8901C19.1732 21.9341 19.1285 21.956 19.0615 21.956H0.178771C0.134078 21.956 0.0893855 21.956 0.0670391 21.9341C0.0223464 21.8901 0 21.8462 0 21.7802V0.175824C0 0.0879121 0.0446927 0.021978 0.111732 0H19.0615C19.1061 0 19.1732 0.021978 19.1955 0.043956ZM17.095 19.6923V2.28571C17.095 2.1978 17.0503 2.13187 16.9832 2.10989H2.23464C2.1676 2.13187 2.12291 2.1978 2.12291 2.28571V19.6923C2.12291 19.7802 2.1676 19.8462 2.23464 19.8681H16.9832C17.0503 19.8462 17.095 19.7802 17.095 19.6923ZM27.7989 19.8681C27.933 19.8681 28 19.9341 28 20.0659V21.8022C28 21.9341 27.9106 22 27.7989 22H21.2737C21.1397 22 21.0726 21.9121 21.0726 21.8022V20.0659C21.0726 19.9341 21.162 19.8681 21.2737 19.8681H27.7989ZM8.08939 8.08791C9.47486 8.08791 10.5475 8.63736 11.2849 9.51648C11.3296 9.58242 11.352 9.71429 11.2626 9.78022L10.0559 10.8352C9.96648 10.9011 9.85475 10.8791 9.78771 10.7912C9.34078 10.2857 8.84916 10 8.08939 10C7.26257 10 6.63687 10.3956 6.36872 11.1648C6.21229 11.6264 6.1676 12.1538 6.1676 12.8571C6.1676 13.5604 6.21229 14.1099 6.36872 14.5714C6.63687 15.3626 7.26257 15.7582 8.08939 15.7582C8.84916 15.7582 9.31844 15.4725 9.78771 14.967C9.85475 14.8791 9.96648 14.8791 10.0559 14.9451L11.2626 16C11.352 16.0659 11.3296 16.1758 11.2849 16.2637C10.5475 17.1209 9.47486 17.6703 8.08939 17.6703C6.23464 17.6703 4.82682 16.7692 4.2905 15.1429C4.08939 14.5714 4 13.8462 4 12.8791C4 11.9121 4.08939 11.1868 4.2905 10.6154C4.82682 8.98901 6.23464 8.08791 8.08939 8.08791Z",
|
|
15
|
-
fill: "currentColor"
|
|
16
|
-
})]
|
|
17
|
-
});
|
|
18
|
-
};
|