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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (439) hide show
  1. package/HiAccordion/HiAccordion.js +8 -26
  2. package/HiAccordion/index.js +1 -5
  3. package/HiAccordionActions/HiAccordionActions.js +1 -14
  4. package/HiAccordionActions/index.js +1 -5
  5. package/HiAccordionSummary/HiAccordionSummary.js +1 -15
  6. package/HiAccordionSummary/index.js +1 -5
  7. package/HiAlertModal/HiAlertModal.js +7 -22
  8. package/HiAlertModal/index.js +1 -5
  9. package/HiAppBar/HiAppBar.js +11 -42
  10. package/HiAppBar/index.js +0 -2
  11. package/HiAvatar/HiAvatar.js +3 -12
  12. package/HiAvatar/index.js +0 -2
  13. package/HiBadge/HiBadge.js +17 -33
  14. package/HiBadge/index.js +0 -2
  15. package/HiBreadcrumb/HiBreadcrumb.js +6 -30
  16. package/HiBreadcrumb/HiStep.js +13 -45
  17. package/HiBreadcrumb/HiStepConnector.js +15 -50
  18. package/HiBreadcrumb/HiStepContent.js +6 -30
  19. package/HiBreadcrumb/HiStepIcon.js +17 -42
  20. package/HiBreadcrumb/HiStepLabel.js +17 -47
  21. package/HiBreadcrumb/HiStepper.js +6 -30
  22. package/HiBreadcrumb/index.js +0 -2
  23. package/HiButton/HiButton.js +12 -37
  24. package/HiButton/index.js +1 -5
  25. package/HiCell/CellAddress.js +12 -33
  26. package/HiCell/CellDate.js +10 -36
  27. package/HiCell/CellHiddenContent.js +8 -30
  28. package/HiCell/CellIcon.js +12 -36
  29. package/HiCell/CellImage.js +12 -34
  30. package/HiCell/CellNumeric.js +13 -40
  31. package/HiCell/CellPinToAction.js +9 -33
  32. package/HiCell/CellRate.js +17 -51
  33. package/HiCell/CellSentinel.js +12 -33
  34. package/HiCell/CellSentinelScore.js +9 -31
  35. package/HiCell/CellText.js +16 -52
  36. package/HiCell/CellTextStyled.js +13 -24
  37. package/HiCell/index.js +0 -10
  38. package/HiCheckbox/HiCheckbox.js +19 -56
  39. package/HiCheckbox/index.js +0 -2
  40. package/HiChip/HiChip.js +24 -47
  41. package/HiChip/HiChipSwitch.js +16 -59
  42. package/HiChip/index.js +0 -3
  43. package/HiColoredLabel/HiColoredLabel.js +47 -69
  44. package/HiColoredLabel/index.js +0 -2
  45. package/HiDatePicker/Caption.js +9 -21
  46. package/HiDatePicker/HiDatePicker.js +16 -88
  47. package/HiDatePicker/HiDatePickerMobile.js +18 -43
  48. package/HiDatePicker/HiDateRangePicker.js +38 -134
  49. package/HiDatePicker/HiDateRangeSelector.js +49 -130
  50. package/HiDatePicker/ListPicker.js +8 -38
  51. package/HiDatePicker/NavBar.js +12 -31
  52. package/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
  53. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
  54. package/HiDatePicker/Overlays/MonthPickerOverlay.js +4 -26
  55. package/HiDatePicker/Overlays/Overlay.js +8 -25
  56. package/HiDatePicker/Overlays/TimePickerOverlay.js +8 -39
  57. package/HiDatePicker/Overlays/YearPickerOverlay.js +8 -31
  58. package/HiDatePicker/Overlays/index.js +0 -6
  59. package/HiDatePicker/Weekday.js +4 -9
  60. package/HiDatePicker/hiLocaleUtils.js +8 -20
  61. package/HiDatePicker/index.js +0 -2
  62. package/HiDatePicker/stylesheet.js +7 -13
  63. package/HiDialog/HiDialog.js +7 -19
  64. package/HiDialog/index.js +0 -2
  65. package/HiDotsStepper/HiDot.js +9 -38
  66. package/HiDotsStepper/HiDotsStepper.js +10 -37
  67. package/HiDotsStepper/index.js +0 -3
  68. package/HiExpansionPanel/HiExpansionPanel.js +16 -38
  69. package/HiExpansionPanel/index.js +1 -5
  70. package/HiForm/HiAddressField.js +10 -36
  71. package/HiForm/HiEmailField.js +5 -29
  72. package/HiForm/HiFormControl.js +31 -77
  73. package/HiForm/HiFormLabel.js +16 -42
  74. package/HiForm/HiInput.js +34 -92
  75. package/HiForm/HiPasswordField.js +8 -36
  76. package/HiForm/HiSearchField.js +3 -34
  77. package/HiForm/HiSlider.js +22 -57
  78. package/HiForm/HiTextField.js +22 -47
  79. package/HiForm/HiUpload.js +35 -95
  80. package/HiForm/HiUploadField.js +10 -32
  81. package/HiForm/HiUploadInput.js +24 -77
  82. package/HiForm/index.js +0 -12
  83. package/HiIcon/HiIcon.js +9 -34
  84. package/HiIcon/index.js +0 -2
  85. package/HiIconButton/HiIconButton.js +7 -22
  86. package/HiIconButton/index.js +0 -2
  87. package/HiListItemLink/HiListItemLink.js +7 -19
  88. package/HiListItemLink/index.js +0 -2
  89. package/HiLoader/HiLoader.js +6 -16
  90. package/HiLoader/index.js +0 -2
  91. package/HiNotice/HiKPI.js +17 -48
  92. package/HiNotice/HiKPINotice.js +6 -16
  93. package/HiNotice/index.js +0 -3
  94. package/HiPagination/HiPagination.js +1 -11
  95. package/HiPagination/index.js +0 -2
  96. package/HiPaymentMeans/HiPaymentMeans.js +31 -72
  97. package/HiPaymentMeans/index.js +0 -2
  98. package/HiPdfReader/HiPdfReader.js +24 -57
  99. package/HiPdfReader/index.js +0 -2
  100. package/HiPin/HiPin.js +16 -28
  101. package/HiPin/index.js +0 -2
  102. package/HiRadio/HiRadio.js +12 -23
  103. package/HiRadio/index.js +0 -2
  104. package/HiScrollStepper/HiScrollStepper.js +29 -67
  105. package/HiScrollStepper/index.js +0 -2
  106. package/HiSelect/HiDynamicSelect.js +32 -42
  107. package/HiSelect/HiDynamicSelectField.js +24 -48
  108. package/HiSelect/HiNestedSelect.js +65 -111
  109. package/HiSelect/HiNestedSelectContent.js +60 -86
  110. package/HiSelect/HiNestedSelectField.js +24 -48
  111. package/HiSelect/HiSelect.js +89 -187
  112. package/HiSelect/HiSelectContent.js +62 -97
  113. package/HiSelect/HiSelectField.js +25 -49
  114. package/HiSelect/HiSelectInput.js +24 -77
  115. package/HiSelect/HiSelectMobile.js +7 -44
  116. package/HiSelect/HiSuggestSelect.js +25 -81
  117. package/HiSelect/HiSuggestSelectField.js +15 -39
  118. package/HiSelect/index.js +2 -14
  119. package/HiSelectableList/HiSelectableList.js +34 -90
  120. package/HiSelectableList/HiSelectableListHierarchic.js +34 -60
  121. package/HiSelectableList/HiSelectableListItem.js +45 -88
  122. package/HiSelectableList/index.js +0 -4
  123. package/HiStepper/DefaultIndicator.js +1 -10
  124. package/HiStepper/HiStep.js +21 -51
  125. package/HiStepper/HiStepper.js +2 -15
  126. package/HiStepper/index.js +0 -3
  127. package/HiSwitch/HiSwitch.js +19 -43
  128. package/HiSwitch/HiSwitchState.js +22 -39
  129. package/HiSwitch/index.js +0 -3
  130. package/HiTable/HiCellBuilder.js +10 -65
  131. package/HiTable/HiTable.js +20 -48
  132. package/HiTable/HiTableBody.js +7 -24
  133. package/HiTable/HiTableHeader.js +18 -51
  134. package/HiTable/HiTableRow.js +12 -46
  135. package/HiTable/constants.js +48 -98
  136. package/HiTable/index.js +0 -2
  137. package/es/HiAccordion/HiAccordion.js +8 -26
  138. package/es/HiAccordion/index.js +1 -5
  139. package/es/HiAccordionActions/HiAccordionActions.js +1 -14
  140. package/es/HiAccordionActions/index.js +1 -5
  141. package/es/HiAccordionSummary/HiAccordionSummary.js +1 -15
  142. package/es/HiAccordionSummary/index.js +1 -5
  143. package/es/HiAlertModal/HiAlertModal.js +7 -22
  144. package/es/HiAlertModal/index.js +1 -5
  145. package/es/HiAppBar/HiAppBar.js +11 -42
  146. package/es/HiAppBar/index.js +0 -2
  147. package/es/HiAvatar/HiAvatar.js +3 -12
  148. package/es/HiAvatar/index.js +0 -2
  149. package/es/HiBadge/HiBadge.js +17 -33
  150. package/es/HiBadge/index.js +0 -2
  151. package/es/HiBreadcrumb/HiBreadcrumb.js +6 -30
  152. package/es/HiBreadcrumb/HiStep.js +13 -45
  153. package/es/HiBreadcrumb/HiStepConnector.js +15 -50
  154. package/es/HiBreadcrumb/HiStepContent.js +6 -30
  155. package/es/HiBreadcrumb/HiStepIcon.js +17 -42
  156. package/es/HiBreadcrumb/HiStepLabel.js +17 -47
  157. package/es/HiBreadcrumb/HiStepper.js +6 -30
  158. package/es/HiBreadcrumb/index.js +0 -2
  159. package/es/HiButton/HiButton.js +12 -37
  160. package/es/HiButton/index.js +1 -5
  161. package/es/HiCell/CellAddress.js +12 -33
  162. package/es/HiCell/CellDate.js +10 -36
  163. package/es/HiCell/CellHiddenContent.js +8 -30
  164. package/es/HiCell/CellIcon.js +12 -36
  165. package/es/HiCell/CellImage.js +12 -34
  166. package/es/HiCell/CellNumeric.js +13 -40
  167. package/es/HiCell/CellPinToAction.js +9 -33
  168. package/es/HiCell/CellRate.js +17 -51
  169. package/es/HiCell/CellSentinel.js +12 -33
  170. package/es/HiCell/CellSentinelScore.js +9 -31
  171. package/es/HiCell/CellText.js +16 -52
  172. package/es/HiCell/CellTextStyled.js +13 -24
  173. package/es/HiCell/index.js +0 -10
  174. package/es/HiCheckbox/HiCheckbox.js +19 -56
  175. package/es/HiCheckbox/index.js +0 -2
  176. package/es/HiChip/HiChip.js +24 -47
  177. package/es/HiChip/HiChipSwitch.js +16 -59
  178. package/es/HiChip/index.js +0 -3
  179. package/es/HiColoredLabel/HiColoredLabel.js +47 -69
  180. package/es/HiColoredLabel/index.js +0 -2
  181. package/es/HiDatePicker/Caption.js +9 -21
  182. package/es/HiDatePicker/HiDatePicker.js +16 -88
  183. package/es/HiDatePicker/HiDatePickerMobile.js +18 -43
  184. package/es/HiDatePicker/HiDateRangePicker.js +38 -134
  185. package/es/HiDatePicker/HiDateRangeSelector.js +49 -130
  186. package/es/HiDatePicker/ListPicker.js +8 -38
  187. package/es/HiDatePicker/NavBar.js +12 -31
  188. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
  189. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
  190. package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +4 -26
  191. package/es/HiDatePicker/Overlays/Overlay.js +8 -25
  192. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +8 -39
  193. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +8 -31
  194. package/es/HiDatePicker/Overlays/index.js +0 -6
  195. package/es/HiDatePicker/Weekday.js +4 -9
  196. package/es/HiDatePicker/hiLocaleUtils.js +8 -20
  197. package/es/HiDatePicker/index.js +0 -2
  198. package/es/HiDatePicker/stylesheet.js +7 -13
  199. package/es/HiDialog/HiDialog.js +7 -19
  200. package/es/HiDialog/index.js +0 -2
  201. package/es/HiDotsStepper/HiDot.js +9 -38
  202. package/es/HiDotsStepper/HiDotsStepper.js +10 -37
  203. package/es/HiDotsStepper/index.js +0 -3
  204. package/es/HiExpansionPanel/HiExpansionPanel.js +16 -38
  205. package/es/HiExpansionPanel/index.js +1 -5
  206. package/es/HiForm/HiAddressField.js +10 -36
  207. package/es/HiForm/HiEmailField.js +5 -29
  208. package/es/HiForm/HiFormControl.js +31 -77
  209. package/es/HiForm/HiFormLabel.js +16 -42
  210. package/es/HiForm/HiInput.js +34 -92
  211. package/es/HiForm/HiPasswordField.js +8 -36
  212. package/es/HiForm/HiSearchField.js +3 -34
  213. package/es/HiForm/HiSlider.js +22 -57
  214. package/es/HiForm/HiTextField.js +22 -47
  215. package/es/HiForm/HiUpload.js +35 -95
  216. package/es/HiForm/HiUploadField.js +10 -32
  217. package/es/HiForm/HiUploadInput.js +24 -77
  218. package/es/HiForm/index.js +0 -12
  219. package/es/HiIcon/HiIcon.js +9 -34
  220. package/es/HiIcon/index.js +0 -2
  221. package/es/HiIconButton/HiIconButton.js +7 -22
  222. package/es/HiIconButton/index.js +0 -2
  223. package/es/HiListItemLink/HiListItemLink.js +7 -19
  224. package/es/HiListItemLink/index.js +0 -2
  225. package/es/HiLoader/HiLoader.js +6 -16
  226. package/es/HiLoader/index.js +0 -2
  227. package/es/HiNotice/HiKPI.js +17 -48
  228. package/es/HiNotice/HiKPINotice.js +6 -16
  229. package/es/HiNotice/index.js +0 -3
  230. package/es/HiPagination/HiPagination.js +1 -11
  231. package/es/HiPagination/index.js +0 -2
  232. package/es/HiPaymentMeans/HiPaymentMeans.js +31 -72
  233. package/es/HiPaymentMeans/index.js +0 -2
  234. package/es/HiPdfReader/HiPdfReader.js +24 -57
  235. package/es/HiPdfReader/index.js +0 -2
  236. package/es/HiPin/HiPin.js +16 -28
  237. package/es/HiPin/index.js +0 -2
  238. package/es/HiRadio/HiRadio.js +12 -23
  239. package/es/HiRadio/index.js +0 -2
  240. package/es/HiScrollStepper/HiScrollStepper.js +29 -67
  241. package/es/HiScrollStepper/index.js +0 -2
  242. package/es/HiSelect/HiDynamicSelect.js +32 -42
  243. package/es/HiSelect/HiDynamicSelectField.js +24 -48
  244. package/es/HiSelect/HiNestedSelect.js +65 -111
  245. package/es/HiSelect/HiNestedSelectContent.js +60 -86
  246. package/es/HiSelect/HiNestedSelectField.js +24 -48
  247. package/es/HiSelect/HiSelect.js +89 -187
  248. package/es/HiSelect/HiSelectContent.js +62 -97
  249. package/es/HiSelect/HiSelectField.js +25 -49
  250. package/es/HiSelect/HiSelectInput.js +24 -77
  251. package/es/HiSelect/HiSelectMobile.js +7 -44
  252. package/es/HiSelect/HiSuggestSelect.js +25 -81
  253. package/es/HiSelect/HiSuggestSelectField.js +15 -39
  254. package/es/HiSelect/index.js +2 -14
  255. package/es/HiSelectableList/HiSelectableList.js +34 -90
  256. package/es/HiSelectableList/HiSelectableListHierarchic.js +34 -60
  257. package/es/HiSelectableList/HiSelectableListItem.js +45 -88
  258. package/es/HiSelectableList/index.js +0 -4
  259. package/es/HiStepper/DefaultIndicator.js +1 -10
  260. package/es/HiStepper/HiStep.js +21 -51
  261. package/es/HiStepper/HiStepper.js +2 -15
  262. package/es/HiStepper/index.js +0 -3
  263. package/es/HiSwitch/HiSwitch.js +19 -43
  264. package/es/HiSwitch/HiSwitchState.js +22 -39
  265. package/es/HiSwitch/index.js +0 -3
  266. package/es/HiTable/HiCellBuilder.js +10 -65
  267. package/es/HiTable/HiTable.js +20 -48
  268. package/es/HiTable/HiTableBody.js +7 -24
  269. package/es/HiTable/HiTableHeader.js +18 -51
  270. package/es/HiTable/HiTableRow.js +12 -46
  271. package/es/HiTable/constants.js +48 -98
  272. package/es/HiTable/index.js +0 -2
  273. package/es/hi-svg-icons/HiAccount.js +4 -14
  274. package/es/hi-svg-icons/HiActivity.js +4 -14
  275. package/es/hi-svg-icons/HiAll.js +7 -18
  276. package/es/hi-svg-icons/HiBilling.js +4 -14
  277. package/es/hi-svg-icons/HiBriefcaseRescue.js +4 -14
  278. package/es/hi-svg-icons/HiBusiness.js +4 -14
  279. package/es/hi-svg-icons/HiCatalog.js +4 -14
  280. package/es/hi-svg-icons/HiCustomer.js +4 -14
  281. package/es/hi-svg-icons/HiDownload.js +4 -14
  282. package/es/hi-svg-icons/HiFinance.js +4 -14
  283. package/es/hi-svg-icons/HiFinanceMenu.js +4 -14
  284. package/es/hi-svg-icons/HiHostedPaymentPage.js +4 -14
  285. package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
  286. package/es/hi-svg-icons/HiIntegration.js +4 -14
  287. package/es/hi-svg-icons/HiIntegrationMenu.js +4 -14
  288. package/es/hi-svg-icons/HiIntelligence.js +4 -14
  289. package/es/hi-svg-icons/HiIntelligenceMenu.js +4 -14
  290. package/es/hi-svg-icons/HiInvoice.js +4 -14
  291. package/es/hi-svg-icons/HiInvoiceMenu.js +4 -14
  292. package/es/hi-svg-icons/HiLogoRounded.js +6 -17
  293. package/es/hi-svg-icons/HiOrder.js +4 -14
  294. package/es/hi-svg-icons/HiPaymentOrder.js +4 -14
  295. package/es/hi-svg-icons/HiPermission.js +4 -14
  296. package/es/hi-svg-icons/HiPriceGrid.js +4 -14
  297. package/es/hi-svg-icons/HiPrivate.js +4 -14
  298. package/es/hi-svg-icons/HiRoute.js +4 -14
  299. package/es/hi-svg-icons/HiRouteMenu.js +4 -14
  300. package/es/hi-svg-icons/HiRouteSwitch.js +7 -19
  301. package/es/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
  302. package/es/hi-svg-icons/HiSettlement.js +4 -14
  303. package/es/hi-svg-icons/HiSizeLarge.js +4 -14
  304. package/es/hi-svg-icons/HiSizeMedium.js +4 -14
  305. package/es/hi-svg-icons/HiSizeSmall.js +4 -14
  306. package/es/hi-svg-icons/HiStore.js +4 -14
  307. package/es/hi-svg-icons/HiStoreMenu.js +4 -14
  308. package/es/hi-svg-icons/HiTransaction.js +4 -14
  309. package/es/hi-svg-icons/HiTransactionMenu.js +4 -14
  310. package/es/hi-svg-icons/HiUser.js +4 -14
  311. package/es/hi-svg-icons/HiVendor.js +4 -14
  312. package/es/hi-svg-icons/HiWidget.js +4 -14
  313. package/es/hi-svg-icons/index.js +0 -41
  314. package/es/hi-svg-images/HiLogo.js +4 -12
  315. package/es/hi-svg-images/HiLogoWhite.js +4 -12
  316. package/es/hi-svg-images/index.js +0 -3
  317. package/es/setupTest.js +2 -13
  318. package/es/styleguide/Wrapper.js +0 -6
  319. package/es/styles/MuiThemeProvider.js +15 -49
  320. package/es/styles/colorManipulator.js +15 -50
  321. package/es/styles/createBreakpoints.js +14 -29
  322. package/es/styles/createGenerateClassName.js +14 -24
  323. package/es/styles/createMixins.js +4 -10
  324. package/es/styles/createMuiTheme.js +11 -28
  325. package/es/styles/createPalette.js +67 -89
  326. package/es/styles/createStyles.js +0 -1
  327. package/es/styles/createTypography.js +15 -24
  328. package/es/styles/getStylesCreator.js +1 -14
  329. package/es/styles/getThemeProps.js +2 -7
  330. package/es/styles/index.js +0 -6
  331. package/es/styles/jssPreset.js +1 -11
  332. package/es/styles/makeStyles.js +2 -9
  333. package/es/styles/mergeClasses.js +5 -16
  334. package/es/styles/shadows.js +1 -4
  335. package/es/styles/shape.js +1 -2
  336. package/es/styles/spacing.js +1 -4
  337. package/es/styles/themeListener.js +2 -10
  338. package/es/styles/transitions.js +20 -35
  339. package/es/styles/withStyles.js +2 -9
  340. package/es/styles/zIndex.js +1 -2
  341. package/es/test-utils/createMount.js +2 -12
  342. package/es/test-utils/createRender.js +2 -9
  343. package/es/test-utils/createShallow.js +6 -17
  344. package/es/test-utils/getClasses.js +1 -4
  345. package/es/test-utils/index.js +0 -6
  346. package/es/test-utils/until.js +3 -14
  347. package/es/test-utils/unwrap.js +0 -1
  348. package/es/theme/palette.js +2 -7
  349. package/es/theme/typography.js +7 -15
  350. package/es/theme.js +2 -8
  351. package/es/transitions/utils.js +3 -7
  352. package/es/utils/exactProp.js +3 -13
  353. package/es/utils/helpers.js +19 -58
  354. package/es/withMobileDialog/index.js +0 -2
  355. package/es/withMobileDialog/withMobileDialog.js +3 -12
  356. package/hi-svg-icons/HiAccount.js +4 -14
  357. package/hi-svg-icons/HiActivity.js +4 -14
  358. package/hi-svg-icons/HiAll.js +7 -18
  359. package/hi-svg-icons/HiBilling.js +4 -14
  360. package/hi-svg-icons/HiBriefcaseRescue.js +4 -14
  361. package/hi-svg-icons/HiBusiness.js +4 -14
  362. package/hi-svg-icons/HiCatalog.js +4 -14
  363. package/hi-svg-icons/HiCustomer.js +4 -14
  364. package/hi-svg-icons/HiDownload.js +4 -14
  365. package/hi-svg-icons/HiFinance.js +4 -14
  366. package/hi-svg-icons/HiFinanceMenu.js +4 -14
  367. package/hi-svg-icons/HiHostedPaymentPage.js +4 -14
  368. package/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
  369. package/hi-svg-icons/HiIntegration.js +4 -14
  370. package/hi-svg-icons/HiIntegrationMenu.js +4 -14
  371. package/hi-svg-icons/HiIntelligence.js +4 -14
  372. package/hi-svg-icons/HiIntelligenceMenu.js +4 -14
  373. package/hi-svg-icons/HiInvoice.js +4 -14
  374. package/hi-svg-icons/HiInvoiceMenu.js +4 -14
  375. package/hi-svg-icons/HiLogoRounded.js +6 -17
  376. package/hi-svg-icons/HiOrder.js +4 -14
  377. package/hi-svg-icons/HiPaymentOrder.js +4 -14
  378. package/hi-svg-icons/HiPermission.js +4 -14
  379. package/hi-svg-icons/HiPriceGrid.js +4 -14
  380. package/hi-svg-icons/HiPrivate.js +4 -14
  381. package/hi-svg-icons/HiRoute.js +4 -14
  382. package/hi-svg-icons/HiRouteMenu.js +4 -14
  383. package/hi-svg-icons/HiRouteSwitch.js +7 -19
  384. package/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
  385. package/hi-svg-icons/HiSettlement.js +4 -14
  386. package/hi-svg-icons/HiSizeLarge.js +4 -14
  387. package/hi-svg-icons/HiSizeMedium.js +4 -14
  388. package/hi-svg-icons/HiSizeSmall.js +4 -14
  389. package/hi-svg-icons/HiStore.js +4 -14
  390. package/hi-svg-icons/HiStoreMenu.js +4 -14
  391. package/hi-svg-icons/HiTransaction.js +4 -14
  392. package/hi-svg-icons/HiTransactionMenu.js +4 -14
  393. package/hi-svg-icons/HiUser.js +4 -14
  394. package/hi-svg-icons/HiVendor.js +4 -14
  395. package/hi-svg-icons/HiWidget.js +4 -14
  396. package/hi-svg-icons/index.js +0 -41
  397. package/hi-svg-images/HiLogo.js +4 -12
  398. package/hi-svg-images/HiLogoWhite.js +4 -12
  399. package/hi-svg-images/index.js +0 -3
  400. package/package.json +2 -2
  401. package/setupTest.js +2 -13
  402. package/styleguide/Wrapper.js +0 -6
  403. package/styles/MuiThemeProvider.js +15 -49
  404. package/styles/colorManipulator.js +15 -50
  405. package/styles/createBreakpoints.js +14 -29
  406. package/styles/createGenerateClassName.js +14 -24
  407. package/styles/createMixins.js +4 -10
  408. package/styles/createMuiTheme.js +11 -28
  409. package/styles/createPalette.js +67 -89
  410. package/styles/createStyles.js +0 -1
  411. package/styles/createTypography.js +15 -24
  412. package/styles/getStylesCreator.js +1 -14
  413. package/styles/getThemeProps.js +2 -7
  414. package/styles/index.js +0 -6
  415. package/styles/jssPreset.js +1 -11
  416. package/styles/makeStyles.js +2 -9
  417. package/styles/mergeClasses.js +5 -16
  418. package/styles/shadows.js +1 -4
  419. package/styles/shape.js +1 -2
  420. package/styles/spacing.js +1 -4
  421. package/styles/themeListener.js +2 -10
  422. package/styles/transitions.js +20 -35
  423. package/styles/withStyles.js +2 -9
  424. package/styles/zIndex.js +1 -2
  425. package/test-utils/createMount.js +2 -12
  426. package/test-utils/createRender.js +2 -9
  427. package/test-utils/createShallow.js +6 -17
  428. package/test-utils/getClasses.js +1 -4
  429. package/test-utils/index.js +0 -6
  430. package/test-utils/until.js +3 -14
  431. package/test-utils/unwrap.js +0 -1
  432. package/theme/palette.js +2 -7
  433. package/theme/typography.js +7 -15
  434. package/theme.js +2 -8
  435. package/transitions/utils.js +3 -7
  436. package/utils/exactProp.js +3 -13
  437. package/utils/helpers.js +19 -58
  438. package/withMobileDialog/index.js +0 -2
  439. package/withMobileDialog/withMobileDialog.js +3 -12
