@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
@@ -0,0 +1,113 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { assert } from 'chai';
|
3
|
+
import { createShallow } from '../test-utils';
|
4
|
+
import HiStepConnector from './HiStepConnector';
|
5
|
+
describe('<HiStepConnector />', function () {
|
6
|
+
var shallow;
|
7
|
+
var wrapper;
|
8
|
+
var steps = [{
|
9
|
+
id: 0,
|
10
|
+
status: 'validated',
|
11
|
+
label: 'Informations légales'
|
12
|
+
}, {
|
13
|
+
id: 1,
|
14
|
+
status: 'validated',
|
15
|
+
label: 'Les bénéficiaires effectifs'
|
16
|
+
}, {
|
17
|
+
id: 2,
|
18
|
+
status: 'validated',
|
19
|
+
label: 'Les mandataires'
|
20
|
+
}, {
|
21
|
+
id: 3,
|
22
|
+
status: 'active',
|
23
|
+
label: 'Autres documents'
|
24
|
+
}, {
|
25
|
+
id: 4,
|
26
|
+
status: 'unreviewed',
|
27
|
+
label: 'Mise en place du compte'
|
28
|
+
}];
|
29
|
+
before(function () {
|
30
|
+
shallow = createShallow();
|
31
|
+
});
|
32
|
+
describe('with a steps prop', function () {
|
33
|
+
before(function () {
|
34
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
35
|
+
steps: steps
|
36
|
+
}));
|
37
|
+
});
|
38
|
+
it('should render a HiStepConnector component', function () {
|
39
|
+
assert.strictEqual(wrapper.name(), 'HiStepConnector');
|
40
|
+
});
|
41
|
+
it('should render a div', function () {
|
42
|
+
assert.strictEqual(wrapper.dive().name(), 'div');
|
43
|
+
});
|
44
|
+
it('should have its validConnector prop set correctly', function () {
|
45
|
+
assert.strictEqual(wrapper.props().validConnector, false);
|
46
|
+
});
|
47
|
+
it('should have its type prop set correctly', function () {
|
48
|
+
assert.strictEqual(wrapper.props().type, 'back');
|
49
|
+
});
|
50
|
+
it('should have its active prop set correctly', function () {
|
51
|
+
assert.strictEqual(wrapper.props().active, false);
|
52
|
+
});
|
53
|
+
});
|
54
|
+
describe('with a validConnector prop', function () {
|
55
|
+
before(function () {
|
56
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
57
|
+
validConnector: true
|
58
|
+
}));
|
59
|
+
});
|
60
|
+
it('should have its validConnector prop set correctly', function () {
|
61
|
+
assert.strictEqual(wrapper.props().validConnector, true);
|
62
|
+
});
|
63
|
+
});
|
64
|
+
describe('with a type prop', function () {
|
65
|
+
before(function () {
|
66
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
67
|
+
type: "front-dark"
|
68
|
+
}));
|
69
|
+
});
|
70
|
+
it('should have its type prop set correctly', function () {
|
71
|
+
assert.strictEqual(wrapper.props().type, 'front-dark');
|
72
|
+
});
|
73
|
+
});
|
74
|
+
describe('with an active prop', function () {
|
75
|
+
before(function () {
|
76
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
77
|
+
active: true
|
78
|
+
}));
|
79
|
+
});
|
80
|
+
it('should have its type prop set correctly', function () {
|
81
|
+
assert.strictEqual(wrapper.props().active, true);
|
82
|
+
});
|
83
|
+
});
|
84
|
+
describe('with an active prop and a type prop', function () {
|
85
|
+
before(function () {
|
86
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
87
|
+
steps: steps,
|
88
|
+
type: "front-dark",
|
89
|
+
active: true
|
90
|
+
}));
|
91
|
+
}); // Pour ce test, on vérifie que la hauteur du connector est correctement calculée.
|
92
|
+
// Elle est fonction du nombre d'étapes, est le polynome permettant de la calculer est le suivant :
|
93
|
+
// height = screenHeight - 58 * (nbSteps - 1), ce qui pour notre cas de test où nbSteps = 5 et la hauteur de l'écran est initialisée à 768 donne 310
|
94
|
+
|
95
|
+
it('should have its length calculated correctly', function () {
|
96
|
+
assert.strictEqual(wrapper.dive().find('span').props().style.height, 310);
|
97
|
+
});
|
98
|
+
});
|
99
|
+
describe('with content attached, in the case of a front-light breadcrumb', function () {
|
100
|
+
before(function () {
|
101
|
+
var content = React.createElement("span", null, "Test");
|
102
|
+
wrapper = shallow(React.createElement(HiStepConnector, {
|
103
|
+
steps: steps,
|
104
|
+
type: "front-light",
|
105
|
+
active: true,
|
106
|
+
content: content
|
107
|
+
}));
|
108
|
+
});
|
109
|
+
it('should render a HiStepContent component with content in it', function () {
|
110
|
+
assert.strictEqual(wrapper.dive().childAt(1).dive().name(), 'HiStepContent');
|
111
|
+
});
|
112
|
+
});
|
113
|
+
});
|
@@ -1,33 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
13
|
-
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
15
|
-
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
17
|
-
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
19
|
-
|
20
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
21
|
-
|
22
|
-
var _react = _interopRequireDefault(require("react"));
|
23
|
-
|
24
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
25
|
-
|
26
|
-
var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
27
|
-
|
28
|
-
var _styles = require("@material-ui/core/styles");
|
29
|
-
|
30
|
-
var styles = function styles() {
|
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 _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
7
|
+
import React from 'react';
|
8
|
+
import classNames from 'classnames';
|
9
|
+
import Paper from '@material-ui/core/Paper';
|
10
|
+
import { withStyles } from '@material-ui/core/styles';
|
11
|
+
export var styles = function styles() {
|
31
12
|
return {
|
32
13
|
root: {
|
33
14
|
display: 'flex',
|
@@ -54,44 +35,42 @@ var styles = function styles() {
|
|
54
35
|
};
|
55
36
|
};
|
56
37
|
|
57
|
-
exports.styles = styles;
|
58
|
-
|
59
38
|
var HiStepContent =
|
60
39
|
/*#__PURE__*/
|
61
40
|
function (_React$PureComponent) {
|
62
|
-
(
|
41
|
+
_inherits(HiStepContent, _React$PureComponent);
|
63
42
|
|
64
43
|
function HiStepContent() {
|
65
|
-
(
|
66
|
-
|
44
|
+
_classCallCheck(this, HiStepContent);
|
45
|
+
|
46
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(HiStepContent).apply(this, arguments));
|
67
47
|
}
|
68
48
|
|
69
|
-
(
|
49
|
+
_createClass(HiStepContent, [{
|
70
50
|
key: "render",
|
71
51
|
value: function render() {
|
72
52
|
var _this$props = this.props,
|
73
53
|
classes = _this$props.classes,
|
74
54
|
content = _this$props.content,
|
75
55
|
isLast = _this$props.isLast;
|
76
|
-
return
|
56
|
+
return React.createElement(Paper, {
|
77
57
|
square: true,
|
78
|
-
className: (
|
79
|
-
},
|
58
|
+
className: classNames(classes.contentContainer, _defineProperty({}, classes.lastStep, isLast))
|
59
|
+
}, React.createElement("div", {
|
80
60
|
className: classes.root
|
81
61
|
}, content));
|
82
62
|
}
|
83
63
|
}]);
|
64
|
+
|
84
65
|
return HiStepContent;
|
85
|
-
}(
|
66
|
+
}(React.PureComponent);
|
86
67
|
|
87
|
-
(
|
88
|
-
content:
|
68
|
+
_defineProperty(HiStepContent, "defaultProps", {
|
69
|
+
content: React.createElement("span", null),
|
89
70
|
isLast: false
|
90
71
|
});
|
91
72
|
|
92
|
-
|
73
|
+
export default withStyles(styles, {
|
93
74
|
hiComponent: true,
|
94
75
|
name: 'HiMuiHiStepContent'
|
95
|
-
})(HiStepContent);
|
96
|
-
|
97
|
-
exports.default = _default;
|
76
|
+
})(HiStepContent);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { assert } from 'chai';
|
3
|
+
import { createShallow } from '../test-utils';
|
4
|
+
import HiStepContent from './HiStepContent';
|
5
|
+
describe('<HiStepContent />', function () {
|
6
|
+
var shallow;
|
7
|
+
var wrapper;
|
8
|
+
before(function () {
|
9
|
+
shallow = createShallow();
|
10
|
+
});
|
11
|
+
describe('with default values', function () {
|
12
|
+
before(function () {
|
13
|
+
wrapper = shallow(React.createElement(HiStepContent, null));
|
14
|
+
});
|
15
|
+
it('should render a HiStepContent component', function () {
|
16
|
+
assert.strictEqual(wrapper.name(), 'HiStepContent');
|
17
|
+
});
|
18
|
+
it('should render a Paper component', function () {
|
19
|
+
assert.strictEqual(wrapper.dive().name(), 'WithStyles(Paper)');
|
20
|
+
});
|
21
|
+
});
|
22
|
+
describe('with a content prop', function () {
|
23
|
+
before(function () {
|
24
|
+
wrapper = shallow(React.createElement(HiStepContent, {
|
25
|
+
content: "Test"
|
26
|
+
}));
|
27
|
+
});
|
28
|
+
it('should have its content prop set correctly', function () {
|
29
|
+
assert.strictEqual(wrapper.props().content, 'Test');
|
30
|
+
});
|
31
|
+
});
|
32
|
+
});
|
@@ -1,31 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
var
|
11
|
-
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
13
|
-
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
15
|
-
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
17
|
-
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
19
|
-
|
20
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
21
|
-
|
22
|
-
var _react = _interopRequireDefault(require("react"));
|
23
|
-
|
24
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
25
|
-
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
27
|
-
|
28
|
-
var styles = function styles(theme) {
|
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 _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
7
|
+
import React from 'react';
|
8
|
+
import classNames from 'classnames';
|
9
|
+
import { withStyles } from '@material-ui/core/styles';
|
10
|
+
export var styles = function styles(theme) {
|
29
11
|
return {
|
30
12
|
circle: {
|
31
13
|
borderRadius: '50%',
|
@@ -103,19 +85,18 @@ var styles = function styles(theme) {
|
|
103
85
|
};
|
104
86
|
};
|
105
87
|
|
106
|
-
exports.styles = styles;
|
107
|
-
|
108
88
|
var HiStepIcon =
|
109
89
|
/*#__PURE__*/
|
110
90
|
function (_React$PureComponent) {
|
111
|
-
(
|
91
|
+
_inherits(HiStepIcon, _React$PureComponent);
|
112
92
|
|
113
93
|
function HiStepIcon() {
|
114
|
-
(
|
115
|
-
|
94
|
+
_classCallCheck(this, HiStepIcon);
|
95
|
+
|
96
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(HiStepIcon).apply(this, arguments));
|
116
97
|
}
|
117
98
|
|
118
|
-
(
|
99
|
+
_createClass(HiStepIcon, [{
|
119
100
|
key: "render",
|
120
101
|
value: function render() {
|
121
102
|
var _classNames, _classNames2, _classNames3;
|
@@ -125,30 +106,29 @@ function (_React$PureComponent) {
|
|
125
106
|
classes = _this$props.classes,
|
126
107
|
status = _this$props.status,
|
127
108
|
type = _this$props.type;
|
128
|
-
var dotAroundClass = (
|
129
|
-
var innerDotClass = (
|
130
|
-
var dotClassName = (
|
131
|
-
return
|
109
|
+
var dotAroundClass = classNames(classes.dotAround, (_classNames = {}, _defineProperty(_classNames, classes.validated, status === 'validated'), _defineProperty(_classNames, classes.refused, status === 'refused'), _defineProperty(_classNames, classes.warning, status === 'warning'), _defineProperty(_classNames, classes.active, status === 'active'), _defineProperty(_classNames, classes.light, type === 'front-light'), _classNames));
|
110
|
+
var innerDotClass = classNames(classes.dot, (_classNames2 = {}, _defineProperty(_classNames2, classes.activeStep, active), _defineProperty(_classNames2, classes.dotValidated, status === 'validated'), _defineProperty(_classNames2, classes.dotRefused, status === 'refused'), _defineProperty(_classNames2, classes.dotWarning, status === 'warning'), _defineProperty(_classNames2, classes.dotActive, status === 'active'), _defineProperty(_classNames2, classes.dotLight, type === 'front-light'), _classNames2));
|
111
|
+
var dotClassName = classNames(classes.circle, (_classNames3 = {}, _defineProperty(_classNames3, classes.refused, status === 'refused'), _defineProperty(_classNames3, classes.validated, status === 'validated'), _defineProperty(_classNames3, classes.warning, status === 'warning'), _defineProperty(_classNames3, classes.active, status === 'active'), _defineProperty(_classNames3, classes.light, type === 'front-light'), _classNames3));
|
112
|
+
return React.createElement(React.Fragment, null, active && React.createElement("div", {
|
132
113
|
className: dotAroundClass
|
133
|
-
},
|
114
|
+
}, React.createElement("div", {
|
134
115
|
className: innerDotClass
|
135
|
-
})), !active &&
|
116
|
+
})), !active && React.createElement("div", {
|
136
117
|
className: dotClassName
|
137
118
|
}));
|
138
119
|
}
|
139
120
|
}]);
|
121
|
+
|
140
122
|
return HiStepIcon;
|
141
|
-
}(
|
123
|
+
}(React.PureComponent);
|
142
124
|
|
143
|
-
(
|
125
|
+
_defineProperty(HiStepIcon, "defaultProps", {
|
144
126
|
active: false,
|
145
127
|
status: 'unreviewed',
|
146
128
|
type: 'back'
|
147
129
|
});
|
148
130
|
|
149
|
-
|
131
|
+
export default withStyles(styles, {
|
150
132
|
hiComponent: true,
|
151
133
|
name: 'HiMuiHiStepIcon'
|
152
|
-
})(HiStepIcon);
|
153
|
-
|
154
|
-
exports.default = _default;
|
134
|
+
})(HiStepIcon);
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { assert } from 'chai';
|
3
|
+
import { createShallow, getClasses } from '../test-utils';
|
4
|
+
import HiStepIcon from './HiStepIcon';
|
5
|
+
describe('<HiStepIcon />', function () {
|
6
|
+
var shallow;
|
7
|
+
var classes;
|
8
|
+
before(function () {
|
9
|
+
shallow = createShallow();
|
10
|
+
classes = getClasses(React.createElement(HiStepIcon, null));
|
11
|
+
});
|
12
|
+
it('should render a HiStep component', function () {
|
13
|
+
var wrapper = shallow(React.createElement(HiStepIcon, null));
|
14
|
+
assert.strictEqual(wrapper.name(), 'HiStepIcon');
|
15
|
+
});
|
16
|
+
it('should initiate with correct default props', function () {
|
17
|
+
var wrapper = shallow(React.createElement(HiStepIcon, null));
|
18
|
+
assert.strictEqual(wrapper.props().active, false);
|
19
|
+
assert.strictEqual(wrapper.props().status, 'unreviewed');
|
20
|
+
});
|
21
|
+
it('should have correct classes applied if active', function () {
|
22
|
+
var wrapper = shallow(React.createElement(HiStepIcon, {
|
23
|
+
active: true
|
24
|
+
}));
|
25
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
26
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
27
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
28
|
+
});
|
29
|
+
it('should have correct classes applied if active and validated', function () {
|
30
|
+
var wrapper = shallow(React.createElement(HiStepIcon, {
|
31
|
+
active: true,
|
32
|
+
status: "validated"
|
33
|
+
}));
|
34
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
35
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
|
36
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
37
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
38
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotValidated), true);
|
39
|
+
});
|
40
|
+
it('should have correct classes applied if active and refused', function () {
|
41
|
+
var wrapper = shallow(React.createElement(HiStepIcon, {
|
42
|
+
active: true,
|
43
|
+
status: "refused"
|
44
|
+
}));
|
45
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
46
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
|
47
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
48
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
49
|
+
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotRefused), true);
|
50
|
+
});
|
51
|
+
it('should have correct classes applied if validated', function () {
|
52
|
+
var wrapper = shallow(React.createElement(HiStepIcon, {
|
53
|
+
status: "validated"
|
54
|
+
}));
|
55
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
|
56
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
|
57
|
+
});
|
58
|
+
it('should have correct classes applied if refused', function () {
|
59
|
+
var wrapper = shallow(React.createElement(HiStepIcon, {
|
60
|
+
status: "refused"
|
61
|
+
}));
|
62
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
|
63
|
+
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
|
64
|
+
});
|
65
|
+
});
|
@@ -1,41 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
var
|
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 _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
25
|
-
|
26
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
27
|
-
|
28
|
-
var _react = _interopRequireDefault(require("react"));
|
29
|
-
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
31
|
-
|
32
|
-
var _styles = require("@material-ui/core/styles");
|
33
|
-
|
34
|
-
var _HiStepIcon = _interopRequireDefault(require("./HiStepIcon"));
|
35
|
-
|
36
|
-
var _HiPin = _interopRequireDefault(require("../HiPin"));
|
37
|
-
|
38
|
-
var styles = function styles(theme) {
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
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 _inherits from "@babel/runtime/helpers/esm/inherits";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
9
|
+
import React from 'react';
|
10
|
+
import classNames from 'classnames';
|
11
|
+
import { withStyles } from '@material-ui/core/styles';
|
12
|
+
import HiStepIcon from './HiStepIcon';
|
13
|
+
import HiPin from '../HiPin';
|
14
|
+
export var styles = function styles(theme) {
|
39
15
|
return {
|
40
16
|
root: {
|
41
17
|
display: 'flex',
|
@@ -44,7 +20,7 @@ var styles = function styles(theme) {
|
|
44
20
|
hipin: {
|
45
21
|
marginLeft: 0
|
46
22
|
},
|
47
|
-
label: (
|
23
|
+
label: _objectSpread({
|
48
24
|
display: 'inline-block',
|
49
25
|
marginLeft: 4,
|
50
26
|
fontWeight: theme.typography.fontWeightRegular,
|
@@ -108,19 +84,18 @@ var styles = function styles(theme) {
|
|
108
84
|
};
|
109
85
|
};
|
110
86
|
|
111
|
-
exports.styles = styles;
|
112
|
-
|
113
87
|
var HiStepLabel =
|
114
88
|
/*#__PURE__*/
|
115
89
|
function (_React$PureComponent) {
|
116
|
-
(
|
90
|
+
_inherits(HiStepLabel, _React$PureComponent);
|
117
91
|
|
118
92
|
function HiStepLabel() {
|
119
|
-
(
|
120
|
-
|
93
|
+
_classCallCheck(this, HiStepLabel);
|
94
|
+
|
95
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(HiStepLabel).apply(this, arguments));
|
121
96
|
}
|
122
97
|
|
123
|
-
(
|
98
|
+
_createClass(HiStepLabel, [{
|
124
99
|
key: "render",
|
125
100
|
value: function render() {
|
126
101
|
var _classNames, _classNames2;
|
@@ -134,29 +109,31 @@ function (_React$PureComponent) {
|
|
134
109
|
status = _this$props.status,
|
135
110
|
type = _this$props.type,
|
136
111
|
disableNavigation = _this$props.disableNavigation,
|
137
|
-
other = (
|
138
|
-
|
139
|
-
|
140
|
-
|
112
|
+
other = _objectWithoutProperties(_this$props, ["active", "children", "classes", "className", "notificationNumber", "status", "type", "disableNavigation"]);
|
113
|
+
|
114
|
+
return React.createElement("div", Object.assign({
|
115
|
+
className: classNames(classes.root, classNameProp)
|
116
|
+
}, other), React.createElement(HiStepIcon, {
|
141
117
|
active: active,
|
142
118
|
status: status,
|
143
119
|
type: type
|
144
|
-
}),
|
145
|
-
className: (
|
146
|
-
},
|
147
|
-
className: (
|
148
|
-
}, children), notificationNumber > 0 &&
|
120
|
+
}), React.createElement("div", {
|
121
|
+
className: classNames(classes.labelContainer, (_classNames = {}, _defineProperty(_classNames, classes.largeLabelContainer, type !== 'back'), _defineProperty(_classNames, classes.shortLabelContainer, type === 'back'), _classNames))
|
122
|
+
}, React.createElement("div", {
|
123
|
+
className: classNames(classes.label, (_classNames2 = {}, _defineProperty(_classNames2, classes.labelHover, disableNavigation === false), _defineProperty(_classNames2, classes.validated, status === 'validated'), _defineProperty(_classNames2, classes.refused, status === 'refused'), _defineProperty(_classNames2, classes.warning, status === 'warning'), _defineProperty(_classNames2, classes.active, status === 'active'), _defineProperty(_classNames2, classes.light, type === 'front-light'), _defineProperty(_classNames2, classes.activeStep, active), _defineProperty(_classNames2, classes.frontLabel, type !== 'back'), _defineProperty(_classNames2, classes.shortEllipsis, notificationNumber > 0), _defineProperty(_classNames2, classes.longEllipsis, notificationNumber === 0 && type === 'back'), _classNames2))
|
124
|
+
}, children), notificationNumber > 0 && React.createElement("div", {
|
149
125
|
className: classes.pin
|
150
|
-
},
|
126
|
+
}, React.createElement(HiPin, {
|
151
127
|
className: classes.hipin,
|
152
128
|
color: "primary"
|
153
129
|
}, notificationNumber))));
|
154
130
|
}
|
155
131
|
}]);
|
132
|
+
|
156
133
|
return HiStepLabel;
|
157
|
-
}(
|
134
|
+
}(React.PureComponent);
|
158
135
|
|
159
|
-
(
|
136
|
+
_defineProperty(HiStepLabel, "defaultProps", {
|
160
137
|
active: false,
|
161
138
|
children: '',
|
162
139
|
notificationNumber: 0,
|
@@ -164,10 +141,8 @@ function (_React$PureComponent) {
|
|
164
141
|
type: 'back'
|
165
142
|
});
|
166
143
|
|
167
|
-
|
144
|
+
export default withStyles(styles, {
|
168
145
|
hiComponent: true,
|
169
146
|
name: 'HiMuiHiStepLabel',
|
170
147
|
withTheme: true
|
171
|
-
})(HiStepLabel);
|
172
|
-
|
173
|
-
exports.default = _default;
|
148
|
+
})(HiStepLabel);
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { assert } from 'chai';
|
3
|
+
import { createShallow } from '../test-utils';
|
4
|
+
import HiStepLabel from './HiStepLabel';
|
5
|
+
import HiPin from '../HiPin';
|
6
|
+
describe('<HiStepLabel />', function () {
|
7
|
+
var shallow;
|
8
|
+
before(function () {
|
9
|
+
shallow = createShallow();
|
10
|
+
});
|
11
|
+
it('should render a HiStepLabel component', function () {
|
12
|
+
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
13
|
+
assert.strictEqual(wrapper.name(), 'HiStepLabel');
|
14
|
+
});
|
15
|
+
it('should initiate with correct default props', function () {
|
16
|
+
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
17
|
+
assert.strictEqual(wrapper.props().active, false);
|
18
|
+
assert.strictEqual(wrapper.props().status, 'unreviewed');
|
19
|
+
});
|
20
|
+
it('should render a span', function () {
|
21
|
+
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
22
|
+
assert.strictEqual(wrapper.dive().name(), 'span');
|
23
|
+
});
|
24
|
+
it('should render a notification HiPin', function () {
|
25
|
+
var wrapper = shallow(React.createElement(HiStepLabel, {
|
26
|
+
notificationNumber: 2
|
27
|
+
}));
|
28
|
+
assert.strictEqual(wrapper.dive().find(HiPin).children().text(), '2');
|
29
|
+
});
|
30
|
+
});
|