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

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 +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 +47 -15
  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 +35 -10
  16. package/HiBreadcrumb/HiStep.js +50 -17
  17. package/HiBreadcrumb/HiStepConnector.js +55 -18
  18. package/HiBreadcrumb/HiStepContent.js +35 -10
  19. package/HiBreadcrumb/HiStepIcon.js +40 -14
  20. package/HiBreadcrumb/HiStepLabel.js +49 -18
  21. package/HiBreadcrumb/HiStepper.js +35 -10
  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 +38 -16
  26. package/HiCell/CellDate.js +41 -14
  27. package/HiCell/CellHiddenContent.js +30 -8
  28. package/HiCell/CellIcon.js +41 -16
  29. package/HiCell/CellImage.js +39 -16
  30. package/HiCell/CellNumeric.js +45 -17
  31. package/HiCell/CellPinToAction.js +38 -13
  32. package/HiCell/CellRate.js +52 -17
  33. package/HiCell/CellSentinel.js +38 -16
  34. package/HiCell/CellSentinelScore.js +36 -13
  35. package/HiCell/CellText.js +58 -21
  36. package/HiCell/CellTextStyled.js +24 -13
  37. package/HiCell/index.js +10 -0
  38. package/HiCheckbox/HiCheckbox.js +57 -19
  39. package/HiCheckbox/index.js +2 -0
  40. package/HiChip/HiChip.js +47 -24
  41. package/HiChip/HiChipSwitch.js +65 -21
  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 +93 -20
  47. package/HiDatePicker/HiDatePickerMobile.js +48 -22
  48. package/HiDatePicker/HiDateRangePicker.js +139 -42
  49. package/HiDatePicker/HiDateRangeSelector.js +135 -53
  50. package/HiDatePicker/ListPicker.js +43 -12
  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 +32 -9
  55. package/HiDatePicker/Overlays/Overlay.js +25 -8
  56. package/HiDatePicker/Overlays/TimePickerOverlay.js +45 -13
  57. package/HiDatePicker/Overlays/YearPickerOverlay.js +38 -13
  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 -6
  63. package/HiDialog/HiDialog.js +19 -7
  64. package/HiDialog/index.js +2 -0
  65. package/HiDotsStepper/HiDot.js +42 -12
  66. package/HiDotsStepper/HiDotsStepper.js +43 -15
  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 +41 -14
  71. package/HiForm/HiEmailField.js +34 -9
  72. package/HiForm/HiFormControl.js +79 -32
  73. package/HiForm/HiFormLabel.js +45 -18
  74. package/HiForm/HiInput.js +97 -37
  75. package/HiForm/HiPasswordField.js +43 -13
  76. package/HiForm/HiSearchField.js +40 -8
  77. package/HiForm/HiSlider.js +62 -26
  78. package/HiForm/HiTextField.js +52 -26
  79. package/HiForm/HiUpload.js +94 -33
  80. package/HiForm/HiUploadField.js +37 -14
  81. package/HiForm/HiUploadInput.js +81 -25
  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 -6
  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 +53 -21
  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 +61 -27
  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 +47 -36
  107. package/HiSelect/HiDynamicSelectField.js +52 -27
  108. package/HiSelect/HiNestedSelect.js +116 -69
  109. package/HiSelect/HiNestedSelectContent.js +90 -63
  110. package/HiSelect/HiNestedSelectField.js +52 -27
  111. package/HiSelect/HiSelect.js +192 -93
  112. package/HiSelect/HiSelectContent.js +103 -67
  113. package/HiSelect/HiSelectField.js +53 -28
  114. package/HiSelect/HiSelectInput.js +81 -25
  115. package/HiSelect/HiSelectMobile.js +49 -11
  116. package/HiSelect/HiSuggestSelect.js +85 -28
  117. package/HiSelect/HiSuggestSelectField.js +43 -18
  118. package/HiSelect/index.js +14 -2
  119. package/HiSelectableList/HiSelectableList.js +95 -38
  120. package/HiSelectableList/HiSelectableListHierarchic.js +65 -38
  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 +69 -13
  131. package/HiTable/HiTable.js +48 -20
  132. package/HiTable/HiTableBody.js +28 -10
  133. package/HiTable/HiTableHeader.js +55 -21
  134. package/HiTable/HiTableRow.js +51 -16
  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 +47 -15
  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 +35 -10
  152. package/es/HiBreadcrumb/HiStep.js +50 -17
  153. package/es/HiBreadcrumb/HiStepConnector.js +55 -18
  154. package/es/HiBreadcrumb/HiStepContent.js +35 -10
  155. package/es/HiBreadcrumb/HiStepIcon.js +40 -14
  156. package/es/HiBreadcrumb/HiStepLabel.js +49 -18
  157. package/es/HiBreadcrumb/HiStepper.js +35 -10
  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 +38 -16
  162. package/es/HiCell/CellDate.js +41 -14
  163. package/es/HiCell/CellHiddenContent.js +30 -8
  164. package/es/HiCell/CellIcon.js +41 -16
  165. package/es/HiCell/CellImage.js +39 -16
  166. package/es/HiCell/CellNumeric.js +45 -17
  167. package/es/HiCell/CellPinToAction.js +38 -13
  168. package/es/HiCell/CellRate.js +52 -17
  169. package/es/HiCell/CellSentinel.js +38 -16
  170. package/es/HiCell/CellSentinelScore.js +36 -13
  171. package/es/HiCell/CellText.js +58 -21
  172. package/es/HiCell/CellTextStyled.js +24 -13
  173. package/es/HiCell/index.js +10 -0
  174. package/es/HiCheckbox/HiCheckbox.js +57 -19
  175. package/es/HiCheckbox/index.js +2 -0
  176. package/es/HiChip/HiChip.js +47 -24
  177. package/es/HiChip/HiChipSwitch.js +65 -21
  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 +93 -20
  183. package/es/HiDatePicker/HiDatePickerMobile.js +48 -22
  184. package/es/HiDatePicker/HiDateRangePicker.js +139 -42
  185. package/es/HiDatePicker/HiDateRangeSelector.js +135 -53
  186. package/es/HiDatePicker/ListPicker.js +43 -12
  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 +32 -9
  191. package/es/HiDatePicker/Overlays/Overlay.js +25 -8
  192. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +45 -13
  193. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +38 -13
  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 -6
  199. package/es/HiDialog/HiDialog.js +19 -7
  200. package/es/HiDialog/index.js +2 -0
  201. package/es/HiDotsStepper/HiDot.js +42 -12
  202. package/es/HiDotsStepper/HiDotsStepper.js +43 -15
  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 +41 -14
  207. package/es/HiForm/HiEmailField.js +34 -9
  208. package/es/HiForm/HiFormControl.js +79 -32
  209. package/es/HiForm/HiFormLabel.js +45 -18
  210. package/es/HiForm/HiInput.js +97 -37
  211. package/es/HiForm/HiPasswordField.js +43 -13
  212. package/es/HiForm/HiSearchField.js +40 -8
  213. package/es/HiForm/HiSlider.js +62 -26
  214. package/es/HiForm/HiTextField.js +52 -26
  215. package/es/HiForm/HiUpload.js +94 -33
  216. package/es/HiForm/HiUploadField.js +37 -14
  217. package/es/HiForm/HiUploadInput.js +81 -25
  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 -6
  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 +53 -21
  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 +61 -27
  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 +47 -36
  243. package/es/HiSelect/HiDynamicSelectField.js +52 -27
  244. package/es/HiSelect/HiNestedSelect.js +116 -69
  245. package/es/HiSelect/HiNestedSelectContent.js +90 -63
  246. package/es/HiSelect/HiNestedSelectField.js +52 -27
  247. package/es/HiSelect/HiSelect.js +192 -93
  248. package/es/HiSelect/HiSelectContent.js +103 -67
  249. package/es/HiSelect/HiSelectField.js +53 -28
  250. package/es/HiSelect/HiSelectInput.js +81 -25
  251. package/es/HiSelect/HiSelectMobile.js +49 -11
  252. package/es/HiSelect/HiSuggestSelect.js +85 -28
  253. package/es/HiSelect/HiSuggestSelectField.js +43 -18
  254. package/es/HiSelect/index.js +14 -2
  255. package/es/HiSelectableList/HiSelectableList.js +95 -38
  256. package/es/HiSelectableList/HiSelectableListHierarchic.js +65 -38
  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 +69 -13
  267. package/es/HiTable/HiTable.js +48 -20
  268. package/es/HiTable/HiTableBody.js +28 -10
  269. package/es/HiTable/HiTableHeader.js +55 -21
  270. package/es/HiTable/HiTableRow.js +51 -16
  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 +53 -18
  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 -66
  326. package/es/styles/createStyles.js +1 -0
  327. package/es/styles/createTypography.js +24 -15
  328. package/es/styles/getStylesCreator.js +14 -2
  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 +1 -1
  401. package/setupTest.js +13 -2
  402. package/styleguide/Wrapper.js +6 -0
  403. package/styles/MuiThemeProvider.js +53 -18
  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 -66
  410. package/styles/createStyles.js +1 -0
  411. package/styles/createTypography.js +24 -15
  412. package/styles/getStylesCreator.js +14 -2
  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