@@ -1,23 +1,20 @@
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 _react = _interopRequireDefault(require("react"));
13
-
14
10
  var _pure = _interopRequireDefault(require("recompose/pure"));
15
-
11
+ /**
12
+ * @ignore - internal component.
13
+ */
16
14
  var _ref = /*#__PURE__*/_react.default.createElement("path", {
17
15
  fill: "#fff",
18
16
  d: "M288.84 117.53a19.9 19.9 0 00-22.74-2.37 710.68 710.68 0 01-82.57 39.71C201.92 84.49 219.32 26.53 219.6 25.6a19.87 19.87 0 10-38-11.45c-.32 1-22.26 74.14-43.11 156.53a426.51 426.51 0 01-48.87 11.67c-4.56.8-8.89 1.46-13 2a1440.07 1440.07 0 0143.5-143.68 19.87 19.87 0 00-37.2-14 1438.29 1438.29 0 00-47.87 160.16 99.22 99.22 0 01-11.81-1A19.87 19.87 0 1016.51 225c1.45.25 4.81.76 10 1.15-3 15.08-5.74 30.44-8 45.83a19.87 19.87 0 1039.3 5.89c2.64-17.58 5.88-35.19 9.48-52.44 8.68-.8 18.42-2.05 29.19-3.93q15.38-2.69 31.21-6.65c-5.14 21.79-9.94 43.45-14 63.89a19.87 19.87 0 1039 7.72c5.33-26.92 12-56 19-84.76a653.51 653.51 0 0067.15-27.7c-4.92 13.74-9.61 27.78-13.37 41-4.95 17.39-7.68 31.24-8.36 42.33-1.16 19.06 4.06 32.2 15.53 39.06a19.87 19.87 0 0024.12-31.24c-.42-4-.23-16.52 9.84-49 8-25.94 19.4-55.09 27.7-76.38a19.87 19.87 0 00-5.46-22.24zM522.37 78.05c-3.31-17.28-13.12-31.6-28.37-41.42-21.67-14-54.74-19.25-98.29-15.76a399.66 399.66 0 00-56.64 8.69 19.87 19.87 0 009.35 38.62c.06 0 1.83-.43 4.9-1.08q-4.63 20.18-9.3 40.36-7.83 33.8-15.73 67.56c-8.84 2.49-14.25 3.82-14.41 3.86a19.86 19.86 0 004.2 39.16c-1.12 4.69-2.23 9.38-3.36 14.07-3.73 15.44-7.38 30.91-11.61 46.22-2.86 10.35 3.54 22.8 14.35 25.26s22.19-3.26 25.25-14.34c7.6-27.49 14-55.36 20.46-83.16 17.56-5.56 39-13.05 60.32-22.23 29.5-12.72 52.69-26.14 68.94-39.9 30.27-25.64 32.99-49.96 29.94-65.91zm-55.51 35.49c-13.18 11.19-32.93 22.51-58.71 33.65-11.56 5-23.27 9.48-34.34 13.4Q384 117.08 394 73.52q1.49-6.43 3-12.88l2.52-.2c33.44-2.62 59.39.79 73.07 9.62 6.22 4 9.56 8.77 10.84 15.47 1.44 7.99-4.11 17.47-16.57 28.01zM680.18 451.45a20.55 20.55 0 01-2.46-.15 19.87 19.87 0 01-17.29-22.15c4.69-38.09 23.1-97.5 42-151.52a181.77 181.77 0 01-4.15 3.58c-19.52 16.26-37 23.44-53.43 22-13.48-1.23-24.34-8.09-30.57-19.32a43.31 43.31 0 01-2.61-5.64 140.32 140.32 0 01-44.42 22.89c-13 4-29.63 7.27-42.15-2.9a28.14 28.14 0 01-7.82-9.9 112.84 112.84 0 01-16.65 9.62c-20.55 9.39-34.59 5.71-42.75 1-15.67-9.11-22.29-29.68-16.46-51.18a164.63 164.63 0 0126-53.65c24.52-33.77 48.95-51.11 72.61-51.56 17-.33 29.92 8.38 35.86 15.94a19.88 19.88 0 012.25 21c-5.53 11.43-19.77 44.9-22.88 69.2q-.06.62-.15 1.23c-.11 1-.21 2-.28 2.91-.18 2.47-.4 4.8-.6 7-.11 1.2-.23 2.51-.34 3.83l1.69-.5c28.32-8.67 47.3-27.8 59.82-47.22q2-6.66 4.52-13.9a433 433 0 0119.78-47 19.87 19.87 0 0137.34 12.22 204.1 204.1 0 01-19.9 55.85q-2.38 4.51-5 8.82c-5 18.68-4.62 28.33-3.6 31.72 2.72.14 20.77-1.25 60.6-52.1a624.13 624.13 0 0041.86-61.3 19.87 19.87 0 0135.54 17.57c-.75 1.88-77.07 188.16-86.67 266.16a19.87 19.87 0 01-19.69 17.45zm-147.6-266.69c-7 3.59-18.11 12.18-33 32.63a125.07 125.07 0 00-19.83 40.71 18.63 18.63 0 00-.69 5.47c4.83-1.27 16.73-6.34 37.75-26.35 3.25-18.37 10-37.9 15.77-52.46zm12.74-1z"
19
17
  });
