@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
package/HiForm/HiInput.js CHANGED
@@ -1,51 +1,30 @@
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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
11
-
12
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
13
-
14
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
15
-
16
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
17
-
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
19
-
20
13
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
21
-
22
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
23
-
24
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
25
-
26
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
27
-
28
17
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
29
-
30
18
  var _react = _interopRequireDefault(require("react"));
31
-
32
19
  var _classnames = _interopRequireDefault(require("classnames"));
33
-
34
20
  var _index = _interopRequireDefault(require("keycode/index"));
35
-
36
21
  var _Input = _interopRequireDefault(require("@mui/material/Input"));
37
-
38
22
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
39
-
40
23
  var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
41
-
42
24
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
43
-
44
25
  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); }; }
45
-
46
26
  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; } }
47
-
48
- var styles = function styles(theme) {
27
+ var styles = exports.styles = function styles(theme) {
49
28
  return {
50
29
  root: (0, _objectSpread2.default)({
51
30
  position: 'relative'
@@ -78,8 +57,8 @@ var styles = function styles(theme) {
78
57
  easing: theme.transitions.easing.easeOut
79
58
  }),
80
59
  pointerEvents: 'none' // Transparent to the hover style.
81
-
82
60
  },
61
+
83
62
  '&:not($error):hover:after': {
84
63
  transform: 'scaleX(1)'
85
64
  },
@@ -89,7 +68,7 @@ var styles = function styles(theme) {
89
68
  },
90
69
  focused: {},
91
70
  error: {
92
- border: "1px solid ".concat(theme.palette.negative.main),
71
+ border: "1px solid ".concat(theme.palette.error.main),
93
72
  paddingLeft: 8,
94
73
  borderRadius: 2
95
74
  },
@@ -160,44 +139,32 @@ var styles = function styles(theme) {
160
139
  }
161
140
  };
162
141
  };
163
-
164
- exports.styles = styles;
165
-
166
142
  var _ref = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
167
143
  icon: "close",
168
144
  size: 20,
169
145
  color: "neutral"
170
146
  });
171
-
172
147
  var HiInput = /*#__PURE__*/function (_React$PureComponent) {
173
148
  (0, _inherits2.default)(HiInput, _React$PureComponent);
174
-
175
149
  var _super = _createSuper(HiInput);
176
-
177
150
  function HiInput() {
178
151
  var _this;
179
-
180
152
  (0, _classCallCheck2.default)(this, HiInput);
181
153
  _this = _super.call(this);
182
-
183
154
  _this.handleKeyDown = function (event) {
184
155
  var key = (0, _index.default)(event);
185
-
186
156
  if (_this.props.onKeyDown) {
187
157
  _this.props.onKeyDown(event);
188
158
  }
189
-
190
159
  if (key === 'enter' && _this.props.onSubmit) {
191
160
  _this.props.onSubmit(event);
192
161
  }
193
162
  };
194
-
195
163
  _this.handleClick = function (event) {
196
164
  if (_this.props.onClick) {
197
165
  _this.props.onClick(event);
198
166
  }
199
167
  };
200
-
201
168
  _this.state = {
202
169
  focused: false
203
170
  };
@@ -212,12 +179,10 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
212
179
  _this.handleOverlayRef = _this.handleOverlayRef.bind((0, _assertThisInitialized2.default)(_this));
213
180
  return _this;
214
181
  }
215
-
216
182
  (0, _createClass2.default)(HiInput, [{
217
183
  key: "getInputElement",
218
184
  value: function getInputElement(el) {
219
185
  this.inputElement = el;
220
-
221
186
  if (this.props.customRef) {
222
187
  this.props.customRef(this.inputElement);
223
188
  } else if (this.props.inputRef) {
@@ -237,7 +202,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
237
202
  if (this.props.onReset) {
238
203
  this.props.onReset();
239
204
  }
240
-
241
205
  this.inputElement.focus();
242
206
  }
243
207
  }, {
@@ -253,14 +217,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
253
217
  } else if (this.endAdornmentNode.contains(event.relatedTarget) && this.props.onBlur) {
254
218
  this.props.onBlur(event);
255
219
  }
256
-
257
220
  event.preventDefault();
258
221
  event.stopPropagation();
259
222
  } else {
260
223
  this.setState({
261
224
  focused: false
262
225
  });
263
-
264
226
  if (this.props.onBlur) {
265
227
  this.props.onBlur(event);
266
228
  }
@@ -276,9 +238,8 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
276
238
  this.setState({
277
239
  focused: true
278
240
  });
279
- } // If focus came from erase icon => stay focused and don't call onFocus props
280
-
281
-
241
+ }
242
+ // If focus came from erase icon => stay focused and don't call onFocus props
282
243
  if (this.eraseIconNode && this.eraseIconNode.contains(event.relatedTarget)) {
283
244
  event.preventDefault();
284
245
  event.stopPropagation();
@@ -298,7 +259,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
298
259
  focused: true
299
260
  });
300
261
  }
