@hipay/hipay-material-ui 3.15.1 → 3.15.3-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (435) hide show
  1. package/HiAccordion/HiAccordion.js +5 -22
  2. package/HiAccordion/index.js +0 -3
  3. package/HiAccordionActions/HiAccordionActions.js +0 -12
  4. package/HiAccordionActions/index.js +0 -3
  5. package/HiAccordionSummary/HiAccordionSummary.js +0 -13
  6. package/HiAccordionSummary/index.js +0 -3
  7. package/HiAlertModal/HiAlertModal.js +4 -18
  8. package/HiAlertModal/index.js +0 -3
  9. package/HiAppBar/HiAppBar.js +8 -37
  10. package/HiAppBar/index.js +0 -2
  11. package/HiAvatar/HiAvatar.js +2 -10
  12. package/HiAvatar/index.js +0 -2
  13. package/HiBadge/HiBadge.js +14 -27
  14. package/HiBadge/index.js +0 -2
  15. package/HiBreadcrumb/HiBreadcrumb.js +5 -28
  16. package/HiBreadcrumb/HiStep.js +10 -40
  17. package/HiBreadcrumb/HiStepConnector.js +11 -43
  18. package/HiBreadcrumb/HiStepContent.js +3 -25
  19. package/HiBreadcrumb/HiStepIcon.js +11 -33
  20. package/HiBreadcrumb/HiStepLabel.js +12 -39
  21. package/HiBreadcrumb/HiStepper.js +3 -25
  22. package/HiBreadcrumb/index.js +0 -2
  23. package/HiButton/HiButton.js +8 -31
  24. package/HiButton/index.js +0 -3
  25. package/HiCell/CellAddress.js +9 -28
  26. package/HiCell/CellDate.js +7 -31
  27. package/HiCell/CellHiddenContent.js +4 -24
  28. package/HiCell/CellIcon.js +9 -31
  29. package/HiCell/CellImage.js +9 -29
  30. package/HiCell/CellNumeric.js +10 -35
  31. package/HiCell/CellPinToAction.js +6 -28
  32. package/HiCell/CellRate.js +14 -45
  33. package/HiCell/CellSentinel.js +9 -28
  34. package/HiCell/CellSentinelScore.js +5 -24
  35. package/HiCell/CellText.js +13 -47
  36. package/HiCell/CellTextStyled.js +12 -22
  37. package/HiCell/index.js +0 -10
  38. package/HiCheckbox/HiCheckbox.js +16 -50
  39. package/HiCheckbox/index.js +0 -2
  40. package/HiChip/HiChip.js +22 -43
  41. package/HiChip/HiChipSwitch.js +12 -52
  42. package/HiChip/index.js +0 -3
  43. package/HiColoredLabel/HiColoredLabel.js +37 -56
  44. package/HiColoredLabel/index.js +0 -2
  45. package/HiDatePicker/Caption.js +6 -16
  46. package/HiDatePicker/HiDatePicker.js +14 -85
  47. package/HiDatePicker/HiDatePickerMobile.js +17 -41
  48. package/HiDatePicker/HiDateRangePicker.js +35 -129
  49. package/HiDatePicker/HiDateRangeSelector.js +45 -123
  50. package/HiDatePicker/ListPicker.js +5 -33
  51. package/HiDatePicker/NavBar.js +9 -26
  52. package/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
  53. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
  54. package/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
  55. package/HiDatePicker/Overlays/Overlay.js +4 -18
  56. package/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
  57. package/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
  58. package/HiDatePicker/Overlays/index.js +0 -6
  59. package/HiDatePicker/Weekday.js +3 -7
  60. package/HiDatePicker/hiLocaleUtils.js +7 -18
  61. package/HiDatePicker/index.js +0 -2
  62. package/HiDatePicker/stylesheet.js +5 -10
  63. package/HiDialog/HiDialog.js +4 -15
  64. package/HiDialog/index.js +0 -2
  65. package/HiDotsStepper/HiDot.js +6 -33
  66. package/HiDotsStepper/HiDotsStepper.js +7 -32
  67. package/HiDotsStepper/index.js +0 -3
  68. package/HiExpansionPanel/HiExpansionPanel.js +13 -34
  69. package/HiExpansionPanel/index.js +0 -3
  70. package/HiForm/HiAddressField.js +9 -34
  71. package/HiForm/HiEmailField.js +4 -27
  72. package/HiForm/HiFormControl.js +27 -70
  73. package/HiForm/HiFormLabel.js +13 -37
  74. package/HiForm/HiInput.js +28 -80
  75. package/HiForm/HiPasswordField.js +5 -31
  76. package/HiForm/HiSearchField.js +2 -32
  77. package/HiForm/HiSlider.js +19 -52
  78. package/HiForm/HiTextField.js +21 -45
  79. package/HiForm/HiUpload.js +31 -87
  80. package/HiForm/HiUploadField.js +9 -30
  81. package/HiForm/HiUploadInput.js +20 -70
  82. package/HiForm/index.js +0 -12
  83. package/HiIcon/HiIcon.js +5 -28
  84. package/HiIcon/index.js +0 -2
  85. package/HiIconButton/HiIconButton.js +5 -18
  86. package/HiIconButton/index.js +0 -2
  87. package/HiListItemLink/HiListItemLink.js +6 -17
  88. package/HiListItemLink/index.js +0 -2
  89. package/HiLoader/HiLoader.js +4 -13
  90. package/HiLoader/index.js +0 -2
  91. package/HiNotice/HiKPI.js +14 -42
  92. package/HiNotice/HiKPINotice.js +4 -13
  93. package/HiNotice/index.js +0 -3
  94. package/HiPagination/HiPagination.js +0 -9
  95. package/HiPagination/index.js +0 -2
  96. package/HiPaymentMeans/HiPaymentMeans.js +24 -60
  97. package/HiPaymentMeans/index.js +0 -2
  98. package/HiPdfReader/HiPdfReader.js +21 -52
  99. package/HiPdfReader/index.js +0 -2
  100. package/HiPin/HiPin.js +14 -23
  101. package/HiPin/index.js +0 -2
  102. package/HiRadio/HiRadio.js +9 -18
  103. package/HiRadio/index.js +0 -2
  104. package/HiScrollStepper/HiScrollStepper.js +26 -63
  105. package/HiScrollStepper/index.js +0 -2
  106. package/HiSelect/HiDynamicSelect.js +31 -40
  107. package/HiSelect/HiDynamicSelectField.js +22 -44
  108. package/HiSelect/HiNestedSelect.js +61 -104
  109. package/HiSelect/HiNestedSelectContent.js +58 -82
  110. package/HiSelect/HiNestedSelectField.js +22 -44
  111. package/HiSelect/HiSelect.js +85 -180
  112. package/HiSelect/HiSelectContent.js +58 -90
  113. package/HiSelect/HiSelectField.js +23 -45
  114. package/HiSelect/HiSelectInput.js +20 -69
  115. package/HiSelect/HiSelectMobile.js +5 -40
  116. package/HiSelect/HiSuggestSelect.js +22 -76
  117. package/HiSelect/HiSuggestSelectField.js +13 -35
  118. package/HiSelect/index.js +0 -12
  119. package/HiSelectableList/HiSelectableList.js +29 -83
  120. package/HiSelectableList/HiSelectableListHierarchic.js +31 -55
  121. package/HiSelectableList/HiSelectableListItem.js +37 -76
  122. package/HiSelectableList/index.js +0 -4
  123. package/HiStepper/DefaultIndicator.js +0 -8
  124. package/HiStepper/HiStep.js +18 -47
  125. package/HiStepper/HiStepper.js +1 -13
  126. package/HiStepper/index.js +0 -3
  127. package/HiSwitch/HiSwitch.js +15 -36
  128. package/HiSwitch/HiSwitchState.js +17 -31
  129. package/HiSwitch/index.js +0 -3
  130. package/HiTable/HiCellBuilder.js +7 -61
  131. package/HiTable/HiTable.js +17 -44
  132. package/HiTable/HiTableBody.js +6 -22
  133. package/HiTable/HiTableHeader.js +14 -46
  134. package/HiTable/HiTableRow.js +7 -39
  135. package/HiTable/constants.js +9 -14
  136. package/HiTable/index.js +0 -2
  137. package/es/HiAccordion/HiAccordion.js +5 -22
  138. package/es/HiAccordion/index.js +0 -3
  139. package/es/HiAccordionActions/HiAccordionActions.js +0 -12
  140. package/es/HiAccordionActions/index.js +0 -3
  141. package/es/HiAccordionSummary/HiAccordionSummary.js +0 -13
  142. package/es/HiAccordionSummary/index.js +0 -3
  143. package/es/HiAlertModal/HiAlertModal.js +4 -18
  144. package/es/HiAlertModal/index.js +0 -3
  145. package/es/HiAppBar/HiAppBar.js +8 -37
  146. package/es/HiAppBar/index.js +0 -2
  147. package/es/HiAvatar/HiAvatar.js +2 -10
  148. package/es/HiAvatar/index.js +0 -2
  149. package/es/HiBadge/HiBadge.js +14 -27
  150. package/es/HiBadge/index.js +0 -2
  151. package/es/HiBreadcrumb/HiBreadcrumb.js +5 -28
  152. package/es/HiBreadcrumb/HiStep.js +10 -40
  153. package/es/HiBreadcrumb/HiStepConnector.js +11 -43
  154. package/es/HiBreadcrumb/HiStepContent.js +3 -25
  155. package/es/HiBreadcrumb/HiStepIcon.js +11 -33
  156. package/es/HiBreadcrumb/HiStepLabel.js +12 -39
  157. package/es/HiBreadcrumb/HiStepper.js +3 -25
  158. package/es/HiBreadcrumb/index.js +0 -2
  159. package/es/HiButton/HiButton.js +8 -31
  160. package/es/HiButton/index.js +0 -3
  161. package/es/HiCell/CellAddress.js +9 -28
  162. package/es/HiCell/CellDate.js +7 -31
  163. package/es/HiCell/CellHiddenContent.js +4 -24
  164. package/es/HiCell/CellIcon.js +9 -31
  165. package/es/HiCell/CellImage.js +9 -29
  166. package/es/HiCell/CellNumeric.js +10 -35
  167. package/es/HiCell/CellPinToAction.js +6 -28
  168. package/es/HiCell/CellRate.js +14 -45
  169. package/es/HiCell/CellSentinel.js +9 -28
  170. package/es/HiCell/CellSentinelScore.js +5 -24
  171. package/es/HiCell/CellText.js +13 -47
  172. package/es/HiCell/CellTextStyled.js +12 -22
  173. package/es/HiCell/index.js +0 -10
  174. package/es/HiCheckbox/HiCheckbox.js +16 -50
  175. package/es/HiCheckbox/index.js +0 -2
  176. package/es/HiChip/HiChip.js +22 -43
  177. package/es/HiChip/HiChipSwitch.js +12 -52
  178. package/es/HiChip/index.js +0 -3
  179. package/es/HiColoredLabel/HiColoredLabel.js +37 -56
  180. package/es/HiColoredLabel/index.js +0 -2
  181. package/es/HiDatePicker/Caption.js +6 -16
  182. package/es/HiDatePicker/HiDatePicker.js +14 -85
  183. package/es/HiDatePicker/HiDatePickerMobile.js +17 -41
  184. package/es/HiDatePicker/HiDateRangePicker.js +35 -129
  185. package/es/HiDatePicker/HiDateRangeSelector.js +45 -123
  186. package/es/HiDatePicker/ListPicker.js +5 -33
  187. package/es/HiDatePicker/NavBar.js +9 -26
  188. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
  189. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
  190. package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
  191. package/es/HiDatePicker/Overlays/Overlay.js +4 -18
  192. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
  193. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
  194. package/es/HiDatePicker/Overlays/index.js +0 -6
  195. package/es/HiDatePicker/Weekday.js +3 -7
  196. package/es/HiDatePicker/hiLocaleUtils.js +7 -18
  197. package/es/HiDatePicker/index.js +0 -2
  198. package/es/HiDatePicker/stylesheet.js +5 -10
  199. package/es/HiDialog/HiDialog.js +4 -15
  200. package/es/HiDialog/index.js +0 -2
  201. package/es/HiDotsStepper/HiDot.js +6 -33
  202. package/es/HiDotsStepper/HiDotsStepper.js +7 -32
  203. package/es/HiDotsStepper/index.js +0 -3
  204. package/es/HiExpansionPanel/HiExpansionPanel.js +13 -34
  205. package/es/HiExpansionPanel/index.js +0 -3
  206. package/es/HiForm/HiAddressField.js +9 -34
  207. package/es/HiForm/HiEmailField.js +4 -27
  208. package/es/HiForm/HiFormControl.js +27 -70
  209. package/es/HiForm/HiFormLabel.js +13 -37
  210. package/es/HiForm/HiInput.js +28 -80
  211. package/es/HiForm/HiPasswordField.js +5 -31
  212. package/es/HiForm/HiSearchField.js +2 -32
  213. package/es/HiForm/HiSlider.js +19 -52
  214. package/es/HiForm/HiTextField.js +21 -45
  215. package/es/HiForm/HiUpload.js +31 -87
  216. package/es/HiForm/HiUploadField.js +9 -30
  217. package/es/HiForm/HiUploadInput.js +20 -70
  218. package/es/HiForm/index.js +0 -12
  219. package/es/HiIcon/HiIcon.js +5 -28
  220. package/es/HiIcon/index.js +0 -2
  221. package/es/HiIconButton/HiIconButton.js +5 -18
  222. package/es/HiIconButton/index.js +0 -2
  223. package/es/HiListItemLink/HiListItemLink.js +6 -17
  224. package/es/HiListItemLink/index.js +0 -2
  225. package/es/HiLoader/HiLoader.js +4 -13
  226. package/es/HiLoader/index.js +0 -2
  227. package/es/HiNotice/HiKPI.js +14 -42
  228. package/es/HiNotice/HiKPINotice.js +4 -13
  229. package/es/HiNotice/index.js +0 -3
  230. package/es/HiPagination/HiPagination.js +0 -9
  231. package/es/HiPagination/index.js +0 -2
  232. package/es/HiPaymentMeans/HiPaymentMeans.js +24 -60
  233. package/es/HiPaymentMeans/index.js +0 -2
  234. package/es/HiPdfReader/HiPdfReader.js +21 -52
  235. package/es/HiPdfReader/index.js +0 -2
  236. package/es/HiPin/HiPin.js +14 -23
  237. package/es/HiPin/index.js +0 -2
  238. package/es/HiRadio/HiRadio.js +9 -18
  239. package/es/HiRadio/index.js +0 -2
  240. package/es/HiScrollStepper/HiScrollStepper.js +26 -63
  241. package/es/HiScrollStepper/index.js +0 -2
  242. package/es/HiSelect/HiDynamicSelect.js +31 -40
  243. package/es/HiSelect/HiDynamicSelectField.js +22 -44
  244. package/es/HiSelect/HiNestedSelect.js +61 -104
  245. package/es/HiSelect/HiNestedSelectContent.js +58 -82
  246. package/es/HiSelect/HiNestedSelectField.js +22 -44
  247. package/es/HiSelect/HiSelect.js +85 -180
  248. package/es/HiSelect/HiSelectContent.js +58 -90
  249. package/es/HiSelect/HiSelectField.js +23 -45
  250. package/es/HiSelect/HiSelectInput.js +20 -69
  251. package/es/HiSelect/HiSelectMobile.js +5 -40
  252. package/es/HiSelect/HiSuggestSelect.js +22 -76
  253. package/es/HiSelect/HiSuggestSelectField.js +13 -35
  254. package/es/HiSelect/index.js +0 -12
  255. package/es/HiSelectableList/HiSelectableList.js +29 -83
  256. package/es/HiSelectableList/HiSelectableListHierarchic.js +31 -55
  257. package/es/HiSelectableList/HiSelectableListItem.js +37 -76
  258. package/es/HiSelectableList/index.js +0 -4
  259. package/es/HiStepper/DefaultIndicator.js +0 -8
  260. package/es/HiStepper/HiStep.js +18 -47
  261. package/es/HiStepper/HiStepper.js +1 -13
  262. package/es/HiStepper/index.js +0 -3
  263. package/es/HiSwitch/HiSwitch.js +15 -36
  264. package/es/HiSwitch/HiSwitchState.js +17 -31
  265. package/es/HiSwitch/index.js +0 -3
  266. package/es/HiTable/HiCellBuilder.js +7 -61
  267. package/es/HiTable/HiTable.js +17 -44
  268. package/es/HiTable/HiTableBody.js +6 -22
  269. package/es/HiTable/HiTableHeader.js +14 -46
  270. package/es/HiTable/HiTableRow.js +7 -39
  271. package/es/HiTable/constants.js +9 -14
  272. package/es/HiTable/index.js +0 -2
  273. package/es/hi-svg-icons/HiAccount.js +3 -12
  274. package/es/hi-svg-icons/HiActivity.js +3 -12
  275. package/es/hi-svg-icons/HiAll.js +6 -16
  276. package/es/hi-svg-icons/HiBilling.js +3 -12
  277. package/es/hi-svg-icons/HiBriefcaseRescue.js +3 -12
  278. package/es/hi-svg-icons/HiBusiness.js +3 -12
  279. package/es/hi-svg-icons/HiCatalog.js +3 -12
  280. package/es/hi-svg-icons/HiCustomer.js +3 -12
  281. package/es/hi-svg-icons/HiDownload.js +3 -12
  282. package/es/hi-svg-icons/HiFinance.js +3 -12
  283. package/es/hi-svg-icons/HiFinanceMenu.js +3 -12
  284. package/es/hi-svg-icons/HiHostedPaymentPage.js +3 -12
  285. package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
  286. package/es/hi-svg-icons/HiIntegration.js +3 -12
  287. package/es/hi-svg-icons/HiIntegrationMenu.js +3 -12
  288. package/es/hi-svg-icons/HiIntelligence.js +3 -12
  289. package/es/hi-svg-icons/HiIntelligenceMenu.js +3 -12
  290. package/es/hi-svg-icons/HiInvoice.js +3 -12
  291. package/es/hi-svg-icons/HiInvoiceMenu.js +3 -12
  292. package/es/hi-svg-icons/HiLogoRounded.js +5 -15
  293. package/es/hi-svg-icons/HiOrder.js +3 -12
  294. package/es/hi-svg-icons/HiPaymentOrder.js +3 -12
  295. package/es/hi-svg-icons/HiPermission.js +3 -12
  296. package/es/hi-svg-icons/HiPriceGrid.js +3 -12
  297. package/es/hi-svg-icons/HiPrivate.js +3 -12
  298. package/es/hi-svg-icons/HiRoute.js +3 -12
  299. package/es/hi-svg-icons/HiRouteMenu.js +3 -12
  300. package/es/hi-svg-icons/HiRouteSwitch.js +6 -17
  301. package/es/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
  302. package/es/hi-svg-icons/HiSettlement.js +3 -12
  303. package/es/hi-svg-icons/HiSizeLarge.js +3 -12
  304. package/es/hi-svg-icons/HiSizeMedium.js +3 -12
  305. package/es/hi-svg-icons/HiSizeSmall.js +3 -12
  306. package/es/hi-svg-icons/HiStore.js +3 -12
  307. package/es/hi-svg-icons/HiStoreMenu.js +3 -12
  308. package/es/hi-svg-icons/HiTransaction.js +3 -12
  309. package/es/hi-svg-icons/HiTransactionMenu.js +3 -12
  310. package/es/hi-svg-icons/HiUser.js +3 -12
  311. package/es/hi-svg-icons/HiVendor.js +3 -12
  312. package/es/hi-svg-icons/HiWidget.js +3 -12
  313. package/es/hi-svg-icons/index.js +0 -41
  314. package/es/hi-svg-images/HiLogo.js +3 -10
  315. package/es/hi-svg-images/HiLogoWhite.js +3 -10
  316. package/es/hi-svg-images/index.js +0 -3
  317. package/es/setupTest.js +2 -13
  318. package/es/styleguide/Wrapper.js +0 -6
  319. package/es/styles/MuiThemeProvider.js +11 -43
  320. package/es/styles/colorManipulator.js +15 -50
  321. package/es/styles/createBreakpoints.js +14 -28
  322. package/es/styles/createGenerateClassName.js +14 -24
  323. package/es/styles/createMixins.js +0 -5
  324. package/es/styles/createMuiTheme.js +10 -26
  325. package/es/styles/createPalette.js +65 -85
  326. package/es/styles/createStyles.js +0 -1
  327. package/es/styles/createTypography.js +15 -24
  328. package/es/styles/getStylesCreator.js +0 -12
  329. package/es/styles/getThemeProps.js +1 -5
  330. package/es/styles/index.js +0 -6
  331. package/es/styles/jssPreset.js +0 -9
  332. package/es/styles/makeStyles.js +0 -6
  333. package/es/styles/mergeClasses.js +4 -14
  334. package/es/styles/shadows.js +0 -2
  335. package/es/styles/spacing.js +0 -2
  336. package/es/styles/themeListener.js +0 -6
  337. package/es/styles/transitions.js +13 -22
  338. package/es/styles/withStyles.js +0 -6
  339. package/es/test-utils/createMount.js +2 -12
  340. package/es/test-utils/createRender.js +2 -9
  341. package/es/test-utils/createShallow.js +6 -17
  342. package/es/test-utils/getClasses.js +0 -2
  343. package/es/test-utils/index.js +0 -6
  344. package/es/test-utils/until.js +3 -14
  345. package/es/test-utils/unwrap.js +0 -1
  346. package/es/theme/palette.js +0 -4
  347. package/es/theme/typography.js +5 -12
  348. package/es/theme.js +0 -5
  349. package/es/transitions/utils.js +2 -5
  350. package/es/utils/exactProp.js +1 -9
  351. package/es/utils/helpers.js +19 -58
  352. package/es/withMobileDialog/index.js +0 -2
  353. package/es/withMobileDialog/withMobileDialog.js +2 -10
  354. package/hi-svg-icons/HiAccount.js +3 -12
  355. package/hi-svg-icons/HiActivity.js +3 -12
  356. package/hi-svg-icons/HiAll.js +6 -16
  357. package/hi-svg-icons/HiBilling.js +3 -12
  358. package/hi-svg-icons/HiBriefcaseRescue.js +3 -12
  359. package/hi-svg-icons/HiBusiness.js +3 -12
  360. package/hi-svg-icons/HiCatalog.js +3 -12
  361. package/hi-svg-icons/HiCustomer.js +3 -12
  362. package/hi-svg-icons/HiDownload.js +3 -12
  363. package/hi-svg-icons/HiFinance.js +3 -12
  364. package/hi-svg-icons/HiFinanceMenu.js +3 -12
  365. package/hi-svg-icons/HiHostedPaymentPage.js +3 -12
  366. package/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
  367. package/hi-svg-icons/HiIntegration.js +3 -12
  368. package/hi-svg-icons/HiIntegrationMenu.js +3 -12
  369. package/hi-svg-icons/HiIntelligence.js +3 -12
  370. package/hi-svg-icons/HiIntelligenceMenu.js +3 -12
  371. package/hi-svg-icons/HiInvoice.js +3 -12
  372. package/hi-svg-icons/HiInvoiceMenu.js +3 -12
  373. package/hi-svg-icons/HiLogoRounded.js +5 -15
  374. package/hi-svg-icons/HiOrder.js +3 -12
  375. package/hi-svg-icons/HiPaymentOrder.js +3 -12
  376. package/hi-svg-icons/HiPermission.js +3 -12
  377. package/hi-svg-icons/HiPriceGrid.js +3 -12
  378. package/hi-svg-icons/HiPrivate.js +3 -12
  379. package/hi-svg-icons/HiRoute.js +3 -12
  380. package/hi-svg-icons/HiRouteMenu.js +3 -12
  381. package/hi-svg-icons/HiRouteSwitch.js +6 -17
  382. package/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
  383. package/hi-svg-icons/HiSettlement.js +3 -12
  384. package/hi-svg-icons/HiSizeLarge.js +3 -12
  385. package/hi-svg-icons/HiSizeMedium.js +3 -12
  386. package/hi-svg-icons/HiSizeSmall.js +3 -12
  387. package/hi-svg-icons/HiStore.js +3 -12
  388. package/hi-svg-icons/HiStoreMenu.js +3 -12
  389. package/hi-svg-icons/HiTransaction.js +3 -12
  390. package/hi-svg-icons/HiTransactionMenu.js +3 -12
  391. package/hi-svg-icons/HiUser.js +3 -12
  392. package/hi-svg-icons/HiVendor.js +3 -12
  393. package/hi-svg-icons/HiWidget.js +3 -12
  394. package/hi-svg-icons/index.js +0 -41
  395. package/hi-svg-images/HiLogo.js +3 -10
  396. package/hi-svg-images/HiLogoWhite.js +3 -10
  397. package/hi-svg-images/index.js +0 -3
  398. package/package.json +4 -4
  399. package/setupTest.js +2 -13
  400. package/styleguide/Wrapper.js +0 -6
  401. package/styles/MuiThemeProvider.js +11 -43
  402. package/styles/colorManipulator.js +15 -50
  403. package/styles/createBreakpoints.js +14 -28
  404. package/styles/createGenerateClassName.js +14 -24
  405. package/styles/createMixins.js +0 -5
  406. package/styles/createMuiTheme.js +10 -26
  407. package/styles/createPalette.js +65 -85
  408. package/styles/createStyles.js +0 -1
  409. package/styles/createTypography.js +15 -24
  410. package/styles/getStylesCreator.js +0 -12
  411. package/styles/getThemeProps.js +1 -5
  412. package/styles/index.js +0 -6
  413. package/styles/jssPreset.js +0 -9
  414. package/styles/makeStyles.js +0 -6
  415. package/styles/mergeClasses.js +4 -14
  416. package/styles/shadows.js +0 -2
  417. package/styles/spacing.js +0 -2
  418. package/styles/themeListener.js +0 -6
  419. package/styles/transitions.js +13 -22
  420. package/styles/withStyles.js +0 -6
  421. package/test-utils/createMount.js +2 -12
  422. package/test-utils/createRender.js +2 -9
  423. package/test-utils/createShallow.js +6 -17
  424. package/test-utils/getClasses.js +0 -2
  425. package/test-utils/index.js +0 -6
  426. package/test-utils/until.js +3 -14
  427. package/test-utils/unwrap.js +0 -1
  428. package/theme/palette.js +0 -4
  429. package/theme/typography.js +5 -12
  430. package/theme.js +0 -5
  431. package/transitions/utils.js +2 -5
  432. package/utils/exactProp.js +1 -9
  433. package/utils/helpers.js +19 -58
  434. package/withMobileDialog/index.js +0 -2
  435. package/withMobileDialog/withMobileDialog.js +2 -10