20
-
21
18
  var _ref2 = /*#__PURE__*/_react.default.createElement("ellipse", {
22
19
  cx: 285.79,
23
20
  cy: 66.13,
@@ -26,10 +23,6 @@ var _ref2 = /*#__PURE__*/_react.default.createElement("ellipse", {
26
23
  transform: "rotate(-45 285.784 66.134)",
27
24
  fill: "#ffcf21"
28
25
  });
29
-
30
- /**
31
- * @ignore - internal component.
32
- */
33
26
  var HiLogoWhite = (0, _pure.default)(function (props) {
34
27
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
35
28
  viewBox: "0 0 788.05 451.45",
@@ -37,5 +30,4 @@ var HiLogoWhite = (0, _pure.default)(function (props) {
37
30
  }, props), _ref, _ref2);
38
31
  });
39
32
  HiLogoWhite.muiName = 'SvgImage';
40
- var _default = HiLogoWhite;
41
- exports.default = _default;
33
+ var _default = exports.default = HiLogoWhite;
@@ -1,7 +1,6 @@
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
  });
@@ -17,7 +16,5 @@ Object.defineProperty(exports, "HiLogoWhite", {
17
16
  return _HiLogoWhite.default;
18
17
  }
19
18
  });
20
-
21
19
  var _HiLogo = _interopRequireDefault(require("./HiLogo"));
