@coorpacademy/components 11.35.2 → 11.35.3-forcedeploy3.1

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 (217) 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 +1 -1
  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.map +1 -1
  31. package/es/molecule/icon-preview/index.js +2 -1
  32. package/es/molecule/icon-preview/index.js.map +1 -1
  33. package/es/molecule/icon-preview/style.css +4 -0
  34. package/es/molecule/learner-skill-card/index.js +10 -8
  35. package/es/molecule/learner-skill-card/index.js.map +1 -1
  36. package/es/molecule/learner-skill-card/style.css +1 -0
  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/rewards-form/index.d.ts +13 -2
  60. package/es/organism/select-opponents/index.d.ts +13 -3
  61. package/es/organism/select-opponents/index.d.ts.map +1 -1
  62. package/es/organism/select-opponents/types.d.ts +13 -2
  63. package/es/organism/select-opponents/types.d.ts.map +1 -1
  64. package/es/organism/sidebar/index.d.ts +2 -2
  65. package/es/organism/title-and-input/index.d.ts +25 -5
  66. package/es/organism/title-and-input/index.d.ts.map +1 -1
  67. package/es/organism/title-and-input/types.d.ts +24 -4
  68. package/es/organism/title-and-input/types.d.ts.map +1 -1
  69. package/es/organism/wizard-contents/index.d.ts +13 -2
  70. package/es/template/app-player/loading/index.d.ts +27 -6
  71. package/es/template/app-player/player/index.d.ts +53 -12
  72. package/es/template/app-player/player/slides/index.d.ts +27 -6
  73. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  74. package/es/template/app-player/popin-correction/index.d.ts +26 -6
  75. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  76. package/es/template/app-player/popin-end/index.d.ts +27 -6
  77. package/es/template/app-review/index.d.ts +27 -7
  78. package/es/template/app-review/index.d.ts.map +1 -1
  79. package/es/template/app-review/player/prop-types.d.ts +27 -6
  80. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  81. package/es/template/app-review/prop-types.d.ts +27 -6
  82. package/es/template/app-review/prop-types.d.ts.map +1 -1
  83. package/es/template/back-office/brand-update/index.d.ts +63 -12
  84. package/es/template/back-office/brand-update/utils.d.ts +1 -1
  85. package/es/template/common/dashboard/index.d.ts +53 -12
  86. package/es/template/common/search-page/index.d.ts +27 -6
  87. package/es/template/external-course/index.d.ts +27 -6
  88. package/es/template/skill-detail/all-courses.css +3 -2
  89. package/es/template/skill-detail/all-courses.d.ts +52 -17
  90. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  91. package/es/template/skill-detail/all-courses.js +12 -11
  92. package/es/template/skill-detail/all-courses.js.map +1 -1
  93. package/es/template/skill-detail/continue-learning.css +7 -2
  94. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  95. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  96. package/es/template/skill-detail/continue-learning.js.map +1 -1
  97. package/es/template/skill-detail/index.d.ts +89 -71
  98. package/es/template/skill-detail/index.d.ts.map +1 -1
  99. package/es/template/skill-detail/index.js +95 -55
  100. package/es/template/skill-detail/index.js.map +1 -1
  101. package/es/template/skill-detail/style.css +97 -39
  102. package/es/variables/colors.css +2 -0
  103. package/es/variables/colors.d.ts +3 -2
  104. package/es/variables/colors.d.ts.map +1 -1
  105. package/es/variables/colors.js +4 -3
  106. package/es/variables/colors.js.map +1 -1
  107. package/es/variables/theme.native.js +1 -1
  108. package/es/variables/theme.native.js.map +1 -1
  109. package/lib/atom/button-link/index.js +1 -1
  110. package/lib/atom/button-link/index.js.map +1 -1
  111. package/lib/atom/button-link/style.css +2 -2
  112. package/lib/atom/icon/index.d.ts +35 -17
  113. package/lib/atom/icon/index.d.ts.map +1 -1
  114. package/lib/atom/icon/index.js +34 -18
  115. package/lib/atom/icon/index.js.map +1 -1
  116. package/lib/atom/radio-with-title/index.d.ts +13 -3
  117. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  118. package/lib/atom/radio-with-title/types.d.ts +13 -2
  119. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  120. package/lib/atom/status-item/index.native.js +1 -1
  121. package/lib/atom/status-item/index.native.js.map +1 -1
  122. package/lib/atom/tag/index.d.ts +12 -1
  123. package/lib/atom/tag/style.css +1 -0
  124. package/lib/atom/title/index.d.ts +13 -2
  125. package/lib/molecule/banner/style.css +1 -0
  126. package/lib/molecule/base-modal/style.css +0 -1
  127. package/lib/molecule/bulk-progress-bar/index.js +2 -2
  128. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  129. package/lib/molecule/certification-card/index.js +1 -1
  130. package/lib/molecule/certification-card/index.js.map +1 -1
  131. package/lib/molecule/cm-popin/types.d.ts +28 -7
  132. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  133. package/lib/molecule/cm-popin/types.js +1 -1
  134. package/lib/molecule/cm-popin/types.js.map +1 -1
  135. package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  136. package/lib/molecule/dashboard/cards-list/index.js +2 -0
  137. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  138. package/lib/molecule/icon-preview/index.d.ts.map +1 -1
  139. package/lib/molecule/icon-preview/index.js +2 -1
  140. package/lib/molecule/icon-preview/index.js.map +1 -1
  141. package/lib/molecule/icon-preview/style.css +4 -0
  142. package/lib/molecule/learner-skill-card/index.js +10 -8
  143. package/lib/molecule/learner-skill-card/index.js.map +1 -1
  144. package/lib/molecule/learner-skill-card/style.css +1 -0
  145. package/lib/molecule/learning-priority-modal/style.css +3 -2
  146. package/lib/molecule/progress-wrapper/index.js +1 -1
  147. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  148. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  149. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  150. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
  151. package/lib/molecule/title-radio-wrapper/index.d.ts +13 -3
  152. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  153. package/lib/molecule/title-radio-wrapper/types.d.ts +13 -2
  154. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  155. package/lib/organism/cards-grid/index.d.ts +48 -10
  156. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  157. package/lib/organism/cards-grid/index.js +3 -2
  158. package/lib/organism/cards-grid/index.js.map +1 -1
  159. package/lib/organism/content-skill-modal/index.d.ts +13 -3
  160. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  161. package/lib/organism/content-skill-modal/types.d.ts +12 -2
  162. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  163. package/lib/organism/list-item/index.js +5 -5
  164. package/lib/organism/list-item/index.js.map +1 -1
  165. package/lib/organism/list-item/style.css +23 -17
  166. package/lib/organism/list-items/index.d.ts +13 -2
  167. package/lib/organism/rewards-form/index.d.ts +13 -2
  168. package/lib/organism/select-opponents/index.d.ts +13 -3
  169. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  170. package/lib/organism/select-opponents/types.d.ts +13 -2
  171. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  172. package/lib/organism/sidebar/index.d.ts +2 -2
  173. package/lib/organism/title-and-input/index.d.ts +25 -5
  174. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  175. package/lib/organism/title-and-input/types.d.ts +24 -4
  176. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  177. package/lib/organism/wizard-contents/index.d.ts +13 -2
  178. package/lib/template/app-player/loading/index.d.ts +27 -6
  179. package/lib/template/app-player/player/index.d.ts +53 -12
  180. package/lib/template/app-player/player/slides/index.d.ts +27 -6
  181. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  182. package/lib/template/app-player/popin-correction/index.d.ts +26 -6
  183. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  184. package/lib/template/app-player/popin-end/index.d.ts +27 -6
  185. package/lib/template/app-review/index.d.ts +27 -7
  186. package/lib/template/app-review/index.d.ts.map +1 -1
  187. package/lib/template/app-review/player/prop-types.d.ts +27 -6
  188. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  189. package/lib/template/app-review/prop-types.d.ts +27 -6
  190. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  191. package/lib/template/back-office/brand-update/index.d.ts +63 -12
  192. package/lib/template/back-office/brand-update/utils.d.ts +1 -1
  193. package/lib/template/common/dashboard/index.d.ts +53 -12
  194. package/lib/template/common/search-page/index.d.ts +27 -6
  195. package/lib/template/external-course/index.d.ts +27 -6
  196. package/lib/template/skill-detail/all-courses.css +3 -2
  197. package/lib/template/skill-detail/all-courses.d.ts +52 -17
  198. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  199. package/lib/template/skill-detail/all-courses.js +11 -11
  200. package/lib/template/skill-detail/all-courses.js.map +1 -1
  201. package/lib/template/skill-detail/continue-learning.css +7 -2
  202. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  203. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  204. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  205. package/lib/template/skill-detail/index.d.ts +89 -71
  206. package/lib/template/skill-detail/index.d.ts.map +1 -1
  207. package/lib/template/skill-detail/index.js +95 -55
  208. package/lib/template/skill-detail/index.js.map +1 -1
  209. package/lib/template/skill-detail/style.css +97 -39
  210. package/lib/variables/colors.css +2 -0
  211. package/lib/variables/colors.d.ts +3 -2
  212. package/lib/variables/colors.d.ts.map +1 -1
  213. package/lib/variables/colors.js +4 -3
  214. package/lib/variables/colors.js.map +1 -1
  215. package/lib/variables/theme.native.js +1 -1
  216. package/lib/variables/theme.native.js.map +1 -1
  217. package/package.json +2 -2