@@ -1,6 +1,7 @@
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
  });
@@ -16,5 +17,7 @@ Object.defineProperty(exports, "HiLogoWhite", {
16
17
  return _HiLogoWhite.default;
17
18
  }
18
19
  });
20
+
19
21
  var _HiLogo = _interopRequireDefault(require("./HiLogo"));
22
+
20
23
  var _HiLogoWhite = _interopRequireDefault(require("./HiLogoWhite"));
package/es/setupTest.js CHANGED
@@ -1,33 +1,44 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
6
+
5
7
  var _enzyme = _interopRequireDefault(require("enzyme"));
8
+
6
9
  var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
10
+
7
11
  _enzyme.default.configure({
8
12
  adapter: new _enzymeAdapterReact.default()
9
13
  });
10
-
11
14
  /**
12
15
  * SETUP JSDOM
13
16
  * https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md
14
17
  */
18
+
19
+
15
20
  var _require = require('jsdom'),
16
- JSDOM = _require.JSDOM;
21
+ JSDOM = _require.JSDOM;
22
+
17
23
  var jsdom = new JSDOM('<!doctype html><html><body></body></html>');
18
24
  var window = jsdom.window;
25
+
19
26
  function copyProps(src, target) {
20
27
  Object.defineProperties(target, (0, _objectSpread2.default)({}, Object.getOwnPropertyDescriptors(src), {}, Object.getOwnPropertyDescriptors(target)));
21
28
  }
