@hipay/hipay-material-ui 4.0.0 → 4.0.1-beta5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/HiAccordion/HiAccordion.js +26 -8
  2. package/HiAccordion/index.js +5 -1
  3. package/HiAccordionActions/HiAccordionActions.js +14 -1
  4. package/HiAccordionActions/index.js +5 -1
  5. package/HiAccordionSummary/HiAccordionSummary.js +15 -1
  6. package/HiAccordionSummary/index.js +5 -1
  7. package/HiAlertModal/HiAlertModal.js +22 -7
  8. package/HiAlertModal/index.js +5 -1
  9. package/HiAppBar/HiAppBar.js +42 -11
  10. package/HiAppBar/index.js +2 -0
  11. package/HiAvatar/HiAvatar.js +12 -3
  12. package/HiAvatar/index.js +2 -0
  13. package/HiBadge/HiBadge.js +24 -8
  14. package/HiBadge/index.js +2 -0
  15. package/HiBreadcrumb/HiBreadcrumb.js +30 -6
  16. package/HiBreadcrumb/HiStep.js +45 -13
  17. package/HiBreadcrumb/HiStepConnector.js +49 -14
  18. package/HiBreadcrumb/HiStepContent.js +30 -6
  19. package/HiBreadcrumb/HiStepIcon.js +35 -10
  20. package/HiBreadcrumb/HiStepLabel.js +44 -14
  21. package/HiBreadcrumb/HiStepper.js +30 -6
  22. package/HiBreadcrumb/index.js +2 -0
  23. package/HiButton/HiButton.js +33 -8
  24. package/HiButton/index.js +5 -1
  25. package/HiCell/CellAddress.js +33 -12
  26. package/HiCell/CellDate.js +36 -10
  27. package/HiCell/CellHiddenContent.js +30 -8
  28. package/HiCell/CellIcon.js +36 -12
  29. package/HiCell/CellImage.js +34 -12
  30. package/HiCell/CellNumeric.js +40 -13
  31. package/HiCell/CellPinToAction.js +33 -9
  32. package/HiCell/CellRate.js +47 -13
  33. package/HiCell/CellSentinel.js +33 -12
  34. package/HiCell/CellSentinelScore.js +31 -9
  35. package/HiCell/CellText.js +52 -16
  36. package/HiCell/CellTextStyled.js +24 -13
  37. package/HiCell/index.js +10 -0
  38. package/HiCheckbox/HiCheckbox.js +52 -15
  39. package/HiCheckbox/index.js +2 -0
  40. package/HiChip/HiChip.js +47 -24
  41. package/HiChip/HiChipSwitch.js +59 -16
  42. package/HiChip/index.js +3 -0
  43. package/HiColoredLabel/HiColoredLabel.js +49 -15
  44. package/HiColoredLabel/index.js +2 -0
  45. package/HiDatePicker/Caption.js +21 -9
  46. package/HiDatePicker/HiDatePicker.js +88 -16
  47. package/HiDatePicker/HiDatePickerMobile.js +43 -18
  48. package/HiDatePicker/HiDateRangePicker.js +134 -38
  49. package/HiDatePicker/HiDateRangeSelector.js +130 -49
  50. package/HiDatePicker/ListPicker.js +38 -8
  51. package/HiDatePicker/NavBar.js +31 -12
  52. package/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
  53. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
  54. package/HiDatePicker/Overlays/MonthPickerOverlay.js +26 -4
  55. package/HiDatePicker/Overlays/Overlay.js +25 -8
  56. package/HiDatePicker/Overlays/TimePickerOverlay.js +39 -8
  57. package/HiDatePicker/Overlays/YearPickerOverlay.js +31 -8
  58. package/HiDatePicker/Overlays/index.js +6 -0
  59. package/HiDatePicker/Weekday.js +9 -4
  60. package/HiDatePicker/hiLocaleUtils.js +20 -8
  61. package/HiDatePicker/index.js +2 -0
  62. package/HiDatePicker/stylesheet.js +13 -7
  63. package/HiDialog/HiDialog.js +19 -7
  64. package/HiDialog/index.js +2 -0
  65. package/HiDotsStepper/HiDot.js +37 -8
  66. package/HiDotsStepper/HiDotsStepper.js +37 -10
  67. package/HiDotsStepper/index.js +3 -0
  68. package/HiExpansionPanel/HiExpansionPanel.js +38 -16
  69. package/HiExpansionPanel/index.js +5 -1
  70. package/HiForm/HiAddressField.js +36 -10
  71. package/HiForm/HiEmailField.js +29 -5
  72. package/HiForm/HiFormControl.js +74 -28
  73. package/HiForm/HiFormLabel.js +41 -15
  74. package/HiForm/HiInput.js +91 -33
  75. package/HiForm/HiPasswordField.js +46 -9
  76. package/HiForm/HiSearchField.js +34 -3
  77. package/HiForm/HiSlider.js +57 -22
  78. package/HiForm/HiTextField.js +47 -22
  79. package/HiForm/HiUpload.js +89 -29
  80. package/HiForm/HiUploadField.js +32 -10
  81. package/HiForm/HiUploadInput.js +76 -23
  82. package/HiForm/index.js +12 -0
  83. package/HiIcon/HiIcon.js +34 -9
  84. package/HiIcon/index.js +2 -0
  85. package/HiIconButton/HiIconButton.js +21 -6
  86. package/HiIconButton/index.js +2 -0
  87. package/HiListItemLink/HiListItemLink.js +19 -7
  88. package/HiListItemLink/index.js +2 -0
  89. package/HiLoader/HiLoader.js +16 -6
  90. package/HiLoader/index.js +2 -0
  91. package/HiNotice/HiKPI.js +47 -16
  92. package/HiNotice/HiKPINotice.js +16 -6
  93. package/HiNotice/index.js +3 -0
  94. package/HiPagination/HiPagination.js +11 -1
  95. package/HiPagination/index.js +2 -0
  96. package/HiPaymentMeans/HiPaymentMeans.js +72 -31
  97. package/HiPaymentMeans/index.js +2 -0
  98. package/HiPdfReader/HiPdfReader.js +57 -24
  99. package/HiPdfReader/index.js +2 -0
  100. package/HiPin/HiPin.js +19 -7
  101. package/HiPin/index.js +2 -0
  102. package/HiRadio/HiRadio.js +22 -11
  103. package/HiRadio/index.js +2 -0
  104. package/HiScrollStepper/HiScrollStepper.js +67 -29
  105. package/HiScrollStepper/index.js +2 -0
  106. package/HiSelect/HiDynamicSelect.js +42 -32
  107. package/HiSelect/HiDynamicSelectField.js +48 -24
  108. package/HiSelect/HiNestedSelect.js +111 -65
  109. package/HiSelect/HiNestedSelectContent.js +86 -60
  110. package/HiSelect/HiNestedSelectField.js +48 -24
  111. package/HiSelect/HiSelect.js +187 -89
  112. package/HiSelect/HiSelectContent.js +97 -62
  113. package/HiSelect/HiSelectField.js +49 -25
  114. package/HiSelect/HiSelectInput.js +76 -23
  115. package/HiSelect/HiSelectMobile.js +44 -7
  116. package/HiSelect/HiSuggestSelect.js +81 -25
  117. package/HiSelect/HiSuggestSelectField.js +39 -15
  118. package/HiSelect/index.js +14 -2
  119. package/HiSelectableList/HiSelectableList.js +90 -34
  120. package/HiSelectableList/HiSelectableListHierarchic.js +60 -34
  121. package/HiSelectableList/HiSelectableListItem.js +88 -45
  122. package/HiSelectableList/index.js +4 -0
  123. package/HiStepper/DefaultIndicator.js +10 -1
  124. package/HiStepper/HiStep.js +48 -18
  125. package/HiStepper/HiStepper.js +15 -2
  126. package/HiStepper/index.js +3 -0
  127. package/HiSwitch/HiSwitch.js +33 -9
  128. package/HiSwitch/HiSwitchState.js +32 -15
  129. package/HiSwitch/index.js +3 -0
  130. package/HiTable/HiCellBuilder.js +65 -10
  131. package/HiTable/HiTable.js +48 -20
  132. package/HiTable/HiTableBody.js +24 -7
  133. package/HiTable/HiTableHeader.js +51 -18
  134. package/HiTable/HiTableRow.js +46 -12
  135. package/HiTable/constants.js +98 -48
  136. package/HiTable/index.js +2 -0
  137. package/es/HiAccordion/HiAccordion.js +26 -8
  138. package/es/HiAccordion/index.js +5 -1
  139. package/es/HiAccordionActions/HiAccordionActions.js +14 -1
  140. package/es/HiAccordionActions/index.js +5 -1
  141. package/es/HiAccordionSummary/HiAccordionSummary.js +15 -1
  142. package/es/HiAccordionSummary/index.js +5 -1
  143. package/es/HiAlertModal/HiAlertModal.js +22 -7
  144. package/es/HiAlertModal/index.js +5 -1
  145. package/es/HiAppBar/HiAppBar.js +42 -11
  146. package/es/HiAppBar/index.js +2 -0
  147. package/es/HiAvatar/HiAvatar.js +12 -3
  148. package/es/HiAvatar/index.js +2 -0
  149. package/es/HiBadge/HiBadge.js +24 -8
  150. package/es/HiBadge/index.js +2 -0
  151. package/es/HiBreadcrumb/HiBreadcrumb.js +30 -6
  152. package/es/HiBreadcrumb/HiStep.js +45 -13
  153. package/es/HiBreadcrumb/HiStepConnector.js +49 -14
  154. package/es/HiBreadcrumb/HiStepContent.js +30 -6
  155. package/es/HiBreadcrumb/HiStepIcon.js +35 -10
  156. package/es/HiBreadcrumb/HiStepLabel.js +44 -14
  157. package/es/HiBreadcrumb/HiStepper.js +30 -6
  158. package/es/HiBreadcrumb/index.js +2 -0
  159. package/es/HiButton/HiButton.js +33 -8
  160. package/es/HiButton/index.js +5 -1
  161. package/es/HiCell/CellAddress.js +33 -12
  162. package/es/HiCell/CellDate.js +36 -10
  163. package/es/HiCell/CellHiddenContent.js +30 -8
  164. package/es/HiCell/CellIcon.js +36 -12
  165. package/es/HiCell/CellImage.js +34 -12
  166. package/es/HiCell/CellNumeric.js +40 -13
  167. package/es/HiCell/CellPinToAction.js +33 -9
  168. package/es/HiCell/CellRate.js +47 -13
  169. package/es/HiCell/CellSentinel.js +33 -12
  170. package/es/HiCell/CellSentinelScore.js +31 -9
  171. package/es/HiCell/CellText.js +52 -16
  172. package/es/HiCell/CellTextStyled.js +24 -13
  173. package/es/HiCell/index.js +10 -0
  174. package/es/HiCheckbox/HiCheckbox.js +52 -15
  175. package/es/HiCheckbox/index.js +2 -0
  176. package/es/HiChip/HiChip.js +47 -24
  177. package/es/HiChip/HiChipSwitch.js +59 -16
  178. package/es/HiChip/index.js +3 -0
  179. package/es/HiColoredLabel/HiColoredLabel.js +49 -15
  180. package/es/HiColoredLabel/index.js +2 -0
  181. package/es/HiDatePicker/Caption.js +21 -9
  182. package/es/HiDatePicker/HiDatePicker.js +88 -16
  183. package/es/HiDatePicker/HiDatePickerMobile.js +43 -18
  184. package/es/HiDatePicker/HiDateRangePicker.js +134 -38
  185. package/es/HiDatePicker/HiDateRangeSelector.js +130 -49
  186. package/es/HiDatePicker/ListPicker.js +38 -8
  187. package/es/HiDatePicker/NavBar.js +31 -12
  188. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
  189. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
  190. package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +26 -4
  191. package/es/HiDatePicker/Overlays/Overlay.js +25 -8
  192. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +39 -8
  193. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +31 -8
  194. package/es/HiDatePicker/Overlays/index.js +6 -0
  195. package/es/HiDatePicker/Weekday.js +9 -4
  196. package/es/HiDatePicker/hiLocaleUtils.js +20 -8
  197. package/es/HiDatePicker/index.js +2 -0
  198. package/es/HiDatePicker/stylesheet.js +13 -7
  199. package/es/HiDialog/HiDialog.js +19 -7
  200. package/es/HiDialog/index.js +2 -0
  201. package/es/HiDotsStepper/HiDot.js +37 -8
  202. package/es/HiDotsStepper/HiDotsStepper.js +37 -10
  203. package/es/HiDotsStepper/index.js +3 -0
  204. package/es/HiExpansionPanel/HiExpansionPanel.js +38 -16
  205. package/es/HiExpansionPanel/index.js +5 -1
  206. package/es/HiForm/HiAddressField.js +36 -10
  207. package/es/HiForm/HiEmailField.js +29 -5
  208. package/es/HiForm/HiFormControl.js +74 -28
  209. package/es/HiForm/HiFormLabel.js +41 -15
  210. package/es/HiForm/HiInput.js +91 -33
  211. package/es/HiForm/HiPasswordField.js +46 -9
  212. package/es/HiForm/HiSearchField.js +34 -3
  213. package/es/HiForm/HiSlider.js +57 -22
  214. package/es/HiForm/HiTextField.js +47 -22
  215. package/es/HiForm/HiUpload.js +89 -29
  216. package/es/HiForm/HiUploadField.js +32 -10
  217. package/es/HiForm/HiUploadInput.js +76 -23
  218. package/es/HiForm/index.js +12 -0
  219. package/es/HiIcon/HiIcon.js +34 -9
  220. package/es/HiIcon/index.js +2 -0
  221. package/es/HiIconButton/HiIconButton.js +21 -6
  222. package/es/HiIconButton/index.js +2 -0
  223. package/es/HiListItemLink/HiListItemLink.js +19 -7
  224. package/es/HiListItemLink/index.js +2 -0
  225. package/es/HiLoader/HiLoader.js +16 -6
  226. package/es/HiLoader/index.js +2 -0
  227. package/es/HiNotice/HiKPI.js +47 -16
  228. package/es/HiNotice/HiKPINotice.js +16 -6
  229. package/es/HiNotice/index.js +3 -0
  230. package/es/HiPagination/HiPagination.js +11 -1
  231. package/es/HiPagination/index.js +2 -0
  232. package/es/HiPaymentMeans/HiPaymentMeans.js +72 -31
  233. package/es/HiPaymentMeans/index.js +2 -0
  234. package/es/HiPdfReader/HiPdfReader.js +57 -24
  235. package/es/HiPdfReader/index.js +2 -0
  236. package/es/HiPin/HiPin.js +19 -7
  237. package/es/HiPin/index.js +2 -0
  238. package/es/HiRadio/HiRadio.js +22 -11
  239. package/es/HiRadio/index.js +2 -0
  240. package/es/HiScrollStepper/HiScrollStepper.js +67 -29
  241. package/es/HiScrollStepper/index.js +2 -0
  242. package/es/HiSelect/HiDynamicSelect.js +42 -32
  243. package/es/HiSelect/HiDynamicSelectField.js +48 -24
  244. package/es/HiSelect/HiNestedSelect.js +111 -65
  245. package/es/HiSelect/HiNestedSelectContent.js +86 -60
  246. package/es/HiSelect/HiNestedSelectField.js +48 -24
  247. package/es/HiSelect/HiSelect.js +187 -89
  248. package/es/HiSelect/HiSelectContent.js +97 -62
  249. package/es/HiSelect/HiSelectField.js +49 -25
  250. package/es/HiSelect/HiSelectInput.js +76 -23
  251. package/es/HiSelect/HiSelectMobile.js +44 -7
  252. package/es/HiSelect/HiSuggestSelect.js +81 -25
  253. package/es/HiSelect/HiSuggestSelectField.js +39 -15
  254. package/es/HiSelect/index.js +14 -2
  255. package/es/HiSelectableList/HiSelectableList.js +90 -34
  256. package/es/HiSelectableList/HiSelectableListHierarchic.js +60 -34
  257. package/es/HiSelectableList/HiSelectableListItem.js +88 -45
  258. package/es/HiSelectableList/index.js +4 -0
  259. package/es/HiStepper/DefaultIndicator.js +10 -1
  260. package/es/HiStepper/HiStep.js +48 -18
  261. package/es/HiStepper/HiStepper.js +15 -2
  262. package/es/HiStepper/index.js +3 -0
  263. package/es/HiSwitch/HiSwitch.js +33 -9
  264. package/es/HiSwitch/HiSwitchState.js +32 -15
  265. package/es/HiSwitch/index.js +3 -0
  266. package/es/HiTable/HiCellBuilder.js +65 -10
  267. package/es/HiTable/HiTable.js +48 -20
  268. package/es/HiTable/HiTableBody.js +24 -7
  269. package/es/HiTable/HiTableHeader.js +51 -18
  270. package/es/HiTable/HiTableRow.js +46 -12
  271. package/es/HiTable/constants.js +98 -48
  272. package/es/HiTable/index.js +2 -0
  273. package/es/hi-svg-icons/HiAccount.js +14 -4
  274. package/es/hi-svg-icons/HiActivity.js +14 -4
  275. package/es/hi-svg-icons/HiAll.js +18 -7
  276. package/es/hi-svg-icons/HiBilling.js +14 -4
  277. package/es/hi-svg-icons/HiBriefcaseRescue.js +14 -4
  278. package/es/hi-svg-icons/HiBusiness.js +14 -4
  279. package/es/hi-svg-icons/HiCatalog.js +14 -4
  280. package/es/hi-svg-icons/HiCustomer.js +14 -4
  281. package/es/hi-svg-icons/HiDownload.js +14 -4
  282. package/es/hi-svg-icons/HiFinance.js +14 -4
  283. package/es/hi-svg-icons/HiFinanceMenu.js +14 -4
  284. package/es/hi-svg-icons/HiHostedPaymentPage.js +14 -4
  285. package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
  286. package/es/hi-svg-icons/HiIntegration.js +14 -4
  287. package/es/hi-svg-icons/HiIntegrationMenu.js +14 -4
  288. package/es/hi-svg-icons/HiIntelligence.js +14 -4
  289. package/es/hi-svg-icons/HiIntelligenceMenu.js +14 -4
  290. package/es/hi-svg-icons/HiInvoice.js +14 -4
  291. package/es/hi-svg-icons/HiInvoiceMenu.js +14 -4
  292. package/es/hi-svg-icons/HiLogoRounded.js +17 -6
  293. package/es/hi-svg-icons/HiOrder.js +14 -4
  294. package/es/hi-svg-icons/HiPaymentOrder.js +14 -4
  295. package/es/hi-svg-icons/HiPermission.js +14 -4
  296. package/es/hi-svg-icons/HiPriceGrid.js +14 -4
  297. package/es/hi-svg-icons/HiPrivate.js +14 -4
  298. package/es/hi-svg-icons/HiRoute.js +14 -4
  299. package/es/hi-svg-icons/HiRouteMenu.js +14 -4
  300. package/es/hi-svg-icons/HiRouteSwitch.js +19 -7
  301. package/es/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
  302. package/es/hi-svg-icons/HiSettlement.js +14 -4
  303. package/es/hi-svg-icons/HiSizeLarge.js +14 -4
  304. package/es/hi-svg-icons/HiSizeMedium.js +14 -4
  305. package/es/hi-svg-icons/HiSizeSmall.js +14 -4
  306. package/es/hi-svg-icons/HiStore.js +14 -4
  307. package/es/hi-svg-icons/HiStoreMenu.js +14 -4
  308. package/es/hi-svg-icons/HiTransaction.js +14 -4
  309. package/es/hi-svg-icons/HiTransactionMenu.js +14 -4
  310. package/es/hi-svg-icons/HiUser.js +14 -4
  311. package/es/hi-svg-icons/HiVendor.js +14 -4
  312. package/es/hi-svg-icons/HiWidget.js +14 -4
  313. package/es/hi-svg-icons/index.js +41 -0
  314. package/es/hi-svg-images/HiLogo.js +12 -4
  315. package/es/hi-svg-images/HiLogoWhite.js +12 -4
  316. package/es/hi-svg-images/index.js +3 -0
  317. package/es/setupTest.js +13 -2
  318. package/es/styleguide/Wrapper.js +6 -0
  319. package/es/styles/MuiThemeProvider.js +49 -15
  320. package/es/styles/colorManipulator.js +50 -15
  321. package/es/styles/createBreakpoints.js +29 -14
  322. package/es/styles/createGenerateClassName.js +24 -14
  323. package/es/styles/createMixins.js +10 -4
  324. package/es/styles/createMuiTheme.js +28 -11
  325. package/es/styles/createPalette.js +89 -67
  326. package/es/styles/createStyles.js +1 -0
  327. package/es/styles/createTypography.js +24 -15
  328. package/es/styles/getStylesCreator.js +14 -1
  329. package/es/styles/getThemeProps.js +7 -2
  330. package/es/styles/index.js +6 -0
  331. package/es/styles/jssPreset.js +11 -1
  332. package/es/styles/makeStyles.js +9 -2
  333. package/es/styles/mergeClasses.js +16 -5
  334. package/es/styles/shadows.js +4 -1
  335. package/es/styles/shape.js +2 -1
  336. package/es/styles/spacing.js +4 -1
  337. package/es/styles/themeListener.js +10 -2
  338. package/es/styles/transitions.js +35 -20
  339. package/es/styles/withStyles.js +9 -2
  340. package/es/styles/zIndex.js +2 -1
  341. package/es/test-utils/createMount.js +12 -2
  342. package/es/test-utils/createRender.js +9 -2
  343. package/es/test-utils/createShallow.js +17 -6
  344. package/es/test-utils/getClasses.js +4 -1
  345. package/es/test-utils/index.js +6 -0
  346. package/es/test-utils/until.js +14 -3
  347. package/es/test-utils/unwrap.js +1 -0
  348. package/es/theme/palette.js +7 -2
  349. package/es/theme/typography.js +15 -7
  350. package/es/theme.js +8 -2
  351. package/es/transitions/utils.js +7 -3
  352. package/es/utils/exactProp.js +13 -3
  353. package/es/utils/helpers.js +58 -19
  354. package/es/withMobileDialog/index.js +2 -0
  355. package/es/withMobileDialog/withMobileDialog.js +12 -3
  356. package/hi-svg-icons/HiAccount.js +14 -4
  357. package/hi-svg-icons/HiActivity.js +14 -4
  358. package/hi-svg-icons/HiAll.js +18 -7
  359. package/hi-svg-icons/HiBilling.js +14 -4
  360. package/hi-svg-icons/HiBriefcaseRescue.js +14 -4
  361. package/hi-svg-icons/HiBusiness.js +14 -4
  362. package/hi-svg-icons/HiCatalog.js +14 -4
  363. package/hi-svg-icons/HiCustomer.js +14 -4
  364. package/hi-svg-icons/HiDownload.js +14 -4
  365. package/hi-svg-icons/HiFinance.js +14 -4
  366. package/hi-svg-icons/HiFinanceMenu.js +14 -4
  367. package/hi-svg-icons/HiHostedPaymentPage.js +14 -4
  368. package/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
  369. package/hi-svg-icons/HiIntegration.js +14 -4
  370. package/hi-svg-icons/HiIntegrationMenu.js +14 -4
  371. package/hi-svg-icons/HiIntelligence.js +14 -4
  372. package/hi-svg-icons/HiIntelligenceMenu.js +14 -4
  373. package/hi-svg-icons/HiInvoice.js +14 -4
  374. package/hi-svg-icons/HiInvoiceMenu.js +14 -4
  375. package/hi-svg-icons/HiLogoRounded.js +17 -6
  376. package/hi-svg-icons/HiOrder.js +14 -4
  377. package/hi-svg-icons/HiPaymentOrder.js +14 -4
  378. package/hi-svg-icons/HiPermission.js +14 -4
  379. package/hi-svg-icons/HiPriceGrid.js +14 -4
  380. package/hi-svg-icons/HiPrivate.js +14 -4
  381. package/hi-svg-icons/HiRoute.js +14 -4
  382. package/hi-svg-icons/HiRouteMenu.js +14 -4
  383. package/hi-svg-icons/HiRouteSwitch.js +19 -7
  384. package/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
  385. package/hi-svg-icons/HiSettlement.js +14 -4
  386. package/hi-svg-icons/HiSizeLarge.js +14 -4
  387. package/hi-svg-icons/HiSizeMedium.js +14 -4
  388. package/hi-svg-icons/HiSizeSmall.js +14 -4
  389. package/hi-svg-icons/HiStore.js +14 -4
  390. package/hi-svg-icons/HiStoreMenu.js +14 -4
  391. package/hi-svg-icons/HiTransaction.js +14 -4
  392. package/hi-svg-icons/HiTransactionMenu.js +14 -4
  393. package/hi-svg-icons/HiUser.js +14 -4
  394. package/hi-svg-icons/HiVendor.js +14 -4
  395. package/hi-svg-icons/HiWidget.js +14 -4
  396. package/hi-svg-icons/index.js +41 -0
  397. package/hi-svg-images/HiLogo.js +12 -4
  398. package/hi-svg-images/HiLogoWhite.js +12 -4
  399. package/hi-svg-images/index.js +3 -0
  400. package/package.json +2 -2
  401. package/setupTest.js +13 -2
  402. package/styleguide/Wrapper.js +6 -0
  403. package/styles/MuiThemeProvider.js +49 -15
  404. package/styles/colorManipulator.js +50 -15
  405. package/styles/createBreakpoints.js +29 -14
  406. package/styles/createGenerateClassName.js +24 -14
  407. package/styles/createMixins.js +10 -4
  408. package/styles/createMuiTheme.js +28 -11
  409. package/styles/createPalette.js +89 -67
  410. package/styles/createStyles.js +1 -0
  411. package/styles/createTypography.js +24 -15
  412. package/styles/getStylesCreator.js +14 -1
  413. package/styles/getThemeProps.js +7 -2
  414. package/styles/index.js +6 -0
  415. package/styles/jssPreset.js +11 -1
  416. package/styles/makeStyles.js +9 -2
  417. package/styles/mergeClasses.js +16 -5
  418. package/styles/shadows.js +4 -1
  419. package/styles/shape.js +2 -1
  420. package/styles/spacing.js +4 -1
  421. package/styles/themeListener.js +10 -2
  422. package/styles/transitions.js +35 -20
  423. package/styles/withStyles.js +9 -2
  424. package/styles/zIndex.js +2 -1
  425. package/test-utils/createMount.js +12 -2
  426. package/test-utils/createRender.js +9 -2
  427. package/test-utils/createShallow.js +17 -6
  428. package/test-utils/getClasses.js +4 -1
  429. package/test-utils/index.js +6 -0
  430. package/test-utils/until.js +14 -3
  431. package/test-utils/unwrap.js +1 -0
  432. package/theme/palette.js +7 -2
  433. package/theme/typography.js +15 -7
  434. package/theme.js +8 -2
  435. package/transitions/utils.js +7 -3
  436. package/utils/exactProp.js +13 -3
  437. package/utils/helpers.js +58 -19
  438. package/withMobileDialog/index.js +2 -0
  439. package/withMobileDialog/withMobileDialog.js +12 -3