@@ -1,74 +1,41 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.styles = exports.default = void 0;
9
-
10
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
11
-
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
-
14
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
15
-
16
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
17
-
18
12
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
19
-
20
13
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
21
-
22
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
23
-
24
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
25
-
26
16
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
27
-
28
17
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
29
-
30
18
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
31
-
32
19
  var _react = _interopRequireDefault(require("react"));
33
-
34
20
  var _reactCustomScrollbars = _interopRequireDefault(require("react-custom-scrollbars"));
35
-
36
21
  var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
37
-
38
22
  var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
39
-
40
23
  var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
41
-
42
24
  var _ClickAwayListener = _interopRequireDefault(require("@mui/material/ClickAwayListener"));
43
-
44
25
  var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
45
-
46
26
  var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
47
-
48
27
  var _HiSelectInput = _interopRequireDefault(require("./HiSelectInput"));
49
-
50
28
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
51
-
52
29
  var _helpers = require("../utils/helpers");
53
-
54
30
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
55
-
56
31
  var _keycode = _interopRequireDefault(require("keycode"));
57
-
58
32
  var _classnames = _interopRequireDefault(require("classnames"));
59
-
60
33
  var _HiAlertModal = _interopRequireDefault(require("../HiAlertModal"));
61
-
62
34
  var _reactDeviceDetect = require("react-device-detect");