29
+
22
30
  global.window = window;
23
31
  global.document = window.document;
24
32
  global.navigator = {
25
33
  userAgent: 'node.js'
26
34
  };
35
+
27
36
  global.requestAnimationFrame = function (callback) {
28
37
  return setTimeout(callback, 0);
29
38
  };
39
+
30
40
  global.cancelAnimationFrame = function (id) {
31
41
  clearTimeout(id);
32
42
  };
43
+
33
44
  copyProps(window, global);
@@ -1,13 +1,18 @@
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 = Wrapper;
9
+
8
10
  var _react = _interopRequireDefault(require("react"));
11
+
9
12
  var _styles = require("@mui/material/styles");
13
+
10
14
  var _theme = _interopRequireDefault(require("../theme"));
15
+
11
16
  function Wrapper(_ref) {
12
17
  var children = _ref.children;
13
18
  return /*#__PURE__*/_react.default.createElement(_styles.StyledEngineProvider, {
@@ -16,4 +21,5 @@ function Wrapper(_ref) {
16
21
  theme: _theme.default
17
22
  }, children));
18
23
  }
24
+
19
25
  ;
@@ -1,28 +1,48 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  var _typeof = require("@babel/runtime/helpers/typeof");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
8
10
  exports.default = void 0;
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
17
+
12
18
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
19
+
20
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
21
+
13
22
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
23
+
14
24
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
15
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
25
+
16
26
  var _react = _interopRequireDefault(require("react"));
27
+
17
28
  var _propTypes = _interopRequireDefault(require("prop-types"));
29
+
18
30
  var _warning = _interopRequireDefault(require("warning"));
31
+
19
32
  var _brcast = _interopRequireDefault(require("brcast"));
