@coorpacademy/components 11.35.2 → 11.35.3-forcedeploy10.7

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 (233) 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/icon/index.d.ts +35 -17
  5. package/es/atom/icon/index.d.ts.map +1 -1
  6. package/es/atom/icon/index.js +32 -15
  7. package/es/atom/icon/index.js.map +1 -1
  8. package/es/atom/radio-with-title/index.d.ts +13 -3
  9. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  10. package/es/atom/radio-with-title/types.d.ts +13 -2
  11. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  12. package/es/atom/status-item/index.native.js +2 -2
  13. package/es/atom/status-item/index.native.js.map +1 -1
  14. package/es/atom/tag/index.d.ts +12 -1
  15. package/es/atom/tag/style.css +1 -0
  16. package/es/atom/title/index.d.ts +13 -2
  17. package/es/molecule/banner/style.css +1 -0
  18. package/es/molecule/base-modal/style.css +0 -1
  19. package/es/molecule/bulk-progress-bar/index.js +2 -2
  20. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  21. package/es/molecule/certification-card/index.js +1 -1
  22. package/es/molecule/certification-card/index.js.map +1 -1
  23. package/es/molecule/cm-popin/types.d.ts +28 -7
  24. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  25. package/es/molecule/cm-popin/types.js +1 -1
  26. package/es/molecule/cm-popin/types.js.map +1 -1
  27. package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  28. package/es/molecule/dashboard/cards-list/index.js +2 -0
  29. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  30. package/es/molecule/icon-preview/index.d.ts +5 -2
  31. package/es/molecule/icon-preview/index.d.ts.map +1 -1
  32. package/es/molecule/icon-preview/index.js +15 -3
  33. package/es/molecule/icon-preview/index.js.map +1 -1
  34. package/es/molecule/icon-preview/style.css +4 -1
  35. package/es/molecule/learner-skill-card/index.js +10 -8
  36. package/es/molecule/learner-skill-card/index.js.map +1 -1
  37. package/es/molecule/learner-skill-card/style.css +1 -0
  38. package/es/molecule/learning-priority-modal/style.css +3 -2
  39. package/es/molecule/progress-wrapper/index.js +1 -1
  40. package/es/molecule/progress-wrapper/index.js.map +1 -1
  41. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  42. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  43. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
  44. package/es/molecule/title-radio-wrapper/index.d.ts +13 -3
  45. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  46. package/es/molecule/title-radio-wrapper/types.d.ts +13 -2
  47. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  48. package/es/organism/cards-grid/index.d.ts +48 -10
  49. package/es/organism/cards-grid/index.d.ts.map +1 -1
  50. package/es/organism/cards-grid/index.js +3 -2
  51. package/es/organism/cards-grid/index.js.map +1 -1
  52. package/es/organism/content-skill-modal/index.d.ts +13 -3
  53. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  54. package/es/organism/content-skill-modal/types.d.ts +12 -2
  55. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  56. package/es/organism/list-item/index.js +5 -5
  57. package/es/organism/list-item/index.js.map +1 -1
  58. package/es/organism/list-item/style.css +23 -17
  59. package/es/organism/list-items/index.d.ts +13 -2
  60. package/es/organism/rewards-form/index.d.ts +13 -2
  61. package/es/organism/select-opponents/index.d.ts +13 -3
  62. package/es/organism/select-opponents/index.d.ts.map +1 -1
  63. package/es/organism/select-opponents/types.d.ts +13 -2
  64. package/es/organism/select-opponents/types.d.ts.map +1 -1
  65. package/es/organism/sidebar/index.d.ts +2 -2
  66. package/es/organism/skill-edition/index.js +2 -2
  67. package/es/organism/skill-edition/index.js.map +1 -1
  68. package/es/organism/title-and-input/index.d.ts +25 -5
  69. package/es/organism/title-and-input/index.d.ts.map +1 -1
  70. package/es/organism/title-and-input/types.d.ts +24 -4
  71. package/es/organism/title-and-input/types.d.ts.map +1 -1
  72. package/es/organism/wizard-contents/index.d.ts +13 -2
  73. package/es/template/app-player/loading/index.d.ts +27 -6
  74. package/es/template/app-player/player/index.d.ts +53 -12
  75. package/es/template/app-player/player/slides/index.d.ts +27 -6
  76. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  77. package/es/template/app-player/popin-correction/index.d.ts +26 -6
  78. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  79. package/es/template/app-player/popin-end/index.d.ts +27 -6
  80. package/es/template/app-review/index.d.ts +27 -7
  81. package/es/template/app-review/index.d.ts.map +1 -1
  82. package/es/template/app-review/player/prop-types.d.ts +27 -6
  83. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  84. package/es/template/app-review/prop-types.d.ts +27 -6
  85. package/es/template/app-review/prop-types.d.ts.map +1 -1
  86. package/es/template/back-office/brand-update/index.d.ts +63 -12
  87. package/es/template/back-office/brand-update/utils.d.ts +1 -1
  88. package/es/template/back-office/brand-update/utils.js +1 -1
  89. package/es/template/back-office/brand-update/utils.js.map +1 -1
  90. package/es/template/common/dashboard/index.d.ts +53 -12
  91. package/es/template/common/search-page/index.d.ts +27 -6
  92. package/es/template/external-course/index.d.ts +27 -6
  93. package/es/template/my-learning/index.d.ts.map +1 -1
  94. package/es/template/my-learning/index.js +1 -1
  95. package/es/template/my-learning/index.js.map +1 -1
  96. package/es/template/skill-detail/all-courses.css +9 -10
  97. package/es/template/skill-detail/all-courses.d.ts +50 -47
  98. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  99. package/es/template/skill-detail/all-courses.js +14 -23
  100. package/es/template/skill-detail/all-courses.js.map +1 -1
  101. package/es/template/skill-detail/continue-learning.css +7 -2
  102. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  103. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  104. package/es/template/skill-detail/continue-learning.js.map +1 -1
  105. package/es/template/skill-detail/index.d.ts +89 -71
  106. package/es/template/skill-detail/index.d.ts.map +1 -1
  107. package/es/template/skill-detail/index.js +99 -55
  108. package/es/template/skill-detail/index.js.map +1 -1
  109. package/es/template/skill-detail/style.css +188 -36
  110. package/es/variables/colors.css +2 -0
  111. package/es/variables/colors.d.ts +4 -3
  112. package/es/variables/colors.d.ts.map +1 -1
  113. package/es/variables/colors.js +5 -4
  114. package/es/variables/colors.js.map +1 -1
  115. package/es/variables/theme.native.js +1 -1
  116. package/es/variables/theme.native.js.map +1 -1
  117. package/lib/atom/button-link/index.js +1 -1
  118. package/lib/atom/button-link/index.js.map +1 -1
  119. package/lib/atom/button-link/style.css +2 -2
  120. package/lib/atom/icon/index.d.ts +35 -17
  121. package/lib/atom/icon/index.d.ts.map +1 -1
  122. package/lib/atom/icon/index.js +34 -18
  123. package/lib/atom/icon/index.js.map +1 -1
  124. package/lib/atom/radio-with-title/index.d.ts +13 -3
  125. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  126. package/lib/atom/radio-with-title/types.d.ts +13 -2
  127. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  128. package/lib/atom/status-item/index.native.js +2 -2
  129. package/lib/atom/status-item/index.native.js.map +1 -1
  130. package/lib/atom/tag/index.d.ts +12 -1
  131. package/lib/atom/tag/style.css +1 -0
  132. package/lib/atom/title/index.d.ts +13 -2
  133. package/lib/molecule/banner/style.css +1 -0
  134. package/lib/molecule/base-modal/style.css +0 -1
  135. package/lib/molecule/bulk-progress-bar/index.js +2 -2
  136. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  137. package/lib/molecule/certification-card/index.js +1 -1
  138. package/lib/molecule/certification-card/index.js.map +1 -1
  139. package/lib/molecule/cm-popin/types.d.ts +28 -7
  140. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  141. package/lib/molecule/cm-popin/types.js +1 -1
  142. package/lib/molecule/cm-popin/types.js.map +1 -1
  143. package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  144. package/lib/molecule/dashboard/cards-list/index.js +2 -0
  145. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  146. package/lib/molecule/icon-preview/index.d.ts +5 -2
  147. package/lib/molecule/icon-preview/index.d.ts.map +1 -1
  148. package/lib/molecule/icon-preview/index.js +15 -3
  149. package/lib/molecule/icon-preview/index.js.map +1 -1
  150. package/lib/molecule/icon-preview/style.css +4 -1
  151. package/lib/molecule/learner-skill-card/index.js +10 -8
  152. package/lib/molecule/learner-skill-card/index.js.map +1 -1
  153. package/lib/molecule/learner-skill-card/style.css +1 -0
  154. package/lib/molecule/learning-priority-modal/style.css +3 -2
  155. package/lib/molecule/progress-wrapper/index.js +1 -1
  156. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  157. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  158. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  159. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
  160. package/lib/molecule/title-radio-wrapper/index.d.ts +13 -3
  161. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  162. package/lib/molecule/title-radio-wrapper/types.d.ts +13 -2
  163. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  164. package/lib/organism/cards-grid/index.d.ts +48 -10
  165. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  166. package/lib/organism/cards-grid/index.js +3 -2
  167. package/lib/organism/cards-grid/index.js.map +1 -1
  168. package/lib/organism/content-skill-modal/index.d.ts +13 -3
  169. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  170. package/lib/organism/content-skill-modal/types.d.ts +12 -2
  171. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  172. package/lib/organism/list-item/index.js +5 -5
  173. package/lib/organism/list-item/index.js.map +1 -1
  174. package/lib/organism/list-item/style.css +23 -17
  175. package/lib/organism/list-items/index.d.ts +13 -2
  176. package/lib/organism/rewards-form/index.d.ts +13 -2
  177. package/lib/organism/select-opponents/index.d.ts +13 -3
  178. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  179. package/lib/organism/select-opponents/types.d.ts +13 -2
  180. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  181. package/lib/organism/sidebar/index.d.ts +2 -2
  182. package/lib/organism/skill-edition/index.js +2 -2
  183. package/lib/organism/skill-edition/index.js.map +1 -1
  184. package/lib/organism/title-and-input/index.d.ts +25 -5
  185. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  186. package/lib/organism/title-and-input/types.d.ts +24 -4
  187. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  188. package/lib/organism/wizard-contents/index.d.ts +13 -2
  189. package/lib/template/app-player/loading/index.d.ts +27 -6
  190. package/lib/template/app-player/player/index.d.ts +53 -12
  191. package/lib/template/app-player/player/slides/index.d.ts +27 -6
  192. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  193. package/lib/template/app-player/popin-correction/index.d.ts +26 -6
  194. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  195. package/lib/template/app-player/popin-end/index.d.ts +27 -6
  196. package/lib/template/app-review/index.d.ts +27 -7
  197. package/lib/template/app-review/index.d.ts.map +1 -1
  198. package/lib/template/app-review/player/prop-types.d.ts +27 -6
  199. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  200. package/lib/template/app-review/prop-types.d.ts +27 -6
  201. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  202. package/lib/template/back-office/brand-update/index.d.ts +63 -12
  203. package/lib/template/back-office/brand-update/utils.d.ts +1 -1
  204. package/lib/template/back-office/brand-update/utils.js +1 -1
  205. package/lib/template/back-office/brand-update/utils.js.map +1 -1
  206. package/lib/template/common/dashboard/index.d.ts +53 -12
  207. package/lib/template/common/search-page/index.d.ts +27 -6
  208. package/lib/template/external-course/index.d.ts +27 -6
  209. package/lib/template/my-learning/index.d.ts.map +1 -1
  210. package/lib/template/my-learning/index.js +1 -1
  211. package/lib/template/my-learning/index.js.map +1 -1
  212. package/lib/template/skill-detail/all-courses.css +9 -10
  213. package/lib/template/skill-detail/all-courses.d.ts +50 -47
  214. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  215. package/lib/template/skill-detail/all-courses.js +13 -23
  216. package/lib/template/skill-detail/all-courses.js.map +1 -1
  217. package/lib/template/skill-detail/continue-learning.css +7 -2
  218. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  219. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  220. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  221. package/lib/template/skill-detail/index.d.ts +89 -71
  222. package/lib/template/skill-detail/index.d.ts.map +1 -1
  223. package/lib/template/skill-detail/index.js +99 -55
  224. package/lib/template/skill-detail/index.js.map +1 -1
  225. package/lib/template/skill-detail/style.css +188 -36
  226. package/lib/variables/colors.css +2 -0
  227. package/lib/variables/colors.d.ts +4 -3
  228. package/lib/variables/colors.d.ts.map +1 -1
  229. package/lib/variables/colors.js +5 -4
  230. package/lib/variables/colors.js.map +1 -1
  231. package/lib/variables/theme.native.js +1 -1
  232. package/lib/variables/theme.native.js.map +1 -1
  233. 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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EF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC1D,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,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>;\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,aAAa,QAAO,iBAAiB;AAE7C,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAEV,SAAS,CAACW,MAAM;EACzBC,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC,CAAC,OAAO,EAAE,aAAa,E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AC;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,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AAC;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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,sBAuGC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAwFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,sBAwGC;CACF"}