package/HiForm/HiInput.js CHANGED
@@ -1,30 +1,51 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.styles = exports.default = void 0;
9
+
8
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
11
+
9
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
13
+
10
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
15
+
11
16
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
17
+
12
18
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
19
+
13
20
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
21
+
14
22
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
23
+
15
24
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
25
+
16
26
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
27
+
17
28
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
29
+
18
30
  var _react = _interopRequireDefault(require("react"));
31
+
19
32
  var _classnames = _interopRequireDefault(require("classnames"));
33
+
20
34
  var _index = _interopRequireDefault(require("keycode/index"));
35
+
21
36
  var _Input = _interopRequireDefault(require("@mui/material/Input"));
37
+
22
38
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
39
+
23
40
  var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
41
+
24
42
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
43
+
25
44
  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
+
26
46
  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; } }
27
- var styles = exports.styles = function styles(theme) {
47
+
48
+ var styles = function styles(theme) {
28
49
  return {
29
50
  root: (0, _objectSpread2.default)({
30
51
  position: 'relative'
@@ -57,8 +78,8 @@ var styles = exports.styles = function styles(theme) {
57
78
  easing: theme.transitions.easing.easeOut
58
79
  }),
59
80
  pointerEvents: 'none' // Transparent to the hover style.
60
- },
61
81
 
82
+ },
62
83
  '&:not($error):hover:after': {
63
84
  transform: 'scaleX(1)'
64
85
  },
@@ -139,32 +160,44 @@ var styles = exports.styles = function styles(theme) {
139
160
  }
140
161
  };
141
162
  };