33
+
20
34
  var _themeListener = _interopRequireWildcard(require("./themeListener"));
35
+
21
36
  var _exactProp = _interopRequireDefault(require("../utils/exactProp"));
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; }
24
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
25
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
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
+
42
+ 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
+ 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
+
26
46
  /**
27
47
  * This component takes a `theme` property.
28
48
  * It makes the `theme` available down the React tree thanks to React context.
@@ -30,43 +50,55 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
30
50
  */
31
51
  var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
32
52
  (0, _inherits2.default)(MuiThemeProvider, _React$Component);
53
+
54
+ var _super = _createSuper(MuiThemeProvider);
55
+
56
+ // We are not using the React state in order to avoid unnecessary rerender.
33
57
  function MuiThemeProvider(props, context) {
34
58
  var _this;
59
+
35
60
  (0, _classCallCheck2.default)(this, MuiThemeProvider);
36
- _this = _callSuper(this, MuiThemeProvider);
37
- // Get the outer theme from the context, can be null
61
+ _this = _super.call(this); // Get the outer theme from the context, can be null
62
+
38
63
  _this.broadcast = (0, _brcast.default)();
39
64
  _this.unsubscribeId = null;
40
- // We are not using the React state in order to avoid unnecessary rerender.
41
65
  _this.outerTheme = null;
42
- _this.outerTheme = _themeListener.default.initial(context);
43
- // Propagate the theme so it can be accessed by the children
66
+ _this.outerTheme = _themeListener.default.initial(context); // Propagate the theme so it can be accessed by the children
67
+
44
68
  _this.broadcast.setState(_this.mergeOuterLocalTheme(props.theme));
69
+
45
70
  return _this;
46
71
  }
72
+
47
73
  (0, _createClass2.default)(MuiThemeProvider, [{
48
74
  key: "getChildContext",
49
75
  value: function getChildContext() {
76
+ var _ref;
77
+
50
78
  var _this$props = this.props,
51
- sheetsManager = _this$props.sheetsManager,
52
- disableStylesGeneration = _this$props.disableStylesGeneration;
79
+ sheetsManager = _this$props.sheetsManager,
80
+ disableStylesGeneration = _this$props.disableStylesGeneration;
53
81
  var muiThemeProviderOptions = this.context.muiThemeProviderOptions || {};
82
+
54
83
  if (sheetsManager !== undefined) {
55
84
  muiThemeProviderOptions.sheetsManager = sheetsManager;
56
85
  }
86
+
57
87
  if (disableStylesGeneration !== undefined) {
58
88
  muiThemeProviderOptions.disableStylesGeneration = disableStylesGeneration;
59
89
  }
60
- return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _themeListener.CHANNEL, this.broadcast), "muiThemeProviderOptions", muiThemeProviderOptions);
90
+
91
+ return _ref = {}, (0, _defineProperty2.default)(_ref, _themeListener.CHANNEL, this.broadcast), (0, _defineProperty2.default)(_ref, "muiThemeProviderOptions", muiThemeProviderOptions), _ref;
61
92
  }
62
93
  }, {
63
94
  key: "componentDidMount",
64
95
  value: function componentDidMount() {
65
96
  var _this2 = this;
97
+
66
98
  // Subscribe on the outer theme, if present
67
99
  this.unsubscribeId = _themeListener.default.subscribe(this.context, function (outerTheme) {
68
- _this2.outerTheme = outerTheme;
69
- // Forward the parent theme update to the children
100
+ _this2.outerTheme = outerTheme; // Forward the parent theme update to the children
101
+
70
102
  _this2.broadcast.setState(_this2.mergeOuterLocalTheme(_this2.props.theme));
71
103
  });
72
104
  }
@@ -84,9 +116,8 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
84
116
  if (this.unsubscribeId !== null) {
85
117
  _themeListener.default.unsubscribe(this.context, this.unsubscribeId);
86
118
  }
87
- }
119
+ } // Simple merge between the outer theme and the local theme
88
120
 