63
-
64
35
  var _HiSelectMobile = _interopRequireDefault(require("./HiSelectMobile"));
65
-
66
36
  var _reactDom = require("react-dom");
67
-
68
37
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
69
-
70
38
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
71
-
72
39
  var styles = function styles(theme) {
73
40
  return {
74
41
  root: {
@@ -124,12 +91,11 @@ var styles = function styles(theme) {
124
91
  }
125
92
  };
126
93
  };
127
-
128
94
  exports.styles = styles;
129
-
130
95
  function filterValue(item, search) {
131
96
  return search === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(search.toLowerCase())) !== -1;
132
97
  }
98
+
133
99
  /**
134
100
  *
135
101
  * Utilisé pour tous types de selects dans les formulaires.
@@ -145,19 +111,21 @@ function filterValue(item, search) {
145
111
  * - HiSearchField : intègre une barre de recherche dans le Popper, il filtre la liste des suggestions
146
112
  * - HiSelectableList : affiche la liste des suggestions selon le type des éléments
147
113
  */
148
-
149
-
150
114
  var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
151
115
  (0, _inherits2.default)(HiSelect, _React$PureComponent);
152
-
153
116
  var _super = _createSuper(HiSelect);
154
-
155
117
  function HiSelect(_props) {
156
118
  var _this;
157
-
158
119
  (0, _classCallCheck2.default)(this, HiSelect);
159
120
  _this = _super.call(this, _props);
160
-
121
+ /**
122
+ * Build itemList & inputValue from select props
123
+ * @param options
124
+ * @param value
125
+ * @param search
126
+ * @param loading
127
+ * @returns {{itemList: *[], inputValue: *}}
128
+ */
161
129
  _this.buildSelectProps = function (options) {
162
130
  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
163
131
  var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
@@ -184,30 +152,25 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
184
152
  inputValue: _this.buildInputValue(options, value, loading)
185
153
  };
186
154
  };