163
+
164
+ exports.styles = styles;
165
+
142
166
  var _ref = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
143
167
  icon: "close",
144
168
  size: 20,
145
169
  color: "neutral"
146
170
  });
171
+
147
172
  var HiInput = /*#__PURE__*/function (_React$PureComponent) {
148
173
  (0, _inherits2.default)(HiInput, _React$PureComponent);
174
+
149
175
  var _super = _createSuper(HiInput);
176
+
150
177
  function HiInput() {
151
178
  var _this;
179
+
152
180
  (0, _classCallCheck2.default)(this, HiInput);
153
181
  _this = _super.call(this);
182
+
154
183
  _this.handleKeyDown = function (event) {
155
184
  var key = (0, _index.default)(event);
185
+
156
186
  if (_this.props.onKeyDown) {
157
187
  _this.props.onKeyDown(event);
158
188
  }
189
+
159
190
  if (key === 'enter' && _this.props.onSubmit) {
160
191
  _this.props.onSubmit(event);
161
192
  }
162
193
  };
194
+
163
195
  _this.handleClick = function (event) {
164
196
  if (_this.props.onClick) {
165
197
  _this.props.onClick(event);
166
198
  }
167
199
  };
200
+
168
201
  _this.state = {
169
202
  focused: false
170
203
  };
@@ -179,10 +212,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
179
212
  _this.handleOverlayRef = _this.handleOverlayRef.bind((0, _assertThisInitialized2.default)(_this));
180
213
  return _this;
181
214
  }
215
+
182
216
  (0, _createClass2.default)(HiInput, [{
183
217
  key: "getInputElement",
184
218
  value: function getInputElement(el) {
185
219
  this.inputElement = el;
220
+
186
221
  if (this.props.customRef) {
187
222
  this.props.customRef(this.inputElement);
188
223
  } else if (this.props.inputRef) {
@@ -202,6 +237,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
202
237
  if (this.props.onReset) {
203
238
  this.props.onReset();
204
239
  }
240
+
205
241
  this.inputElement.focus();
206
242
  }
207
243
  }, {
@@ -217,12 +253,14 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
217
253
  } else if (this.endAdornmentNode.contains(event.relatedTarget) && this.props.onBlur) {
218
254
  this.props.onBlur(event);
219
255
  }
256
+
220
257
  event.preventDefault();
221
258
  event.stopPropagation();
222
259
  } else {
223
260
  this.setState({
224
261
  focused: false
225
262
  });
263
+
226
264
  if (this.props.onBlur) {
227
265
  this.props.onBlur(event);
228
266
  }
@@ -238,8 +276,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
238
276
  this.setState({
239
277
  focused: true
240
278
  });
241
- }
242
- // If focus came from erase icon => stay focused and don't call onFocus props
279
+ } // If focus came from erase icon => stay focused and don't call onFocus props
280
+
281
+
243
282
  if (this.eraseIconNode && this.eraseIconNode.contains(event.relatedTarget)) {
244
283
  event.preventDefault();
245
284
  event.stopPropagation();
@@ -259,6 +298,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
259
298
  focused: true
260
299
  });
261
300
  }
