@coorpacademy/components 11.32.42 → 11.32.43

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.
Files changed (93) hide show
  1. package/es/atom/select-icon/index.d.ts +17 -0
  2. package/es/atom/select-icon/index.d.ts.map +1 -0
  3. package/es/atom/select-icon/index.js +93 -0
  4. package/es/atom/select-icon/index.js.map +1 -0
  5. package/es/atom/select-icon/style.css +73 -0
  6. package/es/molecule/certification-card/index.d.ts.map +1 -1
  7. package/es/molecule/certification-card/index.js +4 -2
  8. package/es/molecule/certification-card/index.js.map +1 -1
  9. package/es/molecule/certification-card/style.css +23 -7
  10. package/es/molecule/progress-wrapper/index.js +1 -1
  11. package/es/molecule/progress-wrapper/index.js.map +1 -1
  12. package/es/molecule/progress-wrapper/style.css +1 -0
  13. package/es/template/certification-detail/index.d.ts +1 -1
  14. package/es/template/certification-detail/index.d.ts.map +1 -1
  15. package/es/template/certification-detail/index.js +16 -5
  16. package/es/template/certification-detail/index.js.map +1 -1
  17. package/es/template/certification-detail/style.css +0 -1
  18. package/es/template/certifications/index.d.ts.map +1 -1
  19. package/es/template/certifications/index.js +3 -1
  20. package/es/template/certifications/index.js.map +1 -1
  21. package/es/template/certifications/style.css +8 -1
  22. package/es/template/playlist-detail/index.d.ts.map +1 -1
  23. package/es/template/playlist-detail/index.js +15 -4
  24. package/es/template/playlist-detail/index.js.map +1 -1
  25. package/es/template/playlist-detail/style.css +0 -1
  26. package/es/template/skill-detail/index.d.ts.map +1 -1
  27. package/es/template/skill-detail/index.js +15 -3
  28. package/es/template/skill-detail/index.js.map +1 -1
  29. package/es/variables/colors.d.ts +1 -0
  30. package/es/variables/colors.d.ts.map +1 -1
  31. package/es/variables/colors.js +1 -0
  32. package/es/variables/colors.js.map +1 -1
  33. package/lib/atom/select-icon/index.d.ts +17 -0
  34. package/lib/atom/select-icon/index.d.ts.map +1 -0
  35. package/lib/atom/select-icon/index.js +111 -0
  36. package/lib/atom/select-icon/index.js.map +1 -0
  37. package/lib/atom/select-icon/style.css +73 -0
  38. package/lib/molecule/certification-card/index.d.ts.map +1 -1
  39. package/lib/molecule/certification-card/index.js +4 -2
  40. package/lib/molecule/certification-card/index.js.map +1 -1
  41. package/lib/molecule/certification-card/style.css +23 -7
  42. package/lib/molecule/progress-wrapper/index.js +1 -1
  43. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  44. package/lib/molecule/progress-wrapper/style.css +1 -0
  45. package/lib/template/certification-detail/index.d.ts +1 -1
  46. package/lib/template/certification-detail/index.d.ts.map +1 -1
  47. package/lib/template/certification-detail/index.js +15 -5
  48. package/lib/template/certification-detail/index.js.map +1 -1
  49. package/lib/template/certification-detail/style.css +0 -1
  50. package/lib/template/certifications/index.d.ts.map +1 -1
  51. package/lib/template/certifications/index.js +3 -1
  52. package/lib/template/certifications/index.js.map +1 -1
  53. package/lib/template/certifications/style.css +8 -1
  54. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  55. package/lib/template/playlist-detail/index.js +14 -4
  56. package/lib/template/playlist-detail/index.js.map +1 -1
  57. package/lib/template/playlist-detail/style.css +0 -1
  58. package/lib/template/skill-detail/index.d.ts.map +1 -1
  59. package/lib/template/skill-detail/index.js +14 -2
  60. package/lib/template/skill-detail/index.js.map +1 -1
  61. package/lib/variables/colors.d.ts +1 -0
  62. package/lib/variables/colors.d.ts.map +1 -1
  63. package/lib/variables/colors.js +1 -0
  64. package/lib/variables/colors.js.map +1 -1
  65. package/locales/bs/global.json +2 -0
  66. package/locales/cs/global.json +2 -0
  67. package/locales/de/global.json +2 -0
  68. package/locales/en/global.json +2 -0
  69. package/locales/es/global.json +2 -0
  70. package/locales/et/global.json +2 -0
  71. package/locales/fi/global.json +2 -0
  72. package/locales/fr/global.json +2 -0
  73. package/locales/hr/global.json +2 -0
  74. package/locales/hu/global.json +2 -0
  75. package/locales/hy/global.json +2 -0
  76. package/locales/it/global.json +2 -0
  77. package/locales/ja/global.json +2 -0
  78. package/locales/ko/global.json +2 -0
  79. package/locales/nl/global.json +2 -0
  80. package/locales/pl/global.json +2 -0
  81. package/locales/pt/global.json +2 -0
  82. package/locales/ro/global.json +2 -0
  83. package/locales/ru/global.json +2 -0
  84. package/locales/sk/global.json +2 -0
  85. package/locales/sl/global.json +2 -0
  86. package/locales/sv/global.json +2 -0
  87. package/locales/tl/global.json +2 -0
  88. package/locales/tr/global.json +2 -0
  89. package/locales/uk/global.json +2 -0
  90. package/locales/vi/global.json +2 -0
  91. package/locales/zh/global.json +2 -0
  92. package/locales/zh_TW/global.json +2 -0
  93. package/package.json +2 -2