89
- // Simple merge between the outer theme and the local theme
90
121
  }, {
91
122
  key: "mergeOuterLocalTheme",
92
123
  value: function mergeOuterLocalTheme(localTheme) {
@@ -95,9 +126,11 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
95
126
  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;
96
127
  return localTheme(this.outerTheme);
97
128
  }
129
+
98
130
  if (!this.outerTheme) {
99
131
  return localTheme;
100
132
  }
133
+
101
134
  return (0, _objectSpread2.default)({}, this.outerTheme, {}, localTheme);
102
135
  }
103
136
  }, {
@@ -117,10 +150,12 @@ var MuiThemeProvider = /*#__PURE__*/function (_React$Component) {
117
150
  }]);
118
151
  return MuiThemeProvider;
119
152
  }(_react.default.Component);
153
+
120
154
  MuiThemeProvider.childContextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
121
155
  muiThemeProviderOptions: _propTypes.default.object
122
156
  });
123
157
  MuiThemeProvider.contextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
124
158
  muiThemeProviderOptions: _propTypes.default.object
125
159
  });
126
- var _default = exports.default = MuiThemeProvider;
160
+ var _default = MuiThemeProvider;
161
+ exports.default = _default;
@@ -1,6 +1,7 @@
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
  });
@@ -14,7 +15,9 @@ exports.getLuminance = getLuminance;
14
15
  exports.lighten = lighten;
15
16
  exports.recomposeColor = recomposeColor;
16
17
  exports.rgbToHex = rgbToHex;
18
+
17
19
  var _warning = _interopRequireDefault(require("warning"));
20
+
18
21
  /* eslint-disable no-use-before-define */
19
22
 
20
23
  /**
@@ -29,58 +32,67 @@ function clamp(value) {
29
32
  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
30
33
  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
31
34
  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
+
32
36
  if (value < min) {
33
37
  return min;
34
38
  }
39
+
35
40
  if (value > max) {
36
41
  return max;
37
42
  }
43
+
38
44
  return value;
39
45
  }
40
-
41
46
  /**
42
47
  * Converts a color from CSS hex format to CSS rgb format.
43
48
  *
44
49
  * @param {string} color - Hex color, i.e. #nnn or #nnnnnn
45
50
  * @returns {string} A CSS rgb color string
46
51
  */
52
+
53
+
47
54
  function convertHexToRGB(color) {
48
55
  color = color.substr(1);
49
56
  var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g');
50
57
  var colors = color.match(re);
58
+
51
59
  if (colors && colors[0].length === 1) {
52
60
  colors = colors.map(function (n) {
53
61
  return n + n;
54
62
  });
55
63
  }
64
+
56
65
  return colors ? "rgb(".concat(colors.map(function (n) {
57
66
  return parseInt(n, 16);
58
67
  }).join(', '), ")") : '';
59
68
  }
60
-
61
69
  /**
62
70
  * Converts a color from CSS rgb format to CSS hex format.
63
71
  *
64
72
  * @param {string} color - RGB color, i.e. rgb(n, n, n)
65
73
  * @returns {string} A CSS rgb color string, i.e. #nnnnnn
66
74
  */
75
+
76
+
67
77
  function rgbToHex(color) {
68
78
  // Pass hex straight through
69
79
  if (color.indexOf('#') === 0) {
70
80
  return color;
71
81
  }
82
+
72
83
  function intToHex(c) {
73
84
  var hex = c.toString(16);
74
85
  return hex.length === 1 ? "0".concat(hex) : hex;
75
86
  }
87
+
76
88
  var _decomposeColor = decomposeColor(color),
77
- values = _decomposeColor.values;
89
+ values = _decomposeColor.values;
90
+
78
91
  values = values.map(function (n) {
79
92
  return intToHex(n);
80
93
  });
81
94
  return "#".concat(values.join(''));
82
95
  }
83
-
84
96
  /**
85
97
  * Returns an object with the type and values of a color.
86
98
  *
@@ -89,27 +101,31 @@ function rgbToHex(color) {
89
101
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
90
102
  * @returns {object} - A MUI color object: {type: string, values: number[]}
91
103
  */