301
+
262
302
  this.inputElement.focus();
263
303
  }
264
304
  }
@@ -280,6 +320,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
280
320
  key: "handleOverlayRef",
281
321
  value: function handleOverlayRef(el) {
282
322
  this.overlayNode = el;
323
+
283
324
  if (this.props.overlayRef) {
284
325
  this.props.overlayRef(el);
285
326
  }
@@ -287,31 +328,34 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
287
328
  }, {
288
329
  key: "render",
289
330
  value: function render() {
290
- var _this2 = this;
331
+ var _classNames,
332
+ _this2 = this,
333
+ _classNames4;
334
+
291
335
  var _this$props = this.props,
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;
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;
312
356
  var focused = this.state.focused;
313
357
  var overlayProps = (0, _objectSpread2.default)({
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)
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)
315
359
  }, !disabled && {
316
360
  onClick: this.handleDivClick,
317
361
  onMouseEnter: this.handleMouseEnter,
@@ -320,12 +364,16 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
320
364
  ref: this.handleOverlayRef
321
365
  });
322
366
  var leftIcon;
367
+
323
368
  if (!!startAdornment) {
369
+ var _classNames2;
370
+
324
371
  var leftIconProps = {
325
372
  color: startAdornmentColor,
326
373
  onClick: this.props.onLeftIconClick,
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))
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))
328
375
  };
