@coorpacademy/components 11.32.42 → 11.32.44-alpha.55

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 (209) hide show
  1. package/es/atom/button-link/index.d.ts.map +1 -1
  2. package/es/atom/button-link/index.js +12 -6
  3. package/es/atom/button-link/index.js.map +1 -1
  4. package/es/atom/cta/index.js +2 -2
  5. package/es/atom/cta/index.js.map +1 -1
  6. package/es/atom/icon/index.d.ts +1 -0
  7. package/es/atom/icon/index.d.ts.map +1 -1
  8. package/es/atom/icon/index.js +8 -1
  9. package/es/atom/icon/index.js.map +1 -1
  10. package/es/atom/input-file-draggable/index.js +2 -2
  11. package/es/atom/input-file-draggable/index.js.map +1 -1
  12. package/es/atom/link/index.d.ts +2 -2
  13. package/es/atom/link/index.d.ts.map +1 -1
  14. package/es/atom/link/index.js +38 -46
  15. package/es/atom/link/index.js.map +1 -1
  16. package/es/atom/select-icon/index.d.ts +17 -0
  17. package/es/atom/select-icon/index.d.ts.map +1 -0
  18. package/es/atom/select-icon/index.js +93 -0
  19. package/es/atom/select-icon/index.js.map +1 -0
  20. package/es/atom/select-icon/style.css +73 -0
  21. package/es/molecule/banner/index.js +3 -3
  22. package/es/molecule/banner/index.js.map +1 -1
  23. package/es/molecule/certification-card/index.d.ts +4 -0
  24. package/es/molecule/certification-card/index.d.ts.map +1 -1
  25. package/es/molecule/certification-card/index.js +18 -12
  26. package/es/molecule/certification-card/index.js.map +1 -1
  27. package/es/molecule/certification-card/style.css +23 -7
  28. package/es/molecule/cm-popin/types.d.ts +14 -2
  29. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  30. package/es/molecule/draggable-list/index.d.ts +12 -0
  31. package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
  32. package/es/molecule/progress-wrapper/index.js +22 -12
  33. package/es/molecule/progress-wrapper/index.js.map +1 -1
  34. package/es/molecule/progress-wrapper/style.css +1 -0
  35. package/es/organism/accordion/coorp-manager/part/index.js +2 -1
  36. package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
  37. package/es/organism/brand-learning-priorities/index.d.ts +12 -0
  38. package/es/organism/list-item/index.d.ts +16 -1
  39. package/es/organism/list-item/index.d.ts.map +1 -1
  40. package/es/organism/list-item/index.js +58 -9
  41. package/es/organism/list-item/index.js.map +1 -1
  42. package/es/organism/list-item/style.css +25 -11
  43. package/es/organism/list-items/index.d.ts +12 -0
  44. package/es/organism/mooc-header/index.d.ts.map +1 -1
  45. package/es/organism/mooc-header/index.js +2 -3
  46. package/es/organism/mooc-header/index.js.map +1 -1
  47. package/es/organism/sidebar/index.d.ts +28 -3
  48. package/es/organism/sidebar/index.d.ts.map +1 -1
  49. package/es/organism/sidebar/index.js +7 -3
  50. package/es/organism/sidebar/index.js.map +1 -1
  51. package/es/template/app-player/loading/index.d.ts +14 -2
  52. package/es/template/app-player/player/index.d.ts +28 -4
  53. package/es/template/app-player/player/slides/index.d.ts +14 -2
  54. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  55. package/es/template/app-player/popin-correction/index.d.ts +18 -6
  56. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  57. package/es/template/app-player/popin-end/index.d.ts +16 -4
  58. package/es/template/app-player/popin-end/summary.d.ts +2 -2
  59. package/es/template/app-player/popin-header/index.d.ts +2 -2
  60. package/es/template/app-review/index.d.ts +14 -2
  61. package/es/template/app-review/index.d.ts.map +1 -1
  62. package/es/template/app-review/player/prop-types.d.ts +14 -2
  63. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  64. package/es/template/app-review/prop-types.d.ts +14 -2
  65. package/es/template/app-review/prop-types.d.ts.map +1 -1
  66. package/es/template/back-office/brand-update/index.d.ts +38 -2
  67. package/es/template/certification-detail/index.d.ts +2 -1
  68. package/es/template/certification-detail/index.d.ts.map +1 -1
  69. package/es/template/certification-detail/index.js +19 -6
  70. package/es/template/certification-detail/index.js.map +1 -1
  71. package/es/template/certification-detail/style.css +0 -1
  72. package/es/template/certifications/index.d.ts +6 -0
  73. package/es/template/certifications/index.d.ts.map +1 -1
  74. package/es/template/certifications/index.js +28 -12
  75. package/es/template/certifications/index.js.map +1 -1
  76. package/es/template/certifications/style.css +8 -1
  77. package/es/template/common/dashboard/index.d.ts +28 -4
  78. package/es/template/common/search-page/index.d.ts +14 -2
  79. package/es/template/external-course/index.d.ts +14 -2
  80. package/es/template/playlist-detail/index.d.ts.map +1 -1
  81. package/es/template/playlist-detail/index.js +15 -4
  82. package/es/template/playlist-detail/index.js.map +1 -1
  83. package/es/template/playlist-detail/style.css +0 -1
  84. package/es/template/skill-detail/index.d.ts +1 -1
  85. package/es/template/skill-detail/index.d.ts.map +1 -1
  86. package/es/template/skill-detail/index.js +20 -8
  87. package/es/template/skill-detail/index.js.map +1 -1
  88. package/es/variables/colors.d.ts +1 -0
  89. package/es/variables/colors.d.ts.map +1 -1
  90. package/es/variables/colors.js +1 -0
  91. package/es/variables/colors.js.map +1 -1
  92. package/lib/atom/button-link/index.d.ts.map +1 -1
  93. package/lib/atom/button-link/index.js +12 -6
  94. package/lib/atom/button-link/index.js.map +1 -1
  95. package/lib/atom/cta/index.js +2 -2
  96. package/lib/atom/cta/index.js.map +1 -1
  97. package/lib/atom/icon/index.d.ts +1 -0
  98. package/lib/atom/icon/index.d.ts.map +1 -1
  99. package/lib/atom/icon/index.js +12 -2
  100. package/lib/atom/icon/index.js.map +1 -1
  101. package/lib/atom/input-file-draggable/index.js.map +1 -1
  102. package/lib/atom/link/index.d.ts +2 -2
  103. package/lib/atom/link/index.d.ts.map +1 -1
  104. package/lib/atom/link/index.js +38 -47
  105. package/lib/atom/link/index.js.map +1 -1
  106. package/lib/atom/select-icon/index.d.ts +17 -0
  107. package/lib/atom/select-icon/index.d.ts.map +1 -0
  108. package/lib/atom/select-icon/index.js +111 -0
  109. package/lib/atom/select-icon/index.js.map +1 -0
  110. package/lib/atom/select-icon/style.css +73 -0
  111. package/lib/molecule/banner/index.js.map +1 -1
  112. package/lib/molecule/certification-card/index.d.ts +4 -0
  113. package/lib/molecule/certification-card/index.d.ts.map +1 -1
  114. package/lib/molecule/certification-card/index.js +18 -12
  115. package/lib/molecule/certification-card/index.js.map +1 -1
  116. package/lib/molecule/certification-card/style.css +23 -7
  117. package/lib/molecule/cm-popin/types.d.ts +14 -2
  118. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  119. package/lib/molecule/draggable-list/index.d.ts +12 -0
  120. package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
  121. package/lib/molecule/progress-wrapper/index.js +26 -13
  122. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  123. package/lib/molecule/progress-wrapper/style.css +1 -0
  124. package/lib/organism/accordion/coorp-manager/part/index.js +3 -1
  125. package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
  126. package/lib/organism/brand-learning-priorities/index.d.ts +12 -0
  127. package/lib/organism/list-item/index.d.ts +16 -1
  128. package/lib/organism/list-item/index.d.ts.map +1 -1
  129. package/lib/organism/list-item/index.js +56 -5
  130. package/lib/organism/list-item/index.js.map +1 -1
  131. package/lib/organism/list-item/style.css +25 -11
  132. package/lib/organism/list-items/index.d.ts +12 -0
  133. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  134. package/lib/organism/mooc-header/index.js +2 -3
  135. package/lib/organism/mooc-header/index.js.map +1 -1
  136. package/lib/organism/sidebar/index.d.ts +28 -3
  137. package/lib/organism/sidebar/index.d.ts.map +1 -1
  138. package/lib/organism/sidebar/index.js +7 -3
  139. package/lib/organism/sidebar/index.js.map +1 -1
  140. package/lib/template/app-player/loading/index.d.ts +14 -2
  141. package/lib/template/app-player/player/index.d.ts +28 -4
  142. package/lib/template/app-player/player/slides/index.d.ts +14 -2
  143. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  144. package/lib/template/app-player/popin-correction/index.d.ts +18 -6
  145. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  146. package/lib/template/app-player/popin-end/index.d.ts +16 -4
  147. package/lib/template/app-player/popin-end/summary.d.ts +2 -2
  148. package/lib/template/app-player/popin-header/index.d.ts +2 -2
  149. package/lib/template/app-review/index.d.ts +14 -2
  150. package/lib/template/app-review/index.d.ts.map +1 -1
  151. package/lib/template/app-review/player/prop-types.d.ts +14 -2
  152. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  153. package/lib/template/app-review/prop-types.d.ts +14 -2
  154. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  155. package/lib/template/back-office/brand-update/index.d.ts +38 -2
  156. package/lib/template/certification-detail/index.d.ts +2 -1
  157. package/lib/template/certification-detail/index.d.ts.map +1 -1
  158. package/lib/template/certification-detail/index.js +18 -6
  159. package/lib/template/certification-detail/index.js.map +1 -1
  160. package/lib/template/certification-detail/style.css +0 -1
  161. package/lib/template/certifications/index.d.ts +6 -0
  162. package/lib/template/certifications/index.d.ts.map +1 -1
  163. package/lib/template/certifications/index.js +30 -14
  164. package/lib/template/certifications/index.js.map +1 -1
  165. package/lib/template/certifications/style.css +8 -1
  166. package/lib/template/common/dashboard/index.d.ts +28 -4
  167. package/lib/template/common/search-page/index.d.ts +14 -2
  168. package/lib/template/external-course/index.d.ts +14 -2
  169. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  170. package/lib/template/playlist-detail/index.js +14 -4
  171. package/lib/template/playlist-detail/index.js.map +1 -1
  172. package/lib/template/playlist-detail/style.css +0 -1
  173. package/lib/template/skill-detail/index.d.ts +1 -1
  174. package/lib/template/skill-detail/index.d.ts.map +1 -1
  175. package/lib/template/skill-detail/index.js +19 -7
  176. package/lib/template/skill-detail/index.js.map +1 -1
  177. package/lib/variables/colors.d.ts +1 -0
  178. package/lib/variables/colors.d.ts.map +1 -1
  179. package/lib/variables/colors.js +1 -0
  180. package/lib/variables/colors.js.map +1 -1
  181. package/locales/bs/global.json +10 -8
  182. package/locales/cs/global.json +10 -8
  183. package/locales/de/global.json +10 -8
  184. package/locales/en/global.json +3 -1
  185. package/locales/es/global.json +10 -8
  186. package/locales/et/global.json +10 -8
  187. package/locales/fi/global.json +10 -8
  188. package/locales/fr/global.json +10 -8
  189. package/locales/hr/global.json +10 -8
  190. package/locales/hu/global.json +10 -8
  191. package/locales/hy/global.json +10 -8
  192. package/locales/it/global.json +10 -8
  193. package/locales/ja/global.json +10 -8
  194. package/locales/ko/global.json +10 -8
  195. package/locales/nl/global.json +10 -8
  196. package/locales/pl/global.json +10 -8
  197. package/locales/pt/global.json +10 -8
  198. package/locales/ro/global.json +10 -8
  199. package/locales/ru/global.json +10 -8
  200. package/locales/sk/global.json +10 -8
  201. package/locales/sl/global.json +10 -8
  202. package/locales/sv/global.json +10 -8
  203. package/locales/tl/global.json +8 -6
  204. package/locales/tr/global.json +10 -8
  205. package/locales/uk/global.json +10 -8
  206. package/locales/vi/global.json +10 -8
  207. package/locales/zh/global.json +10 -8
  208. package/locales/zh_TW/global.json +10 -8
  209. package/package.json +2 -2