104
+
105
+
92
106
  function decomposeColor(color) {
93
107
  if (color.charAt(0) === '#') {
94
108
  return decomposeColor(convertHexToRGB(color));
95
109
  }
110
+
96
111
  var marker = color.indexOf('(');
97
112
  var type = color.substring(0, marker);
98
113
  var values = color.substring(marker + 1, color.length - 1).split(',');
99
114
  values = values.map(function (value) {
100
115
  return parseFloat(value);
101
116
  });
117
+
102
118
  if (process.env.NODE_ENV !== 'production') {
103
119
  if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {
104
120
  throw new Error(["Material-UI: unsupported `".concat(color, "` color."), 'We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().'].join('\n'));
105
121
  }
106
122
  }
123
+
107
124
  return {
108
125
  type: type,
109
126
  values: values
110
127
  };
111
128
  }
112
-
113
129
  /**
114
130
  * Converts a color object with type and values to a string.
115
131
  *
@@ -118,22 +134,26 @@ function decomposeColor(color) {
118
134
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
119
135
  * @returns {string} A CSS color string
120
136
  */
137
+
138
+
121
139
  function recomposeColor(color) {
122
140
  var type = color.type;
123
141
  var values = color.values;
142
+
124
143
  if (type.indexOf('rgb') !== -1) {
125
144
  // Only convert the first 3 values to int (i.e. not alpha)
126
145
  values = values.map(function (n, i) {
127
146
  return i < 3 ? parseInt(n, 10) : n;
128
147
  });
129
148
  }
149
+
130
150
  if (type.indexOf('hsl') !== -1) {
131
151
  values[1] = "".concat(values[1], "%");
132
152
  values[2] = "".concat(values[2], "%");
133
153
  }
154
+
134
155
  return "".concat(color.type, "(").concat(values.join(', '), ")");
135
156
  }
136
-
137
157
  /**
138
158
  * Calculates the contrast ratio between two colors.
139
159
  *
@@ -143,12 +163,13 @@ function recomposeColor(color) {
143
163
  * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
144
164
  * @returns {number} A contrast ratio value in the range 0 - 21.
145
165
  */
166
+
167
+
146
168
  function getContrastRatio(foreground, background) {
147
169
  var lumA = getLuminance(foreground);
148
170
  var lumB = getLuminance(background);
149
171
  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
150
172
  }
151
-
152
173
  /**
153
174
  * The relative brightness of any point in a color space,
154
175
  * normalized to 0 for darkest black and 1 for lightest white.
@@ -158,21 +179,24 @@ function getContrastRatio(foreground, background) {
158
179
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
159
180
  * @returns {number} The relative brightness of the color in the range 0 - 1
160
181
  */
182
+
183
+
161
184
  function getLuminance(color) {
162
185
  var decomposedColor = decomposeColor(color);
186
+
163
187
  if (decomposedColor.type.indexOf('rgb') !== -1) {
164
188
  var rgb = decomposedColor.values.map(function (val) {
165
189
  val /= 255; // normalized
190
+
166
191
  return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
167
- });
168
- // Truncate at 3 digits
192
+ }); // Truncate at 3 digits
193
+
169
194
  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
170
- }
195
+ } // else if (decomposedColor.type.indexOf('hsl') !== -1)
196
+
171
197
 
172
- // else if (decomposedColor.type.indexOf('hsl') !== -1)
173
198
  return decomposedColor.values[2] / 100;
174
199
  }
175
-
176
200
  /**
177
201
  * Darken or lighten a colour, depending on its luminance.
178
202
  * Light colors are darkened, dark colors are lightened.
@@ -181,11 +205,12 @@ function getLuminance(color) {
181
205
  * @param {number} coefficient=0.15 - multiplier in the range 0 - 1
182
206
  * @returns {string} A CSS color string. Hex input values are returned as rgb
183
207
  */
208
+
209
+
184
210
  function emphasize(color) {
185
211
  var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
186
212
  return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
187
213
  }
188
-
189
214
  /**
190
215
  * Set the absolute transparency of a color.
191
216
  * Any existing alpha values are overwritten.
@@ -194,18 +219,21 @@ function emphasize(color) {
194
219
  * @param {number} value - value to set the alpha channel to in the range 0 -1
195
220
  * @returns {string} A CSS color string. Hex input values are returned as rgb
196
221
  */
