@coorpacademy/components 10.13.14 → 10.14.2

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 (202) 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/drag-and-drop/index.js +8 -4
  4. package/es/atom/drag-and-drop/index.js.map +1 -1
  5. package/es/atom/drag-and-drop/test/fixtures/error.js +3 -1
  6. package/es/atom/drag-and-drop/test/fixtures/error.js.map +1 -1
  7. package/es/atom/drag-and-drop/test/fixtures.js +0 -8
  8. package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
  9. package/es/atom/image-upload/test/fixtures.js +2 -4
  10. package/es/atom/image-upload/test/fixtures.js.map +1 -1
  11. package/es/atom/review-presentation/index.js +98 -0
  12. package/es/atom/review-presentation/index.js.map +1 -0
  13. package/es/atom/review-presentation/style.css +152 -0
  14. package/es/atom/review-presentation/test/fixtures/default.js +27 -0
  15. package/es/atom/review-presentation/test/fixtures/default.js.map +1 -0
  16. package/es/atom/select/test/fixtures.js +0 -4
  17. package/es/atom/select/test/fixtures.js.map +1 -1
  18. package/es/molecule/brand-form-group/test/fixtures.js +0 -2
  19. package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
  20. package/es/molecule/card/test/fixtures.js +0 -2
  21. package/es/molecule/card/test/fixtures.js.map +1 -1
  22. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  23. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  24. package/es/molecule/drag-and-drop-wrapper/index.js +3 -8
  25. package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  26. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +1 -5
  27. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
  28. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +3 -2
  29. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
  30. package/es/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js +1 -1
  31. package/es/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js.map +1 -1
  32. package/es/molecule/external-content-viewer/index.js +3 -2
  33. package/es/molecule/external-content-viewer/index.js.map +1 -1
  34. package/es/molecule/questions/free-text/test/fixtures.js +2 -4
  35. package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
  36. package/es/molecule/setup-slide/test/fixtures.js +0 -2
  37. package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
  38. package/es/molecule/wizard-summary/test/fixtures.js +0 -2
  39. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
  40. package/es/organism/brand-form/test/fixtures/wizard-certification.js +2 -2
  41. package/es/organism/brand-form/test/fixtures/wizard-certification.js.map +1 -1
  42. package/es/organism/brand-form/test/fixtures.js +0 -2
  43. package/es/organism/brand-form/test/fixtures.js.map +1 -1
  44. package/es/organism/course-selection/test/fixtures.js +0 -2
  45. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  46. package/es/organism/rewards-form/test/fixtures/default.js +2 -2
  47. package/es/organism/rewards-form/test/fixtures/default.js.map +1 -1
  48. package/es/organism/search-and-chips-results/test/fixtures.js +0 -2
  49. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  50. package/es/organism/wizard-contents/test/fixtures.js +0 -6
  51. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  52. package/es/template/app-player/popin-end/test/fixtures.js +0 -2
  53. package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
  54. package/es/template/back-office/brand-update/test/fixtures.js +0 -4
  55. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  56. package/es/template/external-course/index.js +3 -1
  57. package/es/template/external-course/index.js.map +1 -1
  58. package/es/template/external-course/test/fixtures/pdf-mobile.js +10 -0
  59. package/es/template/external-course/test/fixtures/pdf-mobile.js.map +1 -0
  60. package/es/template/external-course/test/fixtures/pdf-no-mobile.js +18 -0
  61. package/es/template/external-course/test/fixtures/pdf-no-mobile.js.map +1 -0
  62. package/lib/atom/button-link-icon-only/test/fixtures.js +0 -3
  63. package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  64. package/lib/atom/drag-and-drop/index.js +8 -4
  65. package/lib/atom/drag-and-drop/index.js.map +1 -1
  66. package/lib/atom/drag-and-drop/test/fixtures/error.js +3 -1
  67. package/lib/atom/drag-and-drop/test/fixtures/error.js.map +1 -1
  68. package/lib/atom/drag-and-drop/test/fixtures.js +0 -12
  69. package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
  70. package/lib/atom/image-upload/test/fixtures.js +3 -6
  71. package/lib/atom/image-upload/test/fixtures.js.map +1 -1
  72. package/lib/atom/review-presentation/index.js +112 -0
  73. package/lib/atom/review-presentation/index.js.map +1 -0
  74. package/lib/atom/review-presentation/style.css +152 -0
  75. package/lib/atom/review-presentation/test/fixtures/default.js +33 -0
  76. package/lib/atom/review-presentation/test/fixtures/default.js.map +1 -0
  77. package/lib/atom/select/test/fixtures.js +0 -6
  78. package/lib/atom/select/test/fixtures.js.map +1 -1
  79. package/lib/molecule/brand-form-group/test/fixtures.js +0 -3
  80. package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
  81. package/lib/molecule/card/test/fixtures.js +0 -3
  82. package/lib/molecule/card/test/fixtures.js.map +1 -1
  83. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  84. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  85. package/lib/molecule/drag-and-drop-wrapper/index.js +3 -8
  86. package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  87. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +1 -6
  88. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
  89. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +4 -2
  90. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
  91. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js +1 -1
  92. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js.map +1 -1
  93. package/lib/molecule/external-content-viewer/index.js +3 -2
  94. package/lib/molecule/external-content-viewer/index.js.map +1 -1
  95. package/lib/molecule/questions/free-text/test/fixtures.js +2 -5
  96. package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
  97. package/lib/molecule/setup-slide/test/fixtures.js +0 -3
  98. package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
  99. package/lib/molecule/wizard-summary/test/fixtures.js +0 -3
  100. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
  101. package/lib/organism/brand-form/test/fixtures/wizard-certification.js.map +1 -1
  102. package/lib/organism/brand-form/test/fixtures.js +0 -3
  103. package/lib/organism/brand-form/test/fixtures.js.map +1 -1
  104. package/lib/organism/course-selection/test/fixtures.js +0 -3
  105. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  106. package/lib/organism/rewards-form/test/fixtures/default.js +2 -2
  107. package/lib/organism/rewards-form/test/fixtures/default.js.map +1 -1
  108. package/lib/organism/search-and-chips-results/test/fixtures.js +0 -3
  109. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  110. package/lib/organism/wizard-contents/test/fixtures.js +0 -9
  111. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  112. package/lib/template/app-player/popin-end/test/fixtures.js +0 -3
  113. package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
  114. package/lib/template/back-office/brand-update/test/fixtures.js +0 -6
  115. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  116. package/lib/template/external-course/index.js +3 -1
  117. package/lib/template/external-course/index.js.map +1 -1
  118. package/lib/template/external-course/test/fixtures/pdf-mobile.js +15 -0
  119. package/lib/template/external-course/test/fixtures/pdf-mobile.js.map +1 -0
  120. package/lib/template/external-course/test/fixtures/pdf-no-mobile.js +23 -0
  121. package/lib/template/external-course/test/fixtures/pdf-no-mobile.js.map +1 -0
  122. package/package.json +3 -3
  123. package/es/atom/card-image-preview/test/fixtures.js +0 -15
  124. package/es/atom/card-image-preview/test/fixtures.js.map +0 -1
  125. package/es/atom/checkbox-with-title/test/fixtures.js +0 -15
  126. package/es/atom/checkbox-with-title/test/fixtures.js.map +0 -1
  127. package/es/atom/input-text-with-title/test/fixtures.js +0 -15
  128. package/es/atom/input-text-with-title/test/fixtures.js.map +0 -1
  129. package/es/atom/review-header-step-item/test/fixtures.js +0 -19
  130. package/es/atom/review-header-step-item/test/fixtures.js.map +0 -1
  131. package/es/molecule/course-section/test/fixtures.js +0 -21
  132. package/es/molecule/course-section/test/fixtures.js.map +0 -1
  133. package/es/molecule/course-sections/test/fixtures.js +0 -17
  134. package/es/molecule/course-sections/test/fixtures.js.map +0 -1
  135. package/es/molecule/dashboard/review-banner/test/fixtures.js +0 -13
  136. package/es/molecule/dashboard/review-banner/test/fixtures.js.map +0 -1
  137. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -17
  138. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
  139. package/es/molecule/draggable/test/fixtures.js +0 -13
  140. package/es/molecule/draggable/test/fixtures.js.map +0 -1
  141. package/es/molecule/draggable-list/test/fixtures.js +0 -15
  142. package/es/molecule/draggable-list/test/fixtures.js.map +0 -1
  143. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -15
  144. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  145. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -15
  146. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
  147. package/es/molecule/list-badges/test/fixtures.js +0 -19
  148. package/es/molecule/list-badges/test/fixtures.js.map +0 -1
  149. package/es/molecule/review-correction-popin/test/fixtures.js +0 -15
  150. package/es/molecule/review-correction-popin/test/fixtures.js.map +0 -1
  151. package/es/molecule/review-header-steps/test/fixtures.js +0 -23
  152. package/es/molecule/review-header-steps/test/fixtures.js.map +0 -1
  153. package/es/molecule/skill-card/test/fixtures.js +0 -19
  154. package/es/molecule/skill-card/test/fixtures.js.map +0 -1
  155. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -19
  156. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
  157. package/es/organism/playlist-translation/test/fixtures.js +0 -15
  158. package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
  159. package/es/organism/review-header/test/fixtures.js +0 -23
  160. package/es/organism/review-header/test/fixtures.js.map +0 -1
  161. package/es/organism/rewards-form/test/fixtures.js +0 -19
  162. package/es/organism/rewards-form/test/fixtures.js.map +0 -1
  163. package/lib/atom/card-image-preview/test/fixtures.js +0 -25
  164. package/lib/atom/card-image-preview/test/fixtures.js.map +0 -1
  165. package/lib/atom/checkbox-with-title/test/fixtures.js +0 -25
  166. package/lib/atom/checkbox-with-title/test/fixtures.js.map +0 -1
  167. package/lib/atom/input-text-with-title/test/fixtures.js +0 -25
  168. package/lib/atom/input-text-with-title/test/fixtures.js.map +0 -1
  169. package/lib/atom/review-header-step-item/test/fixtures.js +0 -31
  170. package/lib/atom/review-header-step-item/test/fixtures.js.map +0 -1
  171. package/lib/molecule/course-section/test/fixtures.js +0 -34
  172. package/lib/molecule/course-section/test/fixtures.js.map +0 -1
  173. package/lib/molecule/course-sections/test/fixtures.js +0 -28
  174. package/lib/molecule/course-sections/test/fixtures.js.map +0 -1
  175. package/lib/molecule/dashboard/review-banner/test/fixtures.js +0 -22
  176. package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +0 -1
  177. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -28
  178. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
  179. package/lib/molecule/draggable/test/fixtures.js +0 -22
  180. package/lib/molecule/draggable/test/fixtures.js.map +0 -1
  181. package/lib/molecule/draggable-list/test/fixtures.js +0 -25
  182. package/lib/molecule/draggable-list/test/fixtures.js.map +0 -1
  183. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -25
  184. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  185. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -25
  186. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
  187. package/lib/molecule/list-badges/test/fixtures.js +0 -31
  188. package/lib/molecule/list-badges/test/fixtures.js.map +0 -1
  189. package/lib/molecule/review-correction-popin/test/fixtures.js +0 -25
  190. package/lib/molecule/review-correction-popin/test/fixtures.js.map +0 -1
  191. package/lib/molecule/review-header-steps/test/fixtures.js +0 -37
  192. package/lib/molecule/review-header-steps/test/fixtures.js.map +0 -1
  193. package/lib/molecule/skill-card/test/fixtures.js +0 -31
  194. package/lib/molecule/skill-card/test/fixtures.js.map +0 -1
  195. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -31
  196. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
  197. package/lib/organism/playlist-translation/test/fixtures.js +0 -25
  198. package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
  199. package/lib/organism/review-header/test/fixtures.js +0 -37
  200. package/lib/organism/review-header/test/fixtures.js.map +0 -1
  201. package/lib/organism/rewards-form/test/fixtures.js +0 -31
  202. package/lib/organism/rewards-form/test/fixtures.js.map +0 -1