301
-
302
262
  this.inputElement.focus();
303
263
  }
304
264
  }
@@ -320,7 +280,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
320
280
  key: "handleOverlayRef",
321
281
  value: function handleOverlayRef(el) {
322
282
  this.overlayNode = el;
323
-
324
283
  if (this.props.overlayRef) {
325
284
  this.props.overlayRef(el);
326
285
  }
@@ -328,34 +287,31 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
328
287
  }, {
329
288
  key: "render",
330
289
  value: function render() {
331
- var _classNames,
332
- _this2 = this,
333
- _classNames4;
334
-
290
+ var _this2 = this;
335
291
  var _this$props = this.props,
336
- value = _this$props.value,
337
- classes = _this$props.classes,
338
- placeholder = _this$props.placeholder,
339
- startAdornment = _this$props.startAdornment,
340
- endAdornmentProps = _this$props.endAdornment,
341
- className = _this$props.className,
342
- error = _this$props.error,
343
- type = _this$props.type,
344
- disabled = _this$props.disabled,
345
- autoComplete = _this$props.autoComplete,
346
- autoFocus = _this$props.autoFocus,
347
- inputId = _this$props.inputId,
348
- name = _this$props.name,
349
- multiline = _this$props.multiline,
350
- rows = _this$props.rows,
351
- inputClassName = _this$props.inputClassName,
352
- onReset = _this$props.onReset,
353
- spellcheck = _this$props.spellcheck,
354
- startAdornmentColor = _this$props.startAdornmentColor,
355
- inputProps = _this$props.inputProps;
292
+ value = _this$props.value,
293
+ classes = _this$props.classes,
294
+ placeholder = _this$props.placeholder,
295
+ startAdornment = _this$props.startAdornment,
296
+ endAdornmentProps = _this$props.endAdornment,
297
+ className = _this$props.className,
298
+ error = _this$props.error,
299
+ type = _this$props.type,
300
+ disabled = _this$props.disabled,
301
+ autoComplete = _this$props.autoComplete,
302
+ autoFocus = _this$props.autoFocus,
303
+ inputId = _this$props.inputId,
304
+ name = _this$props.name,
305
+ multiline = _this$props.multiline,
306
+ rows = _this$props.rows,
307
+ inputClassName = _this$props.inputClassName,
308
+ onReset = _this$props.onReset,
309
+ spellcheck = _this$props.spellcheck,
310
+ startAdornmentColor = _this$props.startAdornmentColor,
311
+ inputProps = _this$props.inputProps;
356
312
  var focused = this.state.focused;
357
313
  var overlayProps = (0, _objectSpread2.default)({
358
- className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled && !error), (0, _defineProperty2.default)(_classNames, classes.inkbar, !disabled), (0, _defineProperty2.default)(_classNames, classes.focused, focused), (0, _defineProperty2.default)(_classNames, classes.error, error), _classNames), className)
314
+ className: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.disabled, disabled && !error), classes.inkbar, !disabled), classes.focused, focused), classes.error, error), className)
359
315
  }, !disabled && {
360
316
  onClick: this.handleDivClick,
361
317
  onMouseEnter: this.handleMouseEnter,
@@ -364,16 +320,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
364
320
  ref: this.handleOverlayRef
365
321
  });
