@coorpacademy/components 10.14.3 → 10.14.6

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 (305) hide show
  1. package/es/atom/button-link/test/fixtures.js +31 -0
  2. package/es/atom/button-link/test/fixtures.js.map +1 -0
  3. package/es/atom/button-link-icon-only/test/fixtures.js +23 -0
  4. package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -0
  5. package/es/atom/button-menu/test/fixtures.js +15 -0
  6. package/es/atom/button-menu/test/fixtures.js.map +1 -0
  7. package/es/atom/card-image-preview/test/fixtures.js +15 -0
  8. package/es/atom/card-image-preview/test/fixtures.js.map +1 -0
  9. package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
  10. package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
  11. package/es/atom/chips/test/fixtures.js +17 -0
  12. package/es/atom/chips/test/fixtures.js.map +1 -0
  13. package/es/atom/content-badge/test/fixtures.js +29 -0
  14. package/es/atom/content-badge/test/fixtures.js.map +1 -0
  15. package/es/atom/drag-and-drop/index.js +3 -2
  16. package/es/atom/drag-and-drop/index.js.map +1 -1
  17. package/es/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
  18. package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  19. package/es/atom/drag-and-drop/test/fixtures.js +10 -0
  20. package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
  21. package/es/atom/empty-search-result/test/fixtures.js +13 -0
  22. package/es/atom/empty-search-result/test/fixtures.js.map +1 -0
  23. package/es/atom/image-upload/index.js +9 -3
  24. package/es/atom/image-upload/index.js.map +1 -1
  25. package/es/atom/image-upload/test/fixtures.js +4 -2
  26. package/es/atom/image-upload/test/fixtures.js.map +1 -1
  27. package/es/atom/input-checkbox/test/fixtures.js +2 -0
  28. package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
  29. package/es/atom/input-search/test/fixtures.js +19 -0
  30. package/es/atom/input-search/test/fixtures.js.map +1 -0
  31. package/es/atom/input-switch/test/fixtures.js +10 -0
  32. package/es/atom/input-switch/test/fixtures.js.map +1 -1
  33. package/es/atom/input-text/test/fixtures.js +2 -0
  34. package/es/atom/input-text/test/fixtures.js.map +1 -1
  35. package/es/atom/input-text-with-title/test/fixtures.js +15 -0
  36. package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
  37. package/es/atom/input-textarea/test/fixtures.js +4 -0
  38. package/es/atom/input-textarea/test/fixtures.js.map +1 -1
  39. package/es/atom/loader/test/fixtures.js +2 -0
  40. package/es/atom/loader/test/fixtures.js.map +1 -1
  41. package/es/atom/review-header-step-item/test/fixtures.js +19 -0
  42. package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
  43. package/es/atom/review-presentation/test/fixtures.js +13 -0
  44. package/es/atom/review-presentation/test/fixtures.js.map +1 -0
  45. package/es/atom/select/test/fixtures.js +4 -0
  46. package/es/atom/select/test/fixtures.js.map +1 -1
  47. package/es/atom/tag/test/fixtures.js +21 -0
  48. package/es/atom/tag/test/fixtures.js.map +1 -0
  49. package/es/atom/title/test/fixtures.js +6 -2
  50. package/es/atom/title/test/fixtures.js.map +1 -1
  51. package/es/atom/wizard-steps/test/fixtures.js +17 -0
  52. package/es/atom/wizard-steps/test/fixtures.js.map +1 -0
  53. package/es/molecule/banner/test/fixtures.js +23 -0
  54. package/es/molecule/banner/test/fixtures.js.map +1 -0
  55. package/es/molecule/brand-form-group/test/fixtures.js +4 -0
  56. package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
  57. package/es/molecule/bullet-point-menu-button/test/fixtures.js +15 -0
  58. package/es/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
  59. package/es/molecule/card/test/fixtures.js +6 -0
  60. package/es/molecule/card/test/fixtures.js.map +1 -1
  61. package/es/molecule/cm-popin/test/fixtures.js +17 -0
  62. package/es/molecule/cm-popin/test/fixtures.js.map +1 -0
  63. package/es/molecule/coorp-manager-roles/test/fixtures.js +13 -0
  64. package/es/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
  65. package/es/molecule/course-section/test/fixtures.js +21 -0
  66. package/es/molecule/course-section/test/fixtures.js.map +1 -0
  67. package/es/molecule/course-sections/test/fixtures.js +17 -0
  68. package/es/molecule/course-sections/test/fixtures.js.map +1 -0
  69. package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
  70. package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
  71. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +17 -0
  72. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
  73. package/es/molecule/draggable/test/fixtures.js +13 -0
  74. package/es/molecule/draggable/test/fixtures.js.map +1 -0
  75. package/es/molecule/draggable-list/test/fixtures.js +15 -0
  76. package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
  77. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
  78. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
  79. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +15 -0
  80. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  81. package/es/molecule/list-badges/test/fixtures.js +19 -0
  82. package/es/molecule/list-badges/test/fixtures.js.map +1 -0
  83. package/es/molecule/popin/test/fixtures.js +21 -0
  84. package/es/molecule/popin/test/fixtures.js.map +1 -0
  85. package/es/molecule/questions/free-text/test/fixtures.js +4 -2
  86. package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
  87. package/es/molecule/quick-access-card/test/fixtures.js +21 -0
  88. package/es/molecule/quick-access-card/test/fixtures.js.map +1 -0
  89. package/es/molecule/quick-access-cards-group/test/fixtures.js +21 -0
  90. package/es/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
  91. package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
  92. package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
  93. package/es/molecule/review-header-steps/test/fixtures.js +23 -0
  94. package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
  95. package/es/molecule/select-multiple/test/fixtures.js +8 -0
  96. package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
  97. package/es/molecule/setup-slide/test/fixtures.js +2 -0
  98. package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
  99. package/es/molecule/skill-card/test/fixtures.js +19 -0
  100. package/es/molecule/skill-card/test/fixtures.js.map +1 -0
  101. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js +19 -0
  102. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +1 -0
  103. package/es/molecule/vertical-tabs/test/fixtures.js +17 -0
  104. package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -0
  105. package/es/molecule/wizard-summary/test/fixtures.js +23 -0
  106. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -0
  107. package/es/organism/accordion/coorp-manager/part/test/fixtures.js +17 -0
  108. package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -0
  109. package/es/organism/accordion/coorp-manager/test/fixtures.js +13 -0
  110. package/es/organism/accordion/coorp-manager/test/fixtures.js.map +1 -0
  111. package/es/organism/brand-analytics/test/fixtures.js +23 -0
  112. package/es/organism/brand-analytics/test/fixtures.js.map +1 -0
  113. package/es/organism/brand-dashboard/test/fixtures.js +2 -10
  114. package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
  115. package/es/organism/brand-form/index.js +2 -1
  116. package/es/organism/brand-form/index.js.map +1 -1
  117. package/es/organism/brand-form/style.css +4 -0
  118. package/es/organism/brand-form/test/fixtures.js +4 -0
  119. package/es/organism/brand-form/test/fixtures.js.map +1 -1
  120. package/es/organism/content-translation/test/fixtures.js +15 -0
  121. package/es/organism/content-translation/test/fixtures.js.map +1 -0
  122. package/es/organism/course-selection/test/fixtures.js +25 -0
  123. package/es/organism/course-selection/test/fixtures.js.map +1 -0
  124. package/es/organism/list-item/test/fixtures.js +19 -0
  125. package/es/organism/list-item/test/fixtures.js.map +1 -0
  126. package/es/organism/list-items/test/fixtures.js +17 -0
  127. package/es/organism/list-items/test/fixtures.js.map +1 -0
  128. package/es/organism/mooc-header/test/fixtures.js +6 -0
  129. package/es/organism/mooc-header/test/fixtures.js.map +1 -1
  130. package/es/organism/playlist-translation/test/fixtures.js +15 -0
  131. package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
  132. package/es/organism/review-header/test/fixtures.js +23 -0
  133. package/es/organism/review-header/test/fixtures.js.map +1 -0
  134. package/es/organism/review-skills/index.js +16 -5
  135. package/es/organism/review-skills/index.js.map +1 -1
  136. package/es/organism/review-skills/style.css +13 -0
  137. package/es/organism/review-skills/test/fixtures/loading.js +9 -0
  138. package/es/organism/review-skills/test/fixtures/loading.js.map +1 -0
  139. package/es/organism/rewards-form/test/fixtures.js +19 -0
  140. package/es/organism/rewards-form/test/fixtures.js.map +1 -0
  141. package/es/organism/search-and-chips-results/test/fixtures.js +23 -0
  142. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -0
  143. package/es/organism/wizard-contents/test/fixtures.js +27 -0
  144. package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
  145. package/es/template/app-player/popin-end/test/fixtures.js +2 -0
  146. package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
  147. package/es/template/back-office/brand-update/test/fixtures.js +26 -2
  148. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  149. package/es/template/teams-dashboard/test/fixtures.js +2 -0
  150. package/es/template/teams-dashboard/test/fixtures.js.map +1 -1
  151. package/lib/atom/button-link/test/fixtures.js +49 -0
  152. package/lib/atom/button-link/test/fixtures.js.map +1 -0
  153. package/lib/atom/button-link-icon-only/test/fixtures.js +37 -0
  154. package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -0
  155. package/lib/atom/button-menu/test/fixtures.js +25 -0
  156. package/lib/atom/button-menu/test/fixtures.js.map +1 -0
  157. package/lib/atom/card-image-preview/test/fixtures.js +25 -0
  158. package/lib/atom/card-image-preview/test/fixtures.js.map +1 -0
  159. package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
  160. package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
  161. package/lib/atom/chips/test/fixtures.js +28 -0
  162. package/lib/atom/chips/test/fixtures.js.map +1 -0
  163. package/lib/atom/content-badge/test/fixtures.js +46 -0
  164. package/lib/atom/content-badge/test/fixtures.js.map +1 -0
  165. package/lib/atom/drag-and-drop/index.js +3 -2
  166. package/lib/atom/drag-and-drop/index.js.map +1 -1
  167. package/lib/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
  168. package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  169. package/lib/atom/drag-and-drop/test/fixtures.js +15 -0
  170. package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
  171. package/lib/atom/empty-search-result/test/fixtures.js +22 -0
  172. package/lib/atom/empty-search-result/test/fixtures.js.map +1 -0
  173. package/lib/atom/image-upload/index.js +9 -3
  174. package/lib/atom/image-upload/index.js.map +1 -1
  175. package/lib/atom/image-upload/test/fixtures.js +6 -3
  176. package/lib/atom/image-upload/test/fixtures.js.map +1 -1
  177. package/lib/atom/input-checkbox/test/fixtures.js +3 -0
  178. package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
  179. package/lib/atom/input-search/test/fixtures.js +31 -0
  180. package/lib/atom/input-search/test/fixtures.js.map +1 -0
  181. package/lib/atom/input-switch/test/fixtures.js +15 -0
  182. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  183. package/lib/atom/input-text/test/fixtures.js +3 -0
  184. package/lib/atom/input-text/test/fixtures.js.map +1 -1
  185. package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
  186. package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
  187. package/lib/atom/input-textarea/test/fixtures.js +6 -0
  188. package/lib/atom/input-textarea/test/fixtures.js.map +1 -1
  189. package/lib/atom/loader/test/fixtures.js +3 -0
  190. package/lib/atom/loader/test/fixtures.js.map +1 -1
  191. package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
  192. package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
  193. package/lib/atom/review-presentation/test/fixtures.js +22 -0
  194. package/lib/atom/review-presentation/test/fixtures.js.map +1 -0
  195. package/lib/atom/select/test/fixtures.js +6 -0
  196. package/lib/atom/select/test/fixtures.js.map +1 -1
  197. package/lib/atom/tag/test/fixtures.js +34 -0
  198. package/lib/atom/tag/test/fixtures.js.map +1 -0
  199. package/lib/atom/title/test/fixtures.js +8 -2
  200. package/lib/atom/title/test/fixtures.js.map +1 -1
  201. package/lib/atom/wizard-steps/test/fixtures.js +28 -0
  202. package/lib/atom/wizard-steps/test/fixtures.js.map +1 -0
  203. package/lib/molecule/banner/test/fixtures.js +37 -0
  204. package/lib/molecule/banner/test/fixtures.js.map +1 -0
  205. package/lib/molecule/brand-form-group/test/fixtures.js +6 -0
  206. package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
  207. package/lib/molecule/bullet-point-menu-button/test/fixtures.js +25 -0
  208. package/lib/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
  209. package/lib/molecule/card/test/fixtures.js +9 -0
  210. package/lib/molecule/card/test/fixtures.js.map +1 -1
  211. package/lib/molecule/cm-popin/test/fixtures.js +28 -0
  212. package/lib/molecule/cm-popin/test/fixtures.js.map +1 -0
  213. package/lib/molecule/coorp-manager-roles/test/fixtures.js +22 -0
  214. package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
  215. package/lib/molecule/course-section/test/fixtures.js +34 -0
  216. package/lib/molecule/course-section/test/fixtures.js.map +1 -0
  217. package/lib/molecule/course-sections/test/fixtures.js +28 -0
  218. package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
  219. package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
  220. package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
  221. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +28 -0
  222. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
  223. package/lib/molecule/draggable/test/fixtures.js +22 -0
  224. package/lib/molecule/draggable/test/fixtures.js.map +1 -0
  225. package/lib/molecule/draggable-list/test/fixtures.js +25 -0
  226. package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
  227. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
  228. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
  229. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js +25 -0
  230. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  231. package/lib/molecule/list-badges/test/fixtures.js +31 -0
  232. package/lib/molecule/list-badges/test/fixtures.js.map +1 -0
  233. package/lib/molecule/popin/test/fixtures.js +34 -0
  234. package/lib/molecule/popin/test/fixtures.js.map +1 -0
  235. package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
  236. package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
  237. package/lib/molecule/quick-access-card/test/fixtures.js +34 -0
  238. package/lib/molecule/quick-access-card/test/fixtures.js.map +1 -0
  239. package/lib/molecule/quick-access-cards-group/test/fixtures.js +34 -0
  240. package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
  241. package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
  242. package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
  243. package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
  244. package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
  245. package/lib/molecule/select-multiple/test/fixtures.js +12 -0
  246. package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
  247. package/lib/molecule/setup-slide/test/fixtures.js +3 -0
  248. package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
  249. package/lib/molecule/skill-card/test/fixtures.js +31 -0
  250. package/lib/molecule/skill-card/test/fixtures.js.map +1 -0
  251. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js +31 -0
  252. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +1 -0
  253. package/lib/molecule/vertical-tabs/test/fixtures.js +28 -0
  254. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -0
  255. package/lib/molecule/wizard-summary/test/fixtures.js +37 -0
  256. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -0
  257. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +28 -0
  258. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -0
  259. package/lib/organism/accordion/coorp-manager/test/fixtures.js +22 -0
  260. package/lib/organism/accordion/coorp-manager/test/fixtures.js.map +1 -0
  261. package/lib/organism/brand-analytics/test/fixtures.js +37 -0
  262. package/lib/organism/brand-analytics/test/fixtures.js.map +1 -0
  263. package/lib/organism/brand-dashboard/test/fixtures.js +2 -14
  264. package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
  265. package/lib/organism/brand-form/index.js +2 -1
  266. package/lib/organism/brand-form/index.js.map +1 -1
  267. package/lib/organism/brand-form/style.css +4 -0
  268. package/lib/organism/brand-form/test/fixtures.js +6 -0
  269. package/lib/organism/brand-form/test/fixtures.js.map +1 -1
  270. package/lib/organism/content-translation/test/fixtures.js +25 -0
  271. package/lib/organism/content-translation/test/fixtures.js.map +1 -0
  272. package/lib/organism/course-selection/test/fixtures.js +40 -0
  273. package/lib/organism/course-selection/test/fixtures.js.map +1 -0
  274. package/lib/organism/list-item/test/fixtures.js +31 -0
  275. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  276. package/lib/organism/list-items/test/fixtures.js +28 -0
  277. package/lib/organism/list-items/test/fixtures.js.map +1 -0
  278. package/lib/organism/mooc-header/test/fixtures.js +9 -0
  279. package/lib/organism/mooc-header/test/fixtures.js.map +1 -1
  280. package/lib/organism/playlist-translation/test/fixtures.js +25 -0
  281. package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
  282. package/lib/organism/review-header/test/fixtures.js +37 -0
  283. package/lib/organism/review-header/test/fixtures.js.map +1 -0
  284. package/lib/organism/review-skills/index.js +17 -5
  285. package/lib/organism/review-skills/index.js.map +1 -1
  286. package/lib/organism/review-skills/style.css +13 -0
  287. package/lib/organism/review-skills/test/fixtures/loading.js +14 -0
  288. package/lib/organism/review-skills/test/fixtures/loading.js.map +1 -0
  289. package/lib/organism/rewards-form/test/fixtures.js +31 -0
  290. package/lib/organism/rewards-form/test/fixtures.js.map +1 -0
  291. package/lib/organism/search-and-chips-results/test/fixtures.js +37 -0
  292. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -0
  293. package/lib/organism/wizard-contents/test/fixtures.js +43 -0
  294. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
  295. package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
  296. package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
  297. package/lib/template/back-office/brand-update/test/fixtures.js +38 -2
  298. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  299. package/lib/template/teams-dashboard/test/fixtures.js +3 -0
  300. package/lib/template/teams-dashboard/test/fixtures.js.map +1 -1
  301. package/package.json +2 -2
  302. package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
  303. package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
  304. package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
  305. package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
