@coorpacademy/components 11.32.11 → 11.32.12
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/es/molecule/discipline-associated-skills/index.js +9 -9
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/discipline-associated-skills/style.css +7 -2
- package/es/template/skill-detail/index.d.ts +57 -0
- package/es/template/skill-detail/index.d.ts.map +1 -0
- package/es/template/skill-detail/index.js +248 -0
- package/es/template/skill-detail/index.js.map +1 -0
- package/es/template/skill-detail/style.css +172 -0
- package/lib/molecule/discipline-associated-skills/index.js +9 -9
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/discipline-associated-skills/style.css +7 -2
- package/lib/template/skill-detail/index.d.ts +57 -0
- package/lib/template/skill-detail/index.d.ts.map +1 -0
- package/lib/template/skill-detail/index.js +266 -0
- package/lib/template/skill-detail/index.js.map +1 -0
- package/lib/template/skill-detail/style.css +172 -0
- package/package.json +2 -2
|
@@ -19,19 +19,19 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
19
19
|
} = props;
|
|
20
20
|
const AnchorElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
21
21
|
className: style.chipFocusedContent
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22
|
+
}, skill.focused ? /*#__PURE__*/React.createElement(Icon, {
|
|
23
23
|
iconName: "bullseye-arrow",
|
|
24
24
|
backgroundColor: "#DDD1FF",
|
|
25
25
|
size: {
|
|
26
26
|
faSize: 12,
|
|
27
27
|
wrapperSize: 12
|
|
28
28
|
}
|
|
29
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
30
30
|
className: style.chipFocusedContentText
|
|
31
|
-
}, skill)), []);
|
|
31
|
+
}, skill.locale)), []);
|
|
32
32
|
const TooltipContentElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: style.tooltipContentWrapper
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))), /*#__PURE__*/React.createElement("div", null, skill)), []);
|
|
34
|
+
}, skill.focused ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/React.createElement("div", null, skill.locale)), []);
|
|
35
35
|
return !_isEmpty(skills) ? /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
"data-name": "discipline-associated-skills",
|
|
37
37
|
className: style.associatedSkillsWrapper
|
|
@@ -45,26 +45,26 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function handleAnchorElement() {
|
|
48
|
-
return AnchorElement(skill
|
|
48
|
+
return AnchorElement(skill);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function handleTooltipContentElement() {
|
|
52
|
-
return TooltipContentElement(skill
|
|
52
|
+
return TooltipContentElement(skill);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
key: _uniqueId(),
|
|
57
57
|
className: classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused),
|
|
58
58
|
onClick: handleSkillClick
|
|
59
|
-
},
|
|
59
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
60
60
|
AnchorElement: handleAnchorElement,
|
|
61
61
|
fontSize: 12,
|
|
62
62
|
delayHide: 0,
|
|
63
63
|
iconContainerClassName: style.infoIconTooltip,
|
|
64
|
-
tooltipClassName: style.tooltip,
|
|
64
|
+
tooltipClassName: skill.focused ? style.tooltipSkillFocused : style.tooltip,
|
|
65
65
|
TooltipContent: handleTooltipContentElement,
|
|
66
66
|
closeToolTipInformationTextAriaLabel: translate('close_tooltip_information')
|
|
67
|
-
})
|
|
67
|
+
}));
|
|
68
68
|
})))) : null;
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","faSize","wrapperSize","chipFocusedContentText","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n return onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAo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E;MACE,GAAG,EAAE,WADP;MAEE,SAAS,EAAEb,UAAU,CAACK,KAAK,CAACwB,WAAP,EAAoBhB,KAAK,CAACE,OAAN,IAAiBV,KAAK,CAACyB,kBAA3C,CAFvB;MAGE,OAAO,EAAEL;IAHX,gBAKE,oBAAC,OAAD;MACE,aAAa,EAAEE,mBADjB;MAEE,QAAQ,EAAE,EAFZ;MAGE,SAAS,EAAE,CAHb;MAIE,sBAAsB,EAAEtB,KAAK,CAAC0B,eAJhC;MAKE,gBAAgB,EAAElB,KAAK,CAACE,OAAN,GAAgBV,KAAK,CAAC2B,mBAAtB,GAA4C3B,KAAK,CAAC4B,OALtE;MAME,cAAc,EAAEL,2BANlB;MAOE,oCAAoC,EAAEnB,SAAS,CAAC,2BAAD;IAPjD,EALF,CADF;EAiBD,CA3BA,CADH,CADF,CADF,CADK,GAmCH,IAnCJ;AAoCD,CA1ED;;AA4EAH,0BAA0B,CAAC4B,YAA3B,GAA0C;EACxCzB,SAAS,EAAEN,QAAQ,CAACgC,iBAAT,CAA2B1B;AADE,CAA1C;AAIAH,0BAA0B,CAAC8B,SAA3B,2CAAuC;EACrC1B,MAAM,EAAEX,SAAS,CAACsC,OAAV,CACNtC,SAAS,CAACuC,KAAV,CAAgB;IACdZ,GAAG,EAAE3B,SAAS,CAACwC,MADD;IAEdpB,MAAM,EAAEpB,SAAS,CAACwC,MAFJ;IAGdxB,OAAO,EAAEhB,SAAS,CAACyC;EAHL,CAAhB,CADM,CAD6B;EAQrC7B,YAAY,EAAEZ,SAAS,CAAC0C;AARa,CAAvC;AAWA,eAAenC,0BAAf"}
|
|
@@ -55,13 +55,14 @@
|
|
|
55
55
|
background-color: transparent;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.tooltip
|
|
58
|
+
.tooltip,
|
|
59
|
+
.tooltipSkillFocused {
|
|
59
60
|
width: fit-content;
|
|
60
61
|
color: #FFF;
|
|
61
62
|
font-size: 12px;
|
|
62
63
|
font-style: normal;
|
|
63
64
|
line-height: 16px;
|
|
64
|
-
top: -
|
|
65
|
+
top: -48px;
|
|
65
66
|
|
|
66
67
|
p {
|
|
67
68
|
padding: 8px 8px;
|
|
@@ -69,6 +70,10 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
.tooltipSkillFocused {
|
|
74
|
+
top: -64px;
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
.tooltipContentWrapper {
|
|
73
78
|
padding: 8px 12px;
|
|
74
79
|
text-align: left;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default SkillDetail;
|
|
2
|
+
declare function SkillDetail(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace SkillDetail {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
common: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
+
logo: PropTypes.Requireable<any>;
|
|
12
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
+
login: PropTypes.Requireable<any>;
|
|
14
|
+
}>>;
|
|
15
|
+
icons: PropTypes.Requireable<{
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
mod: PropTypes.Requireable<{
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
courses: PropTypes.Requireable<any[]>;
|
|
22
|
+
texts: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
}>>;
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
}
|
|
28
|
+
namespace propTypes {
|
|
29
|
+
const title: PropTypes.Validator<string>;
|
|
30
|
+
const description: PropTypes.Requireable<string>;
|
|
31
|
+
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
|
+
score: PropTypes.Requireable<number>;
|
|
33
|
+
content: PropTypes.Requireable<number>;
|
|
34
|
+
questionsToReview: PropTypes.Requireable<number>;
|
|
35
|
+
contentCompleted: PropTypes.Requireable<number>;
|
|
36
|
+
}>>;
|
|
37
|
+
const focused: PropTypes.Requireable<boolean>;
|
|
38
|
+
const availableForReview: PropTypes.Requireable<boolean>;
|
|
39
|
+
const ongoingCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
|
+
title: PropTypes.Requireable<string>;
|
|
41
|
+
provider: PropTypes.Requireable<string>;
|
|
42
|
+
progress: PropTypes.Requireable<number>;
|
|
43
|
+
}> | null | undefined)[]>;
|
|
44
|
+
const skillIncludedCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
45
|
+
title: PropTypes.Requireable<string>;
|
|
46
|
+
type: PropTypes.Requireable<string>;
|
|
47
|
+
provider: PropTypes.Requireable<string>;
|
|
48
|
+
progress: PropTypes.Requireable<number>;
|
|
49
|
+
}> | null | undefined)[]>;
|
|
50
|
+
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
+
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
+
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
+
const onCourseClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
import PropTypes from "prop-types";
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AAuDA,oEA6IC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import _get from "lodash/fp/get";
|
|
2
|
+
import React, { useCallback, useState } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { convert } from 'css-color-function';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import Provider from '../../atom/provider';
|
|
7
|
+
import ButtonLink from '../../atom/button-link';
|
|
8
|
+
import Icon from '../../atom/icon';
|
|
9
|
+
import style from './style.css';
|
|
10
|
+
|
|
11
|
+
const ContinueLearningButton = (props, context) => {
|
|
12
|
+
const [hovered, setHovered] = useState(false);
|
|
13
|
+
const {
|
|
14
|
+
onClick
|
|
15
|
+
} = props;
|
|
16
|
+
const {
|
|
17
|
+
skin,
|
|
18
|
+
translate
|
|
19
|
+
} = context;
|
|
20
|
+
|
|
21
|
+
const primarySkinColor = _get('common.primary', skin);
|
|
22
|
+
|
|
23
|
+
const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
|
|
24
|
+
const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
onMouseOver: handleMouseOver,
|
|
27
|
+
onMouseLeave: handleMouseLeave
|
|
28
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
29
|
+
label: translate('continue_learning'),
|
|
30
|
+
type: "primary",
|
|
31
|
+
customStyle: {
|
|
32
|
+
width: 'fit-content',
|
|
33
|
+
borderRadius: '12px',
|
|
34
|
+
backgroundColor: hovered ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
|
|
35
|
+
},
|
|
36
|
+
icon: {
|
|
37
|
+
position: 'left',
|
|
38
|
+
faIcon: {
|
|
39
|
+
name: 'play',
|
|
40
|
+
color: '#FFFFFF',
|
|
41
|
+
size: 16
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
onClick: onClick
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
ContinueLearningButton.contextTypes = {
|
|
49
|
+
skin: Provider.childContextTypes.skin,
|
|
50
|
+
translate: Provider.childContextTypes.translate
|
|
51
|
+
};
|
|
52
|
+
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
53
|
+
onClick: PropTypes.func
|
|
54
|
+
} : {};
|
|
55
|
+
|
|
56
|
+
const SkillDetail = (props, context) => {
|
|
57
|
+
const {
|
|
58
|
+
title,
|
|
59
|
+
description,
|
|
60
|
+
metrics,
|
|
61
|
+
focused,
|
|
62
|
+
availableForReview,
|
|
63
|
+
ongoingCourses,
|
|
64
|
+
skillIncludedCourses,
|
|
65
|
+
onBackClick,
|
|
66
|
+
onReviewClick,
|
|
67
|
+
onContinueLearningClick,
|
|
68
|
+
onCourseClick
|
|
69
|
+
} = props;
|
|
70
|
+
const {
|
|
71
|
+
score,
|
|
72
|
+
content,
|
|
73
|
+
questionsToReview,
|
|
74
|
+
contentCompleted = 0
|
|
75
|
+
} = metrics;
|
|
76
|
+
const {
|
|
77
|
+
skin,
|
|
78
|
+
translate
|
|
79
|
+
} = context;
|
|
80
|
+
const [showMore, setShowMore] = useState(false);
|
|
81
|
+
const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
82
|
+
const Description = useCallback(() => {
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: classnames(style.description, !showMore && style.truncate)
|
|
85
|
+
}, description);
|
|
86
|
+
});
|
|
87
|
+
const ProgressBar = useCallback(() => {
|
|
88
|
+
if (score === undefined) return null;
|
|
89
|
+
const progressBarColor = '#3EC483';
|
|
90
|
+
const inlineProgressValueStyle = {
|
|
91
|
+
backgroundColor: progressBarColor,
|
|
92
|
+
width: `${score}%`
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: style.progressBarWrapper
|
|
96
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
"data-name": "progress",
|
|
98
|
+
className: style.progress,
|
|
99
|
+
style: inlineProgressValueStyle,
|
|
100
|
+
role: "progressbar"
|
|
101
|
+
}));
|
|
102
|
+
}, [score]);
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: style.backgroundContainer
|
|
105
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: style.container
|
|
107
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: style.backButtonWrapper,
|
|
109
|
+
onClick: onBackClick
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
111
|
+
iconName: "arrow-left",
|
|
112
|
+
size: {
|
|
113
|
+
faSize: 14,
|
|
114
|
+
wrapperSize: 14
|
|
115
|
+
}
|
|
116
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
className: style.ctaContainer
|
|
118
|
+
}, focused ? /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: style.skillFocusBadge
|
|
120
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
121
|
+
iconName: "bullseye-arrow",
|
|
122
|
+
backgroundColor: "#DDD1FF",
|
|
123
|
+
size: {
|
|
124
|
+
faSize: 10,
|
|
125
|
+
wrapperSize: 16
|
|
126
|
+
}
|
|
127
|
+
}), translate('skill_focus')) : null, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: style.ctaWrapper
|
|
129
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
130
|
+
type: "secondary",
|
|
131
|
+
onClick: onReviewClick,
|
|
132
|
+
label: translate('review_this_skill'),
|
|
133
|
+
disabled: !availableForReview,
|
|
134
|
+
customStyle: {
|
|
135
|
+
width: 'fit-content',
|
|
136
|
+
borderRadius: '12px'
|
|
137
|
+
}
|
|
138
|
+
}), /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
139
|
+
onClick: onContinueLearningClick
|
|
140
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: style.title
|
|
142
|
+
}, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: style.showMoreWrapper,
|
|
144
|
+
onClick: handleShowMore
|
|
145
|
+
}, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/React.createElement(Icon, {
|
|
146
|
+
iconName: showMore ? "chevron-up" : "chevron-down",
|
|
147
|
+
size: {
|
|
148
|
+
faSize: 14,
|
|
149
|
+
wrapperSize: 16
|
|
150
|
+
}
|
|
151
|
+
})) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: style.progressInformationsWrapper
|
|
153
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
className: style.progressTitle
|
|
155
|
+
}, translate('your_progress')), /*#__PURE__*/React.createElement("div", {
|
|
156
|
+
className: style.skillCoursesAndQuestionsWrapper
|
|
157
|
+
}, content ? /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
className: style.skillInformation,
|
|
159
|
+
"data-name": "skill-courses"
|
|
160
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
161
|
+
className: style.skillInformationNumber
|
|
162
|
+
}, content), " ", translate('courses')) : null, questionsToReview ? /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: style.skillInformation,
|
|
164
|
+
"data-name": "skill-questions"
|
|
165
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
166
|
+
className: style.skillInformationNumber
|
|
167
|
+
}, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/React.createElement(ProgressBar, null), /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: style.progressInformations
|
|
169
|
+
}, content && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
170
|
+
className: style.progressInformation,
|
|
171
|
+
"data-name": "skill-completed-courses"
|
|
172
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
173
|
+
className: style.progressInformationNumber
|
|
174
|
+
}, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/React.createElement("div", {
|
|
175
|
+
className: style.progressInformation,
|
|
176
|
+
"data-name": "completed-percentage"
|
|
177
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
178
|
+
className: style.progressInformationNumber
|
|
179
|
+
}, score, "%"))))), /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
180
|
+
ongoingCourses: ongoingCourses,
|
|
181
|
+
onCourseClick: onCourseClick
|
|
182
|
+
})));
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
SkillDetail.contextTypes = {
|
|
186
|
+
skin: Provider.childContextTypes.skin,
|
|
187
|
+
translate: Provider.childContextTypes.translate
|
|
188
|
+
};
|
|
189
|
+
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
190
|
+
title: PropTypes.string.isRequired,
|
|
191
|
+
description: PropTypes.string,
|
|
192
|
+
metrics: PropTypes.shape({
|
|
193
|
+
score: PropTypes.number,
|
|
194
|
+
content: PropTypes.number,
|
|
195
|
+
questionsToReview: PropTypes.number,
|
|
196
|
+
contentCompleted: PropTypes.number
|
|
197
|
+
}),
|
|
198
|
+
focused: PropTypes.bool,
|
|
199
|
+
availableForReview: PropTypes.bool,
|
|
200
|
+
ongoingCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
201
|
+
title: PropTypes.string,
|
|
202
|
+
provider: PropTypes.string,
|
|
203
|
+
progress: PropTypes.number
|
|
204
|
+
})),
|
|
205
|
+
skillIncludedCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
206
|
+
title: PropTypes.string,
|
|
207
|
+
type: PropTypes.string,
|
|
208
|
+
provider: PropTypes.string,
|
|
209
|
+
progress: PropTypes.number
|
|
210
|
+
})),
|
|
211
|
+
onBackClick: PropTypes.func,
|
|
212
|
+
onReviewClick: PropTypes.func,
|
|
213
|
+
onContinueLearningClick: PropTypes.func,
|
|
214
|
+
onCourseClick: PropTypes.func
|
|
215
|
+
} : {};
|
|
216
|
+
export default SkillDetail;
|
|
217
|
+
|
|
218
|
+
const ContinueLearning = (props, context) => {
|
|
219
|
+
const {
|
|
220
|
+
ongoingCourses,
|
|
221
|
+
onCourseClick
|
|
222
|
+
} = props;
|
|
223
|
+
const {
|
|
224
|
+
skin,
|
|
225
|
+
translate
|
|
226
|
+
} = context;
|
|
227
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
228
|
+
className: style.continueLearningWrapper
|
|
229
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
230
|
+
className: style.continueLearningTitle
|
|
231
|
+
}, translate('continue_learning')), /*#__PURE__*/React.createElement("span", {
|
|
232
|
+
className: style.continueLearningNumber
|
|
233
|
+
}, ongoingCourses.length));
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
ContinueLearning.contextTypes = {
|
|
237
|
+
skin: Provider.childContextTypes.skin,
|
|
238
|
+
translate: Provider.childContextTypes.translate
|
|
239
|
+
};
|
|
240
|
+
ContinueLearning.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
241
|
+
ongoingCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
242
|
+
title: PropTypes.string,
|
|
243
|
+
provider: PropTypes.string,
|
|
244
|
+
progress: PropTypes.number
|
|
245
|
+
})),
|
|
246
|
+
onCourseClick: PropTypes.func
|
|
247
|
+
} : {};
|
|
248
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","ButtonLink","Icon","style","ContinueLearningButton","props","context","hovered","setHovered","onClick","skin","translate","primarySkinColor","handleMouseOver","handleMouseLeave","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","func","SkillDetail","title","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","onBackClick","onReviewClick","onContinueLearningClick","onCourseClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","ctaWrapper","length","showMoreWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","arrayOf","provider","type","ContinueLearning","continueLearningWrapper","continueLearningTitle","continueLearningNumber"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n label={translate('continue_learning')}\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n description,\n metrics,\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n onCourseClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n });\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton onClick={onContinueLearningClick} />\n </div>\n </div>\n <div className={style.title}>{title}</div>\n {description ? \n <>\n <Description />\n {description.length >= 226 ? \n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? \"chevron-up\" : \"chevron-down\"}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div> : null}\n </> \n : null}\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} onCourseClick={onCourseClick} />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n skillIncludedCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n type: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n onCourseClick: PropTypes.func\n};\n\nexport default SkillDetail;\n\nconst ContinueLearning = (props, context) => {\n const {\n ongoingCourses,\n onCourseClick\n } = props;\n const {skin, translate} = context;\n\n return (\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('continue_learning')}</span>\n <span className={style.continueLearningNumber}>\n {ongoingCourses.length}\n </span>\n </div>\n )\n}\n\nContinueLearning.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearning.propTypes = {\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onCourseClick: PropTypes.func\n};\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBZ,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACa;EAAD,IAAYJ,KAAlB;EACA,MAAM;IAACK,IAAD;IAAOC;EAAP,IAAoBL,OAA1B;;EACA,MAAMM,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,MAAMG,eAAe,GAAGlB,WAAW,CAAC,MAAMa,UAAU,CAAC,IAAD,CAAjB,EAAyB,CAACA,UAAD,CAAzB,CAAnC;EAEA,MAAMM,gBAAgB,GAAGnB,WAAW,CAAC,MAAMa,UAAU,CAAC,KAAD,CAAjB,EAA0B,CAACA,UAAD,CAA1B,CAApC;EAEA,oBACE;IAAK,WAAW,EAAEK,eAAlB;IAAmC,YAAY,EAAEC;EAAjD,gBACE,oBAAC,UAAD;IACE,KAAK,EAAEH,SAAS,CAAC,mBAAD,CADlB;IAEE,IAAI,EAAC,SAFP;IAGE,WAAW,EAAE;MACXI,KAAK,EAAE,aADI;MAEXC,YAAY,EAAE,MAFH;MAGXC,eAAe,EAAEV,OAAO,GACpBT,OAAO,CAAE,YAAWc,gBAAiB,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CAA2Bd,IADH;EAE9BC,SAAS,EAAEX,QAAQ,CAACwB,iBAAT,CAA2Bb;AAFR,CAAhC;AAKAqE,gBAAgB,CAACvD,SAAjB,2CAA6B;EAC3BQ,cAAc,EAAEpC,SAAS,CAACgF,OAAV,CACdhF,SAAS,CAAC6E,KAAV,CAAgB;IACd9C,KAAK,EAAE/B,SAAS,CAAC2E,MADH;IAEdM,QAAQ,EAAEjF,SAAS,CAAC2E,MAFN;IAGdnB,QAAQ,EAAExD,SAAS,CAAC8E;EAHN,CAAhB,CADc,CADW;EAQ3BrC,aAAa,EAAEzC,SAAS,CAAC6B;AARE,CAA7B"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value xtraLightGrey from colors;
|
|
3
|
+
@value cm_grey_100 from colors;
|
|
4
|
+
@value cm_grey_400 from colors;
|
|
5
|
+
|
|
6
|
+
.textBase {
|
|
7
|
+
font-family: "Gilroy";
|
|
8
|
+
font-style: normal;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.backgroundContainer {
|
|
12
|
+
background-color: white;
|
|
13
|
+
min-height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container {
|
|
18
|
+
composes: textBase;
|
|
19
|
+
background-color: white;
|
|
20
|
+
font-family: "Gilroy";
|
|
21
|
+
font-style: normal;
|
|
22
|
+
margin-top: 48px;
|
|
23
|
+
margin-bottom: 48px;
|
|
24
|
+
margin-left: auto;
|
|
25
|
+
margin-right: auto;
|
|
26
|
+
padding: 0 16px;
|
|
27
|
+
position: relative;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
min-height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: calc(1080px + 32px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.backButtonWrapper {
|
|
35
|
+
margin-bottom: 16px;
|
|
36
|
+
background-color: cm_grey_100;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
width: fit-content;
|
|
39
|
+
padding: 8px;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ctaContainer {
|
|
44
|
+
display: flex;
|
|
45
|
+
width: 100%;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.skillFocusBadge {
|
|
50
|
+
display: flex;
|
|
51
|
+
height: 12px;
|
|
52
|
+
width: fit-content;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background-color: #DDD1FF;
|
|
55
|
+
border-radius: 24px;
|
|
56
|
+
padding: 4px 8px;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
line-height: 16px;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
color: #3900D6;
|
|
61
|
+
margin-right: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ctaWrapper,
|
|
65
|
+
.showMoreWrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.showMoreWrapper {
|
|
71
|
+
align-items: center;
|
|
72
|
+
margin-top: 8px;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.title {
|
|
78
|
+
font-size: 24px;
|
|
79
|
+
font-weight: 700;
|
|
80
|
+
line-height: 32px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.description {
|
|
84
|
+
margin-top: 8px;
|
|
85
|
+
max-width: 734px;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
color: cm_grey_400;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.truncate {
|
|
93
|
+
display: -webkit-box;
|
|
94
|
+
-webkit-line-clamp: 2;
|
|
95
|
+
-webkit-box-orient: vertical;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.progressInformationsWrapper {
|
|
101
|
+
margin-top: 40px;
|
|
102
|
+
background-color: xtraLightGrey;
|
|
103
|
+
border-radius: 16px;
|
|
104
|
+
padding: 24px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.progressTitle {
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
line-height: 22px;
|
|
111
|
+
margin-bottom: 16px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.skillCoursesAndQuestionsWrapper,
|
|
115
|
+
.progressInformations {
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
margin-bottom: 8px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.skillInformation,
|
|
122
|
+
.progressInformation {
|
|
123
|
+
composes: textBase;
|
|
124
|
+
font-weight: 600;
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
line-height: 20px;
|
|
127
|
+
color: cm_grey_400;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.skillInformationNumber,
|
|
131
|
+
.progressInformationNumber {
|
|
132
|
+
color: #000;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.progressBarWrapper {
|
|
136
|
+
position: relative;
|
|
137
|
+
left: 0;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 4px;
|
|
140
|
+
border-radius: 2px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
background-color: cm_grey_100;
|
|
143
|
+
margin: 16px 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.progress {
|
|
147
|
+
display: block;
|
|
148
|
+
height: 8px;
|
|
149
|
+
animation: progressbar 2s ease-in-out;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Continue Learning */
|
|
153
|
+
.continueLearningWrapper {
|
|
154
|
+
margin-top: 40px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.continueLearningTitle {
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
font-weight: 600;
|
|
160
|
+
line-height: 22px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.continueLearningNumber {
|
|
164
|
+
border-radius: 50%;
|
|
165
|
+
background-color: #EAEAEB;
|
|
166
|
+
color: #515161;
|
|
167
|
+
padding: 2px 4px;
|
|
168
|
+
margin-left: 8px;
|
|
169
|
+
font-size: 10px;
|
|
170
|
+
font-weight: 600;
|
|
171
|
+
line-height: 12px;
|
|
172
|
+
}
|
|
@@ -39,19 +39,19 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
39
39
|
} = props;
|
|
40
40
|
const AnchorElement = (0, _react.useCallback)(skill => /*#__PURE__*/_react.default.createElement("div", {
|
|
41
41
|
className: _style.default.chipFocusedContent
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
42
|
+
}, skill.focused ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
43
43
|
iconName: "bullseye-arrow",
|
|
44
44
|
backgroundColor: "#DDD1FF",
|
|
45
45
|
size: {
|
|
46
46
|
faSize: 12,
|
|
47
47
|
wrapperSize: 12
|
|
48
48
|
}
|
|
49
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
}) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
50
|
className: _style.default.chipFocusedContentText
|
|
51
|
-
}, skill)), []);
|
|
51
|
+
}, skill.locale)), []);
|
|
52
52
|
const TooltipContentElement = (0, _react.useCallback)(skill => /*#__PURE__*/_react.default.createElement("div", {
|
|
53
53
|
className: _style.default.tooltipContentWrapper
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("b", null, translate('skill_focused_chip_tooltip'))), /*#__PURE__*/_react.default.createElement("div", null, skill)), []);
|
|
54
|
+
}, skill.focused ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/_react.default.createElement("div", null, skill.locale)), []);
|
|
55
55
|
return !(0, _isEmpty2.default)(skills) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
56
56
|
"data-name": "discipline-associated-skills",
|
|
57
57
|
className: _style.default.associatedSkillsWrapper
|
|
@@ -65,26 +65,26 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function handleAnchorElement() {
|
|
68
|
-
return AnchorElement(skill
|
|
68
|
+
return AnchorElement(skill);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function handleTooltipContentElement() {
|
|
72
|
-
return TooltipContentElement(skill
|
|
72
|
+
return TooltipContentElement(skill);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
76
|
key: (0, _uniqueId2.default)(),
|
|
77
77
|
className: (0, _classnames.default)(_style.default.chipWrapper, skill.focused && _style.default.chipWrapperFocused),
|
|
78
78
|
onClick: handleSkillClick
|
|
79
|
-
},
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
80
80
|
AnchorElement: handleAnchorElement,
|
|
81
81
|
fontSize: 12,
|
|
82
82
|
delayHide: 0,
|
|
83
83
|
iconContainerClassName: _style.default.infoIconTooltip,
|
|
84
|
-
tooltipClassName: _style.default.tooltip,
|
|
84
|
+
tooltipClassName: skill.focused ? _style.default.tooltipSkillFocused : _style.default.tooltip,
|
|
85
85
|
TooltipContent: handleTooltipContentElement,
|
|
86
86
|
closeToolTipInformationTextAriaLabel: translate('close_tooltip_information')
|
|
87
|
-
})
|
|
87
|
+
}));
|
|
88
88
|
})))) : null;
|
|
89
89
|
};
|
|
90
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","useCallback","skill","style","chipFocusedContent","faSize","wrapperSize","chipFocusedContentText","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","
|
|
1
|
+
{"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","useCallback","skill","style","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","classnames","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n return onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC;EAAd,IAA8BJ,KAApC;EAEA,MAAMK,aAAa,GAAG,IAAAC,kBAAA,EACpBC,KAAK,iBACH;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,GACGF,KAAK,CAACG,OAAN,gBACC,6BAAC,aAAD;IACE,QAAQ,EAAC,gBADX;IAEE,eAAe,EAAC,SAFlB;IAGE,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT;EAHR,EADD,GASG,IAVN,eAWE;IAAK,SAAS,EAAEJ,cAAA,CAAM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CpB,cAAA,CAAMqB,OALtE;MAME,cAAc,EAAEN,2BANlB;MAOE,oCAAoC,EAAErB,SAAS,CAAC,2BAAD;IAPjD,EALF,CADF;EAiBD,CA3BA,CADH,CADF,CADF,CADK,GAmCH,IAnCJ;AAoCD,CA1ED;;AA4EAH,0BAA0B,CAAC+B,YAA3B,GAA0C;EACxC5B,SAAS,EAAE6B,iBAAA,CAASC,iBAAT,CAA2B9B;AADE,CAA1C;AAIAH,0BAA0B,CAACkC,SAA3B,2CAAuC;EACrC9B,MAAM,EAAE+B,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUE,KAAV,CAAgB;IACdf,GAAG,EAAEa,kBAAA,CAAUG,MADD;IAEdvB,MAAM,EAAEoB,kBAAA,CAAUG,MAFJ;IAGd3B,OAAO,EAAEwB,kBAAA,CAAUI;EAHL,CAAhB,CADM,CAD6B;EAQrClC,YAAY,EAAE8B,kBAAA,CAAUK;AARa,CAAvC;eAWexC,0B"}
|
|
@@ -55,13 +55,14 @@
|
|
|
55
55
|
background-color: transparent;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.tooltip
|
|
58
|
+
.tooltip,
|
|
59
|
+
.tooltipSkillFocused {
|
|
59
60
|
width: fit-content;
|
|
60
61
|
color: #FFF;
|
|
61
62
|
font-size: 12px;
|
|
62
63
|
font-style: normal;
|
|
63
64
|
line-height: 16px;
|
|
64
|
-
top: -
|
|
65
|
+
top: -48px;
|
|
65
66
|
|
|
66
67
|
p {
|
|
67
68
|
padding: 8px 8px;
|
|
@@ -69,6 +70,10 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
.tooltipSkillFocused {
|
|
74
|
+
top: -64px;
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
.tooltipContentWrapper {
|
|
73
78
|
padding: 8px 12px;
|
|
74
79
|
text-align: left;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default SkillDetail;
|
|
2
|
+
declare function SkillDetail(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace SkillDetail {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
common: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
+
logo: PropTypes.Requireable<any>;
|
|
12
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
+
login: PropTypes.Requireable<any>;
|
|
14
|
+
}>>;
|
|
15
|
+
icons: PropTypes.Requireable<{
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
mod: PropTypes.Requireable<{
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
courses: PropTypes.Requireable<any[]>;
|
|
22
|
+
texts: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
}>>;
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
}
|
|
28
|
+
namespace propTypes {
|
|
29
|
+
const title: PropTypes.Validator<string>;
|
|
30
|
+
const description: PropTypes.Requireable<string>;
|
|
31
|
+
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
|
+
score: PropTypes.Requireable<number>;
|
|
33
|
+
content: PropTypes.Requireable<number>;
|
|
34
|
+
questionsToReview: PropTypes.Requireable<number>;
|
|
35
|
+
contentCompleted: PropTypes.Requireable<number>;
|
|
36
|
+
}>>;
|
|
37
|
+
const focused: PropTypes.Requireable<boolean>;
|
|
38
|
+
const availableForReview: PropTypes.Requireable<boolean>;
|
|
39
|
+
const ongoingCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
|
+
title: PropTypes.Requireable<string>;
|
|
41
|
+
provider: PropTypes.Requireable<string>;
|
|
42
|
+
progress: PropTypes.Requireable<number>;
|
|
43
|
+
}> | null | undefined)[]>;
|
|
44
|
+
const skillIncludedCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
45
|
+
title: PropTypes.Requireable<string>;
|
|
46
|
+
type: PropTypes.Requireable<string>;
|
|
47
|
+
provider: PropTypes.Requireable<string>;
|
|
48
|
+
progress: PropTypes.Requireable<number>;
|
|
49
|
+
}> | null | undefined)[]>;
|
|
50
|
+
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
+
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
+
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
+
const onCourseClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
import PropTypes from "prop-types";
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AAuDA,oEA6IC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _cssColorFunction = require("css-color-function");
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
17
|
+
|
|
18
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
19
|
+
|
|
20
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
21
|
+
|
|
22
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
const ContinueLearningButton = (props, context) => {
|
|
31
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
32
|
+
const {
|
|
33
|
+
onClick
|
|
34
|
+
} = props;
|
|
35
|
+
const {
|
|
36
|
+
skin,
|
|
37
|
+
translate
|
|
38
|
+
} = context;
|
|
39
|
+
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
40
|
+
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
41
|
+
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
onMouseOver: handleMouseOver,
|
|
44
|
+
onMouseLeave: handleMouseLeave
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
46
|
+
label: translate('continue_learning'),
|
|
47
|
+
type: "primary",
|
|
48
|
+
customStyle: {
|
|
49
|
+
width: 'fit-content',
|
|
50
|
+
borderRadius: '12px',
|
|
51
|
+
backgroundColor: hovered ? (0, _cssColorFunction.convert)(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
|
|
52
|
+
},
|
|
53
|
+
icon: {
|
|
54
|
+
position: 'left',
|
|
55
|
+
faIcon: {
|
|
56
|
+
name: 'play',
|
|
57
|
+
color: '#FFFFFF',
|
|
58
|
+
size: 16
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
onClick: onClick
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
ContinueLearningButton.contextTypes = {
|
|
66
|
+
skin: _provider.default.childContextTypes.skin,
|
|
67
|
+
translate: _provider.default.childContextTypes.translate
|
|
68
|
+
};
|
|
69
|
+
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
70
|
+
onClick: _propTypes.default.func
|
|
71
|
+
} : {};
|
|
72
|
+
|
|
73
|
+
const SkillDetail = (props, context) => {
|
|
74
|
+
const {
|
|
75
|
+
title,
|
|
76
|
+
description,
|
|
77
|
+
metrics,
|
|
78
|
+
focused,
|
|
79
|
+
availableForReview,
|
|
80
|
+
ongoingCourses,
|
|
81
|
+
skillIncludedCourses,
|
|
82
|
+
onBackClick,
|
|
83
|
+
onReviewClick,
|
|
84
|
+
onContinueLearningClick,
|
|
85
|
+
onCourseClick
|
|
86
|
+
} = props;
|
|
87
|
+
const {
|
|
88
|
+
score,
|
|
89
|
+
content,
|
|
90
|
+
questionsToReview,
|
|
91
|
+
contentCompleted = 0
|
|
92
|
+
} = metrics;
|
|
93
|
+
const {
|
|
94
|
+
skin,
|
|
95
|
+
translate
|
|
96
|
+
} = context;
|
|
97
|
+
const [showMore, setShowMore] = (0, _react.useState)(false);
|
|
98
|
+
const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
99
|
+
const Description = (0, _react.useCallback)(() => {
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: (0, _classnames.default)(_style.default.description, !showMore && _style.default.truncate)
|
|
102
|
+
}, description);
|
|
103
|
+
});
|
|
104
|
+
const ProgressBar = (0, _react.useCallback)(() => {
|
|
105
|
+
if (score === undefined) return null;
|
|
106
|
+
const progressBarColor = '#3EC483';
|
|
107
|
+
const inlineProgressValueStyle = {
|
|
108
|
+
backgroundColor: progressBarColor,
|
|
109
|
+
width: `${score}%`
|
|
110
|
+
};
|
|
111
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
className: _style.default.progressBarWrapper
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
+
"data-name": "progress",
|
|
115
|
+
className: _style.default.progress,
|
|
116
|
+
style: inlineProgressValueStyle,
|
|
117
|
+
role: "progressbar"
|
|
118
|
+
}));
|
|
119
|
+
}, [score]);
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
+
className: _style.default.backgroundContainer
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: _style.default.container
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: _style.default.backButtonWrapper,
|
|
126
|
+
onClick: onBackClick
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
128
|
+
iconName: "arrow-left",
|
|
129
|
+
size: {
|
|
130
|
+
faSize: 14,
|
|
131
|
+
wrapperSize: 14
|
|
132
|
+
}
|
|
133
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
+
className: _style.default.ctaContainer
|
|
135
|
+
}, focused ? /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
+
className: _style.default.skillFocusBadge
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
138
|
+
iconName: "bullseye-arrow",
|
|
139
|
+
backgroundColor: "#DDD1FF",
|
|
140
|
+
size: {
|
|
141
|
+
faSize: 10,
|
|
142
|
+
wrapperSize: 16
|
|
143
|
+
}
|
|
144
|
+
}), translate('skill_focus')) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
className: _style.default.ctaWrapper
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
147
|
+
type: "secondary",
|
|
148
|
+
onClick: onReviewClick,
|
|
149
|
+
label: translate('review_this_skill'),
|
|
150
|
+
disabled: !availableForReview,
|
|
151
|
+
customStyle: {
|
|
152
|
+
width: 'fit-content',
|
|
153
|
+
borderRadius: '12px'
|
|
154
|
+
}
|
|
155
|
+
}), /*#__PURE__*/_react.default.createElement(ContinueLearningButton, {
|
|
156
|
+
onClick: onContinueLearningClick
|
|
157
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: _style.default.title
|
|
159
|
+
}, title), description ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
className: _style.default.showMoreWrapper,
|
|
161
|
+
onClick: handleShowMore
|
|
162
|
+
}, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
163
|
+
iconName: showMore ? "chevron-up" : "chevron-down",
|
|
164
|
+
size: {
|
|
165
|
+
faSize: 14,
|
|
166
|
+
wrapperSize: 16
|
|
167
|
+
}
|
|
168
|
+
})) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
+
className: _style.default.progressInformationsWrapper
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
171
|
+
className: _style.default.progressTitle
|
|
172
|
+
}, translate('your_progress')), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
+
className: _style.default.skillCoursesAndQuestionsWrapper
|
|
174
|
+
}, content ? /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: _style.default.skillInformation,
|
|
176
|
+
"data-name": "skill-courses"
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
178
|
+
className: _style.default.skillInformationNumber
|
|
179
|
+
}, content), " ", translate('courses')) : null, questionsToReview ? /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
+
className: _style.default.skillInformation,
|
|
181
|
+
"data-name": "skill-questions"
|
|
182
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
183
|
+
className: _style.default.skillInformationNumber
|
|
184
|
+
}, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
className: _style.default.progressInformations
|
|
186
|
+
}, content && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
+
className: _style.default.progressInformation,
|
|
188
|
+
"data-name": "skill-completed-courses"
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
190
|
+
className: _style.default.progressInformationNumber
|
|
191
|
+
}, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
+
className: _style.default.progressInformation,
|
|
193
|
+
"data-name": "completed-percentage"
|
|
194
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
195
|
+
className: _style.default.progressInformationNumber
|
|
196
|
+
}, score, "%"))))), /*#__PURE__*/_react.default.createElement(ContinueLearning, {
|
|
197
|
+
ongoingCourses: ongoingCourses,
|
|
198
|
+
onCourseClick: onCourseClick
|
|
199
|
+
})));
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
SkillDetail.contextTypes = {
|
|
203
|
+
skin: _provider.default.childContextTypes.skin,
|
|
204
|
+
translate: _provider.default.childContextTypes.translate
|
|
205
|
+
};
|
|
206
|
+
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
207
|
+
title: _propTypes.default.string.isRequired,
|
|
208
|
+
description: _propTypes.default.string,
|
|
209
|
+
metrics: _propTypes.default.shape({
|
|
210
|
+
score: _propTypes.default.number,
|
|
211
|
+
content: _propTypes.default.number,
|
|
212
|
+
questionsToReview: _propTypes.default.number,
|
|
213
|
+
contentCompleted: _propTypes.default.number
|
|
214
|
+
}),
|
|
215
|
+
focused: _propTypes.default.bool,
|
|
216
|
+
availableForReview: _propTypes.default.bool,
|
|
217
|
+
ongoingCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
218
|
+
title: _propTypes.default.string,
|
|
219
|
+
provider: _propTypes.default.string,
|
|
220
|
+
progress: _propTypes.default.number
|
|
221
|
+
})),
|
|
222
|
+
skillIncludedCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
223
|
+
title: _propTypes.default.string,
|
|
224
|
+
type: _propTypes.default.string,
|
|
225
|
+
provider: _propTypes.default.string,
|
|
226
|
+
progress: _propTypes.default.number
|
|
227
|
+
})),
|
|
228
|
+
onBackClick: _propTypes.default.func,
|
|
229
|
+
onReviewClick: _propTypes.default.func,
|
|
230
|
+
onContinueLearningClick: _propTypes.default.func,
|
|
231
|
+
onCourseClick: _propTypes.default.func
|
|
232
|
+
} : {};
|
|
233
|
+
var _default = SkillDetail;
|
|
234
|
+
exports.default = _default;
|
|
235
|
+
|
|
236
|
+
const ContinueLearning = (props, context) => {
|
|
237
|
+
const {
|
|
238
|
+
ongoingCourses,
|
|
239
|
+
onCourseClick
|
|
240
|
+
} = props;
|
|
241
|
+
const {
|
|
242
|
+
skin,
|
|
243
|
+
translate
|
|
244
|
+
} = context;
|
|
245
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
246
|
+
className: _style.default.continueLearningWrapper
|
|
247
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
248
|
+
className: _style.default.continueLearningTitle
|
|
249
|
+
}, translate('continue_learning')), /*#__PURE__*/_react.default.createElement("span", {
|
|
250
|
+
className: _style.default.continueLearningNumber
|
|
251
|
+
}, ongoingCourses.length));
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
ContinueLearning.contextTypes = {
|
|
255
|
+
skin: _provider.default.childContextTypes.skin,
|
|
256
|
+
translate: _provider.default.childContextTypes.translate
|
|
257
|
+
};
|
|
258
|
+
ContinueLearning.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
259
|
+
ongoingCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
260
|
+
title: _propTypes.default.string,
|
|
261
|
+
provider: _propTypes.default.string,
|
|
262
|
+
progress: _propTypes.default.number
|
|
263
|
+
})),
|
|
264
|
+
onCourseClick: _propTypes.default.func
|
|
265
|
+
} : {};
|
|
266
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","hovered","setHovered","useState","onClick","skin","translate","primarySkinColor","handleMouseOver","useCallback","handleMouseLeave","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","func","SkillDetail","title","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","onBackClick","onReviewClick","onContinueLearningClick","onCourseClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","ctaWrapper","length","showMoreWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","arrayOf","provider","type","ContinueLearning","continueLearningWrapper","continueLearningTitle","continueLearningNumber"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n label={translate('continue_learning')}\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n description,\n metrics,\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n onCourseClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n });\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton onClick={onContinueLearningClick} />\n </div>\n </div>\n <div className={style.title}>{title}</div>\n {description ? \n <>\n <Description />\n {description.length >= 226 ? \n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? \"chevron-up\" : \"chevron-down\"}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div> : null}\n </> \n : null}\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} onCourseClick={onCourseClick} />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n skillIncludedCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n type: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n onCourseClick: PropTypes.func\n};\n\nexport default SkillDetail;\n\nconst ContinueLearning = (props, context) => {\n const {\n ongoingCourses,\n onCourseClick\n } = props;\n const {skin, translate} = context;\n\n return (\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('continue_learning')}</span>\n <span className={style.continueLearningNumber}>\n {ongoingCourses.length}\n </span>\n </div>\n )\n}\n\nContinueLearning.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearning.propTypes = {\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onCourseClick: PropTypes.func\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;A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,CADc,CADW;EAQ3BvC,aAAa,EAAEb,kBAAA,CAAUC;AARE,CAA7B"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value xtraLightGrey from colors;
|
|
3
|
+
@value cm_grey_100 from colors;
|
|
4
|
+
@value cm_grey_400 from colors;
|
|
5
|
+
|
|
6
|
+
.textBase {
|
|
7
|
+
font-family: "Gilroy";
|
|
8
|
+
font-style: normal;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.backgroundContainer {
|
|
12
|
+
background-color: white;
|
|
13
|
+
min-height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container {
|
|
18
|
+
composes: textBase;
|
|
19
|
+
background-color: white;
|
|
20
|
+
font-family: "Gilroy";
|
|
21
|
+
font-style: normal;
|
|
22
|
+
margin-top: 48px;
|
|
23
|
+
margin-bottom: 48px;
|
|
24
|
+
margin-left: auto;
|
|
25
|
+
margin-right: auto;
|
|
26
|
+
padding: 0 16px;
|
|
27
|
+
position: relative;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
min-height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: calc(1080px + 32px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.backButtonWrapper {
|
|
35
|
+
margin-bottom: 16px;
|
|
36
|
+
background-color: cm_grey_100;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
width: fit-content;
|
|
39
|
+
padding: 8px;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ctaContainer {
|
|
44
|
+
display: flex;
|
|
45
|
+
width: 100%;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.skillFocusBadge {
|
|
50
|
+
display: flex;
|
|
51
|
+
height: 12px;
|
|
52
|
+
width: fit-content;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background-color: #DDD1FF;
|
|
55
|
+
border-radius: 24px;
|
|
56
|
+
padding: 4px 8px;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
line-height: 16px;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
color: #3900D6;
|
|
61
|
+
margin-right: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ctaWrapper,
|
|
65
|
+
.showMoreWrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.showMoreWrapper {
|
|
71
|
+
align-items: center;
|
|
72
|
+
margin-top: 8px;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.title {
|
|
78
|
+
font-size: 24px;
|
|
79
|
+
font-weight: 700;
|
|
80
|
+
line-height: 32px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.description {
|
|
84
|
+
margin-top: 8px;
|
|
85
|
+
max-width: 734px;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
color: cm_grey_400;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.truncate {
|
|
93
|
+
display: -webkit-box;
|
|
94
|
+
-webkit-line-clamp: 2;
|
|
95
|
+
-webkit-box-orient: vertical;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.progressInformationsWrapper {
|
|
101
|
+
margin-top: 40px;
|
|
102
|
+
background-color: xtraLightGrey;
|
|
103
|
+
border-radius: 16px;
|
|
104
|
+
padding: 24px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.progressTitle {
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
line-height: 22px;
|
|
111
|
+
margin-bottom: 16px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.skillCoursesAndQuestionsWrapper,
|
|
115
|
+
.progressInformations {
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
margin-bottom: 8px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.skillInformation,
|
|
122
|
+
.progressInformation {
|
|
123
|
+
composes: textBase;
|
|
124
|
+
font-weight: 600;
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
line-height: 20px;
|
|
127
|
+
color: cm_grey_400;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.skillInformationNumber,
|
|
131
|
+
.progressInformationNumber {
|
|
132
|
+
color: #000;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.progressBarWrapper {
|
|
136
|
+
position: relative;
|
|
137
|
+
left: 0;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 4px;
|
|
140
|
+
border-radius: 2px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
background-color: cm_grey_100;
|
|
143
|
+
margin: 16px 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.progress {
|
|
147
|
+
display: block;
|
|
148
|
+
height: 8px;
|
|
149
|
+
animation: progressbar 2s ease-in-out;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Continue Learning */
|
|
153
|
+
.continueLearningWrapper {
|
|
154
|
+
margin-top: 40px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.continueLearningTitle {
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
font-weight: 600;
|
|
160
|
+
line-height: 22px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.continueLearningNumber {
|
|
164
|
+
border-radius: 50%;
|
|
165
|
+
background-color: #EAEAEB;
|
|
166
|
+
color: #515161;
|
|
167
|
+
padding: 2px 4px;
|
|
168
|
+
margin-left: 8px;
|
|
169
|
+
font-size: 10px;
|
|
170
|
+
font-weight: 600;
|
|
171
|
+
line-height: 12px;
|
|
172
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.32.
|
|
3
|
+
"version": "11.32.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"last 2 versions",
|
|
178
178
|
"IE 11"
|
|
179
179
|
],
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "d524c5cbb8cbe3dffd0240d448ce48d00c52c53d"
|
|
181
181
|
}
|