react-jupiter 6.0.0-beta.1 → 6.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (708) hide show
  1. package/accordion/index.js +25 -0
  2. package/{src/components/accordion → accordion}/index.styles.js +6 -6
  3. package/accordion/panel.js +41 -0
  4. package/avatar/index.js +41 -0
  5. package/avatar/index.styles.js +17 -0
  6. package/avatar/theme.js +13 -0
  7. package/button/index.js +210 -0
  8. package/button/index.styles.js +104 -0
  9. package/button/theme.js +58 -0
  10. package/button/utils.js +12 -0
  11. package/card/card-template/index.js +74 -0
  12. package/card/card-template/index.stories.js +110 -0
  13. package/card/card-template/index.style.js +25 -0
  14. package/card/card-template/index.test.js +85 -0
  15. package/card/event-card/constants.js +3 -0
  16. package/card/event-card/event-card-label/index.js +24 -0
  17. package/card/event-card/event-card-label/index.style.js +10 -0
  18. package/card/event-card/event-card-label/index.test.js +23 -0
  19. package/card/event-card/index.js +227 -0
  20. package/card/event-card/index.stories.js +166 -0
  21. package/card/event-card/index.style.js +129 -0
  22. package/card/event-card/index.test.js +79 -0
  23. package/card/index.js +16 -0
  24. package/card/organization-card/index.js +59 -0
  25. package/card/organization-card/index.stories.js +49 -0
  26. package/card/organization-card/index.style.js +10 -0
  27. package/card/organization-card/index.test.js +25 -0
  28. package/card/orgnizer-card/buttons.js +48 -0
  29. package/card/orgnizer-card/index.js +179 -0
  30. package/card/orgnizer-card/index.stories.js +81 -0
  31. package/card/orgnizer-card/index.style.js +58 -0
  32. package/cover/index.js +74 -0
  33. package/cover/index.style.js +48 -0
  34. package/display/index.js +42 -0
  35. package/display/index.style.js +79 -0
  36. package/file-item/fileImgIcon.js +37 -0
  37. package/{src/components/file-item → file-item}/fileImgsFont.js +4 -4
  38. package/file-item/index.js +101 -0
  39. package/file-item/index.style.js +31 -0
  40. package/file-item/theme.js +12 -0
  41. package/file-item/utils.js +3 -0
  42. package/form/captcha/index.js +86 -0
  43. package/form/captcha/index.stories.js +42 -0
  44. package/form/captcha/index.style.js +38 -0
  45. package/form/captcha/index.test.js +31 -0
  46. package/form/checkbox/checkbox-option.js +41 -0
  47. package/form/checkbox/checkbox.js +54 -0
  48. package/form/checkbox/index.js +10 -0
  49. package/form/checkbox/index.stories.js +121 -0
  50. package/form/checkbox/index.style.js +62 -0
  51. package/form/dropdown/index.js +10 -0
  52. package/form/dropdown/index.stories.js +119 -0
  53. package/form/dropdown/index.style.js +57 -0
  54. package/form/dropdown/index.test.js +20 -0
  55. package/form/dropdown/option.js +22 -0
  56. package/form/dropdown/select.js +68 -0
  57. package/form/errorMsg.js +21 -0
  58. package/form/index.js +22 -0
  59. package/form/radio/index.js +10 -0
  60. package/form/radio/index.stories.js +119 -0
  61. package/form/radio/index.style.js +61 -0
  62. package/form/radio/radio-option.js +45 -0
  63. package/form/radio/radio.js +56 -0
  64. package/form/text-input/index.js +92 -0
  65. package/form/text-input/index.stories.js +77 -0
  66. package/form/text-input/index.style.js +57 -0
  67. package/form/text-input/index.test.js +63 -0
  68. package/form/textarea/index.js +59 -0
  69. package/form/textarea/index.stories.js +90 -0
  70. package/form/textarea/index.style.js +25 -0
  71. package/form/theme.js +16 -0
  72. package/form-v7/captcha/index.js +101 -0
  73. package/form-v7/captcha/index.stories.js +60 -0
  74. package/form-v7/captcha/index.style.js +38 -0
  75. package/form-v7/captcha/index.test.js +31 -0
  76. package/form-v7/checkbox/checkbox-option.js +44 -0
  77. package/form-v7/checkbox/checkbox.js +70 -0
  78. package/form-v7/checkbox/index.js +10 -0
  79. package/form-v7/checkbox/index.stories.js +113 -0
  80. package/form-v7/checkbox/index.style.js +62 -0
  81. package/form-v7/dropdown/index.js +10 -0
  82. package/form-v7/dropdown/index.stories.js +130 -0
  83. package/form-v7/dropdown/index.style.js +57 -0
  84. package/form-v7/dropdown/index.test.js +20 -0
  85. package/form-v7/dropdown/option.js +18 -0
  86. package/form-v7/dropdown/select.js +85 -0
  87. package/form-v7/errorMsg.js +21 -0
  88. package/form-v7/file-input/index.js +73 -0
  89. package/form-v7/file-input/index.stories.js +73 -0
  90. package/form-v7/file-input/index.style.js +62 -0
  91. package/form-v7/file-input/index.test.js +63 -0
  92. package/form-v7/form/index.stories.js +276 -0
  93. package/form-v7/index.js +25 -0
  94. package/form-v7/index.style.js +11 -0
  95. package/form-v7/label/index.js +31 -0
  96. package/form-v7/label/index.style.js +12 -0
  97. package/form-v7/radio/index.js +10 -0
  98. package/form-v7/radio/index.stories.js +117 -0
  99. package/form-v7/radio/index.style.js +61 -0
  100. package/form-v7/radio/radio-option.js +45 -0
  101. package/form-v7/radio/radio.js +75 -0
  102. package/form-v7/text-input/index.js +132 -0
  103. package/form-v7/text-input/index.stories.js +96 -0
  104. package/form-v7/text-input/index.style.js +49 -0
  105. package/form-v7/text-input/index.test.js +63 -0
  106. package/form-v7/textarea/index.js +71 -0
  107. package/form-v7/textarea/index.stories.js +91 -0
  108. package/form-v7/textarea/index.style.js +25 -0
  109. package/form-v7/theme.js +20 -0
  110. package/{src/components/globalStyle.js → globalStyle.js} +4 -4
  111. package/grid/index.js +83 -0
  112. package/icon/iconFont.js +1054 -0
  113. package/icon/index.js +121 -0
  114. package/icon/index.styles.js +12 -0
  115. package/icon/theme.js +23 -0
  116. package/index.js +75 -0
  117. package/modal/index.js +100 -0
  118. package/modal/index.style.js +40 -0
  119. package/modal/theme.js +11 -0
  120. package/numeric-summery-report/index.js +28 -0
  121. package/numeric-summery-report/index.style.js +16 -0
  122. package/package.json +3 -3
  123. package/product-menu/index.js +10 -0
  124. package/product-menu/index.style.js +38 -0
  125. package/product-menu/menu-item.js +23 -0
  126. package/product-menu/menu.js +88 -0
  127. package/product-menu/theme.js +16 -0
  128. package/product-owner/index.js +85 -0
  129. package/product-owner/index.style.js +16 -0
  130. package/product-properties/index.js +65 -0
  131. package/product-properties/index.style.js +14 -0
  132. package/product-properties/product-property/index.js +49 -0
  133. package/product-properties/product-property/index.style.js +9 -0
  134. package/progress-bar/index.js +46 -0
  135. package/{dist/components/progress-bar → progress-bar}/index.styles.js +11 -11
  136. package/responsive/index.js +44 -0
  137. package/show-date/index.js +25 -0
  138. package/spacing/core.js +106 -0
  139. package/spacing/index.js +10 -0
  140. package/spacing/margin/index.js +26 -0
  141. package/spacing/padding/index.js +26 -0
  142. package/table/actionCell.js +57 -0
  143. package/table/index.js +56 -0
  144. package/{src/components/table → table}/index.style.js +31 -31
  145. package/table/tableHeaderRow.js +28 -0
  146. package/table/tableRow.js +60 -0
  147. package/table/theme.js +8 -0
  148. package/tabs/index.js +10 -0
  149. package/tabs/index.style.js +35 -0
  150. package/tabs/tabPanel.js +17 -0
  151. package/tabs/tabs.js +71 -0
  152. package/tabs/theme.js +10 -0
  153. package/themes.js +97 -0
  154. package/titled-avatar/index.js +48 -0
  155. package/titled-avatar/index.style.js +30 -0
  156. package/typography/heading/index.js +59 -0
  157. package/typography/heading/index.stories.js +94 -0
  158. package/typography/heading/index.styles.js +69 -0
  159. package/typography/heading/index.test.js +122 -0
  160. package/typography/index.js +16 -0
  161. package/typography/link/index.js +82 -0
  162. package/typography/link/index.stories.js +70 -0
  163. package/typography/link/index.styles.js +8 -0
  164. package/typography/link/index.test.js +60 -0
  165. package/typography/paragraph/index.js +37 -0
  166. package/typography/paragraph/index.stories.js +56 -0
  167. package/typography/paragraph/index.styles.js +12 -0
  168. package/typography/paragraph/index.test.js +47 -0
  169. package/typography/text/index.js +156 -0
  170. package/typography/text/index.stories.js +196 -0
  171. package/typography/text/index.styles.js +73 -0
  172. package/typography/text/index.test.js +333 -0
  173. package/typography/theme.js +66 -0
  174. package/typography/utils.js +53 -0
  175. package/utils/date.js +7 -0
  176. package/utils/detectMobile.js +15 -0
  177. package/utils/index.js +7 -0
  178. package/utils/media-query.js +12 -0
  179. package/utils/numbers.js +25 -0
  180. package/utils/test.js +6 -0
  181. package/utils/theme.js +67 -0
  182. package/.babelrc +0 -12
  183. package/.env +0 -3
  184. package/.eslintignore +0 -2
  185. package/.eslintrc +0 -18
  186. package/.eslintrc.js +0 -47
  187. package/.eslintrc.json +0 -16
  188. package/.flowconfig +0 -0
  189. package/.storybook/main.js +0 -27
  190. package/.storybook/preview-head.html +0 -1
  191. package/.storybook/preview.js +0 -30
  192. package/.storybook/style.css +0 -9
  193. package/.vscode/settings.json +0 -4
  194. package/__mocks__/fileMock.js +0 -1
  195. package/config-overrides.js +0 -34
  196. package/dist/App.js +0 -13
  197. package/dist/components/accordion/index.js +0 -25
  198. package/dist/components/accordion/index.stories.js +0 -82
  199. package/dist/components/accordion/index.styles.js +0 -52
  200. package/dist/components/accordion/panel.js +0 -41
  201. package/dist/components/avatar/index.js +0 -41
  202. package/dist/components/avatar/index.stories.js +0 -59
  203. package/dist/components/avatar/index.styles.js +0 -17
  204. package/dist/components/avatar/index.test.js +0 -10
  205. package/dist/components/avatar/theme.js +0 -13
  206. package/dist/components/button/__snapshots__/index.test.js.snap +0 -489
  207. package/dist/components/button/index.js +0 -209
  208. package/dist/components/button/index.stories.js +0 -304
  209. package/dist/components/button/index.styles.js +0 -104
  210. package/dist/components/button/theme.js +0 -58
  211. package/dist/components/button/utils.js +0 -12
  212. package/dist/components/card/card-template/index.js +0 -74
  213. package/dist/components/card/card-template/index.stories.js +0 -110
  214. package/dist/components/card/card-template/index.style.js +0 -25
  215. package/dist/components/card/card-template/index.test.js +0 -85
  216. package/dist/components/card/event-card/constants.js +0 -3
  217. package/dist/components/card/event-card/event-card-label/index.js +0 -24
  218. package/dist/components/card/event-card/event-card-label/index.style.js +0 -10
  219. package/dist/components/card/event-card/event-card-label/index.test.js +0 -23
  220. package/dist/components/card/event-card/index.js +0 -227
  221. package/dist/components/card/event-card/index.stories.js +0 -166
  222. package/dist/components/card/event-card/index.style.js +0 -129
  223. package/dist/components/card/event-card/index.test.js +0 -79
  224. package/dist/components/card/index.js +0 -16
  225. package/dist/components/card/organization-card/index.js +0 -59
  226. package/dist/components/card/organization-card/index.stories.js +0 -49
  227. package/dist/components/card/organization-card/index.style.js +0 -10
  228. package/dist/components/card/organization-card/index.test.js +0 -25
  229. package/dist/components/card/orgnizer-card/buttons.js +0 -48
  230. package/dist/components/card/orgnizer-card/index.js +0 -179
  231. package/dist/components/card/orgnizer-card/index.stories.js +0 -81
  232. package/dist/components/card/orgnizer-card/index.style.js +0 -58
  233. package/dist/components/cover/index.js +0 -74
  234. package/dist/components/cover/index.style.js +0 -48
  235. package/dist/components/cover/index.test.js +0 -25
  236. package/dist/components/display/index.js +0 -42
  237. package/dist/components/display/index.style.js +0 -79
  238. package/dist/components/file-item/fileImgIcon.js +0 -37
  239. package/dist/components/file-item/fileImgsFont.js +0 -800
  240. package/dist/components/file-item/index.js +0 -101
  241. package/dist/components/file-item/index.stories.js +0 -71
  242. package/dist/components/file-item/index.style.js +0 -31
  243. package/dist/components/file-item/index.test.js +0 -106
  244. package/dist/components/file-item/theme.js +0 -12
  245. package/dist/components/file-item/utils.js +0 -3
  246. package/dist/components/form/captcha/index.js +0 -86
  247. package/dist/components/form/captcha/index.stories.js +0 -42
  248. package/dist/components/form/captcha/index.style.js +0 -38
  249. package/dist/components/form/captcha/index.test.js +0 -31
  250. package/dist/components/form/checkbox/checkbox-option.js +0 -41
  251. package/dist/components/form/checkbox/checkbox.js +0 -54
  252. package/dist/components/form/checkbox/index.js +0 -10
  253. package/dist/components/form/checkbox/index.stories.js +0 -121
  254. package/dist/components/form/checkbox/index.style.js +0 -62
  255. package/dist/components/form/dropdown/index.js +0 -10
  256. package/dist/components/form/dropdown/index.stories.js +0 -119
  257. package/dist/components/form/dropdown/index.style.js +0 -57
  258. package/dist/components/form/dropdown/index.test.js +0 -20
  259. package/dist/components/form/dropdown/option.js +0 -22
  260. package/dist/components/form/dropdown/select.js +0 -68
  261. package/dist/components/form/errorMsg.js +0 -21
  262. package/dist/components/form/index.js +0 -22
  263. package/dist/components/form/radio/index.js +0 -10
  264. package/dist/components/form/radio/index.stories.js +0 -119
  265. package/dist/components/form/radio/index.style.js +0 -61
  266. package/dist/components/form/radio/radio-option.js +0 -45
  267. package/dist/components/form/radio/radio.js +0 -56
  268. package/dist/components/form/text-input/index.js +0 -92
  269. package/dist/components/form/text-input/index.stories.js +0 -77
  270. package/dist/components/form/text-input/index.style.js +0 -57
  271. package/dist/components/form/text-input/index.test.js +0 -63
  272. package/dist/components/form/textarea/index.js +0 -59
  273. package/dist/components/form/textarea/index.stories.js +0 -90
  274. package/dist/components/form/textarea/index.style.js +0 -25
  275. package/dist/components/form/theme.js +0 -16
  276. package/dist/components/form-v7/captcha/index.js +0 -101
  277. package/dist/components/form-v7/captcha/index.stories.js +0 -60
  278. package/dist/components/form-v7/captcha/index.style.js +0 -38
  279. package/dist/components/form-v7/captcha/index.test.js +0 -31
  280. package/dist/components/form-v7/checkbox/checkbox-option.js +0 -44
  281. package/dist/components/form-v7/checkbox/checkbox.js +0 -70
  282. package/dist/components/form-v7/checkbox/index.js +0 -10
  283. package/dist/components/form-v7/checkbox/index.stories.js +0 -113
  284. package/dist/components/form-v7/checkbox/index.style.js +0 -62
  285. package/dist/components/form-v7/dropdown/index.js +0 -10
  286. package/dist/components/form-v7/dropdown/index.stories.js +0 -130
  287. package/dist/components/form-v7/dropdown/index.style.js +0 -57
  288. package/dist/components/form-v7/dropdown/index.test.js +0 -20
  289. package/dist/components/form-v7/dropdown/option.js +0 -18
  290. package/dist/components/form-v7/dropdown/select.js +0 -85
  291. package/dist/components/form-v7/errorMsg.js +0 -21
  292. package/dist/components/form-v7/file-input/index.js +0 -73
  293. package/dist/components/form-v7/file-input/index.stories.js +0 -73
  294. package/dist/components/form-v7/file-input/index.style.js +0 -62
  295. package/dist/components/form-v7/file-input/index.test.js +0 -63
  296. package/dist/components/form-v7/form/index.stories.js +0 -276
  297. package/dist/components/form-v7/index.js +0 -25
  298. package/dist/components/form-v7/index.style.js +0 -11
  299. package/dist/components/form-v7/label/index.js +0 -31
  300. package/dist/components/form-v7/label/index.style.js +0 -12
  301. package/dist/components/form-v7/radio/index.js +0 -10
  302. package/dist/components/form-v7/radio/index.stories.js +0 -117
  303. package/dist/components/form-v7/radio/index.style.js +0 -61
  304. package/dist/components/form-v7/radio/radio-option.js +0 -45
  305. package/dist/components/form-v7/radio/radio.js +0 -75
  306. package/dist/components/form-v7/text-input/index.js +0 -132
  307. package/dist/components/form-v7/text-input/index.stories.js +0 -96
  308. package/dist/components/form-v7/text-input/index.style.js +0 -49
  309. package/dist/components/form-v7/text-input/index.test.js +0 -63
  310. package/dist/components/form-v7/textarea/index.js +0 -71
  311. package/dist/components/form-v7/textarea/index.stories.js +0 -91
  312. package/dist/components/form-v7/textarea/index.style.js +0 -25
  313. package/dist/components/form-v7/theme.js +0 -20
  314. package/dist/components/globalStyle.js +0 -28
  315. package/dist/components/grid/index.js +0 -83
  316. package/dist/components/icon/iconFont.js +0 -806
  317. package/dist/components/icon/index.js +0 -116
  318. package/dist/components/icon/index.stories.js +0 -45
  319. package/dist/components/icon/index.styles.js +0 -12
  320. package/dist/components/icon/index.test.js +0 -66
  321. package/dist/components/icon/theme.js +0 -23
  322. package/dist/components/index.js +0 -75
  323. package/dist/components/modal/index.js +0 -100
  324. package/dist/components/modal/index.stories.js +0 -86
  325. package/dist/components/modal/index.style.js +0 -40
  326. package/dist/components/modal/theme.js +0 -11
  327. package/dist/components/numeric-summery-report/index.js +0 -28
  328. package/dist/components/numeric-summery-report/index.stories.js +0 -37
  329. package/dist/components/numeric-summery-report/index.style.js +0 -16
  330. package/dist/components/numeric-summery-report/index.test.js +0 -22
  331. package/dist/components/product-menu/index.js +0 -10
  332. package/dist/components/product-menu/index.stories.js +0 -33
  333. package/dist/components/product-menu/index.style.js +0 -38
  334. package/dist/components/product-menu/index.test.js +0 -27
  335. package/dist/components/product-menu/menu-item.js +0 -23
  336. package/dist/components/product-menu/menu.js +0 -88
  337. package/dist/components/product-menu/theme.js +0 -16
  338. package/dist/components/product-owner/index.js +0 -85
  339. package/dist/components/product-owner/index.style.js +0 -16
  340. package/dist/components/product-owner/index.test.js +0 -75
  341. package/dist/components/product-properties/index.js +0 -65
  342. package/dist/components/product-properties/index.stories.js +0 -52
  343. package/dist/components/product-properties/index.style.js +0 -14
  344. package/dist/components/product-properties/index.test.js +0 -31
  345. package/dist/components/product-properties/product-property/index.js +0 -49
  346. package/dist/components/product-properties/product-property/index.style.js +0 -9
  347. package/dist/components/progress-bar/index.js +0 -46
  348. package/dist/components/progress-bar/index.stories.js +0 -33
  349. package/dist/components/responsive/index.js +0 -44
  350. package/dist/components/show-date/index.js +0 -25
  351. package/dist/components/show-date/index.stories.js +0 -51
  352. package/dist/components/show-date/index.test.js +0 -24
  353. package/dist/components/spacing/core.js +0 -106
  354. package/dist/components/spacing/index.js +0 -10
  355. package/dist/components/spacing/margin/index.js +0 -26
  356. package/dist/components/spacing/padding/index.js +0 -26
  357. package/dist/components/storybook.css +0 -54
  358. package/dist/components/table/actionCell.js +0 -57
  359. package/dist/components/table/index.js +0 -56
  360. package/dist/components/table/index.stories.js +0 -188
  361. package/dist/components/table/index.style.js +0 -107
  362. package/dist/components/table/index.test.js +0 -119
  363. package/dist/components/table/tableHeaderRow.js +0 -28
  364. package/dist/components/table/tableRow.js +0 -60
  365. package/dist/components/table/theme.js +0 -8
  366. package/dist/components/tabs/index.js +0 -10
  367. package/dist/components/tabs/index.stories.js +0 -61
  368. package/dist/components/tabs/index.style.js +0 -35
  369. package/dist/components/tabs/index.test.js +0 -30
  370. package/dist/components/tabs/tabPanel.js +0 -17
  371. package/dist/components/tabs/tabs.js +0 -71
  372. package/dist/components/tabs/theme.js +0 -10
  373. package/dist/components/themes.js +0 -97
  374. package/dist/components/titled-avatar/index.js +0 -48
  375. package/dist/components/titled-avatar/index.stories.js +0 -52
  376. package/dist/components/titled-avatar/index.style.js +0 -30
  377. package/dist/components/titled-avatar/index.test.js +0 -25
  378. package/dist/components/typography/heading/index.js +0 -59
  379. package/dist/components/typography/heading/index.stories.js +0 -94
  380. package/dist/components/typography/heading/index.styles.js +0 -69
  381. package/dist/components/typography/heading/index.test.js +0 -122
  382. package/dist/components/typography/index.js +0 -16
  383. package/dist/components/typography/link/index.js +0 -82
  384. package/dist/components/typography/link/index.stories.js +0 -70
  385. package/dist/components/typography/link/index.styles.js +0 -8
  386. package/dist/components/typography/link/index.test.js +0 -60
  387. package/dist/components/typography/paragraph/index.js +0 -37
  388. package/dist/components/typography/paragraph/index.stories.js +0 -56
  389. package/dist/components/typography/paragraph/index.styles.js +0 -12
  390. package/dist/components/typography/paragraph/index.test.js +0 -47
  391. package/dist/components/typography/text/index.js +0 -156
  392. package/dist/components/typography/text/index.stories.js +0 -196
  393. package/dist/components/typography/text/index.styles.js +0 -73
  394. package/dist/components/typography/text/index.test.js +0 -333
  395. package/dist/components/typography/theme.js +0 -66
  396. package/dist/components/typography/utils.js +0 -53
  397. package/dist/components/typography/utils.test.js +0 -188
  398. package/dist/components/utils/date.js +0 -7
  399. package/dist/components/utils/date.test.js +0 -15
  400. package/dist/components/utils/detectMobile.js +0 -15
  401. package/dist/components/utils/index.js +0 -7
  402. package/dist/components/utils/media-query.js +0 -12
  403. package/dist/components/utils/numbers.js +0 -25
  404. package/dist/components/utils/test.js +0 -6
  405. package/dist/components/utils/theme.js +0 -67
  406. package/dist/docs/App.css +0 -33
  407. package/dist/docs/App.js +0 -52
  408. package/dist/docs/assets/ads-label.svg +0 -13
  409. package/dist/docs/assets/avatar-sample.jpeg +0 -0
  410. package/dist/docs/assets/cover-sample.png +0 -0
  411. package/dist/docs/assets/fonts/filesImgs.woff +0 -0
  412. package/dist/docs/assets/fonts/icomoon.woff +0 -0
  413. package/dist/docs/assets/fonts/iransharp_bold_web.woff +0 -0
  414. package/dist/docs/assets/fonts/iransharp_bold_web.woff2 +0 -0
  415. package/dist/docs/assets/fonts/iransharp_regular_web.woff +0 -0
  416. package/dist/docs/assets/fonts/iransharp_regular_web.woff2 +0 -0
  417. package/dist/docs/assets/fonts/wer6t7890- +0 -0
  418. package/dist/docs/assets/logo.svg +0 -7
  419. package/dist/docs/components/header/index.js +0 -10
  420. package/dist/docs/components/header/index.styles.js +0 -10
  421. package/dist/docs/components/side-navigation/index.js +0 -167
  422. package/dist/docs/components/side-navigation/index.styles.js +0 -46
  423. package/dist/docs/containers/avatar/index.js +0 -92
  424. package/dist/docs/containers/button/index.js +0 -295
  425. package/dist/docs/containers/card/index.js +0 -153
  426. package/dist/docs/containers/cover/index.js +0 -77
  427. package/dist/docs/containers/form/index.js +0 -41
  428. package/dist/docs/containers/home/index.js +0 -41
  429. package/dist/docs/containers/icon/index.js +0 -56
  430. package/dist/docs/containers/icons/index.js +0 -1488
  431. package/dist/docs/containers/product/index.js +0 -123
  432. package/dist/docs/containers/typography/index.js +0 -138
  433. package/dist/docs/globalStyle.js +0 -58
  434. package/dist/index.css +0 -3
  435. package/dist/index.js +0 -18
  436. package/dist/playground/index.js +0 -144
  437. package/dist/playground.css +0 -26
  438. package/dist/serviceWorker.js +0 -135
  439. package/dist/setupTests.js +0 -24
  440. package/dist/stories/Page.js +0 -67
  441. package/dist/storybook.css +0 -58
  442. package/dist/styles.css +0 -3
  443. package/dist/test-utils.js +0 -21
  444. package/doctor-storybook.log +0 -25
  445. package/migration-storybook.log +0 -329
  446. package/package.lib.json +0 -47
  447. package/postcss.config.js +0 -6
  448. package/public/assets/fonts/iransharp_bold_web.woff2 +0 -0
  449. package/public/assets/fonts/iransharp_light_web.woff2 +0 -0
  450. package/public/assets/fonts/iransharp_regular_web.woff2 +0 -0
  451. package/public/favicon.ico +0 -0
  452. package/public/index.html +0 -43
  453. package/public/logo.svg +0 -1
  454. package/public/logo142.svg +0 -1
  455. package/public/manifest.json +0 -25
  456. package/public/robots.txt +0 -2
  457. package/src/App.js +0 -13
  458. package/src/components/accordion/index.js +0 -25
  459. package/src/components/accordion/index.stories.js +0 -82
  460. package/src/components/accordion/panel.js +0 -41
  461. package/src/components/avatar/index.js +0 -41
  462. package/src/components/avatar/index.stories.js +0 -59
  463. package/src/components/avatar/index.styles.js +0 -17
  464. package/src/components/avatar/index.test.js +0 -10
  465. package/src/components/avatar/theme.js +0 -13
  466. package/src/components/button/__snapshots__/index.test.js.snap +0 -489
  467. package/src/components/button/index.js +0 -209
  468. package/src/components/button/index.stories.js +0 -304
  469. package/src/components/button/index.styles.js +0 -104
  470. package/src/components/button/theme.js +0 -60
  471. package/src/components/button/utils.js +0 -12
  472. package/src/components/card/card-template/index.js +0 -74
  473. package/src/components/card/card-template/index.stories.js +0 -110
  474. package/src/components/card/card-template/index.style.js +0 -25
  475. package/src/components/card/card-template/index.test.js +0 -85
  476. package/src/components/card/event-card/constants.js +0 -3
  477. package/src/components/card/event-card/event-card-label/index.js +0 -24
  478. package/src/components/card/event-card/event-card-label/index.style.js +0 -10
  479. package/src/components/card/event-card/event-card-label/index.test.js +0 -23
  480. package/src/components/card/event-card/index.js +0 -227
  481. package/src/components/card/event-card/index.stories.js +0 -166
  482. package/src/components/card/event-card/index.style.js +0 -129
  483. package/src/components/card/event-card/index.test.js +0 -79
  484. package/src/components/card/index.js +0 -16
  485. package/src/components/card/organization-card/index.js +0 -59
  486. package/src/components/card/organization-card/index.stories.js +0 -49
  487. package/src/components/card/organization-card/index.style.js +0 -10
  488. package/src/components/card/organization-card/index.test.js +0 -25
  489. package/src/components/card/orgnizer-card/buttons.js +0 -48
  490. package/src/components/card/orgnizer-card/index.js +0 -179
  491. package/src/components/card/orgnizer-card/index.stories.js +0 -81
  492. package/src/components/card/orgnizer-card/index.style.js +0 -58
  493. package/src/components/cover/index.js +0 -74
  494. package/src/components/cover/index.style.js +0 -48
  495. package/src/components/cover/index.test.js +0 -25
  496. package/src/components/display/index.js +0 -42
  497. package/src/components/display/index.style.js +0 -80
  498. package/src/components/file-item/fileImgIcon.js +0 -37
  499. package/src/components/file-item/index.js +0 -101
  500. package/src/components/file-item/index.stories.js +0 -71
  501. package/src/components/file-item/index.style.js +0 -31
  502. package/src/components/file-item/index.test.js +0 -106
  503. package/src/components/file-item/theme.js +0 -12
  504. package/src/components/file-item/utils.js +0 -3
  505. package/src/components/form/captcha/index.js +0 -86
  506. package/src/components/form/captcha/index.stories.js +0 -42
  507. package/src/components/form/captcha/index.style.js +0 -38
  508. package/src/components/form/captcha/index.test.js +0 -31
  509. package/src/components/form/checkbox/checkbox-option.js +0 -41
  510. package/src/components/form/checkbox/checkbox.js +0 -54
  511. package/src/components/form/checkbox/index.js +0 -10
  512. package/src/components/form/checkbox/index.stories.js +0 -121
  513. package/src/components/form/checkbox/index.style.js +0 -62
  514. package/src/components/form/dropdown/index.js +0 -10
  515. package/src/components/form/dropdown/index.stories.js +0 -119
  516. package/src/components/form/dropdown/index.style.js +0 -57
  517. package/src/components/form/dropdown/index.test.js +0 -20
  518. package/src/components/form/dropdown/option.js +0 -22
  519. package/src/components/form/dropdown/select.js +0 -68
  520. package/src/components/form/errorMsg.js +0 -21
  521. package/src/components/form/index.js +0 -22
  522. package/src/components/form/radio/index.js +0 -10
  523. package/src/components/form/radio/index.stories.js +0 -119
  524. package/src/components/form/radio/index.style.js +0 -61
  525. package/src/components/form/radio/radio-option.js +0 -45
  526. package/src/components/form/radio/radio.js +0 -56
  527. package/src/components/form/text-input/index.js +0 -92
  528. package/src/components/form/text-input/index.stories.js +0 -77
  529. package/src/components/form/text-input/index.style.js +0 -57
  530. package/src/components/form/text-input/index.test.js +0 -63
  531. package/src/components/form/textarea/index.js +0 -59
  532. package/src/components/form/textarea/index.stories.js +0 -90
  533. package/src/components/form/textarea/index.style.js +0 -25
  534. package/src/components/form/theme.js +0 -16
  535. package/src/components/form-v7/captcha/index.js +0 -101
  536. package/src/components/form-v7/captcha/index.stories.js +0 -60
  537. package/src/components/form-v7/captcha/index.style.js +0 -38
  538. package/src/components/form-v7/captcha/index.test.js +0 -31
  539. package/src/components/form-v7/checkbox/checkbox-option.js +0 -44
  540. package/src/components/form-v7/checkbox/checkbox.js +0 -70
  541. package/src/components/form-v7/checkbox/index.js +0 -10
  542. package/src/components/form-v7/checkbox/index.stories.js +0 -113
  543. package/src/components/form-v7/checkbox/index.style.js +0 -62
  544. package/src/components/form-v7/dropdown/index.js +0 -10
  545. package/src/components/form-v7/dropdown/index.stories.js +0 -130
  546. package/src/components/form-v7/dropdown/index.style.js +0 -57
  547. package/src/components/form-v7/dropdown/index.test.js +0 -20
  548. package/src/components/form-v7/dropdown/option.js +0 -18
  549. package/src/components/form-v7/dropdown/select.js +0 -85
  550. package/src/components/form-v7/errorMsg.js +0 -21
  551. package/src/components/form-v7/file-input/index.js +0 -73
  552. package/src/components/form-v7/file-input/index.stories.js +0 -73
  553. package/src/components/form-v7/file-input/index.style.js +0 -62
  554. package/src/components/form-v7/file-input/index.test.js +0 -63
  555. package/src/components/form-v7/form/index.stories.js +0 -276
  556. package/src/components/form-v7/index.js +0 -25
  557. package/src/components/form-v7/index.style.js +0 -11
  558. package/src/components/form-v7/label/index.js +0 -31
  559. package/src/components/form-v7/label/index.style.js +0 -12
  560. package/src/components/form-v7/radio/index.js +0 -10
  561. package/src/components/form-v7/radio/index.stories.js +0 -117
  562. package/src/components/form-v7/radio/index.style.js +0 -61
  563. package/src/components/form-v7/radio/radio-option.js +0 -45
  564. package/src/components/form-v7/radio/radio.js +0 -75
  565. package/src/components/form-v7/text-input/index.js +0 -132
  566. package/src/components/form-v7/text-input/index.stories.js +0 -96
  567. package/src/components/form-v7/text-input/index.style.js +0 -49
  568. package/src/components/form-v7/text-input/index.test.js +0 -63
  569. package/src/components/form-v7/textarea/index.js +0 -71
  570. package/src/components/form-v7/textarea/index.stories.js +0 -91
  571. package/src/components/form-v7/textarea/index.style.js +0 -25
  572. package/src/components/form-v7/theme.js +0 -20
  573. package/src/components/grid/index.js +0 -83
  574. package/src/components/icon/iconFont.js +0 -806
  575. package/src/components/icon/index.js +0 -116
  576. package/src/components/icon/index.stories.js +0 -45
  577. package/src/components/icon/index.styles.js +0 -12
  578. package/src/components/icon/index.test.js +0 -66
  579. package/src/components/icon/theme.js +0 -23
  580. package/src/components/index.js +0 -75
  581. package/src/components/modal/index.js +0 -100
  582. package/src/components/modal/index.stories.js +0 -86
  583. package/src/components/modal/index.style.js +0 -40
  584. package/src/components/modal/theme.js +0 -11
  585. package/src/components/numeric-summery-report/index.js +0 -28
  586. package/src/components/numeric-summery-report/index.stories.js +0 -37
  587. package/src/components/numeric-summery-report/index.style.js +0 -16
  588. package/src/components/numeric-summery-report/index.test.js +0 -22
  589. package/src/components/product-menu/index.js +0 -10
  590. package/src/components/product-menu/index.stories.js +0 -33
  591. package/src/components/product-menu/index.style.js +0 -38
  592. package/src/components/product-menu/index.test.js +0 -27
  593. package/src/components/product-menu/menu-item.js +0 -23
  594. package/src/components/product-menu/menu.js +0 -88
  595. package/src/components/product-menu/theme.js +0 -16
  596. package/src/components/product-owner/index.js +0 -85
  597. package/src/components/product-owner/index.style.js +0 -16
  598. package/src/components/product-owner/index.test.js +0 -75
  599. package/src/components/product-properties/index.js +0 -65
  600. package/src/components/product-properties/index.stories.js +0 -52
  601. package/src/components/product-properties/index.style.js +0 -14
  602. package/src/components/product-properties/index.test.js +0 -31
  603. package/src/components/product-properties/product-property/index.js +0 -49
  604. package/src/components/product-properties/product-property/index.style.js +0 -9
  605. package/src/components/progress-bar/index.js +0 -46
  606. package/src/components/progress-bar/index.stories.js +0 -33
  607. package/src/components/progress-bar/index.styles.js +0 -65
  608. package/src/components/responsive/index.js +0 -44
  609. package/src/components/show-date/index.js +0 -25
  610. package/src/components/show-date/index.stories.js +0 -51
  611. package/src/components/show-date/index.style.js +0 -1
  612. package/src/components/show-date/index.test.js +0 -24
  613. package/src/components/spacing/core.js +0 -106
  614. package/src/components/spacing/index.js +0 -10
  615. package/src/components/spacing/margin/index.js +0 -26
  616. package/src/components/spacing/padding/index.js +0 -26
  617. package/src/components/storybook.css +0 -54
  618. package/src/components/table/actionCell.js +0 -57
  619. package/src/components/table/index.js +0 -56
  620. package/src/components/table/index.stories.js +0 -188
  621. package/src/components/table/index.test.js +0 -119
  622. package/src/components/table/tableHeaderRow.js +0 -28
  623. package/src/components/table/tableRow.js +0 -60
  624. package/src/components/table/theme.js +0 -8
  625. package/src/components/tabs/index.js +0 -10
  626. package/src/components/tabs/index.stories.js +0 -61
  627. package/src/components/tabs/index.style.js +0 -35
  628. package/src/components/tabs/index.test.js +0 -30
  629. package/src/components/tabs/tabPanel.js +0 -17
  630. package/src/components/tabs/tabs.js +0 -71
  631. package/src/components/tabs/theme.js +0 -10
  632. package/src/components/themes.js +0 -97
  633. package/src/components/titled-avatar/index.js +0 -48
  634. package/src/components/titled-avatar/index.stories.js +0 -52
  635. package/src/components/titled-avatar/index.style.js +0 -30
  636. package/src/components/titled-avatar/index.test.js +0 -25
  637. package/src/components/typography/heading/index.js +0 -59
  638. package/src/components/typography/heading/index.stories.js +0 -94
  639. package/src/components/typography/heading/index.styles.js +0 -69
  640. package/src/components/typography/heading/index.test.js +0 -122
  641. package/src/components/typography/index.js +0 -16
  642. package/src/components/typography/index.styles.js +0 -1
  643. package/src/components/typography/link/index.js +0 -82
  644. package/src/components/typography/link/index.stories.js +0 -70
  645. package/src/components/typography/link/index.styles.js +0 -8
  646. package/src/components/typography/link/index.test.js +0 -60
  647. package/src/components/typography/paragraph/index.js +0 -37
  648. package/src/components/typography/paragraph/index.stories.js +0 -56
  649. package/src/components/typography/paragraph/index.styles.js +0 -12
  650. package/src/components/typography/paragraph/index.test.js +0 -47
  651. package/src/components/typography/text/index.js +0 -156
  652. package/src/components/typography/text/index.stories.js +0 -196
  653. package/src/components/typography/text/index.styles.js +0 -73
  654. package/src/components/typography/text/index.test.js +0 -333
  655. package/src/components/typography/theme.js +0 -66
  656. package/src/components/typography/utils.js +0 -53
  657. package/src/components/typography/utils.test.js +0 -188
  658. package/src/components/utils/date.js +0 -7
  659. package/src/components/utils/date.test.js +0 -15
  660. package/src/components/utils/detectMobile.js +0 -15
  661. package/src/components/utils/index.js +0 -7
  662. package/src/components/utils/media-query.js +0 -12
  663. package/src/components/utils/numbers.js +0 -25
  664. package/src/components/utils/test.js +0 -6
  665. package/src/components/utils/theme.js +0 -67
  666. package/src/docs/App.css +0 -33
  667. package/src/docs/App.js +0 -52
  668. package/src/docs/assets/ads-label.svg +0 -13
  669. package/src/docs/assets/avatar-sample.jpeg +0 -0
  670. package/src/docs/assets/cover-sample.png +0 -0
  671. package/src/docs/assets/fonts/filesImgs.woff +0 -0
  672. package/src/docs/assets/fonts/icomoon.woff +0 -0
  673. package/src/docs/assets/fonts/iransharp_bold_web.woff +0 -0
  674. package/src/docs/assets/fonts/iransharp_bold_web.woff2 +0 -0
  675. package/src/docs/assets/fonts/iransharp_regular_web.woff +0 -0
  676. package/src/docs/assets/fonts/iransharp_regular_web.woff2 +0 -0
  677. package/src/docs/assets/fonts/wer6t7890- +0 -0
  678. package/src/docs/assets/logo.svg +0 -7
  679. package/src/docs/components/header/index.js +0 -10
  680. package/src/docs/components/header/index.styles.js +0 -10
  681. package/src/docs/components/side-navigation/index.js +0 -167
  682. package/src/docs/components/side-navigation/index.styles.js +0 -46
  683. package/src/docs/containers/avatar/index.js +0 -92
  684. package/src/docs/containers/button/index.js +0 -295
  685. package/src/docs/containers/card/index.js +0 -153
  686. package/src/docs/containers/cover/index.js +0 -77
  687. package/src/docs/containers/form/index.js +0 -41
  688. package/src/docs/containers/home/index.js +0 -41
  689. package/src/docs/containers/icon/index.js +0 -56
  690. package/src/docs/containers/icons/index.js +0 -1488
  691. package/src/docs/containers/product/index.js +0 -123
  692. package/src/docs/containers/typography/index.js +0 -138
  693. package/src/docs/globalStyle.js +0 -58
  694. package/src/index.css +0 -3
  695. package/src/index.js +0 -18
  696. package/src/playground/index.js +0 -144
  697. package/src/playground.css +0 -26
  698. package/src/serviceWorker.js +0 -135
  699. package/src/setupTests.js +0 -24
  700. package/src/stories/Page.jsx +0 -67
  701. package/src/storybook.css +0 -58
  702. package/src/styles.css +0 -3
  703. package/src/test-utils.js +0 -21
  704. package/storybook.log +0 -113
  705. package/tailwind.config.js +0 -26
  706. package/update-stories.js +0 -41
  707. /package/{dist/components/show-date → show-date}/index.style.js +0 -0
  708. /package/{dist/components/typography → typography}/index.styles.js +0 -0