376
+
329
377
  if (typeof startAdornment === 'string') {
330
378
  leftIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
331
379
  icon: startAdornment
@@ -337,9 +385,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
337
385
  className: "".concat(leftIconProps.className, " ").concat(leftIcon.props.className)
338
386
  });
339
387
  }
340
- }
388
+ } // Build endAdornment with eraseIcon + endAdornmentProps
389
+
341
390
 
342
- // Build endAdornment with eraseIcon + endAdornmentProps
343
391
  var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && /*#__PURE__*/_react.default.createElement(_HiIconButton.default, {
344
392
  className: classes.eraseButton,
345
393
  classes: {
@@ -351,16 +399,21 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
351
399
  _this2.eraseIconNode = el;
352
400
  }
353
401
  }, _ref);
402
+
354
403
  var endAdornment = endAdornmentProps;
404
+
355
405
  if (typeof endAdornmentProps === 'string' && endAdornmentProps !== '') {
406
+ var _classNames3;
407
+
356
408
  endAdornment = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
357
409
  icon: endAdornmentProps,
358
410
  size: 20,
359
411
  color: "neutral",
360
412
  onClick: this.props.onRightIconClick,
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))
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))
362
414
  });
363
415
  }
416
+
364
417
  return /*#__PURE__*/_react.default.createElement("div", overlayProps, /*#__PURE__*/_react.default.createElement(_Input.default, {
365
418
  id: inputId,
366
419
  type: type,
@@ -390,7 +443,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
390
443
  }, eraseIcon, endAdornment),
391
444
  inputProps: (0, _objectSpread2.default)({
392
445
  spellCheck: spellcheck ? 'true' : 'false',
393
- className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.inputText, !multiline), classes.inputTextArea, multiline))
446
+ className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, classes.inputText, !multiline), (0, _defineProperty2.default)(_classNames4, classes.inputTextArea, multiline), _classNames4))
394
447
  }, inputProps)
