@hipay/hipay-material-ui 2.3.1-rc3 → 2.3.1-rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/HiMap/HiMap.js
CHANGED
|
@@ -1,43 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
17
|
-
|
|
18
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
|
27
|
-
|
|
28
|
-
var _HiButton = _interopRequireDefault(require("../HiButton"));
|
|
29
|
-
|
|
30
|
-
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
|
31
|
-
|
|
32
|
-
var _HiLoader = _interopRequireDefault(require("../HiLoader"));
|
|
33
|
-
|
|
34
|
-
var _leaflet = _interopRequireDefault(require("leaflet"));
|
|
35
|
-
|
|
36
|
-
var _reactLeaflet = require("react-leaflet");
|
|
37
|
-
|
|
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 _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
10
|
+
import HiButton from '../HiButton';
|
|
11
|
+
import HiIcon from '../HiIcon';
|
|
12
|
+
import HiLoader from '../HiLoader';
|
|
13
|
+
import L from 'leaflet';
|
|
14
|
+
import { Map, TileLayer, Marker } from 'react-leaflet';
|
|
38
15
|
var apiUrl = 'https://nominatim.openstreetmap.org/search?q='; // The original CSS can be found here : https://unpkg.com/leaflet@1.3.1/dist/leaflet.css
|
|
39
16
|
|
|
40
|
-
var styles = function styles(theme) {
|
|
17
|
+
export var styles = function styles(theme) {
|
|
41
18
|
return {
|
|
42
19
|
map: {
|
|
43
20
|
height: '100%',
|
|
@@ -122,27 +99,20 @@ var styles = function styles(theme) {
|
|
|
122
99
|
};
|
|
123
100
|
};
|
|
124
101
|
|
|
125
|
-
exports.styles = styles;
|
|
126
|
-
|
|
127
|
-
var _ref = _react.default.createElement(_reactLeaflet.TileLayer, {
|
|
128
|
-
url: "http://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png"
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
var _ref2 = _react.default.createElement(_HiLoader.default, {
|
|
132
|
-
loading: true
|
|
133
|
-
});
|
|
134
|
-
|
|
135
102
|
var HiMap =
|
|
136
103
|
/*#__PURE__*/
|
|
137
104
|
function (_React$PureComponent) {
|
|
138
|
-
(
|
|
105
|
+
_inherits(HiMap, _React$PureComponent);
|
|
139
106
|
|
|
140
107
|
function HiMap(props) {
|
|
141
108
|
var _this;
|
|
142
109
|
|
|
143
|
-
(
|
|
144
|
-
|
|
145
|
-
(
|
|
110
|
+
_classCallCheck(this, HiMap);
|
|
111
|
+
|
|
112
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiMap).call(this, props));
|
|
113
|
+
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
115
|
+
|
|
146
116
|
_this.state = {
|
|
147
117
|
lat: 0,
|
|
148
118
|
lng: 0,
|
|
@@ -150,15 +120,15 @@ function (_React$PureComponent) {
|
|
|
150
120
|
loaded: false,
|
|
151
121
|
zoom: 16
|
|
152
122
|
};
|
|
153
|
-
_this.handleClickZoomIn = _this.handleClickZoomIn.bind((
|
|
154
|
-
_this.handleScrollZoom = _this.handleScrollZoom.bind((
|
|
155
|
-
_this.handleClickZoomOut = _this.handleClickZoomOut.bind((
|
|
156
|
-
_this.handleCenter = _this.handleCenter.bind((
|
|
123
|
+
_this.handleClickZoomIn = _this.handleClickZoomIn.bind(_assertThisInitialized(_this));
|
|
124
|
+
_this.handleScrollZoom = _this.handleScrollZoom.bind(_assertThisInitialized(_this));
|
|
125
|
+
_this.handleClickZoomOut = _this.handleClickZoomOut.bind(_assertThisInitialized(_this));
|
|
126
|
+
_this.handleCenter = _this.handleCenter.bind(_assertThisInitialized(_this));
|
|
157
127
|
return _this;
|
|
158
128
|
} // Loads the libraries once the component mounted to avoid error caused by server-cli rendering.
|
|
159
129
|
|
|
160
130
|
|
|
161
|
-
(
|
|
131
|
+
_createClass(HiMap, [{
|
|
162
132
|
key: "componentDidMount",
|
|
163
133
|
value: function componentDidMount() {
|
|
164
134
|
this.mounted = true;
|
|
@@ -248,51 +218,55 @@ function (_React$PureComponent) {
|
|
|
248
218
|
var myIcon;
|
|
249
219
|
if (notFound) element = translations.notFound;
|
|
250
220
|
|
|
251
|
-
if (loaded &&
|
|
252
|
-
myIcon =
|
|
221
|
+
if (loaded && L && Map) {
|
|
222
|
+
myIcon = L.divIcon({
|
|
253
223
|
html: '<svg x="0px" y="0px" viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">\n' + '<path class="map_marker" ' + 'd="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9 ' + 'C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z' + ' M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8 ' + 'c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>\n' + '</svg>',
|
|
254
224
|
iconSize: [24, 36],
|
|
255
225
|
iconAnchor: [11, 36]
|
|
256
226
|
});
|
|
257
|
-
element =
|
|
227
|
+
element = React.createElement(Map, {
|
|
258
228
|
zoom: zoom,
|
|
259
229
|
center: position,
|
|
260
230
|
className: classes.map,
|
|
261
231
|
onViewportChange: this.handleScrollZoom
|
|
262
|
-
},
|
|
232
|
+
}, React.createElement(TileLayer, {
|
|
233
|
+
url: "http://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png"
|
|
234
|
+
}), React.createElement(Marker, {
|
|
263
235
|
position: position,
|
|
264
236
|
icon: myIcon
|
|
265
|
-
}),
|
|
237
|
+
}), React.createElement("div", {
|
|
266
238
|
className: classes.controlButtons
|
|
267
|
-
},
|
|
239
|
+
}, React.createElement("div", {
|
|
268
240
|
className: classes.centerButtonContainer
|
|
269
|
-
},
|
|
241
|
+
}, React.createElement(HiButton, {
|
|
270
242
|
className: classes.centerButton,
|
|
271
243
|
onClick: this.handleCenter
|
|
272
|
-
},
|
|
244
|
+
}, React.createElement(HiIcon, {
|
|
273
245
|
className: classes.centerIcon,
|
|
274
246
|
icon: 'my_location',
|
|
275
247
|
size: 24
|
|
276
|
-
}))),
|
|
248
|
+
}))), React.createElement("div", {
|
|
277
249
|
className: classes.zoomButtons
|
|
278
|
-
},
|
|
250
|
+
}, React.createElement(HiButton, {
|
|
279
251
|
onClick: this.handleClickZoomIn,
|
|
280
252
|
className: classes.zoomButton
|
|
281
|
-
}, "+"),
|
|
253
|
+
}, "+"), React.createElement(HiButton, {
|
|
282
254
|
onClick: this.handleClickZoomOut,
|
|
283
255
|
className: classes.zoomButton
|
|
284
256
|
}, "-"))));
|
|
285
257
|
} else {
|
|
286
|
-
element =
|
|
258
|
+
element = React.createElement("div", {
|
|
287
259
|
style: {
|
|
288
260
|
top: '50%',
|
|
289
261
|
left: '50%',
|
|
290
262
|
position: 'absolute'
|
|
291
263
|
}
|
|
292
|
-
},
|
|
264
|
+
}, React.createElement(HiLoader, {
|
|
265
|
+
loading: true
|
|
266
|
+
}));
|
|
293
267
|
}
|
|
294
268
|
|
|
295
|
-
return
|
|
269
|
+
return React.createElement("div", {
|
|
296
270
|
style: {
|
|
297
271
|
height: '352px',
|
|
298
272
|
width: '100%',
|
|
@@ -301,17 +275,16 @@ function (_React$PureComponent) {
|
|
|
301
275
|
}, element);
|
|
302
276
|
}
|
|
303
277
|
}]);
|
|
278
|
+
|
|
304
279
|
return HiMap;
|
|
305
|
-
}(
|
|
280
|
+
}(React.PureComponent);
|
|
306
281
|
|
|
307
|
-
(
|
|
282
|
+
_defineProperty(HiMap, "defaultProps", {
|
|
308
283
|
translations: {
|
|
309
284
|
notFound: 'Address not found'
|
|
310
285
|
}
|
|
311
286
|
});
|
|
312
287
|
|
|
313
|
-
|
|
288
|
+
export default withStyles(styles, {
|
|
314
289
|
name: 'HmuiHiMap'
|
|
315
|
-
})(HiMap);
|
|
316
|
-
|
|
317
|
-
exports.default = _default;
|
|
290
|
+
})(HiMap);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { assert } from 'chai';
|
|
3
|
+
import { createMount } from '../test-utils';
|
|
4
|
+
import HiMap from './HiMap';
|
|
5
|
+
|
|
6
|
+
require('isomorphic-fetch'); // pour la méthode fetch()
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
describe('<HiMap />', function () {
|
|
10
|
+
var mount;
|
|
11
|
+
before(function () {
|
|
12
|
+
global.HTMLImageElement = function () {};
|
|
13
|
+
|
|
14
|
+
global.HTMLVideoElement = function () {};
|
|
15
|
+
|
|
16
|
+
mount = createMount();
|
|
17
|
+
});
|
|
18
|
+
after(function () {
|
|
19
|
+
mount.cleanUp();
|
|
20
|
+
});
|
|
21
|
+
it('renders a HiMap', function () {
|
|
22
|
+
var wrapper = mount(React.createElement(HiMap, {
|
|
23
|
+
address: '21 rue de Cornulier, 44000 Nantes'
|
|
24
|
+
}), {
|
|
25
|
+
lifecycleExperimental: true
|
|
26
|
+
});
|
|
27
|
+
assert.strictEqual(wrapper.find(HiMap).length, 1, 'render HiMap');
|
|
28
|
+
});
|
|
29
|
+
});
|
package/es/HiMap/HiMapExpand.js
CHANGED
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
23
|
-
|
|
24
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
|
-
|
|
30
|
-
var _ExpansionPanel = _interopRequireDefault(require("@material-ui/core/ExpansionPanel"));
|
|
31
|
-
|
|
32
|
-
var _ExpansionPanelDetails = _interopRequireDefault(require("@material-ui/core/ExpansionPanelDetails"));
|
|
33
|
-
|
|
34
|
-
var _ExpansionPanelSummary = _interopRequireDefault(require("@material-ui/core/ExpansionPanelSummary"));
|
|
35
|
-
|
|
36
|
-
var _styles = require("@material-ui/core/styles");
|
|
37
|
-
|
|
38
|
-
var _HiMap = _interopRequireDefault(require("./HiMap"));
|
|
39
|
-
|
|
40
|
-
var _HiIcon = _interopRequireDefault(require("../HiIcon/HiIcon"));
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import ExpansionPanel from '@material-ui/core/ExpansionPanel';
|
|
12
|
+
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';
|
|
13
|
+
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
|
|
14
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
15
|
+
import HiMap from './HiMap';
|
|
16
|
+
import HiIcon from '../HiIcon/HiIcon';
|
|
41
17
|
|
|
42
18
|
var styles = function styles(theme) {
|
|
43
19
|
return {
|
|
@@ -73,12 +49,12 @@ var styles = function styles(theme) {
|
|
|
73
49
|
},
|
|
74
50
|
minHeight: '0 !important'
|
|
75
51
|
},
|
|
76
|
-
heading: (
|
|
52
|
+
heading: _objectSpread({}, theme.typography.b1, {
|
|
77
53
|
margin: 0,
|
|
78
54
|
fontSize: 15,
|
|
79
55
|
lineHeight: '24px'
|
|
80
56
|
}),
|
|
81
|
-
secondaryHeading: (
|
|
57
|
+
secondaryHeading: _objectSpread({}, theme.typography.b3, {
|
|
82
58
|
margin: 0,
|
|
83
59
|
fontSize: 15,
|
|
84
60
|
lineHeight: '24px',
|
|
@@ -95,23 +71,24 @@ var styles = function styles(theme) {
|
|
|
95
71
|
var HiMapExpand =
|
|
96
72
|
/*#__PURE__*/
|
|
97
73
|
function (_React$PureComponent) {
|
|
98
|
-
(
|
|
74
|
+
_inherits(HiMapExpand, _React$PureComponent);
|
|
99
75
|
|
|
100
76
|
function HiMapExpand(props) {
|
|
101
77
|
var _this;
|
|
102
78
|
|
|
103
|
-
(
|
|
104
|
-
|
|
79
|
+
_classCallCheck(this, HiMapExpand);
|
|
80
|
+
|
|
81
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiMapExpand).call(this, props));
|
|
105
82
|
_this.state = {
|
|
106
83
|
addressNotFound: false,
|
|
107
84
|
expanded: false
|
|
108
85
|
};
|
|
109
|
-
_this.handleAddressNotFound = _this.handleAddressNotFound.bind((
|
|
110
|
-
_this.handleExpand = _this.handleExpand.bind((
|
|
86
|
+
_this.handleAddressNotFound = _this.handleAddressNotFound.bind(_assertThisInitialized(_this));
|
|
87
|
+
_this.handleExpand = _this.handleExpand.bind(_assertThisInitialized(_this));
|
|
111
88
|
return _this;
|
|
112
89
|
}
|
|
113
90
|
|
|
114
|
-
(
|
|
91
|
+
_createClass(HiMapExpand, [{
|
|
115
92
|
key: "handleExpand",
|
|
116
93
|
value: function handleExpand() {
|
|
117
94
|
this.setState(function (prevState) {
|
|
@@ -139,50 +116,51 @@ function (_React$PureComponent) {
|
|
|
139
116
|
var _this$state = this.state,
|
|
140
117
|
addressNotFound = _this$state.addressNotFound,
|
|
141
118
|
expanded = _this$state.expanded;
|
|
142
|
-
var flag = countryFlagPath ?
|
|
119
|
+
var flag = countryFlagPath ? React.createElement("img", {
|
|
143
120
|
src: countryFlagPath,
|
|
144
121
|
className: classes.imgListItem,
|
|
145
122
|
alt: 'country flag'
|
|
146
123
|
}) : '';
|
|
147
|
-
return
|
|
124
|
+
return React.createElement(ExpansionPanel, {
|
|
148
125
|
className: classes.root,
|
|
149
126
|
defaultExpanded: false,
|
|
150
127
|
expanded: expanded,
|
|
151
128
|
onChange: this.handleExpand
|
|
152
|
-
},
|
|
129
|
+
}, React.createElement(ExpansionPanelSummary, {
|
|
153
130
|
classes: {
|
|
154
131
|
root: classes.panelSummary,
|
|
155
132
|
expanded: classes.expanded,
|
|
156
133
|
expandIcon: classes.expandMoreIcon
|
|
157
134
|
},
|
|
158
|
-
expandIcon:
|
|
135
|
+
expandIcon: React.createElement(HiIcon, {
|
|
159
136
|
icon: 'place',
|
|
160
137
|
style: {
|
|
161
138
|
position: 'relative',
|
|
162
139
|
top: 2,
|
|
163
140
|
marginRight: 5
|
|
164
141
|
},
|
|
165
|
-
className: (
|
|
142
|
+
className: classNames(_defineProperty({}, classes.disabledIcon, addressNotFound)),
|
|
166
143
|
title: addressNotFound ? translations.notFound : ''
|
|
167
144
|
})
|
|
168
|
-
},
|
|
145
|
+
}, React.createElement(React.Fragment, null, hideLabel || React.createElement("div", {
|
|
169
146
|
className: classes.column
|
|
170
|
-
},
|
|
147
|
+
}, React.createElement("p", {
|
|
171
148
|
className: classes.secondaryHeading
|
|
172
|
-
}, translations.label)),
|
|
149
|
+
}, translations.label)), React.createElement("div", null, React.createElement("p", {
|
|
173
150
|
className: classes.heading
|
|
174
|
-
}, flag, address)))),
|
|
151
|
+
}, flag, address)))), React.createElement(ExpansionPanelDetails, {
|
|
175
152
|
style: {
|
|
176
153
|
padding: 0
|
|
177
154
|
}
|
|
178
|
-
},
|
|
155
|
+
}, React.createElement(HiMap, {
|
|
179
156
|
address: address,
|
|
180
157
|
onAddressNotFound: this.handleAddressNotFound
|
|
181
158
|
})));
|
|
182
159
|
}
|
|
183
160
|
}]);
|
|
161
|
+
|
|
184
162
|
return HiMapExpand;
|
|
185
|
-
}(
|
|
163
|
+
}(React.PureComponent);
|
|
186
164
|
|
|
187
165
|
HiMapExpand.defaultProps = {
|
|
188
166
|
countryFlagPath: '',
|
|
@@ -192,9 +170,6 @@ HiMapExpand.defaultProps = {
|
|
|
192
170
|
notFound: 'Adresse inconnue'
|
|
193
171
|
}
|
|
194
172
|
};
|
|
195
|
-
|
|
196
|
-
var _default = (0, _styles.withStyles)(styles, {
|
|
173
|
+
export default withStyles(styles, {
|
|
197
174
|
name: 'HmuiHiMapExpand'
|
|
198
|
-
})(HiMapExpand);
|
|
199
|
-
|
|
200
|
-
exports.default = _default;
|
|
175
|
+
})(HiMapExpand);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { assert } from 'chai';
|
|
4
|
+
import ExpansionPanel from '@material-ui/core/ExpansionPanel';
|
|
5
|
+
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
|
|
6
|
+
import { createShallow } from '../test-utils';
|
|
7
|
+
import HiMap from './HiMap';
|
|
8
|
+
import HiMapExpand from './HiMapExpand';
|
|
9
|
+
describe('<HiMapExpand />', function _callee() {
|
|
10
|
+
var shallow, flagPath;
|
|
11
|
+
return _regeneratorRuntime.async(function _callee$(_context) {
|
|
12
|
+
while (1) {
|
|
13
|
+
switch (_context.prev = _context.next) {
|
|
14
|
+
case 0:
|
|
15
|
+
flagPath = '/static/images/countries/fr.svg';
|
|
16
|
+
before(function () {
|
|
17
|
+
global.HTMLImageElement = function () {};
|
|
18
|
+
|
|
19
|
+
global.HTMLVideoElement = function () {};
|
|
20
|
+
|
|
21
|
+
shallow = createShallow({
|
|
22
|
+
dive: true
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
it('renders an ExpansionPanel containing a HiMap', function () {
|
|
26
|
+
var wrapper = shallow(React.createElement(HiMapExpand, {
|
|
27
|
+
address: '21 rue de Cornulier 44000 Nantes'
|
|
28
|
+
}));
|
|
29
|
+
assert.strictEqual(wrapper.type(), ExpansionPanel, 'should render an ExpansionPanel');
|
|
30
|
+
assert.strictEqual(wrapper.find(HiMap).length, 1, 'should contain a HiMap');
|
|
31
|
+
});
|
|
32
|
+
it('should show an image of the flag and the address', function () {
|
|
33
|
+
var address = '21 Rue de Cornulier, 44000 Nantes';
|
|
34
|
+
var wrapper = shallow(React.createElement(HiMapExpand, {
|
|
35
|
+
address: address,
|
|
36
|
+
countryFlagPath: flagPath
|
|
37
|
+
}));
|
|
38
|
+
assert.strictEqual(wrapper.find(ExpansionPanelSummary).find('div').at(1).find('p').render().text(), address, 'should show the address passed in props');
|
|
39
|
+
assert.strictEqual(wrapper.find(ExpansionPanelSummary).find('div').at(1).find('img').length, 1, 'should render an img with the flag');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
case 4:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
package/es/HiMap/index.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _HiMap.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "HiMapExpand", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _HiMapExpand.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var _HiMap = _interopRequireDefault(require("./HiMap"));
|
|
22
|
-
|
|
23
|
-
var _HiMapExpand = _interopRequireDefault(require("./HiMapExpand"));
|
|
1
|
+
export { default } from './HiMap';
|
|
2
|
+
export { default as HiMapExpand } from './HiMapExpand';
|
package/es/HiNotice/HiKPI.js
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
|
-
|
|
28
|
-
var _styles = require("@material-ui/core/styles");
|
|
29
|
-
|
|
30
|
-
var _ButtonBase = _interopRequireDefault(require("@material-ui/core/ButtonBase"));
|
|
31
|
-
|
|
32
|
-
var _Collapse = _interopRequireDefault(require("@material-ui/core/Collapse"));
|
|
33
|
-
|
|
34
|
-
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 _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
11
|
+
import ButtonBase from '@material-ui/core/ButtonBase';
|
|
12
|
+
import Collapse from '@material-ui/core/Collapse';
|
|
13
|
+
export var styles = function styles(theme) {
|
|
35
14
|
return {
|
|
36
15
|
root: {
|
|
37
16
|
background: theme.palette.background3,
|
|
@@ -111,28 +90,29 @@ var styles = function styles(theme) {
|
|
|
111
90
|
};
|
|
112
91
|
};
|
|
113
92
|
|
|
114
|
-
exports.styles = styles;
|
|
115
|
-
|
|
116
93
|
var HiKPI =
|
|
117
94
|
/*#__PURE__*/
|
|
118
95
|
function (_React$Component) {
|
|
119
|
-
(
|
|
96
|
+
_inherits(HiKPI, _React$Component);
|
|
120
97
|
|
|
121
98
|
function HiKPI(props) {
|
|
122
99
|
var _this;
|
|
123
100
|
|
|
124
|
-
(
|
|
125
|
-
|
|
126
|
-
(
|
|
101
|
+
_classCallCheck(this, HiKPI);
|
|
102
|
+
|
|
103
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiKPI).call(this, props));
|
|
104
|
+
|
|
105
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (id) {
|
|
127
106
|
return function () {
|
|
128
107
|
_this.props.onClick(id);
|
|
129
108
|
};
|
|
130
109
|
});
|
|
131
|
-
|
|
110
|
+
|
|
111
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
132
112
|
return _this;
|
|
133
113
|
}
|
|
134
114
|
|
|
135
|
-
(
|
|
115
|
+
_createClass(HiKPI, [{
|
|
136
116
|
key: "render",
|
|
137
117
|
value: function render() {
|
|
138
118
|
var _classNames;
|
|
@@ -150,38 +130,37 @@ function (_React$Component) {
|
|
|
150
130
|
tooltip = _this$props.tooltip,
|
|
151
131
|
disable = _this$props.disable,
|
|
152
132
|
buttonId = _this$props.buttonId;
|
|
153
|
-
var rootclass = (
|
|
154
|
-
return
|
|
133
|
+
var rootclass = classNames(classes.root, (_classNames = {}, _defineProperty(_classNames, classes.inherit, color === 'inherit'), _defineProperty(_classNames, classes.warning, color === 'warning' && !disable), _defineProperty(_classNames, classes.error, color === 'error' && !disable), _defineProperty(_classNames, classes.positive, color === 'positive' && !disable), _defineProperty(_classNames, classes.active, active), _defineProperty(_classNames, classes.minify, minify), _defineProperty(_classNames, classes.rootDisable, disable), _classNames));
|
|
134
|
+
return React.createElement(ButtonBase, {
|
|
155
135
|
id: buttonId,
|
|
156
136
|
className: rootclass,
|
|
157
137
|
onClick: !disable ? this.handleClick(id) : undefined,
|
|
158
138
|
title: tooltip,
|
|
159
139
|
disableRipple: disable,
|
|
160
140
|
disabled: disable
|
|
161
|
-
}, title &&
|
|
141
|
+
}, title && React.createElement("h3", {
|
|
162
142
|
className: classes.title
|
|
163
|
-
}, title),
|
|
143
|
+
}, title), React.createElement("div", {
|
|
164
144
|
className: classes.body
|
|
165
|
-
}, minify && bodyMinify ? bodyMinify : body),
|
|
145
|
+
}, minify && bodyMinify ? bodyMinify : body), React.createElement(Collapse, {
|
|
166
146
|
in: !minify,
|
|
167
147
|
timeout: 'auto'
|
|
168
|
-
},
|
|
148
|
+
}, React.createElement("div", {
|
|
169
149
|
className: classes.subtitle
|
|
170
150
|
}, subtitle)));
|
|
171
151
|
}
|
|
172
152
|
}]);
|
|
153
|
+
|
|
173
154
|
return HiKPI;
|
|
174
|
-
}(
|
|
155
|
+
}(React.Component);
|
|
175
156
|
|
|
176
|
-
(
|
|
157
|
+
_defineProperty(HiKPI, "defaultProps", {
|
|
177
158
|
active: false,
|
|
178
159
|
minify: false,
|
|
179
160
|
color: 'inherit'
|
|
180
161
|
});
|
|
181
162
|
|
|
182
|
-
|
|
163
|
+
export default withStyles(styles, {
|
|
183
164
|
hiComponent: true,
|
|
184
165
|
name: 'HmuiHiKPI'
|
|
185
|
-
})(HiKPI);
|
|
186
|
-
|
|
187
|
-
exports.default = _default;
|
|
166
|
+
})(HiKPI);
|