22
-
23
20
  var _HiLogoWhite = _interopRequireDefault(require("./HiLogoWhite"));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hipay/hipay-material-ui",
3
3
  "private": false,
4
- "version": "3.15.2",
4
+ "version": "3.15.3-beta.1",
5
5
  "description": "React components that implement Google's Material Design.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "homepage": "http://materialui.hipay.dev.local/",
15
15
  "peerDependencies": {
16
- "@hipay/design-system": "^1.3.1",
16
+ "@hipay/design-system": "1.7.3-beta.6",
17
17
  "@mui/material": "5.8.4",
18
18
  "@mui/styles": "5.8.4",
19
19
  "@mui/styled-engine": "npm:@mui/styled-engine-sc@5.10.0",
package/setupTest.js CHANGED
@@ -1,44 +1,33 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
6
-
7
5
  var _enzyme = _interopRequireDefault(require("enzyme"));
8
-
9
6
  var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
10
-
11
7
  _enzyme.default.configure({
12
8
  adapter: new _enzymeAdapterReact.default()
13
9
  });
10
+
14
11
  /**
15
12
  * SETUP JSDOM
16
13
  * https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md
17
14
  */
18
-
19
-
20
15
  var _require = require('jsdom'),
21
- JSDOM = _require.JSDOM;
22
-
16
+ JSDOM = _require.JSDOM;
23
17
  var jsdom = new JSDOM('<!doctype html><html><body></body></html>');
24
18
  var window = jsdom.window;
25
-
26
19
  function copyProps(src, target) {
27
20
  Object.defineProperties(target, (0, _objectSpread2.default)({}, Object.getOwnPropertyDescriptors(src), {}, Object.getOwnPropertyDescriptors(target)));
28
21
  }
29
-
30
22
  global.window = window;
31
23
  global.document = window.document;
32
24
  global.navigator = {
33
25
  userAgent: 'node.js'
34
26
  };
35
-
36
27
  global.requestAnimationFrame = function (callback) {
37
28
  return setTimeout(callback, 0);
38
29
  };
39
-
40
30
  global.cancelAnimationFrame = function (id) {
41
31
  clearTimeout(id);
42
32
  };
43
-
44
33
  copyProps(window, global);
@@ -1,18 +1,13 @@
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 = Wrapper;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _styles = require("@mui/material/styles");
13
-
14
10
  var _theme = _interopRequireDefault(require("../theme"));
15
-
16
11
  function Wrapper(_ref) {
17
12
  var children = _ref.children;
18
13
  return /*#__PURE__*/_react.default.createElement(_styles.StyledEngineProvider, {
@@ -21,5 +16,4 @@ function Wrapper(_ref) {
21
16
  theme: _theme.default
22
17
  }, children));
23
18
  }
24
-
25
19
  ;
@@ -1,48 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.default = void 0;
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
17
-
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
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 _propTypes = _interopRequireDefault(require("prop-types"));
29
-
30
18
  var _warning = _interopRequireDefault(require("warning"));
31
-
32
19
  var _brcast = _interopRequireDefault(require("brcast"));
33
-
34
20
  var _themeListener = _interopRequireWildcard(require("./themeListener"));
35
-
36
21
  var _exactProp = _interopRequireDefault(require("../utils/exactProp"));
37
-
38
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
-
40
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
41
-
22
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
42
24
  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); }; }
