@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
@@ -1,9 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  import Link from '../../atom/link';
3
4
  import { TitleProps } from '../../atom/title/types';
4
5
  import CardsGrid from '../../organism/cards-grid';
5
6
  import ListItems from '../../organism/list-items';
6
- import { iconPropTypes } from '../../atom/icon';
7
+ import { propTypes as iconPropTypes } from '../../atom/icon';
7
8
  declare const propTypes: {
8
9
  content: PropTypes.Requireable<string>;
9
10
  mode: PropTypes.Requireable<string>;
@@ -15,7 +16,7 @@ declare const propTypes: {
15
16
  'data-name': PropTypes.Requireable<string>;
16
17
  titleSize: PropTypes.Requireable<string>;
17
18
  subtitleSize: PropTypes.Requireable<string>;
18
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
19
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
19
20
  tag: PropTypes.Requireable<PropTypes.InferProps<{
20
21
  label: PropTypes.Requireable<string>;
21
22
  type: PropTypes.Requireable<string>;
@@ -23,7 +24,17 @@ declare const propTypes: {
23
24
  customStyle: PropTypes.Requireable<{
24
25
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
25
26
  }>;
26
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
27
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
28
+ position: PropTypes.Requireable<string>;
29
+ iconName?: import("react").Validator<string> | undefined;
30
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
31
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
32
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
33
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
34
+ preset?: import("react").Validator<string | null | undefined> | undefined;
35
+ size?: import("react").Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
36
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
37
+ }>>;
27
38
  }>>;
28
39
  button: PropTypes.Requireable<PropTypes.InferProps<{
29
40
  type: PropTypes.Requireable<string>;
@@ -110,8 +121,8 @@ declare const propTypes: {
110
121
  borderRadius: PropTypes.Requireable<string>;
111
122
  preset: PropTypes.Requireable<string>;
112
123
  size: PropTypes.Requireable<PropTypes.InferProps<{
113
- faSize: PropTypes.Requireable<number>;
114
- wrapperSize: PropTypes.Requireable<number>;
124
+ faSize: PropTypes.Validator<number>;
125
+ wrapperSize: PropTypes.Validator<number>;
115
126
  }>>;
116
127
  customStyle: PropTypes.Requireable<{
117
128
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -549,7 +560,7 @@ declare const propTypes: {
549
560
  'data-name': PropTypes.Requireable<string>;
550
561
  titleSize: PropTypes.Requireable<string>;
551
562
  subtitleSize: PropTypes.Requireable<string>;
552
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
563
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
553
564
  tag: PropTypes.Requireable<PropTypes.InferProps<{
554
565
  label: PropTypes.Requireable<string>;
555
566
  type: PropTypes.Requireable<string>;
@@ -557,7 +568,17 @@ declare const propTypes: {
557
568
  customStyle: PropTypes.Requireable<{
558
569
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
559
570
  }>;
560
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
571
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
572
+ position: PropTypes.Requireable<string>;
573
+ iconName?: import("react").Validator<string> | undefined;
574
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
575
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
576
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
577
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
578
+ preset?: import("react").Validator<string | null | undefined> | undefined;
579
+ size?: import("react").Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
580
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
581
+ }>>;
561
582
  }>>;
562
583
  button: PropTypes.Requireable<PropTypes.InferProps<{
563
584
  type: PropTypes.Requireable<string>;
@@ -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;AAElD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC"}
@@ -7,7 +7,7 @@ import Link from '../../atom/link';
7
7
  import CardsGrid from '../../organism/cards-grid';
8
8
  import ListItems from '../../organism/list-items';
9
9
  import { ICONS } from '../../util/button-icons';
10
- import { iconPropTypes } from '../../atom/icon';
10
+ import { propTypes as iconPropTypes } from '../../atom/icon';
11
11
  const propTypes = {
12
12
  content: PropTypes.string,
13
13
  mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ButtonLink","InputSwitch","Title","Link","CardsGrid","ListItems","ICONS","iconPropTypes","propTypes","content","string","mode","oneOf","header","shape","title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","secondButton","icon","position","_keys","thirdButton","onClose","oneOfType","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","items","list","link"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\nimport {iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;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SAAS,CAACW,MAAM;EACnC4B,aAAa,EAAEvC,SAAS,CAACwC,OAAO,CAACxC,SAAS,CAACe,KAAK,CAACb,WAAW,CAACO,SAAS,CAAC,CAAC;EACxEgC,KAAK,EAAEzC,SAAS,CAACe,KAAK,CAAC;IACrBU,IAAI,EAAEzB,SAAS,CAACa,KAAK,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C6B,IAAI,EAAE1C,SAAS,CAACiC,SAAS,CAAC,CACxBjC,SAAS,CAACe,KAAK,CAACV,SAAS,CAACI,SAAS,CAAC,EACpCT,SAAS,CAACe,KAAK,CAACT,SAAS,CAACG,SAAS,CAAC,CACrC;EACH,CAAC,CAAC;EACFkC,IAAI,EAAE3C,SAAS,CAACe,KAAK,CAACX,IAAI,CAACK,SAAS;AACtC,CAAC;AAqCD,eAAeA,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ButtonLink","InputSwitch","Title","Link","CardsGrid","ListItems","ICONS","propTypes","iconPropTypes","content","string","mode","oneOf","header","shape","title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","secondButton","icon","position","_keys","thirdButton","onClose","oneOfType","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","items","list","link"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\nimport {propTypes as iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,IAAI,MAAM,iBAAiB;AAElC,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,SAAS,MAAM,2BAA2B;AACjD,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,SAAQC,SAAS,IAAIC,aAAa,QAAO,iBAAiB;AAE1D,MAAMD,SAAS,GAAG;EAChBE,OAAO,EAAEV,SAAS,CAACW,MAAM;EACzBC,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;EAC1EC,MAAM,EAAEd,SAAS,CAACe,KAAK,CAAC;IACtBC,KAAK,EAAEhB,SAAS,CAACe,KAAK,CAACZ,KAAK,CAACK,SAAS,CAAC;IACvCS,UAAU,EAAEjB,SAAS,CAACW,MAAM;IAC5BO,eAAe,EAAElB,SAAS,CAACW;EAC7B,CAAC,CAAC;EACFQ,WAAW,EAAEnB,SAAS,CAACe,KAAK,CAAC;IAC3BK,KAAK,EAAEpB,SAAS,CAACW,MAAM;IACvBU,aAAa,EAAErB,SAAS,CAACsB,IAAI;IAC7B,YAAY,EAAEtB,SAAS,CAACW,MAAM;IAC9BY,WAAW,EAAEvB,SAAS,CAACwB,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S,CAACW,MAAM,EAAEX,SAAS,CAACe,KAAK,CAACN,aAAa,CAAC,CAAC,CAAC;EAC7EyB,kBAAkB,EAAElC,SAAS,CAACW,MAAM;EACpCwB,eAAe,EAAEnC,SAAS,CAACW,MAAM;EACjCyB,WAAW,EAAEpC,SAAS,CAACW,MAAM;EAC7B0B,cAAc,EAAErC,SAAS,CAACW,MAAM;EAChC2B,iBAAiB,EAAEtC,SAAS,CAACW,MAAM;EACnC4B,aAAa,EAAEvC,SAAS,CAACwC,OAAO,CAACxC,SAAS,CAACe,KAAK,CAACb,WAAW,CAACM,SAAS,CAAC,CAAC;EACxEiC,KAAK,EAAEzC,SAAS,CAACe,KAAK,CAAC;IACrBU,IAAI,EAAEzB,SAAS,CAACa,KAAK,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C6B,IAAI,EAAE1C,SAAS,CAACiC,SAAS,CAAC,CACxBjC,SAAS,CAACe,KAAK,CAACV,SAAS,CAACG,SAAS,CAAC,EACpCR,SAAS,CAACe,KAAK,CAACT,SAAS,CAACE,SAAS,CAAC,CACrC;EACH,CAAC,CAAC;EACFmC,IAAI,EAAE3C,SAAS,CAACe,KAAK,CAACX,IAAI,CAACI,SAAS;AACtC,CAAC;AAqCD,eAAeA,SAAS","ignoreList":[]}
@@ -1,44 +1,29 @@
1
- export default LearnerSkillCard;
2
- declare function LearnerSkillCard(props: any, context: any): JSX.Element;
3
- declare namespace LearnerSkillCard {
4
- namespace contextTypes {
5
- const skin: PropTypes.Requireable<PropTypes.InferProps<{
6
- common: PropTypes.Requireable<{
7
- [x: string]: any;
8
- }>;
9
- images: PropTypes.Requireable<PropTypes.InferProps<{
10
- 'logo-mobile': PropTypes.Requireable<any>;
11
- logo: PropTypes.Requireable<any>;
12
- 'logo-email': PropTypes.Requireable<any>;
13
- login: PropTypes.Requireable<any>;
14
- }>>;
15
- icons: PropTypes.Requireable<{
16
- [x: string]: any;
17
- }>;
18
- mod: PropTypes.Requireable<{
19
- [x: string]: any;
20
- }>;
21
- courses: PropTypes.Requireable<any[]>;
22
- texts: PropTypes.Requireable<{
23
- [x: string]: any;
24
- }>;
1
+ import React from 'react';
2
+ import { WebContextValues } from '../../atom/provider/web-context';
3
+ import { LearnerSkillCardProps } from './prop-types';
4
+ export declare const updateBackgroundImage: (ref: React.RefObject<HTMLDivElement>, background: string) => void;
5
+ declare const LearnerSkillCard: {
6
+ (props: LearnerSkillCardProps, context: WebContextValues): JSX.Element;
7
+ contextTypes: {
8
+ translate: import("prop-types").Requireable<(...args: any[]) => any>;
9
+ };
10
+ propTypes: {
11
+ 'aria-label': import("prop-types").Requireable<string>;
12
+ cardIndex: import("prop-types").Requireable<number>;
13
+ skillTitle: import("prop-types").Requireable<string>;
14
+ skillAriaLabel: import("prop-types").Requireable<string>;
15
+ focus: import("prop-types").Requireable<boolean>;
16
+ metrics: import("prop-types").Requireable<import("prop-types").InferProps<{
17
+ content: import("prop-types").Requireable<number>;
18
+ score: import("prop-types").Requireable<number>;
19
+ questionsToReview: import("prop-types").Requireable<number>;
25
20
  }>>;
26
- const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
- }
28
- const propTypes: {
29
- 'aria-label': PropTypes.Requireable<string>;
30
- skillTitle: PropTypes.Requireable<string>;
31
- skillAriaLabel: PropTypes.Requireable<string>;
32
- focus: PropTypes.Requireable<boolean>;
33
- metrics: PropTypes.Requireable<PropTypes.InferProps<{
34
- score: PropTypes.Requireable<number>;
35
- content: PropTypes.Requireable<number>;
36
- questionsToReview: PropTypes.Requireable<number>;
21
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
22
+ color: import("prop-types").Requireable<string>;
23
+ name: import("prop-types").Requireable<string>;
37
24
  }>>;
38
- review: PropTypes.Requireable<boolean>;
39
- onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
40
- onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
25
+ onExploreClick: import("prop-types").Requireable<(...args: any[]) => any>;
41
26
  };
42
- }
43
- import PropTypes from "prop-types";
27
+ };
28
+ export default LearnerSkillCard;
44
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.js"],"names":[],"mappings":";AAaA,yEAiHC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAKjE,OAAkB,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAK9D,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,CAAC,cAAc,CAAC,cAAc,MAAM,SAI7F,CAAC;AAEF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;CA6HhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
@@ -1,23 +1,26 @@
1
- import _get from "lodash/fp/get";
2
- import React from 'react';
3
- import { convert } from 'css-color-function';
4
- import PropTypes from 'prop-types';
5
- import Icon from '../../atom/icon';
6
- import ButtonLink from '../../atom/button-link';
7
- import Provider from '../../atom/provider';
1
+ import React, { useCallback, useMemo, useRef } from 'react';
2
+ import Provider, { GetTranslateFromContext } from '../../atom/provider';
8
3
  import ProgressBar from '../progress-bar';
9
4
  import { COLORS } from '../../variables/colors';
5
+ import { createGradientBackground } from '../../util/get-background-gradient-color';
6
+ import FaIcon from '../../atom/icon';
7
+ import propTypes from './prop-types';
10
8
  import style from './style.css';
11
9
  const MAX_SCORE = 100;
10
+ export const updateBackgroundImage = (ref, background) => {
11
+ if (ref.current) {
12
+ ref.current.style.backgroundImage = background;
13
+ }
14
+ };
12
15
  const LearnerSkillCard = (props, context) => {
13
16
  const {
14
17
  'aria-label': ariaLabel,
18
+ cardIndex,
15
19
  skillTitle,
16
20
  skillAriaLabel,
17
- focus = false,
21
+ focus,
18
22
  metrics,
19
- review = false,
20
- onReviewClick,
23
+ icon,
21
24
  onExploreClick
22
25
  } = props;
23
26
  const {
@@ -25,76 +28,92 @@ const LearnerSkillCard = (props, context) => {
25
28
  content,
26
29
  questionsToReview = 0
27
30
  } = metrics;
31
+ const translate = GetTranslateFromContext(context);
28
32
  const {
29
- skin,
30
- translate
31
- } = context;
32
- const primarySkinColor = _get('common.primary', skin);
33
- const reviewLocale = translate('Review');
34
- const exploreLocale = translate('Explore');
33
+ color,
34
+ name
35
+ } = icon;
35
36
  const questionsLocale = translate('skill_chart_side_panel_questions_to_review');
36
- const skillFocusLocale = translate('skill_focus');
37
- const buttonReviewProps = {
38
- customStyle: {
39
- backgroundColor: '#FFF',
40
- transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
41
- padding: '0px'
37
+ const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus ? ['bullseye-arrow', translate('skill_focus'), COLORS.purple_700, COLORS.purple_100] : ['shapes', translate('skill'), COLORS.cm_grey_500, COLORS.gray];
38
+ const headerBackgroundRef = useRef(null);
39
+ const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);
40
+ const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);
41
+ const handleMouseEnter = useCallback(() => {
42
+ updateBackgroundImage(headerBackgroundRef, focusBackground);
43
+ }, [focusBackground]);
44
+ const handleMouseLeave = useCallback(() => {
45
+ updateBackgroundImage(headerBackgroundRef, defaultBackground);
46
+ }, [defaultBackground]);
47
+ return /*#__PURE__*/React.createElement("div", {
48
+ "data-testid": `learner-skill-card-wrapper-${cardIndex}`,
49
+ onClick: onExploreClick,
50
+ className: style.learnerSkillCardContainer,
51
+ "aria-label": ariaLabel,
52
+ onMouseEnter: handleMouseEnter,
53
+ onMouseLeave: handleMouseLeave
54
+ }, /*#__PURE__*/React.createElement("div", {
55
+ "data-testid": "learner-skill-card-icon-header-wrapper",
56
+ ref: headerBackgroundRef,
57
+ className: style.iconHeaderWrapper,
58
+ style: {
59
+ backgroundImage: defaultBackground,
60
+ color: tagTextColor
61
+ }
62
+ }, /*#__PURE__*/React.createElement("div", {
63
+ className: style.iconWrapper,
64
+ "data-testid": "learner-skill-card-icon-wrapper"
65
+ }, /*#__PURE__*/React.createElement(FaIcon, {
66
+ iconName: name,
67
+ iconColor: color,
68
+ size: {
69
+ faSize: 20,
70
+ wrapperSize: 44
42
71
  },
43
- disabled: !review,
44
- onClick: onReviewClick,
45
- 'aria-label': `${skillTitle}, ${reviewLocale}`,
46
- label: reviewLocale,
47
- 'data-name': 'learner-skill-card-review-button'
48
- };
49
- const buttonExploreProps = {
72
+ borderRadius: '12px',
73
+ gradientBackground: true,
50
74
  customStyle: {
51
- backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),
52
- color: primarySkinColor,
53
- transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
54
- },
55
- hoverColor: '#FFFFFF',
56
- hoverBackgroundColor: primarySkinColor,
57
- onClick: onExploreClick,
58
- 'aria-label': `${skillTitle}, ${exploreLocale}`,
59
- label: exploreLocale,
60
- 'data-name': 'learner-skill-card-explore-button',
61
- icon: {
62
- position: 'left',
63
- faIcon: {
64
- name: 'compass',
65
- backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),
66
- color: primarySkinColor,
67
- size: 16
68
- }
75
+ border: '4px solid white'
69
76
  }
70
- };
71
- return /*#__PURE__*/React.createElement("div", {
72
- className: style.learnerSkillCardWrapper,
73
- "data-name": "learner-skill-card-wrapper",
74
- "aria-label": ariaLabel
75
- }, questionsToReview ? /*#__PURE__*/React.createElement("div", {
76
- className: style.skillQuestionsWrapper
77
+ }))), /*#__PURE__*/React.createElement("div", {
78
+ className: style.learnerSkillCardContent
77
79
  }, /*#__PURE__*/React.createElement("div", {
78
- className: style.skillInformation,
79
- "data-name": "skill-questions"
80
- }, /*#__PURE__*/React.createElement("span", {
81
- className: style.skillInformationNumber
82
- }, questionsToReview), "\xA0", questionsLocale)) : null, /*#__PURE__*/React.createElement("div", {
83
80
  className: style.skillTitleWrapper
84
81
  }, /*#__PURE__*/React.createElement("div", {
85
- "data-name": "skill-title",
86
- className: style.skillTitle,
87
- "aria-label": skillAriaLabel || skillTitle
88
- }, skillTitle), focus ? /*#__PURE__*/React.createElement("div", {
89
- className: style.skillFocusBadge
90
- }, /*#__PURE__*/React.createElement(Icon, {
91
- iconName: "bullseye-arrow",
92
- backgroundColor: "#DDD1FF",
82
+ className: style.skillFocusBadge,
83
+ style: {
84
+ backgroundColor: tagBackgroundColor,
85
+ color: tagTextColor
86
+ }
87
+ }, /*#__PURE__*/React.createElement(FaIcon, {
88
+ iconName: badgeIconName,
89
+ backgroundColor: tagBackgroundColor,
93
90
  size: {
94
91
  faSize: 10,
95
92
  wrapperSize: 16
96
93
  }
97
- }), skillFocusLocale) : null), content ? /*#__PURE__*/React.createElement("div", {
94
+ }), badgeLocale), /*#__PURE__*/React.createElement("div", {
95
+ className: style.questionWrapper
96
+ }, /*#__PURE__*/React.createElement("div", {
97
+ "data-name": "skill-card-title",
98
+ className: style.skillTitle,
99
+ "aria-label": skillAriaLabel || skillTitle
100
+ }, skillTitle), /*#__PURE__*/React.createElement("div", {
101
+ className: style.contentAndQuestionsWrapper
102
+ }, /*#__PURE__*/React.createElement("div", {
103
+ "data-name": "learner-skill-card-skill-content-number"
104
+ }, content, " ", translate('content')), questionsToReview ? /*#__PURE__*/React.createElement("div", {
105
+ className: style.skillInformation,
106
+ "data-name": "learner-skill-card-skill-questions-wrapper"
107
+ }, /*#__PURE__*/React.createElement(FaIcon, {
108
+ iconName: 'circle',
109
+ iconColor: COLORS.cm_grey_400,
110
+ size: {
111
+ faSize: 4,
112
+ wrapperSize: 0
113
+ }
114
+ }), /*#__PURE__*/React.createElement("span", {
115
+ "data-name": "learner-skill-card-questions-to-review"
116
+ }, questionsToReview), "\xA0", questionsLocale) : null)))), /*#__PURE__*/React.createElement("div", {
98
117
  className: style.progressInformations
99
118
  }, /*#__PURE__*/React.createElement(ProgressBar, {
100
119
  value: score,
@@ -102,38 +121,13 @@ const LearnerSkillCard = (props, context) => {
102
121
  max: MAX_SCORE,
103
122
  className: style.progressWrapper,
104
123
  style: {
105
- backgroundColor: COLORS.positive
124
+ backgroundColor: COLORS.cm_positive_500
106
125
  }
107
- }), /*#__PURE__*/React.createElement("div", {
108
- className: style.progressInformation,
109
- "data-name": "completed-percentage"
110
- }, /*#__PURE__*/React.createElement("span", {
111
- className: style.progressInformationNumber
112
- }, score, "%"))) : null, /*#__PURE__*/React.createElement("div", {
113
- className: style.ctaWrapper,
114
- "data-name": "cta-wrapper"
115
- }, /*#__PURE__*/React.createElement(ButtonLink, buttonReviewProps), /*#__PURE__*/React.createElement("div", {
116
- className: style.buttonWrapper,
117
- "data-name": "button-explore-wrapper"
118
- }, /*#__PURE__*/React.createElement(ButtonLink, buttonExploreProps))));
126
+ })));
119
127
  };
120
128
  LearnerSkillCard.contextTypes = {
121
- skin: Provider.childContextTypes.skin,
122
129
  translate: Provider.childContextTypes.translate
123
130
  };
124
- LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? {
125
- 'aria-label': PropTypes.string,
126
- skillTitle: PropTypes.string,
127
- skillAriaLabel: PropTypes.string,
128
- focus: PropTypes.bool,
129
- metrics: PropTypes.shape({
130
- score: PropTypes.number,
131
- content: PropTypes.number,
132
- questionsToReview: PropTypes.number
133
- }),
134
- review: PropTypes.bool,
135
- onReviewClick: PropTypes.func,
136
- onExploreClick: PropTypes.func
137
- } : {};
131
+ LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
138
132
  export default LearnerSkillCard;
139
133
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","convert","PropTypes","Icon","ButtonLink","Provider","ProgressBar","COLORS","style","MAX_SCORE","LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","skin","translate","primarySkinColor","_get","reviewLocale","exploreLocale","questionsLocale","skillFocusLocale","buttonReviewProps","customStyle","backgroundColor","transition","padding","disabled","onClick","label","buttonExploreProps","color","hoverColor","hoverBackgroundColor","icon","position","faIcon","name","size","createElement","className","learnerSkillCardWrapper","skillQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","iconName","faSize","wrapperSize","progressInformations","value","displayInfo","max","progressWrapper","positive","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst MAX_SCORE = 100;\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview = 0} = metrics;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const questionsLocale = translate('skill_chart_side_panel_questions_to_review');\n const skillFocusLocale = translate('skill_focus');\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n padding: '0px'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n hoverColor: '#FFFFFF',\n hoverBackgroundColor: primarySkinColor,\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n size: 16\n }\n }\n };\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {questionsToReview ? (\n <div className={style.skillQuestionsWrapper}>\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{questionsLocale}\n </div>\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {skillFocusLocale}\n </div>\n ) : null}\n </div>\n {content ? (\n <div className={style.progressInformations}>\n <ProgressBar\n value={score}\n displayInfo={false}\n max={MAX_SCORE}\n className={style.progressWrapper}\n style={{backgroundColor: COLORS.positive}}\n />\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </div>\n ) : null}\n <div className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div className={style.buttonWrapper} data-name=\"button-explore-wrapper\">\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,OAAO,QAAO,oBAAoB;AAE1C,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,SAAS,GAAG,GAAG;AAErB,MAAMC,gBAAgB,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAC3C,MAAM;IACJ,YAAY,EAAEC,SAAS;IACvBC,UAAU;IACVC,cAAc;IACdC,KAAK,GAAG,KAAK;IACbC,OAAO;IACPC,MAAM,GAAG,KAAK;IACdC,aAAa;IACbC;EACF,CAAC,GAAGT,KAAK;EACT,MAAM;IAACU,KAAK;IAAEC,OAAO;IAAEC,iBAAiB,GAAG;EAAC,CAAC,GAAGN,OAAO;EACvD,MAAM;IAACO,IAAI;IAAEC;EAAS,CAAC,GAAGb,OAAO;EACjC,MAAMc,gBAAgB,GAAGC,IAAA,CAAI,gBAAgB,EAAEH,IAAI,CAAC;EAEpD,MAAMI,YAAY,GAAGH,SAAS,CAAC,QAAQ,CAAC;EACxC,MAAMI,aAAa,GAAGJ,SAAS,CAAC,SAAS,CAAC;EAC1C,MAAMK,eAAe,GAAGL,SAAS,CAAC,4CAA4C,CAAC;EAC/E,MAAMM,gBAAgB,GAAGN,SAAS,CAAC,aAAa,CAAC;EAEjD,MAAM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AAiD,aAAA,CAAC7C,UAAU,EAAK4B,iBAAoB,CAAC,eACrChC,KAAA,CAAAiD,aAAA;IAAKC,SAAS,EAAE1C,KAAK,CAAC6D,aAAc;IAAC,aAAU;EAAwB,gBACrErE,KAAA,CAAAiD,aAAA,CAAC7C,UAAU,EAAKoC,kBAAqB,CAClC,CACF,CACF,CAAC;AAEV,CAAC;AAED9B,gBAAgB,CAAC4D,YAAY,GAAG;EAC9B9C,IAAI,EAAEnB,QAAQ,CAACkE,iBAAiB,CAAC/C,IAAI;EACrCC,SAAS,EAAEpB,QAAQ,CAACkE,iBAAiB,CAAC9C;AACxC,CAAC;AAEDf,gBAAgB,CAAC8D,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAC3B,YAAY,EAAEzE,SAAS,CAAC0E,MAAM;EAC9B9D,UAAU,EAAEZ,SAAS,CAAC0E,MAAM;EAC5B7D,cAAc,EAAEb,SAAS,CAAC0E,MAAM;EAChC5D,KAAK,EAAEd,SAAS,CAAC2E,IAAI;EACrB5D,OAAO,EAAEf,SAAS,CAAC4E,KAAK,CAAC;IACvBzD,KAAK,EAAEnB,SAAS,CAAC6E,MAAM;IACvBzD,OAAO,EAAEpB,SAAS,CAAC6E,MAAM;IACzBxD,iBAAiB,EAAErB,SAAS,CAAC6E;EAC/B,CAAC,CAAC;EACF7D,MAAM,EAAEhB,SAAS,CAAC2E,IAAI;EACtB1D,aAAa,EAAEjB,SAAS,CAAC8E,IAAI;EAC7B5D,cAAc,EAAElB,SAAS,CAAC8E;AAC5B,CAAC;AAED,eAAetE,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useRef","Provider","GetTranslateFromContext","ProgressBar","COLORS","createGradientBackground","FaIcon","propTypes","style","MAX_SCORE","updateBackgroundImage","ref","background","current","backgroundImage","LearnerSkillCard","props","context","ariaLabel","cardIndex","skillTitle","skillAriaLabel","focus","metrics","icon","onExploreClick","score","content","questionsToReview","translate","color","name","questionsLocale","badgeIconName","badgeLocale","tagTextColor","tagBackgroundColor","purple_700","purple_100","cm_grey_500","gray","headerBackgroundRef","defaultBackground","focusBackground","handleMouseEnter","handleMouseLeave","createElement","onClick","className","learnerSkillCardContainer","onMouseEnter","onMouseLeave","iconHeaderWrapper","iconWrapper","iconName","iconColor","size","faSize","wrapperSize","borderRadius","gradientBackground","customStyle","border","learnerSkillCardContent","skillTitleWrapper","skillFocusBadge","backgroundColor","questionWrapper","contentAndQuestionsWrapper","skillInformation","cm_grey_400","progressInformations","value","displayInfo","max","progressWrapper","cm_positive_500","contextTypes","childContextTypes","process","env","NODE_ENV"],"sources":["../../../src/molecule/learner-skill-card/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useRef} from 'react';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport FaIcon from '../../atom/icon';\nimport propTypes, {LearnerSkillCardProps} from './prop-types';\nimport style from './style.css';\n\nconst MAX_SCORE = 100;\n\nexport const updateBackgroundImage = (ref: React.RefObject<HTMLDivElement>, background: string) => {\n if (ref.current) {\n ref.current.style.backgroundImage = background;\n }\n};\n\nconst LearnerSkillCard = (props: LearnerSkillCardProps, context: WebContextValues) => {\n const {\n 'aria-label': ariaLabel,\n cardIndex,\n skillTitle,\n skillAriaLabel,\n focus,\n metrics,\n icon,\n onExploreClick\n } = props;\n const {score, content, questionsToReview = 0} = metrics;\n const translate = GetTranslateFromContext(context);\n const {color, name} = icon;\n const questionsLocale = translate('skill_chart_side_panel_questions_to_review') as string;\n const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus\n ? ['bullseye-arrow', translate('skill_focus') as string, COLORS.purple_700, COLORS.purple_100]\n : ['shapes', translate('skill') as string, COLORS.cm_grey_500, COLORS.gray];\n const headerBackgroundRef = useRef<HTMLDivElement | null>(null);\n const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);\n const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);\n const handleMouseEnter = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, focusBackground);\n }, [focusBackground]);\n const handleMouseLeave = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, defaultBackground);\n }, [defaultBackground]);\n return (\n <div\n data-testid={`learner-skill-card-wrapper-${cardIndex}`}\n onClick={onExploreClick}\n className={style.learnerSkillCardContainer}\n aria-label={ariaLabel}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div\n data-testid=\"learner-skill-card-icon-header-wrapper\"\n ref={headerBackgroundRef}\n className={style.iconHeaderWrapper}\n style={{backgroundImage: defaultBackground, color: tagTextColor}}\n >\n <div className={style.iconWrapper} data-testid=\"learner-skill-card-icon-wrapper\">\n <FaIcon\n {...{\n iconName: name,\n iconColor: color,\n size: {\n faSize: 20,\n wrapperSize: 44\n },\n borderRadius: '12px',\n gradientBackground: true,\n customStyle: {border: '4px solid white'}\n }}\n />\n </div>\n </div>\n <div className={style.learnerSkillCardContent}>\n <div className={style.skillTitleWrapper}>\n <div\n className={style.skillFocusBadge}\n style={{\n backgroundColor: tagBackgroundColor,\n color: tagTextColor\n }}\n >\n <FaIcon\n {...{\n iconName: badgeIconName,\n backgroundColor: tagBackgroundColor,\n size: {\n faSize: 10,\n wrapperSize: 16\n }\n }}\n />\n {badgeLocale}\n </div>\n\n <div className={style.questionWrapper}>\n <div\n data-name=\"skill-card-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n <div className={style.contentAndQuestionsWrapper}>\n <div data-name=\"learner-skill-card-skill-content-number\">\n {content} {translate('content')}\n </div>\n {questionsToReview ? (\n <div\n className={style.skillInformation}\n data-name=\"learner-skill-card-skill-questions-wrapper\"\n >\n <FaIcon\n {...{\n iconName: 'circle',\n iconColor: COLORS.cm_grey_400,\n size: {faSize: 4, wrapperSize: 0}\n }}\n />\n <span data-name=\"learner-skill-card-questions-to-review\">\n {questionsToReview}\n </span>\n &nbsp;{questionsLocale}\n </div>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n <div className={style.progressInformations}>\n <ProgressBar\n value={score}\n displayInfo={false}\n max={MAX_SCORE}\n className={style.progressWrapper}\n style={{backgroundColor: COLORS.cm_positive_500}}\n />\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = propTypes;\n\nexport default LearnerSkillCard;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBAAqB;AAErE,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,SAAS,MAA+B,cAAc;AAC7D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,SAAS,GAAG,GAAG;AAErB,OAAO,MAAMC,qBAAqB,GAAGA,CAACC,GAAoC,EAAEC,UAAkB,KAAK;EACjG,IAAID,GAAG,CAACE,OAAO,EAAE;IACfF,GAAG,CAACE,OAAO,CAACL,KAAK,CAACM,eAAe,GAAGF,UAAU;EAChD;AACF,CAAC;AAED,MAAMG,gBAAgB,GAAGA,CAACC,KAA4B,EAAEC,OAAyB,KAAK;EACpF,MAAM;IACJ,YAAY,EAAEC,SAAS;IACvBC,SAAS;IACTC,UAAU;IACVC,cAAc;IACdC,KAAK;IACLC,OAAO;IACPC,IAAI;IACJC;EACF,CAAC,GAAGT,KAAK;EACT,MAAM;IAACU,KAAK;IAAEC,OAAO;IAAEC,iBAAiB,GAAG;EAAC,CAAC,GAAGL,OAAO;E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SAAS,GAAAwE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG1E,SAAS;AAEtC,eAAeQ,gBAAgB","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ import PropTypes from 'prop-types';
2
+ declare const propTypes: {
3
+ 'aria-label': PropTypes.Requireable<string>;
4
+ cardIndex: PropTypes.Requireable<number>;
5
+ skillTitle: PropTypes.Requireable<string>;
6
+ skillAriaLabel: PropTypes.Requireable<string>;
7
+ focus: PropTypes.Requireable<boolean>;
8
+ metrics: PropTypes.Requireable<PropTypes.InferProps<{
9
+ content: PropTypes.Requireable<number>;
10
+ score: PropTypes.Requireable<number>;
11
+ questionsToReview: PropTypes.Requireable<number>;
12
+ }>>;
13
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
14
+ color: PropTypes.Requireable<string>;
15
+ name: PropTypes.Requireable<string>;
16
+ }>>;
17
+ onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
18
+ };
19
+ export declare type LearnerSkillCardProps = {
20
+ 'aria-label'?: string;
21
+ cardIndex: number;
22
+ skillTitle: string;
23
+ skillAriaLabel?: string;
24
+ focus: boolean;
25
+ metrics: {
26
+ content: number;
27
+ score: number;
28
+ questionsToReview?: number;
29
+ };
30
+ icon: {
31
+ color: string;
32
+ name: string;
33
+ };
34
+ onExploreClick: () => void;
35
+ };
36
+ export default propTypes;
37
+ //# sourceMappingURL=prop-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ import PropTypes from 'prop-types';
2
+ const propTypes = {
3
+ 'aria-label': PropTypes.string,
4
+ cardIndex: PropTypes.number,
5
+ skillTitle: PropTypes.string,
6
+ skillAriaLabel: PropTypes.string,
7
+ focus: PropTypes.bool,
8
+ metrics: PropTypes.shape({
9
+ content: PropTypes.number,
10
+ score: PropTypes.number,
11
+ questionsToReview: PropTypes.number
12
+ }),
13
+ icon: PropTypes.shape({
14
+ color: PropTypes.string,
15
+ name: PropTypes.string
16
+ }),
17
+ onExploreClick: PropTypes.func
18
+ };
19
+ export default propTypes;
20
+ //# sourceMappingURL=prop-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.js","names":["PropTypes","propTypes","string","cardIndex","number","skillTitle","skillAriaLabel","focus","bool","metrics","shape","content","score","questionsToReview","icon","color","name","onExploreClick","func"],"sources":["../../../src/molecule/learner-skill-card/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n cardIndex: PropTypes.number,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n content: PropTypes.number,\n score: PropTypes.number,\n questionsToReview: PropTypes.number\n }),\n icon: PropTypes.shape({\n color: PropTypes.string,\n name: PropTypes.string\n }),\n onExploreClick: PropTypes.func\n};\n\nexport type LearnerSkillCardProps = {\n 'aria-label'?: string;\n cardIndex: number;\n skillTitle: string;\n skillAriaLabel?: string;\n focus: boolean;\n metrics: {\n content: number;\n score: number;\n questionsToReview?: number;\n };\n icon: {\n color: string;\n name: string;\n };\n onExploreClick: () => void;\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,SAAS,GAAG;EAChB,YAAY,EAAED,SAAS,CAACE,MAAM;EAC9BC,SAAS,EAAEH,SAAS,CAACI,MAAM;EAC3BC,UAAU,EAAEL,SAAS,CAACE,MAAM;EAC5BI,cAAc,EAAEN,SAAS,CAACE,MAAM;EAChCK,KAAK,EAAEP,SAAS,CAACQ,IAAI;EACrBC,OAAO,EAAET,SAAS,CAACU,KAAK,CAAC;IACvBC,OAAO,EAAEX,SAAS,CAACI,MAAM;IACzBQ,KAAK,EAAEZ,SAAS,CAACI,MAAM;IACvBS,iBAAiB,EAAEb,SAAS,CAACI;EAC/B,CAAC,CAAC;EACFU,IAAI,EAAEd,SAAS,CAACU,KAAK,CAAC;IACpBK,KAAK,EAAEf,SAAS,CAACE,MAAM;IACvBc,IAAI,EAAEhB,SAAS,CAACE;EAClB,CAAC,CAAC;EACFe,cAAc,EAAEjB,SAAS,CAACkB;AAC5B,CAAC;AAoBD,eAAejB,SAAS","ignoreList":[]}