395
448
  }));
396
449
  }
@@ -402,11 +455,13 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
402
455
  focused: nextProps.focused
403
456
  };
404
457
  }
458
+
405
459
  return null;
406
460
  }
407
461
  }]);
408
462
  return HiInput;
409
463
  }(_react.default.PureComponent);
464
+
410
465
  HiInput.defaultProps = {
411
466
  value: '',
412
467
  placeholder: '',
@@ -420,7 +475,10 @@ HiInput.defaultProps = {
420
475
  onlyNumbers: false,
421
476
  spellcheck: false
422
477
  };
423
- var _default = exports.default = (0, _withStyles.default)(styles, {
478
+
479
+ var _default = (0, _withStyles.default)(styles, {
424
480
  hiComponent: true,
425
481
  name: 'HiMuiHiInput'
426
- })(HiInput);
482
+ })(HiInput);
483
+
484
+ exports.default = _default;
@@ -1,27 +1,45 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.styles = exports.default = void 0;
9
+
8
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
+
9
12
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
+
10
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
15
+
11
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
17
+
12
18
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
19
+
13
20
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
21
+
14
22
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
23
+
15
24
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
25
+
16
26
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
27
+
17
28
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
29
+
18
30
  var _react = _interopRequireDefault(require("react"));
31
+
19
32
  var _classnames = _interopRequireDefault(require("classnames"));
33
+
20
34
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
35
+
21
36
  var _HiTextField = _interopRequireDefault(require("./HiTextField"));
37
+
22
38
  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); }; }
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() {
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() {
25
43
  return {
26
44
  inputPassword: {
27
45
  fontWeight: 'bolder',
@@ -31,15 +49,21 @@ var styles = exports.styles = function styles() {
31
49
  }
32
50
  };
33
51
  };
34
-
35
52
  /**
36
53
  * Champs input email pour formulaire
37
54
  */
55
+
56
+
57
+ exports.styles = styles;
58
+
38
59
  var HiPasswordField = /*#__PURE__*/function (_React$Component) {
39
60
  (0, _inherits2.default)(HiPasswordField, _React$Component);
61
+
40
62
  var _super = _createSuper(HiPasswordField);
63
+
41
64
  function HiPasswordField(props) {
42
65
  var _this;
66
+
43
67
  (0, _classCallCheck2.default)(this, HiPasswordField);
44
68
  _this = _super.call(this, props);
45
69
  _this.state = {
@@ -48,6 +72,7 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
48
72
  _this.handlePasswordToggle = _this.handlePasswordToggle.bind((0, _assertThisInitialized2.default)(_this));
49
73
  return _this;
50
74
  }
75
+
51
76
  (0, _createClass2.default)(HiPasswordField, [{
52
77
  key: "handlePasswordToggle",
53
78
  value: function handlePasswordToggle() {
@@ -61,9 +86,10 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
61
86
  key: "render",
62
87
  value: function render() {
63
88
  var _this$props = this.props,
64
- classes = _this$props.classes,
65
- HiInputProps = _this$props.HiInputProps,
66
- otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps"]);
89
+ classes = _this$props.classes,
90
+ HiInputProps = _this$props.HiInputProps,
91
+ autoComplete = _this$props.autoComplete,
92
+ otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps", "autoComplete"]);
67
93
  var endAdornment = this.state.showText ? 'visibility_off' : 'visibility';
68
94
  var type = this.state.showText ? 'text' : 'password';
69
95
  var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, classes.inputPassword, !this.state.showText && otherProps.value !== ""));
@@ -75,14 +101,25 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
75
101
  }, HiInputProps, {
76
102
  endAdornment: endAdornment,
77
103
  inputClassName: inputClassName,
78
- autocomplete: "new-password"
104
+ autoComplete: autoComplete
79
105
  })
80
106
  }));
81
107
  }
82
108
  }]);
