@hipay/hipay-material-ui 2.3.1-rc3 → 2.3.1-rc4
Sign up to get free protection for your applications and to get access to all the features.
- package/App.test.js +8 -0
- package/HiAlertModal/HiAlertModal.js +48 -77
- package/HiAlertModal/HiAlertModal.test.js +189 -0
- package/HiAlertModal/index.js +1 -15
- package/HiAppBar/HiAppBar.js +34 -63
- package/HiAppBar/index.js +1 -15
- package/HiBadge/HiBadge.js +10 -29
- package/HiBadge/HiBadge.test.js +49 -0
- package/HiBadge/index.js +1 -15
- package/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/HiBreadcrumb/HiStep.js +35 -57
- package/HiBreadcrumb/HiStep.test.js +47 -0
- package/HiBreadcrumb/HiStepConnector.js +32 -57
- package/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/HiBreadcrumb/HiStepContent.js +25 -46
- package/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/HiBreadcrumb/HiStepIcon.js +26 -46
- package/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/HiBreadcrumb/HiStepLabel.js +36 -61
- package/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/HiBreadcrumb/HiStepper.js +23 -45
- package/HiBreadcrumb/HiStepper.test.js +33 -0
- package/HiBreadcrumb/index.js +1 -15
- package/HiButton/HiButton.js +9 -27
- package/HiButton/index.js +2 -13
- package/HiCell/CellAddress.js +20 -40
- package/HiCell/CellAddress.test.js +75 -0
- package/HiCell/CellDate.js +26 -47
- package/HiCell/CellDate.test.js +173 -0
- package/HiCell/CellIcon.js +28 -49
- package/HiCell/CellIcon.test.js +57 -0
- package/HiCell/CellImage.js +23 -42
- package/HiCell/CellImage.test.js +49 -0
- package/HiCell/CellNumeric.js +25 -46
- package/HiCell/CellNumeric.test.js +46 -0
- package/HiCell/CellPinToAction.js +20 -41
- package/HiCell/CellRate.js +32 -55
- package/HiCell/CellRate.test.js +73 -0
- package/HiCell/CellSentinel.js +22 -42
- package/HiCell/CellSentinel.test.js +48 -0
- package/HiCell/CellSentinelScore.js +23 -44
- package/HiCell/CellText.js +37 -56
- package/HiCell/CellText.test.js +76 -0
- package/HiCell/CellTextStyled.js +8 -21
- package/HiCell/index.js +9 -79
- package/HiCheckbox/HiCheckbox.js +35 -60
- package/HiCheckbox/HiCheckbox.test.js +55 -0
- package/HiCheckbox/index.js +1 -15
- package/HiChip/HiChip.js +24 -44
- package/HiChip/HiChip.test.js +136 -0
- package/HiChip/HiChipSwitch.js +47 -70
- package/HiChip/HiChipSwitch.test.js +99 -0
- package/HiChip/index.js +2 -23
- package/HiColoredLabel/HiColoredLabel.js +28 -52
- package/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/HiColoredLabel/index.js +1 -15
- package/HiDatePicker/Caption.js +11 -28
- package/HiDatePicker/Caption.test.js +65 -0
- package/HiDatePicker/HiDatePicker.js +100 -115
- package/HiDatePicker/HiDatePicker.test.js +370 -0
- package/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/HiDatePicker/HiDateRangePicker.js +138 -149
- package/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/HiDatePicker/ListPicker.js +33 -55
- package/HiDatePicker/ListPicker.test.js +53 -0
- package/HiDatePicker/NavBar.js +18 -45
- package/HiDatePicker/NavBar.test.js +39 -0
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/HiDatePicker/Overlays/Overlay.js +18 -35
- package/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/HiDatePicker/Overlays/index.js +5 -47
- package/HiDatePicker/Weekday.js +3 -13
- package/HiDatePicker/hiLocaleUtils.js +1 -8
- package/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/HiDatePicker/index.js +1 -15
- package/HiDatePicker/stylesheet.js +9 -22
- package/HiDotsStepper/HiDot.js +30 -57
- package/HiDotsStepper/HiDot.test.js +55 -0
- package/HiDotsStepper/HiDotsStepper.js +29 -47
- package/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/HiDotsStepper/index.js +2 -23
- package/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/HiExpansionPanel/index.js +2 -13
- package/HiForm/HiAddressField.js +30 -47
- package/HiForm/HiAddressField.test.js +79 -0
- package/HiForm/HiEmailField.js +28 -46
- package/HiForm/HiEmailField.test.js +19 -0
- package/HiForm/HiFormControl.js +72 -100
- package/HiForm/HiFormControl.test.js +195 -0
- package/HiForm/HiFormLabel.js +29 -54
- package/HiForm/HiFormLabel.test.js +66 -0
- package/HiForm/HiInput.js +62 -86
- package/HiForm/HiInput.test.js +202 -0
- package/HiForm/HiPasswordField.js +29 -55
- package/HiForm/HiPasswordField.test.js +60 -0
- package/HiForm/HiSearchField.js +27 -44
- package/HiForm/HiSearchField.test.js +193 -0
- package/HiForm/HiSlider.js +42 -64
- package/HiForm/HiSlider.test.js +99 -0
- package/HiForm/HiTextField.js +29 -46
- package/HiForm/HiTextField.test.js +254 -0
- package/HiForm/HiUpload.js +54 -70
- package/HiForm/HiUpload.test.js +241 -0
- package/HiForm/HiUploadField.js +24 -41
- package/HiForm/HiUploadField.test.js +55 -0
- package/HiForm/HiUploadInput.js +56 -77
- package/HiForm/HiUploadInput.test.js +148 -0
- package/HiForm/index.js +11 -95
- package/HiIcon/HiIcon.js +22 -44
- package/HiIcon/index.js +1 -15
- package/HiIconButton/HiIconButton.js +18 -40
- package/HiIconButton/HiIconButton.test.js +69 -0
- package/HiIconButton/index.js +1 -15
- package/HiLoader/HiLoader.js +9 -24
- package/HiLoader/HiLoader.test.js +18 -0
- package/HiLoader/index.js +1 -15
- package/HiMap/HiMap.js +50 -77
- package/HiMap/HiMap.test.js +29 -0
- package/HiMap/HiMapExpand.js +39 -64
- package/HiMap/HiMapExpand.test.js +48 -0
- package/HiMap/index.js +2 -23
- package/HiNotice/HiKPI.js +33 -54
- package/HiNotice/HiKPI.test.js +171 -0
- package/HiNotice/HiKPINotice.js +7 -21
- package/HiNotice/HiKPINotice.test.js +88 -0
- package/HiNotice/index.js +2 -23
- package/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/HiPaymentMeans/index.js +1 -15
- package/HiPdfReader/HiPdfReader.js +51 -76
- package/HiPdfReader/index.js +1 -15
- package/HiPin/HiPin.js +9 -30
- package/HiPin/HiPin.test.js +61 -0
- package/HiPin/index.js +1 -15
- package/HiRadio/HiRadio.js +7 -24
- package/HiRadio/HiRadio.test.js +57 -0
- package/HiRadio/index.js +1 -15
- package/HiSelect/HiDynamicSelect.js +40 -56
- package/HiSelect/HiDynamicSelectField.js +22 -40
- package/HiSelect/HiNestedSelect.js +55 -84
- package/HiSelect/HiNestedSelectContent.js +46 -73
- package/HiSelect/HiNestedSelectField.js +22 -40
- package/HiSelect/HiSelect.js +123 -139
- package/HiSelect/HiSelect.test.js +1092 -0
- package/HiSelect/HiSelectContent.js +73 -95
- package/HiSelect/HiSelectField.js +22 -40
- package/HiSelect/HiSelectInput.js +63 -87
- package/HiSelect/HiSelectInput.test.js +21 -0
- package/HiSelect/HiSelectMobile.js +35 -54
- package/HiSelect/HiSuggestSelect.js +56 -78
- package/HiSelect/HiSuggestSelectField.js +22 -40
- package/HiSelect/index.js +8 -85
- package/HiSelectableList/HiSelectableList.js +49 -77
- package/HiSelectableList/HiSelectableList.test.js +173 -0
- package/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/HiSelectableList/HiSelectableListItem.js +66 -98
- package/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/HiSelectableList/index.js +3 -31
- package/HiSwitch/HiSwitch.js +20 -45
- package/HiSwitch/HiSwitch.test.js +41 -0
- package/HiSwitch/HiSwitchState.js +15 -36
- package/HiSwitch/HiSwitchState.test.js +76 -0
- package/HiSwitch/index.js +2 -23
- package/HiTable/HiCellBuilder.js +44 -72
- package/HiTable/HiTable.js +29 -47
- package/HiTable/HiTable.test.js +29 -0
- package/HiTable/HiTableBody.js +19 -34
- package/HiTable/HiTableHeader.js +30 -53
- package/HiTable/HiTableRow.js +29 -56
- package/HiTable/constants.js +43 -94
- package/HiTable/index.js +1 -15
- package/es/App.test.js +8 -0
- package/es/HiAlertModal/HiAlertModal.js +48 -77
- package/es/HiAlertModal/HiAlertModal.test.js +189 -0
- package/es/HiAlertModal/index.js +1 -15
- package/es/HiAppBar/HiAppBar.js +34 -63
- package/es/HiAppBar/index.js +1 -15
- package/es/HiBadge/HiBadge.js +10 -29
- package/es/HiBadge/HiBadge.test.js +49 -0
- package/es/HiBadge/index.js +1 -15
- package/es/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/es/HiBreadcrumb/HiStep.js +35 -57
- package/es/HiBreadcrumb/HiStep.test.js +47 -0
- package/es/HiBreadcrumb/HiStepConnector.js +32 -57
- package/es/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/es/HiBreadcrumb/HiStepContent.js +25 -46
- package/es/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/es/HiBreadcrumb/HiStepIcon.js +26 -46
- package/es/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/es/HiBreadcrumb/HiStepLabel.js +36 -61
- package/es/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/es/HiBreadcrumb/HiStepper.js +23 -45
- package/es/HiBreadcrumb/HiStepper.test.js +33 -0
- package/es/HiBreadcrumb/index.js +1 -15
- package/es/HiButton/HiButton.js +9 -27
- package/es/HiButton/index.js +2 -13
- package/es/HiCell/CellAddress.js +20 -40
- package/es/HiCell/CellAddress.test.js +75 -0
- package/es/HiCell/CellDate.js +26 -47
- package/es/HiCell/CellDate.test.js +173 -0
- package/es/HiCell/CellIcon.js +28 -49
- package/es/HiCell/CellIcon.test.js +57 -0
- package/es/HiCell/CellImage.js +23 -42
- package/es/HiCell/CellImage.test.js +49 -0
- package/es/HiCell/CellNumeric.js +25 -46
- package/es/HiCell/CellNumeric.test.js +46 -0
- package/es/HiCell/CellPinToAction.js +20 -41
- package/es/HiCell/CellRate.js +32 -55
- package/es/HiCell/CellRate.test.js +73 -0
- package/es/HiCell/CellSentinel.js +22 -42
- package/es/HiCell/CellSentinel.test.js +48 -0
- package/es/HiCell/CellSentinelScore.js +23 -44
- package/es/HiCell/CellText.js +37 -56
- package/es/HiCell/CellText.test.js +76 -0
- package/es/HiCell/CellTextStyled.js +8 -21
- package/es/HiCell/index.js +9 -79
- package/es/HiCheckbox/HiCheckbox.js +35 -60
- package/es/HiCheckbox/HiCheckbox.test.js +55 -0
- package/es/HiCheckbox/index.js +1 -15
- package/es/HiChip/HiChip.js +24 -44
- package/es/HiChip/HiChip.test.js +136 -0
- package/es/HiChip/HiChipSwitch.js +47 -70
- package/es/HiChip/HiChipSwitch.test.js +99 -0
- package/es/HiChip/index.js +2 -23
- package/es/HiColoredLabel/HiColoredLabel.js +28 -52
- package/es/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/es/HiColoredLabel/index.js +1 -15
- package/es/HiDatePicker/Caption.js +11 -28
- package/es/HiDatePicker/Caption.test.js +65 -0
- package/es/HiDatePicker/HiDatePicker.js +100 -115
- package/es/HiDatePicker/HiDatePicker.test.js +370 -0
- package/es/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/es/HiDatePicker/HiDateRangePicker.js +138 -149
- package/es/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/es/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/es/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/es/HiDatePicker/ListPicker.js +33 -55
- package/es/HiDatePicker/ListPicker.test.js +53 -0
- package/es/HiDatePicker/NavBar.js +18 -45
- package/es/HiDatePicker/NavBar.test.js +39 -0
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/es/HiDatePicker/Overlays/Overlay.js +18 -35
- package/es/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/es/HiDatePicker/Overlays/index.js +5 -47
- package/es/HiDatePicker/Weekday.js +3 -13
- package/es/HiDatePicker/hiLocaleUtils.js +1 -8
- package/es/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/es/HiDatePicker/index.js +1 -15
- package/es/HiDatePicker/stylesheet.js +9 -22
- package/es/HiDotsStepper/HiDot.js +30 -57
- package/es/HiDotsStepper/HiDot.test.js +55 -0
- package/es/HiDotsStepper/HiDotsStepper.js +29 -47
- package/es/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/es/HiDotsStepper/index.js +2 -23
- package/es/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/es/HiExpansionPanel/index.js +2 -13
- package/es/HiForm/HiAddressField.js +30 -47
- package/es/HiForm/HiAddressField.test.js +79 -0
- package/es/HiForm/HiEmailField.js +28 -46
- package/es/HiForm/HiEmailField.test.js +19 -0
- package/es/HiForm/HiFormControl.js +72 -100
- package/es/HiForm/HiFormControl.test.js +195 -0
- package/es/HiForm/HiFormLabel.js +29 -54
- package/es/HiForm/HiFormLabel.test.js +66 -0
- package/es/HiForm/HiInput.js +62 -86
- package/es/HiForm/HiInput.test.js +202 -0
- package/es/HiForm/HiPasswordField.js +29 -55
- package/es/HiForm/HiPasswordField.test.js +60 -0
- package/es/HiForm/HiSearchField.js +27 -44
- package/es/HiForm/HiSearchField.test.js +193 -0
- package/es/HiForm/HiSlider.js +42 -64
- package/es/HiForm/HiSlider.test.js +99 -0
- package/es/HiForm/HiTextField.js +29 -46
- package/es/HiForm/HiTextField.test.js +254 -0
- package/es/HiForm/HiUpload.js +54 -70
- package/es/HiForm/HiUpload.test.js +241 -0
- package/es/HiForm/HiUploadField.js +24 -41
- package/es/HiForm/HiUploadField.test.js +55 -0
- package/es/HiForm/HiUploadInput.js +56 -77
- package/es/HiForm/HiUploadInput.test.js +148 -0
- package/es/HiForm/index.js +11 -95
- package/es/HiIcon/HiIcon.js +22 -44
- package/es/HiIcon/index.js +1 -15
- package/es/HiIconButton/HiIconButton.js +18 -40
- package/es/HiIconButton/HiIconButton.test.js +69 -0
- package/es/HiIconButton/index.js +1 -15
- package/es/HiLoader/HiLoader.js +9 -24
- package/es/HiLoader/HiLoader.test.js +18 -0
- package/es/HiLoader/index.js +1 -15
- package/es/HiMap/HiMap.js +50 -77
- package/es/HiMap/HiMap.test.js +29 -0
- package/es/HiMap/HiMapExpand.js +39 -64
- package/es/HiMap/HiMapExpand.test.js +48 -0
- package/es/HiMap/index.js +2 -23
- package/es/HiNotice/HiKPI.js +33 -54
- package/es/HiNotice/HiKPI.test.js +171 -0
- package/es/HiNotice/HiKPINotice.js +7 -21
- package/es/HiNotice/HiKPINotice.test.js +88 -0
- package/es/HiNotice/index.js +2 -23
- package/es/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/es/HiPaymentMeans/index.js +1 -15
- package/es/HiPdfReader/HiPdfReader.js +51 -76
- package/es/HiPdfReader/index.js +1 -15
- package/es/HiPin/HiPin.js +9 -30
- package/es/HiPin/HiPin.test.js +61 -0
- package/es/HiPin/index.js +1 -15
- package/es/HiRadio/HiRadio.js +7 -24
- package/es/HiRadio/HiRadio.test.js +57 -0
- package/es/HiRadio/index.js +1 -15
- package/es/HiSelect/HiDynamicSelect.js +40 -56
- package/es/HiSelect/HiDynamicSelectField.js +22 -40
- package/es/HiSelect/HiNestedSelect.js +55 -84
- package/es/HiSelect/HiNestedSelectContent.js +46 -73
- package/es/HiSelect/HiNestedSelectField.js +22 -40
- package/es/HiSelect/HiSelect.js +123 -139
- package/es/HiSelect/HiSelect.test.js +1092 -0
- package/es/HiSelect/HiSelectContent.js +73 -95
- package/es/HiSelect/HiSelectField.js +22 -40
- package/es/HiSelect/HiSelectInput.js +63 -87
- package/es/HiSelect/HiSelectInput.test.js +21 -0
- package/es/HiSelect/HiSelectMobile.js +35 -54
- package/es/HiSelect/HiSuggestSelect.js +56 -78
- package/es/HiSelect/HiSuggestSelectField.js +22 -40
- package/es/HiSelect/index.js +8 -85
- package/es/HiSelectableList/HiSelectableList.js +49 -77
- package/es/HiSelectableList/HiSelectableList.test.js +173 -0
- package/es/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/es/HiSelectableList/HiSelectableListItem.js +66 -98
- package/es/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/es/HiSelectableList/index.js +3 -31
- package/es/HiSwitch/HiSwitch.js +20 -45
- package/es/HiSwitch/HiSwitch.test.js +41 -0
- package/es/HiSwitch/HiSwitchState.js +15 -36
- package/es/HiSwitch/HiSwitchState.test.js +76 -0
- package/es/HiSwitch/index.js +2 -23
- package/es/HiTable/HiCellBuilder.js +44 -72
- package/es/HiTable/HiTable.js +29 -47
- package/es/HiTable/HiTable.test.js +29 -0
- package/es/HiTable/HiTableBody.js +19 -34
- package/es/HiTable/HiTableHeader.js +30 -53
- package/es/HiTable/HiTableRow.js +29 -56
- package/es/HiTable/constants.js +43 -94
- package/es/HiTable/index.js +1 -15
- package/es/hi-svg-icons/HiAccount.js +18 -36
- package/es/hi-svg-icons/HiActivity.js +17 -35
- package/es/hi-svg-icons/HiAll.js +22 -42
- package/es/hi-svg-icons/HiBilling.js +18 -36
- package/es/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/es/hi-svg-icons/HiCatalog.js +18 -36
- package/es/hi-svg-icons/HiCustomer.js +18 -36
- package/es/hi-svg-icons/HiDownload.js +11 -25
- package/es/hi-svg-icons/HiFinance.js +18 -36
- package/es/hi-svg-icons/HiPermission.js +17 -35
- package/es/hi-svg-icons/HiRoute.js +18 -36
- package/es/hi-svg-icons/HiSettlement.js +18 -36
- package/es/hi-svg-icons/HiSizeLarge.js +12 -27
- package/es/hi-svg-icons/HiSizeMedium.js +11 -25
- package/es/hi-svg-icons/HiSizeSmall.js +11 -25
- package/es/hi-svg-icons/HiTransaction.js +18 -36
- package/es/hi-svg-icons/HiUser.js +18 -36
- package/es/hi-svg-icons/HiWidget.js +22 -42
- package/es/hi-svg-icons/index.js +18 -151
- package/es/hi-svg-icons/index.text.js +11 -21
- package/es/styleguide/Wrapper.js +19 -36
- package/es/styles/MuiThemeProvider.js +39 -59
- package/es/styles/colorManipulator.js +16 -44
- package/es/styles/colorManipulator.test.js +242 -0
- package/es/styles/createBreakpoints.js +6 -20
- package/es/styles/createBreakpoints.test.js +48 -0
- package/es/styles/createGenerateClassName.js +5 -15
- package/es/styles/createGenerateClassName.test.js +141 -0
- package/es/styles/createMixins.js +8 -19
- package/es/styles/createMixins.test.js +24 -0
- package/es/styles/createMuiTheme.js +34 -53
- package/es/styles/createMuiTheme.test.js +67 -0
- package/es/styles/createPalette.js +30 -50
- package/es/styles/createPalette.test.js +159 -0
- package/es/styles/createStyles.js +1 -8
- package/es/styles/createStyles.test.js +8 -0
- package/es/styles/createTypography.js +18 -30
- package/es/styles/createTypography.test.js +60 -0
- package/es/styles/getStylesCreator.js +11 -24
- package/es/styles/getStylesCreator.test.js +92 -0
- package/es/styles/getThemeProps.js +1 -9
- package/es/styles/getThemeProps.test.js +39 -0
- package/es/styles/index.js +5 -47
- package/es/styles/jssPreset.js +9 -25
- package/es/styles/mergeClasses.js +7 -19
- package/es/styles/shadows.js +1 -8
- package/es/styles/shape.js +1 -8
- package/es/styles/spacing.js +1 -9
- package/es/styles/themeListener.js +5 -18
- package/es/styles/themeListener.test.js +26 -0
- package/es/styles/transitions.js +18 -38
- package/es/styles/transitions.test.js +208 -0
- package/es/styles/zIndex.js +1 -8
- package/es/test-utils/createMount.js +11 -22
- package/es/test-utils/createRender.js +8 -19
- package/es/test-utils/createShallow.js +13 -23
- package/es/test-utils/getClasses.js +2 -11
- package/es/test-utils/index.js +5 -47
- package/es/test-utils/until.js +6 -16
- package/es/test-utils/until.test.js +157 -0
- package/es/test-utils/unwrap.js +1 -8
- package/es/theme/palette.js +2 -10
- package/es/theme/typography.js +2 -10
- package/es/theme.js +2 -11
- package/es/transitions/utils.js +2 -13
- package/es/utils/exactProp.js +5 -18
- package/es/utils/helpers.js +18 -55
- package/es/withMobileDialog/index.js +1 -15
- package/es/withMobileDialog/withMobileDialog.js +7 -22
- package/es/withMobileDialog/withMobileDialog.test.js +67 -0
- package/hi-svg-icons/HiAccount.js +18 -36
- package/hi-svg-icons/HiActivity.js +17 -35
- package/hi-svg-icons/HiAll.js +22 -42
- package/hi-svg-icons/HiBilling.js +18 -36
- package/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/hi-svg-icons/HiCatalog.js +18 -36
- package/hi-svg-icons/HiCustomer.js +18 -36
- package/hi-svg-icons/HiDownload.js +11 -25
- package/hi-svg-icons/HiFinance.js +18 -36
- package/hi-svg-icons/HiPermission.js +17 -35
- package/hi-svg-icons/HiRoute.js +18 -36
- package/hi-svg-icons/HiSettlement.js +18 -36
- package/hi-svg-icons/HiSizeLarge.js +12 -27
- package/hi-svg-icons/HiSizeMedium.js +11 -25
- package/hi-svg-icons/HiSizeSmall.js +11 -25
- package/hi-svg-icons/HiTransaction.js +18 -36
- package/hi-svg-icons/HiUser.js +18 -36
- package/hi-svg-icons/HiWidget.js +22 -42
- package/hi-svg-icons/index.js +18 -151
- package/hi-svg-icons/index.text.js +11 -21
- package/package.json +1 -1
- package/styleguide/Wrapper.js +19 -36
- package/styles/MuiThemeProvider.js +39 -59
- package/styles/colorManipulator.js +16 -44
- package/styles/colorManipulator.test.js +242 -0
- package/styles/createBreakpoints.js +6 -20
- package/styles/createBreakpoints.test.js +48 -0
- package/styles/createGenerateClassName.js +5 -15
- package/styles/createGenerateClassName.test.js +141 -0
- package/styles/createMixins.js +8 -19
- package/styles/createMixins.test.js +24 -0
- package/styles/createMuiTheme.js +34 -53
- package/styles/createMuiTheme.test.js +67 -0
- package/styles/createPalette.js +30 -50
- package/styles/createPalette.test.js +159 -0
- package/styles/createStyles.js +1 -8
- package/styles/createStyles.test.js +8 -0
- package/styles/createTypography.js +18 -30
- package/styles/createTypography.test.js +60 -0
- package/styles/getStylesCreator.js +11 -24
- package/styles/getStylesCreator.test.js +92 -0
- package/styles/getThemeProps.js +1 -9
- package/styles/getThemeProps.test.js +39 -0
- package/styles/index.js +5 -47
- package/styles/jssPreset.js +9 -25
- package/styles/mergeClasses.js +7 -19
- package/styles/shadows.js +1 -8
- package/styles/shape.js +1 -8
- package/styles/spacing.js +1 -9
- package/styles/themeListener.js +5 -18
- package/styles/themeListener.test.js +26 -0
- package/styles/transitions.js +18 -38
- package/styles/transitions.test.js +208 -0
- package/styles/zIndex.js +1 -8
- package/test-utils/createMount.js +11 -22
- package/test-utils/createRender.js +8 -19
- package/test-utils/createShallow.js +13 -23
- package/test-utils/getClasses.js +2 -11
- package/test-utils/index.js +5 -47
- package/test-utils/until.js +6 -16
- package/test-utils/until.test.js +157 -0
- package/test-utils/unwrap.js +1 -8
- package/theme/palette.js +2 -10
- package/theme/typography.js +2 -10
- package/theme.js +2 -11
- package/transitions/utils.js +2 -13
- package/utils/exactProp.js +5 -18
- package/utils/helpers.js +18 -55
- package/withMobileDialog/index.js +1 -15
- package/withMobileDialog/withMobileDialog.js +7 -22
- package/withMobileDialog/withMobileDialog.test.js +67 -0
@@ -1,30 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
var _path = _interopRequireDefault(require("path"));
|
8
|
-
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
10
|
-
|
11
|
-
var _chai = require("chai");
|
12
|
-
|
13
|
-
var _testUtils = require("../test-utils");
|
14
|
-
|
1
|
+
import fs from 'fs';
|
2
|
+
import path from 'path';
|
3
|
+
import React from 'react';
|
4
|
+
import { assert } from 'chai';
|
5
|
+
import { createShallow } from '../test-utils';
|
15
6
|
describe('hi-svg-icons', function () {
|
16
7
|
var shallow;
|
17
8
|
before(function () {
|
18
|
-
shallow =
|
9
|
+
shallow = createShallow();
|
19
10
|
});
|
20
11
|
it('should be able to render all of them', function (done) {
|
21
12
|
// This test can only be run on the node env
|
22
|
-
if (!
|
13
|
+
if (!fs.readdir) {
|
23
14
|
done();
|
24
15
|
return;
|
25
16
|
}
|
26
17
|
|
27
|
-
|
18
|
+
fs.readdir(__dirname, function (err, files) {
|
28
19
|
files.forEach(function (file) {
|
29
20
|
// Ignore no js files and tests
|
30
21
|
if (file.indexOf('.js') === -1 || file.indexOf('text.js') > -1) {
|
@@ -32,18 +23,17 @@ describe('hi-svg-icons', function () {
|
|
32
23
|
} // eslint-disable-next-line global-require, import/no-dynamic-require
|
33
24
|
|
34
25
|
|
35
|
-
var fileLoaded = require(
|
26
|
+
var fileLoaded = require(path.join(__dirname, file));
|
36
27
|
|
37
28
|
if (!fileLoaded.default) {
|
38
29
|
return;
|
39
30
|
}
|
40
31
|
|
41
32
|
var Icon = fileLoaded.default;
|
42
|
-
var wrapper = shallow(
|
33
|
+
var wrapper = shallow(React.createElement(Icon, {
|
43
34
|
className: "foo"
|
44
35
|
}));
|
45
|
-
|
46
|
-
_chai.assert.strictEqual(wrapper.hasClass('foo'), true);
|
36
|
+
assert.strictEqual(wrapper.hasClass('foo'), true);
|
47
37
|
});
|
48
38
|
done();
|
49
39
|
});
|
package/es/styleguide/Wrapper.js
CHANGED
@@ -1,51 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
exports.default = void 0;
|
11
|
-
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
13
|
-
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
15
|
-
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
17
|
-
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
19
|
-
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
-
|
22
|
-
var _react = _interopRequireWildcard(require("react"));
|
23
|
-
|
24
|
-
var _styles = require("@material-ui/core/styles");
|
25
|
-
|
26
|
-
var _theme = _interopRequireDefault(require("../theme"));
|
27
|
-
|
28
|
-
require("../index.css");
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import React, { Component } from 'react';
|
7
|
+
import { MuiThemeProvider } from '@material-ui/core/styles';
|
8
|
+
import theme from '../theme';
|
9
|
+
import '../index.css';
|
29
10
|
|
30
11
|
var Wrapper =
|
31
12
|
/*#__PURE__*/
|
32
13
|
function (_Component) {
|
33
|
-
(
|
14
|
+
_inherits(Wrapper, _Component);
|
34
15
|
|
35
16
|
function Wrapper() {
|
36
|
-
(
|
37
|
-
|
17
|
+
_classCallCheck(this, Wrapper);
|
18
|
+
|
19
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(Wrapper).apply(this, arguments));
|
38
20
|
}
|
39
21
|
|
40
|
-
(
|
22
|
+
_createClass(Wrapper, [{
|
41
23
|
key: "render",
|
42
24
|
value: function render() {
|
43
|
-
return
|
44
|
-
theme:
|
25
|
+
return React.createElement(MuiThemeProvider, {
|
26
|
+
theme: theme
|
45
27
|
}, this.props.children);
|
46
28
|
}
|
47
29
|
}]);
|
30
|
+
|
48
31
|
return Wrapper;
|
49
|
-
}(
|
32
|
+
}(Component);
|
50
33
|
|
51
|
-
|
34
|
+
export { Wrapper as default };
|
@@ -1,70 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
17
|
-
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
-
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
-
|
22
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
23
|
-
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
25
|
-
|
26
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
27
|
-
|
28
|
-
var _react = _interopRequireDefault(require("react"));
|
29
|
-
|
30
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
31
|
-
|
32
|
-
var _warning = _interopRequireDefault(require("warning"));
|
33
|
-
|
34
|
-
var _brcast = _interopRequireDefault(require("brcast"));
|
35
|
-
|
36
|
-
var _themeListener = _interopRequireWildcard(require("./themeListener"));
|
37
|
-
|
38
|
-
var _exactProp = _interopRequireDefault(require("../utils/exactProp"));
|
39
|
-
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
9
|
+
import React from 'react';
|
10
|
+
import PropTypes from 'prop-types';
|
11
|
+
import warning from 'warning';
|
12
|
+
import createBroadcast from 'brcast';
|
13
|
+
import themeListener, { CHANNEL } from './themeListener';
|
14
|
+
import exactProp from '../utils/exactProp';
|
40
15
|
/**
|
41
16
|
* This component takes a `theme` property.
|
42
17
|
* It makes the `theme` available down the React tree thanks to React context.
|
43
18
|
* This component should preferably be used at **the root of your component tree**.
|
44
19
|
*/
|
20
|
+
|
45
21
|
var MuiThemeProvider =
|
46
22
|
/*#__PURE__*/
|
47
23
|
function (_React$Component) {
|
48
|
-
(
|
24
|
+
_inherits(MuiThemeProvider, _React$Component);
|
49
25
|
|
50
26
|
// We are not using the React state in order to avoid unnecessary rerender.
|
51
27
|
function MuiThemeProvider(props, context) {
|
52
28
|
var _this;
|
53
29
|
|
54
|
-
(
|
55
|
-
|
30
|
+
_classCallCheck(this, MuiThemeProvider);
|
31
|
+
|
32
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(MuiThemeProvider).call(this)); // Get the outer theme from the context, can be null
|
33
|
+
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "broadcast", createBroadcast());
|
56
35
|
|
57
|
-
(
|
58
|
-
|
59
|
-
(
|
60
|
-
|
36
|
+
_defineProperty(_assertThisInitialized(_this), "unsubscribeId", null);
|
37
|
+
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "outerTheme", null);
|
39
|
+
|
40
|
+
_this.outerTheme = themeListener.initial(context); // Propagate the theme so it can be accessed by the children
|
61
41
|
|
62
42
|
_this.broadcast.setState(_this.mergeOuterLocalTheme(props.theme));
|
63
43
|
|
64
44
|
return _this;
|
65
45
|
}
|
66
46
|
|
67
|
-
(
|
47
|
+
_createClass(MuiThemeProvider, [{
|
68
48
|
key: "getChildContext",
|
69
49
|
value: function getChildContext() {
|
70
50
|
var _ref;
|
@@ -82,7 +62,7 @@ function (_React$Component) {
|
|
82
62
|
muiThemeProviderOptions.disableStylesGeneration = disableStylesGeneration;
|
83
63
|
}
|
84
64
|
|
85
|
-
return _ref = {}, (
|
65
|
+
return _ref = {}, _defineProperty(_ref, CHANNEL, this.broadcast), _defineProperty(_ref, "muiThemeProviderOptions", muiThemeProviderOptions), _ref;
|
86
66
|
}
|
87
67
|
}, {
|
88
68
|
key: "componentDidMount",
|
@@ -90,7 +70,7 @@ function (_React$Component) {
|
|
90
70
|
var _this2 = this;
|
91
71
|
|
92
72
|
// Subscribe on the outer theme, if present
|
93
|
-
this.unsubscribeId =
|
73
|
+
this.unsubscribeId = themeListener.subscribe(this.context, function (outerTheme) {
|
94
74
|
_this2.outerTheme = outerTheme; // Forward the parent theme update to the children
|
95
75
|
|
96
76
|
_this2.broadcast.setState(_this2.mergeOuterLocalTheme(_this2.props.theme));
|
@@ -108,7 +88,7 @@ function (_React$Component) {
|
|
108
88
|
key: "componentWillUnmount",
|
109
89
|
value: function componentWillUnmount() {
|
110
90
|
if (this.unsubscribeId !== null) {
|
111
|
-
|
91
|
+
themeListener.unsubscribe(this.context, this.unsubscribeId);
|
112
92
|
}
|
113
93
|
} // Simple merge between the outer theme and the local theme
|
114
94
|
|
@@ -117,7 +97,7 @@ function (_React$Component) {
|
|
117
97
|
value: function mergeOuterLocalTheme(localTheme) {
|
118
98
|
// To support composition of theme.
|
119
99
|
if (typeof localTheme === 'function') {
|
120
|
-
|
100
|
+
warning(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'));
|
121
101
|
return localTheme(this.outerTheme);
|
122
102
|
}
|
123
103
|
|
@@ -125,7 +105,7 @@ function (_React$Component) {
|
|
125
105
|
return localTheme;
|
126
106
|
}
|
127
107
|
|
128
|
-
return (
|
108
|
+
return _objectSpread({}, this.outerTheme, {}, localTheme);
|
129
109
|
}
|
130
110
|
}, {
|
131
111
|
key: "render",
|
@@ -142,14 +122,14 @@ function (_React$Component) {
|
|
142
122
|
return this.props.children;
|
143
123
|
}
|
144
124
|
}]);
|
125
|
+
|
145
126
|
return MuiThemeProvider;
|
146
|
-
}(
|
127
|
+
}(React.Component);
|
147
128
|
|
148
|
-
MuiThemeProvider.childContextTypes = (
|
149
|
-
muiThemeProviderOptions:
|
129
|
+
MuiThemeProvider.childContextTypes = _objectSpread({}, themeListener.contextTypes, {
|
130
|
+
muiThemeProviderOptions: PropTypes.object
|
150
131
|
});
|
151
|
-
MuiThemeProvider.contextTypes = (
|
152
|
-
muiThemeProviderOptions:
|
132
|
+
MuiThemeProvider.contextTypes = _objectSpread({}, themeListener.contextTypes, {
|
133
|
+
muiThemeProviderOptions: PropTypes.object
|
153
134
|
});
|
154
|
-
|
155
|
-
exports.default = _default;
|
135
|
+
export default MuiThemeProvider;
|
@@ -1,25 +1,5 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.convertHexToRGB = convertHexToRGB;
|
9
|
-
exports.rgbToHex = rgbToHex;
|
10
|
-
exports.decomposeColor = decomposeColor;
|
11
|
-
exports.recomposeColor = recomposeColor;
|
12
|
-
exports.getContrastRatio = getContrastRatio;
|
13
|
-
exports.getLuminance = getLuminance;
|
14
|
-
exports.emphasize = emphasize;
|
15
|
-
exports.fade = fade;
|
16
|
-
exports.darken = darken;
|
17
|
-
exports.lighten = lighten;
|
18
|
-
|
19
|
-
var _warning = _interopRequireDefault(require("warning"));
|
20
|
-
|
21
1
|
/* eslint-disable no-use-before-define */
|
22
|
-
|
2
|
+
import warning from 'warning';
|
23
3
|
/**
|
24
4
|
* Returns a number whose value is limited to the given range.
|
25
5
|
*
|
@@ -28,10 +8,11 @@ var _warning = _interopRequireDefault(require("warning"));
|
|
28
8
|
* @param {number} max The upper boundary of the output range
|
29
9
|
* @returns {number} A number in the range [min, max]
|
30
10
|
*/
|
11
|
+
|
31
12
|
function clamp(value) {
|
32
13
|
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
33
14
|
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
34
|
-
|
15
|
+
warning(value >= min && value <= max, "Material-UI: the value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "]."));
|
35
16
|
|
36
17
|
if (value < min) {
|
37
18
|
return min;
|
@@ -51,7 +32,7 @@ function clamp(value) {
|
|
51
32
|
*/
|
52
33
|
|
53
34
|
|
54
|
-
function convertHexToRGB(color) {
|
35
|
+
export function convertHexToRGB(color) {
|
55
36
|
color = color.substr(1);
|
56
37
|
var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g');
|
57
38
|
var colors = color.match(re);
|
@@ -73,8 +54,7 @@ function convertHexToRGB(color) {
|
|
73
54
|
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
|
74
55
|
*/
|
75
56
|
|
76
|
-
|
77
|
-
function rgbToHex(color) {
|
57
|
+
export function rgbToHex(color) {
|
78
58
|
// Pass hex straight through
|
79
59
|
if (color.indexOf('#') === 0) {
|
80
60
|
return color;
|
@@ -102,8 +82,7 @@ function rgbToHex(color) {
|
|
102
82
|
* @returns {object} - A MUI color object: {type: string, values: number[]}
|
103
83
|
*/
|
104
84
|
|
105
|
-
|
106
|
-
function decomposeColor(color) {
|
85
|
+
export function decomposeColor(color) {
|
107
86
|
if (color.charAt(0) === '#') {
|
108
87
|
return decomposeColor(convertHexToRGB(color));
|
109
88
|
}
|
@@ -135,8 +114,7 @@ function decomposeColor(color) {
|
|
135
114
|
* @returns {string} A CSS color string
|
136
115
|
*/
|
137
116
|
|
138
|
-
|
139
|
-
function recomposeColor(color) {
|
117
|
+
export function recomposeColor(color) {
|
140
118
|
var type = color.type;
|
141
119
|
var values = color.values;
|
142
120
|
|
@@ -164,8 +142,7 @@ function recomposeColor(color) {
|
|
164
142
|
* @returns {number} A contrast ratio value in the range 0 - 21.
|
165
143
|
*/
|
166
144
|
|
167
|
-
|
168
|
-
function getContrastRatio(foreground, background) {
|
145
|
+
export function getContrastRatio(foreground, background) {
|
169
146
|
var lumA = getLuminance(foreground);
|
170
147
|
var lumB = getLuminance(background);
|
171
148
|
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
@@ -180,8 +157,7 @@ function getContrastRatio(foreground, background) {
|
|
180
157
|
* @returns {number} The relative brightness of the color in the range 0 - 1
|
181
158
|
*/
|
182
159
|
|
183
|
-
|
184
|
-
function getLuminance(color) {
|
160
|
+
export function getLuminance(color) {
|
185
161
|
var decomposedColor = decomposeColor(color);
|
186
162
|
|
187
163
|
if (decomposedColor.type.indexOf('rgb') !== -1) {
|
@@ -206,8 +182,7 @@ function getLuminance(color) {
|
|
206
182
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
207
183
|
*/
|
208
184
|
|
209
|
-
|
210
|
-
function emphasize(color) {
|
185
|
+
export function emphasize(color) {
|
211
186
|
var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
|
212
187
|
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
213
188
|
}
|
@@ -220,9 +195,8 @@ function emphasize(color) {
|
|
220
195
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
221
196
|
*/
|
222
197
|
|
223
|
-
|
224
|
-
|
225
|
-
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0;
|
198
|
+
export function fade(color, value) {
|
199
|
+
warning(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ")."));
|
226
200
|
if (!color) return color;
|
227
201
|
color = decomposeColor(color);
|
228
202
|
value = clamp(value);
|
@@ -242,9 +216,8 @@ function fade(color, value) {
|
|
242
216
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
243
217
|
*/
|
244
218
|
|
245
|
-
|
246
|
-
|
247
|
-
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
219
|
+
export function darken(color, coefficient) {
|
220
|
+
warning(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ")."));
|
248
221
|
if (!color) return color;
|
249
222
|
color = decomposeColor(color);
|
250
223
|
coefficient = clamp(coefficient);
|
@@ -267,9 +240,8 @@ function darken(color, coefficient) {
|
|
267
240
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
268
241
|
*/
|
269
242
|
|
270
|
-
|
271
|
-
|
272
|
-
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
243
|
+
export function lighten(color, coefficient) {
|
244
|
+
warning(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ")."));
|
273
245
|
if (!color) return color;
|
274
246
|
color = decomposeColor(color);
|
275
247
|
coefficient = clamp(coefficient);
|