@coorpacademy/components 11.34.0 → 11.34.2-alpha.94
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/bullet-point-menu-button/index.js +3 -3
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/es/molecule/draggable/style.css +1 -3
- package/es/molecule/learner-skill-card/index.d.ts +25 -40
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +92 -95
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learner-skill-card/prop-types.d.ts +37 -0
- package/es/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
- package/es/molecule/learner-skill-card/prop-types.js +20 -0
- package/es/molecule/learner-skill-card/prop-types.js.map +1 -0
- package/es/molecule/learner-skill-card/style.css +61 -40
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +10 -5
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/template/certification-detail/index.js +3 -2
- package/es/template/certification-detail/index.js.map +1 -1
- package/es/template/my-learning/index.d.ts +0 -1
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +27 -23
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/my-learning/style.css +9 -6
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +4 -3
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/variables/colors.css +5 -0
- package/es/variables/colors.d.ts +6 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +7 -1
- package/es/variables/colors.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +3 -3
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/molecule/draggable/style.css +1 -3
- package/lib/molecule/learner-skill-card/index.d.ts +25 -40
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +95 -95
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/prop-types.d.ts +37 -0
- package/lib/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
- package/lib/molecule/learner-skill-card/prop-types.js +25 -0
- package/lib/molecule/learner-skill-card/prop-types.js.map +1 -0
- package/lib/molecule/learner-skill-card/style.css +61 -40
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +10 -5
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/template/certification-detail/index.js +3 -2
- package/lib/template/certification-detail/index.js.map +1 -1
- package/lib/template/my-learning/index.d.ts +0 -1
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +27 -23
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/my-learning/style.css +9 -6
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +4 -3
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/variables/colors.css +5 -0
- package/lib/variables/colors.d.ts +6 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +7 -1
- package/lib/variables/colors.js.map +1 -1
- package/locales/bs/global.json +13 -11
- package/locales/cs/global.json +8 -6
- package/locales/de/global.json +8 -6
- package/locales/en/global.json +9 -6
- package/locales/es/global.json +8 -6
- package/locales/et/global.json +8 -6
- package/locales/fi/global.json +8 -6
- package/locales/fr/global.json +8 -6
- package/locales/hr/global.json +8 -6
- package/locales/hu/global.json +8 -6
- package/locales/hy/global.json +13 -11
- package/locales/it/global.json +8 -6
- package/locales/ja/global.json +8 -6
- package/locales/ko/global.json +8 -6
- package/locales/nl/global.json +8 -6
- package/locales/pl/global.json +8 -6
- package/locales/pt/global.json +8 -6
- package/locales/ro/global.json +8 -6
- package/locales/ru/global.json +8 -6
- package/locales/sk/global.json +8 -6
- package/locales/sl/global.json +8 -6
- package/locales/sv/global.json +8 -6
- package/locales/tl/global.json +8 -6
- package/locales/tr/global.json +8 -6
- package/locales/uk/global.json +8 -6
- package/locales/vi/global.json +8 -6
- package/locales/zh/global.json +13 -11
- package/locales/zh_TW/global.json +10 -8
- package/package.json +3 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -32,12 +32,12 @@ const BulletPointMenuButton = props => {
|
|
|
32
32
|
'data-name': 'button-menu',
|
|
33
33
|
buttons
|
|
34
34
|
};
|
|
35
|
-
const menuStyle = classnames(style.bulletPointMenu, isBulkMenu && style.bulkBulletPointMenu,
|
|
36
|
-
const menu = /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
const menuStyle = classnames(style.bulletPointMenu, isBulkMenu && style.bulkBulletPointMenu, style.visible);
|
|
36
|
+
const menu = visible ? /*#__PURE__*/React.createElement("div", {
|
|
37
37
|
className: menuStyle,
|
|
38
38
|
"data-name": "menu-wrapper",
|
|
39
39
|
"aria-label": menuAriaLabel
|
|
40
|
-
}, /*#__PURE__*/React.createElement(ButtonMenu, menuProps));
|
|
40
|
+
}, /*#__PURE__*/React.createElement(ButtonMenu, menuProps)) : null;
|
|
41
41
|
const bulletPointButtonProps = {
|
|
42
42
|
size: 'default',
|
|
43
43
|
'aria-label': buttonAriaLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","useEffect","classnames","ButtonLinkIcon","ButtonMenu","propTypes","style","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop","buttons","menuButtonClassName","isBulkMenu","dataName","visible","setVisible","handleOnClick","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menuStyle","bulletPointMenu","bulkBulletPointMenu","menu","createElement","className","bulletPointButtonProps","size","icon","bulletPointWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu,\n 'data-name': dataName = 'bullet-point-button'\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menuStyle = classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","useEffect","classnames","ButtonLinkIcon","ButtonMenu","propTypes","style","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop","buttons","menuButtonClassName","isBulkMenu","dataName","visible","setVisible","handleOnClick","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menuStyle","bulletPointMenu","bulkBulletPointMenu","menu","createElement","className","bulletPointButtonProps","size","icon","bulletPointWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu,\n 'data-name': dataName = 'bullet-point-button'\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menuStyle = classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n style.visible\n );\n\n const menu = visible ? (\n <div className={menuStyle} data-name=\"menu-wrapper\" aria-label={menuAriaLabel}>\n <ButtonMenu {...menuProps} />\n </div>\n ) : null;\n\n const bulletPointButtonProps = {\n size: 'default',\n 'aria-label': buttonAriaLabel,\n 'data-name': dataName,\n icon: 'bullet-point',\n onClick: handleOnClick,\n disabled,\n className: menuButtonClassName\n };\n\n return (\n <div className={style.bulletPointWrapper} data-name=\"bullet-point-wrapper\">\n <ButtonLinkIcon {...bulletPointButtonProps} />\n {menu}\n </div>\n );\n};\n\nBulletPointMenuButton.propTypes = propTypes;\n\nexport default BulletPointMenuButton;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,QAAO,OAAO;AAC7D,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,SAAS,MAAoC,SAAS;AAC7D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,qBAAqB,GAAIC,KAAiC,IAAK;EACnE,MAAM;IACJC,QAAQ,GAAG,KAAK;IAChBC,eAAe;IACfC,aAAa;IACbC,OAAO,GAAAC,KAAO;IACdC,OAAO;IACPC,mBAAmB;IACnBC,UAAU;IACV,WAAW,EAAEC,QAAQ,GAAG;EAC1B,CAAC,GAAGT,KAAK;EACT,MAAM,CAACU,OAAO,EAAEC,UAAU,CAAC,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EAC7CH,IACE,CAAC;AAEV,CAAC;AAEDtB,qBAAqB,CAACF,SAAS,GAAA+B,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGjC,SAAS;AAE3C,eAAeE,qBAAqB","ignoreList":[]}
|
|
@@ -1,44 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}>;
|
|
21
|
-
courses: PropTypes.Requireable<any[]>;
|
|
22
|
-
texts: PropTypes.Requireable<{
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebContextValues } from '../../atom/provider/web-context';
|
|
3
|
+
import { LearnerSkillCardProps } from './prop-types';
|
|
4
|
+
export declare const updateBackgroundImage: (ref: React.RefObject<HTMLDivElement>, background: string) => void;
|
|
5
|
+
declare const LearnerSkillCard: {
|
|
6
|
+
(props: LearnerSkillCardProps, context: WebContextValues): JSX.Element;
|
|
7
|
+
contextTypes: {
|
|
8
|
+
translate: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
9
|
+
};
|
|
10
|
+
propTypes: {
|
|
11
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
12
|
+
cardIndex: import("prop-types").Requireable<number>;
|
|
13
|
+
skillTitle: import("prop-types").Requireable<string>;
|
|
14
|
+
skillAriaLabel: import("prop-types").Requireable<string>;
|
|
15
|
+
focus: import("prop-types").Requireable<boolean>;
|
|
16
|
+
metrics: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
17
|
+
content: import("prop-types").Requireable<number>;
|
|
18
|
+
score: import("prop-types").Requireable<number>;
|
|
19
|
+
questionsToReview: import("prop-types").Requireable<number>;
|
|
25
20
|
}>>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
30
|
-
skillTitle: PropTypes.Requireable<string>;
|
|
31
|
-
skillAriaLabel: PropTypes.Requireable<string>;
|
|
32
|
-
focus: PropTypes.Requireable<boolean>;
|
|
33
|
-
metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
34
|
-
score: PropTypes.Requireable<number>;
|
|
35
|
-
content: PropTypes.Requireable<number>;
|
|
36
|
-
questionsToReview: PropTypes.Requireable<number>;
|
|
21
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
22
|
+
color: import("prop-types").Requireable<string>;
|
|
23
|
+
name: import("prop-types").Requireable<string>;
|
|
37
24
|
}>>;
|
|
38
|
-
|
|
39
|
-
onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
-
onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
onExploreClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
41
26
|
};
|
|
42
|
-
}
|
|
43
|
-
|
|
27
|
+
};
|
|
28
|
+
export default LearnerSkillCard;
|
|
44
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAKjE,OAAkB,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAK9D,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,CAAC,cAAc,CAAC,cAAc,MAAM,SAI7F,CAAC;AAEF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;CA8HhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convert } from 'css-color-function';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import Icon from '../../atom/icon';
|
|
6
|
-
import ButtonLink from '../../atom/button-link';
|
|
7
|
-
import Provider from '../../atom/provider';
|
|
1
|
+
import React, { useCallback, useMemo, useRef } from 'react';
|
|
2
|
+
import Provider, { GetTranslateFromContext } from '../../atom/provider';
|
|
8
3
|
import ProgressBar from '../progress-bar';
|
|
9
4
|
import { COLORS } from '../../variables/colors';
|
|
5
|
+
import { createGradientBackground } from '../../util/get-background-gradient-color';
|
|
6
|
+
import FaIcon from '../../atom/icon';
|
|
7
|
+
import propTypes from './prop-types';
|
|
10
8
|
import style from './style.css';
|
|
11
9
|
const MAX_SCORE = 100;
|
|
10
|
+
export const updateBackgroundImage = (ref, background) => {
|
|
11
|
+
if (ref.current) {
|
|
12
|
+
ref.current.style.backgroundImage = background;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
12
15
|
const LearnerSkillCard = (props, context) => {
|
|
13
16
|
const {
|
|
14
17
|
'aria-label': ariaLabel,
|
|
18
|
+
cardIndex,
|
|
15
19
|
skillTitle,
|
|
16
20
|
skillAriaLabel,
|
|
17
|
-
focus
|
|
21
|
+
focus,
|
|
18
22
|
metrics,
|
|
19
|
-
|
|
20
|
-
onReviewClick,
|
|
23
|
+
icon,
|
|
21
24
|
onExploreClick
|
|
22
25
|
} = props;
|
|
23
26
|
const {
|
|
@@ -25,76 +28,95 @@ const LearnerSkillCard = (props, context) => {
|
|
|
25
28
|
content,
|
|
26
29
|
questionsToReview = 0
|
|
27
30
|
} = metrics;
|
|
31
|
+
const translate = GetTranslateFromContext(context);
|
|
28
32
|
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} =
|
|
32
|
-
const primarySkinColor = _get('common.primary', skin);
|
|
33
|
-
const reviewLocale = translate('Review');
|
|
34
|
-
const exploreLocale = translate('Explore');
|
|
33
|
+
color,
|
|
34
|
+
name
|
|
35
|
+
} = icon;
|
|
35
36
|
const questionsLocale = translate('skill_chart_side_panel_questions_to_review');
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus ? ['bullseye-arrow', translate('skill_focus'), COLORS.purple_700, COLORS.purple_100] : ['shapes', translate('skill'), COLORS.cm_grey_500, COLORS.gray];
|
|
38
|
+
const headerBackgroundRef = useRef(null);
|
|
39
|
+
const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);
|
|
40
|
+
const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);
|
|
41
|
+
const handleMouseEnter = useCallback(() => {
|
|
42
|
+
updateBackgroundImage(headerBackgroundRef, focusBackground);
|
|
43
|
+
}, [focusBackground]);
|
|
44
|
+
const handleMouseLeave = useCallback(() => {
|
|
45
|
+
updateBackgroundImage(headerBackgroundRef, defaultBackground);
|
|
46
|
+
}, [defaultBackground]);
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
"data-testid": `learner-skill-card-wrapper-${cardIndex}`,
|
|
49
|
+
onClick: onExploreClick,
|
|
50
|
+
className: style.learnerSkillCardContainer,
|
|
51
|
+
"aria-label": ariaLabel,
|
|
52
|
+
onMouseEnter: handleMouseEnter,
|
|
53
|
+
onMouseLeave: handleMouseLeave
|
|
54
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
"data-testid": "learner-skill-card-icon-header-wrapper",
|
|
56
|
+
ref: headerBackgroundRef,
|
|
57
|
+
className: style.iconHeaderWrapper,
|
|
58
|
+
style: {
|
|
59
|
+
backgroundImage: defaultBackground,
|
|
60
|
+
color: tagTextColor
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: style.iconWrapper,
|
|
64
|
+
"data-testid": "learner-skill-card-icon-wrapper"
|
|
65
|
+
}, /*#__PURE__*/React.createElement(FaIcon, {
|
|
66
|
+
iconName: name,
|
|
67
|
+
iconColor: color,
|
|
68
|
+
size: {
|
|
69
|
+
faSize: 20,
|
|
70
|
+
wrapperSize: 44
|
|
42
71
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'aria-label': `${skillTitle}, ${reviewLocale}`,
|
|
46
|
-
label: reviewLocale,
|
|
47
|
-
'data-name': 'learner-skill-card-review-button'
|
|
48
|
-
};
|
|
49
|
-
const buttonExploreProps = {
|
|
72
|
+
borderRadius: '12px',
|
|
73
|
+
gradientBackground: true,
|
|
50
74
|
customStyle: {
|
|
51
|
-
|
|
52
|
-
color: primarySkinColor,
|
|
53
|
-
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
54
|
-
},
|
|
55
|
-
hoverColor: '#FFFFFF',
|
|
56
|
-
hoverBackgroundColor: primarySkinColor,
|
|
57
|
-
onClick: onExploreClick,
|
|
58
|
-
'aria-label': `${skillTitle}, ${exploreLocale}`,
|
|
59
|
-
label: exploreLocale,
|
|
60
|
-
'data-name': 'learner-skill-card-explore-button',
|
|
61
|
-
icon: {
|
|
62
|
-
position: 'left',
|
|
63
|
-
faIcon: {
|
|
64
|
-
name: 'compass',
|
|
65
|
-
backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),
|
|
66
|
-
color: primarySkinColor,
|
|
67
|
-
size: 16
|
|
68
|
-
}
|
|
75
|
+
border: '4px solid white'
|
|
69
76
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
className: style.learnerSkillCardWrapper,
|
|
73
|
-
"data-name": "learner-skill-card-wrapper",
|
|
74
|
-
"aria-label": ariaLabel
|
|
75
|
-
}, questionsToReview ? /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: style.skillQuestionsWrapper
|
|
77
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: style.learnerSkillCardContent
|
|
77
79
|
}, /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: style.skillInformation,
|
|
79
|
-
"data-name": "skill-questions"
|
|
80
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
81
|
-
className: style.skillInformationNumber
|
|
82
|
-
}, questionsToReview), "\xA0", questionsLocale)) : null, /*#__PURE__*/React.createElement("div", {
|
|
83
80
|
className: style.skillTitleWrapper
|
|
84
81
|
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, /*#__PURE__*/React.createElement(
|
|
91
|
-
iconName:
|
|
92
|
-
backgroundColor:
|
|
82
|
+
className: style.skillFocusBadge,
|
|
83
|
+
style: {
|
|
84
|
+
backgroundColor: tagBackgroundColor,
|
|
85
|
+
color: tagTextColor
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/React.createElement(FaIcon, {
|
|
88
|
+
iconName: badgeIconName,
|
|
89
|
+
backgroundColor: tagBackgroundColor,
|
|
93
90
|
size: {
|
|
94
91
|
faSize: 10,
|
|
95
92
|
wrapperSize: 16
|
|
96
93
|
}
|
|
97
|
-
}),
|
|
94
|
+
}), badgeLocale), /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: style.questionWrapper
|
|
96
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
"data-name": "skill-card-title",
|
|
98
|
+
className: style.skillTitle,
|
|
99
|
+
"aria-label": skillAriaLabel || skillTitle
|
|
100
|
+
}, skillTitle), /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: style.contentAndQuestionsWrapper
|
|
102
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
"data-name": "learner-skill-card-skill-content-number"
|
|
104
|
+
}, content, " ", translate('content')), questionsToReview ? /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: style.skillInformation,
|
|
106
|
+
"data-name": "learner-skill-card-skill-questions-wrapper"
|
|
107
|
+
}, /*#__PURE__*/React.createElement(FaIcon, {
|
|
108
|
+
iconName: 'circle',
|
|
109
|
+
iconColor: COLORS.cm_grey_400,
|
|
110
|
+
size: {
|
|
111
|
+
faSize: 4
|
|
112
|
+
},
|
|
113
|
+
customStyle: {
|
|
114
|
+
padding: 0,
|
|
115
|
+
height: 'auto'
|
|
116
|
+
}
|
|
117
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
118
|
+
"data-name": "learner-skill-card-questions-to-review"
|
|
119
|
+
}, questionsToReview), "\xA0", questionsLocale) : null)))), /*#__PURE__*/React.createElement("div", {
|
|
98
120
|
className: style.progressInformations
|
|
99
121
|
}, /*#__PURE__*/React.createElement(ProgressBar, {
|
|
100
122
|
value: score,
|
|
@@ -104,36 +126,11 @@ const LearnerSkillCard = (props, context) => {
|
|
|
104
126
|
style: {
|
|
105
127
|
backgroundColor: COLORS.positive
|
|
106
128
|
}
|
|
107
|
-
})
|
|
108
|
-
className: style.progressInformation,
|
|
109
|
-
"data-name": "completed-percentage"
|
|
110
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
111
|
-
className: style.progressInformationNumber
|
|
112
|
-
}, score, "%"))) : null, /*#__PURE__*/React.createElement("div", {
|
|
113
|
-
className: style.ctaWrapper,
|
|
114
|
-
"data-name": "cta-wrapper"
|
|
115
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, buttonReviewProps), /*#__PURE__*/React.createElement("div", {
|
|
116
|
-
className: style.buttonWrapper,
|
|
117
|
-
"data-name": "button-explore-wrapper"
|
|
118
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, buttonExploreProps))));
|
|
129
|
+
})));
|
|
119
130
|
};
|
|
120
131
|
LearnerSkillCard.contextTypes = {
|
|
121
|
-
skin: Provider.childContextTypes.skin,
|
|
122
132
|
translate: Provider.childContextTypes.translate
|
|
123
133
|
};
|
|
124
|
-
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
125
|
-
'aria-label': PropTypes.string,
|
|
126
|
-
skillTitle: PropTypes.string,
|
|
127
|
-
skillAriaLabel: PropTypes.string,
|
|
128
|
-
focus: PropTypes.bool,
|
|
129
|
-
metrics: PropTypes.shape({
|
|
130
|
-
score: PropTypes.number,
|
|
131
|
-
content: PropTypes.number,
|
|
132
|
-
questionsToReview: PropTypes.number
|
|
133
|
-
}),
|
|
134
|
-
review: PropTypes.bool,
|
|
135
|
-
onReviewClick: PropTypes.func,
|
|
136
|
-
onExploreClick: PropTypes.func
|
|
137
|
-
} : {};
|
|
134
|
+
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
138
135
|
export default LearnerSkillCard;
|
|
139
136
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","convert","PropTypes","Icon","ButtonLink","Provider","ProgressBar","COLORS","style","MAX_SCORE","LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","skin","translate","primarySkinColor","_get","reviewLocale","exploreLocale","questionsLocale","skillFocusLocale","buttonReviewProps","customStyle","backgroundColor","transition","padding","disabled","onClick","label","buttonExploreProps","color","hoverColor","hoverBackgroundColor","icon","position","faIcon","name","size","createElement","className","learnerSkillCardWrapper","skillQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","iconName","faSize","wrapperSize","progressInformations","value","displayInfo","max","progressWrapper","positive","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst MAX_SCORE = 100;\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview = 0} = metrics;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const questionsLocale = translate('skill_chart_side_panel_questions_to_review');\n const skillFocusLocale = translate('skill_focus');\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n padding: '0px'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n hoverColor: '#FFFFFF',\n hoverBackgroundColor: primarySkinColor,\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n size: 16\n }\n }\n };\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {questionsToReview ? (\n <div className={style.skillQuestionsWrapper}>\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {questionsLocale}\n </div>\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\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 {skillFocusLocale}\n </div>\n ) : null}\n </div>\n {content ? (\n <div className={style.progressInformations}>\n <ProgressBar\n value={score}\n displayInfo={false}\n max={MAX_SCORE}\n className={style.progressWrapper}\n style={{backgroundColor: COLORS.positive}}\n />\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </div>\n ) : null}\n <div className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div className={style.buttonWrapper} data-name=\"button-explore-wrapper\">\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,OAAO,QAAO,oBAAoB;AAE1C,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MA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AAEZ,SAAS,CAAC0E,MAAM;EAC5B7D,cAAc,EAAEb,SAAS,CAAC0E,MAAM;EAChC5D,KAAK,EAAEd,SAAS,CAAC2E,IAAI;EACrB5D,OAAO,EAAEf,SAAS,CAAC4E,KAAK,CAAC;IACvBzD,KAAK,EAAEnB,SAAS,CAAC6E,MAAM;IACvBzD,OAAO,EAAEpB,SAAS,CAAC6E,MAAM;IACzBxD,iBAAiB,EAAErB,SAAS,CAAC6E;EAC/B,CAAC,CAAC;EACF7D,MAAM,EAAEhB,SAAS,CAAC2E,IAAI;EACtB1D,aAAa,EAAEjB,SAAS,CAAC8E,IAAI;EAC7B5D,cAAc,EAAElB,SAAS,CAAC8E;AAC5B,CAAC;AAED,eAAetE,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useRef","Provider","GetTranslateFromContext","ProgressBar","COLORS","createGradientBackground","FaIcon","propTypes","style","MAX_SCORE","updateBackgroundImage","ref","background","current","backgroundImage","LearnerSkillCard","props","context","ariaLabel","cardIndex","skillTitle","skillAriaLabel","focus","metrics","icon","onExploreClick","score","content","questionsToReview","translate","color","name","questionsLocale","badgeIconName","badgeLocale","tagTextColor","tagBackgroundColor","purple_700","purple_100","cm_grey_500","gray","headerBackgroundRef","defaultBackground","focusBackground","handleMouseEnter","handleMouseLeave","createElement","onClick","className","learnerSkillCardContainer","onMouseEnter","onMouseLeave","iconHeaderWrapper","iconWrapper","iconName","iconColor","size","faSize","wrapperSize","borderRadius","gradientBackground","customStyle","border","learnerSkillCardContent","skillTitleWrapper","skillFocusBadge","backgroundColor","questionWrapper","contentAndQuestionsWrapper","skillInformation","cm_grey_400","padding","height","progressInformations","value","displayInfo","max","progressWrapper","positive","contextTypes","childContextTypes","process","env","NODE_ENV"],"sources":["../../../src/molecule/learner-skill-card/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useRef} from 'react';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport FaIcon from '../../atom/icon';\nimport propTypes, {LearnerSkillCardProps} from './prop-types';\nimport style from './style.css';\n\nconst MAX_SCORE = 100;\n\nexport const updateBackgroundImage = (ref: React.RefObject<HTMLDivElement>, background: string) => {\n if (ref.current) {\n ref.current.style.backgroundImage = background;\n }\n};\n\nconst LearnerSkillCard = (props: LearnerSkillCardProps, context: WebContextValues) => {\n const {\n 'aria-label': ariaLabel,\n cardIndex,\n skillTitle,\n skillAriaLabel,\n focus,\n metrics,\n icon,\n onExploreClick\n } = props;\n const {score, content, questionsToReview = 0} = metrics;\n const translate = GetTranslateFromContext(context);\n const {color, name} = icon;\n const questionsLocale = translate('skill_chart_side_panel_questions_to_review') as string;\n const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus\n ? ['bullseye-arrow', translate('skill_focus') as string, COLORS.purple_700, COLORS.purple_100]\n : ['shapes', translate('skill') as string, COLORS.cm_grey_500, COLORS.gray];\n const headerBackgroundRef = useRef<HTMLDivElement | null>(null);\n const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);\n const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);\n const handleMouseEnter = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, focusBackground);\n }, [focusBackground]);\n const handleMouseLeave = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, defaultBackground);\n }, [defaultBackground]);\n return (\n <div\n data-testid={`learner-skill-card-wrapper-${cardIndex}`}\n onClick={onExploreClick}\n className={style.learnerSkillCardContainer}\n aria-label={ariaLabel}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div\n data-testid=\"learner-skill-card-icon-header-wrapper\"\n ref={headerBackgroundRef}\n className={style.iconHeaderWrapper}\n style={{backgroundImage: defaultBackground, color: tagTextColor}}\n >\n <div className={style.iconWrapper} data-testid=\"learner-skill-card-icon-wrapper\">\n <FaIcon\n {...{\n iconName: name,\n iconColor: color,\n size: {\n faSize: 20,\n wrapperSize: 44\n },\n borderRadius: '12px',\n gradientBackground: true,\n customStyle: {border: '4px solid white'}\n }}\n />\n </div>\n </div>\n <div className={style.learnerSkillCardContent}>\n <div className={style.skillTitleWrapper}>\n <div\n className={style.skillFocusBadge}\n style={{\n backgroundColor: tagBackgroundColor,\n color: tagTextColor\n }}\n >\n <FaIcon\n {...{\n iconName: badgeIconName,\n backgroundColor: tagBackgroundColor,\n size: {\n faSize: 10,\n wrapperSize: 16\n }\n }}\n />\n {badgeLocale}\n </div>\n\n <div className={style.questionWrapper}>\n <div\n data-name=\"skill-card-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n <div className={style.contentAndQuestionsWrapper}>\n <div data-name=\"learner-skill-card-skill-content-number\">\n {content} {translate('content')}\n </div>\n {questionsToReview ? (\n <div\n className={style.skillInformation}\n data-name=\"learner-skill-card-skill-questions-wrapper\"\n >\n <FaIcon\n {...{\n iconName: 'circle',\n iconColor: COLORS.cm_grey_400,\n size: {faSize: 4},\n customStyle: {padding: 0, height: 'auto'}\n }}\n />\n <span data-name=\"learner-skill-card-questions-to-review\">\n {questionsToReview}\n </span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n <div className={style.progressInformations}>\n <ProgressBar\n value={score}\n displayInfo={false}\n max={MAX_SCORE}\n className={style.progressWrapper}\n style={{backgroundColor: COLORS.positive}}\n />\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = propTypes;\n\nexport default LearnerSkillCard;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBA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,SAAS,EAAEnD,MAAM,CAACkE,WAAW;IAC7Bd,IAAI,EAAE;MAACC,MAAM,EAAE;IAAC,CAAC;IACjBI,WAAW,EAAE;MAACU,OAAO,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAM;EAAC,CAE5C,CAAC,eACF3E,KAAA,CAAAiD,aAAA;IAAM,aAAU;EAAwC,GACrDlB,iBACG,CAAC,QACD,EAACI,eACJ,CAAC,GACJ,IACD,CACF,CACF,CACF,CAAC,eACNnC,KAAA,CAAAiD,aAAA;IAAKE,SAAS,EAAExC,KAAK,CAACiE;EAAqB,gBACzC5E,KAAA,CAAAiD,aAAA,CAAC3C,WAAW;IACVuE,KAAK,EAAEhD,KAAM;IACbiD,WAAW,EAAE,KAAM;IACnBC,GAAG,EAAEnE,SAAU;IACfuC,SAAS,EAAExC,KAAK,CAACqE,eAAgB;IACjCrE,KAAK,EAAE;MAAC0D,eAAe,EAAE9D,MAAM,CAAC0E;IAAQ;EAAE,CAC3C,CACE,CACF,CAAC;AAEV,CAAC;AAED/D,gBAAgB,CAACgE,YAAY,GAAG;EAC9BlD,SAAS,EAAE5B,QAAQ,CAAC+E,iBAAiB,CAACnD;AACxC,CAAC;AAEDd,gBAAgB,CAACR,SAAS,GAAA0E,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG5E,SAAS;AAEtC,eAAeQ,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const propTypes: {
|
|
3
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
4
|
+
cardIndex: PropTypes.Requireable<number>;
|
|
5
|
+
skillTitle: PropTypes.Requireable<string>;
|
|
6
|
+
skillAriaLabel: PropTypes.Requireable<string>;
|
|
7
|
+
focus: PropTypes.Requireable<boolean>;
|
|
8
|
+
metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
9
|
+
content: PropTypes.Requireable<number>;
|
|
10
|
+
score: PropTypes.Requireable<number>;
|
|
11
|
+
questionsToReview: PropTypes.Requireable<number>;
|
|
12
|
+
}>>;
|
|
13
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
|
+
color: PropTypes.Requireable<string>;
|
|
15
|
+
name: PropTypes.Requireable<string>;
|
|
16
|
+
}>>;
|
|
17
|
+
onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
};
|
|
19
|
+
export declare type LearnerSkillCardProps = {
|
|
20
|
+
'aria-label'?: string;
|
|
21
|
+
cardIndex: number;
|
|
22
|
+
skillTitle: string;
|
|
23
|
+
skillAriaLabel?: string;
|
|
24
|
+
focus: boolean;
|
|
25
|
+
metrics: {
|
|
26
|
+
content: number;
|
|
27
|
+
score: number;
|
|
28
|
+
questionsToReview?: number;
|
|
29
|
+
};
|
|
30
|
+
icon: {
|
|
31
|
+
color: string;
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
onExploreClick: () => void;
|
|
35
|
+
};
|
|
36
|
+
export default propTypes;
|
|
37
|
+
//# sourceMappingURL=prop-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
const propTypes = {
|
|
3
|
+
'aria-label': PropTypes.string,
|
|
4
|
+
cardIndex: PropTypes.number,
|
|
5
|
+
skillTitle: PropTypes.string,
|
|
6
|
+
skillAriaLabel: PropTypes.string,
|
|
7
|
+
focus: PropTypes.bool,
|
|
8
|
+
metrics: PropTypes.shape({
|
|
9
|
+
content: PropTypes.number,
|
|
10
|
+
score: PropTypes.number,
|
|
11
|
+
questionsToReview: PropTypes.number
|
|
12
|
+
}),
|
|
13
|
+
icon: PropTypes.shape({
|
|
14
|
+
color: PropTypes.string,
|
|
15
|
+
name: PropTypes.string
|
|
16
|
+
}),
|
|
17
|
+
onExploreClick: PropTypes.func
|
|
18
|
+
};
|
|
19
|
+
export default propTypes;
|
|
20
|
+
//# sourceMappingURL=prop-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","propTypes","string","cardIndex","number","skillTitle","skillAriaLabel","focus","bool","metrics","shape","content","score","questionsToReview","icon","color","name","onExploreClick","func"],"sources":["../../../src/molecule/learner-skill-card/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n cardIndex: PropTypes.number,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n content: PropTypes.number,\n score: PropTypes.number,\n questionsToReview: PropTypes.number\n }),\n icon: PropTypes.shape({\n color: PropTypes.string,\n name: PropTypes.string\n }),\n onExploreClick: PropTypes.func\n};\n\nexport type LearnerSkillCardProps = {\n 'aria-label'?: string;\n cardIndex: number;\n skillTitle: string;\n skillAriaLabel?: string;\n focus: boolean;\n metrics: {\n content: number;\n score: number;\n questionsToReview?: number;\n };\n icon: {\n color: string;\n name: string;\n };\n onExploreClick: () => void;\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,SAAS,GAAG;EAChB,YAAY,EAAED,SAAS,CAACE,MAAM;EAC9BC,SAAS,EAAEH,SAAS,CAACI,MAAM;EAC3BC,UAAU,EAAEL,SAAS,CAACE,MAAM;EAC5BI,cAAc,EAAEN,SAAS,CAACE,MAAM;EAChCK,KAAK,EAAEP,SAAS,CAACQ,IAAI;EACrBC,OAAO,EAAET,SAAS,CAACU,KAAK,CAAC;IACvBC,OAAO,EAAEX,SAAS,CAACI,MAAM;IACzBQ,KAAK,EAAEZ,SAAS,CAACI,MAAM;IACvBS,iBAAiB,EAAEb,SAAS,CAACI;EAC/B,CAAC,CAAC;EACFU,IAAI,EAAEd,SAAS,CAACU,KAAK,CAAC;IACpBK,KAAK,EAAEf,SAAS,CAACE,MAAM;IACvBc,IAAI,EAAEhB,SAAS,CAACE;EAClB,CAAC,CAAC;EACFe,cAAc,EAAEjB,SAAS,CAACkB;AAC5B,CAAC;AAoBD,eAAejB,SAAS","ignoreList":[]}
|
|
@@ -18,58 +18,52 @@
|
|
|
18
18
|
font-style: normal;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.learnerSkillCardContainer {
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
width: 100%;
|
|
27
|
-
min-height: 252px;
|
|
24
|
+
width: 258px;
|
|
25
|
+
height: 220px;
|
|
28
26
|
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.04);
|
|
29
27
|
transition: box-shadow 0.15s ease-in-out;
|
|
30
28
|
border-radius: 12px;
|
|
31
|
-
padding: 24px;
|
|
32
29
|
box-sizing: border-box;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
position: relative;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
.
|
|
36
|
-
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.10);
|
|
34
|
+
.learnerSkillCardContainer:hover {
|
|
35
|
+
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.10);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
.
|
|
40
|
-
.progressInformations {
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
margin-bottom: 8px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.skillInformation,
|
|
47
|
-
.progressInformation {
|
|
38
|
+
.skillInformation {
|
|
48
39
|
composes: textBase;
|
|
49
40
|
font-weight: 400;
|
|
50
|
-
font-size:
|
|
51
|
-
line-height:
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
line-height: 16px;
|
|
52
43
|
color: cm_grey_400;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
.skillInformationNumber,
|
|
56
|
-
.progressInformationNumber {
|
|
57
|
-
color: #000;
|
|
58
|
-
}
|
|
59
48
|
|
|
60
49
|
.skillTitleWrapper {
|
|
61
50
|
display: flex;
|
|
51
|
+
gap: 8px;
|
|
62
52
|
flex-direction: column;
|
|
53
|
+
justify-content: space-between;
|
|
63
54
|
min-height: 68px;
|
|
64
|
-
margin-bottom: 24px;
|
|
65
55
|
}
|
|
66
56
|
|
|
67
57
|
.skillTitle {
|
|
68
58
|
composes: textBase;
|
|
69
59
|
font-weight: 600;
|
|
70
60
|
font-size: 16px;
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-line-clamp: 2;
|
|
63
|
+
-webkit-box-orient: vertical;
|
|
64
|
+
line-clamp: 2;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
overflow: hidden;
|
|
73
67
|
}
|
|
74
68
|
|
|
75
69
|
.skillFocusBadge {
|
|
@@ -78,40 +72,67 @@
|
|
|
78
72
|
height: 12px;
|
|
79
73
|
width: fit-content;
|
|
80
74
|
align-items: center;
|
|
81
|
-
background-color: #DDD1FF;
|
|
82
75
|
border-radius: 24px;
|
|
83
76
|
padding: 2px 4px;
|
|
84
77
|
font-size: 10px;
|
|
85
78
|
line-height: 12px;
|
|
86
79
|
font-weight: 600;
|
|
87
|
-
color: #3900D6;
|
|
88
80
|
margin-right: 8px;
|
|
89
81
|
}
|
|
90
82
|
|
|
91
83
|
.progressWrapper {
|
|
92
|
-
position:
|
|
93
|
-
|
|
94
|
-
left:
|
|
95
|
-
width:
|
|
84
|
+
position: absolute;
|
|
85
|
+
bottom: 16px;
|
|
86
|
+
left: 40px;
|
|
87
|
+
width: 178px;
|
|
96
88
|
height: 4px;
|
|
97
89
|
border-radius: 2px;
|
|
98
90
|
overflow: hidden;
|
|
99
91
|
background: light;
|
|
100
|
-
margin-bottom: 8px;
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
.progressInformations {
|
|
104
|
-
|
|
105
|
-
gap: 8px;
|
|
106
|
-
min-height: 12px;
|
|
107
|
-
margin-bottom: 24px;
|
|
95
|
+
padding: 16px 24px;
|
|
108
96
|
}
|
|
109
97
|
|
|
110
|
-
.
|
|
111
|
-
|
|
98
|
+
.contentAndQuestionsWrapper {
|
|
99
|
+
composes: textBase;
|
|
100
|
+
font-weight: 400;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
line-height: 16px;
|
|
103
|
+
color: cm_grey_400;
|
|
112
104
|
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.iconWrapper {
|
|
109
|
+
border-radius: 12px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.iconHeaderWrapper {
|
|
113
|
+
padding: 12px 0 12px 16px;
|
|
114
|
+
border-radius: 12px 12px 0 0;
|
|
115
|
+
border: 2px solid white;
|
|
116
|
+
background-position-y: -2px;
|
|
117
|
+
background-repeat: repeat-x;
|
|
118
|
+
background-color: white;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
|
-
.
|
|
121
|
+
.learnerSkillCardContainer:hover .iconHeaderWrapper {
|
|
122
|
+
border: 2px solid transparent;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.learnerSkillCardContent {
|
|
127
|
+
padding: 16px;
|
|
128
|
+
padding-bottom: 0;
|
|
116
129
|
display: flex;
|
|
130
|
+
gap: 8px;
|
|
131
|
+
flex-direction: column;
|
|
117
132
|
}
|
|
133
|
+
|
|
134
|
+
.questionWrapper {
|
|
135
|
+
display: flex;
|
|
136
|
+
gap: 8px;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA+GA;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA+GA;;;;;;;8BA6DC"}
|