83
109
  return HiPasswordField;
84
110
  }(_react.default.Component);
85
- var _default = exports.default = (0, _withStyles.default)(styles, {
111
+
112
+ HiPasswordField.defaultProps = {
113
+ /**
114
+ * Autocomplete off by default
115
+ * @see https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
116
+ */
117
+ autoComplete: 'off'
118
+ };
119
+
120
+ var _default = (0, _withStyles.default)(styles, {
86
121
  hiComponent: true,
87
122
  name: 'HmuiHiPasswordField'
88
- })(HiPasswordField);
123
+ })(HiPasswordField);
124
+
125
+ exports.default = _default;
@@ -1,22 +1,36 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
9
+
8
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
+
9
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
+
10
14
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
15
+
11
16
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
17
+
12
18
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
19
+
13
20
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
21
+
14
22
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
23
+
15
24
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
25
+
16
26
  var _react = _interopRequireDefault(require("react"));
27
+
17
28
  var _HiInput = _interopRequireDefault(require("./HiInput"));
29
+
18
30
  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
+
19
32
  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
+
20
34
  /**
21
35
  * Construit une barre de recherche avec icône Search (Magnify),
22
36
  * permet de filtrer une liste d'éléments en spécifiant le nom de la/les propriétés sur lesquelles filtrer,
@@ -25,9 +39,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
25
39
  */
