@hipay/hipay-material-ui 2.3.1-rc3 → 2.3.1-rc4
Sign up to get free protection for your applications and to get access to all the features.
- package/App.test.js +8 -0
- package/HiAlertModal/HiAlertModal.js +48 -77
- package/HiAlertModal/HiAlertModal.test.js +189 -0
- package/HiAlertModal/index.js +1 -15
- package/HiAppBar/HiAppBar.js +34 -63
- package/HiAppBar/index.js +1 -15
- package/HiBadge/HiBadge.js +10 -29
- package/HiBadge/HiBadge.test.js +49 -0
- package/HiBadge/index.js +1 -15
- package/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/HiBreadcrumb/HiStep.js +35 -57
- package/HiBreadcrumb/HiStep.test.js +47 -0
- package/HiBreadcrumb/HiStepConnector.js +32 -57
- package/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/HiBreadcrumb/HiStepContent.js +25 -46
- package/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/HiBreadcrumb/HiStepIcon.js +26 -46
- package/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/HiBreadcrumb/HiStepLabel.js +36 -61
- package/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/HiBreadcrumb/HiStepper.js +23 -45
- package/HiBreadcrumb/HiStepper.test.js +33 -0
- package/HiBreadcrumb/index.js +1 -15
- package/HiButton/HiButton.js +9 -27
- package/HiButton/index.js +2 -13
- package/HiCell/CellAddress.js +20 -40
- package/HiCell/CellAddress.test.js +75 -0
- package/HiCell/CellDate.js +26 -47
- package/HiCell/CellDate.test.js +173 -0
- package/HiCell/CellIcon.js +28 -49
- package/HiCell/CellIcon.test.js +57 -0
- package/HiCell/CellImage.js +23 -42
- package/HiCell/CellImage.test.js +49 -0
- package/HiCell/CellNumeric.js +25 -46
- package/HiCell/CellNumeric.test.js +46 -0
- package/HiCell/CellPinToAction.js +20 -41
- package/HiCell/CellRate.js +32 -55
- package/HiCell/CellRate.test.js +73 -0
- package/HiCell/CellSentinel.js +22 -42
- package/HiCell/CellSentinel.test.js +48 -0
- package/HiCell/CellSentinelScore.js +23 -44
- package/HiCell/CellText.js +37 -56
- package/HiCell/CellText.test.js +76 -0
- package/HiCell/CellTextStyled.js +8 -21
- package/HiCell/index.js +9 -79
- package/HiCheckbox/HiCheckbox.js +35 -60
- package/HiCheckbox/HiCheckbox.test.js +55 -0
- package/HiCheckbox/index.js +1 -15
- package/HiChip/HiChip.js +24 -44
- package/HiChip/HiChip.test.js +136 -0
- package/HiChip/HiChipSwitch.js +47 -70
- package/HiChip/HiChipSwitch.test.js +99 -0
- package/HiChip/index.js +2 -23
- package/HiColoredLabel/HiColoredLabel.js +28 -52
- package/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/HiColoredLabel/index.js +1 -15
- package/HiDatePicker/Caption.js +11 -28
- package/HiDatePicker/Caption.test.js +65 -0
- package/HiDatePicker/HiDatePicker.js +100 -115
- package/HiDatePicker/HiDatePicker.test.js +370 -0
- package/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/HiDatePicker/HiDateRangePicker.js +138 -149
- package/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/HiDatePicker/ListPicker.js +33 -55
- package/HiDatePicker/ListPicker.test.js +53 -0
- package/HiDatePicker/NavBar.js +18 -45
- package/HiDatePicker/NavBar.test.js +39 -0
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/HiDatePicker/Overlays/Overlay.js +18 -35
- package/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/HiDatePicker/Overlays/index.js +5 -47
- package/HiDatePicker/Weekday.js +3 -13
- package/HiDatePicker/hiLocaleUtils.js +1 -8
- package/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/HiDatePicker/index.js +1 -15
- package/HiDatePicker/stylesheet.js +9 -22
- package/HiDotsStepper/HiDot.js +30 -57
- package/HiDotsStepper/HiDot.test.js +55 -0
- package/HiDotsStepper/HiDotsStepper.js +29 -47
- package/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/HiDotsStepper/index.js +2 -23
- package/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/HiExpansionPanel/index.js +2 -13
- package/HiForm/HiAddressField.js +30 -47
- package/HiForm/HiAddressField.test.js +79 -0
- package/HiForm/HiEmailField.js +28 -46
- package/HiForm/HiEmailField.test.js +19 -0
- package/HiForm/HiFormControl.js +72 -100
- package/HiForm/HiFormControl.test.js +195 -0
- package/HiForm/HiFormLabel.js +29 -54
- package/HiForm/HiFormLabel.test.js +66 -0
- package/HiForm/HiInput.js +62 -86
- package/HiForm/HiInput.test.js +202 -0
- package/HiForm/HiPasswordField.js +29 -55
- package/HiForm/HiPasswordField.test.js +60 -0
- package/HiForm/HiSearchField.js +27 -44
- package/HiForm/HiSearchField.test.js +193 -0
- package/HiForm/HiSlider.js +42 -64
- package/HiForm/HiSlider.test.js +99 -0
- package/HiForm/HiTextField.js +29 -46
- package/HiForm/HiTextField.test.js +254 -0
- package/HiForm/HiUpload.js +54 -70
- package/HiForm/HiUpload.test.js +241 -0
- package/HiForm/HiUploadField.js +24 -41
- package/HiForm/HiUploadField.test.js +55 -0
- package/HiForm/HiUploadInput.js +56 -77
- package/HiForm/HiUploadInput.test.js +148 -0
- package/HiForm/index.js +11 -95
- package/HiIcon/HiIcon.js +22 -44
- package/HiIcon/index.js +1 -15
- package/HiIconButton/HiIconButton.js +18 -40
- package/HiIconButton/HiIconButton.test.js +69 -0
- package/HiIconButton/index.js +1 -15
- package/HiLoader/HiLoader.js +9 -24
- package/HiLoader/HiLoader.test.js +18 -0
- package/HiLoader/index.js +1 -15
- package/HiMap/HiMap.js +50 -77
- package/HiMap/HiMap.test.js +29 -0
- package/HiMap/HiMapExpand.js +39 -64
- package/HiMap/HiMapExpand.test.js +48 -0
- package/HiMap/index.js +2 -23
- package/HiNotice/HiKPI.js +33 -54
- package/HiNotice/HiKPI.test.js +171 -0
- package/HiNotice/HiKPINotice.js +7 -21
- package/HiNotice/HiKPINotice.test.js +88 -0
- package/HiNotice/index.js +2 -23
- package/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/HiPaymentMeans/index.js +1 -15
- package/HiPdfReader/HiPdfReader.js +51 -76
- package/HiPdfReader/index.js +1 -15
- package/HiPin/HiPin.js +9 -30
- package/HiPin/HiPin.test.js +61 -0
- package/HiPin/index.js +1 -15
- package/HiRadio/HiRadio.js +7 -24
- package/HiRadio/HiRadio.test.js +57 -0
- package/HiRadio/index.js +1 -15
- package/HiSelect/HiDynamicSelect.js +40 -56
- package/HiSelect/HiDynamicSelectField.js +22 -40
- package/HiSelect/HiNestedSelect.js +55 -84
- package/HiSelect/HiNestedSelectContent.js +46 -73
- package/HiSelect/HiNestedSelectField.js +22 -40
- package/HiSelect/HiSelect.js +123 -139
- package/HiSelect/HiSelect.test.js +1092 -0
- package/HiSelect/HiSelectContent.js +73 -95
- package/HiSelect/HiSelectField.js +22 -40
- package/HiSelect/HiSelectInput.js +63 -87
- package/HiSelect/HiSelectInput.test.js +21 -0
- package/HiSelect/HiSelectMobile.js +35 -54
- package/HiSelect/HiSuggestSelect.js +56 -78
- package/HiSelect/HiSuggestSelectField.js +22 -40
- package/HiSelect/index.js +8 -85
- package/HiSelectableList/HiSelectableList.js +49 -77
- package/HiSelectableList/HiSelectableList.test.js +173 -0
- package/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/HiSelectableList/HiSelectableListItem.js +66 -98
- package/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/HiSelectableList/index.js +3 -31
- package/HiSwitch/HiSwitch.js +20 -45
- package/HiSwitch/HiSwitch.test.js +41 -0
- package/HiSwitch/HiSwitchState.js +15 -36
- package/HiSwitch/HiSwitchState.test.js +76 -0
- package/HiSwitch/index.js +2 -23
- package/HiTable/HiCellBuilder.js +44 -72
- package/HiTable/HiTable.js +29 -47
- package/HiTable/HiTable.test.js +29 -0
- package/HiTable/HiTableBody.js +19 -34
- package/HiTable/HiTableHeader.js +30 -53
- package/HiTable/HiTableRow.js +29 -56
- package/HiTable/constants.js +43 -94
- package/HiTable/index.js +1 -15
- package/es/App.test.js +8 -0
- package/es/HiAlertModal/HiAlertModal.js +48 -77
- package/es/HiAlertModal/HiAlertModal.test.js +189 -0
- package/es/HiAlertModal/index.js +1 -15
- package/es/HiAppBar/HiAppBar.js +34 -63
- package/es/HiAppBar/index.js +1 -15
- package/es/HiBadge/HiBadge.js +10 -29
- package/es/HiBadge/HiBadge.test.js +49 -0
- package/es/HiBadge/index.js +1 -15
- package/es/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/es/HiBreadcrumb/HiStep.js +35 -57
- package/es/HiBreadcrumb/HiStep.test.js +47 -0
- package/es/HiBreadcrumb/HiStepConnector.js +32 -57
- package/es/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/es/HiBreadcrumb/HiStepContent.js +25 -46
- package/es/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/es/HiBreadcrumb/HiStepIcon.js +26 -46
- package/es/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/es/HiBreadcrumb/HiStepLabel.js +36 -61
- package/es/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/es/HiBreadcrumb/HiStepper.js +23 -45
- package/es/HiBreadcrumb/HiStepper.test.js +33 -0
- package/es/HiBreadcrumb/index.js +1 -15
- package/es/HiButton/HiButton.js +9 -27
- package/es/HiButton/index.js +2 -13
- package/es/HiCell/CellAddress.js +20 -40
- package/es/HiCell/CellAddress.test.js +75 -0
- package/es/HiCell/CellDate.js +26 -47
- package/es/HiCell/CellDate.test.js +173 -0
- package/es/HiCell/CellIcon.js +28 -49
- package/es/HiCell/CellIcon.test.js +57 -0
- package/es/HiCell/CellImage.js +23 -42
- package/es/HiCell/CellImage.test.js +49 -0
- package/es/HiCell/CellNumeric.js +25 -46
- package/es/HiCell/CellNumeric.test.js +46 -0
- package/es/HiCell/CellPinToAction.js +20 -41
- package/es/HiCell/CellRate.js +32 -55
- package/es/HiCell/CellRate.test.js +73 -0
- package/es/HiCell/CellSentinel.js +22 -42
- package/es/HiCell/CellSentinel.test.js +48 -0
- package/es/HiCell/CellSentinelScore.js +23 -44
- package/es/HiCell/CellText.js +37 -56
- package/es/HiCell/CellText.test.js +76 -0
- package/es/HiCell/CellTextStyled.js +8 -21
- package/es/HiCell/index.js +9 -79
- package/es/HiCheckbox/HiCheckbox.js +35 -60
- package/es/HiCheckbox/HiCheckbox.test.js +55 -0
- package/es/HiCheckbox/index.js +1 -15
- package/es/HiChip/HiChip.js +24 -44
- package/es/HiChip/HiChip.test.js +136 -0
- package/es/HiChip/HiChipSwitch.js +47 -70
- package/es/HiChip/HiChipSwitch.test.js +99 -0
- package/es/HiChip/index.js +2 -23
- package/es/HiColoredLabel/HiColoredLabel.js +28 -52
- package/es/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/es/HiColoredLabel/index.js +1 -15
- package/es/HiDatePicker/Caption.js +11 -28
- package/es/HiDatePicker/Caption.test.js +65 -0
- package/es/HiDatePicker/HiDatePicker.js +100 -115
- package/es/HiDatePicker/HiDatePicker.test.js +370 -0
- package/es/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/es/HiDatePicker/HiDateRangePicker.js +138 -149
- package/es/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/es/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/es/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/es/HiDatePicker/ListPicker.js +33 -55
- package/es/HiDatePicker/ListPicker.test.js +53 -0
- package/es/HiDatePicker/NavBar.js +18 -45
- package/es/HiDatePicker/NavBar.test.js +39 -0
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/es/HiDatePicker/Overlays/Overlay.js +18 -35
- package/es/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/es/HiDatePicker/Overlays/index.js +5 -47
- package/es/HiDatePicker/Weekday.js +3 -13
- package/es/HiDatePicker/hiLocaleUtils.js +1 -8
- package/es/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/es/HiDatePicker/index.js +1 -15
- package/es/HiDatePicker/stylesheet.js +9 -22
- package/es/HiDotsStepper/HiDot.js +30 -57
- package/es/HiDotsStepper/HiDot.test.js +55 -0
- package/es/HiDotsStepper/HiDotsStepper.js +29 -47
- package/es/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/es/HiDotsStepper/index.js +2 -23
- package/es/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/es/HiExpansionPanel/index.js +2 -13
- package/es/HiForm/HiAddressField.js +30 -47
- package/es/HiForm/HiAddressField.test.js +79 -0
- package/es/HiForm/HiEmailField.js +28 -46
- package/es/HiForm/HiEmailField.test.js +19 -0
- package/es/HiForm/HiFormControl.js +72 -100
- package/es/HiForm/HiFormControl.test.js +195 -0
- package/es/HiForm/HiFormLabel.js +29 -54
- package/es/HiForm/HiFormLabel.test.js +66 -0
- package/es/HiForm/HiInput.js +62 -86
- package/es/HiForm/HiInput.test.js +202 -0
- package/es/HiForm/HiPasswordField.js +29 -55
- package/es/HiForm/HiPasswordField.test.js +60 -0
- package/es/HiForm/HiSearchField.js +27 -44
- package/es/HiForm/HiSearchField.test.js +193 -0
- package/es/HiForm/HiSlider.js +42 -64
- package/es/HiForm/HiSlider.test.js +99 -0
- package/es/HiForm/HiTextField.js +29 -46
- package/es/HiForm/HiTextField.test.js +254 -0
- package/es/HiForm/HiUpload.js +54 -70
- package/es/HiForm/HiUpload.test.js +241 -0
- package/es/HiForm/HiUploadField.js +24 -41
- package/es/HiForm/HiUploadField.test.js +55 -0
- package/es/HiForm/HiUploadInput.js +56 -77
- package/es/HiForm/HiUploadInput.test.js +148 -0
- package/es/HiForm/index.js +11 -95
- package/es/HiIcon/HiIcon.js +22 -44
- package/es/HiIcon/index.js +1 -15
- package/es/HiIconButton/HiIconButton.js +18 -40
- package/es/HiIconButton/HiIconButton.test.js +69 -0
- package/es/HiIconButton/index.js +1 -15
- package/es/HiLoader/HiLoader.js +9 -24
- package/es/HiLoader/HiLoader.test.js +18 -0
- package/es/HiLoader/index.js +1 -15
- package/es/HiMap/HiMap.js +50 -77
- package/es/HiMap/HiMap.test.js +29 -0
- package/es/HiMap/HiMapExpand.js +39 -64
- package/es/HiMap/HiMapExpand.test.js +48 -0
- package/es/HiMap/index.js +2 -23
- package/es/HiNotice/HiKPI.js +33 -54
- package/es/HiNotice/HiKPI.test.js +171 -0
- package/es/HiNotice/HiKPINotice.js +7 -21
- package/es/HiNotice/HiKPINotice.test.js +88 -0
- package/es/HiNotice/index.js +2 -23
- package/es/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/es/HiPaymentMeans/index.js +1 -15
- package/es/HiPdfReader/HiPdfReader.js +51 -76
- package/es/HiPdfReader/index.js +1 -15
- package/es/HiPin/HiPin.js +9 -30
- package/es/HiPin/HiPin.test.js +61 -0
- package/es/HiPin/index.js +1 -15
- package/es/HiRadio/HiRadio.js +7 -24
- package/es/HiRadio/HiRadio.test.js +57 -0
- package/es/HiRadio/index.js +1 -15
- package/es/HiSelect/HiDynamicSelect.js +40 -56
- package/es/HiSelect/HiDynamicSelectField.js +22 -40
- package/es/HiSelect/HiNestedSelect.js +55 -84
- package/es/HiSelect/HiNestedSelectContent.js +46 -73
- package/es/HiSelect/HiNestedSelectField.js +22 -40
- package/es/HiSelect/HiSelect.js +123 -139
- package/es/HiSelect/HiSelect.test.js +1092 -0
- package/es/HiSelect/HiSelectContent.js +73 -95
- package/es/HiSelect/HiSelectField.js +22 -40
- package/es/HiSelect/HiSelectInput.js +63 -87
- package/es/HiSelect/HiSelectInput.test.js +21 -0
- package/es/HiSelect/HiSelectMobile.js +35 -54
- package/es/HiSelect/HiSuggestSelect.js +56 -78
- package/es/HiSelect/HiSuggestSelectField.js +22 -40
- package/es/HiSelect/index.js +8 -85
- package/es/HiSelectableList/HiSelectableList.js +49 -77
- package/es/HiSelectableList/HiSelectableList.test.js +173 -0
- package/es/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/es/HiSelectableList/HiSelectableListItem.js +66 -98
- package/es/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/es/HiSelectableList/index.js +3 -31
- package/es/HiSwitch/HiSwitch.js +20 -45
- package/es/HiSwitch/HiSwitch.test.js +41 -0
- package/es/HiSwitch/HiSwitchState.js +15 -36
- package/es/HiSwitch/HiSwitchState.test.js +76 -0
- package/es/HiSwitch/index.js +2 -23
- package/es/HiTable/HiCellBuilder.js +44 -72
- package/es/HiTable/HiTable.js +29 -47
- package/es/HiTable/HiTable.test.js +29 -0
- package/es/HiTable/HiTableBody.js +19 -34
- package/es/HiTable/HiTableHeader.js +30 -53
- package/es/HiTable/HiTableRow.js +29 -56
- package/es/HiTable/constants.js +43 -94
- package/es/HiTable/index.js +1 -15
- package/es/hi-svg-icons/HiAccount.js +18 -36
- package/es/hi-svg-icons/HiActivity.js +17 -35
- package/es/hi-svg-icons/HiAll.js +22 -42
- package/es/hi-svg-icons/HiBilling.js +18 -36
- package/es/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/es/hi-svg-icons/HiCatalog.js +18 -36
- package/es/hi-svg-icons/HiCustomer.js +18 -36
- package/es/hi-svg-icons/HiDownload.js +11 -25
- package/es/hi-svg-icons/HiFinance.js +18 -36
- package/es/hi-svg-icons/HiPermission.js +17 -35
- package/es/hi-svg-icons/HiRoute.js +18 -36
- package/es/hi-svg-icons/HiSettlement.js +18 -36
- package/es/hi-svg-icons/HiSizeLarge.js +12 -27
- package/es/hi-svg-icons/HiSizeMedium.js +11 -25
- package/es/hi-svg-icons/HiSizeSmall.js +11 -25
- package/es/hi-svg-icons/HiTransaction.js +18 -36
- package/es/hi-svg-icons/HiUser.js +18 -36
- package/es/hi-svg-icons/HiWidget.js +22 -42
- package/es/hi-svg-icons/index.js +18 -151
- package/es/hi-svg-icons/index.text.js +11 -21
- package/es/styleguide/Wrapper.js +19 -36
- package/es/styles/MuiThemeProvider.js +39 -59
- package/es/styles/colorManipulator.js +16 -44
- package/es/styles/colorManipulator.test.js +242 -0
- package/es/styles/createBreakpoints.js +6 -20
- package/es/styles/createBreakpoints.test.js +48 -0
- package/es/styles/createGenerateClassName.js +5 -15
- package/es/styles/createGenerateClassName.test.js +141 -0
- package/es/styles/createMixins.js +8 -19
- package/es/styles/createMixins.test.js +24 -0
- package/es/styles/createMuiTheme.js +34 -53
- package/es/styles/createMuiTheme.test.js +67 -0
- package/es/styles/createPalette.js +30 -50
- package/es/styles/createPalette.test.js +159 -0
- package/es/styles/createStyles.js +1 -8
- package/es/styles/createStyles.test.js +8 -0
- package/es/styles/createTypography.js +18 -30
- package/es/styles/createTypography.test.js +60 -0
- package/es/styles/getStylesCreator.js +11 -24
- package/es/styles/getStylesCreator.test.js +92 -0
- package/es/styles/getThemeProps.js +1 -9
- package/es/styles/getThemeProps.test.js +39 -0
- package/es/styles/index.js +5 -47
- package/es/styles/jssPreset.js +9 -25
- package/es/styles/mergeClasses.js +7 -19
- package/es/styles/shadows.js +1 -8
- package/es/styles/shape.js +1 -8
- package/es/styles/spacing.js +1 -9
- package/es/styles/themeListener.js +5 -18
- package/es/styles/themeListener.test.js +26 -0
- package/es/styles/transitions.js +18 -38
- package/es/styles/transitions.test.js +208 -0
- package/es/styles/zIndex.js +1 -8
- package/es/test-utils/createMount.js +11 -22
- package/es/test-utils/createRender.js +8 -19
- package/es/test-utils/createShallow.js +13 -23
- package/es/test-utils/getClasses.js +2 -11
- package/es/test-utils/index.js +5 -47
- package/es/test-utils/until.js +6 -16
- package/es/test-utils/until.test.js +157 -0
- package/es/test-utils/unwrap.js +1 -8
- package/es/theme/palette.js +2 -10
- package/es/theme/typography.js +2 -10
- package/es/theme.js +2 -11
- package/es/transitions/utils.js +2 -13
- package/es/utils/exactProp.js +5 -18
- package/es/utils/helpers.js +18 -55
- package/es/withMobileDialog/index.js +1 -15
- package/es/withMobileDialog/withMobileDialog.js +7 -22
- package/es/withMobileDialog/withMobileDialog.test.js +67 -0
- package/hi-svg-icons/HiAccount.js +18 -36
- package/hi-svg-icons/HiActivity.js +17 -35
- package/hi-svg-icons/HiAll.js +22 -42
- package/hi-svg-icons/HiBilling.js +18 -36
- package/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/hi-svg-icons/HiCatalog.js +18 -36
- package/hi-svg-icons/HiCustomer.js +18 -36
- package/hi-svg-icons/HiDownload.js +11 -25
- package/hi-svg-icons/HiFinance.js +18 -36
- package/hi-svg-icons/HiPermission.js +17 -35
- package/hi-svg-icons/HiRoute.js +18 -36
- package/hi-svg-icons/HiSettlement.js +18 -36
- package/hi-svg-icons/HiSizeLarge.js +12 -27
- package/hi-svg-icons/HiSizeMedium.js +11 -25
- package/hi-svg-icons/HiSizeSmall.js +11 -25
- package/hi-svg-icons/HiTransaction.js +18 -36
- package/hi-svg-icons/HiUser.js +18 -36
- package/hi-svg-icons/HiWidget.js +22 -42
- package/hi-svg-icons/index.js +18 -151
- package/hi-svg-icons/index.text.js +11 -21
- package/package.json +1 -1
- package/styleguide/Wrapper.js +19 -36
- package/styles/MuiThemeProvider.js +39 -59
- package/styles/colorManipulator.js +16 -44
- package/styles/colorManipulator.test.js +242 -0
- package/styles/createBreakpoints.js +6 -20
- package/styles/createBreakpoints.test.js +48 -0
- package/styles/createGenerateClassName.js +5 -15
- package/styles/createGenerateClassName.test.js +141 -0
- package/styles/createMixins.js +8 -19
- package/styles/createMixins.test.js +24 -0
- package/styles/createMuiTheme.js +34 -53
- package/styles/createMuiTheme.test.js +67 -0
- package/styles/createPalette.js +30 -50
- package/styles/createPalette.test.js +159 -0
- package/styles/createStyles.js +1 -8
- package/styles/createStyles.test.js +8 -0
- package/styles/createTypography.js +18 -30
- package/styles/createTypography.test.js +60 -0
- package/styles/getStylesCreator.js +11 -24
- package/styles/getStylesCreator.test.js +92 -0
- package/styles/getThemeProps.js +1 -9
- package/styles/getThemeProps.test.js +39 -0
- package/styles/index.js +5 -47
- package/styles/jssPreset.js +9 -25
- package/styles/mergeClasses.js +7 -19
- package/styles/shadows.js +1 -8
- package/styles/shape.js +1 -8
- package/styles/spacing.js +1 -9
- package/styles/themeListener.js +5 -18
- package/styles/themeListener.test.js +26 -0
- package/styles/transitions.js +18 -38
- package/styles/transitions.test.js +208 -0
- package/styles/zIndex.js +1 -8
- package/test-utils/createMount.js +11 -22
- package/test-utils/createRender.js +8 -19
- package/test-utils/createShallow.js +13 -23
- package/test-utils/getClasses.js +2 -11
- package/test-utils/index.js +5 -47
- package/test-utils/until.js +6 -16
- package/test-utils/until.test.js +157 -0
- package/test-utils/unwrap.js +1 -8
- package/theme/palette.js +2 -10
- package/theme/typography.js +2 -10
- package/theme.js +2 -11
- package/transitions/utils.js +2 -13
- package/utils/exactProp.js +5 -18
- package/utils/helpers.js +18 -55
- package/withMobileDialog/index.js +1 -15
- package/withMobileDialog/withMobileDialog.js +7 -22
- package/withMobileDialog/withMobileDialog.test.js +67 -0
@@ -1,81 +1,45 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
|
-
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
33
|
-
|
34
|
-
var _moment = _interopRequireDefault(require("react-day-picker/moment"));
|
35
|
-
|
36
|
-
var _hiLocaleUtils = _interopRequireDefault(require("./hiLocaleUtils"));
|
37
|
-
|
38
|
-
var _DayPickerInput = _interopRequireDefault(require("react-day-picker/DayPickerInput"));
|
39
|
-
|
40
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
41
|
-
|
42
|
-
var _styles = require("@material-ui/core/styles");
|
43
|
-
|
44
|
-
var _Caption = _interopRequireDefault(require("./Caption"));
|
45
|
-
|
46
|
-
var _Overlay = _interopRequireDefault(require("./Overlays/Overlay"));
|
47
|
-
|
48
|
-
var _TimePickerOverlay = _interopRequireDefault(require("./Overlays/TimePickerOverlay"));
|
49
|
-
|
50
|
-
var _MonthPickerOverlay = _interopRequireDefault(require("./Overlays/MonthPickerOverlay"));
|
51
|
-
|
52
|
-
var _YearPickerOverlay = _interopRequireDefault(require("./Overlays/YearPickerOverlay"));
|
53
|
-
|
54
|
-
var _NavBar = _interopRequireDefault(require("./NavBar"));
|
55
|
-
|
56
|
-
var _Weekday = _interopRequireDefault(require("./Weekday"));
|
57
|
-
|
58
|
-
var _HiForm = require("../HiForm");
|
59
|
-
|
60
|
-
var _stylesheet = _interopRequireDefault(require("./stylesheet"));
|
61
|
-
|
62
|
-
var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
|
63
|
-
|
64
|
-
var _reactDeviceDetect = require("react-device-detect");
|
65
|
-
|
66
|
-
var _HiDatePickerMobile = _interopRequireDefault(require("./HiDatePickerMobile"));
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
7
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
8
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
10
|
+
import React from 'react';
|
11
|
+
import moment from 'moment-timezone';
|
12
|
+
import MomentLocaleUtils from 'react-day-picker/moment';
|
13
|
+
import HiLocaleUtils from './hiLocaleUtils';
|
14
|
+
import DayPickerInput from 'react-day-picker/DayPickerInput';
|
15
|
+
import classNames from 'classnames';
|
16
|
+
import { withStyles } from '@material-ui/core/styles';
|
17
|
+
import Caption from './Caption';
|
18
|
+
import Overlay from './Overlays/Overlay';
|
19
|
+
import TimePickerOverlay from './Overlays/TimePickerOverlay';
|
20
|
+
import MonthPickerOverlay from './Overlays/MonthPickerOverlay';
|
21
|
+
import YearPickerOverlay from './Overlays/YearPickerOverlay';
|
22
|
+
import NavBar from './NavBar';
|
23
|
+
import Weekday from './Weekday';
|
24
|
+
import { HiTextField } from '../HiForm';
|
25
|
+
import styles from './stylesheet';
|
26
|
+
import HiFormControl from '../HiForm/HiFormControl';
|
27
|
+
import { isMobile } from 'react-device-detect';
|
28
|
+
import HiDatePickerMobile from './HiDatePickerMobile';
|
67
29
|
|
68
30
|
var HiDateRangePicker =
|
69
31
|
/*#__PURE__*/
|
70
32
|
function (_React$Component) {
|
71
|
-
(
|
33
|
+
_inherits(HiDateRangePicker, _React$Component);
|
72
34
|
|
73
35
|
function HiDateRangePicker(props) {
|
74
36
|
var _this;
|
75
37
|
|
76
|
-
(
|
77
|
-
|
78
|
-
|
38
|
+
_classCallCheck(this, HiDateRangePicker);
|
39
|
+
|
40
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiDateRangePicker).call(this, props));
|
41
|
+
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "handleDayChange", function (name, day) {
|
79
43
|
if (day) {
|
80
44
|
// if time disabled, focus TO input
|
81
45
|
// else focus current input
|
@@ -102,14 +66,16 @@ function (_React$Component) {
|
|
102
66
|
}
|
103
67
|
}
|
104
68
|
});
|
105
|
-
|
69
|
+
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "handleInputChange", function (inputName) {
|
106
71
|
return function (event) {
|
107
72
|
_this.handleChange(inputName, event.target.value);
|
108
73
|
};
|
109
74
|
});
|
110
|
-
|
111
|
-
|
112
|
-
var
|
75
|
+
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "onDayToClick", function (day) {
|
77
|
+
var change = moment(day) >= moment(_this.props.from);
|
78
|
+
var today = moment().tz(_this.props.timezoneName);
|
113
79
|
var todayDate = new Date(today.year(), today.month(), today.date(), 23, 59, 59);
|
114
80
|
|
115
81
|
if (change && day > todayDate) {
|
@@ -122,7 +88,8 @@ function (_React$Component) {
|
|
122
88
|
document.activeElement.blur();
|
123
89
|
}
|
124
90
|
});
|
125
|
-
|
91
|
+
|
92
|
+
_defineProperty(_assertThisInitialized(_this), "handleTimeChange", function (name, date, precision) {
|
126
93
|
_this.handleChange(name, date);
|
127
94
|
|
128
95
|
if (name === 'from' && precision === 'minute') {
|
@@ -139,13 +106,14 @@ function (_React$Component) {
|
|
139
106
|
document.activeElement.blur();
|
140
107
|
}
|
141
108
|
});
|
142
|
-
|
109
|
+
|
110
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (name, day) {
|
143
111
|
var _this$props = _this.props,
|
144
112
|
translations = _this$props.translations,
|
145
113
|
timezoneName = _this$props.timezoneName;
|
146
114
|
var date;
|
147
115
|
var error;
|
148
|
-
var today = (
|
116
|
+
var today = moment().tz(timezoneName);
|
149
117
|
var now = new Date(today.year(), today.month(), today.date(), 23, 59, 59);
|
150
118
|
var _this$props2 = _this.props,
|
151
119
|
minimumDate = _this$props2.minimumDate,
|
@@ -155,7 +123,7 @@ function (_React$Component) {
|
|
155
123
|
if (day instanceof Date) {
|
156
124
|
date = day;
|
157
125
|
} else if (day) {
|
158
|
-
var parsedValue = (
|
126
|
+
var parsedValue = moment(day, _this.props.format, true);
|
159
127
|
|
160
128
|
if (parsedValue.isValid()) {
|
161
129
|
date = parsedValue.toDate();
|
@@ -165,14 +133,14 @@ function (_React$Component) {
|
|
165
133
|
}
|
166
134
|
|
167
135
|
if (date) {
|
168
|
-
var comparativeDate = name === 'to' ? (
|
136
|
+
var comparativeDate = name === 'to' ? moment(_this.props.from) : moment(_this.props.to);
|
169
137
|
|
170
|
-
if (name === 'to' && comparativeDate > (
|
138
|
+
if (name === 'to' && comparativeDate > moment(date) || name === 'from' && comparativeDate < moment(date)) {
|
171
139
|
error = translations.to_superior_from;
|
172
|
-
} else if ((
|
173
|
-
error = translations.date_inferior_min_date.replace('%s', (
|
140
|
+
} else if (moment(date).utc() < moment(minimumDate).utc().startOf('day')) {
|
141
|
+
error = translations.date_inferior_min_date.replace('%s', moment(minimumDate).format(format));
|
174
142
|
} else if (disableFutureDays && date > now) {
|
175
|
-
error = translations.date_superior_max_date.replace('%s', (
|
143
|
+
error = translations.date_superior_max_date.replace('%s', moment().tz(timezoneName).format(format));
|
176
144
|
}
|
177
145
|
|
178
146
|
if (!_this.props.enableTime) {
|
@@ -188,7 +156,8 @@ function (_React$Component) {
|
|
188
156
|
|
189
157
|
_this.props.onChange("".concat(name, "Error"), error);
|
190
158
|
});
|
191
|
-
|
159
|
+
|
160
|
+
_defineProperty(_assertThisInitialized(_this), "handleChangeMobile", function (inputName) {
|
192
161
|
return function (event) {
|
193
162
|
var date;
|
194
163
|
|
@@ -199,18 +168,21 @@ function (_React$Component) {
|
|
199
168
|
_this.props.onChange(inputName, date);
|
200
169
|
};
|
201
170
|
});
|
202
|
-
|
171
|
+
|
172
|
+
_defineProperty(_assertThisInitialized(_this), "handleCurrentMonthChange", function (day) {
|
203
173
|
_this.setState({
|
204
174
|
currentMonth: day,
|
205
175
|
openedPanel: 'calendar'
|
206
176
|
});
|
207
177
|
});
|
208
|
-
|
178
|
+
|
179
|
+
_defineProperty(_assertThisInitialized(_this), "handleDayPickerFocus", function (name) {
|
209
180
|
_this.setState({
|
210
181
|
focusedInput: name
|
211
182
|
});
|
212
183
|
});
|
213
|
-
|
184
|
+
|
185
|
+
_defineProperty(_assertThisInitialized(_this), "handleDayPickerBlur", function (name) {
|
214
186
|
_this.setState({
|
215
187
|
focusedInput: ''
|
216
188
|
});
|
@@ -227,10 +199,12 @@ function (_React$Component) {
|
|
227
199
|
}
|
228
200
|
}, 100);
|
229
201
|
});
|
230
|
-
|
202
|
+
|
203
|
+
_defineProperty(_assertThisInitialized(_this), "handleReset", function (name) {
|
231
204
|
_this.handleChange(name, undefined);
|
232
205
|
});
|
233
|
-
|
206
|
+
|
207
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (name) {
|
234
208
|
return function (event) {
|
235
209
|
if (event.key === 'Tab' && !event.shiftKey) {
|
236
210
|
var nodeName = document.activeElement.nodeName;
|
@@ -267,13 +241,15 @@ function (_React$Component) {
|
|
267
241
|
}
|
268
242
|
};
|
269
243
|
});
|
270
|
-
|
244
|
+
|
245
|
+
_defineProperty(_assertThisInitialized(_this), "openPanel", function (panel) {
|
271
246
|
_this.setState({
|
272
247
|
openedPanel: panel
|
273
248
|
});
|
274
249
|
});
|
275
|
-
|
276
|
-
|
250
|
+
|
251
|
+
_defineProperty(_assertThisInitialized(_this), "renderCaption", function (propsCaption) {
|
252
|
+
return React.createElement(Caption, Object.assign({
|
277
253
|
onMonthClick: function onMonthClick() {
|
278
254
|
return _this.openPanel('months');
|
279
255
|
},
|
@@ -282,16 +258,18 @@ function (_React$Component) {
|
|
282
258
|
}
|
283
259
|
}, propsCaption));
|
284
260
|
});
|
285
|
-
|
286
|
-
|
261
|
+
|
262
|
+
_defineProperty(_assertThisInitialized(_this), "renderNavBar", function (propsNavBar) {
|
263
|
+
return React.createElement(NavBar, Object.assign({
|
287
264
|
showClockButton: _this.props.enableTime,
|
288
265
|
onClockClick: function onClockClick() {
|
289
266
|
return _this.openPanel('time');
|
290
267
|
}
|
291
268
|
}, propsNavBar));
|
292
269
|
});
|
293
|
-
|
294
|
-
|
270
|
+
|
271
|
+
_defineProperty(_assertThisInitialized(_this), "renderOverlay", function (name, propsOverlay, staticPosition) {
|
272
|
+
var rangeOverlayProps = _objectSpread({}, propsOverlay, {
|
295
273
|
side: name,
|
296
274
|
staticPosition: staticPosition
|
297
275
|
});
|
@@ -308,25 +286,29 @@ function (_React$Component) {
|
|
308
286
|
|
309
287
|
case 'calendar':
|
310
288
|
default:
|
311
|
-
return
|
289
|
+
return React.createElement(Overlay, rangeOverlayProps);
|
312
290
|
}
|
313
291
|
});
|
314
|
-
|
292
|
+
|
293
|
+
_defineProperty(_assertThisInitialized(_this), "renderOverlayFrom", function (propsOverlay) {
|
315
294
|
return _this.renderOverlay('from', propsOverlay, _this.props.staticPosition);
|
316
295
|
});
|
317
|
-
|
296
|
+
|
297
|
+
_defineProperty(_assertThisInitialized(_this), "renderOverlayTo", function (propsOverlay) {
|
318
298
|
return _this.renderOverlay('to', propsOverlay, _this.props.staticPosition);
|
319
299
|
});
|
320
|
-
|
300
|
+
|
301
|
+
_defineProperty(_assertThisInitialized(_this), "renderMonthPickerOverlay", function (name, propsOverlay) {
|
321
302
|
var monthPickerProps = {
|
322
303
|
value: _this.state.currentMonth,
|
323
304
|
onChange: _this.handleCurrentMonthChange
|
324
305
|
};
|
325
|
-
return
|
306
|
+
return React.createElement(MonthPickerOverlay, Object.assign({
|
326
307
|
key: "".concat(name, "-month-picker-overlay")
|
327
308
|
}, monthPickerProps, propsOverlay));
|
328
309
|
});
|
329
|
-
|
310
|
+
|
311
|
+
_defineProperty(_assertThisInitialized(_this), "renderTimePickerOverlay", function (name, propsOverlay) {
|
330
312
|
var timePickerProps = {
|
331
313
|
value: _this.props[name],
|
332
314
|
onChange: function onChange(date, precision) {
|
@@ -336,22 +318,23 @@ function (_React$Component) {
|
|
336
318
|
return _this.openPanel('calendar');
|
337
319
|
}
|
338
320
|
};
|
339
|
-
return
|
321
|
+
return React.createElement(TimePickerOverlay, Object.assign({
|
340
322
|
key: "".concat(name, "-time-picker-overlay")
|
341
323
|
}, timePickerProps, propsOverlay));
|
342
324
|
});
|
343
|
-
|
325
|
+
|
326
|
+
_defineProperty(_assertThisInitialized(_this), "renderYearPickerOverlay", function (name, propsOverlay) {
|
344
327
|
var yearPickerProps = {
|
345
328
|
value: _this.state.currentMonth,
|
346
329
|
onChange: _this.handleCurrentMonthChange,
|
347
330
|
disableFutureDays: _this.props.disableFutureDays
|
348
331
|
};
|
349
|
-
return
|
332
|
+
return React.createElement(YearPickerOverlay, Object.assign({
|
350
333
|
key: "".concat(name, "-year-picker-overlay")
|
351
334
|
}, yearPickerProps, propsOverlay));
|
352
335
|
});
|
353
336
|
|
354
|
-
var _today = (
|
337
|
+
var _today = moment().tz(_this.props.timezoneName);
|
355
338
|
|
356
339
|
_this.state = {
|
357
340
|
currentMonth: new Date(_today.year(), _today.month(), _today.date()),
|
@@ -361,7 +344,7 @@ function (_React$Component) {
|
|
361
344
|
return _this;
|
362
345
|
}
|
363
346
|
|
364
|
-
(
|
347
|
+
_createClass(HiDateRangePicker, [{
|
365
348
|
key: "componentWillUnmount",
|
366
349
|
value: function componentWillUnmount() {
|
367
350
|
clearTimeout(this.timeout);
|
@@ -396,13 +379,16 @@ function (_React$Component) {
|
|
396
379
|
helperIcon = _this$props3.helperIcon,
|
397
380
|
helperText = _this$props3.helperText,
|
398
381
|
timezoneName = _this$props3.timezoneName,
|
399
|
-
props = (
|
400
|
-
|
382
|
+
props = _objectWithoutProperties(_this$props3, ["classes", "disabled", "disabledDays", "disableFutureDays", "enableTime", "labelFrom", "labelTo", "locale", "format", "from", "fromError", "minimumDate", "onReset", "to", "toError", "translations", "id", "staticPosition", "errorText", "hasSelector", "helperIcon", "helperText", "timezoneName"]);
|
383
|
+
|
384
|
+
var today = moment().tz(timezoneName);
|
401
385
|
var now = new Date(today.year(), today.month(), today.date(), 23, 59, 59, 999);
|
402
|
-
|
386
|
+
|
387
|
+
var modifiers = _defineProperty({
|
403
388
|
start: from,
|
404
389
|
end: to
|
405
390
|
}, classes.currentDay, new Date(today.year(), today.month(), today.date()));
|
391
|
+
|
406
392
|
var modifiersStyles = {
|
407
393
|
start: {
|
408
394
|
borderTopLeftRadius: '50%',
|
@@ -430,7 +416,7 @@ function (_React$Component) {
|
|
430
416
|
selectedDays.push(selected);
|
431
417
|
}
|
432
418
|
|
433
|
-
var dayPickerProps = (
|
419
|
+
var dayPickerProps = _objectSpread({
|
434
420
|
classNames: classes,
|
435
421
|
disabledDays: disabledDays,
|
436
422
|
firstDayOfWeek: 1,
|
@@ -441,13 +427,14 @@ function (_React$Component) {
|
|
441
427
|
// Both are required ?
|
442
428
|
selectedDays: selectedDays,
|
443
429
|
todayButton: translations.today,
|
444
|
-
weekdayElement:
|
430
|
+
weekdayElement: Weekday
|
445
431
|
}, props);
|
446
|
-
|
432
|
+
|
433
|
+
var fromDayPickerProps = _objectSpread({}, dayPickerProps, {
|
447
434
|
onTodayButtonClick: this.handleCurrentMonthChange,
|
448
435
|
navbarElement: this.renderNavBar,
|
449
436
|
captionElement: this.renderCaption,
|
450
|
-
disabledDays: (
|
437
|
+
disabledDays: _objectSpread({}, dayPickerProps.disabledDays, {
|
451
438
|
before: minimumDate
|
452
439
|
}, disableFutureDays && {
|
453
440
|
after: now
|
@@ -455,16 +442,17 @@ function (_React$Component) {
|
|
455
442
|
after: to
|
456
443
|
}),
|
457
444
|
locale: locale,
|
458
|
-
localeUtils:
|
445
|
+
localeUtils: HiLocaleUtils,
|
459
446
|
month: this.state.currentMonth,
|
460
|
-
modifiers: (
|
447
|
+
modifiers: _objectSpread({}, modifiers)
|
461
448
|
});
|
462
|
-
|
449
|
+
|
450
|
+
var toDayPickerProps = _objectSpread({}, dayPickerProps, {
|
463
451
|
onTodayButtonClick: this.handleCurrentMonthChange,
|
464
452
|
navbarElement: this.renderNavBar,
|
465
453
|
onDayClick: this.onDayToClick,
|
466
454
|
captionElement: this.renderCaption,
|
467
|
-
disabledDays: (
|
455
|
+
disabledDays: _objectSpread({}, dayPickerProps.disabledDays, {
|
468
456
|
before: minimumDate
|
469
457
|
}, disableFutureDays && {
|
470
458
|
after: now
|
@@ -472,12 +460,13 @@ function (_React$Component) {
|
|
472
460
|
before: from
|
473
461
|
}),
|
474
462
|
locale: locale,
|
475
|
-
localeUtils:
|
463
|
+
localeUtils: HiLocaleUtils,
|
476
464
|
month: this.state.currentMonth,
|
477
|
-
modifiers: (
|
465
|
+
modifiers: _objectSpread({}, modifiers)
|
478
466
|
}); // From & To InputProps
|
479
467
|
|
480
|
-
|
468
|
+
|
469
|
+
var fromInputProps = _objectSpread({}, onReset && {
|
481
470
|
onReset: function onReset() {
|
482
471
|
return _this2.handleReset('from');
|
483
472
|
}
|
@@ -493,7 +482,8 @@ function (_React$Component) {
|
|
493
482
|
onSubmit: this.props.onSubmit
|
494
483
|
}
|
495
484
|
});
|
496
|
-
|
485
|
+
|
486
|
+
var toInputProps = _objectSpread({}, onReset && {
|
497
487
|
onReset: function onReset() {
|
498
488
|
return _this2.handleReset('to');
|
499
489
|
}
|
@@ -509,17 +499,17 @@ function (_React$Component) {
|
|
509
499
|
onSubmit: this.props.onSubmit
|
510
500
|
}
|
511
501
|
});
|
512
|
-
var toClass = (0, _classnames.default)(classes.toInput, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.absolute, !_reactDeviceDetect.isMobile && staticPosition === true && this.state.focusedInput === 'from'), (0, _defineProperty2.default)(_classNames, classes.right4, !_reactDeviceDetect.isMobile && staticPosition === true && this.state.focusedInput === 'from'), _classNames));
|
513
502
|
|
514
|
-
var
|
515
|
-
|
516
|
-
|
503
|
+
var toClass = classNames(classes.toInput, (_classNames = {}, _defineProperty(_classNames, classes.absolute, !isMobile && staticPosition === true && this.state.focusedInput === 'from'), _defineProperty(_classNames, classes.right4, !isMobile && staticPosition === true && this.state.focusedInput === 'from'), _classNames));
|
504
|
+
var content = React.createElement("div", {
|
505
|
+
className: classNames(classes.root, classes.rangePickerContainer)
|
506
|
+
}, React.createElement("div", {
|
517
507
|
className: classes.fromInput,
|
518
|
-
onFocus: !
|
508
|
+
onFocus: !isMobile ? function () {
|
519
509
|
return _this2.handleDayPickerFocus('from');
|
520
510
|
} : undefined,
|
521
|
-
onKeyDown: !
|
522
|
-
},
|
511
|
+
onKeyDown: !isMobile ? this.handleKeyDown('from') : undefined
|
512
|
+
}, React.createElement("div", null, !isMobile ? React.createElement(DayPickerInput, {
|
523
513
|
key: '1',
|
524
514
|
ref: function ref(el) {
|
525
515
|
_this2.fromInput = el;
|
@@ -528,16 +518,16 @@ function (_React$Component) {
|
|
528
518
|
hideOnDayClick: false,
|
529
519
|
overlayComponent: this.renderOverlayFrom,
|
530
520
|
dayPickerProps: fromDayPickerProps,
|
531
|
-
component:
|
521
|
+
component: HiTextField,
|
532
522
|
inputProps: fromInputProps,
|
533
523
|
format: enableTime ? "".concat(format, " HH:mm") : format,
|
534
|
-
formatDate:
|
535
|
-
parseDate:
|
524
|
+
formatDate: MomentLocaleUtils.formatDate,
|
525
|
+
parseDate: MomentLocaleUtils.parseDate,
|
536
526
|
onDayChange: function onDayChange(day) {
|
537
527
|
return _this2.handleDayChange('from', day);
|
538
528
|
},
|
539
529
|
placeholder: ''
|
540
|
-
}) :
|
530
|
+
}) : React.createElement(HiDatePickerMobile, {
|
541
531
|
id: this.props.id,
|
542
532
|
label: labelFrom,
|
543
533
|
range: true,
|
@@ -550,16 +540,16 @@ function (_React$Component) {
|
|
550
540
|
today: today,
|
551
541
|
minimumDate: minimumDate,
|
552
542
|
format: enableTime ? "".concat(format, " HH:mm") : format
|
553
|
-
}))),
|
543
|
+
}))), React.createElement("div", {
|
554
544
|
className: toClass,
|
555
|
-
onFocus: !
|
545
|
+
onFocus: !isMobile ? function () {
|
556
546
|
return _this2.handleDayPickerFocus('to');
|
557
547
|
} : undefined,
|
558
|
-
onBlur: !
|
548
|
+
onBlur: !isMobile ? function () {
|
559
549
|
return _this2.handleDayPickerBlur('to');
|
560
550
|
} : undefined,
|
561
|
-
onKeyDown: !
|
562
|
-
}, !
|
551
|
+
onKeyDown: !isMobile ? this.handleKeyDown('to') : undefined
|
552
|
+
}, !isMobile ? React.createElement(DayPickerInput, {
|
563
553
|
key: '1',
|
564
554
|
ref: function ref(el) {
|
565
555
|
_this2.toInput = el;
|
@@ -568,13 +558,13 @@ function (_React$Component) {
|
|
568
558
|
hideOnDayClick: false,
|
569
559
|
overlayComponent: this.renderOverlayTo,
|
570
560
|
dayPickerProps: toDayPickerProps,
|
571
|
-
component:
|
561
|
+
component: HiTextField,
|
572
562
|
inputProps: toInputProps,
|
573
563
|
format: enableTime ? "".concat(format, " HH:mm") : format,
|
574
|
-
formatDate:
|
575
|
-
parseDate:
|
564
|
+
formatDate: MomentLocaleUtils.formatDate,
|
565
|
+
parseDate: MomentLocaleUtils.parseDate,
|
576
566
|
placeholder: ''
|
577
|
-
}) :
|
567
|
+
}) : React.createElement(HiDatePickerMobile, {
|
578
568
|
id: this.props.id,
|
579
569
|
label: labelTo,
|
580
570
|
range: true,
|
@@ -590,7 +580,7 @@ function (_React$Component) {
|
|
590
580
|
})));
|
591
581
|
|
592
582
|
if (!hasSelector) {
|
593
|
-
content =
|
583
|
+
content = React.createElement(HiFormControl, {
|
594
584
|
disabled: disabled,
|
595
585
|
helperIcon: helperIcon,
|
596
586
|
helperText: helperText,
|
@@ -603,10 +593,11 @@ function (_React$Component) {
|
|
603
593
|
return content;
|
604
594
|
}
|
605
595
|
}]);
|
596
|
+
|
606
597
|
return HiDateRangePicker;
|
607
|
-
}(
|
598
|
+
}(React.Component);
|
608
599
|
|
609
|
-
(
|
600
|
+
_defineProperty(HiDateRangePicker, "defaultProps", {
|
610
601
|
disabledDays: {},
|
611
602
|
disableFutureDays: true,
|
612
603
|
staticPosition: false,
|
@@ -634,8 +625,6 @@ function (_React$Component) {
|
|
634
625
|
}
|
635
626
|
});
|
636
627
|
|
637
|
-
|
628
|
+
export default withStyles(styles, {
|
638
629
|
name: 'HmuiHiDateRangePicker'
|
639
|
-
})(HiDateRangePicker);
|
640
|
-
|
641
|
-
exports.default = _default;
|
630
|
+
})(HiDateRangePicker);
|