366
322
  var leftIcon;
367
-
368
323
  if (!!startAdornment) {
369
- var _classNames2;
370
-
371
324
  var leftIconProps = {
372
325
  color: startAdornmentColor,
373
326
  onClick: this.props.onLeftIconClick,
374
- className: (0, _classnames.default)(classes.startAdornment, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.startAdornmentDefaultColor, !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.startAdornmentFocus, focused && !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.startAdornmentDisabled, disabled && !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.iconPointer, this.props.onLeftIconClick), _classNames2))
327
+ className: (0, _classnames.default)(classes.startAdornment, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.startAdornmentDefaultColor, !startAdornmentColor), classes.startAdornmentFocus, focused && !startAdornmentColor), classes.startAdornmentDisabled, disabled && !startAdornmentColor), classes.iconPointer, this.props.onLeftIconClick))
375
328
  };
376
-
377
329
  if (typeof startAdornment === 'string') {
378
330
  leftIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
379
331
  icon: startAdornment
@@ -385,9 +337,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
385
337
  className: "".concat(leftIconProps.className, " ").concat(leftIcon.props.className)
386
338
  });
387
339
  }
388
- } // Build endAdornment with eraseIcon + endAdornmentProps
389
-
340
+ }
390
341
 
342
+ // Build endAdornment with eraseIcon + endAdornmentProps
391
343
  var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && /*#__PURE__*/_react.default.createElement(_HiIconButton.default, {
392
344
  className: classes.eraseButton,
393
345
  classes: {
@@ -399,21 +351,16 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
399
351
  _this2.eraseIconNode = el;
400
352
  }
401
353
  }, _ref);
402
-
403
354
  var endAdornment = endAdornmentProps;
404
-
405
355
  if (typeof endAdornmentProps === 'string' && endAdornmentProps !== '') {
406
- var _classNames3;
407
-
408
356
  endAdornment = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
409
357
  icon: endAdornmentProps,
410
358
  size: 20,
411
359
  color: "neutral",
412
360
  onClick: this.props.onRightIconClick,
413
- className: (0, _classnames.default)(classes.rightIcon, (_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, classes.rightIconFocus, focused), (0, _defineProperty2.default)(_classNames3, classes.rightIconDisabled, disabled), (0, _defineProperty2.default)(_classNames3, classes.rightIconError, error), (0, _defineProperty2.default)(_classNames3, classes.iconPointer, this.props.onRightIconClick), _classNames3))
361
+ className: (0, _classnames.default)(classes.rightIcon, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.rightIconFocus, focused), classes.rightIconDisabled, disabled), classes.rightIconError, error), classes.iconPointer, this.props.onRightIconClick))
414
362
  });
415
363
  }
416
-
417
364
  return /*#__PURE__*/_react.default.createElement("div", overlayProps, /*#__PURE__*/_react.default.createElement(_Input.default, {
418
365
  id: inputId,
419
366
  type: type,
@@ -443,7 +390,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
443
390
  }, eraseIcon, endAdornment),
444
391
  inputProps: (0, _objectSpread2.default)({
445
392
  spellCheck: spellcheck ? 'true' : 'false',
446
- className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, classes.inputText, !multiline), (0, _defineProperty2.default)(_classNames4, classes.inputTextArea, multiline), _classNames4))
393
+ className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.inputText, !multiline), classes.inputTextArea, multiline))
447
394
  }, inputProps)
448
395
  }));
449
396
  }
@@ -455,13 +402,11 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
455
402
  focused: nextProps.focused
456
403
  };
457
404
  }
458
-
459
405
  return null;
460
406
  }
461
407
  }]);
462
408
  return HiInput;
463
409
  }(_react.default.PureComponent);