@@ -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+CC,SAAS,GAAGZ;EAA3D,IAAyES,OAA/E;EAEA,oBACE;IAAK,SAAS,EAAEV,KAAK,CAACc;EAAtB,GACGF,UAAU;EAAA;;EACT;EACA;IAAK,SAAS,EAAEZ,KAAK,CAACe;EAAtB,gBACE,oBAAC,MAAD;IACE,QAAQ,EAAEV,mBAAmB,CAACM,aAAD,CAD/B;IAEE,SAAS,EAAEE,SAFb;IAGE,eAAe,EAAEV,gBAHnB;IAIE,IAAI,EAAE;MAACa,MAAM,EAAE,EAAT;MAAaC,WAAW,EAAE;IAA1B;EA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ACD,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
+ }
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classnames from 'classnames';
5
5
  import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon, NovaCompositionCoorpacademyValidate as ValidateIcon } from '@coorpacademy/nova-icons';
6
- import Link from '../../atom/button-link';
6
+ import ButtonLink from '../../atom/button-link';
7
7
  import style from './style.css';
8
8
  const ICONS = {
9
9
  success: ValidateIcon,
@@ -41,7 +41,7 @@ const Banner = props => {
41
41
  className: classnames(style.icon, temporary && style.temporaryIcon)
42
42
  }), message), firstCTALabel ? /*#__PURE__*/React.createElement("div", {
43
43
  className: classnames(style.button, STYLES[type])
44
- }, /*#__PURE__*/React.createElement(Link, {
44
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
45
45
  "data-name": "first-banner-cta",
46
46
  "aria-label": firstCTALabel,
47
47
  label: firstCTALabel,
@@ -51,7 +51,7 @@ const Banner = props => {
51
51
  className: classnames(style.buttonsBar, STYLES[type])
52
52
  }) : null, secondCTALabel ? /*#__PURE__*/React.createElement("div", {
53
53
  className: classnames(style.button, STYLES[type])
54
- }, /*#__PURE__*/React.createElement(Link, {
54
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
55
55
  "data-name": "second-banner-cta",
56
56
  onClick: secondCTA,
57
57
  "aria-label": secondCTALabel,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classnames","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","QuestionIcon","NovaCompositionCoorpacademyValidate","ValidateIcon","Link","style","ICONS","success","error","warning","STYLES","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","temporary","bannerKey","onEnd","Icon","banner","temporaryBanner","icon","temporaryIcon","button","buttonsBar","propTypes","string","oneOf","isRequired","func","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/button-link';\nimport style from './style.css';\n\nconst ICONS = {\n success: ValidateIcon,\n error: QuestionIcon,\n warning: QuestionIcon\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning\n};\n\nconst Banner = props => {\n const {\n type,\n message,\n firstCTA,\n firstCTALabel,\n secondCTALabel,\n secondCTA,\n temporary,\n bannerKey,\n onEnd\n } = props;\n const Icon = ICONS[type];\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon className={classnames(style.icon, temporary && style.temporaryIcon)} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <Link\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? (\n <div className={classnames(style.buttonsBar, STYLES[type])} />\n ) : null}\n {secondCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <Link\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(ICONS)),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func,\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAEJ,YADG;EAEZK,KAAK,EAAEP,YAFK;EAGZQ,OAAO,EAAER;AAHG,CAAd;AAMA,MAAMS,MAAM,GAAG;EACbH,OAAO,EAAEF,KAAK,CAACE,OADF;EAEbC,KAAK,EAAEH,KAAK,CAACG,KAFA;EAGbC,OAAO,EAAEJ,KAAK,CAACI;AAHF,CAAf;;AAMA,MAAME,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,IADI;IAEJC,OAFI;IAGJC,QAHI;IAIJC,aAJI;IAKJC,cALI;IAMJC,SANI;IAOJC,SAPI;IAQJC,SARI;IASJC;EATI,IAUFT,KAVJ;EAWA,MAAMU,IAAI,GAAGhB,KAAK,CAACO,IAAD,CAAlB;EACA,oBACE;IACE,GAAG,EAAEO,SADP;IAEE,SAAS,EAAErB,UAAU,CAACM,KAAK,CAACkB,MAAP,EAAeb,MAAM,CAACG,IAAD,CAArB,EAA6BM,SAAS,IAAId,KAAK,CAACmB,eAAhD,CAFvB;IAGE,cAAc,EAAEH,KAHlB;IAIE,KAAK,EAAEP;EAJT,gBAME;IAAK,aAAY,GAAED,IAAK,iBAAxB;IAA0C,SAAS,EAAER,KAAK,CAACS;EAA3D,gBACE,oBAAC,IAAD;IAAM,SAAS,EAAEf,UAAU,CAACM,KAAK,CAACoB,IAAP,EAAaN,SAAS,IAAId,KAAK,CA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version":3,"file":"index.js","names":["React","PropTypes","classnames","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","QuestionIcon","NovaCompositionCoorpacademyValidate","ValidateIcon","ButtonLink","style","ICONS","success","error","warning","STYLES","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","temporary","bannerKey","onEnd","Icon","banner","temporaryBanner","icon","temporaryIcon","button","buttonsBar","propTypes","string","oneOf","isRequired","func","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ICONS = {\n success: ValidateIcon,\n error: QuestionIcon,\n warning: QuestionIcon\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning\n};\n\nconst Banner = props => {\n const {\n type,\n message,\n firstCTA,\n firstCTALabel,\n secondCTALabel,\n secondCTA,\n temporary,\n bannerKey,\n onEnd\n } = props;\n const Icon = ICONS[type];\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon className={classnames(style.icon, temporary && style.temporaryIcon)} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? (\n <div className={classnames(style.buttonsBar, STYLES[type])} />\n ) : null}\n {secondCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(ICONS)),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func,\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAEJ,YADG;EAEZK,KAAK,EAAEP,YAFK;EAGZQ,OAAO,EAAER;AAHG,CAAd;AAMA,MAAMS,MAAM,GAAG;EACbH,OAAO,EAAEF,KAAK,CAACE,OADF;EAEbC,KAAK,EAAEH,KAAK,CAACG,KAFA;EAGbC,OAAO,EAAEJ,KAAK,CAACI;AAHF,CAAf;;AAMA,MAAME,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,IADI;IAEJC,OAFI;IAGJC,QAHI;IAIJC,aAJI;IAKJC,cALI;IAMJC,SANI;IAOJC,SAPI;IAQJC,SARI;IASJC;EATI,IAUFT,KAVJ;EAWA,MAAMU,IAAI,GAAGhB,KAAK,CAACO,IAAD,CAAlB;EACA,oBACE;IACE,GAAG,EAAEO,SADP;IAEE,SAAS,EAAErB,UAAU,CAACM,KAAK,CAACkB,MAAP,EAAeb,MAAM,CAACG,IAAD,CAArB,EAA6BM,SAAS,IAAId,KAAK,CAACmB,eAAhD,CAFvB;IAGE,cAAc,EAAEH,KAHlB;IA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Bb,cAAc,EAAEnB,SAAS,CAACgC,MANT;EAOjBZ,SAAS,EAAEpB,SAAS,CAACmC,IAPJ;EAQjBd,SAAS,EAAErB,SAAS,CAACoC,IARJ;EASjBb,KAAK,EAAEvB,SAAS,CAACmC;AATA,CAAnB;AAYA,eAAetB,MAAf"}
@@ -15,6 +15,10 @@ declare namespace CertificationCard {
15
15
  const progress: PropTypes.Requireable<number>;
16
16
  const imgUrl: PropTypes.Requireable<string>;
17
17
  const onClick: PropTypes.Requireable<(...args: any[]) => any>;
18
+ const tag: PropTypes.Requireable<string>;
19
+ const locales: PropTypes.Requireable<PropTypes.InferProps<{
20
+ conditionDescriptionProgress: PropTypes.Requireable<string>;
21
+ }>>;
18
22
  }
19
23
  }
20
24
  import PropTypes from "prop-types";
@@ -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,0EA4DC"}
@@ -9,17 +9,17 @@ import style from './style.css';
9
9
  const CertificationCard = (props, context) => {
10
10
  const {
11
11
  label,
12
- goal,
12
+ locales: {
13
+ conditionDescriptionProgress
14
+ },
15
+ tag,
16
+ goal: {
17
+ title
18
+ },
13
19
  progress,
14
20
  imgUrl,
15
21
  onClick
16
22
  } = props;
17
- const {
18
- title,
19
- condition: {
20
- nbDone
21
- }
22
- } = goal;
23
23
  const {
24
24
  translate
25
25
  } = context;
@@ -53,22 +53,24 @@ 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
63
65
  }, /*#__PURE__*/React.createElement(Tag, {
64
- label: translate('certification'),
66
+ label: tag,
65
67
  size: "S"
66
68
  }), /*#__PURE__*/React.createElement("div", {
67
69
  className: style.title,
68
70
  "data-name": "certification-title"
69
71
  }, title), /*#__PURE__*/React.createElement("div", {
70
72
  className: style.moduleCount
71
- }, /*#__PURE__*/React.createElement("span", null, nbDone), ` ${translate('certification_module')}`)), /*#__PURE__*/React.createElement(ProgressBar, {
73
+ }, conditionDescriptionProgress)), /*#__PURE__*/React.createElement(ProgressBar, {
72
74
  className: style.customProgressBar,
73
75
  style: {
74
76
  backgroundColor: COLORS.positive
@@ -92,7 +94,11 @@ CertificationCard.propTypes = process.env.NODE_ENV !== "production" ? {
92
94
  }),
93
95
  progress: PropTypes.number,
94
96
  imgUrl: PropTypes.string,
95
- onClick: PropTypes.func
97
+ onClick: PropTypes.func,
98
+ tag: PropTypes.string,
99
+ locales: PropTypes.shape({
100
+ conditionDescriptionProgress: PropTypes.string
101
+ })
96
102
  } : {};
97
103
  export default CertificationCard;
98
104
  //# sourceMappingURL=index.js.map
@@ -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,gB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AAEb,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","locales","conditionDescriptionProgress","tag","goal","title","progress","imgUrl","onClick","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","condition","nbDone","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 {\n label,\n locales: {conditionDescriptionProgress},\n tag,\n goal: {title},\n progress,\n imgUrl,\n onClick\n } = props;\n const {translate} = context;\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n\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\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={tag} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>{conditionDescriptionProgress}</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 tag: PropTypes.string,\n locales: PropTypes.shape({\n conditionDescriptionProgress: PropTypes.string\n })\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;IACJC,KADI;IAEJC,OAAO,EAAE;MAACC;IAAD,CAFL;IAGJC,GAHI;IAIJC,IAAI,EAAE;MAACC;IAAD,CAJF;IAKJC,QALI;IAMJC,MANI;IAOJC;EAPI,IAQFV,KARJ;EASA,MAAM;IAACW;EAAD,IAAcV,OAApB;EACA,MAAMW,YAAY,GAAGJ,QAAQ,GAAG,GAAhC;EACA,MAAMK,aAAa,GAAGD,YAAY,GAAGD,SAAS,CAAC,aAAD,CAAZ,GAA8BA,SAAS,CAAC,WAAD,CAAzE;EACA,MAAMG,eAAe,GAAGF,YAAY,GAAG,UAAH,GAAgB,SAApD;EAEA,MAAMG,iBAAiB,GAAG;IACxBC,QAAQ,EAAE,MADc;IAExBC,QAAQ,EAAEL,YAAY,GAAG,OAAH,GAA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E1B,QAJT;IAKE,GAAG,EAAE;EALP,EARF,CAdF,CADF;AAiCD,CA5DD;;AA8DAT,iBAAiB,CAACoC,YAAlB,GAAiC;EAC/BxB,SAAS,EAAEhB,QAAQ,CAACyC,iBAAT,CAA2BzB;AADP,CAAjC;AAIAZ,iBAAiB,CAACsC,SAAlB,2CAA8B;EAC5BnC,KAAK,EAAET,SAAS,CAAC6C,MADW;EAE5BhC,IAAI,EAAEb,SAAS,CAAC8C,KAAV,CAAgB;IACpBhC,KAAK,EAAEd,SAAS,CAAC6C,MADG;IAEpBE,SAAS,EAAE/C,SAAS,CAAC8C,KAAV,CAAgB;MACzBE,MAAM,EAAEhD,SAAS,CAACiD;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BlC,QAAQ,EAAEf,SAAS,CAACiD,MARQ;EAS5BjC,MAAM,EAAEhB,SAAS,CAAC6C,MATU;EAU5B5B,OAAO,EAAEjB,SAAS,CAACkD,IAVS;EAW5BtC,GAAG,EAAEZ,SAAS,CAAC6C,MAXa;EAY5BnC,OAAO,EAAEV,SAAS,CAAC8C,KAAV,CAAgB;IACvBnC,4BAA4B,EAAEX,SAAS,CAAC6C;EADjB,CAAhB;AAZmB,CAA9B;AAiBA,eAAevC,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 {
@@ -136,6 +136,7 @@ declare const propTypes: {
136
136
  items: PropTypes.Requireable<(PropTypes.InferProps<{
137
137
  title: PropTypes.Validator<string>;
138
138
  subtitle: PropTypes.Requireable<string>;
139
+ provider: PropTypes.Requireable<string>;
139
140
  selected: PropTypes.Requireable<boolean>;
140
141
  selectedColor: PropTypes.Requireable<string>;
141
142
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -188,6 +189,17 @@ declare const propTypes: {
188
189
  'aria-label': PropTypes.Requireable<string>;
189
190
  contentType: PropTypes.Requireable<string>;
190
191
  id: PropTypes.Requireable<string>;
192
+ leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
193
+ iconName: PropTypes.Requireable<string>;
194
+ iconColor: PropTypes.Requireable<string>;
195
+ backgroundColor: PropTypes.Requireable<string>;
196
+ borderRadius: PropTypes.Requireable<string>;
197
+ preset: PropTypes.Requireable<string>;
198
+ gradientBackground: PropTypes.Requireable<boolean>;
199
+ size: PropTypes.Requireable<number>;
200
+ wrapperSize: PropTypes.Requireable<number>;
201
+ }>>;
202
+ editAsIcon: PropTypes.Requireable<boolean>;
191
203
  }> | null | undefined)[]>;
192
204
  type: PropTypes.Requireable<string>;
193
205
  itemType: PropTypes.Requireable<string>;
@@ -285,11 +297,11 @@ declare const propTypes: {
285
297
  'aria-label': PropTypes.Requireable<string>;
286
298
  title: PropTypes.Requireable<string>;
287
299
  target: PropTypes.Requireable<string>;
288
- skinHover: PropTypes.Requireable<boolean>;
289
300
  hoverColor: PropTypes.Requireable<string>;
301
+ hoverBackgroundColor: PropTypes.Requireable<string>;
290
302
  download: PropTypes.Requireable<boolean>;
291
303
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
292
- onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
304
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
293
305
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
294
306
  useButtonTag: PropTypes.Requireable<boolean>;
295
307
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW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,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -62,6 +62,7 @@ declare namespace DraggableList {
62
62
  }> | PropTypes.InferProps<{
63
63
  title: PropTypes.Validator<string>;
64
64
  subtitle: PropTypes.Requireable<string>;
65
+ provider: PropTypes.Requireable<string>;
65
66
  selected: PropTypes.Requireable<boolean>;
66
67
  selectedColor: PropTypes.Requireable<string>;
67
68
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -114,6 +115,17 @@ declare namespace DraggableList {
114
115
  'aria-label': PropTypes.Requireable<string>;
115
116
  contentType: PropTypes.Requireable<string>;
116
117
  id: PropTypes.Requireable<string>;
118
+ leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
119
+ iconName: PropTypes.Requireable<string>;
120
+ iconColor: PropTypes.Requireable<string>;
121
+ backgroundColor: PropTypes.Requireable<string>;
122
+ borderRadius: PropTypes.Requireable<string>;
123
+ preset: PropTypes.Requireable<string>;
124
+ gradientBackground: PropTypes.Requireable<boolean>;
125
+ size: PropTypes.Requireable<number>;
126
+ wrapperSize: PropTypes.Requireable<number>;
127
+ }>>;
128
+ editAsIcon: PropTypes.Requireable<boolean>;
117
129
  }> | PropTypes.InferProps<{
118
130
  'aria-label': PropTypes.Requireable<string>;
119
131
  id: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAqGA;;;;;;;8BA8DC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA+GA;;;;;;;8BA8DC"}
@@ -1,3 +1,4 @@
1
+ import _get from "lodash/fp/get";
1
2
  import _map from "lodash/fp/map";
2
3
  import _isEmpty from "lodash/fp/isEmpty";
3
4
 
@@ -5,13 +6,14 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
5
6
 
6
7
  import React from 'react';
7
8
  import PropTypes from 'prop-types';
9
+ import { convert } from 'css-color-function';
8
10
  import Title from '../../atom/title';
9
11
  import ProgressBar from '../progress-bar';
10
12
  import { COLORS } from '../../variables/colors';
11
13
  import Tag from '../../atom/tag';
12
14
  import ButtonLink from '../../atom/button-link';
13
15
  import Icon from '../../atom/icon';
14
- import Provider from '../../atom/provider'; // eslint-disable-next-line css-modules/no-unused-class
16
+ import Provider, { GetSkinFromContext } from '../../atom/provider'; // eslint-disable-next-line css-modules/no-unused-class
15
17
 
16
18
  import style from './style.css';
17
19
 
@@ -29,25 +31,32 @@ const DetailSection = ({
29
31
  const {
30
32
  translate
31
33
  } = context;
34
+ const skin = GetSkinFromContext(context);
35
+
36
+ const primarySkinColor = _get('common.primary', skin);
37
+
32
38
  const isTypeStars = type === 'stars';
33
- const DownloadButton = /*#__PURE__*/React.createElement(ButtonLink, {
39
+ const downloadButtonProps = {
34
40
  label: translate('download'),
35
41
  link: {
36
42
  target: '_blank',
37
43
  href: downloadUrl
38
44
  },
39
- "data-name": `download-${type}-button`,
40
- "aria-label": `download ${type} button`,
45
+ 'data-name': `download-${type}-button`,
46
+ 'aria-label': `download ${type} button`,
41
47
  customStyle: {
42
- backgroundColor: '#F1F6FE',
43
- color: '#0061FF',
44
- width: 'auto'
48
+ backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),
49
+ color: primarySkinColor,
50
+ width: 'auto',
51
+ transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
45
52
  },
53
+ hoverBackgroundColor: primarySkinColor,
54
+ hoverColor: '#FFFFFF',
46
55
  icon: {
47
56
  position: 'left',
48
57
  faIcon: {
49
58
  name: 'download',
50
- color: '#0061FF',
59
+ color: primarySkinColor,
51
60
  size: 14,
52
61
  customStyle: {
53
62
  padding: 0
@@ -55,9 +64,9 @@ const DetailSection = ({
55
64
  }
56
65
  },
57
66
  disabled: isLocked
58
- });
67
+ };
59
68
  const LockedTag = /*#__PURE__*/React.createElement(Tag, {
60
- label: "Locked",
69
+ label: translate('locked'),
61
70
  size: "S",
62
71
  icon: {
63
72
  position: 'left',
@@ -101,7 +110,7 @@ const DetailSection = ({
101
110
  className: style.detailsTitle
102
111
  }, type === 'diploma' ? translate('diploma') : translate('badge')), isLocked ? LockedTag : null), /*#__PURE__*/React.createElement("div", {
103
112
  className: style.buttonContainer
104
- }, DownloadButton)));
113
+ }, /*#__PURE__*/React.createElement(ButtonLink, downloadButtonProps))));
105
114
  };
106
115
 
107
116
  const ProgressWrapper = ({
@@ -167,7 +176,8 @@ const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
167
176
  stars: PropTypes.number
168
177
  } : {};
169
178
  DetailSection.contextTypes = {
170
- translate: Provider.childContextTypes.translate
179
+ translate: Provider.childContextTypes.translate,
180
+ skin: Provider.childContextTypes.skin
171
181
  };
172
182
  DetailSection.propTypes = process.env.NODE_ENV !== "production" ? _extends({
173
183
  index: PropTypes.number,