187
-
188
155
  _this.findRecursively = function (arr, id) {
189
156
  for (var i = 0; i < arr.length; i++) {
190
157
  if (arr[i].id === id) {
191
158
  return arr[i];
192
159
  } else if (arr[i].children && arr[i].children.length) {
193
160
  var found = _this.findRecursively(arr[i].children, id);
194
-
195
161
  if (found) return found;
196
162
  }
197
163
  }
198
164
  };
199
-
200
165
  _this.buildInputValue = function (options) {
201
166
  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
202
167
  var loading = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
203
168
  var _this$props = _this.props,
204
- classes = _this$props.classes,
205
- hasAll = _this$props.hasAll,
206
- translations = _this$props.translations,
207
- type = _this$props.type; // build input value
208
-
169
+ classes = _this$props.classes,
170
+ hasAll = _this$props.hasAll,
171
+ translations = _this$props.translations,
172
+ type = _this$props.type; // build input value
209
173
  var inputValue;
210
-
211
174
  if (loading && value.length === 1) {
212
175
  inputValue = translations.one_item_selected;
213
176
  } else if (hasAll && options.length === value.length) {
@@ -217,7 +180,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
217
180
  inputValue = translations.n_items_selected.replace('%s', value.length);
218
181
  } else if (value.length === 1) {
219
182
  var item = _this.findRecursively(options, value[0]);
220
-
221
183
  if (item === undefined) {
222
184
  inputValue = translations.one_item_selected;
223
185
  } else if (type === 'icon' || item.type === 'icon') {
@@ -226,7 +188,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
226
188
  color: item.color
227
189
  };
228
190
  var icon;
229
-
230
191
  if (typeof item.icon === 'string') {
231
192
  icon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
232
193
  icon: item.icon
@@ -235,7 +196,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
235
196
  icon = (0, _objectSpread2.default)({}, item.icon);
236
197
  icon.props = (0, _objectSpread2.default)({}, icon.props, {}, iconProps);
237
198
  }
238
-
239
199
  inputValue = /*#__PURE__*/_react.default.createElement("span", {
240
200
  className: classes.selectIconLabel
241
201
  }, icon, item.label);
@@ -258,40 +218,31 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
258
218
  inputValue = item.label;
259
219
  }
260
220
  }