@@ -0,0 +1,17 @@
1
+ export default SelectIcon;
2
+ declare function SelectIcon(props: any): JSX.Element;
3
+ declare namespace SelectIcon {
4
+ const propTypes: {
5
+ 'aria-label': PropTypes.Requireable<string>;
6
+ 'data-name': PropTypes.Requireable<string>;
7
+ faIcon: PropTypes.Requireable<string>;
8
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
9
+ options: PropTypes.Requireable<PropTypes.InferProps<{
10
+ selectionMode: PropTypes.Requireable<string>;
11
+ isSelected: PropTypes.Requireable<boolean>;
12
+ iconColor: PropTypes.Requireable<string>;
13
+ }>>;
14
+ };
15
+ }
16
+ import PropTypes from "prop-types";
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select-icon/index.js"],"names":[],"mappings":";AAgDA,qDA0BC"}
@@ -0,0 +1,93 @@
1
+ import React, { useCallback } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import classnames from 'classnames';
4
+ import FaIcon from '../icon';
5
+ import { COLORS } from '../../variables/colors';
6
+ import style from './style.css';
7
+ const ICON_COLOR = COLORS.cm_primary_blue;
8
+ const BACKGROUND_COLOR = COLORS.white;
9
+ const CHECK_ICON_NAME_MAP = {
10
+ single: 'circle-check',
11
+ multi: 'square-check'
12
+ };
13
+
14
+ const getButtonContent = (faIcon, options = {}) => {
15
+ const {
16
+ selectionMode = 'single',
17
+ isSelected = false,
18
+ iconColor = ICON_COLOR
19
+ } = options;
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ className: style.contentWrapper
22
+ }, isSelected ?
23
+ /*#__PURE__*/
24
+
25
+ /* checkbox icon */
26
+ React.createElement("div", {
27
+ className: style.checkIcon
28
+ }, /*#__PURE__*/React.createElement(FaIcon, {
29
+ iconName: CHECK_ICON_NAME_MAP[selectionMode],
30
+ iconColor: iconColor,
31
+ backgroundColor: BACKGROUND_COLOR,
32
+ size: {
33
+ faSize: 16,
34
+ wrapperSize: 16
35
+ }
36
+ })) : null,
37
+ /*#__PURE__*/
38
+
39
+ /* selection tick (L18) / icon */
40
+ React.createElement("div", {
41
+ className: style.iconWrapper
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: style.icon
44
+ }, /*#__PURE__*/React.createElement(FaIcon, {
45
+ iconName: faIcon,
46
+ iconColor: isSelected ? iconColor : '',
47
+ size: {
48
+ faSize: 32,
49
+ wrapperSize: 32
50
+ }
51
+ })), /*#__PURE__*/React.createElement("div", {
52
+ className: style.iconText
53
+ }, faIcon)));
54
+ };
55
+
56
+ const SelectIcon = props => {
57
+ const {
58
+ faIcon,
59
+ 'data-name': dataName,
60
+ 'aria-label': ariaLabel,
61
+ onClick,
62
+ options = {}
63
+ } = props;
64
+ const {
65
+ isSelected = false
66
+ } = options;
67
+ const contentView = getButtonContent(faIcon, options);
68
+ const styleButton = classnames(style.default, isSelected && style.selected);
69
+ const handleOnClick = useCallback(() => onClick(), [onClick]);
70
+ const IconButton = useCallback(() => /*#__PURE__*/React.createElement("button", {
71
+ type: "button",
72
+ "aria-label": ariaLabel,
73
+ "data-name": dataName,
74
+ "data-testid": `button-${dataName}`,
75
+ className: styleButton,
76
+ onClick: handleOnClick
77
+ }, contentView), [ariaLabel, contentView, dataName, handleOnClick, styleButton]);
78
+ return /*#__PURE__*/React.createElement(IconButton, null);
79
+ };
80
+
81
+ SelectIcon.propTypes = process.env.NODE_ENV !== "production" ? {
82
+ 'aria-label': PropTypes.string,
83
+ 'data-name': PropTypes.string,
84
+ faIcon: PropTypes.string,
85
+ onClick: PropTypes.func,
86
+ options: PropTypes.shape({
87
+ selectionMode: PropTypes.oneOf(['single', 'multi']),
88
+ isSelected: PropTypes.bool,
89
+ iconColor: PropTypes.string
90
+ })
91
+ } : {};
92
+ export default SelectIcon;
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","FaIcon","COLORS","style","ICON_COLOR","cm_primary_blue","BACKGROUND_COLOR","white","CHECK_ICON_NAME_MAP","single","multi","getButtonContent","faIcon","options","selectionMode","isSelected","iconColor","contentWrapper","checkIcon","faSize","wrapperSize","iconWrapper","icon","iconText","SelectIcon","props","dataName","ariaLabel","onClick","contentView","styleButton","default","selected","handleOnClick","IconButton","propTypes","string","func","shape","oneOf","bool"],"sources":["../../../src/atom/select-icon/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport FaIcon from '../icon';\n\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst ICON_COLOR = COLORS.cm_primary_blue;\nconst BACKGROUND_COLOR = COLORS.white;\nconst CHECK_ICON_NAME_MAP = {\n single: 'circle-check',\n multi: 'square-check'\n};\n\nconst getButtonContent = (faIcon, options = {}) => {\n const {selectionMode = 'single', isSelected = false, iconColor = ICON_COLOR} = options;\n\n return (\n <div className={style.contentWrapper}>\n {isSelected ? (\n /* checkbox icon */\n <div className={style.checkIcon}>\n <FaIcon\n iconName={CHECK_ICON_NAME_MAP[selectionMode]}\n iconColor={iconColor}\n backgroundColor={BACKGROUND_COLOR}\n size={{faSize: 16, wrapperSize: 16}}\n />\n </div>\n ) : null}\n {\n /* selection tick (L18) / icon */\n <div className={style.iconWrapper}>\n <div className={style.icon}>\n <FaIcon\n iconName={faIcon}\n iconColor={isSelected ? iconColor : ''}\n size={{faSize: 32, wrapperSize: 32}}\n />\n </div>\n <div className={style.iconText}>{faIcon}</div>\n </div>\n }\n </div>\n );\n};\n\nconst SelectIcon = props => {\n const {faIcon, 'data-name': dataName, 'aria-label': ariaLabel, onClick, options = {}} = props;\n\n const {isSelected = false} = options;\n\n const contentView = getButtonContent(faIcon, options);\n const styleButton = classnames(style.default, isSelected && style.selected);\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const IconButton = useCallback(\n () => (\n <button\n type=\"button\"\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid={`button-${dataName}`}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n ),\n [ariaLabel, contentView, dataName, handleOnClick, styleButton]\n );\n\n return <IconButton />;\n};\n\nSelectIcon.propTypes = {\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n faIcon: PropTypes.string,\n onClick: PropTypes.func,\n options: PropTypes.shape({\n selectionMode: PropTypes.oneOf(['single', 'multi']),\n isSelected: PropTypes.bool,\n iconColor: PropTypes.string\n })\n};\n\nexport default SelectIcon;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,SAAnB;AAEA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAGF,MAAM,CAACG,eAA1B;AACA,MAAMC,gBAAgB,GAAGJ,MAAM,CAACK,KAAhC;AACA,MAAMC,mBAAmB,GAAG;EAC1BC,MAAM,EAAE,cADkB;EAE1BC,KAAK,EAAE;AAFmB,CAA5B;;AAKA,MAAMC,gBAAgB,GAAG,CAACC,MAAD,EAASC,OAAO,GAAG,EAAnB,KAA0B;EACjD,MAAM;IAACC,aAAa,GAAG,QAAjB;IAA2BC,UAAU,GAAG,KAAxC;IAA+C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lB,CAAjC;EAEA,MAAMM,UAAU,GAAGpC,WAAW,CAC5B,mBACE;IACE,IAAI,EAAC,QADP;IAEE,cAAY6B,SAFd;IAGE,aAAWD,QAHb;IAIE,eAAc,UAASA,QAAS,EAJlC;IAKE,SAAS,EAAEI,WALb;IAME,OAAO,EAAEG;EANX,GAQGJ,WARH,CAF0B,EAa5B,CAACF,SAAD,EAAYE,WAAZ,EAAyBH,QAAzB,EAAmCO,aAAnC,EAAkDH,WAAlD,CAb4B,CAA9B;EAgBA,oBAAO,oBAAC,UAAD,OAAP;AACD,CA1BD;;AA4BAN,UAAU,CAACW,SAAX,2CAAuB;EACrB,cAAcpC,SAAS,CAACqC,MADH;EAErB,aAAarC,SAAS,CAACqC,MAFF;EAGrBxB,MAAM,EAAEb,SAAS,CAACqC,MAHG;EAIrBR,OAAO,EAAE7B,SAAS,CAACsC,IAJE;EAKrBxB,OAAO,EAAEd,SAAS,CAACuC,KAAV,CAAgB;IACvBxB,aAAa,EAAEf,SAAS,CAACwC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,CAAhB,CADQ;IAEvBxB,UAAU,EAAEhB,SAAS,CAACyC,IAFC;IAGvBxB,SAAS,EAAEjB,SAAS,CAACqC;EAHE,CAAhB;AALY,CAAvB;AAYA,eAAeZ,UAAf"}
@@ -0,0 +1,73 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_grey_100 from colors;
3
+ @value cm_grey_400 from colors;
4
+ @value cm_grey_500 from colors;
5
+ @value cm_grey_75 from colors;
6
+ @value cm_grey_50 from colors;
7
+ @value cm_primary_blue from colors;
8
+ @value white from colors;
9
+
10
+ .button {
11
+ font-family: Gilroy;
12
+ font-size: 12px;
13
+ font-style: normal;
14
+ font-weight: 600;
15
+ line-height: 16px;
16
+ color: cm_grey_400;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ cursor: pointer;
21
+ border: none;
22
+ background-color: white;
23
+ }
24
+
25
+ .button:hover {
26
+ background-color: cm_grey_100;
27
+ }
28
+
29
+ .selected {
30
+ background-color: cm_grey_50;
31
+ border: 2px solid cm_primary_blue;
32
+ }
33
+
34
+ .selected:hover {
35
+ background-color: cm_grey_75;
36
+ color: cm_grey_500;
37
+ }
38
+
39
+ .default {
40
+ composes: button;
41
+ width: 144px;
42
+ height: 120px;
43
+ border-radius: 12px;
44
+ position: relative;
45
+ }
46
+
47
+ .contentWrapper {
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ justify-content: center;
52
+ height: 100%;
53
+ }
54
+
55
+ .checkIcon {
56
+ position: absolute;
57
+ top: 8px;
58
+ right: 8px;
59
+ }
60
+
61
+ .iconWrapper {
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ }
66
+
67
+ .icon {
68
+ margin-bottom: 8px;
69
+ }
70
+
71
+ .iconText {
72
+ font-size: 12px;
73
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EAwDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EA0DC"}
@@ -53,10 +53,12 @@ const CertificationCard = (props, context) => {
53
53
  },
54
54
  icon: progressIconProps
55
55
  }) : null, /*#__PURE__*/React.createElement("div", {
56
- className: style.imageWrapper
56
+ className: style.imageSection
57
+ }, /*#__PURE__*/React.createElement("div", {
58
+ className: style.imageContainer
57
59
  }, /*#__PURE__*/React.createElement("img", {
58
60
  src: imgUrl
59
- })), /*#__PURE__*/React.createElement("div", {
61
+ }))), /*#__PURE__*/React.createElement("div", {
60
62
  className: style.detailWrapper
61
63
  }, /*#__PURE__*/React.createElement("div", {
62
64
  className: style.titleWrapper
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","COLORS","Provider","Tag","ProgressBar","style","CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","positive","contextTypes","childContextTypes","propTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>\n <span>{nbDone}</span>\n {` ${translate('certification_module')}`}\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default CertificationCard;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,iBAAiB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC5C,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,QAAd;IAAwBC,MAAxB;IAAgCC;EAAhC,IAA2CN,KAAjD;EACA,MAAM;IACJO,KADI;IAEJC,SAAS,EAAE;MAACC;IAAD;EAFP,IAGFN,IAHJ;EAIA,MAAM;IAACO;EAAD,IAAcT,OAApB;EAEA,MAAMU,YAAY,GAAGP,QAAQ,GAAG,GAAhC;EACA,MAAMQ,aAAa,GAAGD,YAAY,GAAGD,SAAS,CAAC,aAAD,CAAZ,GAA8BA,SAAS,CAAC,WAAD,CAAzE;EACA,MAAMG,eAAe,GAAGF,YAAY,GAAG,UAAH,GAAgB,SAApD;EACA,MAAMG,iBAAiB,GAAG;IACxBC,QAAQ,EAAE,MADc;IAExBC,QAAQ,EAAEL,YAAY,GAAG,OAAH,GAAa,cAFX;IAGxBM,SAAS,EAAEN,YAAY,GAAG,SAAH,GAAe,SAHd;IAIxBO,eAAe,EAAEP,YAAY,GAAG,SAAH,GAAe,SAJpB;IAKxBQ,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT,CALkB;IASxBC,WAAW,EAAE;MAACC,OAAO,EAAE;IAAV;EATW,CAA1B;EA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,EAAET,SAAS,CAAC2C,MADW;EAE5BjC,IAAI,EAAEV,SAAS,CAAC4C,KAAV,CAAgB;IACpB9B,KAAK,EAAEd,SAAS,CAAC2C,MADG;IAEpB5B,SAAS,EAAEf,SAAS,CAAC4C,KAAV,CAAgB;MACzB5B,MAAM,EAAEhB,SAAS,CAAC6C;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BlC,QAAQ,EAAEX,SAAS,CAAC6C,MARQ;EAS5BjC,MAAM,EAAEZ,SAAS,CAAC2C,MATU;EAU5B9B,OAAO,EAAEb,SAAS,CAAC8C;AAVS,CAA9B;AAaA,eAAexC,iBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","COLORS","Provider","Tag","ProgressBar","style","CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","container","top","right","imageSection","imageContainer","detailWrapper","titleWrapper","moduleCount","customProgressBar","positive","contextTypes","childContextTypes","propTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageSection}>\n <div className={style.imageContainer}>\n <img src={imgUrl} />\n </div>\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>\n <span>{nbDone}</span>\n {` ${translate('certification_module')}`}\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default CertificationCard;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,iBAAiB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC5C,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,QAAd;IAAwBC,MAAxB;IAAgCC;EAAhC,IAA2CN,KAAjD;EACA,MAAM;IACJO,KADI;IAEJC,SAAS,EAAE;MAACC;IAAD;EAFP,IAGFN,IAHJ;EAIA,MAAM;IAACO;EAAD,IAAcT,OAApB;EAEA,MAAMU,Y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AS,EAAEZ,KAAK,CAACS,KAAtB;IAA6B,aAAU;EAAvC,GACGA,KADH,CAFF,eAKE;IAAK,SAAS,EAAET,KAAK,CAACiC;EAAtB,gBACE,kCAAOtB,MAAP,CADF,EAEI,IAAGC,SAAS,CAAC,sBAAD,CAAyB,EAFzC,CALF,CADF,eAWE,oBAAC,WAAD;IACE,SAAS,EAAEZ,KAAK,CAACkC,iBADnB;IAEE,KAAK,EAAE;MAACd,eAAe,EAAExB,MAAM,CAACuC;IAAzB,CAFT;IAGE,WAAW,EAAE,KAHf;IAIE,KAAK,EAAE7B,QAJT;IAKE,GAAG,EAAE;EALP,EAXF,CAdF,CADF;AAoCD,CA1DD;;AA4DAL,iBAAiB,CAACmC,YAAlB,GAAiC;EAC/BxB,SAAS,EAAEf,QAAQ,CAACwC,iBAAT,CAA2BzB;AADP,CAAjC;AAIAX,iBAAiB,CAACqC,SAAlB,2CAA8B;EAC5BlC,KAAK,EAAET,SAAS,CAAC4C,MADW;EAE5BlC,IAAI,EAAEV,SAAS,CAAC6C,KAAV,CAAgB;IACpB/B,KAAK,EAAEd,SAAS,CAAC4C,MADG;IAEpB7B,SAAS,EAAEf,SAAS,CAAC6C,KAAV,CAAgB;MACzB7B,MAAM,EAAEhB,SAAS,CAAC8C;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BnC,QAAQ,EAAEX,SAAS,CAAC8C,MARQ;EAS5BlC,MAAM,EAAEZ,SAAS,CAAC4C,MATU;EAU5B/B,OAAO,EAAEb,SAAS,CAAC+C;AAVS,CAA9B;AAaA,eAAezC,iBAAf"}
@@ -22,7 +22,7 @@
22
22
  transition: all 0.5s ease-out;
23
23
  }
24
24
 
25
- .imageWrapper {
25
+ .imageSection {
26
26
  display: flex;
27
27
  justify-content: center;
28
28
  align-items: center;
@@ -30,22 +30,38 @@
30
30
  height: 160px;
31
31
  width: auto;
32
32
  transition: all 0.5s ease-out;
33
+ border-top-left-radius: 12px;
34
+ border-top-right-radius: 12px;
33
35
 
34
- img {
35
- width: 100px;
36
+ .imageContainer {
36
37
  transition: all 0.5s ease-out;
37
38
  }
38
39
  }
39
40
 
41
+ .imageContainer {
42
+ width: 202px;
43
+ height: 112px;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+
48
+ img {
49
+ width: 100%;
50
+ height: 100%;
51
+ object-fit: contain;
52
+ }
53
+ }
54
+
40
55
  .container:hover {
41
56
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.14);
42
57
 
58
+ .imageContainer {
59
+ width: 244px;
60
+ height: 136px;
61
+ }
62
+
43
63
  .imageWrapper {
44
64
  background-color: cm_grey_75;
45
-
46
- img {
47
- width: 115px;
48
- }
49
65
  }
50
66
  }
51
67
  .detailWrapper {
@@ -57,7 +57,7 @@ const DetailSection = ({
57
57
  disabled: isLocked
58
58
  });
59
59
  const LockedTag = /*#__PURE__*/React.createElement(Tag, {
60
- label: "Locked",
60
+ label: translate('locked'),
61
61
  size: "S",
62
62
  icon: {
63
63
  position: 'left',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","isTypeStars","DownloadButton","target","href","backgroundColor","color","width","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","positive","statsProgressionMobile","details","section","commonDetailSectionPropTypes","oneOf","string","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n link={{\n target: '_blank',\n href: downloadUrl\n }}\n data-name={`download-${type}-button`}\n aria-label={`download ${type} button`}\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF', width: 'auto'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label=\"Locked\"\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocale = translate('modules_completed_mandatory');\n const isLocked = progression !== 100;\n\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber} data-name=\"progress-stats\">\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocale}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,QAAP,MAAqB,qBAArB,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAR;EAAcC,QAAd;EAAwBC,WAAxB;EAAqCC;AAArC,CAAD,EAA8CC,OAA9C,KAA0D;EAC9E,MAAM;IAACC;EAAD,IAAcD,OAApB;EACA,MAAME,WAAW,GAAGN,IAAI,KAAK,OAA7B;EAEA,MAAMO,cAAc,gBAClB,oBAAC,UAAD;IACE,KAAK,EAAEF,SAAS,CAAC,UAAD,CADlB;IAEE,IAAI,EAAE;MACJG,MAAM,EAAE,QADJ;MAEJC,IAAI,EAAEP;IAFF,CAFR;IAME,aAAY,YAAWF,IAAK,SAN9B;IAOE,cAAa,YAAWA,IAAK,SAP/B;IAQE,WAAW,EAAE;MAACU,eAAe,EAAE,SAAlB;MAA6BC,KAAK,EAAE,SAApC;MAA+CC,KAAK,EAAE;IAAtD,CARf;IASE,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,MAAM,EAAE;QACNC,IAAI,EAAE,UADA;QAENJ,KAAK,EAAE,SAFD;QAGNK,IAAI,EAAE,EAHA;QAINC,WAAW,EAAE;UAACC,OAAO,EAA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S,EAAEZ,QAAQ,CAAC0D,iBAAT,CAA2B9C;AADT,CAA/B;AAIAuB,eAAe,CAACwB,SAAhB,2CAA4B;EAC1BrB,KAAK,EAAE7C,SAAS,CAAC8D,MADS;EAE1BhB,QAAQ,EAAE9C,SAAS,CAAC8D,MAFM;EAG1BnB,gBAAgB,EAAE3C,SAAS,CAAC+D,MAHF;EAI1BnB,gBAAgB,EAAE5C,SAAS,CAAC+D,MAJF;EAK1BhB,WAAW,EAAE/C,SAAS,CAAC+D,MALG;EAM1Bf,QAAQ,EAAEhD,SAAS,CAACoE,OAAV,CAAkBpE,SAAS,CAACqE,KAAV,CAAgBT,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAelB,eAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","isTypeStars","DownloadButton","target","href","backgroundColor","color","width","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","positive","statsProgressionMobile","details","section","commonDetailSectionPropTypes","oneOf","string","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n link={{\n target: '_blank',\n href: downloadUrl\n }}\n data-name={`download-${type}-button`}\n aria-label={`download ${type} button`}\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF', width: 'auto'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label={translate('locked')}\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocale = translate('modules_completed_mandatory');\n const isLocked = progression !== 100;\n\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber} data-name=\"progress-stats\">\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocale}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB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,MAFM;EAG1BnB,gBAAgB,EAAE3C,SAAS,CAAC+D,MAHF;EAI1BnB,gBAAgB,EAAE5C,SAAS,CAAC+D,MAJF;EAK1BhB,WAAW,EAAE/C,SAAS,CAAC+D,MALG;EAM1Bf,QAAQ,EAAEhD,SAAS,CAACoE,OAAV,CAAkBpE,SAAS,CAACqE,KAAV,CAAgBT,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAelB,eAAf"}
@@ -108,6 +108,7 @@
108
108
 
109
109
  .img {
110
110
  height: 100%;
111
+ max-width: 160px;
111
112
  }
112
113
 
113
114
  .buttonContainer {
@@ -28,7 +28,7 @@ declare namespace CertificationDetail {
28
28
  namespace propTypes {
29
29
  const title: PropTypes.Validator<string>;
30
30
  const certificationRef: PropTypes.Validator<string>;
31
- const description: PropTypes.Requireable<string>;
31
+ const description: PropTypes.Validator<string>;
32
32
  const logoUrl: PropTypes.Requireable<string>;
33
33
  const metrics: PropTypes.Requireable<PropTypes.InferProps<{
34
34
  progression: PropTypes.Requireable<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,4EA0GC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAgBA,4EAuHC"}
@@ -2,7 +2,7 @@ import _isNil from "lodash/fp/isNil";
2
2
  import _round from "lodash/fp/round";
3
3
  import _lowerCase from "lodash/fp/lowerCase";
4
4
  import _compact from "lodash/fp/compact";
5
- import React, { useCallback, useState, useMemo } from 'react';
5
+ import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classnames from 'classnames';
8
8
  import Markdown from 'markdown-to-jsx';
@@ -16,7 +16,6 @@ import AllCourses from '../skill-detail/all-courses';
16
16
  import { ContinueLearningButton } from '../skill-detail';
17
17
  import ProgressWrapper from '../../molecule/progress-wrapper';
18
18
  import style from './style.css';
19
- const DESCRIPTION_BREAKPOINT = 382;
20
19
 
21
20
  const CertificationDetail = (props, context) => {
22
21
  const {
@@ -33,6 +32,7 @@ const CertificationDetail = (props, context) => {
33
32
  diplomaUrl,
34
33
  badgeUrl
35
34
  } = props;
35
+ const descriptionRef = useRef(null);
36
36
  const {
37
37
  translate
38
38
  } = context;
@@ -42,10 +42,21 @@ const CertificationDetail = (props, context) => {
42
42
  stars,
43
43
  totalModules
44
44
  } = metrics;
45
+ const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);
45
46
  const [showMore, setShowMore] = useState(false);
46
47
  const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
48
+ useEffect(() => {
49
+ if (descriptionRef.current) {
50
+ const {
51
+ clientHeight = 0,
52
+ scrollHeight = 0
53
+ } = descriptionRef.current;
54
+ setIsDescriptionTruncated(scrollHeight > clientHeight);
55
+ }
56
+ }, [description]);
47
57
  const Description = useCallback(() => {
48
58
  return /*#__PURE__*/React.createElement("div", {
59
+ ref: descriptionRef,
49
60
  className: classnames(style.description, !showMore && style.truncate)
50
61
  }, /*#__PURE__*/React.createElement(Markdown, null, description));
51
62
  }, [showMore, description]);
@@ -58,7 +69,7 @@ const CertificationDetail = (props, context) => {
58
69
  }, !_isNil(onBackClick) ? /*#__PURE__*/React.createElement(ButtonLinkIcon, {
59
70
  faIcon: "arrow-left",
60
71
  "data-name": "back-button",
61
- "aria-label": "Back",
72
+ "aria-label": translate('back'),
62
73
  onClick: onBackClick,
63
74
  className: style.backButton,
64
75
  tooltipPlacement: "right"
@@ -73,7 +84,7 @@ const CertificationDetail = (props, context) => {
73
84
  label: translate('certification')
74
85
  }), /*#__PURE__*/React.createElement("div", {
75
86
  className: style.title
76
- }, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), description.length >= DESCRIPTION_BREAKPOINT ? /*#__PURE__*/React.createElement("div", {
87
+ }, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), isDescriptionTruncated ? /*#__PURE__*/React.createElement("div", {
77
88
  className: style.showMoreWrapper,
78
89
  onClick: handleShowMore
79
90
  }, translate(showMore ? 'Show less' : 'Show more'), /*#__PURE__*/React.createElement(Icon, {
@@ -117,7 +128,7 @@ CertificationDetail.contextTypes = {
117
128
  CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
118
129
  title: PropTypes.string.isRequired,
119
130
  certificationRef: PropTypes.string.isRequired,
120
- description: PropTypes.string,
131
+ description: PropTypes.string.isRequired,
121
132
  logoUrl: PropTypes.string,
122
133
  metrics: PropTypes.shape({
123
134
  progression: PropTypes.number,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","PropTypes","classnames","Markdown","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCoursesAvailable","filters","onBackClick","onContinueLearningClick","metrics","logoUrl","diplomaUrl","badgeUrl","translate","progression","mandatoryModules","stars","totalModules","showMore","setShowMore","handleShowMore","Description","truncate","completedModules","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","length","showMoreWrapper","faSize","wrapperSize","contentStats","type","downloadUrl","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","bool","onChange","func","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase, round, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCoursesAvailable,\n filters,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n diplomaUrl,\n badgeUrl\n } = props;\n const {translate} = context;\n const {progression, mandatoryModules, stars, totalModules} = metrics;\n\n const [showMore, setShowMore] = useState(false);\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 <Markdown>{description}</Markdown>\n </div>\n );\n }, [showMore, description]);\n\n const completedModules = useMemo(\n () => round((mandatoryModules * progression) / 100),\n [mandatoryModules, progression]\n );\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedModules={completedModules}\n mandatoryModules={mandatoryModules}\n sections={compact([\n {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n content={certificationCourses}\n filters={filters}\n data-name=\"certification-courses\"\n />\n </div>\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n mandatoryModules: PropTypes.number,\n totalModules: PropTypes.number\n }),\n diplomaUrl: PropTypes.string,\n badgeUrl: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default CertificationDetail;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,EAAsCC,OAAtC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,iBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,SAAQC,qBAAR,QAAoC,mBAApC;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BA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EAY9B7B,QAAQ,EAAE5B,SAAS,CAACyD,MAZU;EAa9BpC,uBAAuB,EAAErB,SAAS,CAAC6D,IAbL;EAc9BzC,oBAAoB,EAAEpB,SAAS,CAAC2D,KAAV,CAAgBnD,SAAS,CAACgD,SAA1B,CAdQ;EAe9BlC,OAAO,EAAEtB,SAAS,CAAC2D,KAAV,CAAgB;IACvBG,QAAQ,EAAE9D,SAAS,CAAC+D,IADG;IAEvBC,OAAO,EAAEhE,SAAS,CAACiE,OAAV,CAAkBjE,SAAS,CAAC2D,KAAV,CAAgBtD,qBAAhB,CAAlB;EAFc,CAAhB,CAfqB;EAmB9BkB,WAAW,EAAEvB,SAAS,CAAC+D,IAnBO;EAoB9BvC,uBAAuB,EAAExB,SAAS,CAAC+D;AApBL,CAAhC;AAuBA,eAAejD,mBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useEffect","useRef","useState","useMemo","PropTypes","classnames","Markdown","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearningButton","ProgressWrapper","style","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCoursesAvailable","filters","onBackClick","onContinueLearningClick","metrics","logoUrl","diplomaUrl","badgeUrl","descriptionRef","translate","progression","mandatoryModules","stars","totalModules","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","truncate","completedModules","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","showMoreWrapper","faSize","wrapperSize","contentStats","type","downloadUrl","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","bool","onChange","func","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase, round, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCoursesAvailable,\n filters,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n diplomaUrl,\n badgeUrl\n } = props;\n const descriptionRef = useRef(null);\n const {translate} = context;\n const {progression, mandatoryModules, stars, totalModules} = metrics;\n\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n useEffect(() => {\n if (descriptionRef.current) {\n const {clientHeight = 0, scrollHeight = 0} = descriptionRef.current;\n setIsDescriptionTruncated(scrollHeight > clientHeight);\n }\n }, [description]);\n\n const Description = useCallback(() => {\n return (\n <div\n ref={descriptionRef}\n className={classnames(style.description, !showMore && style.truncate)}\n >\n <Markdown>{description}</Markdown>\n </div>\n );\n }, [showMore, description]);\n\n const completedModules = useMemo(\n () => round((mandatoryModules * progression) / 100),\n [mandatoryModules, progression]\n );\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label={translate('back')}\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {isDescriptionTruncated ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedModules={completedModules}\n mandatoryModules={mandatoryModules}\n sections={compact([\n {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n content={certificationCourses}\n filters={filters}\n data-name=\"certification-courses\"\n />\n </div>\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n mandatoryModules: PropTypes.number,\n totalModules: PropTypes.number\n }),\n diplomaUrl: PropTypes.string,\n badgeUrl: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default CertificationDetail;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,MAAvC,EAA+CC,QAA/C,EAAyDC,OAA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 @@
42
42
 
43
43
  .ctaContainer {
44
44
  display: flex;
45
- align-items: center;
46
45
  width: 100%;
47
46
  gap: 40px;
48
47
  margin-bottom: 40px;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certifications/index.js"],"names":[],"mappings":";AASA,uEAoEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certifications/index.js"],"names":[],"mappings":";AASA,uEAsEC"}
@@ -27,6 +27,8 @@ const Certifications = (props, context) => {
27
27
  setShowCompleted(!showCompleted);
28
28
  }, [showCompleted, setShowCompleted]);
29
29
  return /*#__PURE__*/React.createElement("div", {
30
+ className: style.backgroudnContainer
31
+ }, /*#__PURE__*/React.createElement("div", {
30
32
  className: style.container,
31
33
  "data-name": "Certifications"
32
34
  }, /*#__PURE__*/React.createElement(Title, {
@@ -67,7 +69,7 @@ const Certifications = (props, context) => {
67
69
  return /*#__PURE__*/React.createElement("div", {
68
70
  key: certification.label
69
71
  }, /*#__PURE__*/React.createElement(CertificationCard, certification));
70
- })));
72
+ }))));
71
73
  };
72
74
 
73
75
  Certifications.contextTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Provider","Title","Select","InputSwitch","CertificationCard","style","Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","sortView","undefined","handleShowCompletedToggle","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.container} data-name=\"Certifications\">\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;AAAA,OAAOA,KAAP,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,CAAgB;QACzBK,MAAM,EAAE1C,SAAS,CAAC2C;MADO,CAAhB;IAFS,CAAhB,CAFQ;IAQdZ,QAAQ,EAAE/B,SAAS,CAAC2C,MARN;IASdC,MAAM,EAAE5C,SAAS,CAACsC,MATJ;IAUdO,OAAO,EAAE7C,SAAS,CAAC8C;EAVL,CAAhB,CADc,CADS;EAezBnC,OAAO,EAAEX,SAAS,CAACqC,KAAV,CAAgBlC,MAAM,CAACgC,SAAvB;AAfgB,CAA3B;AAkBA,eAAe5B,cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Provider","Title","Select","InputSwitch","CertificationCard","style","Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","sortView","undefined","handleShowCompletedToggle","backgroudnContainer","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.backgroudnContainer}>\n <div className={style.container} data-name=\"Certifications\">\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,iBAAP,MAA8B,mCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IAACC,cAAD;I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kBA,eAAe7B,cAAf"}
@@ -7,13 +7,20 @@
7
7
  @value cm_grey_200 from colors;
8
8
  @value cm_grey_400 from colors;
9
9
  @value cm_grey_500 from colors;
10
+ @value white from colors;
11
+
12
+ .backgroudnContainer {
13
+ background-color: white;
14
+ min-height: 100%;
15
+ width: 100%;
16
+ }
10
17
 
11
18
  .container {
12
19
  font-family: "Gilroy";
13
20
  font-style: normal;
14
21
  max-width: 1080px;
15
22
  margin: auto;
16
- margin-top: 48px;
23
+ padding-top: 48px;
17
24
  }
18
25
 
19
26
  .sortSection {