@@ -0,0 +1,31 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomButtonLink from '..';
5
+ import fixtureButtonDangerousNoIcon from './fixtures/button-dangerous-no-icon';
6
+ import fixtureButtonPrimaryIconLeft from './fixtures/button-primary-icon-left';
7
+ import fixtureButtonPrimaryNoIcon from './fixtures/button-primary-no-icon';
8
+ import fixtureButtonSecondaryNoIconDisabled from './fixtures/button-secondary-no-icon-disabled';
9
+ import fixtureButtonTertiaryIconLeft from './fixtures/button-tertiary-icon-left';
10
+ import fixtureLinkPrimaryDisabledIconRight from './fixtures/link-primary-disabled-icon-right';
11
+ import fixtureLinkSecondaryIconRight from './fixtures/link-secondary-icon-right';
12
+ import fixtureLinkTertiaryNoIcon from './fixtures/link-tertiary-no-icon';
13
+ import fixtureLinkTextIconRightTargetBlank from './fixtures/link-text-icon-right-target-blank';
14
+ import fixtureLinkTextNoIconDownload from './fixtures/link-text-no-icon-download';
15
+ test('Atom › AtomButtonLink > should have valid propTypes', t => {
16
+ t.pass();
17
+ forEach(AtomButtonLink.propTypes, (value, key) => {
18
+ t.not(value, undefined, `PropType for "Atom.AtomButtonLink.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
+ });
20
+ });
21
+ test('Atom › AtomButtonLink › ButtonDangerousNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonDangerousNoIcon);
22
+ test('Atom › AtomButtonLink › ButtonPrimaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryIconLeft);
23
+ test('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryNoIcon);
24
+ test('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonSecondaryNoIconDisabled);
25
+ test('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonTertiaryIconLeft);
26
+ test('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkPrimaryDisabledIconRight);
27
+ test('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkSecondaryIconRight);
28
+ test('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTertiaryNoIcon);
29
+ test('Atom › AtomButtonLink › LinkTextIconRightTargetBlank › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextIconRightTargetBlank);
30
+ test('Atom › AtomButtonLink › LinkTextNoIconDownload › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextNoIconDownload);
31
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/button-link/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLink","fixtureButtonDangerousNoIcon","fixtureButtonPrimaryIconLeft","fixtureButtonPrimaryNoIcon","fixtureButtonSecondaryNoIconDisabled","fixtureButtonTertiaryIconLeft","fixtureLinkPrimaryDisabledIconRight","fixtureLinkSecondaryIconRight","fixtureLinkTertiaryNoIcon","fixtureLinkTextIconRightTargetBlank","fixtureLinkTextNoIconDownload","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,cAAP,MAA2B,IAA3B;AACA,OAAOC,4BAAP,MAAyC,qCAAzC;AACA,OAAOC,4BAAP,MAAyC,qCAAzC;AACA,OAAOC,0BAAP,MAAuC,mCAAvC;AACA,OAAOC,oCAAP,MAAiD,8CAAjD;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AACA,OAAOC,mCAAP,MAAgD,6CAAhD;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AACA,OAAOC,yBAAP,MAAsC,kCAAtC;AACA,OAAOC,mCAAP,MAAgD,8CAAhD;AACA,OAAOC,6BAAP,MAA0C,uCAA1C;AAEAb,IAAI,CAAC,qDAAD,EAAwDc,CAAC,IAAI;AAC/DA,EAAAA,CAAC,CAACC,IAAF;AACAd,EAAAA,OAAO,CAACE,cAAc,CAACa,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+CAA8CF,GAAI,mEAA3E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAlB,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,cAA7F,EAA6GC,4BAA7G,CAAJ;AACAJ,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,cAA7F,EAA6GE,4BAA7G,CAAJ;AACAL,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,cAA3F,EAA2GG,0BAA3G,CAAJ;AACAN,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,cAArG,EAAqHI,oCAArH,CAAJ;AACAP,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GK,6BAA9G,CAAJ;AACAR,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,cAApG,EAAoHM,mCAApH,CAAJ;AACAT,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GO,6BAA9G,CAAJ;AACAV,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,cAA1F,EAA0GQ,yBAA1G,CAAJ;AACAX,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,cAApG,EAAoHS,mCAApH,CAAJ;AACAZ,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GU,6BAA9G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLink from '..';\nimport fixtureButtonDangerousNoIcon from './fixtures/button-dangerous-no-icon';\nimport fixtureButtonPrimaryIconLeft from './fixtures/button-primary-icon-left';\nimport fixtureButtonPrimaryNoIcon from './fixtures/button-primary-no-icon';\nimport fixtureButtonSecondaryNoIconDisabled from './fixtures/button-secondary-no-icon-disabled';\nimport fixtureButtonTertiaryIconLeft from './fixtures/button-tertiary-icon-left';\nimport fixtureLinkPrimaryDisabledIconRight from './fixtures/link-primary-disabled-icon-right';\nimport fixtureLinkSecondaryIconRight from './fixtures/link-secondary-icon-right';\nimport fixtureLinkTertiaryNoIcon from './fixtures/link-tertiary-no-icon';\nimport fixtureLinkTextIconRightTargetBlank from './fixtures/link-text-icon-right-target-blank';\nimport fixtureLinkTextNoIconDownload from './fixtures/link-text-no-icon-download';\n\ntest('Atom › AtomButtonLink > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLink.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLink.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLink › ButtonDangerousNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonDangerousNoIcon);\ntest('Atom › AtomButtonLink › ButtonPrimaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryIconLeft);\ntest('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryNoIcon);\ntest('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonSecondaryNoIconDisabled);\ntest('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonTertiaryIconLeft);\ntest('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkPrimaryDisabledIconRight);\ntest('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkSecondaryIconRight);\ntest('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTertiaryNoIcon);\ntest('Atom › AtomButtonLink › LinkTextIconRightTargetBlank › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextIconRightTargetBlank);\ntest('Atom › AtomButtonLink › LinkTextNoIconDownload › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextNoIconDownload);\n"],"file":"fixtures.js"}
@@ -0,0 +1,23 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomButtonLinkIconOnly from '..';
5
+ import fixtureButtonIconBullet from './fixtures/button-icon-bullet';
6
+ import fixtureDefault from './fixtures/default';
7
+ import fixtureNoIcon from './fixtures/no-icon';
8
+ import fixtureReviewHeader from './fixtures/review-header';
9
+ import fixtureSmallButtonDisabled from './fixtures/small-button-disabled';
10
+ import fixtureSmallLinkDownload from './fixtures/small-link-download';
11
+ test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
12
+ t.pass();
13
+ forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {
14
+ t.not(value, undefined, `PropType for "Atom.AtomButtonLinkIconOnly.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
15
+ });
16
+ });
17
+ test('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);
18
+ test('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);
19
+ test('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);
20
+ test('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);
21
+ test('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);
22
+ test('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);
23
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +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"}
@@ -0,0 +1,15 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomButtonMenu from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureMultipleButtons from './fixtures/multiple-buttons';
7
+ test('Atom › AtomButtonMenu > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(AtomButtonMenu.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Atom.AtomButtonMenu.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Atom › AtomButtonMenu › Default › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureDefault);
14
+ test('Atom › AtomButtonMenu › MultipleButtons › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureMultipleButtons);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/button-menu/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonMenu","fixtureDefault","fixtureMultipleButtons","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,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AAEAL,IAAI,CAAC,qDAAD,EAAwDM,CAAC,IAAI;AAC/DA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+CAA8CF,GAAI,mEAA3E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,cAA/E,EAA+FC,cAA/F,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,sBAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonMenu from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureMultipleButtons from './fixtures/multiple-buttons';\n\ntest('Atom › AtomButtonMenu > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonMenu.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonMenu.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonMenu › Default › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureDefault);\ntest('Atom › AtomButtonMenu › MultipleButtons › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureMultipleButtons);\n"],"file":"fixtures.js"}
@@ -0,0 +1,15 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomCardImagePreview from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureEmpty from './fixtures/empty';
7
+ test('Atom › AtomCardImagePreview > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(AtomCardImagePreview.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Atom.AtomCardImagePreview.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Atom › AtomCardImagePreview › Default › should be rendered', renderComponentMacro, AtomCardImagePreview, fixtureDefault);
14
+ test('Atom › AtomCardImagePreview › Empty › should be rendered', renderComponentMacro, AtomCardImagePreview, fixtureEmpty);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/card-image-preview/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomCardImagePreview","fixtureDefault","fixtureEmpty","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,oBAAP,MAAiC,IAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAL,IAAI,CAAC,2DAAD,EAA8DM,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,oBAAoB,CAACK,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,oBAArF,EAA2GC,cAA3G,CAAJ;AACAJ,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,oBAAnF,EAAyGE,YAAzG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomCardImagePreview from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\n\ntest('Atom › AtomCardImagePreview > should have valid propTypes', t => {\n t.pass();\n forEach(AtomCardImagePreview.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomCardImagePreview.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomCardImagePreview › Default › should be rendered', renderComponentMacro, AtomCardImagePreview, fixtureDefault);\ntest('Atom › AtomCardImagePreview › Empty › should be rendered', renderComponentMacro, AtomCardImagePreview, fixtureEmpty);\n"],"file":"fixtures.js"}
@@ -0,0 +1,15 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomCheckboxWithTitle from '..';
5
+ import fixtureChecked from './fixtures/checked';
6
+ import fixtureUnchecked from './fixtures/unchecked';
7
+ test('Atom › AtomCheckboxWithTitle > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(AtomCheckboxWithTitle.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Atom.AtomCheckboxWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Atom › AtomCheckboxWithTitle › Checked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureChecked);
14
+ test('Atom › AtomCheckboxWithTitle › Unchecked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureUnchecked);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/checkbox-with-title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomCheckboxWithTitle","fixtureChecked","fixtureUnchecked","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAL,IAAI,CAAC,4DAAD,EAA+DM,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,qBAAtF,EAA6GC,cAA7G,CAAJ;AACAJ,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,qBAAxF,EAA+GE,gBAA/G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomCheckboxWithTitle from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomCheckboxWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomCheckboxWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomCheckboxWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomCheckboxWithTitle › Checked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureChecked);\ntest('Atom › AtomCheckboxWithTitle › Unchecked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureUnchecked);\n"],"file":"fixtures.js"}
@@ -0,0 +1,17 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomChips from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureLongText from './fixtures/long-text';
7
+ import fixtureNonSelected from './fixtures/non-selected';
8
+ test('Atom › AtomChips > should have valid propTypes', t => {
9
+ t.pass();
10
+ forEach(AtomChips.propTypes, (value, key) => {
11
+ t.not(value, undefined, `PropType for "Atom.AtomChips.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
12
+ });
13
+ });
14
+ test('Atom › AtomChips › Default › should be rendered', renderComponentMacro, AtomChips, fixtureDefault);
15
+ test('Atom › AtomChips › LongText › should be rendered', renderComponentMacro, AtomChips, fixtureLongText);
16
+ test('Atom › AtomChips › NonSelected › should be rendered', renderComponentMacro, AtomChips, fixtureNonSelected);
17
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/chips/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomChips","fixtureDefault","fixtureLongText","fixtureNonSelected","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,SAAP,MAAsB,IAAtB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AAEAN,IAAI,CAAC,gDAAD,EAAmDO,CAAC,IAAI;AAC1DA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,SAAS,CAACM,SAAX,EAAsB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0CAAyCF,GAAI,mEAAtE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,SAA1E,EAAqFC,cAArF,CAAJ;AACAJ,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,SAA3E,EAAsFE,eAAtF,CAAJ;AACAL,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,SAA9E,EAAyFG,kBAAzF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomChips from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLongText from './fixtures/long-text';\nimport fixtureNonSelected from './fixtures/non-selected';\n\ntest('Atom › AtomChips > should have valid propTypes', t => {\n t.pass();\n forEach(AtomChips.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomChips.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomChips › Default › should be rendered', renderComponentMacro, AtomChips, fixtureDefault);\ntest('Atom › AtomChips › LongText › should be rendered', renderComponentMacro, AtomChips, fixtureLongText);\ntest('Atom › AtomChips › NonSelected › should be rendered', renderComponentMacro, AtomChips, fixtureNonSelected);\n"],"file":"fixtures.js"}
@@ -0,0 +1,29 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomContentBadge from '..';
5
+ import fixtureAdvanced from './fixtures/advanced';
6
+ import fixtureArticle from './fixtures/article';
7
+ import fixtureChapter from './fixtures/chapter';
8
+ import fixtureCoach from './fixtures/coach';
9
+ import fixtureCourse from './fixtures/course';
10
+ import fixtureDefault from './fixtures/default';
11
+ import fixturePodcast from './fixtures/podcast';
12
+ import fixtureScorm from './fixtures/scorm';
13
+ import fixtureVideo from './fixtures/video';
14
+ test('Atom › AtomContentBadge > should have valid propTypes', t => {
15
+ t.pass();
16
+ forEach(AtomContentBadge.propTypes, (value, key) => {
17
+ t.not(value, undefined, `PropType for "Atom.AtomContentBadge.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
18
+ });
19
+ });
20
+ test('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);
21
+ test('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);
22
+ test('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);
23
+ test('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);
24
+ test('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);
25
+ test('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);
26
+ test('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);
27
+ test('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);
28
+ test('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);
29
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomContentBadge","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureCourse","fixtureDefault","fixturePodcast","fixtureScorm","fixtureVideo","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,gBAAP,MAA6B,IAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAZ,IAAI,CAAC,uDAAD,EAA0Da,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACAb,EAAAA,OAAO,CAACE,gBAAgB,CAACY,SAAlB,EAA6B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAjB,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,gBAAlF,EAAoGC,eAApG,CAAJ;AACAJ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,gBAAjF,EAAmGE,cAAnG,CAAJ;AACAL,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,gBAAjF,EAAmGG,cAAnG,CAAJ;AACAN,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,gBAA/E,EAAiGI,YAAjG,CAAJ;AACAP,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,gBAAhF,EAAkGK,aAAlG,CAAJ;AACAR,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,gBAAjF,EAAmGM,cAAnG,CAAJ;AACAT,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,gBAAjF,EAAmGO,cAAnG,CAAJ;AACAV,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,gBAA/E,EAAiGQ,YAAjG,CAAJ;AACAX,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,gBAA/E,EAAiGS,YAAjG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomContentBadge from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureArticle from './fixtures/article';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureCourse from './fixtures/course';\nimport fixtureDefault from './fixtures/default';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureVideo from './fixtures/video';\n\ntest('Atom › AtomContentBadge > should have valid propTypes', t => {\n t.pass();\n forEach(AtomContentBadge.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomContentBadge.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);\ntest('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);\ntest('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);\ntest('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);\ntest('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);\ntest('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);\ntest('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);\ntest('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);\ntest('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);\n"],"file":"fixtures.js"}
@@ -98,7 +98,7 @@ class DragAndDrop extends React.Component {
98
98
  className: style.resetUploadWrapper
99
99
  }, /*#__PURE__*/React.createElement("div", {
100
100
  className: style.resetSrcLabel
101
- }, previewContent.src), onReset ? /*#__PURE__*/React.createElement(Close, {
101
+ }, previewContent.label ? previewContent.label : previewContent.src), onReset ? /*#__PURE__*/React.createElement(Close, {
102
102
  "data-name": "reset-content-icon",
103
103
  height: 12,
104
104
  width: 12,
@@ -166,7 +166,8 @@ DragAndDrop.propTypes = process.env.NODE_ENV !== "production" ? {
166
166
  previewLabel: PropTypes.string,
167
167
  previewContent: PropTypes.shape({
168
168
  type: PropTypes.string,
169
- src: PropTypes.string
169
+ src: PropTypes.string,
170
+ label: PropTypes.string
170
171
  }),
171
172
  loading: PropTypes.bool,
172
173
  modified: PropTypes.bool,
@@ -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","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","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;AAmBxCC,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,GAAG;AACP,UAAMC,KAAK,GAAG,UAAS,WAAT,CAAd;;AACA,UAAM;AACJC,MAAAA,QAAQ,GAAGb,YADP;AAEJc,MAAAA,KAFI;AAGJC,MAAA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J,EAmBGa,KAAK,gBAAG;AAAM,MAAA,SAAS,EAAEvB,KAAK,CAACqD;AAAvB,OAAsC9B,KAAtC,CAAH,GAAyDY,YAnBjE,CADF;AAuBD;;AA3KuC;;AAApCjC,W,CACGoD,S,2CAAY;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"}
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","label","buildButton","defaultButtonProps","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;AAoBxCC,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,GAAG;AACP,UAAMC,KAAK,GAAG,UAAS,WAAT,CAAd;;AACA,UAAM;AACJC,MAAAA,QAAQ,GAAGb,YADP;AAEJc,MAAAA,KAFI;AAGJC,MAAAA,WAHI;AAIJC,MAAAA,WAJI;A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AAKE,cAA5B,CAAd,CAXF,CALJ,EAmBGa,KAAK,gBAAG;AAAM,MAAA,SAAS,EAAEvB,KAAK,CAACqD;AAAvB,OAAsC9B,KAAtC,CAAH,GAAyDY,YAnBjE,CADF;AAuBD;;AA9KuC;;AAApCjC,W,CACGoD,S,2CAAY;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,MAFe;AAG9BjB,IAAAA,KAAK,EAAEhD,SAAS,CAACiE;AAHa,GAAhB,CALC;AAUjBnC,EAAAA,OAAO,EAAE9B,SAAS,CAACmE,IAVF;AAWjBpC,EAAAA,QAAQ,EAAE/B,SAAS,CAACmE,IAXH;AAYjB3C,EAAAA,QAAQ,EAAExB,SAAS,CAACoE,IAZH;AAajBpC,EAAAA,OAAO,EAAEhC,SAAS,CAACoE,IAbF;AAcjBnC,EAAAA,KAAK,EAAEjC,SAAS,CAACiE,MAdA;AAejB/B,EAAAA,eAAe,EAAElC,SAAS,CAACiE,MAfV;AAgBjB9B,EAAAA,gBAAgB,EAAEnC,SAAS,CAACiE;AAhBX,C;AAgLrB,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 label: 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}>\n {previewContent.label ? previewContent.label : previewContent.src}\n </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,8 @@ export default {
6
6
  previewLabel: 'File Preview',
7
7
  previewContent: {
8
8
  type: 'image',
9
- src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'
9
+ src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg',
10
+ label: 'coorp image'
10
11
  }
11
12
  }
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,wBADF;AAELC,IAAAA,WAAW,EAAE,uCAFR;AAGLC,IAAAA,WAAW,EAAE,iBAHR;AAILC,IAAAA,YAAY,EAAE,cAJT;AAKLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;AALX;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Drag & Drop With Image',\n description: 'Drag and drop component with an image',\n uploadLabel: 'Upload Image(s)',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n }\n }\n};\n"],"file":"with-image.js"}
1
+ {"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src","label"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,wBADF;AAELC,IAAAA,WAAW,EAAE,uCAFR;AAGLC,IAAAA,WAAW,EAAE,iBAHR;AAILC,IAAAA,YAAY,EAAE,cAJT;AAKLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE,6EAFS;AAGdC,MAAAA,KAAK,EAAE;AAHO;AALX;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Drag & Drop With Image',\n description: 'Drag and drop component with an image',\n uploadLabel: 'Upload Image(s)',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg',\n label: 'coorp image'\n }\n }\n};\n"],"file":"with-image.js"}
@@ -2,11 +2,16 @@ 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';
5
6
  import fixtureDefault from './fixtures/default';
7
+ import fixtureError from './fixtures/error';
6
8
  import fixtureLoading from './fixtures/loading';
9
+ import fixtureModified from './fixtures/modified';
7
10
  import fixtureWithChildren from './fixtures/with-children';
8
11
  import fixtureWithImageReset from './fixtures/with-image-reset';
9
12
  import fixtureWithImage from './fixtures/with-image';
13
+ import fixtureWithLongDescription from './fixtures/with-long-description';
14
+ import fixtureWithSvg from './fixtures/with-svg';
10
15
  import fixtureWithVideo from './fixtures/with-video';
11
16
  test('Atom › AtomDragAndDrop > should have valid propTypes', t => {
12
17
  t.pass();
@@ -14,10 +19,15 @@ test('Atom › AtomDragAndDrop > should have valid propTypes', t => {
14
19
  t.not(value, undefined, `PropType for "Atom.AtomDragAndDrop.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
15
20
  });
16
21
  });
22
+ test('Atom › AtomDragAndDrop › CleanAndModified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureCleanAndModified);
17
23
  test('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);
24
+ test('Atom › AtomDragAndDrop › Error › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureError);
18
25
  test('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);
26
+ test('Atom › AtomDragAndDrop › Modified › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureModified);
19
27
  test('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);
20
28
  test('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);
21
29
  test('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);
30
+ test('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithLongDescription);
31
+ test('Atom › AtomDragAndDrop › WithSvg › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithSvg);
22
32
  test('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);
23
33
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
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"}
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","fixtureWithSvg","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,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAd,IAAI,CAAC,sDAAD,EAAyDe,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAf,EAAAA,OAAO,CAACE,eAAe,CAACc,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;AAOAnB,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,eAAzF,EAA0GC,uBAA1G,CAAJ;AACAJ,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGE,cAAjG,CAAJ;AACAL,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,eAA9E,EAA+FG,YAA/F,CAAJ;AACAN,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGI,cAAjG,CAAJ;AACAP,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGK,eAAlG,CAAJ;AACAR,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,eAArF,EAAsGM,mBAAtG,CAAJ;AACAT,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,eAAvF,EAAwGO,qBAAxG,CAAJ;AACAV,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGQ,gBAAnG,CAAJ;AACAX,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,eAA5F,EAA6GS,0BAA7G,CAAJ;AACAZ,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGU,cAAjG,CAAJ;AACAb,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGW,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 fixtureWithSvg from './fixtures/with-svg';\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 › WithSvg › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithSvg);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\n"],"file":"fixtures.js"}
@@ -0,0 +1,13 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomEmptySearchResult from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ test('Atom › AtomEmptySearchResult > should have valid propTypes', t => {
7
+ t.pass();
8
+ forEach(AtomEmptySearchResult.propTypes, (value, key) => {
9
+ t.not(value, undefined, `PropType for "Atom.AtomEmptySearchResult.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
+ });
11
+ });
12
+ test('Atom › AtomEmptySearchResult › Default › should be rendered', renderComponentMacro, AtomEmptySearchResult, fixtureDefault);
13
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/empty-search-result/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomEmptySearchResult","fixtureDefault","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,4DAAD,EAA+DK,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,qBAAqB,CAACI,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,qBAAtF,EAA6GC,cAA7G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomEmptySearchResult from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomEmptySearchResult > should have valid propTypes', t => {\n t.pass();\n forEach(AtomEmptySearchResult.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomEmptySearchResult.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomEmptySearchResult › Default › should be rendered', renderComponentMacro, AtomEmptySearchResult, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -24,7 +24,9 @@ const ImageUpload = ({
24
24
  name,
25
25
  // See ImagePropType for accepted values
26
26
  imageTypes = ['*'],
27
- error = ''
27
+ error = '',
28
+ buttonAriaLabel,
29
+ errorButtonLabel
28
30
  }) => {
29
31
  const handleReset = useCallback(e => {
30
32
  if (_isNil(onReset)) return;
@@ -43,7 +45,9 @@ const ImageUpload = ({
43
45
  loading: loading,
44
46
  modified: modified,
45
47
  onReset: handleReset,
46
- error: error
48
+ error: error,
49
+ buttonAriaLabel: buttonAriaLabel,
50
+ errorButtonLabel: errorButtonLabel
47
51
  }, (onDragStart, onDragStop) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
48
52
  type: "file",
49
53
  name: name,
@@ -62,7 +66,9 @@ ImageUpload.propTypes = process.env.NODE_ENV !== "production" ? _extends(_extend
62
66
  onChange: PropTypes.func,
63
67
  onReset: PropTypes.func,
64
68
  imageTypes: PropTypes.arrayOf(ImagePropType),
65
- error: PropTypes.string
69
+ error: PropTypes.string,
70
+ buttonAriaLabel: PropTypes.string,
71
+ errorButtonLabel: PropTypes.string
66
72
  }) : {};
67
73
  export default ImageUpload;
68
74
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/image-upload/index.js"],"names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","onChange","onReset","name","imageTypes","error","handleReset","e","preventDefault","acceptedImages","t","onDragStart","onDragStop","input","propTypes","string","func","arrayOf"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,KADmB;AAEnBC,EAAAA,WAFmB;AAGnBC,EAAAA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IADF,CAZJ,CADF;AA6BD,CA1DD;;AA4DAnB,WAAW,CAACqB,SAAZ,iEACKxB,WAAW,CAACwB,SADjB;AAEEX,EAAAA,IAAI,EAAEd,SAAS,CAAC0B,MAFlB;AAGEd,EAAAA,QAAQ,EAAEZ,SAAS,CAAC2B,IAHtB;AAIEd,EAAAA,OAAO,EAAEb,SAAS,CAAC2B,IAJrB;AAKEZ,EAAAA,UAAU,EAAEf,SAAS,CAAC4B,OAAV,CAAkB1B,aAAlB,CALd;AAMEc,EAAAA,KAAK,EAAEhB,SAAS,CAAC0B;AANnB;AASA,eAAetB,WAAf","sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {join, map, pipe, isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n imageTypes = ['*'],\n error = ''\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n return (\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n >\n {(onDragStart, onDragStop) => (\n <div>\n <input\n type=\"file\"\n name={name}\n accept={acceptedImages}\n disabled={loading}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n </div>\n )}\n </DragAndDrop>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/image-upload/index.js"],"names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","onChange","onReset","name","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","e","preventDefault","acceptedImages","t","onDragStart","onDragStop","input","propTypes","string","func","arrayOf"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,KADmB;AAEnBC,EAAAA,WAFmB;AAGnBC,EAAAA,YAHmB;AAInBC,EAAAA,cAJmB;AAKnBC,EAAAA,WALmB;AAMnBC,EAAAA,OANmB;AAOnBC,EAAAA,QAPmB;AAQnBC,EAAAA,QARmB;AASnBC,EAAAA,OAAO,GAAG,IATS;AAUnBC,EAAAA,IAVmB;AAWnB;AACAC,EAAAA,UAAU,GAAG,CAAC,GAAD,CAZM;AAanBC,EAAAA,KAAK,GAAG,EAbW;AAcnBC,EAAAA,eAdmB;AAenBC,EAAAA;AAfmB,CAAD,KAgBd;AACJ,QAAMC,WAAW,GAAGpB,WAAW,CAC7BqB,CAAC,IAAI;AACH,QAAI,OAAMP,OAAN,CAAJ,EAAoB;AACpBO,IAAAA,CAAC,CAACC,cAAF;AACA,WAAOR,OAAO,CAACO,CAAD,CAAd;AACD,GAL4B,EAM7B,CAACP,OAAD,CAN6B,CAA/B;;AASA,QAAMS,cAAc,GAAG,MACrB,KAAIC,CAAC,IAAK,SAAQA,CAAE,EAApB,CADqB,EAErB,MAAK,GAAL,CAFqB,EAGrBR,UAHqB,CAAvB;;AAKA,sBACE,oBAAC,WAA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il} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n return (\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <div>\n <input\n type=\"file\"\n name={name}\n accept={acceptedImages}\n disabled={loading}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n </div>\n )}\n </DragAndDrop>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"file":"index.js"}
@@ -2,6 +2,8 @@ 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';
5
7
  import fixtureDesktopResetDescriptionMultiple from './fixtures/desktop-reset-description-multiple';
6
8
  import fixtureDesktopResetDescriptionOnlyPng from './fixtures/desktop-reset-description-only-png';
7
9
  import fixtureDesktopResetDescription from './fixtures/desktop-reset-description';
@@ -10,13 +12,14 @@ import fixtureDesktop from './fixtures/desktop';
10
12
  import fixtureEmail from './fixtures/email';
11
13
  import fixtureMobile from './fixtures/mobile';
12
14
  import fixtureModified from './fixtures/modified';
13
- import fixtureWithoutImage from './fixtures/without-image';
14
15
  test('Atom › AtomImageUpload > should have valid propTypes', t => {
15
16
  t.pass();
16
17
  forEach(AtomImageUpload.propTypes, (value, key) => {
17
18
  t.not(value, undefined, `PropType for "Atom.AtomImageUpload.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
18
19
  });
19
20
  });
21
+ test('Atom › AtomImageUpload › CleanModified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureCleanModified);
22
+ test('Atom › AtomImageUpload › Default › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDefault);
20
23
  test('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionMultiple);
21
24
  test('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionOnlyPng);
22
25
  test('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescription);
@@ -25,5 +28,4 @@ test('Atom › AtomImageUpload › Desktop › should be rendered', renderCompon
25
28
  test('Atom › AtomImageUpload › Email › should be rendered', renderComponentMacro, AtomImageUpload, fixtureEmail);
26
29
  test('Atom › AtomImageUpload › Mobile › should be rendered', renderComponentMacro, AtomImageUpload, fixtureMobile);
27
30
  test('Atom › AtomImageUpload › Modified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureModified);
28
- test('Atom › AtomImageUpload › WithoutImage › should be rendered', renderComponentMacro, AtomImageUpload, fixtureWithoutImage);
29
31
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
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,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;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;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AAEAZ,IAAI,CAAC,sDAAD,EAAyDa,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAb,EAAAA,OAAO,CAACE,eAAe,CAACY,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;AAOAjB,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,eAAxG,EAAyHC,sCAAzH,CAAJ;AACAJ,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,eAAvG,EAAwHE,qCAAxH,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,eAAhG,EAAiHG,8BAAjH,CAAJ;AACAN,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,eAAlG,EAAmHI,gCAAnH,CAAJ;AACAP,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGK,cAAjG,CAAJ;AACAR,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,eAA9E,EAA+FM,YAA/F,CAAJ;AACAT,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,eAA/E,EAAgGO,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"}
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"}
@@ -2,6 +2,7 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomInputCheckbox from '..';
5
+ import fixtureCheckedDisabled from './fixtures/checked-disabled';
5
6
  import fixtureChecked from './fixtures/checked';
6
7
  import fixtureDefault from './fixtures/default';
7
8
  import fixtureDisabled from './fixtures/disabled';
@@ -14,6 +15,7 @@ test('Atom › AtomInputCheckbox > should have valid propTypes', t => {
14
15
  t.not(value, undefined, `PropType for "Atom.AtomInputCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
15
16
  });
16
17
  });
18
+ test('Atom › AtomInputCheckbox › CheckedDisabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureCheckedDisabled);
17
19
  test('Atom › AtomInputCheckbox › Checked › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureChecked);
18
20
  test('Atom › AtomInputCheckbox › Default › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDefault);
19
21
  test('Atom › AtomInputCheckbox › Disabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDisabled);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/input-checkbox/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputCheckbox","fixtureChecked","fixtureDefault","fixtureDisabled","fixtureError","fixtureModified","fixtureRequired","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAT,IAAI,CAAC,wDAAD,EAA2DU,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,iBAAiB,CAACS,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGC,cAArG,CAAJ;AACAJ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGE,cAArG,CAAJ;AACAL,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGG,eAAtG,CAAJ;AACAN,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGI,YAAnG,CAAJ;AACAP,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGK,eAAtG,CAAJ;AACAR,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGM,eAAtG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputCheckbox from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureModified from './fixtures/modified';\nimport fixtureRequired from './fixtures/required';\n\ntest('Atom › AtomInputCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputCheckbox › Checked › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureChecked);\ntest('Atom › AtomInputCheckbox › Default › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDefault);\ntest('Atom › AtomInputCheckbox › Disabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDisabled);\ntest('Atom › AtomInputCheckbox › Error › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureError);\ntest('Atom › AtomInputCheckbox › Modified › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureModified);\ntest('Atom › AtomInputCheckbox › Required › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureRequired);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/input-checkbox/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputCheckbox","fixtureCheckedDisabled","fixtureChecked","fixtureDefault","fixtureDisabled","fixtureError","fixtureModified","fixtureRequired","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAV,IAAI,CAAC,wDAAD,EAA2DW,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACAX,EAAAA,OAAO,CAACE,iBAAiB,CAACU,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAf,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,iBAA1F,EAA6GC,sBAA7G,CAAJ;AACAJ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGE,cAArG,CAAJ;AACAL,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGG,cAArG,CAAJ;AACAN,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGI,eAAtG,CAAJ;AACAP,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGK,YAAnG,CAAJ;AACAR,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGM,eAAtG,CAAJ;AACAT,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,iBAAnF,EAAsGO,eAAtG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputCheckbox from '..';\nimport fixtureCheckedDisabled from './fixtures/checked-disabled';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureModified from './fixtures/modified';\nimport fixtureRequired from './fixtures/required';\n\ntest('Atom › AtomInputCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputCheckbox › CheckedDisabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureCheckedDisabled);\ntest('Atom › AtomInputCheckbox › Checked › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureChecked);\ntest('Atom › AtomInputCheckbox › Default › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDefault);\ntest('Atom › AtomInputCheckbox › Disabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDisabled);\ntest('Atom › AtomInputCheckbox › Error › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureError);\ntest('Atom › AtomInputCheckbox › Modified › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureModified);\ntest('Atom › AtomInputCheckbox › Required › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureRequired);\n"],"file":"fixtures.js"}
@@ -0,0 +1,19 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomInputSearch from '..';
5
+ import fixtureCoorpmanagerWithValue from './fixtures/coorpmanager-with-value';
6
+ import fixtureCoorpmanager from './fixtures/coorpmanager';
7
+ import fixtureDefault from './fixtures/default';
8
+ import fixtureWithValue from './fixtures/with-value';
9
+ test('Atom › AtomInputSearch > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(AtomInputSearch.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Atom.AtomInputSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Atom › AtomInputSearch › CoorpmanagerWithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanagerWithValue);
16
+ test('Atom › AtomInputSearch › Coorpmanager › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanager);
17
+ test('Atom › AtomInputSearch › Default › should be rendered', renderComponentMacro, AtomInputSearch, fixtureDefault);
18
+ test('Atom › AtomInputSearch › WithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureWithValue);
19
+ //# sourceMappingURL=fixtures.js.map