@@ -5,7 +5,6 @@ import AtomButtonLinkIconOnly from '..';
5
5
  import fixtureButtonIconBullet from './fixtures/button-icon-bullet';
6
6
  import fixtureDefault from './fixtures/default';
7
7
  import fixtureNoIcon from './fixtures/no-icon';
8
- import fixtureReviewHeader from './fixtures/review-header';
9
8
  import fixtureSmallButtonDisabled from './fixtures/small-button-disabled';
10
9
  import fixtureSmallLinkDownload from './fixtures/small-link-download';
11
10
  test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
@@ -17,7 +16,6 @@ test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
17
16
  test('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);
18
17
  test('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);
19
18
  test('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);
20
- test('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);
21
19
  test('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);
22
20
  test('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);
23
21
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureReviewHeader","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AAEAT,IAAI,CAAC,6DAAD,EAAgEU,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,sBAAsB,CAACS,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,sBAAhG,EAAwHC,uBAAxH,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,sBAAtF,EAA8GG,aAA9G,CAAJ;AACAN,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,sBAA5F,EAAoHI,mBAApH,CAAJ;AACAP,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HK,0BAA3H,CAAJ;AACAR,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,sBAAjG,EAAyHM,wBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureReviewHeader from './fixtures/review-header';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AAEAR,IAAI,CAAC,6DAAD,EAAgES,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,sBAAsB,CAACQ,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,sBAAhG,EAAwHC,uBAAxH,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,sBAAtF,EAA8GG,aAA9G,CAAJ;AACAN,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HI,0BAA3H,CAAJ;AACAP,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,sBAAjG,EAAyHK,wBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
@@ -49,7 +49,9 @@ class DragAndDrop extends React.Component {
49
49
  loading = false,
50
50
  modified = false,
51
51
  onReset = null,
52
- error = ''
52
+ error = '',
53
+ buttonAriaLabel = '',
54
+ errorButtonLabel = ''
53
55
  } = this.props;
54
56
  const {
55
57
  dragging
@@ -107,7 +109,7 @@ class DragAndDrop extends React.Component {
107
109
  const buildButton = () => {
108
110
  const defaultButtonProps = {
109
111
  label: uploadLabel,
110
- 'aria-label': 'aria button',
112
+ 'aria-label': buttonAriaLabel,
111
113
  'data-name': 'default-button',
112
114
  icon: {
113
115
  position: 'left',
@@ -119,7 +121,7 @@ class DragAndDrop extends React.Component {
119
121
  return null;
120
122
  } else if (error) {
121
123
  return /*#__PURE__*/React.createElement(Button, _extends({}, defaultButtonProps, {
122
- label: "Try again",
124
+ label: errorButtonLabel,
123
125
  icon: {}
124
126
  }));
125
127
  } else {
@@ -170,7 +172,9 @@ DragAndDrop.propTypes = process.env.NODE_ENV !== "production" ? {
170
172
  modified: PropTypes.bool,
171
173
  children: PropTypes.func,
172
174
  onReset: PropTypes.func,
173
- error: PropTypes.string
175
+ error: PropTypes.string,
176
+ buttonAriaLabel: PropTypes.string,
177
+ errorButtonLabel: PropTypes.string
174
178
  } : {};
175
179
  export default DragAndDrop;
176
180
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["React","PropTypes","NovaSolidStatusClose","Close","NovaSolidFilesBasicFileUpload2","FileUploadIcon","NovaSolidFilesBasicFileBlock2","FileUploadBlockedIcon","Loader","Button","getClassState","style","constantNull","DragAndDrop","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","error","previewView","type","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buildButton","defaultButtonProps","label","icon","position","button","previewContainer","modifiedPreviewContainer","inputWrapper","modifiedInputWrapper","errorInputWrapper","wrapper","infosContainer","iconError","dragAndDropLabel","errorMessage","propTypes","string","shape","bool","func"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SACEC,oBAAoB,IAAIC,KAD1B,EAEEC,8BAA8B,IAAIC,cAFpC,EAGEC,6BAA6B,IAAIC,qBAHnC,QAIO,0BAJP;AAKA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,gBAAnB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,YAAY,GAAG,UAAS,IAAT,CAArB;;AAEA,MAAMC,WAAN,SAA0Bb,KAAK,CAACc,SAAhC,CAA0C;AAiBxCC,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AAEA,SAAKC,KAAL,GAAa;AACXC,MAAAA,QAAQ,EAAE;AADC,KAAb;AAIA,SAAKC,eAAL,GAAuB,KAAKA,eAAL,CAAqBC,IAArB,CAA0B,IAA1B,CAAvB;AACA,SAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;AACD;;AAEDD,EAAAA,eAAe,GAAG;AAChB,SAAKG,QAAL,CAAc;AACZJ,MAAAA,QAAQ,EAAE;AADE,KAAd;AAGD;;AAEDG,EAAAA,cAAc,GAAG;AACf,SAAKC,QAAL,CAAc;AACZJ,MAAAA,QAAQ,EAAE;AADE,KAAd;AAGD;;AAEDK,EAAAA,MAAM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C,KAAKN,eAAN,EAAuB,KAAKE,cAA5B,CAAd,CAXF,CALJ,EAmBGa,KAAK,gBAAG;AAAM,MAAA,SAAS,EAAEvB,KAAK,CAACmD;AAAvB,OAAsC5B,KAAtC,CAAH,GAAyDU,YAnBjE,CADF;AAuBD;;AAvKuC;;AAApC/B,W,CACGkD,S,2CAAY;AACjBrC,EAAAA,KAAK,EAAEzB,SAAS,CAAC+D,MADA;AAEjBrC,EAAAA,WAAW,EAAE1B,SAAS,CAAC+D,MAFN;AAGjBpC,EAAAA,WAAW,EAAE3B,SAAS,CAAC+D,MAHN;AAIjBnC,EAAAA,YAAY,EAAE5B,SAAS,CAAC+D,MAJP;AAKjBlC,EAAAA,cAAc,EAAE7B,SAAS,CAACgE,KAAV,CAAgB;AAC9B7B,IAAAA,IAAI,EAAEnC,SAAS,CAAC+D,MADc;AAE9B1B,IAAAA,GAAG,EAAErC,SAAS,CAAC+D;AAFe,GAAhB,CALC;AASjBjC,EAAAA,OAAO,EAAE9B,SAAS,CAACiE,IATF;AAUjBlC,EAAAA,QAAQ,EAAE/B,SAAS,CAACiE,IAVH;AAWjBzC,EAAAA,QAAQ,EAAExB,SAAS,CAACkE,IAXH;AAYjBlC,EAAAA,OAAO,EAAEhC,SAAS,CAACkE,IAZF;AAajBjC,EAAAA,KAAK,EAAEjC,SAAS,CAAC+D;AAbA,C;AAyKrB,eAAenD,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon,\n NovaSolidFilesBasicFileBlock2 as FileUploadBlockedIcon\n} from '@coorpacademy/nova-icons';\nimport Loader from '../loader';\nimport Button from '../button-link';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func,\n error: PropTypes.string\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null,\n error = ''\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n {onReset ? (\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n ) : null}\n </div>\n ) : null;\n\n const buildButton = () => {\n const defaultButtonProps = {\n label: uploadLabel,\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n }\n };\n if (dragging) {\n return null;\n } else if (error) {\n return <Button {...defaultButtonProps} label=\"Try again\" icon={{}} />;\n } else {\n return <Button {...defaultButtonProps} />;\n }\n };\n\n const button = buildButton(dragging, error);\n\n const previewContainer = getClassState(\n style.previewContainer,\n style.modifiedPreviewContainer,\n null,\n modified,\n error\n );\n const inputWrapper = getClassState(\n style.inputWrapper,\n style.modifiedInputWrapper,\n style.errorInputWrapper,\n modified,\n error\n );\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n <div className={style.title}>{title}</div>\n {!isEmpty(previewContent) || loading ? (\n <div className={previewContainer}>{previewView}</div>\n ) : (\n <div className={dragging ? style.dragging : inputWrapper} id={idBox}>\n <div className={style.infosContainer}>\n {error ? (\n <FileUploadBlockedIcon className={style.iconError} />\n ) : (\n <FileUploadIcon className={style.icon} />\n )}\n {description ? <div className={style.description}>{description}</div> : null}\n {error ? null : <div className={style.dragAndDropLabel}>{'Drag & Drop here'}</div>}\n </div>\n {button}\n <div>{children(this.handleDragStart, this.handleDragStop)}</div>\n </div>\n )}\n {error ? <span className={style.errorMessage}>{error}</span> : resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["React","PropTypes","NovaSolidStatusClose","Close","NovaSolidFilesBasicFileUpload2","FileUploadIcon","NovaSolidFilesBasicFileBlock2","FileUploadBlockedIcon","Loader","Button","getClassState","style","constantNull","DragAndDrop","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","error","buttonAriaLabel","errorButtonLabel","previewView","type","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buildButton","defaultButtonProps","label","icon","position","button","previewContainer","modifiedPreviewContainer","inputWrapper","modifiedInputWrapper","errorInputWrapper","wrapper","infosContainer","iconError","dragAndDrop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AAY;AACjBvC,EAAAA,KAAK,EAAEzB,SAAS,CAACiE,MADA;AAEjBvC,EAAAA,WAAW,EAAE1B,SAAS,CAACiE,MAFN;AAGjBtC,EAAAA,WAAW,EAAE3B,SAAS,CAACiE,MAHN;AAIjBrC,EAAAA,YAAY,EAAE5B,SAAS,CAACiE,MAJP;AAKjBpC,EAAAA,cAAc,EAAE7B,SAAS,CAACkE,KAAV,CAAgB;AAC9B7B,IAAAA,IAAI,EAAErC,SAAS,CAACiE,MADc;AAE9B1B,IAAAA,GAAG,EAAEvC,SAAS,CAACiE;AAFe,GAAhB,CALC;AASjBnC,EAAAA,OAAO,EAAE9B,SAAS,CAACmE,IATF;AAUjBpC,EAAAA,QAAQ,EAAE/B,SAAS,CAACmE,IAVH;AAWjB3C,EAAAA,QAAQ,EAAExB,SAAS,CAACoE,IAXH;AAYjBpC,EAAAA,OAAO,EAAEhC,SAAS,CAACoE,IAZF;AAajBnC,EAAAA,KAAK,EAAEjC,SAAS,CAACiE,MAbA;AAcjB/B,EAAAA,eAAe,EAAElC,SAAS,CAACiE,MAdV;AAejB9B,EAAAA,gBAAgB,EAAEnC,SAAS,CAACiE;AAfX,C;AA6KrB,eAAerD,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon,\n NovaSolidFilesBasicFileBlock2 as FileUploadBlockedIcon\n} from '@coorpacademy/nova-icons';\nimport Loader from '../loader';\nimport Button from '../button-link';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func,\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null,\n error = '',\n buttonAriaLabel = '',\n errorButtonLabel = ''\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n {onReset ? (\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n ) : null}\n </div>\n ) : null;\n\n const buildButton = () => {\n const defaultButtonProps = {\n label: uploadLabel,\n 'aria-label': buttonAriaLabel,\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n }\n };\n if (dragging) {\n return null;\n } else if (error) {\n return <Button {...defaultButtonProps} label={errorButtonLabel} icon={{}} />;\n } else {\n return <Button {...defaultButtonProps} />;\n }\n };\n\n const button = buildButton(dragging, error);\n\n const previewContainer = getClassState(\n style.previewContainer,\n style.modifiedPreviewContainer,\n null,\n modified,\n error\n );\n const inputWrapper = getClassState(\n style.inputWrapper,\n style.modifiedInputWrapper,\n style.errorInputWrapper,\n modified,\n error\n );\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n <div className={style.title}>{title}</div>\n {!isEmpty(previewContent) || loading ? (\n <div className={previewContainer}>{previewView}</div>\n ) : (\n <div className={dragging ? style.dragging : inputWrapper} id={idBox}>\n <div className={style.infosContainer}>\n {error ? (\n <FileUploadBlockedIcon className={style.iconError} />\n ) : (\n <FileUploadIcon className={style.icon} />\n )}\n {description ? <div className={style.description}>{description}</div> : null}\n {error ? null : <div className={style.dragAndDropLabel}>{'Drag & Drop here'}</div>}\n </div>\n {button}\n <div>{children(this.handleDragStart, this.handleDragStop)}</div>\n </div>\n )}\n {error ? <span className={style.errorMessage}>{error}</span> : resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
@@ -6,7 +6,9 @@ const {
6
6
  } = defaultProps;
7
7
  export default {
8
8
  props: _extends(_extends({}, props), {}, {
9
- error: 'The file is invalid'
9
+ error: 'The file is invalid',
10
+ errorButtonLabel: 'Try again',
11
+ buttonAriaLabel: 'Aria label'
10
12
  })
11
13
  };
12
14
  //# sourceMappingURL=error.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/error.js"],"names":["defaultProps","props","error"],"mappings":";;AAAA,OAAOA,YAAP,MAAyB,WAAzB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,YAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,wBACAA,KADA;AAEHC,IAAAA,KAAK,EAAE;AAFJ;AADQ,CAAf","sourcesContent":["import defaultProps from './default';\n\nconst {props} = defaultProps;\n\nexport default {\n props: {\n ...props,\n error: 'The file is invalid'\n }\n};\n"],"file":"error.js"}
1
+ {"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/error.js"],"names":["defaultProps","props","error","errorButtonLabel","buttonAriaLabel"],"mappings":";;AAAA,OAAOA,YAAP,MAAyB,WAAzB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,YAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,wBACAA,KADA;AAEHC,IAAAA,KAAK,EAAE,qBAFJ;AAGHC,IAAAA,gBAAgB,EAAE,WAHf;AAIHC,IAAAA,eAAe,EAAE;AAJd;AADQ,CAAf","sourcesContent":["import defaultProps from './default';\n\nconst {props} = defaultProps;\n\nexport default {\n props: {\n ...props,\n error: 'The file is invalid',\n errorButtonLabel: 'Try again',\n buttonAriaLabel: 'Aria label'\n }\n};\n"],"file":"error.js"}
@@ -2,15 +2,11 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomDragAndDrop from '..';
5
- import fixtureCleanAndModified from './fixtures/clean-and-modified';
6
5
  import fixtureDefault from './fixtures/default';
7
- import fixtureError from './fixtures/error';
8
6
  import fixtureLoading from './fixtures/loading';
9
- import fixtureModified from './fixtures/modified';
10
7
  import fixtureWithChildren from './fixtures/with-children';
11
8
  import fixtureWithImageReset from './fixtures/with-image-reset';
12
9
  import fixtureWithImage from './fixtures/with-image';
13
- import fixtureWithLongDescription from './fixtures/with-long-description';
14
10
  import fixtureWithVideo from './fixtures/with-video';
15
11
  test('Atom › AtomDragAndDrop > should have valid propTypes', t => {
16
12
  t.pass();
@@ -18,14 +14,10 @@ test('Atom › AtomDragAndDrop > should have valid propTypes', t => {
18
14
  t.not(value, undefined, `PropType for "Atom.AtomDragAndDrop.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
15
  });
20
16
  });
21
- test('Atom › AtomDragAndDrop › CleanAndModified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureCleanAndModified);
22
17
  test('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);
23
- test('Atom › AtomDragAndDrop › Error › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureError);
24
18
  test('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);
25
- test('Atom › AtomDragAndDrop › Modified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureModified);
26
19
  test('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);
27
20
  test('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);
28
21
  test('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);
29
- test('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithLongDescription);
30
22
  test('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);
31
23
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomDragAndDrop","fixtureCleanAndModified","fixtureDefault","fixtureError","fixtureLoading","fixtureModified","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithLongDescription","fixtureWithVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OA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5F,EAA6GS,0BAA7G,CAAJ;AACAZ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGU,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureCleanAndModified from './fixtures/clean-and-modified';\nimport fixtureDefault from './fixtures/default';\nimport fixtureError from './fixtures/error';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureModified from './fixtures/modified';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithLongDescription from './fixtures/with-long-description';\nimport fixtureWithVideo from './fixtures/with-video';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › CleanAndModified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureCleanAndModified);\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Error › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureError);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › Modified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureModified);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithLongDescription);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomDragAndDrop","fixtureDefault","fixtureLoading","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAT,IAAI,CAAC,sDAAD,EAAyDU,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,eAAe,CAACS,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGE,cAAjG,CAAJ;AACAL,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,eAArF,EAAsGG,mBAAtG,CAAJ;AACAN,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,eAAvF,EAAwGI,qBAAxG,CAAJ;AACAP,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGK,gBAAnG,CAAJ;AACAR,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGM,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithVideo from './fixtures/with-video';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\n"],"file":"fixtures.js"}
@@ -2,8 +2,6 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomImageUpload from '..';
5
- import fixtureCleanModified from './fixtures/clean-modified';
6
- import fixtureDefault from './fixtures/default';
7
5
  import fixtureDesktopResetDescriptionMultiple from './fixtures/desktop-reset-description-multiple';
8
6
  import fixtureDesktopResetDescriptionOnlyPng from './fixtures/desktop-reset-description-only-png';
9
7
  import fixtureDesktopResetDescription from './fixtures/desktop-reset-description';
@@ -12,14 +10,13 @@ import fixtureDesktop from './fixtures/desktop';
12
10
  import fixtureEmail from './fixtures/email';
13
11
  import fixtureMobile from './fixtures/mobile';
14
12
  import fixtureModified from './fixtures/modified';
13
+ import fixtureWithoutImage from './fixtures/without-image';
15
14
  test('Atom › AtomImageUpload > should have valid propTypes', t => {
16
15
  t.pass();
17
16
  forEach(AtomImageUpload.propTypes, (value, key) => {
18
17
  t.not(value, undefined, `PropType for "Atom.AtomImageUpload.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
18
  });
20
19
  });
21
- test('Atom › AtomImageUpload › CleanModified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureCleanModified);
22
- test('Atom › AtomImageUpload › Default › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDefault);
23
20
  test('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionMultiple);
24
21
  test('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionOnlyPng);
25
22
  test('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescription);
@@ -28,4 +25,5 @@ test('Atom › AtomImageUpload › Desktop › should be rendered', renderCompon
28
25
  test('Atom › AtomImageUpload › Email › should be rendered', renderComponentMacro, AtomImageUpload, fixtureEmail);
29
26
  test('Atom › AtomImageUpload › Mobile › should be rendered', renderComponentMacro, AtomImageUpload, fixtureMobile);
30
27
  test('Atom › AtomImageUpload › Modified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureModified);
28
+ test('Atom › AtomImageUpload › WithoutImage › should be rendered', renderComponentMacro, AtomImageUpload, fixtureWithoutImage);
31
29
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/image-upload/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomImageUpload","fixtureCleanModified","fixtureDefault","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureEmail","fixtureMobile","fixtureModified","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sCAAP,MAAmD,+CAAnD;AACA,OAAOC,qCAAP,MAAkD,+CAAlD;AACA,OAAOC,8BAAP,MAA2C,sCAA3C;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAb,IAAI,CAAC,sDAAD,EAAyDc,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAd,EAAAA,OAAO,CAACE,eAAe,CAACa,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAlB,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,eAAtF,EAAuGC,oBAAvG,CAAJ;AACAJ,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGE,cAAjG,CAAJ;AACAL,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,eAAxG,EAAyHG,sCAAzH,CAAJ;AACAN,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,eAAvG,EAAwHI,qCAAxH,CAAJ;AACAP,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,eAAhG,EAAiHK,8BAAjH,CAAJ;AACAR,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,eAAlG,EAAmHM,gCAAnH,CAAJ;AACAT,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGO,cAAjG,CAAJ;AACAV,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,eAA9E,EAA+FQ,YAA/F,CAAJ;AACAX,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,eAA/E,EAAgGS,aAAhG,CAAJ;AACAZ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGU,eAAlG,CAAJ","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 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 › 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":["test","forEach","renderComponentMacro","AtomImageUpload","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureEmail","fixtureMobile","fixtureModified","fixtureWithoutImage","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAA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gGO,aAAhG,CAAJ;AACAV,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGQ,eAAlG,CAAJ;AACAX,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,eAArF,EAAsGS,mBAAtG,CAAJ","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"}
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import get from 'lodash/fp/get';
4
+ import map from 'lodash/fp/map';
5
+ import { NovaSolidStatusCheckCircle2 as CheckIcon, NovaSolidVoteRewardsVoteHeart as HeartIcon, NovaCompositionCoorpacademyInformationIcon as InformationIcon, NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon, NovaLineSelectionCursorsCursorArrowTarget as TargetIcon } from '@coorpacademy/nova-icons';
6
+ import style from './style.css';
7
+ const ICONS = {
8
+ skills: TargetIcon,
9
+ questions: QuestionIcon,
10
+ lifes: HeartIcon,
11
+ allright: CheckIcon
12
+ };
13
+
14
+ const getIcon = icon => {
15
+ const Icon = get(icon, ICONS);
16
+ return /*#__PURE__*/React.createElement(Icon, {
17
+ className: style.labelIcon
18
+ });
19
+ };
20
+
21
+ const ToolTip = ({
22
+ tooltipText
23
+ }) => {
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ className: style.tooltipContainer
26
+ }, /*#__PURE__*/React.createElement("div", {
27
+ className: style.tooltipIconContainer
28
+ }, /*#__PURE__*/React.createElement(InformationIcon, {
29
+ className: style.informationIcon,
30
+ width: 12,
31
+ height: 12
32
+ })), /*#__PURE__*/React.createElement("div", {
33
+ className: style.toolTip
34
+ }, /*#__PURE__*/React.createElement("div", {
35
+ className: style.tooltipText
36
+ }, tooltipText)));
37
+ };
38
+
39
+ const ReviewPresentation = props => {
40
+ const {
41
+ 'aria-label': ariaLabel,
42
+ reviewTitle,
43
+ reviewText,
44
+ labelsList
45
+ } = props;
46
+ return /*#__PURE__*/React.createElement("div", {
47
+ className: style.reviewWrapper,
48
+ "aria-label": ariaLabel
49
+ }, /*#__PURE__*/React.createElement("div", {
50
+ className: style.reviewTitle // eslint-disable-next-line react/no-danger
51
+ ,
52
+ dangerouslySetInnerHTML: {
53
+ __html: reviewTitle
54
+ }
55
+ }), /*#__PURE__*/React.createElement("div", {
56
+ className: style.reviewText // eslint-disable-next-line react/no-danger
57
+ ,
58
+ dangerouslySetInnerHTML: {
59
+ __html: reviewText
60
+ }
61
+ }), /*#__PURE__*/React.createElement("ul", null, map.convert({
62
+ cap: false
63
+ })((label, key) => {
64
+ return /*#__PURE__*/React.createElement("li", {
65
+ key: `step-${key}`,
66
+ className: style.reviewList
67
+ }, /*#__PURE__*/React.createElement("div", {
68
+ className: style.reviewListItemWrapper,
69
+ "data-tip": true,
70
+ "data-for": "reviewListItem"
71
+ }, /*#__PURE__*/React.createElement("div", {
72
+ className: style.reviewListText
73
+ }, getIcon(key), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
74
+ tooltipText: label.tooltipText
75
+ })));
76
+ }, labelsList)));
77
+ };
78
+
79
+ const levelItem = process.env.NODE_ENV !== "production" ? PropTypes.shape({
80
+ text: PropTypes.string,
81
+ tooltipText: PropTypes.string
82
+ }) : {};
83
+ ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
84
+ tooltipText: PropTypes.string
85
+ } : {};
86
+ ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? {
87
+ 'aria-label': PropTypes.string,
88
+ reviewTitle: PropTypes.string,
89
+ reviewText: PropTypes.string,
90
+ labelsList: PropTypes.shape({
91
+ skills: levelItem,
92
+ questions: levelItem,
93
+ lifes: levelItem,
94
+ allright: levelItem
95
+ })
96
+ } : {};
97
+ export default ReviewPresentation;
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atom/review-presentation/index.js"],"names":["React","PropTypes","get","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","ICONS","skills","questions","lifes","allright","getIcon","icon","Icon","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","levelItem","shape","string","propTypes"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,6BAA6B,IAAIC,SAFnC,EAGEC,0CAA0C,IAAIC,eAHhD,EAIEC,+CAA+C,IAAIC,YAJrD,EAKEC,yCAAyC,IAAIC,UAL/C,QAMO,0BANP;AAOA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,KAAK,GAAG;AACZC,EAAAA,MAAM,EAAEH,UADI;AAEZI,EAAAA,SAAS,EAAEN,YAFC;AAGZO,EAAAA,KAAK,EAAEX,SAHK;AAIZY,EAAAA,QAAQ,EAAEd;AAJE,CAAd;;AAOA,MAAMe,OAAO,GAAGC,IAAI,IAAI;AACtB,QAAMC,IAAI,GAAGpB,GAAG,CAACmB,IAAD,EAAON,KAAP,CAAhB;AACA,sBAAO,oBAAC,IAAD;AAAM,IAAA,SAAS,EAAED,KAAK,CAACS;AAAvB,IAAP;AACD,CAHD;;AAKA,MAAMC,OAAO,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAmB;AACjC,sBACE;AAAK,IAAA,SAAS,EAAEX,KAAK,CAACY;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEZ,KAAK,CAACa;AAAtB,kBACE,oBAAC,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AS,MAAA,WAAW,EAAEL,KAAK,CAACf;AAA5B,MAJF,CADF,CADF;AAUD,GAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCA,MAAMW,SAAN,2CAAkB7C,SAAS,CAAC8C,KAAV,CAAgB;AAChCF,EAAAA,IAAI,EAAE5C,SAAS,CAAC+C,MADgB;AAEhCvB,EAAAA,WAAW,EAAExB,SAAS,CAAC+C;AAFS,CAAhB,CAAlB;AAKAxB,OAAO,CAACyB,SAAR,2CAAoB;AAClBxB,EAAAA,WAAW,EAAExB,SAAS,CAAC+C;AADL,CAApB;AAIAlB,kBAAkB,CAACmB,SAAnB,2CAA+B;AAC7B,gBAAchD,SAAS,CAAC+C,MADK;AAE7Bf,EAAAA,WAAW,EAAEhC,SAAS,CAAC+C,MAFM;AAG7Bd,EAAAA,UAAU,EAAEjC,SAAS,CAAC+C,MAHO;AAI7Bb,EAAAA,UAAU,EAAElC,SAAS,CAAC8C,KAAV,CAAgB;AAC1B/B,IAAAA,MAAM,EAAE8B,SADkB;AAE1B7B,IAAAA,SAAS,EAAE6B,SAFe;AAG1B5B,IAAAA,KAAK,EAAE4B,SAHmB;AAI1B3B,IAAAA,QAAQ,EAAE2B;AAJgB,GAAhB;AAJiB,CAA/B;AAYA,eAAehB,kBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst getIcon = icon => {\n const Icon = get(icon, ICONS);\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({tooltipText}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon className={style.informationIcon} width={12} height={12} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{tooltipText}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string\n});\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string\n};\n\nReviewPresentation.propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default ReviewPresentation;\n"],"file":"index.js"}
@@ -0,0 +1,152 @@
1
+ @value breakpoints: "../../variables/breakpoints.css";
2
+ @value tablet from breakpoints;
3
+ @value mobile from breakpoints;
4
+ @value colors: "../../variables/colors.css";
5
+ @value xtraLightGrey from colors;
6
+ @value cm_blue_900 from colors;
7
+ @value cm_grey_75 from colors;
8
+ @value cm_grey_500 from colors;
9
+ @value cm_grey_700 from colors;
10
+ @value white from colors;
11
+
12
+
13
+ .textBase {
14
+ font-family: "Gilroy";
15
+ font-style: normal;
16
+ color: cm_blue_900;
17
+ }
18
+
19
+ .reviewWrapper {
20
+ width: 100%;
21
+ height: 598px;
22
+ border-radius: 16px;
23
+ background-color: xtraLightGrey;
24
+ }
25
+
26
+ .reviewTitle {
27
+ composes: textBase;
28
+ font-weight: 700;
29
+ font-size: 28px;
30
+ line-height: 36px;
31
+ padding: 40px 40px 16px;
32
+ height: 72px;
33
+ }
34
+
35
+ .reviewText {
36
+ composes: textBase;
37
+ font-weight: 400;
38
+ font-size: 16px;
39
+ line-height: 22px;
40
+ margin-bottom: 32px;
41
+ padding: 0 40px;
42
+ height: 198px;
43
+ opacity: 0.7;
44
+ overflow: hidden;
45
+ }
46
+
47
+ .reviewList {
48
+ list-style: none;
49
+ }
50
+
51
+ .reviewListItemWrapper {
52
+ display: flex;
53
+ justify-content: space-between;
54
+ align-items: center;
55
+ padding: 8px 16px;
56
+ margin: 16px 40px 16px 0px;
57
+ background: cm_grey_75;
58
+ border-radius: 8px;
59
+ }
60
+
61
+ .reviewListText {
62
+ composes: textBase;
63
+ display: flex;
64
+ align-items: center;
65
+ font-weight: 500;
66
+ font-size: 16px;
67
+ line-height: 22px;
68
+ margin-right: 12px;
69
+ }
70
+
71
+ .labelIcon {
72
+ padding-right: 12px;
73
+ height: 16px;
74
+ width: 16px;
75
+ }
76
+
77
+ .informationIcon {
78
+ color: cm_grey_500;
79
+ }
80
+
81
+ .toolTip {
82
+ visibility: hidden;
83
+ opacity: 0;
84
+ transition: opacity 0.8s;
85
+ position: absolute;
86
+ width: 103px;
87
+ height: 56px;
88
+ border-radius: 7px;
89
+ background-color: cm_grey_700;
90
+ right: -42px;
91
+ bottom: 32px;
92
+ }
93
+
94
+ .toolTip::before {
95
+ content: '';
96
+ display: inline-block;
97
+ visibility: hidden;
98
+ opacity: 0;
99
+ width: 15px;
100
+ height: 15px;
101
+ transform: rotate(-45deg);
102
+ background-color: cm_grey_700;
103
+ position: inherit;
104
+ bottom: -5px;
105
+ right: 40%;
106
+ border-radius: 2px;
107
+ }
108
+
109
+ .tooltipText {
110
+ composes: textBase;
111
+ font-weight: 500;
112
+ font-size: 14px;
113
+ line-height: 20px;
114
+ display: inline-block;
115
+ border-radius: 3px;
116
+ word-wrap: break-word;
117
+ color: white;
118
+ padding: 8px 14px;
119
+ text-align: center;
120
+ }
121
+
122
+ .tooltipContainer {
123
+ overflow: visible;
124
+ position: relative;
125
+ }
126
+
127
+ .reviewListItemWrapper:hover .tooltipContainer .toolTip {
128
+ visibility: visible;
129
+ opacity: 1;
130
+ }
131
+
132
+ .reviewListItemWrapper:hover .tooltipContainer .toolTip::before {
133
+ visibility: visible;
134
+ opacity: 1;
135
+ }
136
+
137
+ .tooltipIconContainer {
138
+ display: flex;
139
+ justify-content: flex-end;
140
+ }
141
+
142
+ @media tablet {
143
+ .reviewWrapper{
144
+ width: 100%;
145
+ }
146
+ }
147
+
148
+ @media mobile {
149
+ .reviewWrapper{
150
+ width: 100%;
151
+ }
152
+ }
@@ -0,0 +1,27 @@
1
+ export const defaultProps = {
2
+ 'aria-label': 'Review Presentation Container',
3
+ reviewTitle: 'What is<br/>Revision mode ?',
4
+ reviewText: '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.',
5
+ labelsList: {
6
+ skills: {
7
+ text: 'Choose 1 Skill',
8
+ tooltipText: 'This is the tooltip text'
9
+ },
10
+ questions: {
11
+ text: 'Answer 5 Questions',
12
+ tooltipText: 'This is the tooltip text'
13
+ },
14
+ lifes: {
15
+ text: 'You have Infinite Lifes',
16
+ tooltipText: 'This is the tooltip text'
17
+ },
18
+ allright: {
19
+ text: 'Get it all right',
20
+ tooltipText: 'This is the tooltip text'
21
+ }
22
+ }
23
+ };
24
+ export default {
25
+ props: defaultProps
26
+ };
27
+ //# sourceMappingURL=default.js.map
@@ -0,0 +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":"AAAA,OAAO,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;AAaP,eAAe;AAACI,EAAAA,KAAK,EAAEV;AAAR,CAAf","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"}
@@ -2,7 +2,6 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomSelect from '..';
5
- import fixtureCoorpmanager from './fixtures/coorpmanager';
6
5
  import fixtureDefault from './fixtures/default';
7
6
  import fixtureDisabled from './fixtures/disabled';
8
7
  import fixtureError from './fixtures/error';
@@ -12,7 +11,6 @@ import fixtureModified from './fixtures/modified';
12
11
  import fixtureMooc from './fixtures/mooc';
13
12
  import fixtureMultipleSelected from './fixtures/multiple-selected';
14
13
  import fixtureMultiple from './fixtures/multiple';
15
- import fixturePlayer from './fixtures/player';
16
14
  import fixtureQuestion from './fixtures/question';
17
15
  import fixtureRequiredWithTitle from './fixtures/required-with-title';
18
16
  import fixtureRequired from './fixtures/required';
@@ -26,7 +24,6 @@ test('Atom › AtomSelect > should have valid propTypes', t => {
26
24
  t.not(value, undefined, `PropType for "Atom.AtomSelect.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
27
25
  });
28
26
  });
29
- test('Atom › AtomSelect › Coorpmanager › should be rendered', renderComponentMacro, AtomSelect, fixtureCoorpmanager);
30
27
  test('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);
31
28
  test('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);
32
29
  test('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);
@@ -36,7 +33,6 @@ test('Atom › AtomSelect › Modified › should be rendered', renderComponentM
36
33
  test('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);
37
34
  test('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);
38
35
  test('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);
39
- test('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);
40
36
  test('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);
41
37
  test('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);
42
38
  test('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);