43
-
44
25
  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; } }
45
-
46
26
  /**
47
27
  * This component takes a `theme` property.
48
28
  * It makes the `theme` available down the React tree thanks to React context.
@@ -50,55 +30,44 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
50
30
  */
51
31
  var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
52
32
  (0, _inherits2.default)(MuiThemeProvider, _React$Component);
53
-
54
33
  var _super = _createSuper(MuiThemeProvider);
55
-
56
- // We are not using the React state in order to avoid unnecessary rerender.
57
34
  function MuiThemeProvider(props, context) {
58
35
  var _this;
59
-
60
36
  (0, _classCallCheck2.default)(this, MuiThemeProvider);
61
- _this = _super.call(this); // Get the outer theme from the context, can be null
62
-
37
+ _this = _super.call(this);
38
+ // Get the outer theme from the context, can be null
63
39
  _this.broadcast = (0, _brcast.default)();
64
40
  _this.unsubscribeId = null;
41
+ // We are not using the React state in order to avoid unnecessary rerender.
65
42
  _this.outerTheme = null;
66
- _this.outerTheme = _themeListener.default.initial(context); // Propagate the theme so it can be accessed by the children
67
-
43
+ _this.outerTheme = _themeListener.default.initial(context);
44
+ // Propagate the theme so it can be accessed by the children
68
45
  _this.broadcast.setState(_this.mergeOuterLocalTheme(props.theme));
69
-
70
46
  return _this;
71
47
  }