261
-
262
221
  return inputValue;
263
222
  };
264
-
265
223
  _this.focusOnFirstItem = function () {
266
224
  if (_this.overlay && _this.overlay.querySelector('li:not([tabindex^="-"])')) {
267
225
  setTimeout(function () {
268
226
  var item = _this.overlay.querySelector('li:not([tabindex^="-"])');
269
-
270
227
  item.focus();
271
228
  }, 1);
272
229
  }
273
230
  };
274
-
275
231
  _this.getInputElement = function (el) {
276
232
  _this.searchField = el;
277
-
278
233
  if (_this.props.inputRef) {
279
234
  _this.props.inputRef(_this.searchField);
280
235
  }
281
236
  };
282
-
283
237
  _this.handleBlur = function (event) {
284
238
  _this.handleSearchReset();
285
-
286
239
  _this.setState({
287
240
  focused: false
288
241
  });
289
-
290
242
  if (_this.props.onBlur && !_this.inputEl.contains(event.relatedTarget) && !_this.state.open) {
291
243
  _this.props.onBlur(event);
292
244
  }
293
245
  };
294
-
295
246
  _this.handleClick = function (event) {
296
247
  if (_this.state.open) {
297
248
  _this.handleClose();
@@ -305,11 +256,10 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
305
256
  open: true,
306
257
  alertOpen: false
307
258
  });