464
-
465
410
  HiInput.defaultProps = {
466
411
  value: '',
467
412
  placeholder: '',
@@ -475,10 +420,7 @@ HiInput.defaultProps = {
475
420
  onlyNumbers: false,
476
421
  spellcheck: false
477
422
  };
478
-
479
- var _default = (0, _withStyles.default)(styles, {
423
+ var _default = exports.default = (0, _withStyles.default)(styles, {
480
424
  hiComponent: true,
481
425
  name: 'HiMuiHiInput'
482
- })(HiInput);
483
-
484
- exports.default = _default;
426
+ })(HiInput);
@@ -1,45 +1,27 @@
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
-
12
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
-
14
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
15
-
16
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
17
-
18
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
19
-
20
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
21
-
22
14
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
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 _react = _interopRequireDefault(require("react"));
31
-
32
19
  var _classnames = _interopRequireDefault(require("classnames"));
33
-
34
20
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
35
-
36
21
  var _HiTextField = _interopRequireDefault(require("./HiTextField"));
37
-
38
22
  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); }; }
39
-
40
- 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; } }
41
-
42
- var styles = function styles() {
23
+ 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; } } // @inheritedComponent HiTextField
24
+ var styles = exports.styles = function styles() {
43
25
  return {
44
26
  inputPassword: {
45
27
  fontWeight: 'bolder',
@@ -49,21 +31,15 @@ var styles = function styles() {
49
31
  }
50
32
  };
51
33
  };
34
+
52
35
  /**
53
36
  * Champs input email pour formulaire
54
37
  */
55
-
56
-
57
- exports.styles = styles;
58
-
59
38
  var HiPasswordField = /*#__PURE__*/function (_React$Component) {
60
39
  (0, _inherits2.default)(HiPasswordField, _React$Component);
61
-
62
40
  var _super = _createSuper(HiPasswordField);
63
-
64
41
  function HiPasswordField(props) {
65
42
  var _this;
66
-
67
43
  (0, _classCallCheck2.default)(this, HiPasswordField);
68
44
  _this = _super.call(this, props);
69
45
  _this.state = {
@@ -72,7 +48,6 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
72
48
  _this.handlePasswordToggle = _this.handlePasswordToggle.bind((0, _assertThisInitialized2.default)(_this));
73
49
  return _this;
74
50
  }
75
-
76
51
  (0, _createClass2.default)(HiPasswordField, [{
77
52
  key: "handlePasswordToggle",
78
53
  value: function handlePasswordToggle() {
@@ -86,9 +61,9 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
86
61
  key: "render",
87
62
  value: function render() {
88
63
  var _this$props = this.props,
89
- classes = _this$props.classes,
90
- HiInputProps = _this$props.HiInputProps,
91
- otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps"]);
64
+ classes = _this$props.classes,
65
+ HiInputProps = _this$props.HiInputProps,
66
+ otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps"]);
92
67
  var endAdornment = this.state.showText ? 'visibility_off' : 'visibility';
93
68
  var type = this.state.showText ? 'text' : 'password';
94
69
  var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, classes.inputPassword, !this.state.showText && otherProps.value !== ""));
@@ -107,10 +82,7 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
107
82
  }]);
108
83
  return HiPasswordField;
109
84
  }(_react.default.Component);
110
-
111
- var _default = (0, _withStyles.default)(styles, {
85
+ var _default = exports.default = (0, _withStyles.default)(styles, {
112
86
  hiComponent: true,
113
87
  name: 'HmuiHiPasswordField'
114
- })(HiPasswordField);
115
-
116
- exports.default = _default;
88
+ })(HiPasswordField);
@@ -1,36 +1,22 @@
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.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
-
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
-
14
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
15
-
16
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
17
-
18
12
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
19
-
20
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
21
-
22
14
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
23
-
24
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
25
-
26
16
  var _react = _interopRequireDefault(require("react"));
27
-
28
17
  var _HiInput = _interopRequireDefault(require("./HiInput"));
29
-
30
18
  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); }; }
31
-
32
19
  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; } }
33
-
34
20
  /**
35
21
  * Construit une barre de recherche avec icône Search (Magnify),
36
22
  * permet de filtrer une liste d'éléments en spécifiant le nom de la/les propriétés sur lesquelles filtrer,
@@ -39,12 +25,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
39
25
  */