@@ -19,6 +19,7 @@ import Provider from '../../../atom/provider';
19
19
  import Card, { cardPropTypes } from '../../card';
20
20
  import LearningPriorityCard from '../../learning-priority-card';
21
21
  import Icon from '../../../atom/icon';
22
+ import { COLORS } from '../../../variables/colors';
22
23
  import style from './style.css';
23
24
  const ShowMoreLink = props => {
24
25
  const {
@@ -296,6 +297,7 @@ class CardsList extends React.PureComponent {
296
297
  color: dark,
297
298
  preset: 's',
298
299
  borderRadius: '8px',
300
+ backgroundColor: COLORS.neutral_75,
299
301
  ariaLabel: ariaLabel.showMoreOnLeftAriaLabel
300
302
  };
301
303
  const arrows = /*#__PURE__*/React.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","NovaSolidContentContentBook1","LearnerIcon","NovaCompositionCoorpacademyTimer","TimerIcon","Provider","Card","cardPropTypes","LearningPriorityCard","Icon","style","ShowMoreLink","props","onShowMore","showMore","className","createElement","onClick","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","func","string","IconView","context","contentType","ICONS","chapter","course","dark","_get","IconType","color","icon","computeWidth","card","type","nextPage","page","maxPages","CardsList","PureComponent","translate","constructor","state","actualPage","scrollLeft","offsetWidth","possiblePositions","possiblePages","cardsWidth","handleScroll_","_throttle","handleScroll","bind","handleOnLeft","handleOnRight","scrollTo","updateState","_debounce","updatePages","setCardsWrapper","getScrollWidth","handleResize","testingSizes","componentDidMount","cardsWrapper","addEventListener","window","componentDidUpdate","cards","newCardsWidth","_pipe","_map","_sum","updatePaginationState","setState","componentWillUnmount","removeEventListener","cancel","wrapperWidth","wrapperScrollLeft","cardWidths","_reduce","cardPositions","accWidth","cardWidth","_head","acc","pageIndex","accPageWidth","pageWidth","skip","_findIndex","position","_last","element","index","onScroll","leftBound","rightBound","leftIndex","rightIndex","_findLastIndex","limit","indexOfNextFirstCard","indexOf","nextPosition","render","title","customStyle","dataName","ariaLabel","_getOr","titleStyle","titleLink","cardsView","_toPairs","key","_extends","arrowIconProps","preset","borderRadius","showMoreOnLeftAriaLabel","arrows","arrowsWrapper","arrow","iconName","titleView","titleNode","hasPages","showMoreView","showMoreBar","switchPagesView","pagingWrapper","wrapper","list","header","ref","oneOfType","node","arrayOf","shape","objectOf","showMoreOnRightAriaLabel","oneOf","any"],"sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"sourcesContent":["import React from 'react';\nimport {\n debounce,\n throttle,\n get,\n getOr,\n map,\n sum,\n last,\n pipe,\n toPairs,\n reduce,\n head,\n findIndex,\n findLastIndex\n} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Card, {cardPropTypes} from '../../card';\nimport LearningPriorityCard from '../../learning-priority-card';\nimport Icon from '../../../atom/icon';\nimport style from './style.css';\n\nconst ShowMoreLink = props => {\n const {onShowMore, showMore, className} = props;\n return (\n <div className={className} onClick={onShowMore}>\n {showMore}\n </div>\n );\n};\n\nShowMoreLink.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nShowMoreLink.propTypes = {\n onShowMore: PropTypes.func,\n showMore: PropTypes.string,\n className: PropTypes.string\n};\n\nconst IconView = (props, context) => {\n const {skin} = context;\n const {contentType} = props;\n const ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon\n };\n\n if (!contentType) {\n return null;\n }\n\n const dark = get('common.dark', skin);\n const IconType = ICONS[contentType];\n\n return (\n <div>\n <IconType style={{color: dark}} className={style.icon} data-contenttype={contentType} />\n </div>\n );\n};\n\nconst computeWidth = card => {\n switch (card && card.type) {\n case 'chapter':\n return 219;\n default:\n return 272;\n }\n};\n\nconst nextPage = (page, maxPages) => {\n if (page < 0) return maxPages;\n if (page > maxPages) return 0;\n return page;\n};\n\nIconView.propTypes = {\n contentType: PropTypes.string\n};\n\nclass CardsList extends React.PureComponent {\n /**\n * IMPORTANT: update prop-types.ts too, 1st a migration of tests\n * is intended, then, a TS + functional refactor is planned.\n */\n static propTypes = {\n contentType: PropTypes.string,\n dataName: PropTypes.string,\n title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n showMore: PropTypes.string,\n cards: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(cardPropTypes),\n PropTypes.shape(LearningPriorityCard.propTypes)\n ])\n ),\n customStyle: PropTypes.objectOf(PropTypes.string),\n onScroll: PropTypes.func,\n onShowMore: PropTypes.func,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n }),\n type: PropTypes.oneOf(['cards', 'learningPrioritiesCards']),\n // eslint-disable-next-line react/forbid-prop-types\n testingSizes: PropTypes.any\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n actualPage: 0,\n maxPages: 0,\n scrollLeft: 0,\n offsetWidth: 0,\n possiblePositions: [],\n possiblePages: [],\n cardsWidth: 0\n };\n\n this.handleScroll_ = throttle(200, this.handleScroll.bind(this));\n this.handleScroll = this.handleScroll.bind(this);\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n this.updateState = debounce(200, this.updatePages.bind(this));\n this.updatePages = this.updatePages.bind(this);\n this.setCardsWrapper = this.setCardsWrapper.bind(this);\n this.getScrollWidth = this.getScrollWidth.bind(this);\n this.handleResize = this.handleResize.bind(this);\n\n // for testing purposes only - no other way to test this polluted component\n if (props.testingSizes) {\n const {offsetWidth, scrollLeft, maxPages, possiblePages, possiblePositions} =\n props.testingSizes;\n this.state.offsetWidth = offsetWidth;\n this.state.scrollLeft = scrollLeft;\n this.state.maxPages = maxPages;\n this.state.possiblePages = possiblePages;\n this.state.possiblePositions = possiblePositions;\n }\n }\n\n componentDidMount() {\n this.cardsWrapper.addEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.addEventListener('resize', this.handleResize);\n }\n }\n\n componentDidUpdate() {\n const {cards = []} = this.props;\n const {offsetWidth, cardsWidth} = this.state;\n const newCardsWidth = pipe(map(computeWidth), sum)(cards);\n\n if (newCardsWidth !== cardsWidth && offsetWidth !== 0) {\n this.updatePaginationState(cards);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n cardsWidth: newCardsWidth\n });\n }\n }\n\n componentWillUnmount() {\n this.cardsWrapper.removeEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.removeEventListener('resize', this.handleResize);\n }\n this.updateState.cancel();\n }\n\n /* istanbul ignore next */\n handleResize() {\n const {cards = []} = this.props;\n this.updatePaginationState(cards);\n }\n\n /* istanbul ignore next */\n updatePaginationState(cards) {\n const {offsetWidth: wrapperWidth, scrollLeft: wrapperScrollLeft} = this.state;\n\n const cardWidths = map(computeWidth)(cards);\n\n const possiblePositions = pipe(\n reduce(\n ([cardPositions, accWidth], cardWidth) => [\n [...cardPositions, accWidth],\n cardWidth + accWidth\n ],\n [[], 0]\n ),\n head\n )(cardWidths);\n\n const possiblePages = pipe(\n reduce(\n ([acc, pageIndex, accPageWidth], cardWidth) => {\n const pageWidth = accPageWidth + cardWidth;\n if (pageWidth > wrapperWidth) {\n return [[...acc, pageIndex + 1], pageIndex + 1, cardWidth];\n }\n return [[...acc, pageIndex], pageIndex, pageWidth];\n },\n [[], 0, 0]\n ),\n head\n )(cardWidths);\n\n const skip = findIndex(position => position >= wrapperScrollLeft, possiblePositions);\n const actualPage = possiblePages[skip + 1];\n\n this.setState({\n possiblePositions,\n possiblePages,\n maxPages: last(possiblePages),\n actualPage\n });\n }\n\n setCardsWrapper(element) {\n this.cardsWrapper = element;\n this.setState({\n scrollLeft: this.cardsWrapper?.scrollLeft,\n offsetWidth: this.cardsWrapper?.offsetWidth\n });\n }\n\n /* istanbul ignore next */\n getScrollWidth(index) {\n const {cards = []} = this.props;\n const card = cards[index];\n return computeWidth(card);\n }\n\n /* istanbul ignore next */\n handleScroll() {\n const scrollLeft = this.cardsWrapper?.scrollLeft;\n this.setState({scrollLeft});\n\n const {possiblePositions, offsetWidth} = this.state;\n const {onScroll} = this.props;\n if (onScroll) {\n const leftBound = scrollLeft;\n const rightBound = scrollLeft + offsetWidth;\n\n const leftIndex = findIndex(position => position > leftBound, possiblePositions) - 1;\n const rightIndex = findLastIndex(position => position < rightBound, possiblePositions);\n const skip = leftIndex;\n const limit = rightIndex - skip + 1;\n\n onScroll(skip, limit);\n }\n }\n\n handleOnLeft() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage - 1, maxPages));\n }\n\n handleOnRight() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage + 1, maxPages));\n }\n\n scrollTo(page) {\n const {possiblePages, possiblePositions} = this.state;\n const indexOfNextFirstCard = possiblePages.indexOf(page);\n const nextPosition = possiblePositions[indexOfNextFirstCard];\n this.cardsWrapper.scrollLeft = nextPosition;\n this.updatePages(page);\n this.setState({\n scrollLeft: nextPosition\n });\n }\n\n updatePages(actualPage) {\n this.setState({\n actualPage\n });\n }\n\n render() {\n const {\n title,\n showMore,\n cards,\n customStyle = {},\n onShowMore,\n dataName,\n contentType,\n 'arrows-aria-label': ariaLabel = {},\n type\n } = this.props;\n const {skin} = this.context;\n const {maxPages} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const titleStyle = onShowMore ? style.titleLink : style.title;\n const cardsView = pipe(\n toPairs,\n map(([key, card]) => {\n return (\n <div className={style.card} key={key}>\n {card && type === 'learningPrioritiesCards' ? (\n <LearningPriorityCard {...card} dataName={`${dataName}-${key}`} />\n ) : (\n <Card {...card} dataName={`${dataName}-${key}`} />\n )}\n </div>\n );\n })\n )(cards);\n\n const arrowIconProps = {\n color: dark,\n preset: 's',\n borderRadius: '8px',\n ariaLabel: ariaLabel.showMoreOnLeftAriaLabel\n };\n\n const arrows = (\n <div className={style.arrowsWrapper}>\n <div className={style.arrow} onClick={this.handleOnLeft} data-name=\"card-list-left-arrow\">\n <Icon {...arrowIconProps} iconName=\"arrow-left\" />\n </div>\n <div className={style.arrow} onClick={this.handleOnRight} data-name=\"card-list-right-arrow\">\n <Icon {...arrowIconProps} iconName=\"arrow-right\" />\n </div>\n </div>\n );\n\n const titleView =\n typeof title === 'string' ? (\n <span data-name=\"title\" className={titleStyle} onClick={onShowMore}>\n <IconView contentType={contentType} />\n <span>{title}</span>\n </span>\n ) : (\n <span className={style.titleNode}>{title}</span>\n );\n\n const hasPages = maxPages > 0;\n const showMoreView =\n hasPages && showMore && onShowMore ? (\n <ShowMoreLink\n className={hasPages ? style.showMoreBar : style.showMore}\n onShowMore={onShowMore}\n showMore={showMore}\n />\n ) : null;\n\n const switchPagesView = hasPages ? (\n <div className={style.pagingWrapper}>\n {showMoreView}\n {arrows}\n </div>\n ) : null;\n\n return (\n <div\n className={style.wrapper}\n style={customStyle}\n data-name=\"cardsList\"\n data-max-pages={`${maxPages}`}\n // eslint-disable-next-line react/destructuring-assignment\n data-actual-page={`${this.state.actualPage}`}\n data-scroll-left={this.cardsWrapper?.scrollLeft}\n >\n <div className={style.list}>\n <div>\n <div data-name=\"header\" className={style.header}>\n {titleView}\n {switchPagesView}\n </div>\n <div\n className={style.cards}\n data-testid=\"cards-view-wrapper\"\n ref={this.setCardsWrapper}\n >\n {cardsView}\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default CardsList;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAgBzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SACEC,4BAA4B,IAAIC,WAAW,EAC3CC,gCAAgC,IAAIC,SAAS,QACxC,0BAA0B;AACjC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,I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O,EAAE,yBAAyB,CAAC,CAAC;EAC3D;EACAjF,YAAY,EAAEpE,SAAS,CAACsJ;AAC1B,CAAC;AAkSH,eAAe1G,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","NovaSolidContentContentBook1","LearnerIcon","NovaCompositionCoorpacademyTimer","TimerIcon","Provider","Card","cardPropTypes","LearningPriorityCard","Icon","COLORS","style","ShowMoreLink","props","onShowMore","showMore","className","createElement","onClick","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","func","string","IconView","context","contentType","ICONS","chapter","course","dark","_get","IconType","color","icon","computeWidth","card","type","nextPage","page","maxPages","CardsList","PureComponent","translate","constructor","state","actualPage","scrollLeft","offsetWidth","possiblePositions","possiblePages","cardsWidth","handleScroll_","_throttle","handleScroll","bind","handleOnLeft","handleOnRight","scrollTo","updateState","_debounce","updatePages","setCardsWrapper","getScrollWidth","handleResize","testingSizes","componentDidMount","cardsWrapper","addEventListener","window","componentDidUpdate","cards","newCardsWidth","_pipe","_map","_sum","updatePaginationState","setState","componentWillUnmount","removeEventListener","cancel","wrapperWidth","wrapperScrollLeft","cardWidths","_reduce","cardPositions","accWidth","cardWidth","_head","acc","pageIndex","accPageWidth","pageWidth","skip","_findIndex","position","_last","element","index","onScroll","leftBound","rightBound","leftIndex","rightIndex","_findLastIndex","limit","indexOfNextFirstCard","indexOf","nextPosition","render","title","customStyle","dataName","ariaLabel","_getOr","titleStyle","titleLink","cardsView","_toPairs","key","_extends","arrowIconProps","preset","borderRadius","backgroundColor","neutral_75","showMoreOnLeftAriaLabel","arrows","arrowsWrapper","arrow","iconName","titleView","titleNode","hasPages","showMoreView","showMoreBar","switchPagesView","pagingWrapper","wrapper","list","header","ref","oneOfType","node","arrayOf","shape","objectOf","showMoreOnRightAriaLabel","oneOf","any"],"sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"sourcesContent":["import React from 'react';\nimport {\n debounce,\n throttle,\n get,\n getOr,\n map,\n sum,\n last,\n pipe,\n toPairs,\n reduce,\n head,\n findIndex,\n findLastIndex\n} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Card, {cardPropTypes} from '../../card';\nimport LearningPriorityCard from '../../learning-priority-card';\nimport Icon from '../../../atom/icon';\nimport {COLORS} from '../../../variables/colors';\nimport style from './style.css';\n\nconst ShowMoreLink = props => {\n const {onShowMore, showMore, className} = props;\n return (\n <div className={className} onClick={onShowMore}>\n {showMore}\n </div>\n );\n};\n\nShowMoreLink.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nShowMoreLink.propTypes = {\n onShowMore: PropTypes.func,\n showMore: PropTypes.string,\n className: PropTypes.string\n};\n\nconst IconView = (props, context) => {\n const {skin} = context;\n const {contentType} = props;\n const ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon\n };\n\n if (!contentType) {\n return null;\n }\n\n const dark = get('common.dark', skin);\n const IconType = ICONS[contentType];\n\n return (\n <div>\n <IconType style={{color: dark}} className={style.icon} data-contenttype={contentType} />\n </div>\n );\n};\n\nconst computeWidth = card => {\n switch (card && card.type) {\n case 'chapter':\n return 219;\n default:\n return 272;\n }\n};\n\nconst nextPage = (page, maxPages) => {\n if (page < 0) return maxPages;\n if (page > maxPages) return 0;\n return page;\n};\n\nIconView.propTypes = {\n contentType: PropTypes.string\n};\n\nclass CardsList extends React.PureComponent {\n /**\n * IMPORTANT: update prop-types.ts too, 1st a migration of tests\n * is intended, then, a TS + functional refactor is planned.\n */\n static propTypes = {\n contentType: PropTypes.string,\n dataName: PropTypes.string,\n title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n showMore: PropTypes.string,\n cards: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(cardPropTypes),\n PropTypes.shape(LearningPriorityCard.propTypes)\n ])\n ),\n customStyle: PropTypes.objectOf(PropTypes.string),\n onScroll: PropTypes.func,\n onShowMore: PropTypes.func,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n }),\n type: PropTypes.oneOf(['cards', 'learningPrioritiesCards']),\n // eslint-disable-next-line react/forbid-prop-types\n testingSizes: PropTypes.any\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n actualPage: 0,\n maxPages: 0,\n scrollLeft: 0,\n offsetWidth: 0,\n possiblePositions: [],\n possiblePages: [],\n cardsWidth: 0\n };\n\n this.handleScroll_ = throttle(200, this.handleScroll.bind(this));\n this.handleScroll = this.handleScroll.bind(this);\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n this.updateState = debounce(200, this.updatePages.bind(this));\n this.updatePages = this.updatePages.bind(this);\n this.setCardsWrapper = this.setCardsWrapper.bind(this);\n this.getScrollWidth = this.getScrollWidth.bind(this);\n this.handleResize = this.handleResize.bind(this);\n\n // for testing purposes only - no other way to test this polluted component\n if (props.testingSizes) {\n const {offsetWidth, scrollLeft, maxPages, possiblePages, possiblePositions} =\n props.testingSizes;\n this.state.offsetWidth = offsetWidth;\n this.state.scrollLeft = scrollLeft;\n this.state.maxPages = maxPages;\n this.state.possiblePages = possiblePages;\n this.state.possiblePositions = possiblePositions;\n }\n }\n\n componentDidMount() {\n this.cardsWrapper.addEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.addEventListener('resize', this.handleResize);\n }\n }\n\n componentDidUpdate() {\n const {cards = []} = this.props;\n const {offsetWidth, cardsWidth} = this.state;\n const newCardsWidth = pipe(map(computeWidth), sum)(cards);\n\n if (newCardsWidth !== cardsWidth && offsetWidth !== 0) {\n this.updatePaginationState(cards);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n cardsWidth: newCardsWidth\n });\n }\n }\n\n componentWillUnmount() {\n this.cardsWrapper.removeEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.removeEventListener('resize', this.handleResize);\n }\n this.updateState.cancel();\n }\n\n /* istanbul ignore next */\n handleResize() {\n const {cards = []} = this.props;\n this.updatePaginationState(cards);\n }\n\n /* istanbul ignore next */\n updatePaginationState(cards) {\n const {offsetWidth: wrapperWidth, scrollLeft: wrapperScrollLeft} = this.state;\n\n const cardWidths = map(computeWidth)(cards);\n\n const possiblePositions = pipe(\n reduce(\n ([cardPositions, accWidth], cardWidth) => [\n [...cardPositions, accWidth],\n cardWidth + accWidth\n ],\n [[], 0]\n ),\n head\n )(cardWidths);\n\n const possiblePages = pipe(\n reduce(\n ([acc, pageIndex, accPageWidth], cardWidth) => {\n const pageWidth = accPageWidth + cardWidth;\n if (pageWidth > wrapperWidth) {\n return [[...acc, pageIndex + 1], pageIndex + 1, cardWidth];\n }\n return [[...acc, pageIndex], pageIndex, pageWidth];\n },\n [[], 0, 0]\n ),\n head\n )(cardWidths);\n\n const skip = findIndex(position => position >= wrapperScrollLeft, possiblePositions);\n const actualPage = possiblePages[skip + 1];\n\n this.setState({\n possiblePositions,\n possiblePages,\n maxPages: last(possiblePages),\n actualPage\n });\n }\n\n setCardsWrapper(element) {\n this.cardsWrapper = element;\n this.setState({\n scrollLeft: this.cardsWrapper?.scrollLeft,\n offsetWidth: this.cardsWrapper?.offsetWidth\n });\n }\n\n /* istanbul ignore next */\n getScrollWidth(index) {\n const {cards = []} = this.props;\n const card = cards[index];\n return computeWidth(card);\n }\n\n /* istanbul ignore next */\n handleScroll() {\n const scrollLeft = this.cardsWrapper?.scrollLeft;\n this.setState({scrollLeft});\n\n const {possiblePositions, offsetWidth} = this.state;\n const {onScroll} = this.props;\n if (onScroll) {\n const leftBound = scrollLeft;\n const rightBound = scrollLeft + offsetWidth;\n\n const leftIndex = findIndex(position => position > leftBound, possiblePositions) - 1;\n const rightIndex = findLastIndex(position => position < rightBound, possiblePositions);\n const skip = leftIndex;\n const limit = rightIndex - skip + 1;\n\n onScroll(skip, limit);\n }\n }\n\n handleOnLeft() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage - 1, maxPages));\n }\n\n handleOnRight() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage + 1, maxPages));\n }\n\n scrollTo(page) {\n const {possiblePages, possiblePositions} = this.state;\n const indexOfNextFirstCard = possiblePages.indexOf(page);\n const nextPosition = possiblePositions[indexOfNextFirstCard];\n this.cardsWrapper.scrollLeft = nextPosition;\n this.updatePages(page);\n this.setState({\n scrollLeft: nextPosition\n });\n }\n\n updatePages(actualPage) {\n this.setState({\n actualPage\n });\n }\n\n render() {\n const {\n title,\n showMore,\n cards,\n customStyle = {},\n onShowMore,\n dataName,\n contentType,\n 'arrows-aria-label': ariaLabel = {},\n type\n } = this.props;\n const {skin} = this.context;\n const {maxPages} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const titleStyle = onShowMore ? style.titleLink : style.title;\n const cardsView = pipe(\n toPairs,\n map(([key, card]) => {\n return (\n <div className={style.card} key={key}>\n {card && type === 'learningPrioritiesCards' ? (\n <LearningPriorityCard {...card} dataName={`${dataName}-${key}`} />\n ) : (\n <Card {...card} dataName={`${dataName}-${key}`} />\n )}\n </div>\n );\n })\n )(cards);\n\n const arrowIconProps = {\n color: dark,\n preset: 's',\n borderRadius: '8px',\n backgroundColor: COLORS.neutral_75,\n ariaLabel: ariaLabel.showMoreOnLeftAriaLabel\n };\n\n const arrows = (\n <div className={style.arrowsWrapper}>\n <div className={style.arrow} onClick={this.handleOnLeft} data-name=\"card-list-left-arrow\">\n <Icon {...arrowIconProps} iconName=\"arrow-left\" />\n </div>\n <div className={style.arrow} onClick={this.handleOnRight} data-name=\"card-list-right-arrow\">\n <Icon {...arrowIconProps} iconName=\"arrow-right\" />\n </div>\n </div>\n );\n\n const titleView =\n typeof title === 'string' ? (\n <span data-name=\"title\" className={titleStyle} onClick={onShowMore}>\n <IconView contentType={contentType} />\n <span>{title}</span>\n </span>\n ) : (\n <span className={style.titleNode}>{title}</span>\n );\n\n const hasPages = maxPages > 0;\n const showMoreView =\n hasPages && showMore && onShowMore ? (\n <ShowMoreLink\n className={hasPages ? style.showMoreBar : style.showMore}\n onShowMore={onShowMore}\n showMore={showMore}\n />\n ) : null;\n\n const switchPagesView = hasPages ? (\n <div className={style.pagingWrapper}>\n {showMoreView}\n {arrows}\n </div>\n ) : null;\n\n return (\n <div\n className={style.wrapper}\n style={customStyle}\n data-name=\"cardsList\"\n data-max-pages={`${maxPages}`}\n // eslint-disable-next-line react/destructuring-assignment\n data-actual-page={`${this.state.actualPage}`}\n data-scroll-left={this.cardsWrapper?.scrollLeft}\n >\n <div className={style.list}>\n <div>\n <div data-name=\"header\" className={style.header}>\n {titleView}\n {switchPagesView}\n </div>\n <div\n className={style.cards}\n data-testid=\"cards-view-wrapper\"\n ref={this.setCardsWrapper}\n >\n {cardsView}\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default CardsList;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAgBzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SACEC,4BAA4B,IAAIC,WAAW,EAC3CC,gCAAgC,IAAIC,SAAS,QACxC,0BAA0B;AACjC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,IAAI,IAAGC,aAAa,QAAO,YAAY;AAC9C,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,IAAI,MAAM,oBAAoB;AACrC,SAAQC,MAAM,QAAO,2BAA2B;AAChD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,UAAU;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGH,KAAK;EAC/C,oBACEd,KAAA,CAAAkB,aAAA;IAAKD,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GAAG,EAAE,IAAI,CAAC/E;IAAgB,GAEzBuD,SACE,CACF,CACF,CACF,CAAC;EAEV;AACF;AA3TM5E,SAAS,CAKNvB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACjBK,WAAW,EAAE9B,SAAS,CAAC2B,MAAM;EAC7ByF,QAAQ,EAAEpH,SAAS,CAAC2B,MAAM;EAC1BuF,KAAK,EAAElH,SAAS,CAACkJ,SAAS,CAAC,CAAClJ,SAAS,CAACmJ,IAAI,EAAEnJ,SAAS,CAAC2B,MAAM,CAAC,CAAC;EAC9DZ,QAAQ,EAAEf,SAAS,CAAC2B,MAAM;EAC1BgD,KAAK,EAAE3E,SAAS,CAACoJ,OAAO,CACtBpJ,SAAS,CAACkJ,SAAS,CAAC,CAClBlJ,SAAS,CAACqJ,KAAK,CAAC9I,aAAa,CAAC,EAC9BP,SAAS,CAACqJ,KAAK,CAAC7I,oBAAoB,CAACc,SAAS,CAAC,CAChD,CACH,CAAC;EACD6F,WAAW,EAAEnH,SAAS,CAACsJ,QAAQ,CAACtJ,SAAS,CAAC2B,MAAM,CAAC;EACjD4E,QAAQ,EAAEvG,SAAS,CAAC0B,IAAI;EACxBZ,UAAU,EAAEd,SAAS,CAAC0B,IAAI;EAC1B,mBAAmB,EAAE1B,SAAS,CAACqJ,KAAK,CAAC;IACnCnB,uBAAuB,EAAElI,SAAS,CAAC2B,MAAM;IACzC4H,wBAAwB,EAAEvJ,SAAS,CAAC2B;EACtC,CAAC,CAAC;EACFc,IAAI,EAAEzC,SAAS,CAACwJ,KAAK,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;EAC3D;EACAnF,YAAY,EAAErE,SAAS,CAACyJ;AAC1B,CAAC;AAmSH,eAAe5G,SAAS","ignoreList":[]}