308
-
309
259
  _this.handleSuggestions(_this.props.options);
260
+ if (_this.props.onClick) _this.props.onClick();
310
261
 
311
- if (_this.props.onClick) _this.props.onClick(); // Gestion du focus
312
-
262
+ // Gestion du focus
313
263
  setTimeout(function () {
314
264
  if (!_this.props.searchable) {
315
265
  // Sinon focus sur l'élément sélectionné
@@ -318,38 +268,31 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
318
268
  }, 1);
319
269
  }
320
270
  };
321
-
322
271
  _this.handleSubmitAlert = function () {
323
272
  _this.handleClick();
324
273
  };
325
-
326
274
  _this.handleCancelAlert = function () {
327
275
  _this.handleClose();
328
276
  };
329
-
330
277
  _this.handleExitedAlert = function () {
331
278
  if (_this.searchField) {
332
279
  _this.searchField.focus();
333
280
  }
334
281
  };
335
-
336
282
  _this.handleCloseAlert = function () {
337
283
  _this.handleClose();
338
284
  };
339
-
340
285
  _this.focusOnSelectedItem = function (selectedValue) {
341
286
  if (_this.overlay && _this.overlay.querySelector('li:not([tabindex^="-"])')) {
342
287
  setTimeout(function () {
343
288
  if (_this.overlay) {
344
289
  // On initialise au premier élément pour être sûr de ne pas se retrouver avec un focus of undefined
345
290
  var item = _this.overlay.querySelector('li:not([tabindex^="-"])');
346
-
347
291
  if (selectedValue && typeof selectedValue === 'string') {
348
292
  item = _this.overlay.getElementsByTagName('li').namedItem(selectedValue);
349
293
  } else if (selectedValue && typeof selectedValue === 'number') {
350
294
  item = _this.overlay.querySelector('li:not([tabindex^="-"])')[selectedValue - 1];
351
295
  }
352
-
353
296
  if (item) {
354
297
  item.focus();
355
298
  }
@@ -357,70 +300,59 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
357
300
  }, 1);
358
301
  }
359
302
  };
360
-
361
303
  _this.handleClickAway = function (event) {
362
304
  // Au clic sur le bouton, on laisse le handleClick fermer le select
363
305
  if (!_this.inputEl.contains(event.target)) {
364
306
  _this.handleClose(event);
365
307
  }
366
308
  };
367
-
368
309
  _this.handleClose = function () {
369
310
  _this.handleSearchReset();
370
-
371
311
  _this.setState({
372
312
  open: false,
373
313
  alertOpen: false
374
314
  });
375
-
376
315
  if (_this.props.onClose) {
377
316
  _this.props.onClose();
378
317
  }
379
-
380
318
  if (_this.inputEl) {
381
319
  setTimeout(function () {
382
320
  _this.inputEl.focus();
383
321
  }, 100);
384
322
  }
385
323
  };
386
-
387
324
  _this.handleFocus = function () {
388
325
  _this.setState({
389
326
  focused: true
390
327
  });
391
328
  };
392
-
329
+ // Stop the propagation of the event before it reach the childrens
393
330
  _this.handleKeyDownCapture = function (event) {
394
331
  var key = (0, _keycode.default)(event);
395
-
396
332
  if (key === 'enter') {
397
333
  if (_this.state.open) {
398
334
  if (_this.props.multiple) {
399
335
  event.stopPropagation();
400
-
401
336
  _this.handleClose();
402
337
  }
403
338
  }
404
339
  }
405
340
  };
406
-
341
+ // Key down on input
407
342
  _this.handleKeyDown = function (event) {
408
343
  var key = (0, _keycode.default)(event);
409
-
410
344
  if (!_this.state.alertOpen) {
411
345
  if (event.target === _this.inputEl && _this.state.open && key === 'down') {
412
346
  // Focus on list 1st item
413
347
  event.stopPropagation();
414
348
  event.preventDefault();
415
349
  var firstLi = document.querySelector("#".concat(_this.props.id, " + div ul > li"));
416
-
417
350
  if (!!firstLi) {
418
351
  firstLi.focus();
419
352
  }
420
353
  } else if (key === 'esc' && _this.state.open) {
421
354
  event.stopPropagation();
422
355
  event.preventDefault();
423
-
424
356
  _this.handleClose();
425
357
  } else if (key === 'enter') {
426
358
  if (_this.state.open) {
@@ -432,7 +364,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
432
364
  event.preventDefault();
433
365
  } else if (key === 'tab' && (_this.state.open || _this.state.alertOpen)) {
434
366
  event.stopPropagation();
435
-
436
367
  _this.handleClose();
437
368
  } else if (key === 'down' && event.target.id.includes('_subheader')) {
438
369
  // Focus on parent, next item is child
@@ -441,7 +372,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
441
372
  }
442
373
  } else if (key === 'down' && !event.target.nextSibling) {
443
374
  var _document$getElementB, _document$getElementB2;
444
-
445
375
  // Focus on parent, next item is child
446
376
  if ((_document$getElementB = document.getElementById(event.target.dataset.group)) === null || _document$getElementB === void 0 ? void 0 : (_document$getElementB2 = _document$getElementB.nextSibling) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.nextSibling) {
447
377
  document.getElementById(event.target.dataset.group).nextSibling.nextSibling.focus();
@@ -459,15 +389,13 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
459
389
  }
460
390
  }
461
391
  };
462
-
392
+ // Key down on search input
463
393
  _this.handleKeyDownSearch = function (event) {
464
394
  var key = (0, _keycode.default)(event);
465
-
466
395
  if (_this.overlay && (key === 'down' || key === 'up')) {
467
396
  _this.focusOnFirstItem();
468
397
  } else if (_this.overlay && (key === 'esc' || key === 'enter')) {
469
398
  event.preventDefault();
470
-
471
399
  _this.handleClose();
472
400
  } else if (key === 'tab') {
473
401
  _this.setState({
@@ -475,21 +403,32 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
475
403
  });
476
404
  }
477
405
  };
478
-
406
+ /**
407
+ * Call onScrollReachBottom
408
+ * @param e
409
+ */
479
410
  _this.handleScroll = function (e) {
480
411
  if (e.target.scrollHeight - e.target.clientHeight - e.target.scrollTop < 15) {
481
412
  _this.props.onScrollReachBottom();
482
413
  }
483
414
  };
484
-
415
+ /**
416
+ * Call onChange with the updated value
417
+ *
418
+ * - handle single value
419
+ * - handle multiple value
420
+ * - handle '_all' id
421
+ *
422
+ * @param event
423
+ * @param item
424
+ */
485
425
  _this.handleSelect = function (event, item) {
486
426
  var _this$props2 = _this.props,
487
- hasAll = _this$props2.hasAll,
488
- multiple = _this$props2.multiple,
489
- onChange = _this$props2.onChange,
490
- options = _this$props2.options,
491
- value = _this$props2.value;
492
-
427
+ hasAll = _this$props2.hasAll,
428
+ multiple = _this$props2.multiple,
429
+ onChange = _this$props2.onChange,
430
+ options = _this$props2.options,
431
+ value = _this$props2.value;
493
432
  if (!multiple) {
494
433
  // This is a fix to prevent select open after select => TODO improve ?
495
434
  setTimeout(function () {
@@ -521,13 +460,17 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
521
460
  onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
522
461
  }
523
462
  };
524
-
463
+ /**
464
+ * Update suggestions list
465
+ * - add '_no_result' item if suggestion list is empty
466
+ * - add '_all' item if suggestion list is complete
467
+ * @param suggestions
468
+ */
525
469
  _this.handleSuggestions = function (suggestions) {
526
470
  var _this$props3 = _this.props,
527
- hasAll = _this$props3.hasAll,
528
- iconAll = _this$props3.iconAll,
529
- translations = _this$props3.translations;
530
-
471
+ hasAll = _this$props3.hasAll,
472
+ iconAll = _this$props3.iconAll,
473
+ translations = _this$props3.translations;
531
474
  if (suggestions.length === 0) {
532
475
  // Add '_no_result' suggestion
533
476
  _this.setState(function (prevState) {
@@ -554,10 +497,8 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
554
497
  });
555
498
  }
556
499
  };
557
-
558
500
  _this.handleSearch = function (e, inputValue) {
559
501
  var searchValue = inputValue && e.target.value ? inputValue : e.target.value;
560
-
561
502
  if (_this.props.onSearch) {
562
503
  _this.props.onSearch(e, searchValue);
563
504
  } else {
@@ -566,7 +507,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
566
507
  });
567
508
  }
568
509
  };
569
-
570
510
  _this.handleSearchReset = function () {
571
511
  _this.handleSearch({
572
512
  target: {
@@ -574,13 +514,11 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
574
514
  }
575
515
  }, '');
576
516
  };
577
-
578
517
  _this.getLengthItemList = function (itemList) {
579
518
  var itemListLength = 0;
580
519
  itemList.forEach(function (parent) {
581
520
  if (parent.displayed !== false) {
582
521
  itemListLength += 1;
583
-
584
522
  if (parent.children) {
585
523
  itemListLength += _this.getLengthItemList(parent.children);
586
524
  }
@@ -588,10 +526,9 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
588
526
  });
589
527
  return itemListLength;
590
528
  };
591
-
592
529
  _this.renderScrollbarTrackHorizontal = function (props) {
593
530
  var style = props.style,
594
- otherProps = (0, _objectWithoutProperties2.default)(props, ["style"]);
531
+ otherProps = (0, _objectWithoutProperties2.default)(props, ["style"]);
595
532
  var inlineStyle = (0, _objectSpread2.default)({}, style, {
596
533
  zIndex: 10,
597
534
  right: 2,
@@ -603,10 +540,9 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
603
540
  style: inlineStyle
604
541
  }));
605
542
  };
606
-
607
543
  _this.renderScrollbarTrackVertical = function (props) {
608
544
  var style = props.style,
609
- otherProps = (0, _objectWithoutProperties2.default)(props, ["style"]);
545
+ otherProps = (0, _objectWithoutProperties2.default)(props, ["style"]);
610
546
  var inlineStyle = (0, _objectSpread2.default)({}, style, {
611
547
  zIndex: 10,
612
548
  right: 2,
@@ -618,7 +554,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
618
554
  style: inlineStyle
619
555
  }));
620
556
  };
621
-
622
557
  _this.state = {
623
558
  alertOpen: false,
624
559
  open: false,
@@ -630,14 +565,12 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
630
565
  };
631
566
  return _this;
632
567
  }