40
26
  var HiSearchField = /*#__PURE__*/function (_React$Component) {
41
27
  (0, _inherits2.default)(HiSearchField, _React$Component);
42
-
43
28
  var _super = _createSuper(HiSearchField);
44
-
45
29
  function HiSearchField(props) {
46
30
  var _this;
47
-
48
31
  (0, _classCallCheck2.default)(this, HiSearchField);
49
32
  _this = _super.call(this, props);
50
33
  _this.state = {
@@ -55,7 +38,6 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
55
38
  _this.handleReset = _this.handleReset.bind((0, _assertThisInitialized2.default)(_this));
56
39
  return _this;
57
40
  }
58
-
59
41
  (0, _createClass2.default)(HiSearchField, [{
60
42
  key: "filterOnProperties",
61
43
  value: function filterOnProperties(item, search) {
@@ -63,17 +45,14 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
63
45
  // If no properties specify, search on item
64
46
  return item.toString().toLowerCase().search(search.toLowerCase()) !== -1;
65
47
  }
66
-
67
48
  var searchSucceed = false;
68
49
  this.props.filterPropertyList.forEach(function (filter) {
69
50
  var itemProperty = null;
70
-
71
51
  if (filter.indexOf('.') > 0) {
72
52
  itemProperty = item[filter.split('.')[0]][filter.split('.')[1]];
73
53
  } else {
74
54
  itemProperty = item[filter];
75
55
  }
76
-
77
56
  if (itemProperty.toString().toLowerCase().search(search.toLowerCase()) !== -1) {
78
57
  searchSucceed = true;
79
58
  }
@@ -84,35 +63,28 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
84
63
  key: "handleChange",
85
64
  value: function handleChange(event, inputValue) {
86
65
  var _this2 = this;
87
-
88
66
  var searchedValue;
89
-
90
67
  if (typeof inputValue !== 'undefined' && typeof event.target.value === 'undefined') {
91
68
  searchedValue = inputValue;
92
69
  } else {
93
70
  searchedValue = event.target.value;
94
71
  }
95
-
96
72
  this.setState({
97
73
  inputValue: searchedValue
98
74
  });
99
-
100
75
  if (this.props.onSearch === undefined) {
101
76
  var currentParent = null;
102
77
  var filteredList = [];
103
78
  this.props.itemList.forEach(function (item) {
104
79
  var add = _this2.filterOnProperties(item, searchedValue);
105
-
106
80
  if (item.hasChildren === true && add === false) {
107
81
  currentParent = item;
108
82
  }
109
-
110
83
  if (add === true) {
111
84
  if (currentParent !== null && item.parentId === currentParent.id) {
112
85
  filteredList.push(currentParent);
113
86
  currentParent = null;
114
87
  }
115
-
116
88
  filteredList.push(item);
117
89
  }
118
90
  });
@@ -127,7 +99,6 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
127
99
  this.setState({
128
100
  inputValue: ''
129
101
  });
130
-
131
102
  if (typeof this.props.onSearch === 'undefined') {
132
103
  this.props.onFilteredList(this.props.itemList);
133
104
  } else {
@@ -138,8 +109,8 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
138
109
  key: "render",
139
110
  value: function render() {
140
111
  var _this$props = this.props,
141
- placeholder = _this$props.placeholder,
142
- others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
112
+ placeholder = _this$props.placeholder,
113
+ others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
143
114
  return /*#__PURE__*/_react.default.createElement(_HiInput.default, (0, _extends2.default)({
144
115
  placeholder: placeholder,
145
116
  onReset: this.handleReset,
@@ -151,9 +122,7 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
151
122
  }]);
152
123
  return HiSearchField;
153
124
  }(_react.default.Component);
154
-
155
125
  HiSearchField.defaultProps = {
156
126
  placeholder: 'Search'
157
127
  };
158
- var _default = HiSearchField;
159
- exports.default = _default;
128
+ var _default = exports.default = HiSearchField;