@@ -1,7 +1,10 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IconPreviewProps } from './types';
3
+ declare type IconPreviewCustomProps = IconPreviewProps & {
4
+ customStyle?: React.CSSProperties;
5
+ };
3
6
  declare const IconPreview: {
4
- (props: IconPreviewProps): JSX.Element;
7
+ (props: IconPreviewCustomProps): JSX.Element;
5
8
  propTypes: {
6
9
  title: import("prop-types").Requireable<string>;
7
10
  icon: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAGpD,QAAA,MAAM,WAAW;YAAW,gBAAgB;;;;;;;;CAyB3C,CAAC;AAIF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAkB,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAIpD,aAAK,sBAAsB,GAAG,gBAAgB,GAAG;IAC/C,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,WAAW;YAAW,sBAAsB;;;;;;;;CAsCjD,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -3,18 +3,29 @@ import FaIcon from '../../atom/icon';
3
3
  import { createGradientBackground } from '../../util/get-background-gradient-color';
4
4
  import propTypes from './types';
5
5
  import style from './style.css';
6
+ const DEFAULT_GAP = '32px';
6
7
  const IconPreview = props => {
7
8
  const {
8
9
  icon,
9
- title
10
+ title,
11
+ customStyle = {}
10
12
  } = props;
13
+
14
+ // explicit disable to override only if customStyle is provided otherwise merged in style.
15
+ // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
16
+ const mergedStyle = {
17
+ gap: DEFAULT_GAP,
18
+ padding: '72px 48px 64px 48px',
19
+ ...customStyle
20
+ };
11
21
  return /*#__PURE__*/React.createElement("div", {
12
22
  className: style.iconPreviewWrapper,
13
23
  style: {
14
24
  background: createGradientBackground(icon.color, '93%', '100%')
15
25
  }
16
26
  }, /*#__PURE__*/React.createElement("div", {
17
- className: style.iconPreview
27
+ className: style.iconPreview,
28
+ style: mergedStyle
18
29
  }, /*#__PURE__*/React.createElement("div", {
19
30
  className: style.iconWrapper
20
31
  }, /*#__PURE__*/React.createElement(FaIcon, {
@@ -26,7 +37,8 @@ const IconPreview = props => {
26
37
  },
27
38
  gradientBackground: true
28
39
  })), /*#__PURE__*/React.createElement("div", {
29
- className: style.titleWrapper
40
+ className: style.titleWrapper,
41
+ title: title
30
42
  }, title)));
31
43
  };
32
44
  IconPreview.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","FaIcon","createGradientBackground","propTypes","style","IconPreview","props","icon","title","createElement","className","iconPreviewWrapper","background","color","iconPreview","iconWrapper","iconName","name","iconColor","size","faSize","wrapperSize","gradientBackground","titleWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/icon-preview/index.tsx"],"sourcesContent":["import React from 'react';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport propTypes, {IconPreviewProps} from './types';\nimport style from './style.css';\n\nconst IconPreview = (props: IconPreviewProps) => {\n const {icon, title} = props;\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{background: createGradientBackground(icon.color, '93%', '100%')}}\n >\n <div className={style.iconPreview}>\n <div className={style.iconWrapper}>\n <FaIcon\n {...{\n iconName: icon.name,\n iconColor: icon.color,\n size: {\n faSize: 36,\n wrapperSize: 80\n },\n gradientBackground: true\n }}\n />\n </div>\n <div className={style.titleWrapper}>{title}</div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = propTypes;\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,SAAS,MAA0B,SAAS;AACnD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,MAAM;IAACC,IAAI;IAAEC;EAAK,CAAC,GAAGF,KAAK;EAC3B,oBACEN,KAAA,CAAAS,aAAA;IACEC,SAAS,EAAEN,KAAK,CAACO,kBAAmB;IACpCP,KAAK,EAAE;MAACQ,UAAU,EAAEV,wBAAwB,CAACK,IAAI,CAACM,KAAK,EAAE,KAAK,EAAE,MAAM;IAAC;EAAE,gBAEzEb,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACU;EAAY,gBAChCd,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACW;EAAY,gBAChCf,KAAA,CAAAS,aAAA,CAACR,MAAM;IAEHe,QAAQ,EAAET,IAAI,CAACU,IAAI;IACnBC,SAAS,EAAEX,IAAI,CAACM,KAAK;IACrBM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf,CAAC;IACDC,kBAAkB,EAAE;EAAI,CAE3B,CACE,CAAC,eACNtB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACmB;EAAa,GAAEf,KAAW,CAC7C,CACF,CAAC;AAEV,CAAC;AAEDH,WAAW,CAACF,SAAS,GAAAqB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGvB,SAAS;AAEjC,eAAeE,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","FaIcon","createGradientBackground","propTypes","style","DEFAULT_GAP","IconPreview","props","icon","title","customStyle","mergedStyle","gap","padding","createElement","className","iconPreviewWrapper","background","color","iconPreview","iconWrapper","iconName","name","iconColor","size","faSize","wrapperSize","gradientBackground","titleWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/icon-preview/index.tsx"],"sourcesContent":["import React from 'react';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport propTypes, {IconPreviewProps} from './types';\nimport style from './style.css';\n\nconst DEFAULT_GAP = '32px';\ntype IconPreviewCustomProps = IconPreviewProps & {\n customStyle?: React.CSSProperties;\n};\n\nconst IconPreview = (props: IconPreviewCustomProps) => {\n const {icon, title, customStyle = {}} = props;\n\n // explicit disable to override only if customStyle is provided otherwise merged in style.\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n const mergedStyle = {\n gap: DEFAULT_GAP,\n padding: '72px 48px 64px 48px',\n ...customStyle\n };\n\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{\n background: createGradientBackground(icon.color, '93%', '100%')\n }}\n >\n <div className={style.iconPreview} style={mergedStyle}>\n <div className={style.iconWrapper}>\n <FaIcon\n {...{\n iconName: icon.name,\n iconColor: icon.color,\n size: {\n faSize: 36,\n wrapperSize: 80\n },\n gradientBackground: true\n }}\n />\n </div>\n <div className={style.titleWrapper} title={title}>\n {title}\n </div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = propTypes;\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,SAAS,MAA0B,SAAS;AACnD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAG,MAAM;AAK1B,MAAMC,WAAW,GAAIC,KAA6B,IAAK;EACrD,MAAM;IAACC,IAAI;IAAEC,KAAK;IAAEC,WAAW,GAAG,CAAC;EAAC,CAAC,GAAGH,KAAK;;EAE7C;EACA;EACA,MAAMI,WAAW,GAAG;IAClBC,GAAG,EAAEP,WAAW;IAChBQ,OAAO,EAAE,qBAAqB;IAC9B,GAAGH;EACL,CAAC;EAED,oBACEV,KAAA,CAAAc,aAAA;IACEC,SAAS,EAAEX,KAAK,CAACY,kBAAmB;IACpCZ,KAAK,EAAE;MACLa,UAAU,EAAEf,wBAAwB,CAACM,IAAI,CAACU,KAAK,EAAE,KAAK,EAAE,MAAM;IAChE;EAAE,gBAEFlB,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAACe,WAAY;IAACf,KAAK,EAAEO;EAAY,gBACpDX,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAACgB;EAAY,gBAChCpB,KAAA,CAAAc,aAAA,CAACb,MAAM;IAEHoB,QAAQ,EAAEb,IAAI,CAACc,IAAI;IACnBC,SAAS,EAAEf,IAAI,CAACU,KAAK;IACrBM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf,CAAC;IACDC,kBAAkB,EAAE;EAAI,CAE3B,CACE,CAAC,eACN3B,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAACwB,YAAa;IAACnB,KAAK,EAAEA;EAAM,GAC9CA,KACE,CACF,CACF,CAAC;AAEV,CAAC;AAEDH,WAAW,CAACH,SAAS,GAAA0B,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG5B,SAAS;AAEjC,eAAeG,WAAW","ignoreList":[]}
@@ -7,7 +7,6 @@
7
7
 
8
8
  .iconPreview {
9
9
  display: flex;
10
- padding: 72px 48px 64px 48px;
11
10
  flex-direction: column;
12
11
  text-align: center;
13
12
  align-items: center;
@@ -27,4 +26,8 @@
27
26
  font-style: normal;
28
27
  font-weight: 700;
29
28
  line-height: 32px;
29
+ display: -webkit-box;
30
+ -webkit-line-clamp: 2;
31
+ -webkit-box-orient: vertical;
32
+ overflow: hidden;
30
33
  }
@@ -34,7 +34,7 @@ const LearnerSkillCard = (props, context) => {
34
34
  name
35
35
  } = icon;
36
36
  const questionsLocale = translate('skill_chart_side_panel_questions_to_review');
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];
37
+ const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus ? ['bullseye-arrow', translate('skill_focus'), COLORS.purple_700, COLORS.purple_100] : ['shapes', translate('skill'), COLORS.neutral_500, COLORS.cm_grey_100];
38
38
  const headerBackgroundRef = useRef(null);
39
39
  const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);
40
40
  const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);