633
-
634
568
  (0, _createClass2.default)(HiSelect, [{
635
569
  key: "componentDidMount",
636
570
  value: function componentDidMount() {
637
571
  if (this.props.autoFocus) {
638
572
  this.inputEl.focus();
639
573
  }
640
-
641
574
  if (this.overlay) {
642
575
  this.setState({
643
576
  overlayWidth: (0, _reactDom.findDOMNode)(this.overlay).clientWidth
@@ -648,75 +581,65 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
648
581
  key: "render",
649
582
  value: function render() {
650
583
  var _classNames,
651
- _this2 = this;
652
-
584
+ _this2 = this;
653
585
  var _this$props4 = this.props,
654
- alert = _this$props4.alert,
655
- classes = _this$props4.classes,
656
- disabled = _this$props4.disabled,
657
- error = _this$props4.error,
658
- loading = _this$props4.loading,
659
- options = _this$props4.options,
660
- searchable = _this$props4.searchable,
661
- displayAsChip = _this$props4.displayAsChip,
662
- type = _this$props4.type,
663
- value = _this$props4.value,
664
- multiple = _this$props4.multiple,
665
- translations = _this$props4.translations,
666
- hiSearchInputProps = _this$props4.hiSearchInputProps,
667
- hiSelectableListProps = _this$props4.hiSelectableListProps,
668
- hiSelectInputProps = _this$props4.hiSelectInputProps,
669
- id = _this$props4.id,
670
- onScrollReachBottom = _this$props4.onScrollReachBottom,
671
- onSubmit = _this$props4.onSubmit,
672
- placeholder = _this$props4.placeholder,
673
- _this$props4$searchVa = _this$props4.searchValue,
674
- searchValue = _this$props4$searchVa === void 0 ? this.state.searchValue : _this$props4$searchVa,
675
- startAdornment = _this$props4.startAdornment,
676
- staticPosition = _this$props4.staticPosition,
677
- maxOptionsDisplayed = _this$props4.maxOptionsDisplayed,
678
- _this$props4$buildSel = _this$props4.buildSelectProps,
679
- buildSelectProps = _this$props4$buildSel === void 0 ? this.buildSelectProps : _this$props4$buildSel;
586
+ alert = _this$props4.alert,
587
+ classes = _this$props4.classes,
588
+ disabled = _this$props4.disabled,
589
+ error = _this$props4.error,
590
+ loading = _this$props4.loading,
591
+ options = _this$props4.options,
592
+ searchable = _this$props4.searchable,
593
+ displayAsChip = _this$props4.displayAsChip,
594
+ type = _this$props4.type,
595
+ value = _this$props4.value,
596
+ multiple = _this$props4.multiple,
597
+ translations = _this$props4.translations,
598
+ hiSearchInputProps = _this$props4.hiSearchInputProps,
599
+ hiSelectableListProps = _this$props4.hiSelectableListProps,
600
+ hiSelectInputProps = _this$props4.hiSelectInputProps,
601
+ id = _this$props4.id,
602
+ onScrollReachBottom = _this$props4.onScrollReachBottom,
603
+ onSubmit = _this$props4.onSubmit,
604
+ placeholder = _this$props4.placeholder,
605
+ _this$props4$searchVa = _this$props4.searchValue,
606
+ searchValue = _this$props4$searchVa === void 0 ? this.state.searchValue : _this$props4$searchVa,
607
+ startAdornment = _this$props4.startAdornment,
608
+ staticPosition = _this$props4.staticPosition,
609
+ maxOptionsDisplayed = _this$props4.maxOptionsDisplayed,
610
+ _this$props4$buildSel = _this$props4.buildSelectProps,
611
+ buildSelectProps = _this$props4$buildSel === void 0 ? this.buildSelectProps : _this$props4$buildSel;
680
612
  var _this$state = this.state,
681
- alertOpen = _this$state.alertOpen,
682
- open = _this$state.open,
683
- focused = _this$state.focused;
684
-
613
+ alertOpen = _this$state.alertOpen,
614
+ open = _this$state.open,
615
+ focused = _this$state.focused;
685
616
  if (multiple) {
686
617
  if (!Array.isArray(value)) {
687
618
  throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
688
619
  }
689
620
  }
690
-
691
621
  var selectedItemIdList = [];
692
-
693
622
  if (value) {
694
623
  selectedItemIdList = multiple ? (0, _toConsumableArray2.default)(value) : [value];
695
624
  }
696
-
697
625
  var _buildSelectProps = buildSelectProps(options, selectedItemIdList, searchValue, loading),
698
- itemList = _buildSelectProps.itemList,
699
- _buildSelectProps$inp = _buildSelectProps.inputValue,
700
- inputValue = _buildSelectProps$inp === void 0 ? this.buildInputValue(options, selectedItemIdList, loading) : _buildSelectProps$inp;
701
-
626
+ itemList = _buildSelectProps.itemList,
627
+ _buildSelectProps$inp = _buildSelectProps.inputValue,
628
+ inputValue = _buildSelectProps$inp === void 0 ? this.buildInputValue(options, selectedItemIdList, loading) : _buildSelectProps$inp;
702
629
  var popperStyle = {
703
630
  position: staticPosition ? 'relative' : 'fix',
704
631
  top: 0,
705
632
  left: 0
706
633
  };
707
-
708
634
  if (this.props.containerWidth > 0) {
709
635
  popperStyle = {
710
636
  width: this.props.containerWidth
711
637
  };
712
-
713
638
  if (!staticPosition) {
714
639
  popperStyle.position = 'absolute';
715
640
  }
716
641
  }
717
-
718
642
  var popperClass = (0, _classnames.default)(classes.popper, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.popperWidth, !this.props.containerWidth), (0, _defineProperty2.default)(_classNames, classes.popperRightAlign, this.props.containerWidth && this.props.align === 'right'), _classNames));
719
-
720
643
  var searchInput = function searchInput(position) {
721
644
  if (searchable) {
722
645
  return /*#__PURE__*/_react.default.createElement(_HiInput.default, (0, _extends2.default)({
@@ -732,28 +655,24 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
732
655
  className: (0, _classnames.default)((0, _defineProperty2.default)({}, classes.separator, position === 'top'))
733
656
  }, hiSearchInputProps));
734
657
  }
735
-
736
658
  return null;
737
- }; // Replace popper onSearch when popper displayed on top of selectButton
738
-
659
+ };
739
660
 
661
+ // Replace popper onSearch when popper displayed on top of selectButton
740
662
  if (this.placement && this.placement.indexOf('top') >= 0 && !!searchable) {
741
663
  // In case we have a nested list
742
- var itemListLength = this.getLengthItemList(itemList); // +1 for search input
743
-
664
+ var itemListLength = this.getLengthItemList(itemList);
665
+ // +1 for search input
744
666
  var nbItems = itemListLength <= maxOptionsDisplayed - 2 ? itemListLength + 1 : maxOptionsDisplayed - 1;
745
667
  popperStyle.transform = "translate3d(-1px, -".concat(nbItems * 40 + 2, "px, 0px)");
746
668
  } else if (this.placement && this.placement.indexOf('top') < 0 && !!searchable) {
747
669
  popperStyle.transform = 'translate3d(-1px, 40px, 0px)';
748
670
  }
749
-
750
671
  var content = function content(_ref) {
751
672
  var placement = _ref.placement;
752
-
753
673
  if (placement !== _this2.placement) {
754
674
  _this2.placement = placement;
755
675
  }
756
-
757
676
  var nbItemsDisplayed = !!searchable ? maxOptionsDisplayed - 1 : maxOptionsDisplayed;
758
677
  var autoHeightMax = nbItemsDisplayed * 40 - 10;
759
678
  return /*#__PURE__*/_react.default.createElement(_ClickAwayListener.default, {
@@ -789,7 +708,6 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
789
708
  value: value
790
709
  }, hiSelectableListProps))), _this2.placement && _this2.placement.indexOf('top') >= 0 && !staticPosition && searchInput('top'))));
791
710
  };
