@hipay/hipay-material-ui 3.15.2 → 3.15.3-beta.1

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