@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
package/es/styles/transitions.js
CHANGED
@@ -1,22 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = exports.isNumber = exports.isString = exports.formatMs = exports.duration = exports.easing = void 0;
|
9
|
-
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
11
|
-
|
12
|
-
var _warning = _interopRequireDefault(require("warning"));
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
13
2
|
|
14
3
|
/* eslint-disable no-param-reassign */
|
15
4
|
|
16
5
|
/* eslint-disable no-restricted-globals */
|
17
|
-
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
6
|
+
import warning from 'warning'; // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
18
7
|
// to learn the context in which each easing should be used.
|
19
|
-
|
8
|
+
|
9
|
+
export var easing = {
|
20
10
|
// This is the most common easing curve.
|
21
11
|
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
22
12
|
// Objects enter the screen at full velocity from off-screen and
|
@@ -29,8 +19,7 @@ var easing = {
|
|
29
19
|
}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations
|
30
20
|
// to learn when use what timing
|
31
21
|
|
32
|
-
|
33
|
-
var duration = {
|
22
|
+
export var duration = {
|
34
23
|
shortest: 150,
|
35
24
|
shorter: 200,
|
36
25
|
short: 250,
|
@@ -43,21 +32,13 @@ var duration = {
|
|
43
32
|
// recommended when something is leaving screen
|
44
33
|
leavingScreen: 195
|
45
34
|
};
|
46
|
-
|
47
|
-
|
48
|
-
var formatMs = function formatMs(milliseconds) {
|
35
|
+
export var formatMs = function formatMs(milliseconds) {
|
49
36
|
return "".concat(Math.round(milliseconds), "ms");
|
50
37
|
};
|
51
|
-
|
52
|
-
exports.formatMs = formatMs;
|
53
|
-
|
54
|
-
var isString = function isString(value) {
|
38
|
+
export var isString = function isString(value) {
|
55
39
|
return typeof value === 'string';
|
56
40
|
};
|
57
|
-
|
58
|
-
exports.isString = isString;
|
59
|
-
|
60
|
-
var isNumber = function isNumber(value) {
|
41
|
+
export var isNumber = function isNumber(value) {
|
61
42
|
return !isNaN(parseFloat(value));
|
62
43
|
};
|
63
44
|
/**
|
@@ -69,26 +50,26 @@ var isNumber = function isNumber(value) {
|
|
69
50
|
* @param {number} param.delay
|
70
51
|
*/
|
71
52
|
|
72
|
-
|
73
|
-
exports.isNumber = isNumber;
|
74
|
-
var _default = {
|
53
|
+
export default {
|
75
54
|
easing: easing,
|
76
55
|
duration: duration,
|
77
56
|
create: function create() {
|
78
57
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];
|
79
58
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
59
|
+
|
80
60
|
var _options$duration = options.duration,
|
81
61
|
durationOption = _options$duration === void 0 ? duration.standard : _options$duration,
|
82
62
|
_options$easing = options.easing,
|
83
63
|
easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,
|
84
64
|
_options$delay = options.delay,
|
85
65
|
delay = _options$delay === void 0 ? 0 : _options$delay,
|
86
|
-
other = (
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
66
|
+
other = _objectWithoutProperties(options, ["duration", "easing", "delay"]);
|
67
|
+
|
68
|
+
warning(isString(props) || Array.isArray(props), 'Material-UI: argument "props" must be a string or Array.');
|
69
|
+
warning(isNumber(durationOption) || isString(durationOption), "Material-UI: argument \"duration\" must be a number or a string but found ".concat(durationOption, "."));
|
70
|
+
warning(isString(easingOption), 'Material-UI: argument "easing" must be a string.');
|
71
|
+
warning(isNumber(delay) || isString(delay), 'Material-UI: argument "delay" must be a number or a string.');
|
72
|
+
warning(Object.keys(other).length === 0, "Material-UI: unrecognized argument(s) [".concat(Object.keys(other).join(','), "]"));
|
92
73
|
return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {
|
93
74
|
return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay));
|
94
75
|
}).join(',');
|
@@ -102,5 +83,4 @@ var _default = {
|
|
102
83
|
|
103
84
|
return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
|
104
85
|
}
|
105
|
-
};
|
106
|
-
exports.default = _default;
|
86
|
+
};
|
@@ -0,0 +1,208 @@
|
|
1
|
+
import { assert } from 'chai';
|
2
|
+
import { stub } from 'sinon';
|
3
|
+
import transitions, { easing, duration, formatMs, isString, isNumber } from './transitions';
|
4
|
+
describe('transitions', function () {
|
5
|
+
var consoleErrorStub;
|
6
|
+
beforeEach(function () {
|
7
|
+
consoleErrorStub = stub(console, 'error');
|
8
|
+
});
|
9
|
+
afterEach(function () {
|
10
|
+
consoleErrorStub.restore();
|
11
|
+
});
|
12
|
+
describe('formatMs() function', function () {
|
13
|
+
it('should round decimal digits and return formatted value', function () {
|
14
|
+
var formattedValue = formatMs(12.125);
|
15
|
+
assert.strictEqual(formattedValue, '12ms');
|
16
|
+
});
|
17
|
+
});
|
18
|
+
describe('isString() function', function () {
|
19
|
+
it('should return false when passed undefined', function () {
|
20
|
+
var value = isString();
|
21
|
+
assert.strictEqual(value, false);
|
22
|
+
});
|
23
|
+
it('should return false when not passed a string', function () {
|
24
|
+
var value = isString(1);
|
25
|
+
assert.strictEqual(value, false);
|
26
|
+
value = isString({});
|
27
|
+
assert.strictEqual(value, false);
|
28
|
+
value = isString([]);
|
29
|
+
assert.strictEqual(value, false);
|
30
|
+
});
|
31
|
+
it('should return true when passed a string', function () {
|
32
|
+
var value = isString('');
|
33
|
+
assert.strictEqual(value, true);
|
34
|
+
value = isString('test');
|
35
|
+
assert.strictEqual(value, true);
|
36
|
+
});
|
37
|
+
});
|
38
|
+
describe('isNumber() function', function () {
|
39
|
+
it('should return false when passed undefined', function () {
|
40
|
+
var value = isNumber();
|
41
|
+
assert.strictEqual(value, false);
|
42
|
+
});
|
43
|
+
it('should return false when not passed a number', function () {
|
44
|
+
var value = isNumber('');
|
45
|
+
assert.strictEqual(value, false);
|
46
|
+
value = isNumber('test');
|
47
|
+
assert.strictEqual(value, false);
|
48
|
+
value = isNumber({});
|
49
|
+
assert.strictEqual(value, false);
|
50
|
+
value = isNumber([]);
|
51
|
+
assert.strictEqual(value, false);
|
52
|
+
});
|
53
|
+
it('should return true when passed a number', function () {
|
54
|
+
var value = isNumber(1);
|
55
|
+
assert.strictEqual(value, true);
|
56
|
+
value = isNumber(1.5);
|
57
|
+
assert.strictEqual(value, true);
|
58
|
+
});
|
59
|
+
});
|
60
|
+
describe('create() function', function () {
|
61
|
+
it('should create default transition without arguments', function () {
|
62
|
+
var transition = transitions.create();
|
63
|
+
assert.strictEqual(transition, "all ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 0ms"));
|
64
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
65
|
+
});
|
66
|
+
it('should take string props as a first argument', function () {
|
67
|
+
var transition = transitions.create('color');
|
68
|
+
assert.strictEqual(transition, "color ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 0ms"));
|
69
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
70
|
+
});
|
71
|
+
it('should also take array of props as first argument', function () {
|
72
|
+
var options = {
|
73
|
+
delay: 20
|
74
|
+
};
|
75
|
+
var multiple = transitions.create(['color', 'size'], options);
|
76
|
+
var single1 = transitions.create('color', options);
|
77
|
+
var single2 = transitions.create('size', options);
|
78
|
+
var expected = "".concat(single1, ",").concat(single2);
|
79
|
+
assert.strictEqual(multiple, expected);
|
80
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
81
|
+
});
|
82
|
+
it('should warn when first argument is of bad type', function () {
|
83
|
+
// $FlowIgnore
|
84
|
+
transitions.create(5554); // $FlowIgnore
|
85
|
+
|
86
|
+
transitions.create({});
|
87
|
+
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
88
|
+
});
|
89
|
+
it('should optionally accept number "duration" option in second argument', function () {
|
90
|
+
var transition = transitions.create('font', {
|
91
|
+
duration: 500
|
92
|
+
});
|
93
|
+
assert.strictEqual(transition, "font 500ms ".concat(easing.easeInOut, " 0ms"));
|
94
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
95
|
+
});
|
96
|
+
it('should optionally accept string "duration" option in second argument', function () {
|
97
|
+
var transition = transitions.create('font', {
|
98
|
+
duration: '500ms'
|
99
|
+
});
|
100
|
+
assert.strictEqual(transition, "font 500ms ".concat(easing.easeInOut, " 0ms"));
|
101
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
102
|
+
});
|
103
|
+
it('should round decimal digits of "duration" prop to whole numbers', function () {
|
104
|
+
var transition = transitions.create('font', {
|
105
|
+
duration: 12.125
|
106
|
+
});
|
107
|
+
assert.strictEqual(transition, "font 12ms ".concat(easing.easeInOut, " 0ms"));
|
108
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
109
|
+
});
|
110
|
+
it('should warn when bad "duration" option type', function () {
|
111
|
+
// $FlowIgnore
|
112
|
+
transitions.create('font', {
|
113
|
+
duration: null
|
114
|
+
}); // $FlowIgnore
|
115
|
+
|
116
|
+
transitions.create('font', {
|
117
|
+
duration: {}
|
118
|
+
});
|
119
|
+
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
120
|
+
});
|
121
|
+
it('should optionally accept string "easing" option in second argument', function () {
|
122
|
+
var transition = transitions.create('transform', {
|
123
|
+
easing: easing.sharp
|
124
|
+
});
|
125
|
+
assert.strictEqual(transition, "transform ".concat(duration.standard, "ms ").concat(easing.sharp, " 0ms"));
|
126
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
127
|
+
});
|
128
|
+
it('should warn when bad "easing" option type', function () {
|
129
|
+
// $FlowIgnore
|
130
|
+
transitions.create('transform', {
|
131
|
+
easing: 123
|
132
|
+
}); // $FlowIgnore
|
133
|
+
|
134
|
+
transitions.create('transform', {
|
135
|
+
easing: {}
|
136
|
+
});
|
137
|
+
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
138
|
+
});
|
139
|
+
it('should optionally accept number "delay" option in second argument', function () {
|
140
|
+
var transition = transitions.create('size', {
|
141
|
+
delay: 150
|
142
|
+
});
|
143
|
+
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 150ms"));
|
144
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
145
|
+
});
|
146
|
+
it('should optionally accept string "delay" option in second argument', function () {
|
147
|
+
var transition = transitions.create('size', {
|
148
|
+
delay: '150ms'
|
149
|
+
});
|
150
|
+
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 150ms"));
|
151
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
152
|
+
});
|
153
|
+
it('should round decimal digits of "delay" prop to whole numbers', function () {
|
154
|
+
var transition = transitions.create('size', {
|
155
|
+
delay: 1.547
|
156
|
+
});
|
157
|
+
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 2ms"));
|
158
|
+
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
159
|
+
});
|
160
|
+
it('should warn when bad "delay" option type', function () {
|
161
|
+
// $FlowIgnore
|
162
|
+
transitions.create('size', {
|
163
|
+
delay: null
|
164
|
+
}); // $FlowIgnore
|
165
|
+
|
166
|
+
transitions.create('size', {
|
167
|
+
delay: {}
|
168
|
+
});
|
169
|
+
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
170
|
+
});
|
171
|
+
it('should warn when passed unrecognized option', function () {
|
172
|
+
transitions.create('size', {
|
173
|
+
fffds: 'value'
|
174
|
+
});
|
175
|
+
assert.strictEqual(consoleErrorStub.callCount, 1, 'Wrong number of calls of warning()');
|
176
|
+
});
|
177
|
+
it('should return zero when not passed arguments', function () {
|
178
|
+
var zeroHeightDuration = transitions.getAutoHeightDuration();
|
179
|
+
assert.strictEqual(zeroHeightDuration, 0);
|
180
|
+
});
|
181
|
+
it('should return zero when passed undefined', function () {
|
182
|
+
var zeroHeightDuration = transitions.getAutoHeightDuration(undefined);
|
183
|
+
assert.strictEqual(zeroHeightDuration, 0);
|
184
|
+
});
|
185
|
+
it('should return zero when passed null', function () {
|
186
|
+
var zeroHeightDuration = transitions.getAutoHeightDuration(null);
|
187
|
+
assert.strictEqual(zeroHeightDuration, 0);
|
188
|
+
});
|
189
|
+
it('should return NaN when passed a negative number', function () {
|
190
|
+
var zeroHeightDurationNegativeOne = transitions.getAutoHeightDuration(-1);
|
191
|
+
assert.strictEqual(Number.isNaN(zeroHeightDurationNegativeOne), true);
|
192
|
+
var zeroHeightDurationSmallNegative = transitions.getAutoHeightDuration(-0.000001);
|
193
|
+
assert.strictEqual(Number.isNaN(zeroHeightDurationSmallNegative), true);
|
194
|
+
var zeroHeightDurationBigNegative = transitions.getAutoHeightDuration(-100000);
|
195
|
+
assert.strictEqual(Number.isNaN(zeroHeightDurationBigNegative), true);
|
196
|
+
});
|
197
|
+
it('should return values for pre-calculated positive examples', function () {
|
198
|
+
var zeroHeightDuration = transitions.getAutoHeightDuration(14);
|
199
|
+
assert.strictEqual(zeroHeightDuration, 159);
|
200
|
+
zeroHeightDuration = transitions.getAutoHeightDuration(100);
|
201
|
+
assert.strictEqual(zeroHeightDuration, 239);
|
202
|
+
zeroHeightDuration = transitions.getAutoHeightDuration(0.0001);
|
203
|
+
assert.strictEqual(zeroHeightDuration, 46);
|
204
|
+
zeroHeightDuration = transitions.getAutoHeightDuration(100000);
|
205
|
+
assert.strictEqual(zeroHeightDuration, 6685);
|
206
|
+
});
|
207
|
+
});
|
208
|
+
});
|
package/es/styles/zIndex.js
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
1
|
// We need to centralize the zIndex definitions as they work
|
8
2
|
// like global values in the browser.
|
9
3
|
var zIndex = {
|
@@ -14,5 +8,4 @@ var zIndex = {
|
|
14
8
|
snackbar: 1400,
|
15
9
|
tooltip: 1500
|
16
10
|
};
|
17
|
-
|
18
|
-
exports.default = _default;
|
11
|
+
export default zIndex;
|
@@ -1,26 +1,15 @@
|
|
1
|
-
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import { unmountComponentAtNode } from 'react-dom';
|
4
|
+
import { mount as enzymeMount } from 'enzyme'; // Generate an enhanced mount function.
|
2
5
|
|
3
|
-
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = createMount;
|
9
|
-
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
|
-
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
|
-
var _reactDom = require("react-dom");
|
15
|
-
|
16
|
-
var _enzyme = require("enzyme");
|
17
|
-
|
18
|
-
// Generate an enhanced mount function.
|
19
|
-
function createMount() {
|
6
|
+
export default function createMount() {
|
20
7
|
var options1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8
|
+
|
21
9
|
var _options1$mount = options1.mount,
|
22
|
-
mount = _options1$mount === void 0 ?
|
23
|
-
other1 = (
|
10
|
+
mount = _options1$mount === void 0 ? enzymeMount : _options1$mount,
|
11
|
+
other1 = _objectWithoutProperties(options1, ["mount"]);
|
12
|
+
|
24
13
|
var attachTo = window.document.createElement('div');
|
25
14
|
attachTo.className = 'app';
|
26
15
|
attachTo.setAttribute('id', 'app');
|
@@ -28,7 +17,7 @@ function createMount() {
|
|
28
17
|
|
29
18
|
var mountWithContext = function mountWithContext(node) {
|
30
19
|
var options2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
31
|
-
return mount(node, (
|
20
|
+
return mount(node, _objectSpread({
|
32
21
|
attachTo: attachTo
|
33
22
|
}, other1, {}, options2));
|
34
23
|
};
|
@@ -36,7 +25,7 @@ function createMount() {
|
|
36
25
|
mountWithContext.attachTo = attachTo;
|
37
26
|
|
38
27
|
mountWithContext.cleanUp = function () {
|
39
|
-
|
28
|
+
unmountComponentAtNode(attachTo);
|
40
29
|
attachTo.parentNode.removeChild(attachTo);
|
41
30
|
};
|
42
31
|
|
@@ -1,28 +1,17 @@
|
|
1
|
-
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import { render as enzymeRender } from 'enzyme'; // Generate a render to string function.
|
2
4
|
|
3
|
-
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = createRender;
|
9
|
-
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
|
-
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
|
-
var _enzyme = require("enzyme");
|
15
|
-
|
16
|
-
// Generate a render to string function.
|
17
|
-
function createRender() {
|
5
|
+
export default function createRender() {
|
18
6
|
var options1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7
|
+
|
19
8
|
var _options1$render = options1.render,
|
20
|
-
render = _options1$render === void 0 ?
|
21
|
-
other1 = (
|
9
|
+
render = _options1$render === void 0 ? enzymeRender : _options1$render,
|
10
|
+
other1 = _objectWithoutProperties(options1, ["render"]);
|
22
11
|
|
23
12
|
var renderWithContext = function renderWithContext(node) {
|
24
13
|
var options2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
25
|
-
return render(node, (
|
14
|
+
return render(node, _objectSpread({}, other1, {}, options2));
|
26
15
|
};
|
27
16
|
|
28
17
|
return renderWithContext;
|
@@ -1,36 +1,26 @@
|
|
1
|
-
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import { shallow as enzymeShallow } from 'enzyme';
|
4
|
+
import until from './until'; // Generate an enhanced shallow function.
|
2
5
|
|
3
|
-
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = createShallow;
|
9
|
-
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
|
-
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
|
-
var _enzyme = require("enzyme");
|
15
|
-
|
16
|
-
var _until = _interopRequireDefault(require("./until"));
|
17
|
-
|
18
|
-
// Generate an enhanced shallow function.
|
19
|
-
function createShallow() {
|
6
|
+
export default function createShallow() {
|
20
7
|
var options1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8
|
+
|
21
9
|
var _options1$shallow = options1.shallow,
|
22
|
-
shallow = _options1$shallow === void 0 ?
|
10
|
+
shallow = _options1$shallow === void 0 ? enzymeShallow : _options1$shallow,
|
23
11
|
_options1$dive = options1.dive,
|
24
12
|
dive = _options1$dive === void 0 ? false : _options1$dive,
|
25
13
|
_options1$untilSelect = options1.untilSelector,
|
26
14
|
untilSelector = _options1$untilSelect === void 0 ? false : _options1$untilSelect,
|
27
|
-
other1 = (
|
15
|
+
other1 = _objectWithoutProperties(options1, ["shallow", "dive", "untilSelector"]);
|
28
16
|
|
29
17
|
var shallowWithContext = function shallowWithContext(node) {
|
30
18
|
var options2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
31
|
-
|
32
|
-
|
19
|
+
|
20
|
+
var options = _objectSpread({}, other1, {}, options2, {
|
21
|
+
context: _objectSpread({}, other1.context, {}, options2.context)
|
33
22
|
});
|
23
|
+
|
34
24
|
var wrapper = shallow(node, options);
|
35
25
|
|
36
26
|
if (dive) {
|
@@ -38,7 +28,7 @@ function createShallow() {
|
|
38
28
|
}
|
39
29
|
|
40
30
|
if (untilSelector) {
|
41
|
-
return
|
31
|
+
return until.call(wrapper, untilSelector, options);
|
42
32
|
}
|
43
33
|
|
44
34
|
return wrapper;
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
1
|
+
import { getClasses } from '@material-ui/core/test-utils'; // Helper function to extract the classes from a styleSheet.
|
2
2
|
|
3
|
-
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _testUtils = require("@material-ui/core/test-utils");
|
9
|
-
|
10
|
-
// Helper function to extract the classes from a styleSheet.
|
11
|
-
var _default = _testUtils.getClasses;
|
12
|
-
exports.default = _default;
|
3
|
+
export default getClasses;
|
package/es/test-utils/index.js
CHANGED
@@ -1,47 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
Object.defineProperty(exports, "createShallow", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _createShallow.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "createMount", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _createMount.default;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
Object.defineProperty(exports, "createRender", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return _createRender.default;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
Object.defineProperty(exports, "getClasses", {
|
27
|
-
enumerable: true,
|
28
|
-
get: function get() {
|
29
|
-
return _getClasses.default;
|
30
|
-
}
|
31
|
-
});
|
32
|
-
Object.defineProperty(exports, "unwrap", {
|
33
|
-
enumerable: true,
|
34
|
-
get: function get() {
|
35
|
-
return _unwrap.default;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
|
39
|
-
var _createShallow = _interopRequireDefault(require("./createShallow"));
|
40
|
-
|
41
|
-
var _createMount = _interopRequireDefault(require("./createMount"));
|
42
|
-
|
43
|
-
var _createRender = _interopRequireDefault(require("./createRender"));
|
44
|
-
|
45
|
-
var _getClasses = _interopRequireDefault(require("./getClasses"));
|
46
|
-
|
47
|
-
var _unwrap = _interopRequireDefault(require("./unwrap"));
|
1
|
+
export { default as createShallow } from './createShallow';
|
2
|
+
export { default as createMount } from './createMount';
|
3
|
+
export { default as createRender } from './createRender';
|
4
|
+
export { default as getClasses } from './getClasses';
|
5
|
+
export { default as unwrap } from './unwrap';
|
package/es/test-utils/until.js
CHANGED
@@ -1,19 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = until;
|
9
|
-
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
|
-
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
13
3
|
|
14
4
|
function shallowRecursively(wrapper, selector, _ref) {
|
15
5
|
var context = _ref.context,
|
16
|
-
other = (
|
6
|
+
other = _objectWithoutProperties(_ref, ["context"]);
|
17
7
|
|
18
8
|
if (wrapper.isEmptyRender() || typeof wrapper.getElement().type === 'string') {
|
19
9
|
return wrapper;
|
@@ -23,10 +13,10 @@ function shallowRecursively(wrapper, selector, _ref) {
|
|
23
13
|
var instance = wrapper.root().instance(); // The instance can be null with a stateless functional component and react >= 16.
|
24
14
|
|
25
15
|
if (instance && instance.getChildContext) {
|
26
|
-
newContext = (
|
16
|
+
newContext = _objectSpread({}, context, {}, instance.getChildContext());
|
27
17
|
}
|
28
18
|
|
29
|
-
var nextWrapper = wrapper.shallow((
|
19
|
+
var nextWrapper = wrapper.shallow(_objectSpread({
|
30
20
|
context: newContext
|
31
21
|
}, other));
|
32
22
|
|
@@ -39,7 +29,7 @@ function shallowRecursively(wrapper, selector, _ref) {
|
|
39
29
|
});
|
40
30
|
}
|
41
31
|
|
42
|
-
function until(selector) {
|
32
|
+
export default function until(selector) {
|
43
33
|
var _this = this;
|
44
34
|
|
45
35
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|