@coorpacademy/components 11.35.1 → 11.35.2-alpha.10

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 (249) hide show
  1. package/es/atom/button-link/index.js +1 -1
  2. package/es/atom/button-link/index.js.map +1 -1
  3. package/es/atom/button-link/style.css +2 -2
  4. package/es/atom/button-menu/utils.d.ts +1 -1
  5. package/es/atom/icon/index.d.ts +35 -17
  6. package/es/atom/icon/index.d.ts.map +1 -1
  7. package/es/atom/icon/index.js +32 -15
  8. package/es/atom/icon/index.js.map +1 -1
  9. package/es/atom/radio-with-title/index.d.ts +13 -3
  10. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  11. package/es/atom/radio-with-title/types.d.ts +13 -2
  12. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  13. package/es/atom/status-item/index.native.js +1 -1
  14. package/es/atom/status-item/index.native.js.map +1 -1
  15. package/es/atom/tag/index.d.ts +12 -1
  16. package/es/atom/tag/style.css +1 -0
  17. package/es/atom/title/index.d.ts +13 -2
  18. package/es/molecule/banner/style.css +1 -0
  19. package/es/molecule/base-modal/style.css +0 -1
  20. package/es/molecule/bulk-progress-bar/index.js +2 -2
  21. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  22. package/es/molecule/certification-card/index.js +1 -1
  23. package/es/molecule/certification-card/index.js.map +1 -1
  24. package/es/molecule/cm-popin/types.d.ts +28 -7
  25. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  26. package/es/molecule/cm-popin/types.js +1 -1
  27. package/es/molecule/cm-popin/types.js.map +1 -1
  28. package/es/molecule/learner-skill-card/index.d.ts +25 -40
  29. package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
  30. package/es/molecule/learner-skill-card/index.js +90 -96
  31. package/es/molecule/learner-skill-card/index.js.map +1 -1
  32. package/es/molecule/learner-skill-card/prop-types.d.ts +37 -0
  33. package/es/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
  34. package/es/molecule/learner-skill-card/prop-types.js +20 -0
  35. package/es/molecule/learner-skill-card/prop-types.js.map +1 -0
  36. package/es/molecule/learner-skill-card/style.css +62 -41
  37. package/es/molecule/learning-priority-modal/style.css +3 -2
  38. package/es/molecule/progress-wrapper/index.js +1 -1
  39. package/es/molecule/progress-wrapper/index.js.map +1 -1
  40. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  41. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  42. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
  43. package/es/molecule/title-radio-wrapper/index.d.ts +13 -3
  44. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  45. package/es/molecule/title-radio-wrapper/types.d.ts +13 -2
  46. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  47. package/es/organism/cards-grid/index.d.ts +48 -10
  48. package/es/organism/cards-grid/index.d.ts.map +1 -1
  49. package/es/organism/cards-grid/index.js +3 -2
  50. package/es/organism/cards-grid/index.js.map +1 -1
  51. package/es/organism/content-skill-modal/index.d.ts +13 -3
  52. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  53. package/es/organism/content-skill-modal/types.d.ts +12 -2
  54. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  55. package/es/organism/list-item/index.js +5 -5
  56. package/es/organism/list-item/index.js.map +1 -1
  57. package/es/organism/list-item/style.css +23 -17
  58. package/es/organism/list-items/index.d.ts +13 -2
  59. package/es/organism/mooc-header/index.d.ts.map +1 -1
  60. package/es/organism/mooc-header/index.js +23 -28
  61. package/es/organism/mooc-header/index.js.map +1 -1
  62. package/es/organism/mooc-header/style.css +56 -37
  63. package/es/organism/rewards-form/index.d.ts +13 -2
  64. package/es/organism/select-opponents/index.d.ts +13 -3
  65. package/es/organism/select-opponents/index.d.ts.map +1 -1
  66. package/es/organism/select-opponents/types.d.ts +13 -2
  67. package/es/organism/select-opponents/types.d.ts.map +1 -1
  68. package/es/organism/sidebar/index.d.ts +2 -2
  69. package/es/organism/skill-edition/index.d.ts +37 -7
  70. package/es/organism/skill-edition/index.d.ts.map +1 -1
  71. package/es/organism/skill-edition/types.d.ts +37 -6
  72. package/es/organism/skill-edition/types.d.ts.map +1 -1
  73. package/es/organism/title-and-input/index.d.ts +25 -5
  74. package/es/organism/title-and-input/index.d.ts.map +1 -1
  75. package/es/organism/title-and-input/types.d.ts +24 -4
  76. package/es/organism/title-and-input/types.d.ts.map +1 -1
  77. package/es/organism/wizard-contents/index.d.ts +13 -2
  78. package/es/template/app-player/loading/index.d.ts +27 -6
  79. package/es/template/app-player/player/index.d.ts +53 -12
  80. package/es/template/app-player/player/slides/index.d.ts +27 -6
  81. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  82. package/es/template/app-player/popin-correction/index.d.ts +26 -6
  83. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  84. package/es/template/app-player/popin-end/index.d.ts +27 -6
  85. package/es/template/app-review/index.d.ts +27 -7
  86. package/es/template/app-review/index.d.ts.map +1 -1
  87. package/es/template/app-review/player/prop-types.d.ts +27 -6
  88. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  89. package/es/template/app-review/prop-types.d.ts +27 -6
  90. package/es/template/app-review/prop-types.d.ts.map +1 -1
  91. package/es/template/back-office/brand-update/index.d.ts +87 -16
  92. package/es/template/back-office/brand-update/utils.d.ts +2 -2
  93. package/es/template/common/dashboard/index.d.ts +53 -12
  94. package/es/template/common/search-page/index.d.ts +27 -6
  95. package/es/template/external-course/index.d.ts +27 -6
  96. package/es/template/my-learning/index.d.ts +0 -1
  97. package/es/template/my-learning/index.d.ts.map +1 -1
  98. package/es/template/my-learning/index.js +26 -22
  99. package/es/template/my-learning/index.js.map +1 -1
  100. package/es/template/my-learning/style.css +9 -6
  101. package/es/template/skill-detail/all-courses.css +2 -2
  102. package/es/template/skill-detail/all-courses.d.ts +52 -17
  103. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  104. package/es/template/skill-detail/all-courses.js +12 -11
  105. package/es/template/skill-detail/all-courses.js.map +1 -1
  106. package/es/template/skill-detail/continue-learning.css +7 -2
  107. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  108. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  109. package/es/template/skill-detail/continue-learning.js.map +1 -1
  110. package/es/template/skill-detail/index.d.ts +81 -71
  111. package/es/template/skill-detail/index.d.ts.map +1 -1
  112. package/es/template/skill-detail/index.js +91 -58
  113. package/es/template/skill-detail/index.js.map +1 -1
  114. package/es/template/skill-detail/style.css +97 -39
  115. package/es/variables/colors.css +12 -0
  116. package/es/variables/colors.d.ts +15 -3
  117. package/es/variables/colors.d.ts.map +1 -1
  118. package/es/variables/colors.js +16 -4
  119. package/es/variables/colors.js.map +1 -1
  120. package/es/variables/theme.native.js +1 -1
  121. package/es/variables/theme.native.js.map +1 -1
  122. package/lib/atom/button-link/index.js +1 -1
  123. package/lib/atom/button-link/index.js.map +1 -1
  124. package/lib/atom/button-link/style.css +2 -2
  125. package/lib/atom/button-menu/utils.d.ts +1 -1
  126. package/lib/atom/icon/index.d.ts +35 -17
  127. package/lib/atom/icon/index.d.ts.map +1 -1
  128. package/lib/atom/icon/index.js +34 -18
  129. package/lib/atom/icon/index.js.map +1 -1
  130. package/lib/atom/radio-with-title/index.d.ts +13 -3
  131. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  132. package/lib/atom/radio-with-title/types.d.ts +13 -2
  133. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  134. package/lib/atom/status-item/index.native.js +1 -1
  135. package/lib/atom/status-item/index.native.js.map +1 -1
  136. package/lib/atom/tag/index.d.ts +12 -1
  137. package/lib/atom/tag/style.css +1 -0
  138. package/lib/atom/title/index.d.ts +13 -2
  139. package/lib/molecule/banner/style.css +1 -0
  140. package/lib/molecule/base-modal/style.css +0 -1
  141. package/lib/molecule/bulk-progress-bar/index.js +2 -2
  142. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  143. package/lib/molecule/certification-card/index.js +1 -1
  144. package/lib/molecule/certification-card/index.js.map +1 -1
  145. package/lib/molecule/cm-popin/types.d.ts +28 -7
  146. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  147. package/lib/molecule/cm-popin/types.js +1 -1
  148. package/lib/molecule/cm-popin/types.js.map +1 -1
  149. package/lib/molecule/learner-skill-card/index.d.ts +25 -40
  150. package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
  151. package/lib/molecule/learner-skill-card/index.js +93 -96
  152. package/lib/molecule/learner-skill-card/index.js.map +1 -1
  153. package/lib/molecule/learner-skill-card/prop-types.d.ts +37 -0
  154. package/lib/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
  155. package/lib/molecule/learner-skill-card/prop-types.js +25 -0
  156. package/lib/molecule/learner-skill-card/prop-types.js.map +1 -0
  157. package/lib/molecule/learner-skill-card/style.css +62 -41
  158. package/lib/molecule/learning-priority-modal/style.css +3 -2
  159. package/lib/molecule/progress-wrapper/index.js +1 -1
  160. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  161. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  162. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  163. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
  164. package/lib/molecule/title-radio-wrapper/index.d.ts +13 -3
  165. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  166. package/lib/molecule/title-radio-wrapper/types.d.ts +13 -2
  167. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  168. package/lib/organism/cards-grid/index.d.ts +48 -10
  169. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  170. package/lib/organism/cards-grid/index.js +3 -2
  171. package/lib/organism/cards-grid/index.js.map +1 -1
  172. package/lib/organism/content-skill-modal/index.d.ts +13 -3
  173. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  174. package/lib/organism/content-skill-modal/types.d.ts +12 -2
  175. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  176. package/lib/organism/list-item/index.js +5 -5
  177. package/lib/organism/list-item/index.js.map +1 -1
  178. package/lib/organism/list-item/style.css +23 -17
  179. package/lib/organism/list-items/index.d.ts +13 -2
  180. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  181. package/lib/organism/mooc-header/index.js +22 -27
  182. package/lib/organism/mooc-header/index.js.map +1 -1
  183. package/lib/organism/mooc-header/style.css +56 -37
  184. package/lib/organism/rewards-form/index.d.ts +13 -2
  185. package/lib/organism/select-opponents/index.d.ts +13 -3
  186. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  187. package/lib/organism/select-opponents/types.d.ts +13 -2
  188. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  189. package/lib/organism/sidebar/index.d.ts +2 -2
  190. package/lib/organism/skill-edition/index.d.ts +37 -7
  191. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  192. package/lib/organism/skill-edition/types.d.ts +37 -6
  193. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  194. package/lib/organism/title-and-input/index.d.ts +25 -5
  195. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  196. package/lib/organism/title-and-input/types.d.ts +24 -4
  197. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  198. package/lib/organism/wizard-contents/index.d.ts +13 -2
  199. package/lib/template/app-player/loading/index.d.ts +27 -6
  200. package/lib/template/app-player/player/index.d.ts +53 -12
  201. package/lib/template/app-player/player/slides/index.d.ts +27 -6
  202. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  203. package/lib/template/app-player/popin-correction/index.d.ts +26 -6
  204. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  205. package/lib/template/app-player/popin-end/index.d.ts +27 -6
  206. package/lib/template/app-review/index.d.ts +27 -7
  207. package/lib/template/app-review/index.d.ts.map +1 -1
  208. package/lib/template/app-review/player/prop-types.d.ts +27 -6
  209. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  210. package/lib/template/app-review/prop-types.d.ts +27 -6
  211. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  212. package/lib/template/back-office/brand-update/index.d.ts +87 -16
  213. package/lib/template/back-office/brand-update/utils.d.ts +2 -2
  214. package/lib/template/common/dashboard/index.d.ts +53 -12
  215. package/lib/template/common/search-page/index.d.ts +27 -6
  216. package/lib/template/external-course/index.d.ts +27 -6
  217. package/lib/template/my-learning/index.d.ts +0 -1
  218. package/lib/template/my-learning/index.d.ts.map +1 -1
  219. package/lib/template/my-learning/index.js +26 -22
  220. package/lib/template/my-learning/index.js.map +1 -1
  221. package/lib/template/my-learning/style.css +9 -6
  222. package/lib/template/skill-detail/all-courses.css +2 -2
  223. package/lib/template/skill-detail/all-courses.d.ts +52 -17
  224. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  225. package/lib/template/skill-detail/all-courses.js +11 -11
  226. package/lib/template/skill-detail/all-courses.js.map +1 -1
  227. package/lib/template/skill-detail/continue-learning.css +7 -2
  228. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  229. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  230. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  231. package/lib/template/skill-detail/index.d.ts +81 -71
  232. package/lib/template/skill-detail/index.d.ts.map +1 -1
  233. package/lib/template/skill-detail/index.js +91 -58
  234. package/lib/template/skill-detail/index.js.map +1 -1
  235. package/lib/template/skill-detail/style.css +97 -39
  236. package/lib/variables/colors.css +12 -0
  237. package/lib/variables/colors.d.ts +15 -3
  238. package/lib/variables/colors.d.ts.map +1 -1
  239. package/lib/variables/colors.js +16 -4
  240. package/lib/variables/colors.js.map +1 -1
  241. package/lib/variables/theme.native.js +1 -1
  242. package/lib/variables/theme.native.js.map +1 -1
  243. package/locales/cs/global.json +1 -0
  244. package/locales/en/global.json +1 -0
  245. package/locales/hr/global.json +1 -0
  246. package/locales/it/global.json +1 -0
  247. package/locales/ko/global.json +1 -0
  248. package/locales/ru/global.json +1 -0
  249. package/package.json +2 -2