222
+
223
+
197
224
  function fade(color, value) {
198
225
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0;
199
226
  if (!color) return color;
200
227
  color = decomposeColor(color);
201
228
  value = clamp(value);
229
+
202
230
  if (color.type === 'rgb' || color.type === 'hsl') {
203
231
  color.type += 'a';
204
232
  }
233
+
205
234
  color.values[3] = value;
206
235
  return recomposeColor(color);
207
236
  }
208
-
209
237
  /**
210
238
  * Darkens a color.
211
239
  *
@@ -213,11 +241,14 @@ function fade(color, value) {
213
241
  * @param {number} coefficient - multiplier in the range 0 - 1
214
242
  * @returns {string} A CSS color string. Hex input values are returned as rgb
215
243
  */
244
+
245
+
216
246
  function darken(color, coefficient) {
217
247
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0;
218
248
  if (!color) return color;
219
249
  color = decomposeColor(color);
220
250
  coefficient = clamp(coefficient);
251
+
221
252
  if (color.type.indexOf('hsl') !== -1) {
222
253
  color.values[2] *= 1 - coefficient;
223
254
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -225,9 +256,9 @@ function darken(color, coefficient) {
225
256
  color.values[i] *= 1 - coefficient;
226
257
  }
227
258
  }
259
+
228
260
  return recomposeColor(color);
229
261
  }
230
-
231
262
  /**
232
263
  * Lightens a color.
233
264
  *
@@ -235,11 +266,14 @@ function darken(color, coefficient) {
235
266
  * @param {number} coefficient - multiplier in the range 0 - 1
236
267
  * @returns {string} A CSS color string. Hex input values are returned as rgb
237
268
  */
269
+
270
+
238
271
  function lighten(color, coefficient) {
239
272
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0;
240
273
  if (!color) return color;
241
274
  color = decomposeColor(color);
242
275
  coefficient = clamp(coefficient);
276
+
243
277
  if (color.type.indexOf('hsl') !== -1) {
244
278
  color.values[2] += (100 - color.values[2]) * coefficient;
245
279
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -247,5 +281,6 @@ function lighten(color, coefficient) {
247
281
  color.values[i] += (255 - color.values[i]) * coefficient;
248
282
  }
249
283
  }
284
+
250
285
  return recomposeColor(color);
251
286
  }
@@ -1,59 +1,74 @@
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 = createBreakpoints;
8
9
  exports.keys = void 0;
10
+
9
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
12
+
10
13
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
14
+
11
15
  // Sorted ASC by size. That's important.
12
16
  // It can't be configured as it's used statically for propTypes.
13
- var keys = exports.keys = ['xs', 'sm', 'md', 'lg', 'xl'];
17
+ var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.
18
+
19
+ exports.keys = keys;
14
20
 
15
- // Keep in mind that @media is inclusive by the CSS specification.
16
21
  function createBreakpoints(breakpoints) {
17
22
  var _breakpoints$values = breakpoints.values,
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"]);
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
+
30
36
  function up(key) {
31
37
  var value = typeof values[key] === 'number' ? values[key] : key;
32
38
  return "@media (min-width:".concat(value).concat(unit, ")");
33
39
  }
40
+
34
41
  function down(key) {
35
42
  var endIndex = keys.indexOf(key) + 1;
36
43
  var upperbound = values[keys[endIndex]];
44
+
37
45
  if (endIndex === keys.length) {
38
46
  // xl down applies to all sizes
39
47
  return up('xs');
40
48
  }
49
+
41
50
  var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;
42
51
  return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
43
52
  }
53
+
44
54
  function between(start, end) {
45
55
  var endIndex = keys.indexOf(end) + 1;
56
+
46
57
  if (endIndex === keys.length) {
47
58
  return up(start);
48
59
  }
60
+
49
61
  return "@media (min-width:".concat(values[start]).concat(unit, ") and ") + "(max-width:".concat(values[keys[endIndex]] - step / 100).concat(unit, ")");
50
62
  }
63
+
51
64
  function only(key) {
52
65
  return between(key, key);
53
66
  }
67
+
54
68
  function width(key) {
55
69
  return values[key];
56
70
  }
71
+
57
72
  return (0, _objectSpread2.default)({
58
73
  keys: keys,
59
74
  values: values,