@@ -91,7 +91,11 @@ const LearnerSkillCard = (props, context) => {
91
91
  faSize: 10,
92
92
  wrapperSize: 16
93
93
  }
94
- }), badgeLocale), /*#__PURE__*/React.createElement("div", {
94
+ }), /*#__PURE__*/React.createElement("span", {
95
+ style: {
96
+ color: tagTextColor
97
+ }
98
+ }, badgeLocale)), /*#__PURE__*/React.createElement("div", {
95
99
  className: style.questionWrapper
96
100
  }, /*#__PURE__*/React.createElement("div", {
97
101
  "data-name": "skill-card-title",
@@ -107,12 +111,10 @@ const LearnerSkillCard = (props, context) => {
107
111
  }, /*#__PURE__*/React.createElement(FaIcon, {
108
112
  iconName: 'circle',
109
113
  iconColor: COLORS.cm_grey_400,
114
+ backgroundColor: 'transparent',
110
115
  size: {
111
- faSize: 4
112
- },
113
- customStyle: {
114
- padding: 0,
115
- height: 'auto'
116
+ faSize: 4,
117
+ wrapperSize: 0
116
118
  }
117
119
  }), /*#__PURE__*/React.createElement("span", {
118
120
  "data-name": "learner-skill-card-questions-to-review"
@@ -124,7 +126,7 @@ const LearnerSkillCard = (props, context) => {
124
126
  max: MAX_SCORE,
125
127
  className: style.progressWrapper,
126
128
  style: {
127
- backgroundColor: COLORS.positive
129
+ backgroundColor: COLORS.cm_positive_500
128
130
  }
129
131
  })));
130
132
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useRef","Provider","GetTranslateFromContext","ProgressBar","COLORS","createGradientBackground","FaIcon","propTypes","style","MAX_SCORE","updateBackgroundImage","ref","background","current","backgroundImage","LearnerSkillCard","props","context","ariaLabel","cardIndex","skillTitle","skillAriaLabel","focus","metrics","icon","onExploreClick","score","content","questionsToReview","translate","color","name","questionsLocale","badgeIconName","badgeLocale","tagTextColor","tagBackgroundColor","purple_700","purple_100","cm_grey_500","gray","headerBackgroundRef","defaultBackground","focusBackground","handleMouseEnter","handleMouseLeave","createElement","onClick","className","learnerSkillCardContainer","onMouseEnter","onMouseLeave","iconHeaderWrapper","iconWrapper","iconName","iconColor","size","faSize","wrapperSize","borderRadius","gradientBackground","customStyle","border","learnerSkillCardContent","skillTitleWrapper","skillFocusBadge","backgroundColor","questionWrapper","contentAndQuestionsWrapper","skillInformation","cm_grey_400","padding","height","progressInformations","value","displayInfo","max","progressWrapper","positive","contextTypes","childContextTypes","process","env","NODE_ENV"],"sources":["../../../src/molecule/learner-skill-card/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useRef} from 'react';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport FaIcon from '../../atom/icon';\nimport propTypes, {LearnerSkillCardProps} from './prop-types';\nimport style from './style.css';\n\nconst MAX_SCORE = 100;\n\nexport const updateBackgroundImage = (ref: React.RefObject<HTMLDivElement>, background: string) => {\n if (ref.current) {\n ref.current.style.backgroundImage = background;\n }\n};\n\nconst LearnerSkillCard = (props: LearnerSkillCardProps, context: WebContextValues) => {\n const {\n 'aria-label': ariaLabel,\n cardIndex,\n skillTitle,\n skillAriaLabel,\n focus,\n metrics,\n icon,\n onExploreClick\n } = props;\n const {score, content, questionsToReview = 0} = metrics;\n const translate = GetTranslateFromContext(context);\n const {color, name} = icon;\n const questionsLocale = translate('skill_chart_side_panel_questions_to_review') as string;\n const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus\n ? ['bullseye-arrow', translate('skill_focus') as string, COLORS.purple_700, COLORS.purple_100]\n : ['shapes', translate('skill') as string, COLORS.cm_grey_500, COLORS.gray];\n const headerBackgroundRef = useRef<HTMLDivElement | null>(null);\n const defaultBackground = useMemo(() => createGradientBackground(color, '93%', '100%'), [color]);\n const focusBackground = useMemo(() => createGradientBackground(color, '83%', '100%'), [color]);\n const handleMouseEnter = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, focusBackground);\n }, [focusBackground]);\n const handleMouseLeave = useCallback(() => {\n updateBackgroundImage(headerBackgroundRef, defaultBackground);\n }, [defaultBackground]);\n return (\n <div\n data-testid={`learner-skill-card-wrapper-${cardIndex}`}\n onClick={onExploreClick}\n className={style.learnerSkillCardContainer}\n aria-label={ariaLabel}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div\n data-testid=\"learner-skill-card-icon-header-wrapper\"\n ref={headerBackgroundRef}\n className={style.iconHeaderWrapper}\n style={{backgroundImage: defaultBackground, color: tagTextColor}}\n >\n <div className={style.iconWrapper} data-testid=\"learner-skill-card-icon-wrapper\">\n <FaIcon\n {...{\n iconName: name,\n iconColor: color,\n size: {\n faSize: 20,\n wrapperSize: 44\n },\n borderRadius: '12px',\n gradientBackground: true,\n customStyle: {border: '4px solid white'}\n }}\n />\n </div>\n </div>\n <div className={style.learnerSkillCardContent}>\n <div className={style.skillTitleWrapper}>\n <div\n className={style.skillFocusBadge}\n style={{\n backgroundColor: tagBackgroundColor,\n color: tagTextColor\n }}\n >\n <FaIcon\n {...{\n iconName: badgeIconName,\n backgroundColor: tagBackgroundColor,\n size: {\n faSize: 10,\n wrapperSize: 16\n }\n }}\n />\n {badgeLocale}\n </div>\n\n <div className={style.questionWrapper}>\n <div\n data-name=\"skill-card-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n <div className={style.contentAndQuestionsWrapper}>\n <div data-name=\"learner-skill-card-skill-content-number\">\n {content} {translate('content')}\n </div>\n {questionsToReview ? (\n <div\n className={style.skillInformation}\n data-name=\"learner-skill-card-skill-questions-wrapper\"\n >\n <FaIcon\n {...{\n iconName: 'circle',\n iconColor: COLORS.cm_grey_400,\n size: {faSize: 4},\n customStyle: {padding: 0, height: 'auto'}\n }}\n />\n <span data-name=\"learner-skill-card-questions-to-review\">\n {questionsToReview}\n </span>\n &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.positive}}\n />\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = propTypes;\n\nexport default LearnerSkillCard;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,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,CA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CACE,CACF,CAAC;AAEV,CAAC;AAED/D,gBAAgB,CAACgE,YAAY,GAAG;EAC9BlD,SAAS,EAAE5B,QAAQ,CAAC+E,iBAAiB,CAACnD;AACxC,CAAC;AAEDd,gBAAgB,CAACR,SAAS,GAAA0E,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG5E,SAAS;AAEtC,eAAeQ,gBAAgB","ignoreList":[]}
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","neutral_500","cm_grey_100","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.neutral_500, COLORS.cm_grey_100];\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 <span style={{color: tagTextColor}}>{badgeLocale}</span>\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 backgroundColor: 'transparent',\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,O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AE,CAAC;MAAEC,WAAW,EAAE;IAAC;EAAC,CAEpC,CAAC,eACF7D,KAAA,CAAAiD,aAAA;IAAM,aAAU;EAAwC,GACrDlB,iBACG,CAAC,QACD,EAACI,eACJ,CAAC,GACJ,IACD,CACF,CACF,CACF,CAAC,eACNnC,KAAA,CAAAiD,aAAA;IAAKE,SAAS,EAAExC,KAAK,CAAC+D;EAAqB,gBACzC1E,KAAA,CAAAiD,aAAA,CAAC3C,WAAW;IACVqE,KAAK,EAAE9C,KAAM;IACb+C,WAAW,EAAE,KAAM;IACnBC,GAAG,EAAEjE,SAAU;IACfuC,SAAS,EAAExC,KAAK,CAACmE,eAAgB;IACjCnE,KAAK,EAAE;MAAC0D,eAAe,EAAE9D,MAAM,CAACwE;IAAe;EAAE,CAClD,CACE,CACF,CAAC;AAEV,CAAC;AAED7D,gBAAgB,CAAC8D,YAAY,GAAG;EAC9BhD,SAAS,EAAE5B,QAAQ,CAAC6E,iBAAiB,CAACjD;AACxC,CAAC;AAEDd,gBAAgB,CAACR,SAAS,GAAAwE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG1E,SAAS;AAEtC,eAAeQ,gBAAgB","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../variables/colors.css";
4
4
  @value cm_grey_400 from colors;
5
+ @value purple_600 from colors;
5
6
  @value white from colors;
6
7
  @value light from colors;
7
8
  @value box_shadow_light_dark from colors;
@@ -1,5 +1,6 @@
1
1
  @value colors: "../../variables/colors.css";
2
2
  @value cm_grey_100 from colors;
3
+ @value cm_grey_500 from colors;
3
4
 
4
5
  .LearningPriorityContainer {
5
6
  height: 485px;
@@ -52,8 +53,8 @@
52
53
  }
53
54
 
54
55
  .skillFilterNumberInActive {
55
- background-color: #EAEAEB;
56
- color: #515161;
56
+ background-color: cm_grey_100;
57
+ color: cm_grey_500;
57
58
  }
58
59
 
59
60
  .priorityListWrapper {
@@ -142,7 +142,7 @@ const ProgressWrapper = ({
142
142
  }, progression, "%"))), /*#__PURE__*/React.createElement(ProgressBar, {
143
143
  className: style.customProgressBar,
144
144
  style: {
145
- backgroundColor: COLORS.positive
145
+ backgroundColor: COLORS.cm_positive_500
146
146
  },
147
147
  displayInfo: false,
148
148
  value: progression,