@@ -19,7 +19,7 @@ declare namespace Dashboard {
19
19
  'data-name': PropTypes.Requireable<string>;
20
20
  titleSize: PropTypes.Requireable<string>;
21
21
  subtitleSize: PropTypes.Requireable<string>;
22
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
22
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
23
23
  tag: PropTypes.Requireable<PropTypes.InferProps<{
24
24
  label: PropTypes.Requireable<string>;
25
25
  type: PropTypes.Requireable<string>;
@@ -27,7 +27,17 @@ declare namespace Dashboard {
27
27
  customStyle: PropTypes.Requireable<{
28
28
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
29
29
  }>;
30
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
30
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
31
+ position: PropTypes.Requireable<string>;
32
+ iconName?: React.Validator<string> | undefined;
33
+ iconColor?: React.Validator<string | null | undefined> | undefined;
34
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
35
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
36
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
37
+ preset?: React.Validator<string | null | undefined> | undefined;
38
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
39
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
40
+ }>>;
31
41
  }>>;
32
42
  button: PropTypes.Requireable<PropTypes.InferProps<{
33
43
  type: PropTypes.Requireable<string>;
@@ -114,8 +124,8 @@ declare namespace Dashboard {
114
124
  borderRadius: PropTypes.Requireable<string>;
115
125
  preset: PropTypes.Requireable<string>;
116
126
  size: PropTypes.Requireable<PropTypes.InferProps<{
117
- faSize: PropTypes.Requireable<number>;
118
- wrapperSize: PropTypes.Requireable<number>;
127
+ faSize: PropTypes.Validator<number>;
128
+ wrapperSize: PropTypes.Validator<number>;
119
129
  }>>;
120
130
  customStyle: PropTypes.Requireable<{
121
131
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -553,7 +563,7 @@ declare namespace Dashboard {
553
563
  'data-name': PropTypes.Requireable<string>;
554
564
  titleSize: PropTypes.Requireable<string>;
555
565
  subtitleSize: PropTypes.Requireable<string>;
556
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
566
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
557
567
  tag: PropTypes.Requireable<PropTypes.InferProps<{
558
568
  label: PropTypes.Requireable<string>;
559
569
  type: PropTypes.Requireable<string>;
@@ -561,7 +571,17 @@ declare namespace Dashboard {
561
571
  customStyle: PropTypes.Requireable<{
562
572
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
563
573
  }>;
564
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
574
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
575
+ position: PropTypes.Requireable<string>;
576
+ iconName?: React.Validator<string> | undefined;
577
+ iconColor?: React.Validator<string | null | undefined> | undefined;
578
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
579
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
580
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
581
+ preset?: React.Validator<string | null | undefined> | undefined;
582
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
583
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
584
+ }>>;
565
585
  }>>;
566
586
  button: PropTypes.Requireable<PropTypes.InferProps<{
567
587
  type: PropTypes.Requireable<string>;
@@ -776,7 +796,7 @@ declare namespace Dashboard {
776
796
  'data-name': PropTypes.Requireable<string>;
777
797
  titleSize: PropTypes.Requireable<string>;
778
798
  subtitleSize: PropTypes.Requireable<string>;
779
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
799
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
780
800
  tag: PropTypes.Requireable<PropTypes.InferProps<{
781
801
  label: PropTypes.Requireable<string>;
782
802
  type: PropTypes.Requireable<string>;
@@ -784,7 +804,17 @@ declare namespace Dashboard {
784
804
  customStyle: PropTypes.Requireable<{
785
805
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
786
806
  }>;
787
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
807
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
808
+ position: PropTypes.Requireable<string>;
809
+ iconName?: React.Validator<string> | undefined;
810
+ iconColor?: React.Validator<string | null | undefined> | undefined;
811
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
812
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
813
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
814
+ preset?: React.Validator<string | null | undefined> | undefined;
815
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
816
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
817
+ }>>;
788
818
  }>>;
789
819
  button: PropTypes.Requireable<PropTypes.InferProps<{
790
820
  type: PropTypes.Requireable<string>;
@@ -871,8 +901,8 @@ declare namespace Dashboard {
871
901
  borderRadius: PropTypes.Requireable<string>;
872
902
  preset: PropTypes.Requireable<string>;
873
903
  size: PropTypes.Requireable<PropTypes.InferProps<{
874
- faSize: PropTypes.Requireable<number>;
875
- wrapperSize: PropTypes.Requireable<number>;
904
+ faSize: PropTypes.Validator<number>;
905
+ wrapperSize: PropTypes.Validator<number>;
876
906
  }>>;
877
907
  customStyle: PropTypes.Requireable<{
878
908
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -1310,7 +1340,7 @@ declare namespace Dashboard {
1310
1340
  'data-name': PropTypes.Requireable<string>;
1311
1341
  titleSize: PropTypes.Requireable<string>;
1312
1342
  subtitleSize: PropTypes.Requireable<string>;
1313
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
1343
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
1314
1344
  tag: PropTypes.Requireable<PropTypes.InferProps<{
1315
1345
  label: PropTypes.Requireable<string>;
1316
1346
  type: PropTypes.Requireable<string>;
@@ -1318,7 +1348,17 @@ declare namespace Dashboard {
1318
1348
  customStyle: PropTypes.Requireable<{
1319
1349
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
1320
1350
  }>;
1321
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
1351
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
1352
+ position: PropTypes.Requireable<string>;
1353
+ iconName?: React.Validator<string> | undefined;
1354
+ iconColor?: React.Validator<string | null | undefined> | undefined;
1355
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
1356
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
1357
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
1358
+ preset?: React.Validator<string | null | undefined> | undefined;
1359
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
1360
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
1361
+ }>>;
1322
1362
  }>>;
1323
1363
  button: PropTypes.Requireable<PropTypes.InferProps<{
1324
1364
  type: PropTypes.Requireable<string>;
@@ -1521,4 +1561,5 @@ declare namespace Dashboard {
1521
1561
  };
1522
1562
  }
1523
1563
  import PropTypes from "prop-types";
1564
+ import React from "react";
1524
1565
  //# sourceMappingURL=index.d.ts.map
@@ -200,7 +200,7 @@ declare namespace SearchPage {
200
200
  'data-name': PropTypes.Requireable<string>;
201
201
  titleSize: PropTypes.Requireable<string>;
202
202
  subtitleSize: PropTypes.Requireable<string>;
203
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
203
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
204
204
  tag: PropTypes.Requireable<PropTypes.InferProps<{
205
205
  label: PropTypes.Requireable<string>;
206
206
  type: PropTypes.Requireable<string>;
@@ -208,7 +208,17 @@ declare namespace SearchPage {
208
208
  customStyle: PropTypes.Requireable<{
209
209
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
210
210
  }>;
211
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
211
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
212
+ position: PropTypes.Requireable<string>;
213
+ iconName?: React.Validator<string> | undefined;
214
+ iconColor?: React.Validator<string | null | undefined> | undefined;
215
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
216
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
217
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
218
+ preset?: React.Validator<string | null | undefined> | undefined;
219
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
220
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
221
+ }>>;
212
222
  }>>;
213
223
  button: PropTypes.Requireable<PropTypes.InferProps<{
214
224
  type: PropTypes.Requireable<string>;
@@ -295,8 +305,8 @@ declare namespace SearchPage {
295
305
  borderRadius: PropTypes.Requireable<string>;
296
306
  preset: PropTypes.Requireable<string>;
297
307
  size: PropTypes.Requireable<PropTypes.InferProps<{
298
- faSize: PropTypes.Requireable<number>;
299
- wrapperSize: PropTypes.Requireable<number>;
308
+ faSize: PropTypes.Validator<number>;
309
+ wrapperSize: PropTypes.Validator<number>;
300
310
  }>>;
301
311
  customStyle: PropTypes.Requireable<{
302
312
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -734,7 +744,7 @@ declare namespace SearchPage {
734
744
  'data-name': PropTypes.Requireable<string>;
735
745
  titleSize: PropTypes.Requireable<string>;
736
746
  subtitleSize: PropTypes.Requireable<string>;
737
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
747
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
738
748
  tag: PropTypes.Requireable<PropTypes.InferProps<{
739
749
  label: PropTypes.Requireable<string>;
740
750
  type: PropTypes.Requireable<string>;
@@ -742,7 +752,17 @@ declare namespace SearchPage {
742
752
  customStyle: PropTypes.Requireable<{
743
753
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
744
754
  }>;
745
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
755
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
756
+ position: PropTypes.Requireable<string>;
757
+ iconName?: React.Validator<string> | undefined;
758
+ iconColor?: React.Validator<string | null | undefined> | undefined;
759
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
760
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
761
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
762
+ preset?: React.Validator<string | null | undefined> | undefined;
763
+ size?: React.Validator<import("../../../atom/icon").IconSize | null | undefined> | undefined;
764
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
765
+ }>>;
746
766
  }>>;
747
767
  button: PropTypes.Requireable<PropTypes.InferProps<{
748
768
  type: PropTypes.Requireable<string>;
@@ -945,4 +965,5 @@ declare namespace SearchPage {
945
965
  }
946
966
  }
947
967
  import PropTypes from "prop-types";
968
+ import React from "react";
948
969
  //# sourceMappingURL=index.d.ts.map
@@ -37,7 +37,7 @@ declare namespace ExternalCourse {
37
37
  'data-name': PropTypes.Requireable<string>;
38
38
  titleSize: PropTypes.Requireable<string>;
39
39
  subtitleSize: PropTypes.Requireable<string>;
40
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
40
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
41
41
  tag: PropTypes.Requireable<PropTypes.InferProps<{
42
42
  label: PropTypes.Requireable<string>;
43
43
  type: PropTypes.Requireable<string>;
@@ -45,7 +45,17 @@ declare namespace ExternalCourse {
45
45
  customStyle: PropTypes.Requireable<{
46
46
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
47
47
  }>;
48
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
48
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
49
+ position: PropTypes.Requireable<string>;
50
+ iconName?: React.Validator<string> | undefined;
51
+ iconColor?: React.Validator<string | null | undefined> | undefined;
52
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
53
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
54
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
55
+ preset?: React.Validator<string | null | undefined> | undefined;
56
+ size?: React.Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
57
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
58
+ }>>;
49
59
  }>>;
50
60
  button: PropTypes.Requireable<PropTypes.InferProps<{
51
61
  type: PropTypes.Requireable<string>;
@@ -132,8 +142,8 @@ declare namespace ExternalCourse {
132
142
  borderRadius: PropTypes.Requireable<string>;
133
143
  preset: PropTypes.Requireable<string>;
134
144
  size: PropTypes.Requireable<PropTypes.InferProps<{
135
- faSize: PropTypes.Requireable<number>;
136
- wrapperSize: PropTypes.Requireable<number>;
145
+ faSize: PropTypes.Validator<number>;
146
+ wrapperSize: PropTypes.Validator<number>;
137
147
  }>>;
138
148
  customStyle: PropTypes.Requireable<{
139
149
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -571,7 +581,7 @@ declare namespace ExternalCourse {
571
581
  'data-name': PropTypes.Requireable<string>;
572
582
  titleSize: PropTypes.Requireable<string>;
573
583
  subtitleSize: PropTypes.Requireable<string>;
574
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
584
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
575
585
  tag: PropTypes.Requireable<PropTypes.InferProps<{
576
586
  label: PropTypes.Requireable<string>;
577
587
  type: PropTypes.Requireable<string>;
@@ -579,7 +589,17 @@ declare namespace ExternalCourse {
579
589
  customStyle: PropTypes.Requireable<{
580
590
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
581
591
  }>;
582
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
592
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
593
+ position: PropTypes.Requireable<string>;
594
+ iconName?: React.Validator<string> | undefined;
595
+ iconColor?: React.Validator<string | null | undefined> | undefined;
596
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
597
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
598
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
599
+ preset?: React.Validator<string | null | undefined> | undefined;
600
+ size?: React.Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
601
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
602
+ }>>;
583
603
  }>>;
584
604
  button: PropTypes.Requireable<PropTypes.InferProps<{
585
605
  type: PropTypes.Requireable<string>;
@@ -805,4 +825,5 @@ declare namespace ExternalCourse {
805
825
  }
806
826
  }
807
827
  import PropTypes from "prop-types";
828
+ import React from "react";
808
829
  //# sourceMappingURL=index.d.ts.map
@@ -21,8 +21,8 @@
21
21
 
22
22
  .continueLearningNumber {
23
23
  border-radius: 12px;
24
- background-color: #EAEAEB;
25
- color: #515161;
24
+ background-color: cm_grey_100;
25
+ color: cm_grey_500;
26
26
  padding: 2px 4px;
27
27
  margin-left: 8px;
28
28
  font-size: 10px;
@@ -49,6 +49,7 @@
49
49
  font-size: 14px;
50
50
  font-style: normal;
51
51
  font-weight: 600;
52
+ margin-right: 16px;
52
53
  }
53
54
 
54
55
  .sortWrapper {
@@ -1,8 +1,43 @@
1
- export default AllCourses;
2
- declare function AllCourses(props: any, context: any): JSX.Element;
3
- declare namespace AllCourses {
4
- namespace contextTypes {
5
- const skin: PropTypes.Requireable<PropTypes.InferProps<{
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ import { CardsGridProps } from '../../organism/cards-grid';
4
+ interface ProviderContext {
5
+ skin: {
6
+ common: {
7
+ primary: string;
8
+ secondary: string;
9
+ };
10
+ };
11
+ translate: (key: string, options?: any) => string;
12
+ }
13
+ declare const AllCourses: {
14
+ (props: {
15
+ dataName?: string | undefined;
16
+ ariaLabel?: string | undefined;
17
+ selected?: boolean | undefined;
18
+ label?: string | undefined;
19
+ content: {
20
+ list: CardsGridProps['list'];
21
+ loading?: boolean;
22
+ };
23
+ totalContents?: number | undefined;
24
+ search: {
25
+ oldValue: string;
26
+ onChange: (value: string) => void;
27
+ };
28
+ bannerMicrolearning?: {
29
+ type: 'skill' | 'playlist';
30
+ action: () => void;
31
+ oldSwitchValue: boolean;
32
+ } | undefined;
33
+ filters: {
34
+ onChange?: ((value: string) => void) | undefined;
35
+ options?: unknown[] | undefined;
36
+ };
37
+ sorting?: unknown;
38
+ }, context: ProviderContext): JSX.Element;
39
+ contextTypes: {
40
+ skin: PropTypes.Requireable<PropTypes.InferProps<{
6
41
  common: PropTypes.Requireable<{
7
42
  [x: string]: any;
8
43
  }>;
@@ -23,18 +58,18 @@ declare namespace AllCourses {
23
58
  [x: string]: any;
24
59
  }>;
25
60
  }>>;
26
- const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
- }
28
- namespace propTypes {
29
- const content: PropTypes.Requireable<PropTypes.InferProps<{
61
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
62
+ };
63
+ propTypes: {
64
+ content: PropTypes.Requireable<PropTypes.InferProps<{
30
65
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
31
66
  customStyle: PropTypes.Requireable<{
32
67
  [x: string]: string | null | undefined;
33
68
  }>;
34
69
  loading: PropTypes.Requireable<boolean>;
35
70
  }>>;
36
- const totalContents: PropTypes.Requireable<number>;
37
- const filters: PropTypes.Requireable<PropTypes.InferProps<{
71
+ totalContents: PropTypes.Requireable<number>;
72
+ filters: PropTypes.Requireable<PropTypes.InferProps<{
38
73
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
39
74
  options: PropTypes.Requireable<(PropTypes.InferProps<{
40
75
  name: PropTypes.Validator<string>;
@@ -43,7 +78,7 @@ declare namespace AllCourses {
43
78
  validOption: PropTypes.Requireable<boolean>;
44
79
  }> | null | undefined)[]>;
45
80
  }>>;
46
- const sorting: PropTypes.Requireable<PropTypes.InferProps<{
81
+ sorting: PropTypes.Requireable<PropTypes.InferProps<{
47
82
  title: PropTypes.Requireable<string>;
48
83
  name: PropTypes.Requireable<string>;
49
84
  className: PropTypes.Requireable<string>;
@@ -74,16 +109,16 @@ declare namespace AllCourses {
74
109
  'aria-label': PropTypes.Requireable<string>;
75
110
  'aria-labelledby': PropTypes.Requireable<string>;
76
111
  }>>;
77
- const bannerMicrolearning: PropTypes.Requireable<PropTypes.InferProps<{
112
+ bannerMicrolearning: PropTypes.Requireable<PropTypes.InferProps<{
78
113
  type: PropTypes.Requireable<string>;
79
114
  action: PropTypes.Requireable<(...args: any[]) => any>;
80
115
  oldSwitchValue: PropTypes.Requireable<boolean>;
81
116
  }>>;
82
- const search: PropTypes.Requireable<PropTypes.InferProps<{
117
+ search: PropTypes.Requireable<PropTypes.InferProps<{
83
118
  oldValue: PropTypes.Requireable<string>;
84
119
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
85
120
  }>>;
86
- }
87
- }
88
- import PropTypes from "prop-types";
121
+ };
122
+ };
123
+ export default AllCourses;
89
124
  //# sourceMappingURL=all-courses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AAgDA,mEA8JC"}
1
+ {"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,OAAkB,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAQpE,UAAU,eAAe;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;KACH,CAAC;IACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC;CACnD;AAgDD,QAAA,MAAM,UAAU;;;;;;iBAMH;YACP,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;YAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB;;;sBAGW,MAAM;8BACE,MAAM,KAAK,IAAI;;;kBAG3B,OAAO,GAAG,UAAU;oBAClB,MAAM,IAAI;4BACF,OAAO;;;gCAGJ,MAAM,KAAK,IAAI;;;kBAG1B,OAAO;gBAEV,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKzB,CAAC;AA0BF,eAAe,UAAU,CAAC"}
@@ -15,7 +15,10 @@ import SearchForm from '../../molecule/search-form';
15
15
  import CardsGrid from '../../organism/cards-grid';
16
16
  import InputSwitch from '../../atom/input-switch';
17
17
  import Banner from '../../molecule/banner';
18
+ import { COLORS } from '../../variables/colors';
18
19
  import style from './all-courses.css';
20
+
21
+ // @ts-expect-error convert untypped
19
22
  const uncappedMap = _map.convert({
20
23
  cap: false
21
24
  });
@@ -33,8 +36,8 @@ const FilterButton = (props, context) => {
33
36
  const primarySkinColor = _get('common.primary', skin);
34
37
  const buttonProps = {
35
38
  customStyle: {
36
- backgroundColor: selected ? primarySkinColor : '#E1E1E3',
37
- color: selected ? '#FFFFFF' : '#515161',
39
+ backgroundColor: selected ? primarySkinColor : COLORS.cm_grey_150,
40
+ color: selected ? COLORS.white : COLORS.cm_grey_500,
38
41
  transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
39
42
  width: 'fit-content'
40
43
  },
@@ -65,7 +68,7 @@ const AllCourses = (props, context) => {
65
68
  filters,
66
69
  sorting,
67
70
  totalContents,
68
- bannerMicrolearning = {},
71
+ bannerMicrolearning = undefined,
69
72
  search: {
70
73
  oldValue: oldSearchValue,
71
74
  onChange: handleSearch
@@ -79,11 +82,9 @@ const AllCourses = (props, context) => {
79
82
  list,
80
83
  loading
81
84
  } = content;
82
- const {
83
- type: bannerMessageType,
84
- action: bannerAction,
85
- oldSwitchValue
86
- } = bannerMicrolearning;
85
+ const bannerMessageType = bannerMicrolearning?.type;
86
+ const bannerAction = bannerMicrolearning?.action;
87
+ const oldSwitchValue = bannerMicrolearning?.oldSwitchValue;
87
88
  const [showCompleted, setShowCompleted] = useState(true);
88
89
  const [searchValue, setSearchValue] = useState(oldSearchValue || '');
89
90
  const sortView = sorting !== undefined ? /*#__PURE__*/React.createElement("div", {
@@ -103,7 +104,7 @@ const AllCourses = (props, context) => {
103
104
  setSearchValue(value);
104
105
  debounceHandleSearch(value);
105
106
  }, [debounceHandleSearch]);
106
- const handleSearchReset = useCallback(value => {
107
+ const handleSearchReset = useCallback(() => {
107
108
  setSearchValue('');
108
109
  debounceHandleSearch('');
109
110
  }, [debounceHandleSearch]);
@@ -132,9 +133,9 @@ const AllCourses = (props, context) => {
132
133
  className: style.sortSection
133
134
  }, /*#__PURE__*/React.createElement(InputSwitch, {
134
135
  id: 'show-completed-courses-switch',
135
- type: "switch",
136
136
  name: translate('show_completed'),
137
137
  title: translate('show_completed'),
138
+ theme: "default",
138
139
  "aria-label": 'Show completed courses aria label',
139
140
  value: showCompleted,
140
141
  onChange: handleShowCompletedToggle
@@ -160,7 +161,7 @@ const AllCourses = (props, context) => {
160
161
  selected
161
162
  } = filterProps;
162
163
  function handleFilterChange() {
163
- onChange(value);
164
+ onChange && onChange(value);
164
165
  }
165
166
  return /*#__PURE__*/React.createElement("div", {
166
167
  key: index,
@@ -1 +1 @@
1
- {"version":3,"file":"all-courses.js","names":["React","useState","useCallback","useMemo","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","InputSwitch","Banner","style","uncappedMap","_map","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","_get","buttonProps","customStyle","backgroundColor","color","transition","width","createElement","contextTypes","childContextTypes","translate","propTypes","process","env","NODE_ENV","string","bool","func","AllCourses","content","filters","sorting","totalContents","bannerMicrolearning","search","oldValue","oldSearchValue","onChange","handleSearch","options","list","loading","type","bannerMessageType","action","bannerAction","oldSwitchValue","showCompleted","setShowCompleted","searchValue","setSearchValue","sortView","undefined","_extends","filteredContent","_filter","course","progress","debounceHandleSearch","_debounce","value","onSearchChange","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","Fragment","className","continueLearningWrapper","continueLearningTitle","continueLearningNumber","_isNil","_size","searchAndSortSection","searchWrapper","placeholder","onReset","dataTestId","sortSection","id","name","title","sortWrapper","_isEmpty","bannerWrapper","message","cta","filterWrapper","filterProps","index","handleFilterChange","key","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","number","arrayOf","oneOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil, isEmpty, debounce} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport InputSwitch from '../../atom/input-switch';\nimport Banner from '../../molecule/banner';\nimport style from './all-courses.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterButton = (props, context) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {translate} = context;\n const {\n content,\n filters,\n sorting,\n totalContents,\n bannerMicrolearning = {},\n search: {oldValue: oldSearchValue, onChange: handleSearch}\n } = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const {type: bannerMessageType, action: bannerAction, oldSwitchValue} = bannerMicrolearning;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState(oldSearchValue || '');\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const debounceHandleSearch = useMemo(() => {\n return debounce(800, value => {\n handleSearch(value);\n });\n }, [handleSearch]);\n\n const onSearchChange = useCallback(\n value => {\n setSearchValue(value);\n debounceHandleSearch(value);\n },\n [debounceHandleSearch]\n );\n\n const handleSearchReset = useCallback(\n value => {\n setSearchValue('');\n debounceHandleSearch('');\n },\n [debounceHandleSearch]\n );\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(filteredContent) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: onSearchChange\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n {!isEmpty(bannerMicrolearning) ? (\n <div className={style.bannerWrapper}>\n <Banner\n type=\"info\"\n message={\n bannerMessageType === 'skill'\n ? translate('banner_microlearning_rule_message_skill')\n : translate('banner_microlearning_rule_message')\n }\n cta={[\n {\n type: 'switch',\n label: translate('banner_microlearning_rule_label'),\n action: bannerAction,\n oldSwitchValue\n }\n ]}\n />\n </div>\n ) : null}\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps, index) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(filteredContent) ? (\n <CardsGrid\n list={filteredContent}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n bannerMicrolearning: PropTypes.shape({\n type: PropTypes.oneOf(['skill', 'playlist']),\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n }),\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n })\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,MAAM,IAAGC,qBAAqB,QAAO,mBAAmB;AAC/D,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,4BAA4B;AACnD,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,mBAAmB;AAErC,MAAMC,WAAW,GAAGC,IAAA,CAAIC,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,YAAY,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EACvC,MAAM;IAACC,QAAQ;IAAEC,SAAS;IAAEC,QAAQ;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGN,KAAK;EAC7D,MAAM;IAACO;EAAI,CAAC,GAAGN,OAAO;EACtB,MAAMO,gBAAgB,GAAGC,IAAA,CAAI,gBAAgB,EAAEF,IAAI,CAAC;EAEpD,MAAMG,WAAW,GAAG;IAClBC,WAAW,EAAE;MACXC,eAAe,EAAER,QAAQ,GAAGI,gBAAgB,GAAG,S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B,SAAS,CAAC;EAC7CW,aAAa,EAAE9C,SAAS,CAACiH,MAAM;EAC/BrE,OAAO,EAAE5C,SAAS,CAACgH,KAAK,CAAC;IACvB7D,QAAQ,EAAEnD,SAAS,CAACyC,IAAI;IACxBY,OAAO,EAAErD,SAAS,CAACkH,OAAO,CAAClH,SAAS,CAACgH,KAAK,CAAC7G,qBAAqB,CAAC;EACnE,CAAC,CAAC;EACF0C,OAAO,EAAE7C,SAAS,CAACgH,KAAK,CAAC9G,MAAM,CAACiC,SAAS,CAAC;EAC1CY,mBAAmB,EAAE/C,SAAS,CAACgH,KAAK,CAAC;IACnCxD,IAAI,EAAExD,SAAS,CAACmH,KAAK,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5CzD,MAAM,EAAE1D,SAAS,CAACyC,IAAI;IACtBmB,cAAc,EAAE5D,SAAS,CAACwC;EAC5B,CAAC,CAAC;EACFQ,MAAM,EAAEhD,SAAS,CAACgH,KAAK,CAAC;IACtB/D,QAAQ,EAAEjD,SAAS,CAACuC,MAAM;IAC1BY,QAAQ,EAAEnD,SAAS,CAACyC;EACtB,CAAC;AACH,CAAC;AAED,eAAeC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"all-courses.js","names":["React","useState","useCallback","useMemo","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","InputSwitch","Banner","COLORS","style","uncappedMap","_map","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","_get","buttonProps","customStyle","backgroundColor","cm_grey_150","color","white","cm_grey_500","transition","width","createElement","contextTypes","childContextTypes","translate","propTypes","process","env","NODE_ENV","string","bool","func","AllCourses","content","filters","sorting","totalContents","bannerMicrolearning","undefined","search","oldValue","oldSearchValue","onChange","handleSearch","options","list","loading","bannerMessageType","type","bannerAction","action","oldSwitchValue","showCompleted","setShowCompleted","searchValue","setSearchValue","sortView","_extends","filteredContent","_filter","course","progress","debounceHandleSearch","_debounce","value","onSearchChange","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","Fragment","className","continueLearningWrapper","continueLearningTitle","continueLearningNumber","_isNil","_size","searchAndSortSection","searchWrapper","placeholder","onReset","dataTestId","sortSection","id","name","title","theme","sortWrapper","_isEmpty","bannerWrapper","message","cta","filterWrapper","filterProps","index","handleFilterChange","key","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","number","arrayOf","oneOf"],"sources":["../../../src/template/skill-detail/all-courses.tsx"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil, isEmpty, debounce} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid, {CardsGridProps} from '../../organism/cards-grid';\nimport InputSwitch from '../../atom/input-switch';\nimport Banner from '../../molecule/banner';\nimport {COLORS} from '../../variables/colors';\nimport style from './all-courses.css';\n\n// @ts-expect-error convert untypped\nconst uncappedMap = map.convert({cap: false});\ninterface ProviderContext {\n skin: {\n common: {\n primary: string;\n secondary: string;\n };\n };\n translate: (key: string, options?: any) => string;\n}\n\ninterface FilterOption {\n name: string;\n value: string;\n selected: boolean;\n}\n\ninterface FilterButtonProps {\n dataName?: string;\n ariaLabel?: string;\n selected?: boolean;\n label?: string;\n onClick?: () => void;\n}\nconst FilterButton = (props: FilterButtonProps, context: ProviderContext) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : COLORS.cm_grey_150,\n color: selected ? COLORS.white : COLORS.cm_grey_500,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (\n props: {\n dataName?: string;\n ariaLabel?: string;\n selected?: boolean;\n label?: string;\n content: {\n list: CardsGridProps['list'];\n loading?: boolean;\n };\n totalContents?: number;\n search: {\n oldValue: string;\n onChange: (value: string) => void;\n };\n bannerMicrolearning?: {\n type: 'skill' | 'playlist';\n action: () => void;\n oldSwitchValue: boolean;\n };\n filters: {\n onChange?: (value: string) => void;\n options?: unknown[];\n };\n sorting?: unknown;\n },\n context: ProviderContext\n) => {\n const {translate} = context;\n const {\n content,\n filters,\n sorting,\n totalContents,\n bannerMicrolearning = undefined,\n search: {oldValue: oldSearchValue, onChange: handleSearch}\n } = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const bannerMessageType = bannerMicrolearning?.type;\n const bannerAction = bannerMicrolearning?.action;\n const oldSwitchValue = bannerMicrolearning?.oldSwitchValue;\n\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState(oldSearchValue || '');\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const debounceHandleSearch = useMemo(() => {\n return debounce(800, value => {\n handleSearch(value);\n });\n }, [handleSearch]);\n\n const onSearchChange = useCallback(\n value => {\n setSearchValue(value);\n debounceHandleSearch(value);\n },\n [debounceHandleSearch]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n debounceHandleSearch('');\n }, [debounceHandleSearch]);\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(filteredContent) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: onSearchChange\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n name={translate('show_completed')}\n title={translate('show_completed')}\n theme=\"default\"\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n {!isEmpty(bannerMicrolearning) ? (\n <div className={style.bannerWrapper}>\n <Banner\n type=\"info\"\n message={\n bannerMessageType === 'skill'\n ? translate('banner_microlearning_rule_message_skill')\n : translate('banner_microlearning_rule_message')\n }\n cta={[\n {\n type: 'switch',\n label: translate('banner_microlearning_rule_label'),\n action: bannerAction,\n oldSwitchValue\n }\n ]}\n />\n </div>\n ) : null}\n\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps: FilterOption, index: number) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange && onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(filteredContent) ? (\n <CardsGrid\n list={filteredContent}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n bannerMicrolearning: PropTypes.shape({\n type: PropTypes.oneOf(['skill', 'playlist']),\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n }),\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n })\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,MAAM,IAAGC,qBAAqB,QAAO,mBAAmB;AAC/D,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,4BAA4B;AACnD,OAAOC,SAAS,MAAwB,2BAA2B;AACnE,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MAAM,mBAAmB;;AAErC;AACA,MAAMC,WAAW,GAAGC,IAAA,CAAIC,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAwB7C,MAAMC,YAAY,GAAGA,CAACC,KAAwB,EAAEC,OAAwB,KA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colors;
3
+ @value cm_grey_500 from colors;
4
+
5
+
1
6
  .continueLearningTitle {
2
7
  font-size: 16px;
3
8
  font-weight: 600;
@@ -6,8 +11,8 @@
6
11
 
7
12
  .continueLearningNumber {
8
13
  border-radius: 50%;
9
- background-color: #EAEAEB;
10
- color: #515161;
14
+ background-color: cm_grey_100;
15
+ color: cm_grey_500;
11
16
  padding: 2px 4px;
12
17
  margin-left: 8px;
13
18
  font-size: 10px;