@@ -1,74 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { ThemeProvider } from 'styled-components';
4
- import GlobalStyle from '../../globalStyle';
5
- import generalTheme from '../../themes';
6
- import TemplateContainer from './index.style';
7
-
8
- const CardTemplate = ({
9
- level = 1,
10
- hoverToLevel = 1,
11
- maxWidth = null,
12
- renderLink = undefined,
13
- direction = 'vertical',
14
- background = '',
15
- children,
16
- ...rest
17
- }) => {
18
- const renderContent = () => {
19
- if (renderLink) {
20
- return renderLink(
21
- <TemplateContainer
22
- maxWidth={maxWidth}
23
- level={level}
24
- hoverToLevel={hoverToLevel}
25
- direction={direction}
26
- data-test="card-template"
27
- background={background}
28
- {...rest}
29
- >
30
- {children}
31
- </TemplateContainer>,
32
- );
33
- }
34
- return (
35
- <TemplateContainer
36
- maxWidth={maxWidth}
37
- level={level}
38
- hoverToLevel={hoverToLevel}
39
- direction={direction}
40
- data-test="card-template"
41
- background={background}
42
- {...rest}
43
- >
44
- {children}
45
- </TemplateContainer>
46
- );
47
- };
48
-
49
- return (
50
- <ThemeProvider theme={generalTheme}>
51
- <GlobalStyle />
52
- {renderContent()}
53
- </ThemeProvider>
54
- );
55
- };
56
-
57
- CardTemplate.propTypes = {
58
- children: PropTypes.oneOfType([
59
- PropTypes.arrayOf(PropTypes.node),
60
- PropTypes.node,
61
- PropTypes.string,
62
- ]).isRequired,
63
- level: PropTypes.oneOf([1, 2, 3, 4, 5]),
64
- hoverToLevel: PropTypes.number,
65
- maxWidth: PropTypes.oneOfType([
66
- PropTypes.number,
67
- PropTypes.string,
68
- ]),
69
- renderLink: PropTypes.func,
70
- direction: PropTypes.oneOf(['vertical', 'horizontal']),
71
- background: PropTypes.string,
72
- };
73
-
74
- export default CardTemplate;
@@ -1,110 +0,0 @@
1
- import React from 'react';
2
- import CardTemplate from './index';
3
-
4
- export default {
5
- title: 'Components/Card/CardTemplate',
6
- component: CardTemplate,
7
- argTypes: {
8
- level: {
9
- control: 'number',
10
- description: 'The level of the card (1-5)',
11
- },
12
- hoverToLevel: {
13
- control: 'number',
14
- description: 'The level to hover to',
15
- },
16
- direction: {
17
- control: 'select',
18
- options: ['vertical', 'horizontal'],
19
- description: 'The direction of the card content',
20
- },
21
- background: {
22
- control: 'text',
23
- description: 'The background image URL',
24
- },
25
- renderLink: {
26
- control: 'function',
27
- description: 'Function to render a link wrapper',
28
- },
29
- style: {
30
- control: 'object',
31
- description: 'Additional styles to apply',
32
- },
33
- children: {
34
- control: 'text',
35
- description: 'The content of the card',
36
- },
37
- },
38
- };
39
-
40
- const Template = (args) => (
41
- <CardTemplate {...args}>
42
- <div style={{ height: '100px' }}>Hello card template.</div>
43
- </CardTemplate>
44
- );
45
-
46
- export const Default = Template.bind({});
47
-
48
- export const Level2 = Template.bind({});
49
- Level2.args = {
50
- level: 2,
51
- style: { marginTop: '50px' },
52
- };
53
-
54
- export const Level3 = Template.bind({});
55
- Level3.args = {
56
- level: 3,
57
- style: { marginTop: '50px' },
58
- };
59
-
60
- export const Level4 = Template.bind({});
61
- Level4.args = {
62
- level: 4,
63
- style: { marginTop: '50px' },
64
- };
65
-
66
- export const Level5 = Template.bind({});
67
- Level5.args = {
68
- level: 5,
69
- style: { marginTop: '50px' },
70
- };
71
-
72
- export const HoverLevel1To4 = Template.bind({});
73
- HoverLevel1To4.args = {
74
- level: 1,
75
- hoverToLevel: 4,
76
- style: { marginTop: '50px' },
77
- };
78
-
79
- export const WithLink = Template.bind({});
80
- WithLink.args = {
81
- renderLink: (el) => <a href="http://google.com">{el}</a>,
82
- children: <div style={{ height: '100px' }}>with link to google</div>,
83
- };
84
-
85
- export const VerticalDirection = Template.bind({});
86
- VerticalDirection.args = {
87
- direction: 'vertical',
88
- children: (
89
- <>
90
- <div style={{ height: '100px', backgroundColor: 'lightgray' }}>Hello card template.</div>
91
- <div style={{ height: '100px', backgroundColor: 'oldlace' }}>Hello card template.</div>
92
- </>
93
- ),
94
- };
95
-
96
- export const HorizontalDirection = Template.bind({});
97
- HorizontalDirection.args = {
98
- direction: 'horizontal',
99
- children: (
100
- <>
101
- <div style={{ height: '100px', backgroundColor: 'lightgray' }}>Hello card template.</div>
102
- <div style={{ height: '100px', backgroundColor: 'oldlace' }}>Hello card template.</div>
103
- </>
104
- ),
105
- };
106
-
107
- export const WithBackground = Template.bind({});
108
- WithBackground.args = {
109
- background: 'http://static.simpledesktops.com/uploads/desktops/2019/11/08/Jupiter.png',
110
- };
@@ -1,25 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const TemplateContainer = styled.section`
4
- display: flex;
5
- flex-direction: ${({ direction }) => (direction === 'vertical' ? 'column' : 'row')};
6
- border-radius: ${({ theme }) => (`${theme.borderRadius.low}px`)};
7
- overflow: hidden;
8
- ${({ maxWidth }) => (maxWidth ? `max-width: ${maxWidth}px` : '')};
9
- box-shadow: ${({ theme, level }) => (
10
- `0 0 ${theme.shadows[level].blur}px ${theme.shadows[level].spread}px rgba(0, 0, 0, ${theme.shadows[level].opacity})`
11
- )};
12
- text-decoration: none;
13
- transition: ${({ theme }) => (`all ${theme.animation.time}s ${theme.animation.method}`)};
14
- ${({ background }) => (background ? `background: url(${background}) bottom left / 142px no-repeat` : '')};
15
-
16
- &:hover {
17
- ${({ theme, level, hoverToLevel }) => (
18
- hoverToLevel > level
19
- ? `box-shadow: 0 0 ${theme.shadows[hoverToLevel].blur}px ${theme.shadows[hoverToLevel].spread}px rgba(0, 0, 0, ${theme.shadows[hoverToLevel].opacity})`
20
- : ''
21
- )};
22
- }
23
- `;
24
-
25
- export default TemplateContainer;
@@ -1,85 +0,0 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
- import 'jest-styled-components';
4
-
5
- import CardTemplate from './index';
6
- import { Text } from '../../typography';
7
- import findByTestAtrr from '../../utils/test';
8
- import theme from '../../themes';
9
-
10
- const setupShallow = (props = {}) => (
11
- shallow(
12
- <CardTemplate
13
- level={props.level}
14
- hoverToLevel={props.hoverToLevel}
15
- maxWidth={props.maxWidth}
16
- linkTo={props.linkTo}
17
- {...props}
18
- >
19
- {props.children}
20
- </CardTemplate>,
21
- )
22
- );
23
-
24
- const setupMount = (props = {}) => (
25
- mount(
26
- <CardTemplate
27
- level={props.level}
28
- hoverToLevel={props.hoverToLevel}
29
- maxWidth={props.maxWidth}
30
- linkTo={props.linkTo}
31
- {...props}
32
- >
33
- {props.children}
34
- </CardTemplate>,
35
- )
36
- );
37
-
38
- describe('Card Template', () => {
39
- it('should render correctly', () => {
40
- const component = setupShallow({
41
- level: 2,
42
- hoverToLevel: 3,
43
- children: <Text>یک متن تستی</Text>,
44
- });
45
- const CardTemplate = findByTestAtrr(component, 'card-template');
46
- expect(CardTemplate.length).toBe(1);
47
- });
48
-
49
- it('should render correctly with link wrapper', () => {
50
- const component = setupShallow({
51
- level: 2,
52
- hoverToLevel: 3,
53
- linkTo: '/link-address',
54
- children: <Text>یک متن تستی</Text>,
55
- });
56
- const CardTemplate = findByTestAtrr(component, 'card-template-link-wrapper');
57
- expect(CardTemplate.length).toBe(1);
58
- });
59
-
60
- it('should has correct style', () => {
61
- const props = {
62
- level: 1,
63
- hoverToLevel: 3,
64
- children: 'یک متن تستی',
65
- maxWidth: 300,
66
- };
67
- const CardTemplate = setupMount(props);
68
- expect(CardTemplate).toHaveStyleRule(
69
- 'box-shadow',
70
- `0 0 ${theme.shadows[1].blur}px ${theme.shadows[1].spread}px rgba(0,0,0,${theme.shadows[1].opacity})`,
71
- );
72
- expect(CardTemplate).toHaveStyleRule(
73
- 'box-shadow',
74
- `0 0 ${theme.shadows[3].blur}px ${theme.shadows[3].spread}px rgba(0,0,0,${theme.shadows[3].opacity})`,
75
- {
76
- modifier: ':hover',
77
- },
78
- );
79
- expect(CardTemplate).toHaveStyleRule(
80
- 'border-radius',
81
- `${theme.borderRadius.low}px`,
82
- );
83
- expect(CardTemplate).toHaveStyleRule('max-width', `${props.maxWidth}px`);
84
- });
85
- });
@@ -1,3 +0,0 @@
1
- export const VERTICAL_CARD = 'vertical';
2
- export const HORIZONTAL_CARD = 'horizontal';
3
- export const HORIZONTAL_MOBILE_CARD = 'horizontal-mobile';
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import ImageLabel from './index.style';
4
-
5
- const adsLabelUrl = 'https://static.evand.net/assets/images/other/ads-label.svg';
6
- // const adsLabelUrl = require('../../../../docs/assets/ads-label.svg');
7
-
8
- const finishedLabelUrl = 'https://static.evand.net/assets/images/other/finished-text-label.svg';
9
-
10
- const EventCardLabel = ({ type }) => {
11
- switch (type) {
12
- case 'ads':
13
- return <ImageLabel src={adsLabelUrl} data-test="ads-label" />;
14
- case 'finished':
15
- default:
16
- return <ImageLabel src={finishedLabelUrl} data-test="finished-label" />;
17
- }
18
- };
19
-
20
- EventCardLabel.propTypes = {
21
- type: PropTypes.oneOf(['ads', 'finished']).isRequired,
22
- };
23
-
24
- export default EventCardLabel;
@@ -1,10 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const ImageLabel = styled.img`
4
- display: inline-block;
5
- margin-left: 12px;
6
- // margin-bottom: 5px;
7
- width: 33px;
8
- `;
9
-
10
- export default ImageLabel;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
-
4
- import EventCardLabel from './index';
5
- import findByTestAtrr from '../../../utils/test';
6
-
7
- const setupShallow = ({ type }) => (
8
- shallow(<EventCardLabel type={type} />)
9
- );
10
-
11
- describe('EventCardLabel component', () => {
12
- it('Should render ads label', () => {
13
- const component = setupShallow({ type: 'ads' });
14
- const AdsLabel = findByTestAtrr(component, 'ads-label');
15
- expect(AdsLabel.length).toBe(1);
16
- });
17
-
18
- it('Should render finished label', () => {
19
- const component = setupShallow({ type: 'finished' });
20
- const AdsLabel = findByTestAtrr(component, 'finished-label');
21
- expect(AdsLabel.length).toBe(1);
22
- });
23
- });
@@ -1,227 +0,0 @@
1
- import React from 'react';
2
- import PropTypes, { oneOfType } from 'prop-types';
3
- import GlobalStyle from '../../globalStyle';
4
- import { VERTICAL_CARD, HORIZONTAL_CARD, HORIZONTAL_MOBILE_CARD } from './constants';
5
- import ShowDate from '../../show-date';
6
- import { Text } from '../../typography';
7
- import TitledAvatar from '../../titled-avatar';
8
- import EventCardLabel from './event-card-label';
9
- import {
10
- VerticalCardContainer,
11
- VerticalCover,
12
- VerticalContentContainer,
13
- DateLabelContainer,
14
- DateBookmarkContainer,
15
- BookmarkIcon,
16
- VerticalPlacePrice,
17
- VerticalTitle,
18
- HorizontalCardContainer,
19
- HorizontalCover,
20
- HorizontalMobileCover,
21
- HorizontalContentContainer,
22
- HorizontalTitle,
23
- HorizontalPlacePrice,
24
- PartnershipBox,
25
- } from './index.style';
26
- import Icon from '../../icon';
27
-
28
- const finishedClockLabelUrl = 'https://static.evand.net/assets/images/other/finished-clock-label.svg';
29
- const defaultCoverUrl = 'https://static.evand.net/assets/images/defaults/event-cover.jpg';
30
- const EventCard = ({
31
- title,
32
- price,
33
- place,
34
- renderEventLink,
35
- clickBookmark,
36
- bookmarked = false,
37
- cover = '',
38
- type = VERTICAL_CARD,
39
- ads = false,
40
- finished = false,
41
- organization = undefined,
42
- renderOrganizationLink = () => false,
43
- date = '',
44
- showDate = '',
45
- partnership = {
46
- status: '',
47
- },
48
- coverImage = null,
49
- ...rest
50
- }) => {
51
- // date param used on main evand and because it wrong to use moment-jalali in react jupiter
52
- // we ommmit it in evand-next and use showDate param instead but its still used in evand
53
- // TODO: remove date params if no longer needed (in evand project)
54
- // TODO: remove ShowDate component and remove used places
55
- // TODO: remove moment-jalali from this package after removing ShowDate
56
-
57
- // in new form of event-card we dont show organazation info as a titled-avatar
58
- // TODO: if the new form was accepted and remove old one from evand clean these parts
59
- const productPropertiesList = [
60
- { iconName: 'place', text: place },
61
- { iconName: 'ticket', text: price },
62
- ];
63
- if (organization && organization.logo === 'unset') {
64
- productPropertiesList.push({ iconName: 'supervisor-account', text: organization.name });
65
- }
66
-
67
- const renderVerticalCard = () => (
68
- <VerticalCardContainer
69
- direction={type}
70
- hoverToLevel={3}
71
- maxWidth={270}
72
- {...rest}
73
- >
74
- {renderEventLink(coverImage || <VerticalCover data-test="vertical-cover" src={cover || defaultCoverUrl} loading="lazy" onError={(e) => { e.target.onerror = null; e.target.src = defaultCoverUrl; }} />) }
75
- <VerticalContentContainer
76
- data-test="vertical-content"
77
- background={finished ? finishedClockLabelUrl : null}
78
- >
79
- <div>
80
- <DateBookmarkContainer data-test="vertical-date-bookmark">
81
- <DateLabelContainer>
82
- {finished && <EventCardLabel type="finished" />}
83
- {!finished && ads && <EventCardLabel type="ads" />}
84
- {!!partnership?.status && (
85
- <PartnershipBox>
86
- <Icon name={partnership?.status} color="yellow" stickyLeft marginRight={3} />
87
- {' '}
88
- {partnership?.status === 'colleague' ? 'همکار' : 'همیار'}
89
- </PartnershipBox>
90
- )}
91
- {date && <ShowDate date={date} color="gray" fontSize="12" />}
92
- {showDate && (
93
- <Text size="12" color="gray" data-test="show-date">{showDate}</Text>
94
- )}
95
- </DateLabelContainer>
96
- <BookmarkIcon
97
- name={bookmarked ? 'bookmark' : 'bookmark-border'}
98
- size="lg"
99
- color="gray"
100
- onClick={clickBookmark}
101
- />
102
- </DateBookmarkContainer>
103
- { renderEventLink(<VerticalTitle level={2} size="sm">{title}</VerticalTitle>)}
104
- <VerticalPlacePrice list={productPropertiesList} />
105
- </div>
106
- {(organization && organization.logo !== 'unset') && (
107
- <TitledAvatar title={organization.name} titleSize={12} avatar={organization.logo} avatarSize="xs" renderAvatarLink={renderOrganizationLink} />
108
- )}
109
- </VerticalContentContainer>
110
- </VerticalCardContainer>
111
- );
112
-
113
- const renderHorizontalCard = () => (
114
- <HorizontalCardContainer
115
- direction={type}
116
- hoverToLevel={3}
117
- maxWidth={560}
118
- {...rest}
119
- >
120
- {renderEventLink(<HorizontalCover data-test="horizontal-cover" src={cover || defaultCoverUrl} loading="lazy" />) }
121
- <HorizontalContentContainer data-test="horizontal-content">
122
- <DateBookmarkContainer>
123
- <DateLabelContainer>
124
- {finished && <EventCardLabel type="finished" />}
125
- {!finished && ads && <EventCardLabel type="ads" />}
126
- {date && <ShowDate date={date} color="gray" fontSize="12" />}
127
- {showDate && (
128
- <Text size="12" color="gray" data-test="show-date">{showDate}</Text>
129
- )}
130
- </DateLabelContainer>
131
- <BookmarkIcon
132
- name={bookmarked ? 'bookmark' : 'bookmark-border'}
133
- size="lg"
134
- color="gray"
135
- onClick={clickBookmark}
136
- data-test={bookmarked ? 'bookmark' : 'bookmark-border'}
137
- />
138
- </DateBookmarkContainer>
139
- { renderEventLink(<HorizontalTitle level={2} size="sm">{title}</HorizontalTitle>) }
140
- <HorizontalPlacePrice list={productPropertiesList} isHorizontal />
141
- </HorizontalContentContainer>
142
- </HorizontalCardContainer>
143
- );
144
-
145
- const renderHorizontalMobileCard = () => (
146
- <HorizontalCardContainer
147
- direction={type}
148
- hoverToLevel={3}
149
- maxWidth={560}
150
- {...rest}
151
- >
152
- {renderEventLink(<HorizontalMobileCover data-test="horizontal-mobile-cover" src={cover || defaultCoverUrl} loading="lazy" />) }
153
- <HorizontalContentContainer data-test="horizontal-content">
154
- <DateBookmarkContainer>
155
- <DateLabelContainer>
156
- {finished && <EventCardLabel type="finished" />}
157
- {!finished && ads && <EventCardLabel type="ads" />}
158
- {date && <ShowDate date={date} color="gray" fontSize="10" />}
159
- {showDate && (
160
- <Text size="10" color="gray" data-test="show-date">{showDate}</Text>
161
- )}
162
- </DateLabelContainer>
163
- <BookmarkIcon
164
- name={bookmarked ? 'bookmark' : 'bookmark-border'}
165
- size="sm"
166
- color="gray"
167
- onClick={clickBookmark}
168
- data-test={bookmarked ? 'bookmark' : 'bookmark-border'}
169
- />
170
- </DateBookmarkContainer>
171
- { renderEventLink(<HorizontalTitle level={4} size="sm">{title}</HorizontalTitle>) }
172
- <HorizontalPlacePrice list={productPropertiesList} isHorizontal />
173
- </HorizontalContentContainer>
174
- </HorizontalCardContainer>
175
- );
176
-
177
- const renderCard = () => {
178
- switch (type) {
179
- case HORIZONTAL_CARD:
180
- return renderHorizontalCard();
181
- case HORIZONTAL_MOBILE_CARD:
182
- return renderHorizontalMobileCard();
183
- case VERTICAL_CARD:
184
- default:
185
- return renderVerticalCard();
186
- }
187
- };
188
-
189
- return (
190
- <>
191
- <GlobalStyle />
192
- {renderCard()}
193
- </>
194
- );
195
- };
196
-
197
- EventCard.propTypes = {
198
- title: PropTypes.string.isRequired,
199
- bookmarked: PropTypes.bool,
200
- type: PropTypes.string,
201
- price: PropTypes.string.isRequired,
202
- place: PropTypes.string.isRequired,
203
- date: PropTypes.oneOfType([
204
- PropTypes.string,
205
- PropTypes.object,
206
- ]),
207
- showDate: PropTypes.string,
208
- cover: PropTypes.string,
209
- ads: PropTypes.bool,
210
- finished: PropTypes.bool,
211
- organization: oneOfType([
212
- PropTypes.shape({
213
- name: PropTypes.string.isRequired,
214
- logo: PropTypes.string,
215
- }),
216
- PropTypes.undefined,
217
- ]),
218
- renderEventLink: PropTypes.func.isRequired,
219
- renderOrganizationLink: PropTypes.func,
220
- clickBookmark: PropTypes.func.isRequired,
221
- partnership: PropTypes.shape({
222
- status: PropTypes.string,
223
- }),
224
- coverImage: PropTypes.node || null,
225
- };
226
-
227
- export default EventCard;