792
-
793
711
  return !_reactDeviceDetect.isMobile ? /*#__PURE__*/_react.default.createElement("div", {
794
712
  className: classes.root,
795
713
  ref: function ref(el) {
@@ -878,22 +796,11 @@ var HiSelect = /*#__PURE__*/function (_React$PureComponent) {
878
796
  suggestions: nextProps.options
879
797
  });
880
798
  }
881
-
882
799
  return null;
883
800
  }
884
- /**
885
- * Build itemList & inputValue from select props
886
- * @param options
887
- * @param value
888
- * @param search
889
- * @param loading
890
- * @returns {{itemList: *[], inputValue: *}}
891
- */
892
-
893
801
  }]);
894
802
  return HiSelect;
895
803
  }(_react.default.PureComponent);
896
-
897
804
  HiSelect.defaultProps = {
898
805
  align: 'left',
899
806
  autoFocus: false,
@@ -921,10 +828,8 @@ HiSelect.defaultProps = {
921
828
  filterFunc: filterValue,
922
829
  maxOptionsDisplayed: 12
923
830
  };
924
-
925
831
  var _default = (0, _withStyles.default)(styles, {
926
832
  hiComponent: true,
927
833
  name: 'HmuiHiSelect'
928
834
  })(HiSelect);
929
-
930
835
  exports.default = _default;