72
-
73
48
  (0, _createClass2.default)(MuiThemeProvider, [{
74
49
  key: "getChildContext",
75
50
  value: function getChildContext() {
76
- var _ref;
77
-
78
51
  var _this$props = this.props,
79
- sheetsManager = _this$props.sheetsManager,
80
- disableStylesGeneration = _this$props.disableStylesGeneration;
52
+ sheetsManager = _this$props.sheetsManager,
53
+ disableStylesGeneration = _this$props.disableStylesGeneration;
81
54
  var muiThemeProviderOptions = this.context.muiThemeProviderOptions || {};
82
-
83
55
  if (sheetsManager !== undefined) {
84
56
  muiThemeProviderOptions.sheetsManager = sheetsManager;
85
57
  }
86
-
87
58
  if (disableStylesGeneration !== undefined) {
88
59
  muiThemeProviderOptions.disableStylesGeneration = disableStylesGeneration;
89
60
  }
90
-
91
- return _ref = {}, (0, _defineProperty2.default)(_ref, _themeListener.CHANNEL, this.broadcast), (0, _defineProperty2.default)(_ref, "muiThemeProviderOptions", muiThemeProviderOptions), _ref;
61
+ return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _themeListener.CHANNEL, this.broadcast), "muiThemeProviderOptions", muiThemeProviderOptions);
92
62
  }
93
63
  }, {
94
64
  key: "componentDidMount",
95
65
  value: function componentDidMount() {
96
66
  var _this2 = this;
97
-
98
67
  // Subscribe on the outer theme, if present
99
68
  this.unsubscribeId = _themeListener.default.subscribe(this.context, function (outerTheme) {
100
- _this2.outerTheme = outerTheme; // Forward the parent theme update to the children
101
-
69
+ _this2.outerTheme = outerTheme;
70
+ // Forward the parent theme update to the children
102
71
  _this2.broadcast.setState(_this2.mergeOuterLocalTheme(_this2.props.theme));
103
72
  });
104
73
  }
@@ -116,8 +85,9 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
116
85
  if (this.unsubscribeId !== null) {
117
86
  _themeListener.default.unsubscribe(this.context, this.unsubscribeId);
118
87
  }
119
- } // Simple merge between the outer theme and the local theme
88
+ }
120
89
 
