@codecademy/brand 1.20.0-alpha.b7bd463f14.0 → 1.20.0-alpha.e0769eaa2f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppBarDeprecated/styles/index.module.scss +39 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
- package/dist/DropdownButton/index.d.ts +302 -51
- package/dist/DropdownButton/index.js +7 -7
- package/dist/EditorialImage/styles.module.scss +36 -0
- package/dist/GlobalFooter/FooterNavLinks/assets/download-on-the-app-store.svg +45 -0
- package/dist/GlobalFooter/FooterNavLinks/assets/get-it-on-google-play.png +0 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.ts +18 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.js +57 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.ts +10 -0
- package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.js +35 -0
- package/dist/LearningOutcomeBadges/index.d.ts +2 -0
- package/dist/LearningOutcomeBadges/index.js +2 -0
- package/dist/LearningOutcomePopover/index.d.ts +10 -0
- package/dist/LearningOutcomePopover/index.js +124 -0
- package/dist/LearningOutcomeTile/Tile.d.ts +7 -0
- package/dist/LearningOutcomeTile/Tile.js +79 -0
- package/dist/LearningOutcomeTile/index.d.ts +1 -8
- package/dist/LearningOutcomeTile/index.js +79 -92
- package/dist/LearningOutcomeTile/types.d.ts +47 -0
- package/dist/LearningOutcomeTile/types.js +11 -0
- package/dist/Loading/styles.module.scss +131 -0
- package/dist/NotFoundContent/404.svg +1 -0
- package/dist/assets/darkQuotes.svg +1 -0
- package/dist/assets/dots.svg +1 -0
- package/dist/assets/lightQuotes.svg +1 -0
- package/dist/assets/navyQuotes.svg +5 -0
- package/dist/assets/orange_squiggle.svg +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/png.d.ts +4 -0
- package/dist/react-freezeframe.d.ts +1 -0
- package/dist/stories/Molecules/DropdownButton.stories.d.ts +0 -5
- package/dist/stories/Molecules/DropdownButton.stories.js +3 -177
- package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.d.ts +6 -0
- package/dist/stories/Molecules/LearningOutcomeLevelBadge.stories.js +20 -0
- package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.d.ts +6 -0
- package/dist/stories/Molecules/LearningOutcomeLowAssessmentBadge.stories.js +10 -0
- package/dist/stories/Molecules/LearningOutcomePopover.stories.d.ts +5 -0
- package/dist/stories/Molecules/LearningOutcomePopover.stories.js +39 -0
- package/dist/stories/Molecules/LearningOutcomeTile.stories.d.ts +1 -0
- package/dist/stories/Molecules/LearningOutcomeTile.stories.js +192 -25
- package/dist/svg.d.ts +8 -0
- package/dist/theme.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Box, FlexBox } from '@codecademy/gamut';
|
|
2
|
-
import { SparkleIcon } from '@codecademy/gamut-icons';
|
|
3
1
|
import { DropdownButton } from '../../index';
|
|
4
|
-
import { jsx as _jsx
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
3
|
const items = [{
|
|
6
4
|
id: 'one',
|
|
7
5
|
text: 'I have an href',
|
|
@@ -11,197 +9,25 @@ const items = [{
|
|
|
11
9
|
text: 'I have an onClick',
|
|
12
10
|
// eslint-disable-next-line no-console
|
|
13
11
|
clickHandler: () => console.log('hi')
|
|
14
|
-
}
|
|
15
|
-
const extraItems = [{
|
|
12
|
+
}, {
|
|
16
13
|
id: 'three',
|
|
17
14
|
text: 'I have an href & onClick',
|
|
18
15
|
href: '#',
|
|
19
16
|
// eslint-disable-next-line no-console
|
|
20
17
|
clickHandler: () => console.log('hi')
|
|
21
|
-
}, {
|
|
22
|
-
id: 'four',
|
|
23
|
-
text: 'I have an href & onClick & icon',
|
|
24
|
-
href: '#',
|
|
25
|
-
// eslint-disable-next-line no-console
|
|
26
|
-
clickHandler: () => console.log('hi'),
|
|
27
|
-
icon: SparkleIcon
|
|
28
18
|
}];
|
|
29
19
|
const meta = {
|
|
30
20
|
component: DropdownButton,
|
|
31
21
|
args: {
|
|
32
22
|
buttonType: 'fill',
|
|
33
|
-
dropdownItems: items
|
|
34
|
-
variant: 'primary'
|
|
35
|
-
},
|
|
36
|
-
parameters: {
|
|
37
|
-
controls: {
|
|
38
|
-
include: ['align', 'buttonType', 'children', 'dropDownItems', 'horizontalOffset', 'iconSize', 'isMenu', 'onClick', 'size', 'tipProps', 'variant', 'verticalOffset']
|
|
39
|
-
}
|
|
23
|
+
dropdownItems: items
|
|
40
24
|
}
|
|
41
25
|
};
|
|
42
26
|
export default meta;
|
|
43
27
|
export const Default = {
|
|
44
|
-
args: {
|
|
45
|
-
dropdownItems: [...items, ...extraItems],
|
|
46
|
-
isMenu: false
|
|
47
|
-
},
|
|
48
28
|
render: args => /*#__PURE__*/_jsx(DropdownButton, {
|
|
49
29
|
...args,
|
|
50
30
|
children: "click me"
|
|
51
31
|
}),
|
|
52
32
|
name: 'DropdownButton'
|
|
53
|
-
};
|
|
54
|
-
export const DropdownButtonTypes = {
|
|
55
|
-
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
56
|
-
justifyContent: "space-between",
|
|
57
|
-
p: 40,
|
|
58
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
59
|
-
width: "fit-content",
|
|
60
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
61
|
-
...args,
|
|
62
|
-
buttonType: "fill",
|
|
63
|
-
children: "Fill"
|
|
64
|
-
})
|
|
65
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
66
|
-
width: "fit-content",
|
|
67
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
68
|
-
...args,
|
|
69
|
-
buttonType: "stroke",
|
|
70
|
-
children: "Stroke"
|
|
71
|
-
})
|
|
72
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
73
|
-
width: "fit-content",
|
|
74
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
75
|
-
...args,
|
|
76
|
-
buttonType: "text",
|
|
77
|
-
children: "Text"
|
|
78
|
-
})
|
|
79
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
80
|
-
width: "fit-content",
|
|
81
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
82
|
-
...args,
|
|
83
|
-
buttonType: "kebab"
|
|
84
|
-
})
|
|
85
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
86
|
-
width: "fit-content",
|
|
87
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
88
|
-
...args,
|
|
89
|
-
buttonType: "horizontalKebab"
|
|
90
|
-
})
|
|
91
|
-
})]
|
|
92
|
-
})
|
|
93
|
-
};
|
|
94
|
-
export const DropdownButtonVariants = {
|
|
95
|
-
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
96
|
-
justifyContent: "space-around",
|
|
97
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
98
|
-
width: "fit-content",
|
|
99
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
100
|
-
...args,
|
|
101
|
-
buttonType: "stroke",
|
|
102
|
-
children: "Stroke primary"
|
|
103
|
-
})
|
|
104
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
105
|
-
width: "fit-content",
|
|
106
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
107
|
-
...args,
|
|
108
|
-
buttonType: "stroke",
|
|
109
|
-
variant: "secondary",
|
|
110
|
-
children: "Stroke secondary"
|
|
111
|
-
})
|
|
112
|
-
})]
|
|
113
|
-
})
|
|
114
|
-
};
|
|
115
|
-
export const DropdownTextButtonSizes = {
|
|
116
|
-
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
117
|
-
justifyContent: "space-around",
|
|
118
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
119
|
-
alignSelf: "center",
|
|
120
|
-
width: "fit-content",
|
|
121
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
122
|
-
...args,
|
|
123
|
-
buttonType: "fill",
|
|
124
|
-
size: "small",
|
|
125
|
-
children: "Fill small"
|
|
126
|
-
})
|
|
127
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
128
|
-
alignSelf: "center",
|
|
129
|
-
width: "fit-content",
|
|
130
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
131
|
-
...args,
|
|
132
|
-
buttonType: "fill",
|
|
133
|
-
size: "normal",
|
|
134
|
-
children: "Fill normal"
|
|
135
|
-
})
|
|
136
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
137
|
-
alignSelf: "center",
|
|
138
|
-
width: "fit-content",
|
|
139
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
140
|
-
...args,
|
|
141
|
-
buttonType: "fill",
|
|
142
|
-
size: "large",
|
|
143
|
-
children: "Fill large"
|
|
144
|
-
})
|
|
145
|
-
})]
|
|
146
|
-
})
|
|
147
|
-
};
|
|
148
|
-
export const DropdownIconButtonSizes = {
|
|
149
|
-
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
150
|
-
row: true,
|
|
151
|
-
justifyContent: "space-around",
|
|
152
|
-
mt: 16,
|
|
153
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
154
|
-
alignSelf: "center",
|
|
155
|
-
width: "fit-content",
|
|
156
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
157
|
-
...args,
|
|
158
|
-
buttonType: "kebab",
|
|
159
|
-
size: "small",
|
|
160
|
-
iconSize: 12
|
|
161
|
-
})
|
|
162
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
163
|
-
alignSelf: "center",
|
|
164
|
-
width: "fit-content",
|
|
165
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
166
|
-
...args,
|
|
167
|
-
buttonType: "kebab",
|
|
168
|
-
size: "normal"
|
|
169
|
-
})
|
|
170
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
171
|
-
alignSelf: "center",
|
|
172
|
-
width: "fit-content",
|
|
173
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
174
|
-
...args,
|
|
175
|
-
buttonType: "kebab",
|
|
176
|
-
size: "large",
|
|
177
|
-
iconSize: 20
|
|
178
|
-
})
|
|
179
|
-
})]
|
|
180
|
-
})
|
|
181
|
-
};
|
|
182
|
-
export const DropdownPopoverAlignment = {
|
|
183
|
-
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
184
|
-
row: true,
|
|
185
|
-
justifyContent: "space-around",
|
|
186
|
-
mt: 16,
|
|
187
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
188
|
-
width: "fit-content",
|
|
189
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
190
|
-
...args,
|
|
191
|
-
buttonType: "text",
|
|
192
|
-
size: "small",
|
|
193
|
-
align: "left",
|
|
194
|
-
children: "Align left"
|
|
195
|
-
})
|
|
196
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
197
|
-
width: "fit-content",
|
|
198
|
-
children: /*#__PURE__*/_jsx(DropdownButton, {
|
|
199
|
-
...args,
|
|
200
|
-
buttonType: "text",
|
|
201
|
-
size: "small",
|
|
202
|
-
align: "right",
|
|
203
|
-
children: "Align right"
|
|
204
|
-
})
|
|
205
|
-
})]
|
|
206
|
-
})
|
|
207
33
|
};
|
|
@@ -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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
|
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
|
-
|
|
59
|
-
|
|
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
|
-
|
|
66
|
-
|
|
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
|
|
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
|
-
|
|
80
|
-
|
|
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
|
-
|
|
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
|
-
|
|
89
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
275
|
+
name: 'Learning Outcome Tile - Dark Mode'
|
|
109
276
|
};
|
package/dist/svg.d.ts
ADDED
package/dist/theme.d.ts
ADDED
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.
|
|
4
|
+
"version": "1.20.0-alpha.e0769eaa2f.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",
|