@hipay/hipay-material-ui 2.3.1-rc4 → 2.3.1-rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (503) hide show
  1. package/HiAlertModal/HiAlertModal.js +77 -48
  2. package/HiAlertModal/index.js +15 -1
  3. package/HiAppBar/HiAppBar.js +63 -34
  4. package/HiAppBar/index.js +15 -1
  5. package/HiBadge/HiBadge.js +29 -10
  6. package/HiBadge/index.js +15 -1
  7. package/HiBreadcrumb/HiBreadcrumb.js +41 -27
  8. package/HiBreadcrumb/HiStep.js +58 -35
  9. package/HiBreadcrumb/HiStepConnector.js +58 -33
  10. package/HiBreadcrumb/HiStepContent.js +47 -26
  11. package/HiBreadcrumb/HiStepIcon.js +47 -27
  12. package/HiBreadcrumb/HiStepLabel.js +62 -37
  13. package/HiBreadcrumb/HiStepper.js +44 -24
  14. package/HiBreadcrumb/index.js +15 -1
  15. package/HiButton/HiButton.js +27 -9
  16. package/HiButton/index.js +13 -2
  17. package/HiCell/CellAddress.js +39 -21
  18. package/HiCell/CellDate.js +44 -27
  19. package/HiCell/CellIcon.js +48 -29
  20. package/HiCell/CellImage.js +41 -24
  21. package/HiCell/CellNumeric.js +45 -26
  22. package/HiCell/CellPinToAction.js +41 -20
  23. package/HiCell/CellRate.js +56 -33
  24. package/HiCell/CellSentinel.js +41 -23
  25. package/HiCell/CellSentinelScore.js +43 -24
  26. package/HiCell/CellText.js +54 -37
  27. package/HiCell/CellTextStyled.js +21 -8
  28. package/HiCell/index.js +79 -9
  29. package/HiCheckbox/HiCheckbox.js +61 -36
  30. package/HiCheckbox/index.js +15 -1
  31. package/HiChip/HiChip.js +44 -24
  32. package/HiChip/HiChipSwitch.js +73 -47
  33. package/HiChip/index.js +23 -2
  34. package/HiColoredLabel/HiColoredLabel.js +52 -28
  35. package/HiColoredLabel/index.js +15 -1
  36. package/HiDatePicker/Caption.js +28 -11
  37. package/HiDatePicker/HiDatePicker.js +131 -101
  38. package/HiDatePicker/HiDatePickerMobile.js +54 -32
  39. package/HiDatePicker/HiDateRangePicker.js +168 -139
  40. package/HiDatePicker/HiDateRangeSelector.js +105 -71
  41. package/HiDatePicker/ListPicker.js +54 -34
  42. package/HiDatePicker/NavBar.js +45 -18
  43. package/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
  44. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
  45. package/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
  46. package/HiDatePicker/Overlays/Overlay.js +35 -18
  47. package/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
  48. package/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
  49. package/HiDatePicker/Overlays/index.js +47 -5
  50. package/HiDatePicker/Weekday.js +13 -3
  51. package/HiDatePicker/hiLocaleUtils.js +8 -1
  52. package/HiDatePicker/index.js +15 -1
  53. package/HiDatePicker/stylesheet.js +22 -9
  54. package/HiDotsStepper/HiDot.js +56 -31
  55. package/HiDotsStepper/HiDotsStepper.js +47 -28
  56. package/HiDotsStepper/index.js +23 -2
  57. package/HiExpansionPanel/HiExpansionPanel.js +73 -43
  58. package/HiExpansionPanel/index.js +13 -2
  59. package/HiForm/HiAddressField.js +46 -29
  60. package/HiForm/HiEmailField.js +45 -27
  61. package/HiForm/HiFormControl.js +105 -72
  62. package/HiForm/HiFormLabel.js +53 -30
  63. package/HiForm/HiInput.js +89 -62
  64. package/HiForm/HiPasswordField.js +55 -29
  65. package/HiForm/HiSearchField.js +43 -28
  66. package/HiForm/HiSlider.js +64 -41
  67. package/HiForm/HiTextField.js +46 -29
  68. package/HiForm/HiUpload.js +76 -53
  69. package/HiForm/HiUploadField.js +40 -25
  70. package/HiForm/HiUploadInput.js +84 -56
  71. package/HiForm/index.js +95 -11
  72. package/HiIcon/HiIcon.js +44 -22
  73. package/HiIcon/index.js +15 -1
  74. package/HiIconButton/HiIconButton.js +40 -18
  75. package/HiIconButton/index.js +15 -1
  76. package/HiLoader/HiLoader.js +24 -9
  77. package/HiLoader/index.js +15 -1
  78. package/HiMap/HiMap.js +76 -51
  79. package/HiMap/HiMapExpand.js +64 -39
  80. package/HiMap/index.js +23 -2
  81. package/HiNotice/HiKPI.js +56 -33
  82. package/HiNotice/HiKPINotice.js +21 -7
  83. package/HiNotice/index.js +23 -2
  84. package/HiPaymentMeans/HiPaymentMeans.js +133 -112
  85. package/HiPaymentMeans/index.js +15 -1
  86. package/HiPdfReader/HiPdfReader.js +78 -52
  87. package/HiPdfReader/index.js +15 -1
  88. package/HiPin/HiPin.js +30 -9
  89. package/HiPin/index.js +15 -1
  90. package/HiRadio/HiRadio.js +24 -7
  91. package/HiRadio/index.js +15 -1
  92. package/HiSelect/HiDynamicSelect.js +58 -40
  93. package/HiSelect/HiDynamicSelectField.js +40 -22
  94. package/HiSelect/HiNestedSelect.js +85 -55
  95. package/HiSelect/HiNestedSelectContent.js +72 -46
  96. package/HiSelect/HiNestedSelectField.js +40 -22
  97. package/HiSelect/HiSelect.js +161 -123
  98. package/HiSelect/HiSelectContent.js +104 -73
  99. package/HiSelect/HiSelectField.js +40 -22
  100. package/HiSelect/HiSelectInput.js +94 -63
  101. package/HiSelect/HiSelectMobile.js +54 -35
  102. package/HiSelect/HiSuggestSelect.js +83 -56
  103. package/HiSelect/HiSuggestSelectField.js +40 -22
  104. package/HiSelect/index.js +85 -8
  105. package/HiSelectableList/HiSelectableList.js +80 -49
  106. package/HiSelectableList/HiSelectableListHierarchic.js +55 -35
  107. package/HiSelectableList/HiSelectableListItem.js +101 -66
  108. package/HiSelectableList/index.js +31 -3
  109. package/HiSwitch/HiSwitch.js +45 -20
  110. package/HiSwitch/HiSwitchState.js +36 -15
  111. package/HiSwitch/index.js +23 -2
  112. package/HiTable/HiCellBuilder.js +69 -43
  113. package/HiTable/HiTable.js +46 -28
  114. package/HiTable/HiTableBody.js +34 -19
  115. package/HiTable/HiTableHeader.js +50 -29
  116. package/HiTable/HiTableRow.js +56 -29
  117. package/HiTable/constants.js +94 -43
  118. package/HiTable/index.js +15 -1
  119. package/es/HiAlertModal/HiAlertModal.js +77 -48
  120. package/es/HiAlertModal/index.js +15 -1
  121. package/es/HiAppBar/HiAppBar.js +63 -34
  122. package/es/HiAppBar/index.js +15 -1
  123. package/es/HiBadge/HiBadge.js +29 -10
  124. package/es/HiBadge/index.js +15 -1
  125. package/es/HiBreadcrumb/HiBreadcrumb.js +41 -27
  126. package/es/HiBreadcrumb/HiStep.js +58 -35
  127. package/es/HiBreadcrumb/HiStepConnector.js +58 -33
  128. package/es/HiBreadcrumb/HiStepContent.js +47 -26
  129. package/es/HiBreadcrumb/HiStepIcon.js +47 -27
  130. package/es/HiBreadcrumb/HiStepLabel.js +62 -37
  131. package/es/HiBreadcrumb/HiStepper.js +44 -24
  132. package/es/HiBreadcrumb/index.js +15 -1
  133. package/es/HiButton/HiButton.js +27 -9
  134. package/es/HiButton/index.js +13 -2
  135. package/es/HiCell/CellAddress.js +39 -21
  136. package/es/HiCell/CellDate.js +44 -27
  137. package/es/HiCell/CellIcon.js +48 -29
  138. package/es/HiCell/CellImage.js +41 -24
  139. package/es/HiCell/CellNumeric.js +45 -26
  140. package/es/HiCell/CellPinToAction.js +41 -20
  141. package/es/HiCell/CellRate.js +56 -33
  142. package/es/HiCell/CellSentinel.js +41 -23
  143. package/es/HiCell/CellSentinelScore.js +43 -24
  144. package/es/HiCell/CellText.js +54 -37
  145. package/es/HiCell/CellTextStyled.js +21 -8
  146. package/es/HiCell/index.js +79 -9
  147. package/es/HiCheckbox/HiCheckbox.js +61 -36
  148. package/es/HiCheckbox/index.js +15 -1
  149. package/es/HiChip/HiChip.js +44 -24
  150. package/es/HiChip/HiChipSwitch.js +73 -47
  151. package/es/HiChip/index.js +23 -2
  152. package/es/HiColoredLabel/HiColoredLabel.js +52 -28
  153. package/es/HiColoredLabel/index.js +15 -1
  154. package/es/HiDatePicker/Caption.js +28 -11
  155. package/es/HiDatePicker/HiDatePicker.js +131 -101
  156. package/es/HiDatePicker/HiDatePickerMobile.js +54 -32
  157. package/es/HiDatePicker/HiDateRangePicker.js +168 -139
  158. package/es/HiDatePicker/HiDateRangeSelector.js +105 -71
  159. package/es/HiDatePicker/ListPicker.js +54 -34
  160. package/es/HiDatePicker/NavBar.js +45 -18
  161. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
  162. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
  163. package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
  164. package/es/HiDatePicker/Overlays/Overlay.js +35 -18
  165. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
  166. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
  167. package/es/HiDatePicker/Overlays/index.js +47 -5
  168. package/es/HiDatePicker/Weekday.js +13 -3
  169. package/es/HiDatePicker/hiLocaleUtils.js +8 -1
  170. package/es/HiDatePicker/index.js +15 -1
  171. package/es/HiDatePicker/stylesheet.js +22 -9
  172. package/es/HiDotsStepper/HiDot.js +56 -31
  173. package/es/HiDotsStepper/HiDotsStepper.js +47 -28
  174. package/es/HiDotsStepper/index.js +23 -2
  175. package/es/HiExpansionPanel/HiExpansionPanel.js +73 -43
  176. package/es/HiExpansionPanel/index.js +13 -2
  177. package/es/HiForm/HiAddressField.js +46 -29
  178. package/es/HiForm/HiEmailField.js +45 -27
  179. package/es/HiForm/HiFormControl.js +105 -72
  180. package/es/HiForm/HiFormLabel.js +53 -30
  181. package/es/HiForm/HiInput.js +89 -62
  182. package/es/HiForm/HiPasswordField.js +55 -29
  183. package/es/HiForm/HiSearchField.js +43 -28
  184. package/es/HiForm/HiSlider.js +64 -41
  185. package/es/HiForm/HiTextField.js +46 -29
  186. package/es/HiForm/HiUpload.js +76 -53
  187. package/es/HiForm/HiUploadField.js +40 -25
  188. package/es/HiForm/HiUploadInput.js +84 -56
  189. package/es/HiForm/index.js +95 -11
  190. package/es/HiIcon/HiIcon.js +44 -22
  191. package/es/HiIcon/index.js +15 -1
  192. package/es/HiIconButton/HiIconButton.js +40 -18
  193. package/es/HiIconButton/index.js +15 -1
  194. package/es/HiLoader/HiLoader.js +24 -9
  195. package/es/HiLoader/index.js +15 -1
  196. package/es/HiMap/HiMap.js +76 -51
  197. package/es/HiMap/HiMapExpand.js +64 -39
  198. package/es/HiMap/index.js +23 -2
  199. package/es/HiNotice/HiKPI.js +56 -33
  200. package/es/HiNotice/HiKPINotice.js +21 -7
  201. package/es/HiNotice/index.js +23 -2
  202. package/es/HiPaymentMeans/HiPaymentMeans.js +133 -112
  203. package/es/HiPaymentMeans/index.js +15 -1
  204. package/es/HiPdfReader/HiPdfReader.js +78 -52
  205. package/es/HiPdfReader/index.js +15 -1
  206. package/es/HiPin/HiPin.js +30 -9
  207. package/es/HiPin/index.js +15 -1
  208. package/es/HiRadio/HiRadio.js +24 -7
  209. package/es/HiRadio/index.js +15 -1
  210. package/es/HiSelect/HiDynamicSelect.js +58 -40
  211. package/es/HiSelect/HiDynamicSelectField.js +40 -22
  212. package/es/HiSelect/HiNestedSelect.js +85 -55
  213. package/es/HiSelect/HiNestedSelectContent.js +72 -46
  214. package/es/HiSelect/HiNestedSelectField.js +40 -22
  215. package/es/HiSelect/HiSelect.js +161 -123
  216. package/es/HiSelect/HiSelectContent.js +104 -73
  217. package/es/HiSelect/HiSelectField.js +40 -22
  218. package/es/HiSelect/HiSelectInput.js +94 -63
  219. package/es/HiSelect/HiSelectMobile.js +54 -35
  220. package/es/HiSelect/HiSuggestSelect.js +83 -56
  221. package/es/HiSelect/HiSuggestSelectField.js +40 -22
  222. package/es/HiSelect/index.js +85 -8
  223. package/es/HiSelectableList/HiSelectableList.js +80 -49
  224. package/es/HiSelectableList/HiSelectableListHierarchic.js +55 -35
  225. package/es/HiSelectableList/HiSelectableListItem.js +101 -66
  226. package/es/HiSelectableList/index.js +31 -3
  227. package/es/HiSwitch/HiSwitch.js +45 -20
  228. package/es/HiSwitch/HiSwitchState.js +36 -15
  229. package/es/HiSwitch/index.js +23 -2
  230. package/es/HiTable/HiCellBuilder.js +69 -43
  231. package/es/HiTable/HiTable.js +46 -28
  232. package/es/HiTable/HiTableBody.js +34 -19
  233. package/es/HiTable/HiTableHeader.js +50 -29
  234. package/es/HiTable/HiTableRow.js +56 -29
  235. package/es/HiTable/constants.js +94 -43
  236. package/es/HiTable/index.js +15 -1
  237. package/es/hi-svg-icons/HiAccount.js +36 -18
  238. package/es/hi-svg-icons/HiActivity.js +35 -17
  239. package/es/hi-svg-icons/HiAll.js +42 -22
  240. package/es/hi-svg-icons/HiBilling.js +36 -18
  241. package/es/hi-svg-icons/HiBriefcaseRescue.js +26 -10
  242. package/es/hi-svg-icons/HiCatalog.js +36 -18
  243. package/es/hi-svg-icons/HiCustomer.js +36 -18
  244. package/es/hi-svg-icons/HiDownload.js +25 -11
  245. package/es/hi-svg-icons/HiFinance.js +36 -18
  246. package/es/hi-svg-icons/HiPermission.js +35 -17
  247. package/es/hi-svg-icons/HiRoute.js +36 -18
  248. package/es/hi-svg-icons/HiSettlement.js +36 -18
  249. package/es/hi-svg-icons/HiSizeLarge.js +27 -12
  250. package/es/hi-svg-icons/HiSizeMedium.js +25 -11
  251. package/es/hi-svg-icons/HiSizeSmall.js +25 -11
  252. package/es/hi-svg-icons/HiTransaction.js +36 -18
  253. package/es/hi-svg-icons/HiUser.js +36 -18
  254. package/es/hi-svg-icons/HiWidget.js +42 -22
  255. package/es/hi-svg-icons/index.js +151 -18
  256. package/es/hi-svg-icons/index.text.js +21 -11
  257. package/es/styleguide/Wrapper.js +36 -19
  258. package/es/styles/MuiThemeProvider.js +57 -39
  259. package/es/styles/colorManipulator.js +44 -16
  260. package/es/styles/createBreakpoints.js +20 -6
  261. package/es/styles/createGenerateClassName.js +15 -5
  262. package/es/styles/createMixins.js +19 -8
  263. package/es/styles/createMuiTheme.js +53 -34
  264. package/es/styles/createPalette.js +50 -30
  265. package/es/styles/createStyles.js +8 -1
  266. package/es/styles/createTypography.js +30 -18
  267. package/es/styles/getStylesCreator.js +24 -11
  268. package/es/styles/getThemeProps.js +9 -1
  269. package/es/styles/index.js +47 -5
  270. package/es/styles/jssPreset.js +25 -9
  271. package/es/styles/mergeClasses.js +19 -7
  272. package/es/styles/shadows.js +8 -1
  273. package/es/styles/shape.js +8 -1
  274. package/es/styles/spacing.js +9 -1
  275. package/es/styles/themeListener.js +18 -5
  276. package/es/styles/transitions.js +38 -18
  277. package/es/styles/zIndex.js +8 -1
  278. package/es/test-utils/createMount.js +22 -11
  279. package/es/test-utils/createRender.js +19 -8
  280. package/es/test-utils/createShallow.js +23 -13
  281. package/es/test-utils/getClasses.js +11 -2
  282. package/es/test-utils/index.js +47 -5
  283. package/es/test-utils/until.js +16 -6
  284. package/es/test-utils/unwrap.js +8 -1
  285. package/es/theme/palette.js +10 -2
  286. package/es/theme/typography.js +11 -3
  287. package/es/theme.js +13 -4
  288. package/es/transitions/utils.js +13 -2
  289. package/es/utils/exactProp.js +18 -5
  290. package/es/utils/helpers.js +55 -18
  291. package/es/withMobileDialog/index.js +15 -1
  292. package/es/withMobileDialog/withMobileDialog.js +22 -7
  293. package/hi-svg-icons/HiAccount.js +36 -18
  294. package/hi-svg-icons/HiActivity.js +35 -17
  295. package/hi-svg-icons/HiAll.js +42 -22
  296. package/hi-svg-icons/HiBilling.js +36 -18
  297. package/hi-svg-icons/HiBriefcaseRescue.js +26 -10
  298. package/hi-svg-icons/HiCatalog.js +36 -18
  299. package/hi-svg-icons/HiCustomer.js +36 -18
  300. package/hi-svg-icons/HiDownload.js +25 -11
  301. package/hi-svg-icons/HiFinance.js +36 -18
  302. package/hi-svg-icons/HiPermission.js +35 -17
  303. package/hi-svg-icons/HiRoute.js +36 -18
  304. package/hi-svg-icons/HiSettlement.js +36 -18
  305. package/hi-svg-icons/HiSizeLarge.js +27 -12
  306. package/hi-svg-icons/HiSizeMedium.js +25 -11
  307. package/hi-svg-icons/HiSizeSmall.js +25 -11
  308. package/hi-svg-icons/HiTransaction.js +36 -18
  309. package/hi-svg-icons/HiUser.js +36 -18
  310. package/hi-svg-icons/HiWidget.js +42 -22
  311. package/hi-svg-icons/index.js +151 -18
  312. package/hi-svg-icons/index.text.js +21 -11
  313. package/package.json +2 -1
  314. package/styleguide/Wrapper.js +36 -19
  315. package/styles/MuiThemeProvider.js +57 -39
  316. package/styles/colorManipulator.js +44 -16
  317. package/styles/createBreakpoints.js +20 -6
  318. package/styles/createGenerateClassName.js +15 -5
  319. package/styles/createMixins.js +19 -8
  320. package/styles/createMuiTheme.js +53 -34
  321. package/styles/createPalette.js +50 -30
  322. package/styles/createStyles.js +8 -1
  323. package/styles/createTypography.js +30 -18
  324. package/styles/getStylesCreator.js +24 -11
  325. package/styles/getThemeProps.js +9 -1
  326. package/styles/index.js +47 -5
  327. package/styles/jssPreset.js +25 -9
  328. package/styles/mergeClasses.js +19 -7
  329. package/styles/shadows.js +8 -1
  330. package/styles/shape.js +8 -1
  331. package/styles/spacing.js +9 -1
  332. package/styles/themeListener.js +18 -5
  333. package/styles/transitions.js +38 -18
  334. package/styles/zIndex.js +8 -1
  335. package/test-utils/createMount.js +22 -11
  336. package/test-utils/createRender.js +19 -8
  337. package/test-utils/createShallow.js +23 -13
  338. package/test-utils/getClasses.js +11 -2
  339. package/test-utils/index.js +47 -5
  340. package/test-utils/until.js +16 -6
  341. package/test-utils/unwrap.js +8 -1
  342. package/theme/palette.js +10 -2
  343. package/theme/typography.js +11 -3
  344. package/theme.js +13 -4
  345. package/transitions/utils.js +13 -2
  346. package/utils/exactProp.js +18 -5
  347. package/utils/helpers.js +55 -18
  348. package/withMobileDialog/index.js +15 -1
  349. package/withMobileDialog/withMobileDialog.js +22 -7
  350. package/App.test.js +0 -8
  351. package/HiAlertModal/HiAlertModal.test.js +0 -189
  352. package/HiBadge/HiBadge.test.js +0 -49
  353. package/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
  354. package/HiBreadcrumb/HiStep.test.js +0 -47
  355. package/HiBreadcrumb/HiStepConnector.test.js +0 -113
  356. package/HiBreadcrumb/HiStepContent.test.js +0 -32
  357. package/HiBreadcrumb/HiStepIcon.test.js +0 -65
  358. package/HiBreadcrumb/HiStepLabel.test.js +0 -30
  359. package/HiBreadcrumb/HiStepper.test.js +0 -33
  360. package/HiCell/CellAddress.test.js +0 -75
  361. package/HiCell/CellDate.test.js +0 -173
  362. package/HiCell/CellIcon.test.js +0 -57
  363. package/HiCell/CellImage.test.js +0 -49
  364. package/HiCell/CellNumeric.test.js +0 -46
  365. package/HiCell/CellRate.test.js +0 -73
  366. package/HiCell/CellSentinel.test.js +0 -48
  367. package/HiCell/CellText.test.js +0 -76
  368. package/HiCheckbox/HiCheckbox.test.js +0 -55
  369. package/HiChip/HiChip.test.js +0 -136
  370. package/HiChip/HiChipSwitch.test.js +0 -99
  371. package/HiColoredLabel/HiColoredLabel.test.js +0 -96
  372. package/HiDatePicker/Caption.test.js +0 -65
  373. package/HiDatePicker/HiDatePicker.test.js +0 -370
  374. package/HiDatePicker/HiDateRangePicker.test.js +0 -703
  375. package/HiDatePicker/HiDateRangeSelector.test.js +0 -193
  376. package/HiDatePicker/ListPicker.test.js +0 -53
  377. package/HiDatePicker/NavBar.test.js +0 -39
  378. package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
  379. package/HiDatePicker/Overlays/Overlay.test.js +0 -20
  380. package/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
  381. package/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
  382. package/HiDatePicker/hiLocaleUtils.test.js +0 -51
  383. package/HiDotsStepper/HiDot.test.js +0 -55
  384. package/HiDotsStepper/HiDotsStepper.test.js +0 -90
  385. package/HiForm/HiAddressField.test.js +0 -79
  386. package/HiForm/HiEmailField.test.js +0 -19
  387. package/HiForm/HiFormControl.test.js +0 -195
  388. package/HiForm/HiFormLabel.test.js +0 -66
  389. package/HiForm/HiInput.test.js +0 -202
  390. package/HiForm/HiPasswordField.test.js +0 -60
  391. package/HiForm/HiSearchField.test.js +0 -193
  392. package/HiForm/HiSlider.test.js +0 -99
  393. package/HiForm/HiTextField.test.js +0 -254
  394. package/HiForm/HiUpload.test.js +0 -241
  395. package/HiForm/HiUploadField.test.js +0 -55
  396. package/HiForm/HiUploadInput.test.js +0 -148
  397. package/HiIconButton/HiIconButton.test.js +0 -69
  398. package/HiLoader/HiLoader.test.js +0 -18
  399. package/HiMap/HiMap.test.js +0 -29
  400. package/HiMap/HiMapExpand.test.js +0 -48
  401. package/HiNotice/HiKPI.test.js +0 -171
  402. package/HiNotice/HiKPINotice.test.js +0 -88
  403. package/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
  404. package/HiPin/HiPin.test.js +0 -61
  405. package/HiRadio/HiRadio.test.js +0 -57
  406. package/HiSelect/HiSelect.test.js +0 -1092
  407. package/HiSelect/HiSelectInput.test.js +0 -21
  408. package/HiSelectableList/HiSelectableList.test.js +0 -173
  409. package/HiSelectableList/HiSelectableListItem.test.js +0 -97
  410. package/HiSwitch/HiSwitch.test.js +0 -41
  411. package/HiSwitch/HiSwitchState.test.js +0 -76
  412. package/HiTable/HiTable.test.js +0 -29
  413. package/es/App.test.js +0 -8
  414. package/es/HiAlertModal/HiAlertModal.test.js +0 -189
  415. package/es/HiBadge/HiBadge.test.js +0 -49
  416. package/es/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
  417. package/es/HiBreadcrumb/HiStep.test.js +0 -47
  418. package/es/HiBreadcrumb/HiStepConnector.test.js +0 -113
  419. package/es/HiBreadcrumb/HiStepContent.test.js +0 -32
  420. package/es/HiBreadcrumb/HiStepIcon.test.js +0 -65
  421. package/es/HiBreadcrumb/HiStepLabel.test.js +0 -30
  422. package/es/HiBreadcrumb/HiStepper.test.js +0 -33
  423. package/es/HiCell/CellAddress.test.js +0 -75
  424. package/es/HiCell/CellDate.test.js +0 -173
  425. package/es/HiCell/CellIcon.test.js +0 -57
  426. package/es/HiCell/CellImage.test.js +0 -49
  427. package/es/HiCell/CellNumeric.test.js +0 -46
  428. package/es/HiCell/CellRate.test.js +0 -73
  429. package/es/HiCell/CellSentinel.test.js +0 -48
  430. package/es/HiCell/CellText.test.js +0 -76
  431. package/es/HiCheckbox/HiCheckbox.test.js +0 -55
  432. package/es/HiChip/HiChip.test.js +0 -136
  433. package/es/HiChip/HiChipSwitch.test.js +0 -99
  434. package/es/HiColoredLabel/HiColoredLabel.test.js +0 -96
  435. package/es/HiDatePicker/Caption.test.js +0 -65
  436. package/es/HiDatePicker/HiDatePicker.test.js +0 -370
  437. package/es/HiDatePicker/HiDateRangePicker.test.js +0 -703
  438. package/es/HiDatePicker/HiDateRangeSelector.test.js +0 -193
  439. package/es/HiDatePicker/ListPicker.test.js +0 -53
  440. package/es/HiDatePicker/NavBar.test.js +0 -39
  441. package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
  442. package/es/HiDatePicker/Overlays/Overlay.test.js +0 -20
  443. package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
  444. package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
  445. package/es/HiDatePicker/hiLocaleUtils.test.js +0 -51
  446. package/es/HiDotsStepper/HiDot.test.js +0 -55
  447. package/es/HiDotsStepper/HiDotsStepper.test.js +0 -90
  448. package/es/HiForm/HiAddressField.test.js +0 -79
  449. package/es/HiForm/HiEmailField.test.js +0 -19
  450. package/es/HiForm/HiFormControl.test.js +0 -195
  451. package/es/HiForm/HiFormLabel.test.js +0 -66
  452. package/es/HiForm/HiInput.test.js +0 -202
  453. package/es/HiForm/HiPasswordField.test.js +0 -60
  454. package/es/HiForm/HiSearchField.test.js +0 -193
  455. package/es/HiForm/HiSlider.test.js +0 -99
  456. package/es/HiForm/HiTextField.test.js +0 -254
  457. package/es/HiForm/HiUpload.test.js +0 -241
  458. package/es/HiForm/HiUploadField.test.js +0 -55
  459. package/es/HiForm/HiUploadInput.test.js +0 -148
  460. package/es/HiIconButton/HiIconButton.test.js +0 -69
  461. package/es/HiLoader/HiLoader.test.js +0 -18
  462. package/es/HiMap/HiMap.test.js +0 -29
  463. package/es/HiMap/HiMapExpand.test.js +0 -48
  464. package/es/HiNotice/HiKPI.test.js +0 -171
  465. package/es/HiNotice/HiKPINotice.test.js +0 -88
  466. package/es/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
  467. package/es/HiPin/HiPin.test.js +0 -61
  468. package/es/HiRadio/HiRadio.test.js +0 -57
  469. package/es/HiSelect/HiSelect.test.js +0 -1092
  470. package/es/HiSelect/HiSelectInput.test.js +0 -21
  471. package/es/HiSelectableList/HiSelectableList.test.js +0 -173
  472. package/es/HiSelectableList/HiSelectableListItem.test.js +0 -97
  473. package/es/HiSwitch/HiSwitch.test.js +0 -41
  474. package/es/HiSwitch/HiSwitchState.test.js +0 -76
  475. package/es/HiTable/HiTable.test.js +0 -29
  476. package/es/styles/colorManipulator.test.js +0 -242
  477. package/es/styles/createBreakpoints.test.js +0 -48
  478. package/es/styles/createGenerateClassName.test.js +0 -141
  479. package/es/styles/createMixins.test.js +0 -24
  480. package/es/styles/createMuiTheme.test.js +0 -67
  481. package/es/styles/createPalette.test.js +0 -159
  482. package/es/styles/createStyles.test.js +0 -8
  483. package/es/styles/createTypography.test.js +0 -60
  484. package/es/styles/getStylesCreator.test.js +0 -92
  485. package/es/styles/getThemeProps.test.js +0 -39
  486. package/es/styles/themeListener.test.js +0 -26
  487. package/es/styles/transitions.test.js +0 -208
  488. package/es/test-utils/until.test.js +0 -157
  489. package/es/withMobileDialog/withMobileDialog.test.js +0 -67
  490. package/styles/colorManipulator.test.js +0 -242
  491. package/styles/createBreakpoints.test.js +0 -48
  492. package/styles/createGenerateClassName.test.js +0 -141
  493. package/styles/createMixins.test.js +0 -24
  494. package/styles/createMuiTheme.test.js +0 -67
  495. package/styles/createPalette.test.js +0 -159
  496. package/styles/createStyles.test.js +0 -8
  497. package/styles/createTypography.test.js +0 -60
  498. package/styles/getStylesCreator.test.js +0 -92
  499. package/styles/getThemeProps.test.js +0 -39
  500. package/styles/themeListener.test.js +0 -26
  501. package/styles/transitions.test.js +0 -208
  502. package/test-utils/until.test.js +0 -157
  503. package/withMobileDialog/withMobileDialog.test.js +0 -67
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow } from '../test-utils';
4
- import HiStepContent from './HiStepContent';
5
- describe('<HiStepContent />', function () {
6
- var shallow;
7
- var wrapper;
8
- before(function () {
9
- shallow = createShallow();
10
- });
11
- describe('with default values', function () {
12
- before(function () {
13
- wrapper = shallow(React.createElement(HiStepContent, null));
14
- });
15
- it('should render a HiStepContent component', function () {
16
- assert.strictEqual(wrapper.name(), 'HiStepContent');
17
- });
18
- it('should render a Paper component', function () {
19
- assert.strictEqual(wrapper.dive().name(), 'WithStyles(Paper)');
20
- });
21
- });
22
- describe('with a content prop', function () {
23
- before(function () {
24
- wrapper = shallow(React.createElement(HiStepContent, {
25
- content: "Test"
26
- }));
27
- });
28
- it('should have its content prop set correctly', function () {
29
- assert.strictEqual(wrapper.props().content, 'Test');
30
- });
31
- });
32
- });
@@ -1,65 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow, getClasses } from '../test-utils';
4
- import HiStepIcon from './HiStepIcon';
5
- describe('<HiStepIcon />', function () {
6
- var shallow;
7
- var classes;
8
- before(function () {
9
- shallow = createShallow();
10
- classes = getClasses(React.createElement(HiStepIcon, null));
11
- });
12
- it('should render a HiStep component', function () {
13
- var wrapper = shallow(React.createElement(HiStepIcon, null));
14
- assert.strictEqual(wrapper.name(), 'HiStepIcon');
15
- });
16
- it('should initiate with correct default props', function () {
17
- var wrapper = shallow(React.createElement(HiStepIcon, null));
18
- assert.strictEqual(wrapper.props().active, false);
19
- assert.strictEqual(wrapper.props().status, 'unreviewed');
20
- });
21
- it('should have correct classes applied if active', function () {
22
- var wrapper = shallow(React.createElement(HiStepIcon, {
23
- active: true
24
- }));
25
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
26
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
27
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
28
- });
29
- it('should have correct classes applied if active and validated', function () {
30
- var wrapper = shallow(React.createElement(HiStepIcon, {
31
- active: true,
32
- status: "validated"
33
- }));
34
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
35
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
36
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
37
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
38
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotValidated), true);
39
- });
40
- it('should have correct classes applied if active and refused', function () {
41
- var wrapper = shallow(React.createElement(HiStepIcon, {
42
- active: true,
43
- status: "refused"
44
- }));
45
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
46
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
47
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
48
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
49
- assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotRefused), true);
50
- });
51
- it('should have correct classes applied if validated', function () {
52
- var wrapper = shallow(React.createElement(HiStepIcon, {
53
- status: "validated"
54
- }));
55
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
56
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
57
- });
58
- it('should have correct classes applied if refused', function () {
59
- var wrapper = shallow(React.createElement(HiStepIcon, {
60
- status: "refused"
61
- }));
62
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
63
- assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
64
- });
65
- });
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow } from '../test-utils';
4
- import HiStepLabel from './HiStepLabel';
5
- import HiPin from '../HiPin';
6
- describe('<HiStepLabel />', function () {
7
- var shallow;
8
- before(function () {
9
- shallow = createShallow();
10
- });
11
- it('should render a HiStepLabel component', function () {
12
- var wrapper = shallow(React.createElement(HiStepLabel, null));
13
- assert.strictEqual(wrapper.name(), 'HiStepLabel');
14
- });
15
- it('should initiate with correct default props', function () {
16
- var wrapper = shallow(React.createElement(HiStepLabel, null));
17
- assert.strictEqual(wrapper.props().active, false);
18
- assert.strictEqual(wrapper.props().status, 'unreviewed');
19
- });
20
- it('should render a span', function () {
21
- var wrapper = shallow(React.createElement(HiStepLabel, null));
22
- assert.strictEqual(wrapper.dive().name(), 'span');
23
- });
24
- it('should render a notification HiPin', function () {
25
- var wrapper = shallow(React.createElement(HiStepLabel, {
26
- notificationNumber: 2
27
- }));
28
- assert.strictEqual(wrapper.dive().find(HiPin).children().text(), '2');
29
- });
30
- });
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow } from '../test-utils';
4
- import HiStepper from './HiStepper';
5
- import HiStep from './HiStep';
6
- import HiStepLabel from './HiStepLabel';
7
- describe('<HiStepper />', function () {
8
- var shallow;
9
- var wrapper;
10
- var children = React.createElement(HiStep, {
11
- key: 1
12
- }, React.createElement(HiStepLabel, {
13
- status: "unreviewed",
14
- notificationNumber: 0
15
- }, "Label"));
16
- before(function () {
17
- shallow = createShallow();
18
- });
19
- describe('Generic tests', function () {
20
- before(function () {
21
- wrapper = shallow(React.createElement(HiStepper, null, children));
22
- });
23
- it('should render a HiStepper component', function () {
24
- assert.strictEqual(wrapper.name(), 'HiStepper');
25
- });
26
- it('should render a div containing children steps', function () {
27
- assert.strictEqual(wrapper.dive().name(), 'div');
28
- });
29
- it('should render a HiStep', function () {
30
- assert.strictEqual(wrapper.find(HiStep).length, 1);
31
- });
32
- });
33
- });
@@ -1,75 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow } from '../test-utils';
4
- import CellAddress from './CellAddress';
5
- describe('<CellAddress />', function () {
6
- var shallow;
7
- before(function () {
8
- before(function () {
9
- shallow = createShallow({
10
- dive: true
11
- });
12
- });
13
- it('should render a the name and the city', function () {
14
- var wrapper = shallow(React.createElement(CellAddress, {
15
- type: 'address',
16
- streetAddress: '12 rue Zimzim Zidane',
17
- city: 'Paris',
18
- country: 'France'
19
- }));
20
- assert.strictEqual(wrapper.find('div').text(), 'Paris, France', 'Should have correct text.');
21
- });
22
- it('should render a the city and the country', function () {
23
- var wrapper = shallow(React.createElement(CellAddress, {
24
- type: 'address',
25
- streetAddress: '12 rue Zimzim Zidane',
26
- city: 'Paris',
27
- country: 'France',
28
- isoCountry: 'FR',
29
- view: 's'
30
- }));
31
- assert.strictEqual(wrapper.find('div').text(), 'Paris, FR', 'Should have correct text.');
32
- });
33
- it('should render only the city', function () {
34
- var wrapper = shallow(React.createElement(CellAddress, {
35
- sticky: true,
36
- type: 'address',
37
- streetAddress: '12 rue Zimzim Zidane',
38
- city: 'Paris',
39
- country: 'France',
40
- view: 's'
41
- }));
42
- assert.strictEqual(wrapper.find('div').text(), 'Paris', 'Should have correct text.');
43
- });
44
- it('should render only the country', function () {
45
- var wrapper = shallow(React.createElement(CellAddress, {
46
- type: 'address',
47
- streetAddress: '12 rue Zimzim Zidane',
48
- country: 'France',
49
- isoCountry: 'FR'
50
- }));
51
- assert.strictEqual(wrapper.find('div').text(), 'France', 'Should have correct text.');
52
- });
53
- it('should render only the iso country', function () {
54
- var wrapper = shallow(React.createElement(CellAddress, {
55
- type: 'address',
56
- streetAddress: '12 rue Zimzim Zidane',
57
- country: 'France',
58
- isoCountry: 'FR',
59
- view: 's'
60
- }));
61
- assert.strictEqual(wrapper.find('div').text(), 'FR', 'Should have correct text.');
62
- });
63
- it('should render name and the iso country', function () {
64
- var wrapper = shallow(React.createElement(CellAddress, {
65
- type: 'address',
66
- streetAddress: '12 rue Zimzim Zidane',
67
- country: 'France',
68
- name: 'address',
69
- isoCountry: 'FR',
70
- view: 'l'
71
- }));
72
- assert.strictEqual(wrapper.find('div').text(), 'address, ', 'Should have correct text.');
73
- });
74
- });
75
- });
@@ -1,173 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow } from '../test-utils';
4
- import CellDate from './CellDate';
5
- describe('<CellDate />', function () {
6
- var shallow;
7
- before(function () {
8
- shallow = createShallow({
9
- dive: true,
10
- untilSelector: CellDate,
11
- context: {
12
- table: {
13
- footer: true
14
- }
15
- }
16
- });
17
- });
18
- it('should render a date for all views', function () {
19
- // L - en - with time
20
- var wrapper = shallow(React.createElement(CellDate, {
21
- type: 'date',
22
- date: '2017-01-27 10:35:59',
23
- locale: 'en-EN',
24
- view: 'l',
25
- displayTime: true
26
- }));
27
- assert.strictEqual(wrapper.find('div').at(0).text(), 'Friday 27 January 2017 10:35:59', 'Should display large date with time in english'); // L - en - without time
28
-
29
- wrapper.setProps({
30
- displayTime: false
31
- });
32
- assert.strictEqual(wrapper.find('div').at(0).text(), 'Friday 27 January 2017', 'Should display large date without time in english'); // L - fr - with time
33
-
34
- wrapper.setProps({
35
- locale: 'fr',
36
- displayTime: true
37
- });
38
- assert.strictEqual(wrapper.find('div').at(0).text(), 'vendredi 27 janvier 2017 10:35:59', 'Should display large date with time in french'); // L - fr - without time
39
-
40
- wrapper.setProps({
41
- locale: 'fr',
42
- displayTime: false
43
- });
44
- assert.strictEqual(wrapper.find('div').at(0).text(), 'vendredi 27 janvier 2017', 'Should display large date without time in english'); // M - en - with time
45
-
46
- wrapper.setProps({
47
- view: 'm',
48
- locale: 'en',
49
- displayTime: true
50
- });
51
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017 10:35:59', 'Should display medium date with time and default format'); // M - en - with time - custom format
52
-
53
- wrapper.setProps({
54
- view: 'm',
55
- locale: 'en',
56
- displayTime: true,
57
- formatShort: 'MM-DD-YYYY'
58
- });
59
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017 10:35:59', 'Should display medium date with time and custom format'); // M - en - without time
60
-
61
- wrapper.setProps({
62
- view: 'm',
63
- locale: 'en',
64
- displayTime: false,
65
- formatShort: undefined
66
- });
67
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017', 'Should display medium date without time and default format'); // M - en - without time - custom format
68
-
69
- wrapper.setProps({
70
- view: 'm',
71
- locale: 'en',
72
- displayTime: false,
73
- formatShort: 'MM-DD-YYYY'
74
- });
75
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017', 'Should display medium date without time and custom format'); // M - fr - with time
76
-
77
- wrapper.setProps({
78
- view: 'm',
79
- locale: 'fr',
80
- displayTime: true,
81
- formatShort: undefined
82
- });
83
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017 10:35:59', 'Should display medium date with time and default format'); // M - fr - with time - custom format
84
-
85
- wrapper.setProps({
86
- view: 'm',
87
- locale: 'fr',
88
- displayTime: true,
89
- formatShort: 'MM-DD-YYYY'
90
- });
91
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017 10:35:59', 'Should display medium date with time and custom format'); // M - fr - without time
92
-
93
- wrapper.setProps({
94
- view: 'm',
95
- locale: 'fr',
96
- displayTime: false,
97
- formatShort: undefined
98
- });
99
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017', 'Should display medium date without time and default format'); // M - fr - with time - custom format
100
-
101
- wrapper.setProps({
102
- view: 'm',
103
- locale: 'fr',
104
- displayTime: false,
105
- formatShort: 'MM-DD-YYYY'
106
- });
107
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017', 'Should display medium date without time and custom format'); // S - en - with time
108
-
109
- wrapper.setProps({
110
- view: 's',
111
- locale: 'en',
112
- displayTime: true,
113
- formatShort: undefined
114
- });
115
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17 10:35:59', 'Should display medium date with time and default format'); // S - en - with time - custom format
116
-
117
- wrapper.setProps({
118
- view: 's',
119
- locale: 'en',
120
- displayTime: true,
121
- formatShort: 'MM-DD-YYYY'
122
- });
123
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17 10:35:59', 'Should display medium date with time and custom format'); // S - en - without time
124
-
125
- wrapper.setProps({
126
- view: 's',
127
- locale: 'en',
128
- displayTime: false,
129
- formatShort: undefined
130
- });
131
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17', 'Should display medium date without time and default format'); // S - en - without time - custom format
132
-
133
- wrapper.setProps({
134
- view: 's',
135
- locale: 'en',
136
- displayTime: false,
137
- formatShort: 'MM-DD-YYYY'
138
- });
139
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17', 'Should display medium date without time and custom format'); // S - fr - with time
140
-
141
- wrapper.setProps({
142
- view: 's',
143
- locale: 'fr',
144
- displayTime: true,
145
- formatShort: undefined
146
- });
147
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17 10:35:59', 'Should display medium date with time and default format'); // S - fr - with time - custom format
148
-
149
- wrapper.setProps({
150
- view: 's',
151
- locale: 'fr',
152
- displayTime: true,
153
- formatShort: 'MM-DD-YYYY'
154
- });
155
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17 10:35:59', 'Should display medium date with time and custom format'); // S - fr - without time
156
-
157
- wrapper.setProps({
158
- view: 's',
159
- locale: 'fr',
160
- displayTime: false,
161
- formatShort: undefined
162
- });
163
- assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17', 'Should display medium date without time and default format'); // S - fr - with time - custom format
164
-
165
- wrapper.setProps({
166
- view: 's',
167
- locale: 'fr',
168
- displayTime: false,
169
- formatShort: 'MM-DD-YYYY'
170
- });
171
- assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17', 'Should display medium date without time and custom format');
172
- });
173
- });
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import ArrowUp from 'mdi-material-ui/ArrowUp';
4
- import { createShallow, createMount, getClasses } from '../test-utils';
5
- import CellIcon from './CellIcon';
6
- import HiIcon from '../HiIcon';
7
- describe('<CellIcon/>', function () {
8
- var shallow;
9
- var mount;
10
- var classes;
11
- before(function () {
12
- shallow = createShallow({
13
- dive: true
14
- });
15
- mount = createMount();
16
- classes = getClasses(React.createElement(CellIcon, {
17
- type: 'icon',
18
- icon: 'arrow_up',
19
- label: 'Test'
20
- }));
21
- });
22
- after(function () {
23
- mount.cleanUp();
24
- });
25
- it('should render a td with an icon inside and label (view L)', function () {
26
- var wrapper = shallow(React.createElement(CellIcon, {
27
- type: 'icon',
28
- icon: 'arrow_up',
29
- label: 'Test',
30
- view: 'l'
31
- }));
32
- assert.strictEqual(wrapper.find(HiIcon).length, 1, 'Should render HiIcon');
33
- assert.strictEqual(wrapper.find(HiIcon).props().icon, 'arrow_up', 'Should pass icon name');
34
- assert.strictEqual(wrapper.find(HiIcon).props().className, classes.icon, 'Should pass icon class');
35
- });
36
- it('should render a td with an icon inside only (view S)', function () {
37
- var wrapper = shallow(React.createElement(CellIcon, {
38
- type: 'icon',
39
- icon: 'arrow_up',
40
- label: 'Test',
41
- view: 's'
42
- }));
43
- assert.strictEqual(wrapper.find(HiIcon).length, 1, 'Should render HiIcon');
44
- assert.strictEqual(wrapper.find(HiIcon).props().icon, 'arrow_up', 'Should pass icon name');
45
- assert.strictEqual(wrapper.find(HiIcon).props().className, classes.icon, 'Should pass icon class');
46
- });
47
- it('should render a CellIcon with an icon inside only (view S)', function () {
48
- var wrapper = mount(React.createElement(CellIcon, {
49
- sticky: true,
50
- type: 'icon',
51
- icon: 'mdi_arrow_up',
52
- label: undefined,
53
- view: 's'
54
- }));
55
- assert.strictEqual(wrapper.find(ArrowUp).length, 1, 'Should render the right icon component');
56
- });
57
- });
@@ -1,49 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow, getClasses } from '../test-utils';
4
- import CellImage from './CellImage';
5
- describe('<CellImage/>', function () {
6
- var shallow;
7
- var classes;
8
- before(function () {
9
- shallow = createShallow({
10
- dive: true
11
- });
12
- classes = getClasses(React.createElement(CellImage, {
13
- type: 'image',
14
- label: 'visa',
15
- path: '/static/hmus/images/logo_visa_75wx45h.gif'
16
- }));
17
- });
18
- it('should render a td with an img inside and label if value', function () {
19
- var wrapper = shallow(React.createElement(CellImage, {
20
- type: 'image',
21
- label: 'test value',
22
- path: '/static/hmus/images/logo_visa_75wx45h.gif'
23
- }));
24
- assert.strictEqual(wrapper.find('img').length, 1, 'should have 1 image');
25
- assert.strictEqual(wrapper.find('img').hasClass(classes.img), true, 'should have the img class');
26
- wrapper.setProps({
27
- view: 'l'
28
- });
29
- wrapper.update();
30
- assert.strictEqual(wrapper.find('div').length, 1, 'should have 1 div');
31
- assert.strictEqual(wrapper.find('div').text(), 'test value', 'should have correct label');
32
- });
33
- it('should render a td with an img inside and label if value', function () {
34
- var wrapper = shallow(React.createElement(CellImage, {
35
- sticky: true,
36
- type: 'image',
37
- label: 'test value',
38
- path: '/static/hmus/images/logo_visa_75wx45h.gif'
39
- }));
40
- assert.strictEqual(wrapper.find('img').length, 1, 'should have 1 image');
41
- assert.strictEqual(wrapper.find('img').hasClass(classes.img), true, 'should have the img class');
42
- wrapper.setProps({
43
- view: 'l'
44
- });
45
- wrapper.update();
46
- assert.strictEqual(wrapper.find('span').length, 1, 'should have 1 label');
47
- assert.strictEqual(wrapper.find('span').text(), 'test value', 'should have correct label');
48
- });
49
- });
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { createShallow, getClasses } from '../test-utils';
4
- import CellNumeric from './CellNumeric';
5
- describe('<CellNumeric />', function () {
6
- var shallow;
7
- var classes;
8
- before(function () {
9
- shallow = createShallow({
10
- dive: true
11
- });
12
- classes = getClasses(React.createElement(CellNumeric, {
13
- type: 'numeric',
14
- value: 2345
15
- }));
16
- });
17
- it('should render a td with 1 span (for value)', function () {
18
- var wrapper = shallow(React.createElement(CellNumeric, {
19
- type: 'numeric',
20
- value: 2345
21
- }));
22
- assert.strictEqual(wrapper.find('div').length, 1, 'Should have 1 span.');
23
- assert.strictEqual(wrapper.find('div').hasClass(classes.wrapper), true);
24
- });
25
- it('should render a cell with 1 span (for value)', function () {
26
- var wrapper = shallow(React.createElement(CellNumeric, {
27
- type: 'numeric',
28
- value: 2345,
29
- view: 'l',
30
- currency: 'EUR'
31
- }));
32
- assert.strictEqual(wrapper.find('div').length, 1, 'Should have 1 span.');
33
- assert.strictEqual(wrapper.find('div').hasClass(classes.wrapper), true);
34
- });
35
- it('should render a cell with 1 span (for value)', function () {
36
- var wrapper = shallow(React.createElement(CellNumeric, {
37
- type: 'numeric',
38
- sticky: true,
39
- value: 2345,
40
- view: 's',
41
- currency: 'EUR'
42
- }));
43
- assert.strictEqual(wrapper.find('div').length, 1, 'Should have 1 span.');
44
- assert.strictEqual(wrapper.find('div').hasClass(classes.wrapper), true);
45
- });
46
- });
@@ -1,73 +0,0 @@
1
- import React from 'react';
2
- import { assert } from 'chai';
3
- import { ArrowTopRight, Equal, ArrowBottomRight } from 'mdi-material-ui';
4
- import { createShallow, getClasses } from '../test-utils';
5
- import CellRate from './CellRate';
6
- describe('<CellRate/>', function () {
7
- var shallow;
8
- var classes;
9
- before(function () {
10
- shallow = createShallow({
11
- dive: true
12
- });
13
- classes = getClasses(React.createElement(CellRate, {
14
- type: 'rate',
15
- value: 13.3,
16
- trendchip: 'up'
17
- }));
18
- });
19
- it('should render a simple div with class and arrow icon', function () {
20
- var wrapper = shallow(React.createElement(CellRate, {
21
- type: 'rate',
22
- value: 13.3,
23
- trendchip: 'up'
24
- }));
25
- assert.strictEqual(wrapper.find('span').length, 0, 'Should not render span containing indicator');
26
- assert.strictEqual(wrapper.childAt(0).hasClass(classes.rateDiv), true, 'Should have the rateDiv class');
27
- assert.strictEqual(wrapper.find(ArrowTopRight).length, 1, 'Should render a div containing rate & Arrow oriented to top');
28
- });
29
- it('should render a simple div with class and arrow icon', function () {
30
- var wrapper = shallow(React.createElement(CellRate, {
31
- type: 'rate',
32
- value: 13.3,
33
- trendchip: 'up',
34
- isPositive: false
35
- }));
36
- assert.strictEqual(wrapper.find('span').length, 0, 'Should not render span containing indicator');
37
- assert.strictEqual(wrapper.childAt(0).hasClass(classes.rateDiv), true, 'Should have the rateDiv class');
38
- assert.strictEqual(wrapper.find(ArrowTopRight).length, 1, 'Should render a div containing rate & Arrow oriented to top');
39
- });
40
- it('should render a div with equal icon', function () {
41
- var wrapper = shallow(React.createElement(CellRate, {
42
- type: 'rate',
43
- value: 13.3,
44
- trendchip: 'equal'
45
- }));
46
- assert.strictEqual(wrapper.find(Equal).length, 1, 'Should render a div containing rate & Equal icon');
47
- });
48
- it('should render a div with an indicator span & div inside & arrow bottom icon inside', function () {
49
- var wrapper = shallow(React.createElement(CellRate, {
50
- type: 'rate',
51
- value: 13.3,
52
- trendchip: 'down',
53
- isPositive: false,
54
- indicator: 'volume'
55
- }));
56
- assert.strictEqual(wrapper.find(ArrowBottomRight).length, 1, 'Should render a div containing rate & ArrowBottomRight icon');
57
- assert.strictEqual(wrapper.find('span').length, 1, 'Should render a span containing an indication on the data that the rate is applying');
58
- assert.strictEqual(wrapper.childAt(0).hasClass(classes.rateDiv), false, 'Should have the rateDiv class');
59
- assert.strictEqual(wrapper.childAt(1).hasClass(classes.spanIndicator), true, 'Should have the spanIndicator class');
60
- });
61
- it('should render a div with an indicator span & div inside & arrow bottom icon inside', function () {
62
- var wrapper = shallow(React.createElement(CellRate, {
63
- type: 'rate',
64
- value: 13.3,
65
- trendchip: 'down',
66
- indicator: 'volume'
67
- }));
68
- assert.strictEqual(wrapper.find(ArrowBottomRight).length, 1, 'Should render a div containing rate & ArrowBottomRight icon');
69
- assert.strictEqual(wrapper.find('span').length, 1, 'Should render a span containing an indication on the data that the rate is applying');
70
- assert.strictEqual(wrapper.childAt(0).hasClass(classes.rateDiv), false, 'Should have the rateDiv class');
71
- assert.strictEqual(wrapper.childAt(1).hasClass(classes.spanIndicator), true, 'Should have the spanIndicator class');
72
- });
73
- });