90
+ // Simple merge between the outer theme and the local theme
121
91
  }, {
122
92
  key: "mergeOuterLocalTheme",
123
93
  value: function mergeOuterLocalTheme(localTheme) {
@@ -126,11 +96,9 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
126
96
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(this.outerTheme, ['Material-UI: you are providing a theme function property ' + 'to the MuiThemeProvider component:', '<MuiThemeProvider theme={outerTheme => outerTheme} />', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n')) : void 0;
127
97
  return localTheme(this.outerTheme);
128
98
  }
129
-
130
99
  if (!this.outerTheme) {
131
100
  return localTheme;
132
101
  }
133
-
134
102
  return (0, _objectSpread2.default)({}, this.outerTheme, {}, localTheme);
135
103
  }
136
104
  }, {
@@ -150,12 +118,10 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
150
118
  }]);
151
119
  return MuiThemeProvider;
152
120
  }(_react.default.Component);
153
-
154
121
  MuiThemeProvider.childContextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
155
122
  muiThemeProviderOptions: _propTypes.default.object
156
123
  });
157
124
  MuiThemeProvider.contextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
158
125
  muiThemeProviderOptions: _propTypes.default.object
159
126
  });
160
- var _default = MuiThemeProvider;
161
- exports.default = _default;
127
+ var _default = exports.default = MuiThemeProvider;
@@ -1,7 +1,6 @@
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
  });
@@ -15,9 +14,7 @@ exports.getLuminance = getLuminance;
15
14
  exports.lighten = lighten;
16
15
  exports.recomposeColor = recomposeColor;
17
16
  exports.rgbToHex = rgbToHex;
18
-
19
17
  var _warning = _interopRequireDefault(require("warning"));
20
-
21
18
  /* eslint-disable no-use-before-define */
22
19
 
23
20
  /**
@@ -32,67 +29,58 @@ function clamp(value) {
32
29
  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
33
30
  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
34
31
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(value >= min && value <= max, "Material-UI: the value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "].")) : void 0;
35
-
36
32
  if (value < min) {
37
33
  return min;
38
34
  }
39
-
40
35
  if (value > max) {
41
36
  return max;
42
37
  }
43
-
44
38
  return value;
45
39
  }
40
+
46
41
  /**
47
42
  * Converts a color from CSS hex format to CSS rgb format.
48
43
  *
49
44
  * @param {string} color - Hex color, i.e. #nnn or #nnnnnn
50
45
  * @returns {string} A CSS rgb color string
51
46
  */
52
-
53
-
54
47
  function convertHexToRGB(color) {
55
48
  color = color.substr(1);
56
49
  var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g');
57
50
  var colors = color.match(re);
58
-
59
51
  if (colors && colors[0].length === 1) {
60
52
  colors = colors.map(function (n) {
61
53
  return n + n;
62
54
  });
63
55
  }
64
-
65
56
  return colors ? "rgb(".concat(colors.map(function (n) {
66
57
  return parseInt(n, 16);
67
58
  }).join(', '), ")") : '';
68
59
  }
60
+
69
61
  /**
70
62
  * Converts a color from CSS rgb format to CSS hex format.
71
63
  *
72
64
  * @param {string} color - RGB color, i.e. rgb(n, n, n)
73
65
  * @returns {string} A CSS rgb color string, i.e. #nnnnnn
74
66
  */
75
-
76
-
77
67
  function rgbToHex(color) {
78
68
  // Pass hex straight through
79
69
  if (color.indexOf('#') === 0) {
80
70
  return color;
81
71
  }
82
-
83
72
  function intToHex(c) {
84
73
  var hex = c.toString(16);
85
74
  return hex.length === 1 ? "0".concat(hex) : hex;
86
75
  }
87
-
88
76
  var _decomposeColor = decomposeColor(color),
89
- values = _decomposeColor.values;
90
-
77
+ values = _decomposeColor.values;
91
78
  values = values.map(function (n) {
92
79
  return intToHex(n);
93
80
  });
94
81
  return "#".concat(values.join(''));
95
82
  }
83
+
96
84
  /**
97
85
  * Returns an object with the type and values of a color.
98
86
  *
@@ -101,31 +89,27 @@ function rgbToHex(color) {
101
89
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
102
90
  * @returns {object} - A MUI color object: {type: string, values: number[]}
103
91
  */
104
-
105
-
106
92
  function decomposeColor(color) {
107
93
  if (color.charAt(0) === '#') {
108
94
  return decomposeColor(convertHexToRGB(color));
109
95
  }
110
-
111
96
  var marker = color.indexOf('(');
112
97
  var type = color.substring(0, marker);
113
98
  var values = color.substring(marker + 1, color.length - 1).split(',');
114
99
  values = values.map(function (value) {
115
100
  return parseFloat(value);
116
101
  });
117
-
118
102
  if (process.env.NODE_ENV !== 'production') {
119
103
  if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {
120
104
  throw new Error(["Material-UI: unsupported `".concat(color, "` color."), 'We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().'].join('\n'));
121
105
  }
122
106
  }
123
-
124
107
  return {
125
108
  type: type,
126
109
  values: values
127
110
  };
128
111
  }
112
+
129
113
  /**
130
114
  * Converts a color object with type and values to a string.
131
115
  *
@@ -134,26 +118,22 @@ function decomposeColor(color) {
134
118
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
135
119
  * @returns {string} A CSS color string
136
120
  */
137
-
138
-
139
121
  function recomposeColor(color) {
140
122
  var type = color.type;
141
123
  var values = color.values;
142
-
143
124
  if (type.indexOf('rgb') !== -1) {
144
125
  // Only convert the first 3 values to int (i.e. not alpha)
145
126
  values = values.map(function (n, i) {
146
127
  return i < 3 ? parseInt(n, 10) : n;
147
128
  });
148
129
  }
149
-
150
130
  if (type.indexOf('hsl') !== -1) {
151
131
  values[1] = "".concat(values[1], "%");
152
132
  values[2] = "".concat(values[2], "%");
153
133
  }
154
-
155
134
  return "".concat(color.type, "(").concat(values.join(', '), ")");
156
135
  }
136
+
157
137
  /**
158
138
  * Calculates the contrast ratio between two colors.
159
139
  *
@@ -163,13 +143,12 @@ function recomposeColor(color) {
163
143
  * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
164
144
  * @returns {number} A contrast ratio value in the range 0 - 21.
165
145
  */
166
-
167
-
168
146
  function getContrastRatio(foreground, background) {
169
147
  var lumA = getLuminance(foreground);
170
148
  var lumB = getLuminance(background);
171
149
  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
172
150
  }
151
+
173
152
  /**
174
153
  * The relative brightness of any point in a color space,
175
154
  * normalized to 0 for darkest black and 1 for lightest white.
@@ -179,24 +158,21 @@ function getContrastRatio(foreground, background) {
179
158
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
180
159
  * @returns {number} The relative brightness of the color in the range 0 - 1
181
160
  */
