@coorpacademy/components 10.19.7 → 10.19.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/es/atom/button-link-icon-only/test/fixtures.js +0 -2
  2. package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  3. package/es/atom/cta/index.js +2 -1
  4. package/es/atom/cta/index.js.map +1 -1
  5. package/es/atom/cta/test/cta.js +93 -0
  6. package/es/atom/cta/test/cta.js.map +1 -0
  7. package/es/atom/drag-and-drop/test/fixtures.js +0 -12
  8. package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
  9. package/es/atom/image-upload/test/fixtures.js +2 -6
  10. package/es/atom/image-upload/test/fixtures.js.map +1 -1
  11. package/es/atom/review-presentation/style.css +1 -1
  12. package/es/atom/review-presentation/test/fixtures/default.js +2 -2
  13. package/es/atom/review-presentation/test/fixtures/default.js.map +1 -1
  14. package/es/molecule/brand-form-group/test/fixtures.js +0 -2
  15. package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
  16. package/es/molecule/checkbox-with-title/test/fixtures.js +15 -0
  17. package/es/molecule/checkbox-with-title/test/fixtures.js.map +1 -0
  18. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  19. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  20. package/es/molecule/course-section/test/fixtures.js +0 -6
  21. package/es/molecule/course-section/test/fixtures.js.map +1 -1
  22. package/es/molecule/course-sections/test/fixtures.js +0 -2
  23. package/es/molecule/course-sections/test/fixtures.js.map +1 -1
  24. package/es/molecule/news/index.js +1 -2
  25. package/es/molecule/news/index.js.map +1 -1
  26. package/es/molecule/popin/index.js +2 -2
  27. package/es/molecule/popin/index.js.map +1 -1
  28. package/es/molecule/questions/qcm/index.js +1 -2
  29. package/es/molecule/questions/qcm/index.js.map +1 -1
  30. package/es/molecule/questions/qcm/style.css +4 -0
  31. package/es/molecule/questions/qcm/test/qcm.js +2 -2
  32. package/es/molecule/questions/qcm/test/qcm.js.map +1 -1
  33. package/es/molecule/questions/qcm-drag/index.js +2 -3
  34. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  35. package/es/molecule/questions/qcm-drag/style.css +4 -0
  36. package/es/molecule/questions/qcm-graphic/index.js +1 -2
  37. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  38. package/es/molecule/questions/qcm-graphic/style.css +5 -1
  39. package/es/molecule/questions/question-range/index.js +3 -4
  40. package/es/molecule/questions/question-range/index.js.map +1 -1
  41. package/es/molecule/questions/question-range/style.css +4 -0
  42. package/es/molecule/review-card-congrats/index.js +1 -1
  43. package/es/molecule/review-card-congrats/index.js.map +1 -1
  44. package/es/molecule/search/test/fixtures.js +15 -0
  45. package/es/molecule/search/test/fixtures.js.map +1 -0
  46. package/es/molecule/setup-slide/test/fixtures.js +0 -2
  47. package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
  48. package/es/molecule/share/index.js +1 -1
  49. package/es/molecule/share/index.js.map +1 -1
  50. package/es/molecule/skill-card/style.css +9 -1
  51. package/es/organism/brand-form/test/fixtures.js +0 -4
  52. package/es/organism/brand-form/test/fixtures.js.map +1 -1
  53. package/es/organism/course-selection/test/fixtures.js +0 -2
  54. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  55. package/es/organism/playlist-translation/test/fixtures.js +15 -0
  56. package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
  57. package/es/organism/review-skills/style.css +10 -1
  58. package/es/organism/search-and-chips-results/test/fixtures.js +0 -2
  59. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  60. package/es/organism/wizard-contents/test/fixtures/certification-general-settings-edit.js +0 -1
  61. package/es/organism/wizard-contents/test/fixtures/certification-general-settings-edit.js.map +1 -1
  62. package/es/organism/wizard-contents/test/fixtures/certification-rewards.js +0 -1
  63. package/es/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -1
  64. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +0 -1
  65. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -1
  66. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +0 -1
  67. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -1
  68. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +0 -1
  69. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -1
  70. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +0 -1
  71. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
  72. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js +0 -1
  73. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -1
  74. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +0 -1
  75. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -1
  76. package/es/organism/wizard-contents/test/fixtures.js +0 -4
  77. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  78. package/es/template/app-review/root-view/common.js +6 -0
  79. package/es/template/app-review/root-view/common.js.map +1 -0
  80. package/es/template/app-review/root-view/prop-types.js +11 -3
  81. package/es/template/app-review/root-view/prop-types.js.map +1 -1
  82. package/es/template/app-review/root-view/root-view.js +4 -38
  83. package/es/template/app-review/root-view/root-view.js.map +1 -1
  84. package/es/template/app-review/root-view/root-view.native.js +6 -5
  85. package/es/template/app-review/root-view/root-view.native.js.map +1 -1
  86. package/es/template/back-office/brand-update/test/fixtures.js +0 -2
  87. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  88. package/es/template/external-course/test/fixtures.js +0 -4
  89. package/es/template/external-course/test/fixtures.js.map +1 -1
  90. package/es/template/{app-review/review-dashboard-skills → review-dashboard-skills}/index.js +2 -2
  91. package/es/template/review-dashboard-skills/index.js.map +1 -0
  92. package/{lib/template/app-review → es/template}/review-dashboard-skills/style.css +2 -3
  93. package/es/template/review-dashboard-skills/test/fixtures/loading.js +10 -0
  94. package/es/template/review-dashboard-skills/test/fixtures/loading.js.map +1 -0
  95. package/es/template/review-dashboard-skills/test/fixtures/many-skills.js +10 -0
  96. package/es/template/review-dashboard-skills/test/fixtures/many-skills.js.map +1 -0
  97. package/es/template/review-dashboard-skills/test/fixtures/no-skills.js +10 -0
  98. package/es/template/review-dashboard-skills/test/fixtures/no-skills.js.map +1 -0
  99. package/lib/atom/button-link-icon-only/test/fixtures.js +0 -3
  100. package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  101. package/lib/atom/cta/index.js +2 -1
  102. package/lib/atom/cta/index.js.map +1 -1
  103. package/lib/atom/cta/test/cta.js +115 -0
  104. package/lib/atom/cta/test/cta.js.map +1 -0
  105. package/lib/atom/drag-and-drop/test/fixtures.js +0 -18
  106. package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
  107. package/lib/atom/image-upload/test/fixtures.js +3 -9
  108. package/lib/atom/image-upload/test/fixtures.js.map +1 -1
  109. package/lib/atom/review-presentation/style.css +1 -1
  110. package/lib/atom/review-presentation/test/fixtures/default.js +2 -2
  111. package/lib/atom/review-presentation/test/fixtures/default.js.map +1 -1
  112. package/lib/molecule/brand-form-group/test/fixtures.js +0 -3
  113. package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
  114. package/lib/{atom → molecule}/checkbox-with-title/test/fixtures.js +4 -4
  115. package/lib/molecule/checkbox-with-title/test/fixtures.js.map +1 -0
  116. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  117. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  118. package/lib/molecule/course-section/test/fixtures.js +0 -9
  119. package/lib/molecule/course-section/test/fixtures.js.map +1 -1
  120. package/lib/molecule/course-sections/test/fixtures.js +0 -3
  121. package/lib/molecule/course-sections/test/fixtures.js.map +1 -1
  122. package/lib/molecule/news/index.js +1 -2
  123. package/lib/molecule/news/index.js.map +1 -1
  124. package/lib/molecule/popin/index.js +2 -2
  125. package/lib/molecule/popin/index.js.map +1 -1
  126. package/lib/molecule/questions/qcm/index.js +7 -9
  127. package/lib/molecule/questions/qcm/index.js.map +1 -1
  128. package/lib/molecule/questions/qcm/style.css +4 -0
  129. package/lib/molecule/questions/qcm/test/qcm.js +2 -2
  130. package/lib/molecule/questions/qcm/test/qcm.js.map +1 -1
  131. package/lib/molecule/questions/qcm-drag/index.js +12 -14
  132. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  133. package/lib/molecule/questions/qcm-drag/style.css +4 -0
  134. package/lib/molecule/questions/qcm-graphic/index.js +8 -10
  135. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  136. package/lib/molecule/questions/qcm-graphic/style.css +5 -1
  137. package/lib/molecule/questions/question-range/index.js +6 -8
  138. package/lib/molecule/questions/question-range/index.js.map +1 -1
  139. package/lib/molecule/questions/question-range/style.css +4 -0
  140. package/lib/molecule/review-card-congrats/index.js +1 -1
  141. package/lib/molecule/review-card-congrats/index.js.map +1 -1
  142. package/lib/molecule/search/test/fixtures.js +25 -0
  143. package/lib/molecule/search/test/fixtures.js.map +1 -0
  144. package/lib/molecule/setup-slide/test/fixtures.js +0 -3
  145. package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
  146. package/lib/molecule/share/index.js +1 -1
  147. package/lib/molecule/share/index.js.map +1 -1
  148. package/lib/molecule/skill-card/style.css +9 -1
  149. package/lib/organism/brand-form/test/fixtures.js +0 -6
  150. package/lib/organism/brand-form/test/fixtures.js.map +1 -1
  151. package/lib/organism/course-selection/test/fixtures.js +0 -3
  152. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  153. package/lib/organism/playlist-translation/test/fixtures.js +25 -0
  154. package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
  155. package/lib/organism/review-skills/style.css +10 -1
  156. package/lib/organism/search-and-chips-results/test/fixtures.js +0 -3
  157. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  158. package/lib/organism/wizard-contents/test/fixtures/certification-general-settings-edit.js.map +1 -1
  159. package/lib/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -1
  160. package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -1
  161. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -1
  162. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -1
  163. package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
  164. package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -1
  165. package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -1
  166. package/lib/organism/wizard-contents/test/fixtures.js +0 -6
  167. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  168. package/lib/template/app-review/root-view/common.js +11 -0
  169. package/lib/template/app-review/root-view/common.js.map +1 -0
  170. package/lib/template/app-review/root-view/prop-types.js +15 -3
  171. package/lib/template/app-review/root-view/prop-types.js.map +1 -1
  172. package/lib/template/app-review/root-view/root-view.js +4 -38
  173. package/lib/template/app-review/root-view/root-view.js.map +1 -1
  174. package/lib/template/app-review/root-view/root-view.native.js +6 -4
  175. package/lib/template/app-review/root-view/root-view.native.js.map +1 -1
  176. package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
  177. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  178. package/lib/template/external-course/test/fixtures.js +0 -6
  179. package/lib/template/external-course/test/fixtures.js.map +1 -1
  180. package/lib/template/{app-review/review-dashboard-skills → review-dashboard-skills}/index.js +2 -2
  181. package/lib/template/review-dashboard-skills/index.js.map +1 -0
  182. package/{es/template/app-review → lib/template}/review-dashboard-skills/style.css +2 -3
  183. package/lib/template/{app-review/review-dashboard-skills → review-dashboard-skills}/test/fixtures/loading.js +2 -2
  184. package/lib/template/review-dashboard-skills/test/fixtures/loading.js.map +1 -0
  185. package/lib/template/{app-review/review-dashboard-skills → review-dashboard-skills}/test/fixtures/many-skills.js +2 -2
  186. package/lib/template/review-dashboard-skills/test/fixtures/many-skills.js.map +1 -0
  187. package/lib/template/{app-review/review-dashboard-skills → review-dashboard-skills}/test/fixtures/no-skills.js +2 -2
  188. package/lib/template/review-dashboard-skills/test/fixtures/no-skills.js.map +1 -0
  189. package/package.json +3 -3
  190. package/es/atom/checkbox-with-title/test/fixtures.js +0 -15
  191. package/es/atom/checkbox-with-title/test/fixtures.js.map +0 -1
  192. package/es/atom/cta/test/hover.js +0 -42
  193. package/es/atom/cta/test/hover.js.map +0 -1
  194. package/es/atom/input-text-with-title/test/fixtures.js +0 -15
  195. package/es/atom/input-text-with-title/test/fixtures.js.map +0 -1
  196. package/es/atom/lottie-wrapper/test/fixtures.js +0 -19
  197. package/es/atom/lottie-wrapper/test/fixtures.js.map +0 -1
  198. package/es/atom/review-background/test/fixtures.js +0 -13
  199. package/es/atom/review-background/test/fixtures.js.map +0 -1
  200. package/es/atom/review-presentation/test/fixtures.js +0 -13
  201. package/es/atom/review-presentation/test/fixtures.js.map +0 -1
  202. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -17
  203. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
  204. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -15
  205. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
  206. package/es/molecule/list-badges/test/fixtures.js +0 -19
  207. package/es/molecule/list-badges/test/fixtures.js.map +0 -1
  208. package/es/molecule/review-card-congrats/test/fixtures.js +0 -15
  209. package/es/molecule/review-card-congrats/test/fixtures.js.map +0 -1
  210. package/es/molecule/skill-card/test/fixtures.js +0 -19
  211. package/es/molecule/skill-card/test/fixtures.js.map +0 -1
  212. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -19
  213. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
  214. package/es/organism/review-congrats/test/fixtures.js +0 -13
  215. package/es/organism/review-congrats/test/fixtures.js.map +0 -1
  216. package/es/organism/review-header/test/fixtures.js +0 -25
  217. package/es/organism/review-header/test/fixtures.js.map +0 -1
  218. package/es/organism/review-skills/test/fixtures.js +0 -17
  219. package/es/organism/review-skills/test/fixtures.js.map +0 -1
  220. package/es/organism/rewards-form/test/fixtures.js +0 -19
  221. package/es/organism/rewards-form/test/fixtures.js.map +0 -1
  222. package/es/template/app-review/review-dashboard-skills/index.js.map +0 -1
  223. package/es/template/app-review/review-dashboard-skills/test/fixtures/loading.js +0 -10
  224. package/es/template/app-review/review-dashboard-skills/test/fixtures/loading.js.map +0 -1
  225. package/es/template/app-review/review-dashboard-skills/test/fixtures/many-skills.js +0 -10
  226. package/es/template/app-review/review-dashboard-skills/test/fixtures/many-skills.js.map +0 -1
  227. package/es/template/app-review/review-dashboard-skills/test/fixtures/no-skills.js +0 -10
  228. package/es/template/app-review/review-dashboard-skills/test/fixtures/no-skills.js.map +0 -1
  229. package/es/template/app-review/review-dashboard-skills/test/fixtures.js +0 -17
  230. package/es/template/app-review/review-dashboard-skills/test/fixtures.js.map +0 -1
  231. package/es/template/app-review/slides-review/test/fixtures.js +0 -19
  232. package/es/template/app-review/slides-review/test/fixtures.js.map +0 -1
  233. package/es/template/review-dashboard-skills/test/fixtures.js +0 -17
  234. package/es/template/review-dashboard-skills/test/fixtures.js.map +0 -1
  235. package/es/template/slides-review/test/fixtures.js +0 -19
  236. package/es/template/slides-review/test/fixtures.js.map +0 -1
  237. package/lib/atom/checkbox-with-title/test/fixtures.js.map +0 -1
  238. package/lib/atom/cta/test/hover.js +0 -54
  239. package/lib/atom/cta/test/hover.js.map +0 -1
  240. package/lib/atom/input-text-with-title/test/fixtures.js +0 -25
  241. package/lib/atom/input-text-with-title/test/fixtures.js.map +0 -1
  242. package/lib/atom/lottie-wrapper/test/fixtures.js +0 -31
  243. package/lib/atom/lottie-wrapper/test/fixtures.js.map +0 -1
  244. package/lib/atom/review-background/test/fixtures.js +0 -22
  245. package/lib/atom/review-background/test/fixtures.js.map +0 -1
  246. package/lib/atom/review-presentation/test/fixtures.js +0 -22
  247. package/lib/atom/review-presentation/test/fixtures.js.map +0 -1
  248. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -28
  249. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
  250. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -25
  251. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
  252. package/lib/molecule/list-badges/test/fixtures.js +0 -31
  253. package/lib/molecule/list-badges/test/fixtures.js.map +0 -1
  254. package/lib/molecule/review-card-congrats/test/fixtures.js +0 -25
  255. package/lib/molecule/review-card-congrats/test/fixtures.js.map +0 -1
  256. package/lib/molecule/skill-card/test/fixtures.js +0 -31
  257. package/lib/molecule/skill-card/test/fixtures.js.map +0 -1
  258. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -31
  259. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
  260. package/lib/organism/review-congrats/test/fixtures.js +0 -22
  261. package/lib/organism/review-congrats/test/fixtures.js.map +0 -1
  262. package/lib/organism/review-header/test/fixtures.js +0 -40
  263. package/lib/organism/review-header/test/fixtures.js.map +0 -1
  264. package/lib/organism/review-skills/test/fixtures.js +0 -28
  265. package/lib/organism/review-skills/test/fixtures.js.map +0 -1
  266. package/lib/organism/rewards-form/test/fixtures.js +0 -31
  267. package/lib/organism/rewards-form/test/fixtures.js.map +0 -1
  268. package/lib/template/app-review/review-dashboard-skills/index.js.map +0 -1
  269. package/lib/template/app-review/review-dashboard-skills/test/fixtures/loading.js.map +0 -1
  270. package/lib/template/app-review/review-dashboard-skills/test/fixtures/many-skills.js.map +0 -1
  271. package/lib/template/app-review/review-dashboard-skills/test/fixtures/no-skills.js.map +0 -1
  272. package/lib/template/app-review/review-dashboard-skills/test/fixtures.js +0 -28
  273. package/lib/template/app-review/review-dashboard-skills/test/fixtures.js.map +0 -1
  274. package/lib/template/app-review/slides-review/test/fixtures.js +0 -31
  275. package/lib/template/app-review/slides-review/test/fixtures.js.map +0 -1
  276. package/lib/template/review-dashboard-skills/test/fixtures.js +0 -28
  277. package/lib/template/review-dashboard-skills/test/fixtures.js.map +0 -1
  278. package/lib/template/slides-review/test/fixtures.js +0 -31
  279. package/lib/template/slides-review/test/fixtures.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/image-upload/test/fixtures.js"],"names":["t","pass","AtomImageUpload","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCleanModified","fixtureDefault","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureDisabled","fixtureEmail","fixtureMobile","fixtureModified"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAA2GO,sBAA3G;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,+EAAL,EAAsFF,wBAAtF,EAA4GN,SAA5G,EAA6HS,wCAA7H;AACA,kBAAK,8EAAL,EAAqFH,wBAArF,EAA2GN,SAA3G,EAA4HU,uCAA5H;AACA,kBAAK,uEAAL,EAA8EJ,wBAA9E,EAAoGN,SAApG,EAAqHW,gCAArH;AACA,kBAAK,yEAAL,EAAgFL,wBAAhF,EAAsGN,SAAtG,EAAuHY,kCAAvH;AACA,kBAAK,uDAAL,EAA8DN,wBAA9D,EAAoFN,SAApF,EAAqGa,gBAArG;AACA,kBAAK,wDAAL,EAA+DP,wBAA/D,EAAqFN,SAArF,EAAsGc,iBAAtG;AACA,kBAAK,qDAAL,EAA4DR,wBAA5D,EAAkFN,SAAlF,EAAmGe,cAAnG;AACA,kBAAK,sDAAL,EAA6DT,wBAA7D,EAAmFN,SAAnF,EAAoGgB,eAApG;AACA,kBAAK,wDAAL,EAA+DV,wBAA/D,EAAqFN,SAArF,EAAsGiB,iBAAtG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomImageUpload from '..';\nimport fixtureCleanModified from './fixtures/clean-modified';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDesktopResetDescriptionMultiple from './fixtures/desktop-reset-description-multiple';\nimport fixtureDesktopResetDescriptionOnlyPng from './fixtures/desktop-reset-description-only-png';\nimport fixtureDesktopResetDescription from './fixtures/desktop-reset-description';\nimport fixtureDesktopResetNoDescription from './fixtures/desktop-reset-no-description';\nimport fixtureDesktop from './fixtures/desktop';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmail from './fixtures/email';\nimport fixtureMobile from './fixtures/mobile';\nimport fixtureModified from './fixtures/modified';\n\ntest('Atom › AtomImageUpload > should have valid propTypes', t => {\n t.pass();\n forEach(AtomImageUpload.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomImageUpload.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomImageUpload › CleanModified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureCleanModified);\ntest('Atom › AtomImageUpload › Default › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDefault);\ntest('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionMultiple);\ntest('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionOnlyPng);\ntest('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescription);\ntest('Atom › AtomImageUpload › DesktopResetNoDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetNoDescription);\ntest('Atom › AtomImageUpload › Desktop › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktop);\ntest('Atom › AtomImageUpload › Disabled › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDisabled);\ntest('Atom › AtomImageUpload › Email › should be rendered', renderComponentMacro, AtomImageUpload, fixtureEmail);\ntest('Atom › AtomImageUpload › Mobile › should be rendered', renderComponentMacro, AtomImageUpload, fixtureMobile);\ntest('Atom › AtomImageUpload › Modified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureModified);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/image-upload/test/fixtures.js"],"names":["t","pass","AtomImageUpload","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureEmail","fixtureMobile","fixtureModified","fixtureWithoutImage"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,+EAAL,EAAsFG,wBAAtF,EAA4GN,SAA5G,EAA6HO,wCAA7H;AACA,kBAAK,8EAAL,EAAqFD,wBAArF,EAA2GN,SAA3G,EAA4HQ,uCAA5H;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAAqHS,gCAArH;AACA,kBAAK,yEAAL,EAAgFH,wBAAhF,EAAsGN,SAAtG,EAAuHU,kCAAvH;AACA,kBAAK,uDAAL,EAA8DJ,wBAA9D,EAAoFN,SAApF,EAAqGW,gBAArG;AACA,kBAAK,qDAAL,EAA4DL,wBAA5D,EAAkFN,SAAlF,EAAmGY,cAAnG;AACA,kBAAK,sDAAL,EAA6DN,wBAA7D,EAAmFN,SAAnF,EAAoGa,eAApG;AACA,kBAAK,wDAAL,EAA+DP,wBAA/D,EAAqFN,SAArF,EAAsGc,iBAAtG;AACA,kBAAK,4DAAL,EAAmER,wBAAnE,EAAyFN,SAAzF,EAA0Ge,qBAA1G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomImageUpload from '..';\nimport fixtureDesktopResetDescriptionMultiple from './fixtures/desktop-reset-description-multiple';\nimport fixtureDesktopResetDescriptionOnlyPng from './fixtures/desktop-reset-description-only-png';\nimport fixtureDesktopResetDescription from './fixtures/desktop-reset-description';\nimport fixtureDesktopResetNoDescription from './fixtures/desktop-reset-no-description';\nimport fixtureDesktop from './fixtures/desktop';\nimport fixtureEmail from './fixtures/email';\nimport fixtureMobile from './fixtures/mobile';\nimport fixtureModified from './fixtures/modified';\nimport fixtureWithoutImage from './fixtures/without-image';\n\ntest('Atom › AtomImageUpload > should have valid propTypes', t => {\n t.pass();\n forEach(AtomImageUpload.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomImageUpload.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionMultiple);\ntest('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionOnlyPng);\ntest('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescription);\ntest('Atom › AtomImageUpload › DesktopResetNoDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetNoDescription);\ntest('Atom › AtomImageUpload › Desktop › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktop);\ntest('Atom › AtomImageUpload › Email › should be rendered', renderComponentMacro, AtomImageUpload, fixtureEmail);\ntest('Atom › AtomImageUpload › Mobile › should be rendered', renderComponentMacro, AtomImageUpload, fixtureMobile);\ntest('Atom › AtomImageUpload › Modified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureModified);\ntest('Atom › AtomImageUpload › WithoutImage › should be rendered', renderComponentMacro, AtomImageUpload, fixtureWithoutImage);\n"],"file":"fixtures.js"}
@@ -87,7 +87,7 @@
87
87
  transition: opacity 0.8s;
88
88
  position: absolute;
89
89
  width: 103px;
90
- height: 56px;
90
+ height: auto;
91
91
  border-radius: 7px;
92
92
  background-color: cm_grey_700;
93
93
  right: -42px;
@@ -17,11 +17,11 @@ const defaultProps = {
17
17
  },
18
18
  lifes: {
19
19
  text: 'You have Infinite Lifes',
20
- tooltipText: 'This is the tooltip text'
20
+ tooltipText: 'This is the tooltip text, a tooltip text'
21
21
  },
22
22
  allright: {
23
23
  text: 'Get it all right',
24
- tooltipText: 'This is the tooltip text'
24
+ tooltipText: 'Egestas elementum duis bibendum'
25
25
  }
26
26
  }
27
27
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/atom/review-presentation/test/fixtures/default.js"],"names":["defaultProps","reviewTitle","reviewText","labelsList","skills","text","tooltipText","questions","lifes","allright","props"],"mappings":";;;;AAAO,MAAMA,YAAY,GAAG;AAC1B,gBAAc,+BADY;AAE1BC,EAAAA,WAAW,EAAE,6BAFa;AAG1BC,EAAAA,UAAU,EACR,uOAJwB;AAK1BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,MAAM,EAAE;AAACC,MAAAA,IAAI,EAAE,gBAAP;AAAyBC,MAAAA,WAAW,EAAE;AAAtC,KADE;AAEVC,IAAAA,SAAS,EAAE;AAACF,MAAAA,IAAI,EAAE,oBAAP;AAA6BC,MAAAA,WAAW,EAAE;AAA1C,KAFD;AAGVE,IAAAA,KAAK,EAAE;AAACH,MAAAA,IAAI,EAAE,yBAAP;AAAkCC,MAAAA,WAAW,EAAE;AAA/C,KAHG;AAIVG,IAAAA,QAAQ,EAAE;AAACJ,MAAAA,IAAI,EAAE,kBAAP;AAA2BC,MAAAA,WAAW,EAAE;AAAxC;AAJA;AALc,CAArB;;eAaQ;AAACI,EAAAA,KAAK,EAAEV;AAAR,C","sourcesContent":["export const defaultProps = {\n 'aria-label': 'Review Presentation Container',\n reviewTitle: 'What is<br/>Revision mode ?',\n reviewText:\n 'Egestas elementum duis bibendum velit tempus nulla arcu eget volutpat.<br/><br/>Diam tincidunt lacus, cras ullamcorper diam, sit tincidunt fames. Maecenas eros, in mollis gravida ut neque, integer a. Vel et tellus dui in integer.',\n labelsList: {\n skills: {text: 'Choose 1 Skill', tooltipText: 'This is the tooltip text'},\n questions: {text: 'Answer 5 Questions', tooltipText: 'This is the tooltip text'},\n lifes: {text: 'You have Infinite Lifes', tooltipText: 'This is the tooltip text'},\n allright: {text: 'Get it all right', tooltipText: 'This is the tooltip text'}\n }\n};\n\nexport default {props: defaultProps};\n"],"file":"default.js"}
1
+ {"version":3,"sources":["../../../../../src/atom/review-presentation/test/fixtures/default.js"],"names":["defaultProps","reviewTitle","reviewText","labelsList","skills","text","tooltipText","questions","lifes","allright","props"],"mappings":";;;;AAAO,MAAMA,YAAY,GAAG;AAC1B,gBAAc,+BADY;AAE1BC,EAAAA,WAAW,EAAE,6BAFa;AAG1BC,EAAAA,UAAU,EACR,uOAJwB;AAK1BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,MAAM,EAAE;AAACC,MAAAA,IAAI,EAAE,gBAAP;AAAyBC,MAAAA,WAAW,EAAE;AAAtC,KADE;AAEVC,IAAAA,SAAS,EAAE;AAACF,MAAAA,IAAI,EAAE,oBAAP;AAA6BC,MAAAA,WAAW,EAAE;AAA1C,KAFD;AAGVE,IAAAA,KAAK,EAAE;AACLH,MAAAA,IAAI,EAAE,yBADD;AAELC,MAAAA,WAAW,EAAE;AAFR,KAHG;AAOVG,IAAAA,QAAQ,EAAE;AAACJ,MAAAA,IAAI,EAAE,kBAAP;AAA2BC,MAAAA,WAAW,EAAE;AAAxC;AAPA;AALc,CAArB;;eAgBQ;AAACI,EAAAA,KAAK,EAAEV;AAAR,C","sourcesContent":["export const defaultProps = {\n 'aria-label': 'Review Presentation Container',\n reviewTitle: 'What is<br/>Revision mode ?',\n reviewText:\n 'Egestas elementum duis bibendum velit tempus nulla arcu eget volutpat.<br/><br/>Diam tincidunt lacus, cras ullamcorper diam, sit tincidunt fames. Maecenas eros, in mollis gravida ut neque, integer a. Vel et tellus dui in integer.',\n labelsList: {\n skills: {text: 'Choose 1 Skill', tooltipText: 'This is the tooltip text'},\n questions: {text: 'Answer 5 Questions', tooltipText: 'This is the tooltip text'},\n lifes: {\n text: 'You have Infinite Lifes',\n tooltipText: 'This is the tooltip text, a tooltip text'\n },\n allright: {text: 'Get it all right', tooltipText: 'Egestas elementum duis bibendum'}\n }\n};\n\nexport default {props: defaultProps};\n"],"file":"default.js"}
@@ -32,8 +32,6 @@ var _slider = _interopRequireDefault(require("./fixtures/slider"));
32
32
 
33
33
  var _sso = _interopRequireDefault(require("./fixtures/sso"));
34
34
 
35
- var _titleAndCheckboxWrapper = _interopRequireDefault(require("./fixtures/title-and-checkbox-wrapper"));
36
-
37
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
36
 
39
37
  (0, _ava.default)('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {
@@ -54,5 +52,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
54
52
  (0, _ava.default)('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', _renderComponent.default, _.default, _roles.default);
55
53
  (0, _ava.default)('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', _renderComponent.default, _.default, _slider.default);
56
54
  (0, _ava.default)('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', _renderComponent.default, _.default, _sso.default);
57
- (0, _ava.default)('Molecule › MoleculeBrandFormGroup › TitleAndCheckboxWrapper › should be rendered', _renderComponent.default, _.default, _titleAndCheckboxWrapper.default);
58
55
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/brand-form-group/test/fixtures.js"],"names":["t","pass","MoleculeBrandFormGroup","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCmDefault","fixtureCohort","fixtureDashboard","fixtureDefault","fixtureDoublefield","fixtureImages","fixtureLookandfeel","fixtureRoles","fixtureSlider","fixtureSso","fixtureTitleAndCheckboxWrapper"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,oEAAL,EAA2EG,wBAA3E,EAAiGN,SAAjG,EAAyHO,kBAAzH;AACA,kBAAK,qEAAL,EAA4ED,wBAA5E,EAAkGN,SAAlG,EAA0HQ,mBAA1H;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAAyHS,kBAAzH;AACA,kBAAK,iEAAL,EAAwEH,wBAAxE,EAA8FN,SAA9F,EAAsHU,eAAtH;AACA,kBAAK,oEAAL,EAA2EJ,wBAA3E,EAAiGN,SAAjG,EAAyHW,kBAAzH;AACA,kBAAK,kEAAL,EAAyEL,wBAAzE,EAA+FN,SAA/F,EAAuHY,gBAAvH;AACA,kBAAK,sEAAL,EAA6EN,wBAA7E,EAAmGN,SAAnG,EAA2Ha,oBAA3H;AACA,kBAAK,iEAAL,EAAwEP,wBAAxE,EAA8FN,SAA9F,EAAsHc,eAAtH;AACA,kBAAK,sEAAL,EAA6ER,wBAA7E,EAAmGN,SAAnG,EAA2He,oBAA3H;AACA,kBAAK,gEAAL,EAAuET,wBAAvE,EAA6FN,SAA7F,EAAqHgB,cAArH;AACA,kBAAK,iEAAL,EAAwEV,wBAAxE,EAA8FN,SAA9F,EAAsHiB,eAAtH;AACA,kBAAK,8DAAL,EAAqEX,wBAArE,EAA2FN,SAA3F,EAAmHkB,YAAnH;AACA,kBAAK,kFAAL,EAAyFZ,wBAAzF,EAA+GN,SAA/G,EAAuImB,gCAAvI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBrandFormGroup from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDoublefield from './fixtures/doublefield';\nimport fixtureImages from './fixtures/images';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureRoles from './fixtures/roles';\nimport fixtureSlider from './fixtures/slider';\nimport fixtureSso from './fixtures/sso';\nimport fixtureTitleAndCheckboxWrapper from './fixtures/title-and-checkbox-wrapper';\n\ntest('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBrandFormGroup.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBrandFormGroup.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);\ntest('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);\ntest('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);\ntest('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);\ntest('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);\ntest('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);\ntest('Molecule › MoleculeBrandFormGroup › Doublefield › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDoublefield);\ntest('Molecule › MoleculeBrandFormGroup › Images › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureImages);\ntest('Molecule › MoleculeBrandFormGroup › Lookandfeel › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureLookandfeel);\ntest('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureRoles);\ntest('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSlider);\ntest('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSso);\ntest('Molecule › MoleculeBrandFormGroup › TitleAndCheckboxWrapper › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureTitleAndCheckboxWrapper);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/brand-form-group/test/fixtures.js"],"names":["t","pass","MoleculeBrandFormGroup","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCmDefault","fixtureCohort","fixtureDashboard","fixtureDefault","fixtureDoublefield","fixtureImages","fixtureLookandfeel","fixtureRoles","fixtureSlider","fixtureSso"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,oEAAL,EAA2EG,wBAA3E,EAAiGN,SAAjG,EAAyHO,kBAAzH;AACA,kBAAK,qEAAL,EAA4ED,wBAA5E,EAAkGN,SAAlG,EAA0HQ,mBAA1H;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAAyHS,kBAAzH;AACA,kBAAK,iEAAL,EAAwEH,wBAAxE,EAA8FN,SAA9F,EAAsHU,eAAtH;AACA,kBAAK,oEAAL,EAA2EJ,wBAA3E,EAAiGN,SAAjG,EAAyHW,kBAAzH;AACA,kBAAK,kEAAL,EAAyEL,wBAAzE,EAA+FN,SAA/F,EAAuHY,gBAAvH;AACA,kBAAK,sEAAL,EAA6EN,wBAA7E,EAAmGN,SAAnG,EAA2Ha,oBAA3H;AACA,kBAAK,iEAAL,EAAwEP,wBAAxE,EAA8FN,SAA9F,EAAsHc,eAAtH;AACA,kBAAK,sEAAL,EAA6ER,wBAA7E,EAAmGN,SAAnG,EAA2He,oBAA3H;AACA,kBAAK,gEAAL,EAAuET,wBAAvE,EAA6FN,SAA7F,EAAqHgB,cAArH;AACA,kBAAK,iEAAL,EAAwEV,wBAAxE,EAA8FN,SAA9F,EAAsHiB,eAAtH;AACA,kBAAK,8DAAL,EAAqEX,wBAArE,EAA2FN,SAA3F,EAAmHkB,YAAnH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBrandFormGroup from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDoublefield from './fixtures/doublefield';\nimport fixtureImages from './fixtures/images';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureRoles from './fixtures/roles';\nimport fixtureSlider from './fixtures/slider';\nimport fixtureSso from './fixtures/sso';\n\ntest('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBrandFormGroup.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBrandFormGroup.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);\ntest('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);\ntest('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);\ntest('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);\ntest('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);\ntest('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);\ntest('Molecule › MoleculeBrandFormGroup › Doublefield › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDoublefield);\ntest('Molecule › MoleculeBrandFormGroup › Images › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureImages);\ntest('Molecule › MoleculeBrandFormGroup › Lookandfeel › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureLookandfeel);\ntest('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureRoles);\ntest('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSlider);\ntest('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSso);\n"],"file":"fixtures.js"}
@@ -14,12 +14,12 @@ var _unchecked = _interopRequireDefault(require("./fixtures/unchecked"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
 
17
- (0, _ava.default)('AtomAtomCheckboxWithTitle > should have valid propTypes', t => {
17
+ (0, _ava.default)('MoleculeMoleculeCheckboxWithTitle > should have valid propTypes', t => {
18
18
  t.pass();
19
19
  (0, _forEach.default)(_.default.propTypes, (value, key) => {
20
- t.not(value, undefined, `PropType for "Atom.AtomCheckboxWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
20
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCheckboxWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
21
21
  });
22
22
  });
23
- (0, _ava.default)('AtomAtomCheckboxWithTitle › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
24
- (0, _ava.default)('AtomAtomCheckboxWithTitle › Unchecked › should be rendered', _renderComponent.default, _.default, _unchecked.default);
23
+ (0, _ava.default)('MoleculeMoleculeCheckboxWithTitle › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
24
+ (0, _ava.default)('MoleculeMoleculeCheckboxWithTitle › Unchecked › should be rendered', _renderComponent.default, _.default, _unchecked.default);
25
25
  //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/checkbox-with-title/test/fixtures.js"],"names":["t","pass","MoleculeCheckboxWithTitle","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureUnchecked"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,oEAAL,EAA2EA,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,qEAAL,EAA4EG,wBAA5E,EAAkGN,SAAlG,EAA6HO,gBAA7H;AACA,kBAAK,uEAAL,EAA8ED,wBAA9E,EAAoGN,SAApG,EAA+HQ,kBAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCheckboxWithTitle from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Molecule › MoleculeCheckboxWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCheckboxWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCheckboxWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCheckboxWithTitle › Checked › should be rendered', renderComponentMacro, MoleculeCheckboxWithTitle, fixtureChecked);\ntest('Molecule › MoleculeCheckboxWithTitle › Unchecked › should be rendered', renderComponentMacro, MoleculeCheckboxWithTitle, fixtureUnchecked);\n"],"file":"fixtures.js"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
+
15
+ var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
20
+ t.pass();
21
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
22
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
23
+ });
24
+ });
25
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
27
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
28
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
@@ -8,14 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
- var _advancedLevel = _interopRequireDefault(require("./fixtures/advanced-level"));
12
-
13
- var _baseLevel = _interopRequireDefault(require("./fixtures/base-level"));
14
-
15
11
  var _chapter = _interopRequireDefault(require("./fixtures/chapter"));
16
12
 
17
- var _coachLevel = _interopRequireDefault(require("./fixtures/coach-level"));
18
-
19
13
  var _course = _interopRequireDefault(require("./fixtures/course"));
20
14
 
21
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -26,9 +20,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
26
20
  t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
27
21
  });
28
22
  });
29
- (0, _ava.default)('Molecule › MoleculeCourseSection › AdvancedLevel › should be rendered', _renderComponent.default, _.default, _advancedLevel.default);
30
- (0, _ava.default)('Molecule › MoleculeCourseSection › BaseLevel › should be rendered', _renderComponent.default, _.default, _baseLevel.default);
31
23
  (0, _ava.default)('Molecule › MoleculeCourseSection › Chapter › should be rendered', _renderComponent.default, _.default, _chapter.default);
32
- (0, _ava.default)('Molecule › MoleculeCourseSection › CoachLevel › should be rendered', _renderComponent.default, _.default, _coachLevel.default);
33
24
  (0, _ava.default)('Molecule › MoleculeCourseSection › Course › should be rendered', _renderComponent.default, _.default, _course.default);
34
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["t","pass","MoleculeCourseSection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdvancedLevel","fixtureBaseLevel","fixtureChapter","fixtureCoachLevel","fixtureCourse"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uEAAL,EAA8EG,wBAA9E,EAAoGN,SAApG,EAA2HO,sBAA3H;AACA,kBAAK,mEAAL,EAA0ED,wBAA1E,EAAgGN,SAAhG,EAAuHQ,kBAAvH;AACA,kBAAK,iEAAL,EAAwEF,wBAAxE,EAA8FN,SAA9F,EAAqHS,gBAArH;AACA,kBAAK,oEAAL,EAA2EH,wBAA3E,EAAiGN,SAAjG,EAAwHU,mBAAxH;AACA,kBAAK,gEAAL,EAAuEJ,wBAAvE,EAA6FN,SAA7F,EAAoHW,eAApH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureAdvancedLevel from './fixtures/advanced-level';\nimport fixtureBaseLevel from './fixtures/base-level';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoachLevel from './fixtures/coach-level';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › AdvancedLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureAdvancedLevel);\ntest('Molecule › MoleculeCourseSection › BaseLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureBaseLevel);\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › CoachLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCoachLevel);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["t","pass","MoleculeCourseSection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChapter","fixtureCourse"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iEAAL,EAAwEG,wBAAxE,EAA8FN,SAA9F,EAAqHO,gBAArH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAoHQ,eAApH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.js"}
@@ -12,8 +12,6 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
12
12
 
13
13
  var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
14
 
15
- var _withMandatoryCoursesInput = _interopRequireDefault(require("./fixtures/with-mandatory-courses-input"));
16
-
17
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
16
 
19
17
  (0, _ava.default)('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
@@ -24,5 +22,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
24
22
  });
25
23
  (0, _ava.default)('Molecule › MoleculeCourseSections › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
24
  (0, _ava.default)('Molecule › MoleculeCourseSections › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
27
- (0, _ava.default)('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', _renderComponent.default, _.default, _withMandatoryCoursesInput.default);
28
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithMandatoryCoursesInput"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH;AACA,kBAAK,oFAAL,EAA2FF,wBAA3F,EAAiHN,SAAjH,EAAyIS,kCAAzI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\ntest('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\n"],"file":"fixtures.js"}
@@ -46,8 +46,7 @@ const News = (props, context) => {
46
46
  title: title,
47
47
  className: (0, _classnames.default)(_style.default.title, _style.default.innerHTML),
48
48
  target: cta.target,
49
- "data-name": "news-title" // eslint-disable-next-line react/no-danger
50
- ,
49
+ "data-name": "news-title",
51
50
  dangerouslySetInnerHTML: {
52
51
  __html: title
53
52
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/news/index.js"],"names":["News","props","context","image","title","date","description","authorLogo","cta","style","news","href","linkImage","target","infos","innerHTML","__html","bottom","author","link","propTypes","PropTypes","string","shape","Cta"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAC/B,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,KAAR;AAAeC,IAAAA,IAAf;AAAqBC,IAAAA,WAArB;AAAkCC,IAAAA,UAAlC;AAA8CC,IAAAA;AAA9C,MAAqDP,KAA3D;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEQ,eAAMC;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAED,eAAMN;AAAtB,kBACE,6BAAC,aAAD;AACE,IAAA,IAAI,EAAEK,GAAG,CAACG,IADZ;AAEE,IAAA,SAAS,EAAEF,eAAMG,SAFnB;AAGE,IAAA,MAAM,EAAEJ,GAAG,CAACK,MAHd;AAIE,iBAAU;AAJZ,kBAME;AAAK,IAAA,GAAG,EAAEV;AAAV,IANF,CADF,CADF,eAWE;AAAK,IAAA,SAAS,EAAEM,eAAMK;AAAtB,kBACE,6BAAC,aAAD;AACE,IAAA,IAAI,EAAEN,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ourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Cta from '../../atom/cta';\nimport Link from '../../atom/link';\nimport style from './style.css';\n\nconst News = (props, context) => {\n const {image, title, date, description, authorLogo, cta} = props;\n\n return (\n <div className={style.news}>\n <div className={style.image}>\n <Link\n href={cta.href}\n className={style.linkImage}\n target={cta.target}\n data-name=\"news-image\"\n >\n <img src={image} />\n </Link>\n </div>\n <div className={style.infos}>\n <Link\n href={cta.href}\n title={title}\n className={classnames(style.title, style.innerHTML)}\n target={cta.target}\n data-name=\"news-title\"\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.date}>{date}</div>\n <div className={style.description}>\n <div\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n />\n </div>\n <div className={style.bottom}>\n <div className={style.author}>\n <img src={authorLogo} />\n </div>\n <Cta {...cta} secondary name=\"news-cta\" />\n </div>\n </div>\n <Link className={style.link} href={cta.href} target={cta.target} />\n </div>\n );\n};\n\nNews.propTypes = {\n image: PropTypes.string,\n title: PropTypes.string,\n date: PropTypes.string,\n description: PropTypes.string,\n authorLogo: PropTypes.string,\n cta: PropTypes.shape(Cta.propTypes)\n};\n\nexport default News;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/news/index.js"],"names":["News","props","context","image","title","date","description","authorLogo","cta","style","news","href","linkImage","target","infos","innerHTML","__html","bottom","author","link","propTypes","PropTypes","string","shape","Cta"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAC/B,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,KAAR;AAAeC,IAAAA,IAAf;AAAqBC,IAAAA,WAArB;AAAkCC,IAAAA,UAAlC;AAA8CC,IAAAA;AAA9C,MAAqDP,KAA3D;AAEA,sBACE;AAAK,IAAA,SA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,IAlCF,CADF;AAsCD,CAzCD;;AA2CAb,IAAI,CAACoB,SAAL,2CAAiB;AACfjB,EAAAA,KAAK,EAAEkB,mBAAUC,MADF;AAEflB,EAAAA,KAAK,EAAEiB,mBAAUC,MAFF;AAGfjB,EAAAA,IAAI,EAAEgB,mBAAUC,MAHD;AAIfhB,EAAAA,WAAW,EAAEe,mBAAUC,MAJR;AAKff,EAAAA,UAAU,EAAEc,mBAAUC,MALP;AAMfd,EAAAA,GAAG,EAAEa,mBAAUE,KAAV,CAAgBC,aAAIJ,SAApB;AANU,CAAjB;eASepB,I","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Cta from '../../atom/cta';\nimport Link from '../../atom/link';\nimport style from './style.css';\n\nconst News = (props, context) => {\n const {image, title, date, description, authorLogo, cta} = props;\n\n return (\n <div className={style.news}>\n <div className={style.image}>\n <Link\n href={cta.href}\n className={style.linkImage}\n target={cta.target}\n data-name=\"news-image\"\n >\n <img src={image} />\n </Link>\n </div>\n <div className={style.infos}>\n <Link\n href={cta.href}\n title={title}\n className={classnames(style.title, style.innerHTML)}\n target={cta.target}\n data-name=\"news-title\"\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.date}>{date}</div>\n <div className={style.description}>\n <div\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n />\n </div>\n <div className={style.bottom}>\n <div className={style.author}>\n <img src={authorLogo} />\n </div>\n <Cta {...cta} secondary name=\"news-cta\" />\n </div>\n </div>\n <Link className={style.link} href={cta.href} target={cta.target} />\n </div>\n );\n};\n\nNews.propTypes = {\n image: PropTypes.string,\n title: PropTypes.string,\n date: PropTypes.string,\n description: PropTypes.string,\n authorLogo: PropTypes.string,\n cta: PropTypes.shape(Cta.propTypes)\n};\n\nexport default News;\n"],"file":"index.js"}
@@ -60,11 +60,11 @@ const Popin = (props, context) => {
60
60
  setValue(_extends(_extends({}, value), {}, {
61
61
  [event.target.name]: event.target.value
62
62
  }));
63
- });
63
+ }, [value]);
64
64
  const isAssistancePopin = type === 'assistance';
65
65
  const handleClickOnSecondButton = (0, _react.useMemo)(() => {
66
66
  return type === 'assistance' ? onSecondeButtonClick(value) : onSecondeButtonClick;
67
- }, [value]);
67
+ }, [value, type, onSecondeButtonClick]);
68
68
  return /*#__PURE__*/_react.default.createElement("div", {
69
69
  className: _style.default.background,
70
70
  style: backgroundImageStyle
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/popin/index.js"],"names":["Popin","props","context","skin","primaryColor","header","content","firstButtonLabel","onFirstButtonClick","secondeButtonLabel","onSecondeButtonClick","onClose","type","isLoading","backgroundImageUrl","logo","hiddenStateManagment","Hide","deleteContent","Bin","videoTranslate","LocalesIcon","LogoComponent","backgroundImageStyle","backgroundImage","value","setValue","object","message","email","handleChange","event","target","name","isAssistancePopin","handleClickOnSecondButton","style","background","loader","popin","popinHeader","headerCloseIcon","icon","color","__html","width","inputText","inputTextArea","lastInputText","buttonContainer","button","backgroundColor","propTypes","PropTypes","string","func","oneOf","bool"],"mappings":";;;;;;;AAAA;;AACA;;AAGA;;AAMA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAChC,QAAM;AAACC,IAAAA;AAAD,MAASD,OAAf;AACA,QAAME,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;AACA,QAAM;AACJE,IAAAA,MADI;AAEJC,IAAAA,OAFI;AAGJC,IAAAA,gBAHI;AAIJC,IAAAA,kBAJI;AAKJC,IAAAA,kBALI;AAMJC,IAAAA,oBANI;AAOJC,IAAAA,OAPI;AAQJC,IAAAA,IARI;AASJC,IAAAA,SAAS,GAAG,KATR;AAUJC,IAAAA;AAVI,MAWFb,KAXJ;AAaA,QAAMc,IAAI,GAAG;AACXC,IAAAA,oBAAoB,EAAEC,qCADX;AAEXC,IAAAA,aAAa,EAAEC,oCAF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I,IATL;AAUhB3C,EAAAA,kBAAkB,EAAEuC,mBAAUC;AAVd,CAAlB;eAaetD,K","sourcesContent":["import React, {useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\n\nimport {\n NovaCompositionCoorpacademyLocales as LocalesIcon,\n NovaSolidStatusClose as Close,\n NovaLineContentEditionBin as Bin,\n NovaLineContentEditionHide as Hide\n} from '@coorpacademy/nova-icons';\nimport Cta from '../../atom/button';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst Popin = (props, context) => {\n const {skin} = context;\n const primaryColor = getOr('#00B0FF', 'common.primary', skin);\n const {\n header,\n content,\n firstButtonLabel,\n onFirstButtonClick,\n secondeButtonLabel,\n onSecondeButtonClick,\n onClose,\n type,\n isLoading = false,\n backgroundImageUrl\n } = props;\n\n const logo = {\n hiddenStateManagment: Hide,\n deleteContent: Bin,\n videoTranslate: LocalesIcon\n };\n\n const LogoComponent = logo[type];\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`\n }\n : {};\n\n const [value, setValue] = useState({object: '', message: '', email: ''});\n\n const handleChange = useMemo(() => event => {\n setValue({...value, [event.target.name]: event.target.value});\n });\n\n const isAssistancePopin = type === 'assistance';\n\n const handleClickOnSecondButton = useMemo(() => {\n return type === 'assistance' ? onSecondeButtonClick(value) : onSecondeButtonClick;\n }, [value]);\n\n return (\n <div className={style.background} style={backgroundImageStyle}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader data-name=\"cockpit-popin-loader\" />\n </div>\n ) : (\n <div className={style.popin}>\n <header className={style.popinHeader}>\n <Close onClick={onClose} className={style.headerCloseIcon} />\n </header>\n {LogoComponent ? (\n <LogoComponent className={style.icon} style={{color: primaryColor}} />\n ) : null}\n <div className={style.header} data-name={`cockpit-popin-header-${type}`}>\n {header}\n </div>\n <p\n className={style.content}\n data-name={`cockpit-popin-content-${type}`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n\n {isAssistancePopin ? (\n <div style={{width: '70%'}}>\n <input\n data-name=\"contact-object\"\n className={style.inputText}\n name=\"object\"\n type=\"text\"\n placeholder=\"Object\"\n value={value.object}\n onChange={handleChange}\n />\n <textarea\n className={(style.inputText, style.inputTextArea)}\n data-name=\"contact-message\"\n name=\"message\"\n type=\"text\"\n placeholder=\"Message\"\n value={value.message}\n onChange={handleChange}\n />\n <input\n className={style.lastInputText}\n data-name=\"contact-email\"\n name=\"email\"\n type=\"text\"\n placeholder=\"Email\"\n value={value.email}\n onChange={handleChange}\n />\n </div>\n ) : null}\n\n <div className={style.buttonContainer}>\n {firstButtonLabel ? (\n <Cta\n submitValue={firstButtonLabel}\n onClick={onFirstButtonClick}\n name={`cockpit-popin-cta-${type}`}\n className={style.button}\n style={{\n backgroundColor: 'white',\n color: 'gray'\n }}\n />\n ) : null}\n {secondeButtonLabel ? (\n <Cta\n submitValue={secondeButtonLabel}\n onClick={handleClickOnSecondButton}\n name={`cockpit-popin-cta-${type}`}\n className={style.button}\n style={{backgroundColor: primaryColor}}\n disabled={isAssistancePopin && !value.message}\n />\n ) : null}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nPopin.propTypes = {\n header: PropTypes.string,\n content: PropTypes.string,\n firstButtonLabel: PropTypes.string,\n onFirstButtonClick: PropTypes.func,\n secondeButtonLabel: PropTypes.string,\n onSecondeButtonClick: PropTypes.func,\n onClose: PropTypes.func,\n type: PropTypes.oneOf(['videoTranslate', 'hiddenStateManagment', 'deleteContent', 'assistance']),\n isLoading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string\n};\n\nexport default Popin;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/popin/index.js"],"names":["Popin","props","context","skin","primaryColor","header","content","firstButtonLabel","onFirstButtonClick","secondeButtonLabel","onSecondeButtonClick","onClose","type","isLoading","backgroundImageUrl","logo","hiddenStateManagment","Hide","deleteContent","Bin","videoTranslate","LocalesIcon","LogoComponent","backgroundImageStyle","backgroundImage","value","setValue","object","message","email","handleChange","event","target","name","isAssistancePopin","handleClickOnSecondButton","style","background","loader","popin","popinHeader","headerCloseIcon","icon","color","__html","width","inputText","inputTextArea","lastInputText","buttonContainer","button","backgroundColor","propTypes","PropTypes","string","func","oneOf","bool"],"mappings":";;;;;;;AAAA;;AACA;;AAGA;;AAMA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAChC,QAAM;AAACC,IAAAA;AAAD,MAASD,OAAf;AACA,QAAME,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;AACA,QAAM;AACJE,IAAAA,MADI;AAEJC,IAAAA,OAFI;AAGJC,IAAAA,gBAHI;AAIJC,IAAAA,kBAJI;AAKJC,IAAAA,kBALI;AAMJC,IAAAA,oBANI;AAOJC,IAAAA,OAPI;AAQJC,IAAAA,IARI;AASJC,IAAAA,SAAS,GAAG,KATR;AAUJC,IAAAA;AAVI,MAWFb,KAXJ;AAaA,QAAMc,IAAI,GAAG;AACXC,IAAAA,oBAAoB,EAAEC,qCADX;AAEXC,IAAAA,aAAa,EAAEC,oCAFJ;AAGXC,IAAAA,cAAc,EAAEC;AAHL,GAAb;AAMA,QAAMC,aAAa,GAAGP,IAAI,CAACH,IAAD,CAA1B;AACA,QAAMW,oBAAoB,GAAGT,kBAAkB,GAC3C;AACEU,IAAAA,eAAe,EAAG,OAAMV,kBAAmB;AAD7C,GAD2C,GAI3C,EAJJ;AAMA,QAAM,CAACW,KAAD,EAAQC,QAAR,IAAoB,qBAAS;AAACC,IAAAA,MAAM,EAAE,EAAT;AAAaC,IAAAA,OAAO,EAAE,EAAtB;AAA0BC,IAAAA,KAAK,EAAE;AAAjC,GAAT,CAA1B;AAEA,QAAMC,YAAY,GAAG,oBACnB,MAAMC,KAAK,IAAI;AACbL,IAAAA,QAAQ,uBAAKD,KAAL;AAAY,OAACM,K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,EAAE0B,yBAFX;AAGE,IAAA,IAAI,EAAG,qBAAoBvB,IAAK,EAHlC;AAIE,IAAA,SAAS,EAAEwB,eAAMc,MAJnB;AAKE,IAAA,KAAK,EAAE;AAACC,MAAAA,eAAe,EAAE/C;AAAlB,KALT;AAME,IAAA,QAAQ,EAAE8B,iBAAiB,IAAI,CAACT,KAAK,CAACG;AANxC,IADiB,GASf,IAtBN,CAjDF,CANJ,CADF;AAoFD,CAhID;;AAkIA5B,KAAK,CAACoD,SAAN,2CAAkB;AAChB/C,EAAAA,MAAM,EAAEgD,mBAAUC,MADF;AAEhBhD,EAAAA,OAAO,EAAE+C,mBAAUC,MAFH;AAGhB/C,EAAAA,gBAAgB,EAAE8C,mBAAUC,MAHZ;AAIhB9C,EAAAA,kBAAkB,EAAE6C,mBAAUE,IAJd;AAKhB9C,EAAAA,kBAAkB,EAAE4C,mBAAUC,MALd;AAMhB5C,EAAAA,oBAAoB,EAAE2C,mBAAUE,IANhB;AAOhB5C,EAAAA,OAAO,EAAE0C,mBAAUE,IAPH;AAQhB3C,EAAAA,IAAI,EAAEyC,mBAAUG,KAAV,CAAgB,CAAC,gBAAD,EAAmB,sBAAnB,EAA2C,eAA3C,EAA4D,YAA5D,CAAhB,CARU;AAShB3C,EAAAA,SAAS,EAAEwC,mBAAUI,IATL;AAUhB3C,EAAAA,kBAAkB,EAAEuC,mBAAUC;AAVd,CAAlB;eAaetD,K","sourcesContent":["import React, {useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\n\nimport {\n NovaCompositionCoorpacademyLocales as LocalesIcon,\n NovaSolidStatusClose as Close,\n NovaLineContentEditionBin as Bin,\n NovaLineContentEditionHide as Hide\n} from '@coorpacademy/nova-icons';\nimport Cta from '../../atom/button';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst Popin = (props, context) => {\n const {skin} = context;\n const primaryColor = getOr('#00B0FF', 'common.primary', skin);\n const {\n header,\n content,\n firstButtonLabel,\n onFirstButtonClick,\n secondeButtonLabel,\n onSecondeButtonClick,\n onClose,\n type,\n isLoading = false,\n backgroundImageUrl\n } = props;\n\n const logo = {\n hiddenStateManagment: Hide,\n deleteContent: Bin,\n videoTranslate: LocalesIcon\n };\n\n const LogoComponent = logo[type];\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`\n }\n : {};\n\n const [value, setValue] = useState({object: '', message: '', email: ''});\n\n const handleChange = useMemo(\n () => event => {\n setValue({...value, [event.target.name]: event.target.value});\n },\n [value]\n );\n\n const isAssistancePopin = type === 'assistance';\n\n const handleClickOnSecondButton = useMemo(() => {\n return type === 'assistance' ? onSecondeButtonClick(value) : onSecondeButtonClick;\n }, [value, type, onSecondeButtonClick]);\n\n return (\n <div className={style.background} style={backgroundImageStyle}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader data-name=\"cockpit-popin-loader\" />\n </div>\n ) : (\n <div className={style.popin}>\n <header className={style.popinHeader}>\n <Close onClick={onClose} className={style.headerCloseIcon} />\n </header>\n {LogoComponent ? (\n <LogoComponent className={style.icon} style={{color: primaryColor}} />\n ) : null}\n <div className={style.header} data-name={`cockpit-popin-header-${type}`}>\n {header}\n </div>\n <p\n className={style.content}\n data-name={`cockpit-popin-content-${type}`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n\n {isAssistancePopin ? (\n <div style={{width: '70%'}}>\n <input\n data-name=\"contact-object\"\n className={style.inputText}\n name=\"object\"\n type=\"text\"\n placeholder=\"Object\"\n value={value.object}\n onChange={handleChange}\n />\n <textarea\n className={(style.inputText, style.inputTextArea)}\n data-name=\"contact-message\"\n name=\"message\"\n type=\"text\"\n placeholder=\"Message\"\n value={value.message}\n onChange={handleChange}\n />\n <input\n className={style.lastInputText}\n data-name=\"contact-email\"\n name=\"email\"\n type=\"text\"\n placeholder=\"Email\"\n value={value.email}\n onChange={handleChange}\n />\n </div>\n ) : null}\n\n <div className={style.buttonContainer}>\n {firstButtonLabel ? (\n <Cta\n submitValue={firstButtonLabel}\n onClick={onFirstButtonClick}\n name={`cockpit-popin-cta-${type}`}\n className={style.button}\n style={{\n backgroundColor: 'white',\n color: 'gray'\n }}\n />\n ) : null}\n {secondeButtonLabel ? (\n <Cta\n submitValue={secondeButtonLabel}\n onClick={handleClickOnSecondButton}\n name={`cockpit-popin-cta-${type}`}\n className={style.button}\n style={{backgroundColor: primaryColor}}\n disabled={isAssistancePopin && !value.message}\n />\n ) : null}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nPopin.propTypes = {\n header: PropTypes.string,\n content: PropTypes.string,\n firstButtonLabel: PropTypes.string,\n onFirstButtonClick: PropTypes.func,\n secondeButtonLabel: PropTypes.string,\n onSecondeButtonClick: PropTypes.func,\n onClose: PropTypes.func,\n type: PropTypes.oneOf(['videoTranslate', 'hiddenStateManagment', 'deleteContent', 'assistance']),\n isLoading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string\n};\n\nexport default Popin;\n"],"file":"index.js"}
@@ -15,11 +15,9 @@ var _maxBy = _interopRequireDefault(require("lodash/fp/maxBy"));
15
15
 
16
16
  var _provider = _interopRequireDefault(require("../../../atom/provider"));
17
17
 
18
- var _style = require("../../../atom/label/style.css");
19
-
20
18
  var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-from-primary");
21
19
 
22
- var _style2 = _interopRequireDefault(require("./style.css"));
20
+ var _style = _interopRequireDefault(require("./style.css"));
23
21
 
24
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
23
 
@@ -47,12 +45,12 @@ const QCM = (props, context) => {
47
45
  selected,
48
46
  'aria-label': ariaLabel
49
47
  } = answer;
50
- const longAnswerClass = longestAnswer.title === title ? _style2.default.longestAnswer : _style2.default.answer;
51
- const selectedAnswerClass = selected ? _style2.default.selectedAnswer : _style2.default.unselectedAnswer;
48
+ const longAnswerClass = longestAnswer.title === title ? _style.default.longestAnswer : _style.default.answer;
49
+ const selectedAnswerClass = selected ? _style.default.selectedAnswer : _style.default.unselectedAnswer;
52
50
  return /*#__PURE__*/_react.default.createElement("div", {
53
51
  "data-name": "answer",
54
52
  "aria-label": ariaLabel || title,
55
- className: (0, _classnames.default)(longAnswerClass, _style.innerHTML, selectedAnswerClass),
53
+ className: (0, _classnames.default)(longAnswerClass, _style.default.innerHTML, selectedAnswerClass),
56
54
  onClick: onClick,
57
55
  style: _extends({}, selected && {
58
56
  boxShadow: `0 4px 16px ${(0, _getShadowBoxColorFromPrimary.getShadowBoxColorFromPrimary)(primarySkinColor)}`
@@ -66,10 +64,10 @@ const QCM = (props, context) => {
66
64
  /* cm_grey_75 */
67
65
 
68
66
  },
69
- className: _style2.default.background
67
+ className: _style.default.background
70
68
  }), /*#__PURE__*/_react.default.createElement("span", {
71
69
  "data-name": "answer-label",
72
- className: _style2.default.answerText // eslint-disable-next-line react/no-danger
70
+ className: _style.default.answerText // eslint-disable-next-line react/no-danger
73
71
  ,
74
72
  dangerouslySetInnerHTML: {
75
73
  __html: title
@@ -78,7 +76,7 @@ const QCM = (props, context) => {
78
76
  }), [answers, longestAnswer, primarySkinColor]);
79
77
  return /*#__PURE__*/_react.default.createElement("div", {
80
78
  "data-name": "qcm",
81
- className: _style2.default.wrapper
79
+ className: _style.default.wrapper
82
80
  }, answersViews);
83
81
  };
84
82
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm/index.js"],"names":["QCM","props","context","answers","longestAnswer","title","length","skin","primarySkinColor","answersViews","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","innerHTML","boxShadow","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAA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E,MAAA,SAAS,EAAEP,gBAAMQ,UAFnB,CAGE;AAHF;AAIE,MAAA,uBAAuB,EAAE;AAACC,QAAAA,MAAM,EAAErB;AAAT;AAJ3B,MAlBF,CADF;AA2BD,GAhCD,CAFiB,EAmCnB,CAACF,OAAD,EAAUC,aAAV,EAAyBI,gBAAzB,CAnCmB,CAArB;AAsCA,sBACE;AAAK,iBAAU,KAAf;AAAqB,IAAA,SAAS,EAAES,gBAAMU;AAAtC,KACGlB,YADH,CADF;AAKD,CAjDD;;AAmDAT,GAAG,CAAC4B,YAAJ,GAAmB;AACjBrB,EAAAA,IAAI,EAAEsB,kBAASC,iBAAT,CAA2BvB;AADhB,CAAnB;AAIAP,GAAG,CAAC+B,SAAJ,2CAAgB;AACd5B,EAAAA,OAAO,EAAE6B,mBAAUC,OAAV,CACPD,mBAAUE,KAAV,CAAgB;AACd7B,IAAAA,KAAK,EAAE2B,mBAAUG,MADH;AAEdrB,IAAAA,QAAQ,EAAEkB,mBAAUI,IAFN;AAGdvB,IAAAA,OAAO,EAAEmB,mBAAUK,IAHL;AAId,kBAAcL,mBAAUG;AAJV,GAAhB,CADO;AADK,CAAhB;eAWenC,G","sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider from '../../../atom/provider';\nimport {innerHTML} from '../../../atom/label/style.css';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, context) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/questions/qcm/index.js"],"names":["QCM","props","context","answers","longestAnswer","title","length","skin","primarySkinColor","answersViews","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","innerHTML","boxShadow","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAC9B,QAAM;AAACC,IAAAA;AAAD,MAAYF,KAAlB;AACA,QAAMG,aAAa,GAAG,oBAAM,CAAC;AAACC,IAAAA;AAAD,GAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCH,OAAj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AAD,EAAUC,aAAV,EAAyBI,gBAAzB,CAnCmB,CAArB;AAsCA,sBACE;AAAK,iBAAU,KAAf;AAAqB,IAAA,SAAS,EAAES,eAAMU;AAAtC,KACGlB,YADH,CADF;AAKD,CAjDD;;AAmDAT,GAAG,CAAC4B,YAAJ,GAAmB;AACjBrB,EAAAA,IAAI,EAAEsB,kBAASC,iBAAT,CAA2BvB;AADhB,CAAnB;AAIAP,GAAG,CAAC+B,SAAJ,2CAAgB;AACd5B,EAAAA,OAAO,EAAE6B,mBAAUC,OAAV,CACPD,mBAAUE,KAAV,CAAgB;AACd7B,IAAAA,KAAK,EAAE2B,mBAAUG,MADH;AAEdrB,IAAAA,QAAQ,EAAEkB,mBAAUI,IAFN;AAGdvB,IAAAA,OAAO,EAAEmB,mBAAUK,IAHL;AAId,kBAAcL,mBAAUG;AAJV,GAAhB,CADO;AADK,CAAhB;eAWenC,G","sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, context) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"file":"index.js"}
@@ -105,3 +105,7 @@
105
105
  padding: 8px 24px;
106
106
  }
107
107
  }
108
+
109
+ .innerHTML {
110
+ composes: innerHTML from '../../../atom/label/style.css'
111
+ }
@@ -99,10 +99,10 @@ const translate = _identity2.default;
99
99
  const answer = wrapper.find('[data-name="answer"]'); // regular answer
100
100
 
101
101
  t.true(answer.at(4).exists());
102
- t.is(answer.at(4).props().className, 'qcm__answer label__innerHTML qcm__selectedAnswer'); // long answer
102
+ t.is(answer.at(4).props().className, 'qcm__answer qcm__innerHTML label__innerHTML qcm__selectedAnswer'); // long answer
103
103
 
104
104
  t.true(answer.at(5).exists());
105
- t.is(answer.at(5).props().className, 'qcm__longestAnswer qcm__answer qcm__answer label__innerHTML qcm__unselectedAnswer');
105
+ t.is(answer.at(5).props().className, 'qcm__longestAnswer qcm__answer qcm__answer qcm__innerHTML label__innerHTML qcm__unselectedAnswer');
106
106
  t.pass();
107
107
  });
108
108
  (0, _ava.default)('should use title as default aria-label if no aria-label is provided', t => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/qcm/test/qcm.js"],"names":["adapter","Adapter","translate","t","answerWasClicked","defaultFixture","props","answers","onClick","wrapper","context","find","true","at","exists","is","simulate","pass","unselectedAnswer","expectedPrimaryColor","deepEqual","style","unselectedLabel","children","falsy","dangerouslySetInnerHTML","__html","text","unselectedBackground","backgroundColor","selectedAnswer","boxShadow","selectedLabel","selectedBackground","answer","className","noAriaLabelFixture"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA;AACA,uBAAU;AAACA,EAAAA,OAAO,EAAE,IAAIC,2BAAJ;AAAV,CAAV;AACA,MAAMC,SAAS,qBAAf;AAEA,kBAAK,4DAAL,EAAmEC,CAAC,IAAI;AACtE,MAAIC,gBAAgB,GAAG,KAAvB;AACAC,mBAAeC,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,0BACKF,iBAAeC,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,CADL;AAEEC,IAAAA,OAAO,EAAE,MAAM;AACbJ,MAAAA,gBAAgB,GAAG,IAAnB;AACD;AAJH;AAMA,QAAMK,OAAO,GAAG,mCAAQ,6BAAC,SAAD,EAASJ,iBAAeC,KAAxB,CAAR,EAA2C;AACzDI,IAAAA,OAAO,EAAE;AAACR,MAAAA;AAAD;AADgD,GAA3C,CAAhB;AAGA,QAAMK,OAAO,GAAGE,OAAO,CAACE,IAAR,CAAa,sBAAb,CAAhB;AACAR,EAAAA,CAAC,CAACS,IAAF,CAAOL,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcC,MAAd,EAAP;AACAX,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcP,KAAd,GAAsB,YAAtB,CAAL,EAA0C,aAA1C;AACAC,EAAAA,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcG,QAAd,CAAuB,OAAvB,EAAgC,EAAhC;AACAb,EAAAA,CAAC,CAACS,IAAF,CAAOR,gBAAP;AACAD,EAAAA,CAAC,CAACc,IAAF;AACD,CAjBD;AAmBA,kBAAK,0EAAL,EAAiFd,CAAC,IAAI;A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,CAGtF;;AACAR,EAAAA,CAAC,CAACS,IAAF,CAAOsB,MAAM,CAACrB,EAAP,CAAU,CAAV,EAAaC,MAAb,EAAP;AACAX,EAAAA,CAAC,CAACY,EAAF,CAAKmB,MAAM,CAACrB,EAAP,CAAU,CAAV,EAAaP,KAAb,GAAqB6B,SAA1B,EAAqC,kDAArC,EALsF,CAOtF;;AACAhC,EAAAA,CAAC,CAACS,IAAF,CAAOsB,MAAM,CAACrB,EAAP,CAAU,CAAV,EAAaC,MAAb,EAAP;AACAX,EAAAA,CAAC,CAACY,EAAF,CACEmB,MAAM,CAACrB,EAAP,CAAU,CAAV,EAAaP,KAAb,GAAqB6B,SADvB,EAEE,mFAFF;AAIAhC,EAAAA,CAAC,CAACc,IAAF;AACD,CAdD;AAgBA,kBAAK,qEAAL,EAA4Ed,CAAC,IAAI;AAC/E,QAAMM,OAAO,GAAG,iCAAM,6BAAC,SAAD,EAAS2B,oBAAmB9B,KAA5B,CAAN,CAAhB;AACA,QAAMC,OAAO,GAAGE,OAAO,CAACE,IAAR,CAAa,sBAAb,CAAhB;AACAR,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcc,IAAd,EAAL,EAA2B,mBAA3B;AACAxB,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcP,KAAd,GAAsB,YAAtB,CAAL,EAA0C,mBAA1C;AACAH,EAAAA,CAAC,CAACc,IAAF;AACD,CAND","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, mount, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from '@wojtekmaj/enzyme-adapter-react-17';\nimport Qcm from '..';\nimport defaultFixture from './fixtures/default';\nimport noAriaLabelFixture from './fixtures/no-selected';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n const wrapper = shallow(<Qcm {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.true(answers.at(1).exists());\n t.is(answers.at(1).props()['aria-label'], 'aria Answer');\n answers.at(1).simulate('click', {});\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary, unselected's no background\", t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n const unselectedAnswer = answers.at(1);\n const expectedPrimaryColor = '#00B0FF';\n // ---- unselected ----\n // should not have styles on the wrapper\n t.true(unselectedAnswer.exists());\n t.deepEqual(unselectedAnswer.props().style, {});\n\n // should not have any styles (color should be picked from the css for unselected)\n const unselectedLabel = unselectedAnswer.children().at(1);\n t.true(unselectedLabel.exists());\n t.falsy(unselectedLabel.props().style);\n\n // check dangerouslySetInnerHTML\n t.deepEqual(unselectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem ipsum'\n });\n t.is(unselectedLabel.text(), 'Lorem ipsum');\n\n // should have a backgroundColor of '#F4F4F5' /* cm_grey_75 */\n const unselectedBackground = unselectedAnswer.children().at(0);\n t.true(unselectedBackground.exists());\n t.deepEqual(unselectedBackground.props().style, {\n backgroundColor: '#F4F4F5'\n });\n\n // selected\n // should have box-shadow color based on primary\n const selectedAnswer = answers.at(2);\n t.true(selectedAnswer.exists());\n t.deepEqual(selectedAnswer.props().style, {\n boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'\n });\n\n // should not have any prop in label style\n const selectedLabel = selectedAnswer.children().at(1);\n t.true(selectedLabel.exists());\n t.falsy(selectedLabel.props().style);\n\n // check dangerouslySetInnerHTML\n t.deepEqual(selectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem'\n });\n\n t.is(selectedLabel.text(), 'Lorem');\n\n // should have backgroundColor as expectedPrimaryColor (primary to be overlayed by the css)\n const selectedBackground = selectedAnswer.children().at(0);\n t.true(selectedBackground.exists());\n t.deepEqual(selectedBackground.props().style, {\n backgroundColor: expectedPrimaryColor\n });\n\n t.pass();\n});\n\ntest('should set className to longAnswer if the answer is the longest of the set', t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answer = wrapper.find('[data-name=\"answer\"]');\n // regular answer\n t.true(answer.at(4).exists());\n t.is(answer.at(4).props().className, 'qcm__answer label__innerHTML qcm__selectedAnswer');\n\n // long answer\n t.true(answer.at(5).exists());\n t.is(\n answer.at(5).props().className,\n 'qcm__longestAnswer qcm__answer qcm__answer label__innerHTML qcm__unselectedAnswer'\n );\n t.pass();\n});\n\ntest('should use title as default aria-label if no aria-label is provided', t => {\n const wrapper = mount(<Qcm {...noAriaLabelFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.is(answers.at(6).text(), 'Lorem ipsum dolor');\n t.is(answers.at(6).props()['aria-label'], 'Lorem ipsum dolor');\n t.pass();\n});\n"],"file":"qcm.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/questions/qcm/test/qcm.js"],"names":["adapter","Adapter","translate","t","answerWasClicked","defaultFixture","props","answers","onClick","wrapper","context","find","true","at","exists","is","simulate","pass","unselectedAnswer","expectedPrimaryColor","deepEqual","style","unselectedLabel","children","falsy","dangerouslySetInnerHTML","__html","text","unselectedBackground","backgroundColor","selectedAnswer","boxShadow","selectedLabel","selectedBackground","answer","className","noAriaLabelFixture"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA;AACA,uBAAU;AAACA,EAAAA,OAAO,EAAE,IAAIC,2BAAJ;AAAV,CAAV;AACA,MAAMC,SAAS,qBAAf;AAEA,kBAAK,4DAAL,EAAmEC,CAAC,IAAI;AACtE,MAAIC,gBAAgB,GAAG,KAAvB;AACAC,mBAAeC,KAAf,CAAqBC,OAArB,CAA6B,CAA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IAAF;AACD,CAjBD;AAmBA,kBAAK,qEAAL,EAA4Ed,CAAC,IAAI;AAC/E,QAAMM,OAAO,GAAG,iCAAM,6BAAC,SAAD,EAAS2B,oBAAmB9B,KAA5B,CAAN,CAAhB;AACA,QAAMC,OAAO,GAAGE,OAAO,CAACE,IAAR,CAAa,sBAAb,CAAhB;AACAR,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcc,IAAd,EAAL,EAA2B,mBAA3B;AACAxB,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcP,KAAd,GAAsB,YAAtB,CAAL,EAA0C,mBAA1C;AACAH,EAAAA,CAAC,CAACc,IAAF;AACD,CAND","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, mount, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from '@wojtekmaj/enzyme-adapter-react-17';\nimport Qcm from '..';\nimport defaultFixture from './fixtures/default';\nimport noAriaLabelFixture from './fixtures/no-selected';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n const wrapper = shallow(<Qcm {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.true(answers.at(1).exists());\n t.is(answers.at(1).props()['aria-label'], 'aria Answer');\n answers.at(1).simulate('click', {});\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary, unselected's no background\", t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n const unselectedAnswer = answers.at(1);\n const expectedPrimaryColor = '#00B0FF';\n // ---- unselected ----\n // should not have styles on the wrapper\n t.true(unselectedAnswer.exists());\n t.deepEqual(unselectedAnswer.props().style, {});\n\n // should not have any styles (color should be picked from the css for unselected)\n const unselectedLabel = unselectedAnswer.children().at(1);\n t.true(unselectedLabel.exists());\n t.falsy(unselectedLabel.props().style);\n\n // check dangerouslySetInnerHTML\n t.deepEqual(unselectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem ipsum'\n });\n t.is(unselectedLabel.text(), 'Lorem ipsum');\n\n // should have a backgroundColor of '#F4F4F5' /* cm_grey_75 */\n const unselectedBackground = unselectedAnswer.children().at(0);\n t.true(unselectedBackground.exists());\n t.deepEqual(unselectedBackground.props().style, {\n backgroundColor: '#F4F4F5'\n });\n\n // selected\n // should have box-shadow color based on primary\n const selectedAnswer = answers.at(2);\n t.true(selectedAnswer.exists());\n t.deepEqual(selectedAnswer.props().style, {\n boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'\n });\n\n // should not have any prop in label style\n const selectedLabel = selectedAnswer.children().at(1);\n t.true(selectedLabel.exists());\n t.falsy(selectedLabel.props().style);\n\n // check dangerouslySetInnerHTML\n t.deepEqual(selectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem'\n });\n\n t.is(selectedLabel.text(), 'Lorem');\n\n // should have backgroundColor as expectedPrimaryColor (primary to be overlayed by the css)\n const selectedBackground = selectedAnswer.children().at(0);\n t.true(selectedBackground.exists());\n t.deepEqual(selectedBackground.props().style, {\n backgroundColor: expectedPrimaryColor\n });\n\n t.pass();\n});\n\ntest('should set className to longAnswer if the answer is the longest of the set', t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answer = wrapper.find('[data-name=\"answer\"]');\n // regular answer\n t.true(answer.at(4).exists());\n t.is(\n answer.at(4).props().className,\n 'qcm__answer qcm__innerHTML label__innerHTML qcm__selectedAnswer'\n );\n\n // long answer\n t.true(answer.at(5).exists());\n t.is(\n answer.at(5).props().className,\n 'qcm__longestAnswer qcm__answer qcm__answer qcm__innerHTML label__innerHTML qcm__unselectedAnswer'\n );\n t.pass();\n});\n\ntest('should use title as default aria-label if no aria-label is provided', t => {\n const wrapper = mount(<Qcm {...noAriaLabelFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.is(answers.at(6).text(), 'Lorem ipsum dolor');\n t.is(answers.at(6).props()['aria-label'], 'Lorem ipsum dolor');\n t.pass();\n});\n"],"file":"qcm.js"}
@@ -19,11 +19,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
20
  var _provider = _interopRequireDefault(require("../../../atom/provider"));
21
21
 
22
- var _style = require("../../../atom/label/style.css");
23
-
24
22
  var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-from-primary");
25
23
 
26
- var _style2 = _interopRequireDefault(require("./style.css"));
24
+ var _style = _interopRequireDefault(require("./style.css"));
27
25
 
28
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
27
 
@@ -38,7 +36,7 @@ const AnswersPropTypes = process.env.NODE_ENV !== "production" ? _propTypes.defa
38
36
  const EmptyView = ({
39
37
  help
40
38
  }) => /*#__PURE__*/_react.default.createElement("span", {
41
- className: _style2.default.emptySpan
39
+ className: _style.default.emptySpan
42
40
  }, help);
43
41
 
44
42
  EmptyView.contextTypes = {
@@ -58,7 +56,7 @@ const Choices = ({
58
56
  selected
59
57
  } = answer;
60
58
  return /*#__PURE__*/_react.default.createElement("div", {
61
- className: (0, _classnames.default)(selected ? _style2.default.invisibleAnswer : _style2.default.unselected, _style.innerHTML),
59
+ className: (0, _classnames.default)(selected ? _style.default.invisibleAnswer : _style.default.unselected, _style.default.innerHTML),
62
60
  "data-name": "answer",
63
61
  onClick: onClick,
64
62
  key: key // eslint-disable-next-line react/no-danger
@@ -69,7 +67,7 @@ const Choices = ({
69
67
  });
70
68
  });
71
69
  return /*#__PURE__*/_react.default.createElement("div", {
72
- className: _style2.default.choices
70
+ className: _style.default.choices
73
71
  }, answersViews);
74
72
  };
75
73
 
@@ -93,7 +91,7 @@ const SelectedAnswerSections = ({
93
91
  onClick: onClick,
94
92
  key: key,
95
93
  "data-name": "selectedAnswer",
96
- className: _style2.default.selected,
94
+ className: _style.default.selected,
97
95
  style: {
98
96
  boxShadow: `0px 4px 16px ${(0, _getShadowBoxColorFromPrimary.getShadowBoxColorFromPrimary)(backgroundColor)}`
99
97
  }
@@ -102,12 +100,12 @@ const SelectedAnswerSections = ({
102
100
  style: {
103
101
  backgroundColor
104
102
  },
105
- className: _style2.default.background
103
+ className: _style.default.background
106
104
  }), /*#__PURE__*/_react.default.createElement("div", {
107
- className: _style2.default.content
105
+ className: _style.default.content
108
106
  }, /*#__PURE__*/_react.default.createElement("span", {
109
107
  "data-name": "answerContent",
110
- className: (0, _classnames.default)(_style2.default.selectedAnswerText, _style.innerHTML),
108
+ className: (0, _classnames.default)(_style.default.selectedAnswerText, _style.default.innerHTML),
111
109
  title: title // eslint-disable-next-line react/no-danger
112
110
  ,
113
111
  dangerouslySetInnerHTML: {
@@ -118,11 +116,11 @@ const SelectedAnswerSections = ({
118
116
 
119
117
  if (selectedAnswersViews.length > 0) {
120
118
  return /*#__PURE__*/_react.default.createElement("div", {
121
- className: _style2.default.selectedAnswers
119
+ className: _style.default.selectedAnswers
122
120
  }, selectedAnswersViews);
123
121
  } else {
124
122
  return /*#__PURE__*/_react.default.createElement("div", {
125
- className: _style2.default.emptyAnswers
123
+ className: _style.default.emptyAnswers
126
124
  }, /*#__PURE__*/_react.default.createElement(EmptyView, {
127
125
  help: help
128
126
  }));
@@ -144,14 +142,14 @@ const QcmDrag = ({
144
142
  } = context;
145
143
  const primarySkinColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
146
144
  return /*#__PURE__*/_react.default.createElement("div", {
147
- className: _style2.default.wrapper
145
+ className: _style.default.wrapper
148
146
  }, /*#__PURE__*/_react.default.createElement(SelectedAnswerSections, {
149
147
  answers: answers,
150
148
  help: help,
151
149
  backgroundColor: primarySkinColor
152
150
  }), /*#__PURE__*/_react.default.createElement("div", {
153
151
  "data-name": "qcm-drag-answers",
154
- className: _style2.default.answers
152
+ className: _style.default.answers
155
153
  }, /*#__PURE__*/_react.default.createElement(Choices, {
156
154
  answers: answers
157
155
  })));