@codecademy/brand 1.18.2-alpha.aa36eee39a.0 → 1.19.0-alpha.fb2b2ae470.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/LearningOutcomeSkillTile/index.d.ts +9 -0
- package/dist/LearningOutcomeSkillTile/index.js +128 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/stories/Molecules/LearningOutcomeSkillTile.stories.d.ts +9 -0
- package/dist/stories/Molecules/LearningOutcomeSkillTile.stories.js +109 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type SizeType = 'small' | 'normal';
|
|
2
|
+
interface LearningOutcomeSkillTileProps {
|
|
3
|
+
progressPercentage: number | undefined;
|
|
4
|
+
assessmentPercentage?: number;
|
|
5
|
+
hover?: boolean;
|
|
6
|
+
size?: SizeType;
|
|
7
|
+
}
|
|
8
|
+
export declare const LearningOutcomeSkillTile: React.FC<LearningOutcomeSkillTileProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
import { Box, FlexBox, Text } from '@codecademy/gamut';
|
|
3
|
+
import { SmallCheckIcon } from '@codecademy/gamut-icons';
|
|
4
|
+
import { variant } from '@codecademy/gamut-styles';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
var Progress = /*#__PURE__*/function (Progress) {
|
|
7
|
+
Progress["notStarted"] = "notStarted";
|
|
8
|
+
Progress["inProgress"] = "inProgress";
|
|
9
|
+
Progress["completed"] = "completed";
|
|
10
|
+
return Progress;
|
|
11
|
+
}(Progress || {});
|
|
12
|
+
const tileStyles = {
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
borderRadius: 'md',
|
|
16
|
+
borderColor: 'border-tertiary',
|
|
17
|
+
cursor: 'default',
|
|
18
|
+
position: 'relative'
|
|
19
|
+
};
|
|
20
|
+
const hoverVariants = hover => variant({
|
|
21
|
+
prop: 'progress',
|
|
22
|
+
variants: {
|
|
23
|
+
[Progress.notStarted]: {
|
|
24
|
+
'&:hover': {
|
|
25
|
+
bg: hover ? 'background-hover' : undefined
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
[Progress.inProgress]: {
|
|
29
|
+
'&:hover': {
|
|
30
|
+
bg: hover ? 'background-hover' : undefined
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
[Progress.completed]: {
|
|
34
|
+
'&:hover': {
|
|
35
|
+
bg: hover ? 'primary-hover' : undefined
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const sizeVariants = size => variant({
|
|
41
|
+
prop: 'progress',
|
|
42
|
+
base: {
|
|
43
|
+
border: size === 'small' ? 'none' : 2
|
|
44
|
+
},
|
|
45
|
+
variants: {
|
|
46
|
+
[Progress.notStarted]: {
|
|
47
|
+
width: size === 'small' ? 32 : 40,
|
|
48
|
+
height: size === 'small' ? 24 : 40
|
|
49
|
+
},
|
|
50
|
+
[Progress.inProgress]: {
|
|
51
|
+
width: size === 'small' ? 32 : 40,
|
|
52
|
+
height: size === 'small' ? 24 : 40
|
|
53
|
+
},
|
|
54
|
+
[Progress.completed]: {
|
|
55
|
+
width: size === 'small' ? 20 : 40,
|
|
56
|
+
height: size === 'small' ? 20 : 40
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const Tile = /*#__PURE__*/_styled(FlexBox, {
|
|
61
|
+
target: "e1io6ul10",
|
|
62
|
+
label: "Tile"
|
|
63
|
+
})(props => ({
|
|
64
|
+
...hoverVariants(props.hover)(props),
|
|
65
|
+
...sizeVariants(props.size)(props),
|
|
66
|
+
...variant({
|
|
67
|
+
prop: 'progress',
|
|
68
|
+
base: {
|
|
69
|
+
...tileStyles
|
|
70
|
+
},
|
|
71
|
+
variants: {
|
|
72
|
+
[Progress.notStarted]: {
|
|
73
|
+
bg: 'background-selected'
|
|
74
|
+
},
|
|
75
|
+
[Progress.inProgress]: {
|
|
76
|
+
bg: 'background-selected'
|
|
77
|
+
},
|
|
78
|
+
[Progress.completed]: {
|
|
79
|
+
bg: 'primary'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
})(props)
|
|
83
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MZWFybmluZ091dGNvbWVTa2lsbFRpbGUvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlFYSIsImZpbGUiOiIuLi8uLi9zcmMvTGVhcm5pbmdPdXRjb21lU2tpbGxUaWxlL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJveCwgRmxleEJveCwgVGV4dCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IFNtYWxsQ2hlY2tJY29uIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHsgdmFyaWFudCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmVudW0gUHJvZ3Jlc3Mge1xuICBub3RTdGFydGVkID0gJ25vdFN0YXJ0ZWQnLFxuICBpblByb2dyZXNzID0gJ2luUHJvZ3Jlc3MnLFxuICBjb21wbGV0ZWQgPSAnY29tcGxldGVkJyxcbn1cblxudHlwZSBTaXplVHlwZSA9ICdzbWFsbCcgfCAnbm9ybWFsJztcblxuaW50ZXJmYWNlIFRpbGVQcm9wcyB7XG4gIGhvdmVyOiBib29sZWFuO1xuICBwcm9ncmVzczogUHJv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PVwiYWJzb2x1dGVcIlxuICAgICAgICAgICAgdG9wPVwiLTIwJVwiXG4gICAgICAgICAgICByaWdodD1cIi0yMCVcIlxuICAgICAgICAgIC8+XG4gICAgICAgICl9XG4gICAgICA8L1RpbGU+XG4gICAgPC8+XG4gICk7XG59O1xuIl19 */");
|
|
84
|
+
const progressState = progressPercentage => {
|
|
85
|
+
if (!progressPercentage || progressPercentage === 0) {
|
|
86
|
+
return Progress.notStarted;
|
|
87
|
+
}
|
|
88
|
+
if (progressPercentage > 0 && progressPercentage < 100) {
|
|
89
|
+
return Progress.inProgress;
|
|
90
|
+
}
|
|
91
|
+
return Progress.completed;
|
|
92
|
+
};
|
|
93
|
+
export const LearningOutcomeSkillTile = _ref => {
|
|
94
|
+
let {
|
|
95
|
+
assessmentPercentage,
|
|
96
|
+
progressPercentage,
|
|
97
|
+
hover = false,
|
|
98
|
+
size = 'normal'
|
|
99
|
+
} = _ref;
|
|
100
|
+
const lowAssessment = assessmentPercentage && assessmentPercentage < 70;
|
|
101
|
+
const progress = progressState(progressPercentage);
|
|
102
|
+
const progressText = progress === Progress.inProgress ? `${progressPercentage}%` : '';
|
|
103
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
104
|
+
children: /*#__PURE__*/_jsxs(Tile, {
|
|
105
|
+
hover: hover,
|
|
106
|
+
progress: progress,
|
|
107
|
+
size: size,
|
|
108
|
+
children: [progress === Progress.completed ? /*#__PURE__*/_jsx(SmallCheckIcon, {
|
|
109
|
+
size: size === 'small' ? 12 : 16,
|
|
110
|
+
textColor: "background-contrast"
|
|
111
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
112
|
+
fontSize: 14,
|
|
113
|
+
fontWeight: 700,
|
|
114
|
+
children: progressText
|
|
115
|
+
}), size !== 'small' && lowAssessment && /*#__PURE__*/_jsx(Box, {
|
|
116
|
+
bg: "orange-500",
|
|
117
|
+
border: 2,
|
|
118
|
+
borderColor: "background-contrast",
|
|
119
|
+
borderRadius: "full",
|
|
120
|
+
height: 16,
|
|
121
|
+
width: 16,
|
|
122
|
+
position: "absolute",
|
|
123
|
+
top: "-20%",
|
|
124
|
+
right: "-20%"
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './Konamimojisplosion';
|
|
|
46
46
|
export * from './LandingPage';
|
|
47
47
|
export * from './LayoutMenu';
|
|
48
48
|
export * from './LearningOutcomeCard';
|
|
49
|
+
export * from './LearningOutcomeSkillTile';
|
|
49
50
|
export * from './lib/breakpointHooks';
|
|
50
51
|
export * from './ListSection';
|
|
51
52
|
export * from './Loading';
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export * from './Konamimojisplosion';
|
|
|
46
46
|
export * from './LandingPage';
|
|
47
47
|
export * from './LayoutMenu';
|
|
48
48
|
export * from './LearningOutcomeCard';
|
|
49
|
+
export * from './LearningOutcomeSkillTile';
|
|
49
50
|
export * from './lib/breakpointHooks';
|
|
50
51
|
export * from './ListSection';
|
|
51
52
|
export * from './Loading';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LearningOutcomeSkillTile } from '../../LearningOutcomeSkillTile';
|
|
3
|
+
declare const meta: Meta<typeof LearningOutcomeSkillTile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof LearningOutcomeSkillTile>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLowAssessments: Story;
|
|
8
|
+
export declare const Small: Story;
|
|
9
|
+
export declare const DarkMode: Story;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { Background } from '@codecademy/gamut-styles';
|
|
3
|
+
import { LearningOutcomeSkillTile } from '../../LearningOutcomeSkillTile';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: LearningOutcomeSkillTile,
|
|
7
|
+
args: {
|
|
8
|
+
progressPercentage: 50,
|
|
9
|
+
assessmentPercentage: 100,
|
|
10
|
+
size: 'normal'
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Default = {
|
|
15
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
16
|
+
gap: 16,
|
|
17
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
18
|
+
...args,
|
|
19
|
+
progressPercentage: 0,
|
|
20
|
+
hover: true
|
|
21
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
22
|
+
...args,
|
|
23
|
+
hover: true
|
|
24
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
25
|
+
...args,
|
|
26
|
+
progressPercentage: 100,
|
|
27
|
+
hover: true
|
|
28
|
+
})]
|
|
29
|
+
}),
|
|
30
|
+
name: 'Learning Outcome Skill Tile - Default'
|
|
31
|
+
};
|
|
32
|
+
export const WithLowAssessments = {
|
|
33
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
34
|
+
gap: 16,
|
|
35
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
36
|
+
...args,
|
|
37
|
+
progressPercentage: 0,
|
|
38
|
+
assessmentPercentage: 68,
|
|
39
|
+
hover: true
|
|
40
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
41
|
+
...args,
|
|
42
|
+
assessmentPercentage: 68,
|
|
43
|
+
hover: true
|
|
44
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
45
|
+
...args,
|
|
46
|
+
progressPercentage: 100,
|
|
47
|
+
assessmentPercentage: 68,
|
|
48
|
+
hover: true
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
name: 'Learning Outcome Skill Tile - Small'
|
|
52
|
+
};
|
|
53
|
+
export const Small = {
|
|
54
|
+
render: args => /*#__PURE__*/_jsxs(FlexBox, {
|
|
55
|
+
gap: 16,
|
|
56
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
57
|
+
...args,
|
|
58
|
+
progressPercentage: 0,
|
|
59
|
+
size: "small"
|
|
60
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
61
|
+
...args,
|
|
62
|
+
size: "small"
|
|
63
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
64
|
+
...args,
|
|
65
|
+
progressPercentage: 100,
|
|
66
|
+
size: "small"
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
69
|
+
name: 'Learning Outcome Skill Tile - Small'
|
|
70
|
+
};
|
|
71
|
+
export const DarkMode = {
|
|
72
|
+
render: args => /*#__PURE__*/_jsx(Background, {
|
|
73
|
+
bg: "navy",
|
|
74
|
+
p: 24,
|
|
75
|
+
children: /*#__PURE__*/_jsxs(FlexBox, {
|
|
76
|
+
gap: 16,
|
|
77
|
+
children: [/*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
78
|
+
...args,
|
|
79
|
+
progressPercentage: 0,
|
|
80
|
+
assessmentPercentage: 68,
|
|
81
|
+
hover: true
|
|
82
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
83
|
+
...args,
|
|
84
|
+
assessmentPercentage: 68,
|
|
85
|
+
hover: true
|
|
86
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
87
|
+
...args,
|
|
88
|
+
progressPercentage: 100,
|
|
89
|
+
assessmentPercentage: 68,
|
|
90
|
+
hover: true
|
|
91
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
92
|
+
...args,
|
|
93
|
+
progressPercentage: 0,
|
|
94
|
+
size: "small",
|
|
95
|
+
hover: true
|
|
96
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
97
|
+
...args,
|
|
98
|
+
size: "small",
|
|
99
|
+
hover: true
|
|
100
|
+
}), /*#__PURE__*/_jsx(LearningOutcomeSkillTile, {
|
|
101
|
+
...args,
|
|
102
|
+
progressPercentage: 100,
|
|
103
|
+
size: "small",
|
|
104
|
+
hover: true
|
|
105
|
+
})]
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
name: 'Learning Outcome Skill Tile - Dark Mode'
|
|
109
|
+
};
|
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.
|
|
4
|
+
"version": "1.19.0-alpha.fb2b2ae470.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|