26
40
  var HiSearchField = /*#__PURE__*/function (_React$Component) {
27
41
  (0, _inherits2.default)(HiSearchField, _React$Component);
42
+
28
43
  var _super = _createSuper(HiSearchField);
44
+
29
45
  function HiSearchField(props) {
30
46
  var _this;
47
+
31
48
  (0, _classCallCheck2.default)(this, HiSearchField);
32
49
  _this = _super.call(this, props);
33
50
  _this.state = {
@@ -38,6 +55,7 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
38
55
  _this.handleReset = _this.handleReset.bind((0, _assertThisInitialized2.default)(_this));
39
56
  return _this;
40
57
  }
58
+
41
59
  (0, _createClass2.default)(HiSearchField, [{
42
60
  key: "filterOnProperties",
43
61
  value: function filterOnProperties(item, search) {
@@ -45,14 +63,17 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
45
63
  // If no properties specify, search on item
46
64
  return item.toString().toLowerCase().search(search.toLowerCase()) !== -1;
47
65
  }
66
+
48
67
  var searchSucceed = false;
49
68
  this.props.filterPropertyList.forEach(function (filter) {
50
69
  var itemProperty = null;
70
+
51
71
  if (filter.indexOf('.') > 0) {
52
72
  itemProperty = item[filter.split('.')[0]][filter.split('.')[1]];
53
73
  } else {
54
74
  itemProperty = item[filter];
55
75
  }
76
+
56
77
  if (itemProperty.toString().toLowerCase().search(search.toLowerCase()) !== -1) {
57
78
  searchSucceed = true;
58
79
  }
@@ -63,28 +84,35 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
63
84
  key: "handleChange",
64
85
  value: function handleChange(event, inputValue) {
65
86
  var _this2 = this;
87
+
66
88
  var searchedValue;
89
+
67
90
  if (typeof inputValue !== 'undefined' && typeof event.target.value === 'undefined') {
68
91
  searchedValue = inputValue;
69
92
  } else {
70
93
  searchedValue = event.target.value;
71
94
  }
95
+
72
96
  this.setState({
73
97
  inputValue: searchedValue
74
98
  });
99
+
75
100
  if (this.props.onSearch === undefined) {
76
101
  var currentParent = null;
77
102
  var filteredList = [];
78
103
  this.props.itemList.forEach(function (item) {
79
104
  var add = _this2.filterOnProperties(item, searchedValue);
105
+
80
106
  if (item.hasChildren === true && add === false) {
81
107
  currentParent = item;
82
108
  }
109
+
83
110
  if (add === true) {
84
111
  if (currentParent !== null && item.parentId === currentParent.id) {
85
112
  filteredList.push(currentParent);
86
113
  currentParent = null;
87
114
  }
115
+
88
116
  filteredList.push(item);
89
117
  }
90
118
  });
@@ -99,6 +127,7 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
99
127
  this.setState({
100
128
  inputValue: ''
101
129
  });
130
+
102
131
  if (typeof this.props.onSearch === 'undefined') {
103
132
  this.props.onFilteredList(this.props.itemList);
104
133
  } else {
@@ -109,8 +138,8 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
109
138
  key: "render",
110
139
  value: function render() {
111
140
  var _this$props = this.props,
112
- placeholder = _this$props.placeholder,
113
- others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
141
+ placeholder = _this$props.placeholder,
142
+ others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
114
143
  return /*#__PURE__*/_react.default.createElement(_HiInput.default, (0, _extends2.default)({
115
144
  placeholder: placeholder,
116
145
  onReset: this.handleReset,
@@ -122,7 +151,9 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
122
151
  }]);
123
152
  return HiSearchField;
124
153
  }(_react.default.Component);
154
+
125
155
  HiSearchField.defaultProps = {
126
156
  placeholder: 'Search'
127
157
  };
128
- var _default = exports.default = HiSearchField;
158
+ var _default = HiSearchField;
159
+ exports.default = _default;