182
-
183
-
184
161
  function getLuminance(color) {
185
162
  var decomposedColor = decomposeColor(color);
186
-
187
163
  if (decomposedColor.type.indexOf('rgb') !== -1) {
188
164
  var rgb = decomposedColor.values.map(function (val) {
189
165
  val /= 255; // normalized
190
-
191
166
  return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
192
- }); // Truncate at 3 digits
193
-
167
+ });
168
+ // Truncate at 3 digits
194
169
  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
195
- } // else if (decomposedColor.type.indexOf('hsl') !== -1)
196
-
170
+ }
197
171
 
172
+ // else if (decomposedColor.type.indexOf('hsl') !== -1)
198
173
  return decomposedColor.values[2] / 100;
199
174
  }
175
+
200
176
  /**
201
177
  * Darken or lighten a colour, depending on its luminance.
202
178
  * Light colors are darkened, dark colors are lightened.
@@ -205,12 +181,11 @@ function getLuminance(color) {
205
181
  * @param {number} coefficient=0.15 - multiplier in the range 0 - 1
206
182
  * @returns {string} A CSS color string. Hex input values are returned as rgb
207
183
  */
208
-
209
-
210
184
  function emphasize(color) {
211
185
  var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
212
186
  return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
213
187
  }
188
+
214
189
  /**
215
190
  * Set the absolute transparency of a color.
216
191
  * Any existing alpha values are overwritten.
@@ -219,21 +194,18 @@ function emphasize(color) {
219
194
  * @param {number} value - value to set the alpha channel to in the range 0 -1
220
195
  * @returns {string} A CSS color string. Hex input values are returned as rgb
221
196
  */
222
-
223
-
224
197
  function fade(color, value) {
225
198
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0;
226
199
  if (!color) return color;
227
200
  color = decomposeColor(color);
228
201
  value = clamp(value);
229
-
230
202
  if (color.type === 'rgb' || color.type === 'hsl') {
231
203
  color.type += 'a';
232
204
  }
233
-
234
205
  color.values[3] = value;
235
206
  return recomposeColor(color);
236
207
  }
208
+
237
209
  /**
238
210
  * Darkens a color.
239
211
  *
@@ -241,14 +213,11 @@ function fade(color, value) {
241
213
  * @param {number} coefficient - multiplier in the range 0 - 1
242
214
  * @returns {string} A CSS color string. Hex input values are returned as rgb
243
215
  */
244
-
245
-
246
216
  function darken(color, coefficient) {
247
217
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0;
248
218
  if (!color) return color;
249
219
  color = decomposeColor(color);
250
220
  coefficient = clamp(coefficient);
251
-
252
221
  if (color.type.indexOf('hsl') !== -1) {
253
222
  color.values[2] *= 1 - coefficient;
254
223
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -256,9 +225,9 @@ function darken(color, coefficient) {
256
225
  color.values[i] *= 1 - coefficient;
257
226
  }
258
227
  }
259
-
260
228
  return recomposeColor(color);
261
229
  }
230
+
262
231
  /**
263
232
  * Lightens a color.
264
233
  *
@@ -266,14 +235,11 @@ function darken(color, coefficient) {
266
235
  * @param {number} coefficient - multiplier in the range 0 - 1
267
236
  * @returns {string} A CSS color string. Hex input values are returned as rgb
268
237
  */
269
-
270
-
271
238
  function lighten(color, coefficient) {
272
239
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0;
273
240
  if (!color) return color;
274
241
  color = decomposeColor(color);
275
242
  coefficient = clamp(coefficient);
276
-
277
243
  if (color.type.indexOf('hsl') !== -1) {
278
244
  color.values[2] += (100 - color.values[2]) * coefficient;
279
245
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -281,6 +247,5 @@ function lighten(color, coefficient) {
281
247
  color.values[i] += (255 - color.values[i]) * coefficient;
282
248
  }
283
249
  }
284
-
285
250
  return recomposeColor(color);
286
251
  }
@@ -1,74 +1,59 @@
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 = createBreakpoints;
9
8
  exports.keys = void 0;
10
-
11
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
12
-
13
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
14
-
15
11
  // Sorted ASC by size. That's important.
16
12
  // It can't be configured as it's used statically for propTypes.
17
- var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.
18
-
19
- exports.keys = keys;
13
+ var keys = exports.keys = ['xs', 'sm', 'md', 'lg', 'xl'];
20
14
 
15
+ // Keep in mind that @media is inclusive by the CSS specification.
21
16
  function createBreakpoints(breakpoints) {
22
17
  var _breakpoints$values = breakpoints.values,
23
- values = _breakpoints$values === void 0 ? {
24
- xs: 0,
25
- sm: 600,
26
- md: 960,
27
- lg: 1280,
28
- xl: 1920
29
- } : _breakpoints$values,
30
- _breakpoints$unit = breakpoints.unit,
31
- unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
32
- _breakpoints$step = breakpoints.step,
33
- step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
34
- other = (0, _objectWithoutProperties2.default)(breakpoints, ["values", "unit", "step"]);
35
-
18
+ values = _breakpoints$values === void 0 ? {
19
+ xs: 0,
20
+ sm: 600,
21
+ md: 960,
22
+ lg: 1280,
23
+ xl: 1920
24
+ } : _breakpoints$values,
25
+ _breakpoints$unit = breakpoints.unit,
26
+ unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
27
+ _breakpoints$step = breakpoints.step,
28
+ step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
29
+ other = (0, _objectWithoutProperties2.default)(breakpoints, ["values", "unit", "step"]);
36
30
  function up(key) {
37
31
  var value = typeof values[key] === 'number' ? values[key] : key;
38
32
  return "@media (min-width:".concat(value).concat(unit, ")");
39
33
  }
40
-
41
34
  function down(key) {
42
35
  var endIndex = keys.indexOf(key) + 1;
43
36
  var upperbound = values[keys[endIndex]];
44
-
45
37
  if (endIndex === keys.length) {
46
38
  // xl down applies to all sizes
47
39
  return up('xs');
48
40
  }
49
-
50
41
  var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;
51
42
  return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
52
43
  }
53
-
54
44
  function between(start, end) {
55
45
  var endIndex = keys.indexOf(end) + 1;
56
-
57
46
  if (endIndex === keys.length) {
58
47
  return up(start);
59
48
  }
60
-
61
49
  return "@media (min-width:".concat(values[start]).concat(unit, ") and ") + "(max-width:".concat(values[keys[endIndex]] - step / 100).concat(unit, ")");
62
50
  }
63
-
64
51
  function only(key) {
65
52
  return between(key, key);
66
53
  }
67
-
68
54
  function width(key) {
69
55
  return values[key];
70
56
  }
71
-
72
57
  return (0, _objectSpread2.default)({
73
58
  keys: keys,
74
59
  values: values,