@@ -2,17 +2,19 @@ import _isNil from "lodash/fp/isNil";
2
2
  import _get from "lodash/fp/get";
3
3
  import React, { useCallback, useState, useRef, useEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import { convert } from 'css-color-function';
6
5
  import classnames from 'classnames';
7
6
  import Markdown from 'markdown-to-jsx';
7
+ import { convert } from 'css-color-function';
8
8
  import Provider from '../../atom/provider';
9
- import Select, { SelectOptionPropTypes } from '../../atom/select';
10
- import ButtonLink from '../../atom/button-link';
11
9
  import ButtonLinkIcon from '../../atom/button-link-icon';
12
10
  import Icon from '../../atom/icon';
11
+ import IconPreview from '../../molecule/icon-preview';
12
+ import ButtonLink from '../../atom/button-link';
13
13
  import CardsGrid from '../../organism/cards-grid';
14
- import style from './style.css';
14
+ import { COLORS } from '../../variables/colors';
15
+ import { SelectOptionPropTypes } from '../../atom/select';
15
16
  import AllCourses from './all-courses';
17
+ import style from './style.css';
16
18
  export const ContinueLearningButton = (props, context) => {
17
19
  const {
18
20
  ongoingCoursesAvailable,
@@ -23,7 +25,7 @@ export const ContinueLearningButton = (props, context) => {
23
25
  translate
24
26
  } = context;
25
27
  const primarySkinColor = _get('common.primary', skin);
26
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonLink, {
28
+ return /*#__PURE__*/React.createElement(ButtonLink, {
27
29
  label: ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning'),
28
30
  type: "primary",
29
31
  customStyle: {
@@ -32,17 +34,17 @@ export const ContinueLearningButton = (props, context) => {
32
34
  backgroundColor: primarySkinColor
33
35
  },
34
36
  hoverBackgroundColor: convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`),
35
- hoverColor: "#FFFFFF",
37
+ hoverColor: COLORS.white,
36
38
  icon: {
37
39
  position: 'left',
38
40
  faIcon: {
39
41
  name: 'play',
40
- color: '#FFFFFF',
41
- size: 16
42
+ color: COLORS.white,
43
+ size: 14
42
44
  }
43
45
  },
44
46
  onClick: onClick
45
- }));
47
+ });
46
48
  };
47
49
  ContinueLearningButton.contextTypes = {
48
50
  skin: Provider.childContextTypes.skin,
@@ -63,29 +65,27 @@ const SkillDetail = (props, context) => {
63
65
  ongoingCoursesAvailable,
64
66
  skillIncludedCourses,
65
67
  filters,
66
- sorting,
67
68
  onBackClick,
68
69
  onReviewClick,
69
70
  onContinueLearningClick,
70
71
  search,
71
- bannerMicrolearning = {}
72
+ bannerMicrolearning
72
73
  } = props;
73
- const descriptionRef = useRef(null);
74
74
  const {
75
75
  score = 0,
76
- questionsToReview,
77
- totalContents
76
+ questionsToReview = 0,
77
+ totalContents = 0
78
78
  } = metrics;
79
79
  const {
80
80
  translate
81
81
  } = context;
82
- const {
83
- action: bannerMicrolearningAction,
84
- oldSwitchValue
85
- } = bannerMicrolearning;
82
+ const bannerMicrolearningAction = bannerMicrolearning?.action;
83
+ const descriptionRef = useRef(null);
86
84
  const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);
87
85
  const [showMore, setShowMore] = useState(false);
88
- const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
86
+ const handleShowMore = useCallback(() => {
87
+ setShowMore(!showMore);
88
+ }, [showMore]);
89
89
  useEffect(() => {
90
90
  if (descriptionRef.current) {
91
91
  const {
@@ -99,29 +99,39 @@ const SkillDetail = (props, context) => {
99
99
  return /*#__PURE__*/React.createElement("div", {
100
100
  ref: descriptionRef,
101
101
  className: classnames(style.description, !showMore && style.truncate)
102
- }, /*#__PURE__*/React.createElement(Markdown, null, description));
102
+ }, description ? /*#__PURE__*/React.createElement(Markdown, null, description) : null);
103
103
  }, [showMore, description]);
104
104
  const ProgressBar = useCallback(() => {
105
- if (score === undefined) return null;
106
- const progressBarColor = '#3EC483';
107
- const inlineProgressValueStyle = {
105
+ if (typeof score !== 'number') return null;
106
+ const progressBarColor = COLORS.cm_positive_500;
107
+ const inlineProgressStyle = {
108
108
  backgroundColor: progressBarColor,
109
109
  width: `${score}%`
110
110
  };
111
111
  return /*#__PURE__*/React.createElement("div", {
112
+ className: style.progressBarRow
113
+ }, /*#__PURE__*/React.createElement("div", {
112
114
  className: style.progressBarWrapper
113
115
  }, /*#__PURE__*/React.createElement("div", {
114
116
  "data-name": "progress",
115
117
  className: style.progress,
116
- style: inlineProgressValueStyle,
117
- role: "progressbar"
118
- }));
118
+ style: inlineProgressStyle,
119
+ role: "progressbar",
120
+ "aria-valuenow": score,
121
+ "aria-valuemin": 0,
122
+ "aria-valuemax": 100
123
+ })), /*#__PURE__*/React.createElement("span", {
124
+ className: style.progressInformationNumber
125
+ }, score.toFixed(1), "%"));
119
126
  }, [score]);
127
+ const hasDescription = Boolean(description && description.trim().length > 0);
120
128
  return /*#__PURE__*/React.createElement("div", {
121
129
  className: style.backgroundContainer
122
130
  }, /*#__PURE__*/React.createElement("div", {
123
131
  className: style.container,
124
132
  "data-name": skillRef
133
+ }, /*#__PURE__*/React.createElement("div", {
134
+ className: style.topSection
125
135
  }, !_isNil(onBackClick) ? /*#__PURE__*/React.createElement(ButtonLinkIcon, {
126
136
  faIcon: "arrow-left",
127
137
  "data-name": "back-button",
@@ -129,67 +139,91 @@ const SkillDetail = (props, context) => {
129
139
  onClick: onBackClick,
130
140
  className: style.backButton,
131
141
  tooltipPlacement: "right"
132
- }) : null, /*#__PURE__*/React.createElement("div", {
133
- className: style.ctaContainer
134
- }, /*#__PURE__*/React.createElement("div", null, focused ? /*#__PURE__*/React.createElement("div", {
142
+ }) : null), /*#__PURE__*/React.createElement("div", {
143
+ className: style.mainSection
144
+ }, /*#__PURE__*/React.createElement("div", {
145
+ className: style.leftSide
146
+ }, /*#__PURE__*/React.createElement(IconPreview, {
147
+ icon: {
148
+ name: 'bullseye-arrow',
149
+ color: COLORS.purple_100
150
+ },
151
+ title: title
152
+ })), /*#__PURE__*/React.createElement("div", {
153
+ className: style.rightSide
154
+ }, focused ? /*#__PURE__*/React.createElement("div", {
135
155
  className: style.skillFocusBadge
136
156
  }, /*#__PURE__*/React.createElement(Icon, {
137
157
  iconName: "bullseye-arrow",
138
- backgroundColor: "#DDD1FF",
158
+ backgroundColor: COLORS.purple_100,
159
+ size: {
160
+ faSize: 10,
161
+ wrapperSize: 16
162
+ }
163
+ }), translate('skill_focus')) : /*#__PURE__*/React.createElement("div", {
164
+ className: style.skillBadge
165
+ }, /*#__PURE__*/React.createElement(Icon, {
166
+ iconName: "shapes",
167
+ backgroundColor: COLORS.gray,
139
168
  size: {
140
169
  faSize: 10,
141
170
  wrapperSize: 16
142
171
  }
143
- }), translate('skill_focus')) : null, /*#__PURE__*/React.createElement("div", {
172
+ }), translate('skill')), /*#__PURE__*/React.createElement("h2", {
144
173
  className: style.title
145
- }, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), isDescriptionTruncated ? /*#__PURE__*/React.createElement("div", {
174
+ }, title), description && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), isDescriptionTruncated ? /*#__PURE__*/React.createElement("div", {
146
175
  className: style.showMoreWrapper,
147
176
  onClick: handleShowMore
148
177
  }, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/React.createElement(Icon, {
149
178
  iconName: showMore ? 'chevron-up' : 'chevron-down',
150
179
  size: {
151
180
  faSize: 14,
152
- wrapperSize: 16
181
+ wrapperSize: 14
182
+ },
183
+ customStyle: {
184
+ padding: '8px'
153
185
  }
154
- })) : null) : null), /*#__PURE__*/React.createElement("div", {
186
+ })) : null), questionsToReview > 0 ? /*#__PURE__*/React.createElement("div", {
187
+ className: style.skillInformation
188
+ }, /*#__PURE__*/React.createElement("span", null, questionsToReview), "\xA0", translate('skill_chart_side_panel_questions_to_review')) : null, /*#__PURE__*/React.createElement("div", {
189
+ className: classnames(style.progressContainer, !hasDescription && style.noDescriptionSpacing)
190
+ }, /*#__PURE__*/React.createElement(ProgressBar, null)), /*#__PURE__*/React.createElement("div", {
155
191
  className: style.ctaWrapper
156
- }, /*#__PURE__*/React.createElement(ButtonLink, {
192
+ }, /*#__PURE__*/React.createElement(ContinueLearningButton, {
193
+ ongoingCoursesAvailable: ongoingCoursesAvailable,
194
+ onClick: onContinueLearningClick
195
+ }), /*#__PURE__*/React.createElement(ButtonLink, {
157
196
  type: "secondary",
158
- onClick: onReviewClick,
159
197
  label: translate('review_this_skill'),
160
198
  disabled: !availableForReview,
199
+ onClick: onReviewClick,
200
+ icon: {
201
+ position: 'left',
202
+ faIcon: {
203
+ name: 'rotate-right',
204
+ color: COLORS.cm_grey_700,
205
+ size: 14
206
+ }
207
+ },
161
208
  customStyle: {
162
- width: 'fit-content',
163
- borderRadius: '12px'
209
+ borderRadius: '12px',
210
+ width: 'fit-content'
164
211
  }
165
- }), /*#__PURE__*/React.createElement(ContinueLearningButton, {
166
- ongoingCoursesAvailable: ongoingCoursesAvailable,
167
- onClick: onContinueLearningClick
168
- }))), questionsToReview > 0 ? /*#__PURE__*/React.createElement("div", {
169
- className: style.skillInformation,
170
- "data-name": "skill-questions"
171
- }, /*#__PURE__*/React.createElement("span", {
172
- className: style.skillInformationNumber
173
- }, questionsToReview), "\xA0", translate('skill_chart_side_panel_questions_to_review')) : null, /*#__PURE__*/React.createElement("div", {
174
- className: style.progressContainer
175
- }, /*#__PURE__*/React.createElement(ProgressBar, null), /*#__PURE__*/React.createElement("span", {
176
- className: style.progressInformationNumber
177
- }, score.toFixed(1), "%")), /*#__PURE__*/React.createElement(AllCourses, {
212
+ })))), /*#__PURE__*/React.createElement(AllCourses, {
178
213
  content: skillIncludedCourses,
179
214
  filters: filters,
180
- sorting: sorting,
181
215
  totalContents: totalContents,
182
- bannerMicrolearning: bannerMicrolearningAction ? {
216
+ bannerMicrolearning: bannerMicrolearning && bannerMicrolearningAction ? {
183
217
  type: 'skill',
184
218
  action: bannerMicrolearningAction,
185
- oldSwitchValue
186
- } : {},
219
+ oldSwitchValue: bannerMicrolearning.oldSwitchValue
220
+ } : undefined,
187
221
  search: search
188
222
  })));
189
223
  };
190
224
  SkillDetail.contextTypes = {
191
- skin: Provider.childContextTypes.skin,
192
- translate: Provider.childContextTypes.translate
225
+ translate: Provider.childContextTypes.translate,
226
+ skin: Provider.childContextTypes.skin
193
227
  };
194
228
  SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
195
229
  title: PropTypes.string.isRequired,
@@ -208,7 +242,6 @@ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
208
242
  onChange: PropTypes.func,
209
243
  options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
210
244
  }),
211
- sorting: PropTypes.shape(Select.propTypes),
212
245
  onBackClick: PropTypes.func,
213
246
  onReviewClick: PropTypes.func,
214
247
  onContinueLearningClick: PropTypes.func,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","useRef","useEffect","PropTypes","convert","classnames","Markdown","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","_get","createElement","label","type","customStyle","width","borderRadius","backgroundColor","hoverBackgroundColor","hoverColor","icon","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","search","bannerMicrolearning","descriptionRef","score","questionsToReview","totalContents","action","bannerMicrolearningAction","oldSwitchValue","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","ref","className","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","role","backgroundContainer","container","_isNil","backButton","tooltipPlacement","ctaContainer","skillFocusBadge","iconName","faSize","wrapperSize","Fragment","showMoreWrapper","ctaWrapper","disabled","skillInformation","skillInformationNumber","progressContainer","progressInformationNumber","toFixed","content","string","isRequired","shape","number","onChange","options","arrayOf","oldValue"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\n\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCoursesAvailable,\n skillIncludedCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n search,\n bannerMicrolearning = {}\n } = props;\n const descriptionRef = useRef(null);\n const {score = 0, questionsToReview, totalContents} = metrics;\n const {translate} = context;\n const {action: bannerMicrolearningAction, oldSwitchValue} = bannerMicrolearning;\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 ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={skillRef}>\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>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {isDescriptionTruncated ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div>\n ) : null}\n </>\n ) : null}\n </div>\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {questionsToReview > 0 ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n <div className={style.progressContainer}>\n <ProgressBar />\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n totalContents={totalContents}\n bannerMicrolearning={\n bannerMicrolearningAction\n ? {\n type: 'skill',\n action: bannerMicrolearningAction,\n oldSwitchValue\n }\n : {}\n }\n search={search}\n />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n skillRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n questionsToReview: PropTypes.number,\n totalContents: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCoursesAvailable: PropTypes.bool,\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n }),\n bannerMicrolearning: PropTypes.shape({\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n })\n};\n\nexport default SkillD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,EAAE9G,SAAS,CAAC4C,IAAI;IACxBmE,OAAO,EAAE/G,SAAS,CAACgH,OAAO,CAAChH,SAAS,CAAC4G,KAAK,CAACtG,qBAAqB,CAAC;EACnE,CAAC,CAAC;EACFgD,OAAO,EAAEtD,SAAS,CAAC4G,KAAK,CAACvG,MAAM,CAACkC,SAAS,CAAC;EAC1CgB,WAAW,EAAEvD,SAAS,CAAC4C,IAAI;EAC3BY,aAAa,EAAExD,SAAS,CAAC4C,IAAI;EAC7Ba,uBAAuB,EAAEzD,SAAS,CAAC4C,IAAI;EACvCc,MAAM,EAAE1D,SAAS,CAAC4G,KAAK,CAAC;IACtBK,QAAQ,EAAEjH,SAAS,CAAC0G,MAAM;IAC1BI,QAAQ,EAAE9G,SAAS,CAAC4C;EACtB,CAAC,CAAC;EACFe,mBAAmB,EAAE3D,SAAS,CAAC4G,KAAK,CAAC;IACnC5C,MAAM,EAAEhE,SAAS,CAAC4C,IAAI;IACtBsB,cAAc,EAAElE,SAAS,CAAC2C;EAC5B,CAAC;AACH,CAAC;AAED,eAAeE,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","useRef","useEffect","PropTypes","classnames","Markdown","convert","Provider","ButtonLinkIcon","Icon","IconPreview","ButtonLink","CardsGrid","COLORS","SelectOptionPropTypes","AllCourses","style","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","_get","createElement","label","type","customStyle","width","borderRadius","backgroundColor","hoverBackgroundColor","hoverColor","white","icon","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","skillIncludedCourses","filters","onBackClick","onReviewClick","onContinueLearningClick","search","bannerMicrolearning","score","questionsToReview","totalContents","bannerMicrolearningAction","action","descriptionRef","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","ref","className","truncate","ProgressBar","progressBarColor","cm_positive_500","inlineProgressStyle","progressBarRow","progressBarWrapper","progress","role","progressInformationNumber","toFixed","hasDescription","Boolean","trim","length","backgroundContainer","container","topSection","_isNil","backButton","tooltipPlacement","mainSection","leftSide","purple_100","rightSide","skillFocusBadge","iconName","faSize","wrapperSize","skillBadge","gray","Fragment","showMoreWrapper","padding","skillInformation","progressContainer","noDescriptionSpacing","ctaWrapper","disabled","cm_grey_700","content","oldSwitchValue","undefined","string","isRequired","shape","number","onChange","options","arrayOf","oldValue"],"sources":["../../../src/template/skill-detail/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport {convert} from 'css-color-function';\nimport Provider from '../../atom/provider';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport IconPreview from '../../molecule/icon-preview';\nimport ButtonLink from '../../atom/button-link';\nimport CardsGrid, {CardsGridProps} from '../../organism/cards-grid';\nimport {COLORS} from '../../variables/colors';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport AllCourses from './all-courses';\nimport style from './style.css';\n\ninterface ContinueLearningButtonProps {\n ongoingCoursesAvailable?: boolean;\n onClick?: () => void;\n}\ninterface ProviderContext {\n skin: {\n common: {\n primary: string;\n secondary: string;\n };\n };\n translate: (key: string) => string;\n}\n\nexport const ContinueLearningButton = (\n props: ContinueLearningButtonProps,\n context: ProviderContext\n) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <ButtonLink\n label={ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')}\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor={COLORS.white}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: COLORS.white,\n size: 14\n }\n }}\n onClick={onClick}\n />\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\ninterface Metrics {\n score?: number;\n questionsToReview?: number;\n totalContents?: number;\n}\n\ntype BannerMicrolearning =\n | Record<string, never>\n | {\n action: () => void;\n oldSwitchValue: boolean;\n };\ninterface SkillDetailProps {\n title: string;\n skillRef: string;\n description?: string;\n metrics?: Metrics;\n focused?: boolean;\n availableForReview?: boolean;\n ongoingCoursesAvailable?: boolean;\n skillIncludedCourses: CardsGridProps;\n filters: {\n onChange?: () => void;\n options?: unknown[];\n };\n onBackClick?: () => void;\n onReviewClick?: () => void;\n onContinueLearningClick?: () => void;\n search: {\n oldValue: string;\n onChange: () => void;\n };\n bannerMicrolearning?: BannerMicrolearning;\n}\nconst SkillDetail = (props: SkillDetailProps, context: ProviderContext) => {\n const {\n title,\n skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCoursesAvailable,\n skillIncludedCourses,\n filters,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n search,\n bannerMicrolearning\n } = props;\n\n const {score = 0, questionsToReview = 0, totalContents = 0} = metrics;\n const {translate} = context;\n const bannerMicrolearningAction = bannerMicrolearning?.action;\n const descriptionRef = useRef(null);\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => {\n setShowMore(!showMore);\n }, [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 {description ? <Markdown>{description}</Markdown> : null}\n </div>\n );\n }, [showMore, description]);\n\n const ProgressBar = useCallback(() => {\n if (typeof score !== 'number') return null;\n\n const progressBarColor = COLORS.cm_positive_500;\n const inlineProgressStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarRow}>\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressStyle}\n role=\"progressbar\"\n aria-valuenow={score}\n aria-valuemin={0}\n aria-valuemax={100}\n />\n </div>\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n );\n }, [score]);\n const hasDescription = Boolean(description && description.trim().length > 0);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={skillRef}>\n {/* Top section for the back arrow (optional) */}\n <div className={style.topSection}>\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>\n\n {/* Main section: icon on the left, skill info on the right */}\n <div className={style.mainSection}>\n <div className={style.leftSide}>\n <IconPreview\n icon={{\n name: 'bullseye-arrow',\n color: COLORS.purple_100\n }}\n title={title}\n />\n </div>\n <div className={style.rightSide}>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor={COLORS.purple_100}\n size={{faSize: 10, wrapperSize: 16}}\n />\n {translate('skill_focus')}\n </div>\n ) : (\n <div className={style.skillBadge}>\n <Icon\n iconName=\"shapes\"\n backgroundColor={COLORS.gray}\n size={{faSize: 10, wrapperSize: 16}}\n />\n {translate('skill')}\n </div>\n )}\n\n <h2 className={style.title}>{title}</h2>\n\n {description && (\n <>\n <Description />\n {isDescriptionTruncated ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 14}}\n customStyle={{padding: '8px'}}\n />\n </div>\n ) : null}\n </>\n )}\n\n {questionsToReview > 0 ? (\n <div className={style.skillInformation}>\n <span>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n\n <div\n className={classnames(\n style.progressContainer,\n !hasDescription && style.noDescriptionSpacing\n )}\n >\n <ProgressBar />\n </div>\n\n <div className={style.ctaWrapper}>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n <ButtonLink\n type=\"secondary\"\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n onClick={onReviewClick}\n icon={{\n position: 'left',\n faIcon: {\n name: 'rotate-right',\n color: COLORS.cm_grey_700,\n size: 14\n }\n }}\n customStyle={{borderRadius: '12px', width: 'fit-content'}}\n />\n </div>\n </div>\n </div>\n\n {/* Courses section below */}\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n totalContents={totalContents}\n bannerMicrolearning={\n bannerMicrolearning && bannerMicrolearningAction\n ? {\n type: 'skill',\n action: bannerMicrolearningAction,\n oldSwitchValue: bannerMicrolearning.oldSwitchValue\n }\n : undefined\n }\n search={search}\n />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n skillRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n questionsToReview: PropTypes.number,\n totalContents: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCoursesAvailable: PropTypes.bool,\n skillIncludedCourses: 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 onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n }),\n bannerMicrolearning: PropTypes.shape({\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n })\n};\n\nexport default SkillDetail;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,SAAS,QAAO,OAAO;AACrE,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,SAAS,MAAwB,2BAA2B;AACnE,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,KAAK,MAAM,aAAa;AAgB/B,OAAO,MAAMC,sBAAsB,GAAGA,CACpCC,KAAkC,EAClCC,OAAwB,KACrB;EACH,MAAM;IAACC,uBAAuB;IAAEC;EAAO,CAAC,GAAGH,KAAK;EAChD,MAAM;IAACI,IAAI;IAAEC;EAAS,CAAC,GAAGJ,OAAO;EACjC,MAAMK,gBAAgB,GAAGC,IAAA,CAAI,gBAAgB,EAAEH,IAAI,CAAC;EAEpD,oBACExB,KAAA,CAAA4B,aAAA,CAACf,UAAU;IACTgB,KAAK,EAAEP,uBAAuB,GAAGG,SAAS,CAAC,mBAAmB,CAAC,GAAGA,SAAS,CAAC,gBAAgB,CAAE;IAC9FK,IAAI,EAAC,SAAS;IACdC,WAAW,EAAE;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,EAAEpD,SAAS,CAAC6C,IAAI;EACvBQ,kBAAkB,EAAErD,SAAS,CAAC6C,IAAI;EAClC5B,uBAAuB,EAAEjB,SAAS,CAAC6C,IAAI;EACvCS,oBAAoB,EAAEtD,SAAS,CAAC2H,KAAK,CAAClH,SAAS,CAACgC,SAAS,CAAC;EAC1Dc,OAAO,EAAEvD,SAAS,CAAC2H,KAAK,CAAC;IACvBE,QAAQ,EAAE7H,SAAS,CAAC8C,IAAI;IACxBgF,OAAO,EAAE9H,SAAS,CAAC+H,OAAO,CAAC/H,SAAS,CAAC2H,KAAK,CAAChH,qBAAqB,CAAC;EACnE,CAAC,CAAC;EACF6C,WAAW,EAAExD,SAAS,CAAC8C,IAAI;EAC3BW,aAAa,EAAEzD,SAAS,CAAC8C,IAAI;EAC7BY,uBAAuB,EAAE1D,SAAS,CAAC8C,IAAI;EACvCa,MAAM,EAAE3D,SAAS,CAAC2H,KAAK,CAAC;IACtBK,QAAQ,EAAEhI,SAAS,CAACyH,MAAM;IAC1BI,QAAQ,EAAE7H,SAAS,CAAC8C;EACtB,CAAC,CAAC;EACFc,mBAAmB,EAAE5D,SAAS,CAAC2H,KAAK,CAAC;IACnC1D,MAAM,EAAEjE,SAAS,CAAC8C,IAAI;IACtByE,cAAc,EAAEvH,SAAS,CAAC6C;EAC5B,CAAC;AACH,CAAC;AAED,eAAeE,WAAW","ignoreList":[]}
@@ -7,6 +7,7 @@
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 purple_600 from colors;
10
11
 
11
12
  .textBase {
12
13
  font-family: "Gilroy";
@@ -22,12 +23,7 @@
22
23
  .container {
23
24
  composes: textBase;
24
25
  background-color: white;
25
- font-family: "Gilroy";
26
- font-style: normal;
27
- margin-top: 48px;
28
- margin-bottom: 48px;
29
- margin-left: auto;
30
- margin-right: auto;
26
+ margin: 48px auto;
31
27
  padding: 0 16px;
32
28
  position: relative;
33
29
  box-sizing: border-box;
@@ -36,14 +32,48 @@
36
32
  max-width: calc(1080px + 40px);
37
33
  }
38
34
 
39
- .backButton {
40
- margin-bottom: 16px;
35
+ .topSection {
36
+ display: flex;
41
37
  }
42
38
 
43
- .ctaContainer {
39
+ .mainSection {
44
40
  display: flex;
45
- width: 100%;
46
- justify-content: space-between;
41
+ align-items: flex-start;
42
+ gap: 40px;
43
+ }
44
+
45
+ .leftSide {
46
+ width: 420px;
47
+ height: 280px;
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: 16px;
51
+ }
52
+
53
+ .rightSide {
54
+ max-width: 620px;
55
+ height: 280px;
56
+ display: flex;
57
+ gap: 8px;
58
+ flex-direction: column;
59
+ }
60
+
61
+ .title {
62
+ gap: 8px;
63
+ margin: 0;
64
+ font-size: 24px;
65
+ font-weight: 700;
66
+ line-height: 32px;
67
+ }
68
+
69
+ .ctaWrapper {
70
+ display: flex;
71
+ gap: 8px;
72
+ margin-top: 16px;
73
+ }
74
+
75
+ .backButton {
76
+ margin-bottom: 16px;
47
77
  }
48
78
 
49
79
  .skillFocusBadge {
@@ -57,35 +87,39 @@
57
87
  font-size: 12px;
58
88
  line-height: 16px;
59
89
  font-weight: 600;
60
- color: #3900D6;
61
- margin-bottom: 16px;
90
+ color: purple_600;
62
91
  }
63
92
 
64
- .ctaWrapper,
65
- .showMoreWrapper {
93
+ .skillBadge {
66
94
  display: flex;
67
- gap: 8px;
95
+ height: 12px;
96
+ width: fit-content;
97
+ align-items: center;
98
+ background-color: cm_grey_100;
99
+ border-radius: 24px;
100
+ padding: 4px 8px;
101
+ font-size: 12px;
102
+ line-height: 12px;
103
+ font-weight: 600;
104
+ color: cm_grey_500;
68
105
  }
69
106
 
70
107
  .showMoreWrapper {
108
+ display: flex;
71
109
  align-items: center;
72
- margin-top: 8px;
110
+ color: cm_grey_500;
73
111
  font-weight: 600;
74
112
  cursor: pointer;
75
- }
76
-
77
- .title {
78
- font-size: 24px;
79
- font-weight: 700;
80
- line-height: 32px;
113
+ font-size: 14px;
81
114
  }
82
115
 
83
116
  .description {
84
- margin-top: 8px;
85
- max-width: 734px;
117
+ max-width: 620px;
86
118
  font-size: 14px;
87
119
  font-weight: 500;
88
120
  line-height: 20px;
121
+ flex: 1 0 0;
122
+ align-self: stretch;
89
123
  color: cm_grey_400;
90
124
  }
91
125
 
@@ -105,27 +139,37 @@
105
139
  color: cm_grey_400;
106
140
  margin-top: 16px;
107
141
  }
108
-
109
- .skillInformationNumber {
110
- color: #000;
142
+ .noDescriptionSpacing {
143
+ margin-top: 48px ;
111
144
  }
112
145
 
146
+
113
147
  .progressContainer {
114
148
  display: flex;
115
149
  align-items: center;
116
150
  gap: 8px;
117
- margin: 16px 0 40px 0;
118
151
  }
119
152
 
120
153
  .progressInformationNumber {
154
+ font-size: 14px;
155
+ font-weight: 600;
121
156
  color: cm_grey_500;
157
+ flex-shrink: 0;
158
+ }
159
+
160
+ .progressBarRow {
161
+ display: flex;
162
+ align-items: center;
163
+ flex-direction: row;
164
+ width: 100%;
165
+ gap: 8px;
122
166
  }
123
167
 
124
168
  .progressBarWrapper {
125
169
  position: relative;
126
170
  left: 0;
127
171
  max-width: 300px;
128
- width: 100%;
172
+ flex: 1;
129
173
  height: 4px;
130
174
  border-radius: 2px;
131
175
  overflow: hidden;
@@ -133,27 +177,41 @@
133
177
  }
134
178
 
135
179
  .progress {
136
- display: block;
180
+ display: flex;
137
181
  height: 8px;
138
182
  animation: progressbar 2s ease-in-out;
139
183
  }
140
184
 
141
185
  @media tablet {
142
- .ctaContainer {
143
- flex-direction: column;
186
+ .topSection {
187
+ flex-direction: row;
188
+ align-items: flex-start;
144
189
  }
145
-
146
- .ctaWrapper {
147
- margin-top: 32px;
190
+ .leftSide,
191
+ .rightSide {
192
+ width: 50%;
148
193
  }
149
194
  }
150
195
 
151
196
  @media mobile {
197
+ .topSection {
198
+ flex-direction: column;
199
+ align-items: center;
200
+ }
201
+
202
+ .leftSide,
203
+ .rightSide {
204
+ width: 100%;
205
+ align-items: center;
206
+ }
207
+
152
208
  .ctaWrapper {
153
209
  flex-direction: column;
210
+ gap: 8px;
211
+ margin-top: 16px;
212
+ }
154
213
 
155
- button {
156
- width: 100% !important;
157
- }
214
+ .ctaWrapper button {
215
+ width: 100% !important;
158
216
  }
159
217
  }
@@ -89,3 +89,15 @@
89
89
  @value yellow_100: #FFF9D1;
90
90
  @value red_700: #A30000;
91
91
  @value red_100: #FFD1D1;
92
+
93
+ @value warning_100: #FFEECC;
94
+ @value warning_700: #B87A00;
95
+
96
+ @value negative_600 #C91214;
97
+ @value red_200 #FF9E9E;
98
+ @value turquoise_100: '#D9F4F7';
99
+ @value pink_100: '#FAD6DE';
100
+ @value orange_100: '#FFDCD1';
101
+ @value primary_100: '#D6E6FF';
102
+ @value purple_100: #DDD1FF;
103
+ @value purple_600: #3900D6;
@@ -2,17 +2,17 @@ export declare const COLORS: {
2
2
  readonly gray: "#EAEAEB";
3
3
  readonly negative: "#ed3436";
4
4
  readonly cm_negative_200: "#B81400";
5
- readonly positive: "#35CC7F";
6
5
  readonly cm_positive_200: "#05944F";
7
- readonly white: "#ffffff";
6
+ readonly white: "#FFFFFF";
8
7
  readonly cm_blue_50: "#f1f6fe";
9
8
  readonly cm_grey_400: "#9999A8";
10
9
  readonly cm_grey_800: "#171721";
10
+ readonly cm_grey_150: "#E1E1E3";
11
11
  readonly cm_primary_blue: "#0061FF";
12
12
  readonly cm_blue_700: "#0042AD";
13
13
  readonly primary_100: "#D6E6FF";
14
14
  readonly primary_600: "#0051D6";
15
- readonly cm_grey_500: "#515161";
15
+ readonly cm_grey_500: "#9999A8";
16
16
  readonly cm_grey_700: "#1D1D2B";
17
17
  readonly cm_yellow_400: "#bd7e00";
18
18
  readonly brand: "#00B0FF";
@@ -21,6 +21,18 @@ export declare const COLORS: {
21
21
  readonly red_700: "#A30000";
22
22
  readonly red_100: "#FFD1D1";
23
23
  readonly cm_turquoise_strong: "#1B7B88";
24
+ readonly yellow_500: "#FFCE0A";
25
+ readonly neutral_75: " #F4F4F5";
26
+ readonly neutral_400: " #9999A8";
27
+ readonly neutral_500: "#515161";
28
+ readonly negative_700: "#B81400";
29
+ readonly cm_orange_800: "#A32700";
30
+ readonly purple_700: "#2B00A3";
31
+ readonly purple_100: "#DDD1FF";
32
+ readonly turquoise_100: "#D9F4F7";
33
+ readonly pink_100: "#FAD6DE";
34
+ readonly orange_100: "#FFDCD1";
35
+ readonly cm_positive_500: "#35CC7F";
24
36
  };
25
37
  export declare type Colors = typeof COLORS;
26
38
  //# sourceMappingURL=colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAuBT,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCT,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}