@hipay/hipay-material-ui 4.0.0 → 4.0.1-beta5
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/HiAccordion/HiAccordion.js +26 -8
- package/HiAccordion/index.js +5 -1
- package/HiAccordionActions/HiAccordionActions.js +14 -1
- package/HiAccordionActions/index.js +5 -1
- package/HiAccordionSummary/HiAccordionSummary.js +15 -1
- package/HiAccordionSummary/index.js +5 -1
- package/HiAlertModal/HiAlertModal.js +22 -7
- package/HiAlertModal/index.js +5 -1
- package/HiAppBar/HiAppBar.js +42 -11
- package/HiAppBar/index.js +2 -0
- package/HiAvatar/HiAvatar.js +12 -3
- package/HiAvatar/index.js +2 -0
- package/HiBadge/HiBadge.js +24 -8
- package/HiBadge/index.js +2 -0
- package/HiBreadcrumb/HiBreadcrumb.js +30 -6
- package/HiBreadcrumb/HiStep.js +45 -13
- package/HiBreadcrumb/HiStepConnector.js +49 -14
- package/HiBreadcrumb/HiStepContent.js +30 -6
- package/HiBreadcrumb/HiStepIcon.js +35 -10
- package/HiBreadcrumb/HiStepLabel.js +44 -14
- package/HiBreadcrumb/HiStepper.js +30 -6
- package/HiBreadcrumb/index.js +2 -0
- package/HiButton/HiButton.js +33 -8
- package/HiButton/index.js +5 -1
- package/HiCell/CellAddress.js +33 -12
- package/HiCell/CellDate.js +36 -10
- package/HiCell/CellHiddenContent.js +30 -8
- package/HiCell/CellIcon.js +36 -12
- package/HiCell/CellImage.js +34 -12
- package/HiCell/CellNumeric.js +40 -13
- package/HiCell/CellPinToAction.js +33 -9
- package/HiCell/CellRate.js +47 -13
- package/HiCell/CellSentinel.js +33 -12
- package/HiCell/CellSentinelScore.js +31 -9
- package/HiCell/CellText.js +52 -16
- package/HiCell/CellTextStyled.js +24 -13
- package/HiCell/index.js +10 -0
- package/HiCheckbox/HiCheckbox.js +52 -15
- package/HiCheckbox/index.js +2 -0
- package/HiChip/HiChip.js +47 -24
- package/HiChip/HiChipSwitch.js +59 -16
- package/HiChip/index.js +3 -0
- package/HiColoredLabel/HiColoredLabel.js +49 -15
- package/HiColoredLabel/index.js +2 -0
- package/HiDatePicker/Caption.js +21 -9
- package/HiDatePicker/HiDatePicker.js +88 -16
- package/HiDatePicker/HiDatePickerMobile.js +43 -18
- package/HiDatePicker/HiDateRangePicker.js +134 -38
- package/HiDatePicker/HiDateRangeSelector.js +130 -49
- package/HiDatePicker/ListPicker.js +38 -8
- package/HiDatePicker/NavBar.js +31 -12
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +26 -4
- package/HiDatePicker/Overlays/Overlay.js +25 -8
- package/HiDatePicker/Overlays/TimePickerOverlay.js +39 -8
- package/HiDatePicker/Overlays/YearPickerOverlay.js +31 -8
- package/HiDatePicker/Overlays/index.js +6 -0
- package/HiDatePicker/Weekday.js +9 -4
- package/HiDatePicker/hiLocaleUtils.js +20 -8
- package/HiDatePicker/index.js +2 -0
- package/HiDatePicker/stylesheet.js +13 -7
- package/HiDialog/HiDialog.js +19 -7
- package/HiDialog/index.js +2 -0
- package/HiDotsStepper/HiDot.js +37 -8
- package/HiDotsStepper/HiDotsStepper.js +37 -10
- package/HiDotsStepper/index.js +3 -0
- package/HiExpansionPanel/HiExpansionPanel.js +38 -16
- package/HiExpansionPanel/index.js +5 -1
- package/HiForm/HiAddressField.js +36 -10
- package/HiForm/HiEmailField.js +29 -5
- package/HiForm/HiFormControl.js +74 -28
- package/HiForm/HiFormLabel.js +41 -15
- package/HiForm/HiInput.js +91 -33
- package/HiForm/HiPasswordField.js +46 -9
- package/HiForm/HiSearchField.js +34 -3
- package/HiForm/HiSlider.js +57 -22
- package/HiForm/HiTextField.js +47 -22
- package/HiForm/HiUpload.js +89 -29
- package/HiForm/HiUploadField.js +32 -10
- package/HiForm/HiUploadInput.js +76 -23
- package/HiForm/index.js +12 -0
- package/HiIcon/HiIcon.js +34 -9
- package/HiIcon/index.js +2 -0
- package/HiIconButton/HiIconButton.js +21 -6
- package/HiIconButton/index.js +2 -0
- package/HiListItemLink/HiListItemLink.js +19 -7
- package/HiListItemLink/index.js +2 -0
- package/HiLoader/HiLoader.js +16 -6
- package/HiLoader/index.js +2 -0
- package/HiNotice/HiKPI.js +47 -16
- package/HiNotice/HiKPINotice.js +16 -6
- package/HiNotice/index.js +3 -0
- package/HiPagination/HiPagination.js +11 -1
- package/HiPagination/index.js +2 -0
- package/HiPaymentMeans/HiPaymentMeans.js +72 -31
- package/HiPaymentMeans/index.js +2 -0
- package/HiPdfReader/HiPdfReader.js +57 -24
- package/HiPdfReader/index.js +2 -0
- package/HiPin/HiPin.js +19 -7
- package/HiPin/index.js +2 -0
- package/HiRadio/HiRadio.js +22 -11
- package/HiRadio/index.js +2 -0
- package/HiScrollStepper/HiScrollStepper.js +67 -29
- package/HiScrollStepper/index.js +2 -0
- package/HiSelect/HiDynamicSelect.js +42 -32
- package/HiSelect/HiDynamicSelectField.js +48 -24
- package/HiSelect/HiNestedSelect.js +111 -65
- package/HiSelect/HiNestedSelectContent.js +86 -60
- package/HiSelect/HiNestedSelectField.js +48 -24
- package/HiSelect/HiSelect.js +187 -89
- package/HiSelect/HiSelectContent.js +97 -62
- package/HiSelect/HiSelectField.js +49 -25
- package/HiSelect/HiSelectInput.js +76 -23
- package/HiSelect/HiSelectMobile.js +44 -7
- package/HiSelect/HiSuggestSelect.js +81 -25
- package/HiSelect/HiSuggestSelectField.js +39 -15
- package/HiSelect/index.js +14 -2
- package/HiSelectableList/HiSelectableList.js +90 -34
- package/HiSelectableList/HiSelectableListHierarchic.js +60 -34
- package/HiSelectableList/HiSelectableListItem.js +88 -45
- package/HiSelectableList/index.js +4 -0
- package/HiStepper/DefaultIndicator.js +10 -1
- package/HiStepper/HiStep.js +48 -18
- package/HiStepper/HiStepper.js +15 -2
- package/HiStepper/index.js +3 -0
- package/HiSwitch/HiSwitch.js +33 -9
- package/HiSwitch/HiSwitchState.js +32 -15
- package/HiSwitch/index.js +3 -0
- package/HiTable/HiCellBuilder.js +65 -10
- package/HiTable/HiTable.js +48 -20
- package/HiTable/HiTableBody.js +24 -7
- package/HiTable/HiTableHeader.js +51 -18
- package/HiTable/HiTableRow.js +46 -12
- package/HiTable/constants.js +98 -48
- package/HiTable/index.js +2 -0
- package/es/HiAccordion/HiAccordion.js +26 -8
- package/es/HiAccordion/index.js +5 -1
- package/es/HiAccordionActions/HiAccordionActions.js +14 -1
- package/es/HiAccordionActions/index.js +5 -1
- package/es/HiAccordionSummary/HiAccordionSummary.js +15 -1
- package/es/HiAccordionSummary/index.js +5 -1
- package/es/HiAlertModal/HiAlertModal.js +22 -7
- package/es/HiAlertModal/index.js +5 -1
- package/es/HiAppBar/HiAppBar.js +42 -11
- package/es/HiAppBar/index.js +2 -0
- package/es/HiAvatar/HiAvatar.js +12 -3
- package/es/HiAvatar/index.js +2 -0
- package/es/HiBadge/HiBadge.js +24 -8
- package/es/HiBadge/index.js +2 -0
- package/es/HiBreadcrumb/HiBreadcrumb.js +30 -6
- package/es/HiBreadcrumb/HiStep.js +45 -13
- package/es/HiBreadcrumb/HiStepConnector.js +49 -14
- package/es/HiBreadcrumb/HiStepContent.js +30 -6
- package/es/HiBreadcrumb/HiStepIcon.js +35 -10
- package/es/HiBreadcrumb/HiStepLabel.js +44 -14
- package/es/HiBreadcrumb/HiStepper.js +30 -6
- package/es/HiBreadcrumb/index.js +2 -0
- package/es/HiButton/HiButton.js +33 -8
- package/es/HiButton/index.js +5 -1
- package/es/HiCell/CellAddress.js +33 -12
- package/es/HiCell/CellDate.js +36 -10
- package/es/HiCell/CellHiddenContent.js +30 -8
- package/es/HiCell/CellIcon.js +36 -12
- package/es/HiCell/CellImage.js +34 -12
- package/es/HiCell/CellNumeric.js +40 -13
- package/es/HiCell/CellPinToAction.js +33 -9
- package/es/HiCell/CellRate.js +47 -13
- package/es/HiCell/CellSentinel.js +33 -12
- package/es/HiCell/CellSentinelScore.js +31 -9
- package/es/HiCell/CellText.js +52 -16
- package/es/HiCell/CellTextStyled.js +24 -13
- package/es/HiCell/index.js +10 -0
- package/es/HiCheckbox/HiCheckbox.js +52 -15
- package/es/HiCheckbox/index.js +2 -0
- package/es/HiChip/HiChip.js +47 -24
- package/es/HiChip/HiChipSwitch.js +59 -16
- package/es/HiChip/index.js +3 -0
- package/es/HiColoredLabel/HiColoredLabel.js +49 -15
- package/es/HiColoredLabel/index.js +2 -0
- package/es/HiDatePicker/Caption.js +21 -9
- package/es/HiDatePicker/HiDatePicker.js +88 -16
- package/es/HiDatePicker/HiDatePickerMobile.js +43 -18
- package/es/HiDatePicker/HiDateRangePicker.js +134 -38
- package/es/HiDatePicker/HiDateRangeSelector.js +130 -49
- package/es/HiDatePicker/ListPicker.js +38 -8
- package/es/HiDatePicker/NavBar.js +31 -12
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +26 -4
- package/es/HiDatePicker/Overlays/Overlay.js +25 -8
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +39 -8
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +31 -8
- package/es/HiDatePicker/Overlays/index.js +6 -0
- package/es/HiDatePicker/Weekday.js +9 -4
- package/es/HiDatePicker/hiLocaleUtils.js +20 -8
- package/es/HiDatePicker/index.js +2 -0
- package/es/HiDatePicker/stylesheet.js +13 -7
- package/es/HiDialog/HiDialog.js +19 -7
- package/es/HiDialog/index.js +2 -0
- package/es/HiDotsStepper/HiDot.js +37 -8
- package/es/HiDotsStepper/HiDotsStepper.js +37 -10
- package/es/HiDotsStepper/index.js +3 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +38 -16
- package/es/HiExpansionPanel/index.js +5 -1
- package/es/HiForm/HiAddressField.js +36 -10
- package/es/HiForm/HiEmailField.js +29 -5
- package/es/HiForm/HiFormControl.js +74 -28
- package/es/HiForm/HiFormLabel.js +41 -15
- package/es/HiForm/HiInput.js +91 -33
- package/es/HiForm/HiPasswordField.js +46 -9
- package/es/HiForm/HiSearchField.js +34 -3
- package/es/HiForm/HiSlider.js +57 -22
- package/es/HiForm/HiTextField.js +47 -22
- package/es/HiForm/HiUpload.js +89 -29
- package/es/HiForm/HiUploadField.js +32 -10
- package/es/HiForm/HiUploadInput.js +76 -23
- package/es/HiForm/index.js +12 -0
- package/es/HiIcon/HiIcon.js +34 -9
- package/es/HiIcon/index.js +2 -0
- package/es/HiIconButton/HiIconButton.js +21 -6
- package/es/HiIconButton/index.js +2 -0
- package/es/HiListItemLink/HiListItemLink.js +19 -7
- package/es/HiListItemLink/index.js +2 -0
- package/es/HiLoader/HiLoader.js +16 -6
- package/es/HiLoader/index.js +2 -0
- package/es/HiNotice/HiKPI.js +47 -16
- package/es/HiNotice/HiKPINotice.js +16 -6
- package/es/HiNotice/index.js +3 -0
- package/es/HiPagination/HiPagination.js +11 -1
- package/es/HiPagination/index.js +2 -0
- package/es/HiPaymentMeans/HiPaymentMeans.js +72 -31
- package/es/HiPaymentMeans/index.js +2 -0
- package/es/HiPdfReader/HiPdfReader.js +57 -24
- package/es/HiPdfReader/index.js +2 -0
- package/es/HiPin/HiPin.js +19 -7
- package/es/HiPin/index.js +2 -0
- package/es/HiRadio/HiRadio.js +22 -11
- package/es/HiRadio/index.js +2 -0
- package/es/HiScrollStepper/HiScrollStepper.js +67 -29
- package/es/HiScrollStepper/index.js +2 -0
- package/es/HiSelect/HiDynamicSelect.js +42 -32
- package/es/HiSelect/HiDynamicSelectField.js +48 -24
- package/es/HiSelect/HiNestedSelect.js +111 -65
- package/es/HiSelect/HiNestedSelectContent.js +86 -60
- package/es/HiSelect/HiNestedSelectField.js +48 -24
- package/es/HiSelect/HiSelect.js +187 -89
- package/es/HiSelect/HiSelectContent.js +97 -62
- package/es/HiSelect/HiSelectField.js +49 -25
- package/es/HiSelect/HiSelectInput.js +76 -23
- package/es/HiSelect/HiSelectMobile.js +44 -7
- package/es/HiSelect/HiSuggestSelect.js +81 -25
- package/es/HiSelect/HiSuggestSelectField.js +39 -15
- package/es/HiSelect/index.js +14 -2
- package/es/HiSelectableList/HiSelectableList.js +90 -34
- package/es/HiSelectableList/HiSelectableListHierarchic.js +60 -34
- package/es/HiSelectableList/HiSelectableListItem.js +88 -45
- package/es/HiSelectableList/index.js +4 -0
- package/es/HiStepper/DefaultIndicator.js +10 -1
- package/es/HiStepper/HiStep.js +48 -18
- package/es/HiStepper/HiStepper.js +15 -2
- package/es/HiStepper/index.js +3 -0
- package/es/HiSwitch/HiSwitch.js +33 -9
- package/es/HiSwitch/HiSwitchState.js +32 -15
- package/es/HiSwitch/index.js +3 -0
- package/es/HiTable/HiCellBuilder.js +65 -10
- package/es/HiTable/HiTable.js +48 -20
- package/es/HiTable/HiTableBody.js +24 -7
- package/es/HiTable/HiTableHeader.js +51 -18
- package/es/HiTable/HiTableRow.js +46 -12
- package/es/HiTable/constants.js +98 -48
- package/es/HiTable/index.js +2 -0
- package/es/hi-svg-icons/HiAccount.js +14 -4
- package/es/hi-svg-icons/HiActivity.js +14 -4
- package/es/hi-svg-icons/HiAll.js +18 -7
- package/es/hi-svg-icons/HiBilling.js +14 -4
- package/es/hi-svg-icons/HiBriefcaseRescue.js +14 -4
- package/es/hi-svg-icons/HiBusiness.js +14 -4
- package/es/hi-svg-icons/HiCatalog.js +14 -4
- package/es/hi-svg-icons/HiCustomer.js +14 -4
- package/es/hi-svg-icons/HiDownload.js +14 -4
- package/es/hi-svg-icons/HiFinance.js +14 -4
- package/es/hi-svg-icons/HiFinanceMenu.js +14 -4
- package/es/hi-svg-icons/HiHostedPaymentPage.js +14 -4
- package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
- package/es/hi-svg-icons/HiIntegration.js +14 -4
- package/es/hi-svg-icons/HiIntegrationMenu.js +14 -4
- package/es/hi-svg-icons/HiIntelligence.js +14 -4
- package/es/hi-svg-icons/HiIntelligenceMenu.js +14 -4
- package/es/hi-svg-icons/HiInvoice.js +14 -4
- package/es/hi-svg-icons/HiInvoiceMenu.js +14 -4
- package/es/hi-svg-icons/HiLogoRounded.js +17 -6
- package/es/hi-svg-icons/HiOrder.js +14 -4
- package/es/hi-svg-icons/HiPaymentOrder.js +14 -4
- package/es/hi-svg-icons/HiPermission.js +14 -4
- package/es/hi-svg-icons/HiPriceGrid.js +14 -4
- package/es/hi-svg-icons/HiPrivate.js +14 -4
- package/es/hi-svg-icons/HiRoute.js +14 -4
- package/es/hi-svg-icons/HiRouteMenu.js +14 -4
- package/es/hi-svg-icons/HiRouteSwitch.js +19 -7
- package/es/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
- package/es/hi-svg-icons/HiSettlement.js +14 -4
- package/es/hi-svg-icons/HiSizeLarge.js +14 -4
- package/es/hi-svg-icons/HiSizeMedium.js +14 -4
- package/es/hi-svg-icons/HiSizeSmall.js +14 -4
- package/es/hi-svg-icons/HiStore.js +14 -4
- package/es/hi-svg-icons/HiStoreMenu.js +14 -4
- package/es/hi-svg-icons/HiTransaction.js +14 -4
- package/es/hi-svg-icons/HiTransactionMenu.js +14 -4
- package/es/hi-svg-icons/HiUser.js +14 -4
- package/es/hi-svg-icons/HiVendor.js +14 -4
- package/es/hi-svg-icons/HiWidget.js +14 -4
- package/es/hi-svg-icons/index.js +41 -0
- package/es/hi-svg-images/HiLogo.js +12 -4
- package/es/hi-svg-images/HiLogoWhite.js +12 -4
- package/es/hi-svg-images/index.js +3 -0
- package/es/setupTest.js +13 -2
- package/es/styleguide/Wrapper.js +6 -0
- package/es/styles/MuiThemeProvider.js +49 -15
- package/es/styles/colorManipulator.js +50 -15
- package/es/styles/createBreakpoints.js +29 -14
- package/es/styles/createGenerateClassName.js +24 -14
- package/es/styles/createMixins.js +10 -4
- package/es/styles/createMuiTheme.js +28 -11
- package/es/styles/createPalette.js +89 -67
- package/es/styles/createStyles.js +1 -0
- package/es/styles/createTypography.js +24 -15
- package/es/styles/getStylesCreator.js +14 -1
- package/es/styles/getThemeProps.js +7 -2
- package/es/styles/index.js +6 -0
- package/es/styles/jssPreset.js +11 -1
- package/es/styles/makeStyles.js +9 -2
- package/es/styles/mergeClasses.js +16 -5
- package/es/styles/shadows.js +4 -1
- package/es/styles/shape.js +2 -1
- package/es/styles/spacing.js +4 -1
- package/es/styles/themeListener.js +10 -2
- package/es/styles/transitions.js +35 -20
- package/es/styles/withStyles.js +9 -2
- package/es/styles/zIndex.js +2 -1
- package/es/test-utils/createMount.js +12 -2
- package/es/test-utils/createRender.js +9 -2
- package/es/test-utils/createShallow.js +17 -6
- package/es/test-utils/getClasses.js +4 -1
- package/es/test-utils/index.js +6 -0
- package/es/test-utils/until.js +14 -3
- package/es/test-utils/unwrap.js +1 -0
- package/es/theme/palette.js +7 -2
- package/es/theme/typography.js +15 -7
- package/es/theme.js +8 -2
- package/es/transitions/utils.js +7 -3
- package/es/utils/exactProp.js +13 -3
- package/es/utils/helpers.js +58 -19
- package/es/withMobileDialog/index.js +2 -0
- package/es/withMobileDialog/withMobileDialog.js +12 -3
- package/hi-svg-icons/HiAccount.js +14 -4
- package/hi-svg-icons/HiActivity.js +14 -4
- package/hi-svg-icons/HiAll.js +18 -7
- package/hi-svg-icons/HiBilling.js +14 -4
- package/hi-svg-icons/HiBriefcaseRescue.js +14 -4
- package/hi-svg-icons/HiBusiness.js +14 -4
- package/hi-svg-icons/HiCatalog.js +14 -4
- package/hi-svg-icons/HiCustomer.js +14 -4
- package/hi-svg-icons/HiDownload.js +14 -4
- package/hi-svg-icons/HiFinance.js +14 -4
- package/hi-svg-icons/HiFinanceMenu.js +14 -4
- package/hi-svg-icons/HiHostedPaymentPage.js +14 -4
- package/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
- package/hi-svg-icons/HiIntegration.js +14 -4
- package/hi-svg-icons/HiIntegrationMenu.js +14 -4
- package/hi-svg-icons/HiIntelligence.js +14 -4
- package/hi-svg-icons/HiIntelligenceMenu.js +14 -4
- package/hi-svg-icons/HiInvoice.js +14 -4
- package/hi-svg-icons/HiInvoiceMenu.js +14 -4
- package/hi-svg-icons/HiLogoRounded.js +17 -6
- package/hi-svg-icons/HiOrder.js +14 -4
- package/hi-svg-icons/HiPaymentOrder.js +14 -4
- package/hi-svg-icons/HiPermission.js +14 -4
- package/hi-svg-icons/HiPriceGrid.js +14 -4
- package/hi-svg-icons/HiPrivate.js +14 -4
- package/hi-svg-icons/HiRoute.js +14 -4
- package/hi-svg-icons/HiRouteMenu.js +14 -4
- package/hi-svg-icons/HiRouteSwitch.js +19 -7
- package/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
- package/hi-svg-icons/HiSettlement.js +14 -4
- package/hi-svg-icons/HiSizeLarge.js +14 -4
- package/hi-svg-icons/HiSizeMedium.js +14 -4
- package/hi-svg-icons/HiSizeSmall.js +14 -4
- package/hi-svg-icons/HiStore.js +14 -4
- package/hi-svg-icons/HiStoreMenu.js +14 -4
- package/hi-svg-icons/HiTransaction.js +14 -4
- package/hi-svg-icons/HiTransactionMenu.js +14 -4
- package/hi-svg-icons/HiUser.js +14 -4
- package/hi-svg-icons/HiVendor.js +14 -4
- package/hi-svg-icons/HiWidget.js +14 -4
- package/hi-svg-icons/index.js +41 -0
- package/hi-svg-images/HiLogo.js +12 -4
- package/hi-svg-images/HiLogoWhite.js +12 -4
- package/hi-svg-images/index.js +3 -0
- package/package.json +2 -2
- package/setupTest.js +13 -2
- package/styleguide/Wrapper.js +6 -0
- package/styles/MuiThemeProvider.js +49 -15
- package/styles/colorManipulator.js +50 -15
- package/styles/createBreakpoints.js +29 -14
- package/styles/createGenerateClassName.js +24 -14
- package/styles/createMixins.js +10 -4
- package/styles/createMuiTheme.js +28 -11
- package/styles/createPalette.js +89 -67
- package/styles/createStyles.js +1 -0
- package/styles/createTypography.js +24 -15
- package/styles/getStylesCreator.js +14 -1
- package/styles/getThemeProps.js +7 -2
- package/styles/index.js +6 -0
- package/styles/jssPreset.js +11 -1
- package/styles/makeStyles.js +9 -2
- package/styles/mergeClasses.js +16 -5
- package/styles/shadows.js +4 -1
- package/styles/shape.js +2 -1
- package/styles/spacing.js +4 -1
- package/styles/themeListener.js +10 -2
- package/styles/transitions.js +35 -20
- package/styles/withStyles.js +9 -2
- package/styles/zIndex.js +2 -1
- package/test-utils/createMount.js +12 -2
- package/test-utils/createRender.js +9 -2
- package/test-utils/createShallow.js +17 -6
- package/test-utils/getClasses.js +4 -1
- package/test-utils/index.js +6 -0
- package/test-utils/until.js +14 -3
- package/test-utils/unwrap.js +1 -0
- package/theme/palette.js +7 -2
- package/theme/typography.js +15 -7
- package/theme.js +8 -2
- package/transitions/utils.js +7 -3
- package/utils/exactProp.js +13 -3
- package/utils/helpers.js +58 -19
- package/withMobileDialog/index.js +2 -0
- package/withMobileDialog/withMobileDialog.js +12 -3
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -11,29 +12,52 @@ exports.findSeparator = findSeparator;
|
|
11
12
|
exports.styles = void 0;
|
12
13
|
exports.yearAndMonth = yearAndMonth;
|
13
14
|
exports.yearAndQuarter = yearAndQuarter;
|
15
|
+
|
14
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
17
|
+
|
15
18
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
19
|
+
|
16
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
21
|
+
|
17
22
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
23
|
+
|
18
24
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
25
|
+
|
19
26
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
27
|
+
|
20
28
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
29
|
+
|
21
30
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
31
|
+
|
22
32
|
var _react = _interopRequireDefault(require("react"));
|
33
|
+
|
23
34
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
35
|
+
|
24
36
|
var _reactDom = require("react-dom");
|
37
|
+
|
25
38
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
39
|
+
|
26
40
|
var _HiSelectField = _interopRequireDefault(require("../HiSelect/HiSelectField"));
|
41
|
+
|
27
42
|
var _HiDateRangePicker = _interopRequireDefault(require("./HiDateRangePicker"));
|
43
|
+
|
28
44
|
var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
|
45
|
+
|
29
46
|
var _reactDeviceDetect = require("react-device-detect");
|
47
|
+
|
30
48
|
var _Calendar = _interopRequireDefault(require("mdi-material-ui/Calendar"));
|
49
|
+
|
31
50
|
var _CalendarBlank = _interopRequireDefault(require("mdi-material-ui/CalendarBlank"));
|
51
|
+
|
32
52
|
var _CalendarArrowRight = _interopRequireDefault(require("mdi-material-ui/CalendarArrowRight"));
|
53
|
+
|
33
54
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
55
|
+
|
34
56
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
57
|
+
|
35
58
|
function findSeparator(format) {
|
36
59
|
var str = '';
|
60
|
+
|
37
61
|
if (format.search('[/]') >= 0) {
|
38
62
|
str = '/';
|
39
63
|
} else if (format.search('[-]') >= 0) {
|
@@ -41,87 +65,100 @@ function findSeparator(format) {
|
|
41
65
|
} else if (format.search('[.]') >= 0) {
|
42
66
|
str = '.';
|
43
67
|
}
|
68
|
+
|
44
69
|
return str;
|
45
70
|
}
|
71
|
+
|
46
72
|
function yearAndMonth(format, date) {
|
47
73
|
var findY = function findY(el) {
|
48
74
|
return el.toUpperCase().search('Y') >= 0;
|
49
75
|
};
|
76
|
+
|
50
77
|
var findM = function findM(el) {
|
51
78
|
return el.toUpperCase().search('M') >= 0;
|
52
79
|
};
|
80
|
+
|
53
81
|
var s = findSeparator(format);
|
54
82
|
var split = format.split(s);
|
55
83
|
var indexY = split.findIndex(findY);
|
56
84
|
var indexM = split.findIndex(findM);
|
57
85
|
return indexY < indexM ? date.format(split[indexY] + s + split[indexM]) : date.format(split[indexM] + s + split[indexY]);
|
58
86
|
}
|
87
|
+
|
59
88
|
function yearAndQuarter(format, date, t) {
|
60
89
|
var findY = function findY(el) {
|
61
90
|
return el.toUpperCase().search('Y') >= 0;
|
62
91
|
};
|
92
|
+
|
63
93
|
var findM = function findM(el) {
|
64
94
|
return el.toUpperCase().search('M') >= 0;
|
65
95
|
};
|
96
|
+
|
66
97
|
var s = findSeparator(format);
|
67
98
|
var split = format.split(s);
|
68
99
|
var indexY = split.findIndex(findY);
|
69
100
|
var indexM = split.findIndex(findM);
|
70
101
|
return indexY < indexM ? date.format("".concat(split[indexY]).concat(s, "[").concat(t.short_quarter, "]Q")) : date.format("[".concat(t.short_quarter, "]Q").concat(s).concat(split[indexY]));
|
71
102
|
}
|
103
|
+
|
72
104
|
function buildDateRangeInfo(t, from, to, format) {
|
73
105
|
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
74
106
|
var _options$prefix = options.prefix,
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
107
|
+
prefix = _options$prefix === void 0 ? null : _options$prefix,
|
108
|
+
_options$toNow = options.toNow,
|
109
|
+
toNow = _options$toNow === void 0 ? false : _options$toNow,
|
110
|
+
_options$toToday = options.toToday,
|
111
|
+
toToday = _options$toToday === void 0 ? false : _options$toToday,
|
112
|
+
_options$displayDays = options.displayDays,
|
113
|
+
displayDays = _options$displayDays === void 0 ? true : _options$displayDays,
|
114
|
+
_options$displayDayNa = options.displayDayName,
|
115
|
+
displayDayName = _options$displayDayNa === void 0 ? false : _options$displayDayNa; // From
|
116
|
+
|
117
|
+
var info = "".concat(t.from, " ").concat(from.format(format), " "); // Display day name
|
118
|
+
|
87
119
|
if (displayDayName) {
|
88
120
|
info = "".concat(t.from, " ").concat(from.format('dddd'), " ").concat(from.format(format), " ");
|
89
|
-
}
|
121
|
+
} // To
|
122
|
+
|
90
123
|
|
91
|
-
// To
|
92
124
|
if (toToday) {
|
93
125
|
info += "".concat(t.to_today);
|
94
126
|
} else if (toNow) {
|
95
127
|
info += "".concat(t.to_now);
|
96
128
|
} else {
|
97
129
|
info += "".concat(t.to, " ").concat(to.format(format));
|
98
|
-
}
|
130
|
+
} // Prefix
|
131
|
+
|
99
132
|
|
100
|
-
// Prefix
|
101
133
|
switch (prefix) {
|
102
134
|
case 'week':
|
103
135
|
info = "".concat(t.short_week).concat(from.format('w'), ", ").concat(info);
|
104
136
|
break;
|
137
|
+
|
105
138
|
case 'quarter':
|
106
139
|
info = "".concat(t.short_quarter).concat(from.format('Q'), ", ").concat(info);
|
107
140
|
break;
|
141
|
+
|
108
142
|
default:
|
109
143
|
break;
|
110
|
-
}
|
144
|
+
} // Display number of days
|
145
|
+
|
111
146
|
|
112
|
-
// Display number of days
|
113
147
|
if (displayDays) {
|
114
148
|
var days = Math.ceil(to.diff(from, 'days', true));
|
115
149
|
info = "".concat(days, " ").concat(days === 1 ? t.day : t.days, ", ").concat(info);
|
116
150
|
}
|
151
|
+
|
117
152
|
return info;
|
118
153
|
}
|
154
|
+
|
119
155
|
function buildDateRangeOptionByKey(key, t, format) {
|
120
156
|
var from;
|
121
157
|
var label;
|
122
158
|
var info;
|
123
159
|
var to;
|
124
160
|
var days;
|
161
|
+
|
125
162
|
switch (key) {
|
126
163
|
case 'custom':
|
127
164
|
label = t.custom_period;
|
@@ -129,18 +166,21 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
129
166
|
to = (0, _momentTimezone.default)().endOf('day');
|
130
167
|
info = t.custom_period_info;
|
131
168
|
break;
|
169
|
+
|
132
170
|
case 'cd':
|
133
171
|
label = t.today;
|
134
172
|
from = (0, _momentTimezone.default)().startOf('day');
|
135
173
|
to = (0, _momentTimezone.default)();
|
136
174
|
info = "".concat(from.format(format));
|
137
175
|
break;
|
176
|
+
|
138
177
|
case 'pd':
|
139
178
|
label = t.yesterday;
|
140
179
|
from = (0, _momentTimezone.default)().subtract(1, 'day').startOf('day');
|
141
180
|
to = (0, _momentTimezone.default)().subtract(1, 'day').endOf('day');
|
142
181
|
info = "".concat(from.format(format));
|
143
182
|
break;
|
183
|
+
|
144
184
|
case 'cw':
|
145
185
|
label = t.current_week;
|
146
186
|
from = (0, _momentTimezone.default)().startOf('week');
|
@@ -151,6 +191,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
151
191
|
displayDays: true
|
152
192
|
});
|
153
193
|
break;
|
194
|
+
|
154
195
|
case 'pw':
|
155
196
|
label = t.previous_week;
|
156
197
|
from = (0, _momentTimezone.default)().subtract(1, 'week').startOf('week');
|
@@ -161,6 +202,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
161
202
|
displayDays: true
|
162
203
|
});
|
163
204
|
break;
|
205
|
+
|
164
206
|
case 'cm':
|
165
207
|
label = t.current_month;
|
166
208
|
from = (0, _momentTimezone.default)().startOf('month');
|
@@ -171,6 +213,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
171
213
|
displayDays: true
|
172
214
|
});
|
173
215
|
break;
|
216
|
+
|
174
217
|
case 'pm':
|
175
218
|
label = t.previous_month;
|
176
219
|
from = (0, _momentTimezone.default)().subtract(1, 'month').startOf('month');
|
@@ -178,6 +221,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
178
221
|
days = from.daysInMonth();
|
179
222
|
info = "".concat(days, " ").concat(days === 1 ? t.day : t.days, ", ").concat(yearAndMonth(format, from));
|
180
223
|
break;
|
224
|
+
|
181
225
|
case 'cq':
|
182
226
|
label = t.current_quarter;
|
183
227
|
from = (0, _momentTimezone.default)().startOf('quarter');
|
@@ -188,6 +232,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
188
232
|
displayDays: true
|
189
233
|
});
|
190
234
|
break;
|
235
|
+
|
191
236
|
case 'pq':
|
192
237
|
label = t.previous_quarter;
|
193
238
|
from = (0, _momentTimezone.default)().subtract(1, 'quarter').startOf('quarter');
|
@@ -198,6 +243,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
198
243
|
displayDays: true
|
199
244
|
});
|
200
245
|
break;
|
246
|
+
|
201
247
|
case 'cy':
|
202
248
|
label = t.current_year;
|
203
249
|
from = (0, _momentTimezone.default)().startOf('year');
|
@@ -208,12 +254,14 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
208
254
|
displayDays: true
|
209
255
|
});
|
210
256
|
break;
|
257
|
+
|
211
258
|
case '1':
|
212
259
|
label = '24h';
|
213
260
|
from = (0, _momentTimezone.default)().subtract(1, 'day');
|
214
261
|
to = (0, _momentTimezone.default)();
|
215
262
|
info = "".concat(t.from, " ").concat(from.format('HH:mm'), " ").concat(t.yesterday.toLowerCase(), " ").concat(t.to_now);
|
216
263
|
break;
|
264
|
+
|
217
265
|
default:
|
218
266
|
if (parseInt(key) > 0) {
|
219
267
|
label = "".concat(key, " ").concat(key === 1 ? t.day : t.days);
|
@@ -227,8 +275,10 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
227
275
|
displayDayName: true
|
228
276
|
});
|
229
277
|
}
|
278
|
+
|
230
279
|
break;
|
231
280
|
}
|
281
|
+
|
232
282
|
return {
|
233
283
|
id: key,
|
234
284
|
from: from,
|
@@ -237,7 +287,8 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
237
287
|
to: to
|
238
288
|
};
|
239
289
|
}
|
240
|
-
|
290
|
+
|
291
|
+
var styles = function styles(theme) {
|
241
292
|
return {
|
242
293
|
root: {
|
243
294
|
maxWidth: 500,
|
@@ -280,37 +331,54 @@ var styles = exports.styles = function styles(theme) {
|
|
280
331
|
}
|
281
332
|
};
|
282
333
|
};
|
334
|
+
|
335
|
+
exports.styles = styles;
|
283
336
|
var PRESET_PERIOD_LIST = ['cd', 'pd', 'cw', 'pw', 'cm', 'pm', 'cq', 'pq', 'cy'];
|
284
337
|
var SLIDING_PERIOD_LIST = ['1', '7', '30', '365'];
|
285
338
|
var CUSTOM_PERIOD_LIST = ['custom'];
|
339
|
+
|
286
340
|
var _ref2 = /*#__PURE__*/_react.default.createElement(_CalendarBlank.default, null);
|
341
|
+
|
287
342
|
var _ref3 = /*#__PURE__*/_react.default.createElement(_Calendar.default, null);
|
343
|
+
|
288
344
|
var _ref4 = /*#__PURE__*/_react.default.createElement(_CalendarArrowRight.default, null);
|
345
|
+
|
289
346
|
var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
290
347
|
(0, _inherits2.default)(HiDateRangeSelector, _React$Component);
|
348
|
+
|
291
349
|
var _super = _createSuper(HiDateRangeSelector);
|
350
|
+
|
292
351
|
function HiDateRangeSelector(props) {
|
293
352
|
var _this;
|
353
|
+
|
294
354
|
(0, _classCallCheck2.default)(this, HiDateRangeSelector);
|
295
355
|
_this = _super.call(this, props);
|
296
356
|
_this.options = [];
|
357
|
+
|
297
358
|
_this.handleBlur = function (event) {
|
298
359
|
if (event instanceof Object && _this.props.onblur) {
|
299
360
|
_this.props.onBlur(event);
|
300
361
|
}
|
301
362
|
};
|
363
|
+
|
302
364
|
_this.handleReset = function (name) {
|
303
365
|
_this.props.onChange(name, undefined);
|
366
|
+
|
304
367
|
_this.props.onChange("".concat(name, "Error"), undefined);
|
305
368
|
};
|
369
|
+
|
306
370
|
_this.handleSelectChange = function (name) {
|
307
371
|
return function (event, value) {
|
308
372
|
_this.setState(function (prevState) {
|
309
|
-
|
373
|
+
var _ref;
|
374
|
+
|
375
|
+
return _ref = {}, (0, _defineProperty2.default)(_ref, name, value), (0, _defineProperty2.default)(_ref, "key", prevState.key === 1 ? 2 : 1), _ref;
|
310
376
|
});
|
377
|
+
|
311
378
|
_this.updateDates(value);
|
312
379
|
};
|
313
380
|
};
|
381
|
+
|
314
382
|
_this.options = props.availableOptionKeys.map(function (key) {
|
315
383
|
return buildDateRangeOptionByKey(key, props.translations, props.format);
|
316
384
|
});
|
@@ -320,6 +388,7 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
320
388
|
};
|
321
389
|
return _this;
|
322
390
|
}
|
391
|
+
|
323
392
|
(0, _createClass2.default)(HiDateRangeSelector, [{
|
324
393
|
key: "componentDidMount",
|
325
394
|
value: function componentDidMount() {
|
@@ -340,12 +409,14 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
340
409
|
var selectedOption = this.options.find(function (option) {
|
341
410
|
return option.id === value;
|
342
411
|
});
|
412
|
+
|
343
413
|
if (selectedOption) {
|
344
414
|
this.props.onChange('from', selectedOption.from.toDate());
|
345
415
|
this.props.onChange('to', selectedOption.to.toDate());
|
346
416
|
this.props.onChange('fromError', false);
|
347
417
|
this.props.onChange('toError', false);
|
348
418
|
}
|
419
|
+
|
349
420
|
if (this.props.returnSelectValue === true) {
|
350
421
|
this.props.onChange('period', value);
|
351
422
|
}
|
@@ -354,8 +425,8 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
354
425
|
key: "buildOptions",
|
355
426
|
value: function buildOptions() {
|
356
427
|
var _this$props = this.props,
|
357
|
-
|
358
|
-
|
428
|
+
availableOptionKeys = _this$props.availableOptionKeys,
|
429
|
+
translations = _this$props.translations;
|
359
430
|
var selectedPreset = this.state.selectedPreset;
|
360
431
|
var options = [];
|
361
432
|
var presetOptionsAvailable = availableOptionKeys.filter(function (option) {
|
@@ -367,6 +438,7 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
367
438
|
var customOptionsAvailable = availableOptionKeys.filter(function (option) {
|
368
439
|
return CUSTOM_PERIOD_LIST.includes(option);
|
369
440
|
});
|
441
|
+
|
370
442
|
if (customOptionsAvailable.length) {
|
371
443
|
options.push({
|
372
444
|
id: 'custom_periods_subheader',
|
@@ -379,6 +451,7 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
379
451
|
collapseParent: true
|
380
452
|
});
|
381
453
|
}
|
454
|
+
|
382
455
|
if (presetOptionsAvailable.length) {
|
383
456
|
options.push({
|
384
457
|
id: 'preset_periods_subheader',
|
@@ -391,6 +464,7 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
391
464
|
collapseParent: true
|
392
465
|
});
|
393
466
|
}
|
467
|
+
|
394
468
|
if (slidingOptionsAvailable.length) {
|
395
469
|
options.push({
|
396
470
|
id: 'sliding_periods_subheader',
|
@@ -403,39 +477,41 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
403
477
|
collapseParent: true
|
404
478
|
});
|
405
479
|
}
|
480
|
+
|
406
481
|
return options;
|
407
482
|
}
|
408
483
|
}, {
|
409
484
|
key: "render",
|
410
485
|
value: function render() {
|
411
486
|
var _this2 = this;
|
487
|
+
|
412
488
|
var _this$props2 = this.props,
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
489
|
+
availableOptionKeys = _this$props2.availableOptionKeys,
|
490
|
+
disabled = _this$props2.disabled,
|
491
|
+
enableTime = _this$props2.enableTime,
|
492
|
+
errorText = _this$props2.errorText,
|
493
|
+
fromError = _this$props2.fromError,
|
494
|
+
toError = _this$props2.toError,
|
495
|
+
helperIcon = _this$props2.helperIcon,
|
496
|
+
helperText = _this$props2.helperText,
|
497
|
+
idRange = _this$props2.idRange,
|
498
|
+
idSelect = _this$props2.idSelect,
|
499
|
+
minimumDate = _this$props2.minimumDate,
|
500
|
+
disableFutureDays = _this$props2.disableFutureDays,
|
501
|
+
label = _this$props2.label,
|
502
|
+
from = _this$props2.from,
|
503
|
+
onChange = _this$props2.onChange,
|
504
|
+
required = _this$props2.required,
|
505
|
+
to = _this$props2.to,
|
506
|
+
translations = _this$props2.translations,
|
507
|
+
classes = _this$props2.classes,
|
508
|
+
selectProps = _this$props2.selectProps,
|
509
|
+
staticPosition = _this$props2.staticPosition,
|
510
|
+
className = _this$props2.className,
|
511
|
+
props = (0, _objectWithoutProperties2.default)(_this$props2, ["availableOptionKeys", "disabled", "enableTime", "errorText", "fromError", "toError", "helperIcon", "helperText", "idRange", "idSelect", "minimumDate", "disableFutureDays", "label", "from", "onChange", "required", "to", "translations", "classes", "selectProps", "staticPosition", "className"]);
|
436
512
|
var _this$state = this.state,
|
437
|
-
|
438
|
-
|
513
|
+
selectedPreset = _this$state.selectedPreset,
|
514
|
+
containerWidth = _this$state.containerWidth;
|
439
515
|
var hiSelectableListProps = {
|
440
516
|
secondaryInline: false,
|
441
517
|
hideCheckbox: true,
|
@@ -521,11 +597,13 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
521
597
|
selectedPreset: props.defaultPreset
|
522
598
|
};
|
523
599
|
}
|
600
|
+
|
524
601
|
return null;
|
525
602
|
}
|
526
603
|
}]);
|
527
604
|
return HiDateRangeSelector;
|
528
605
|
}(_react.default.Component);
|
606
|
+
|
529
607
|
HiDateRangeSelector.defaultProps = {
|
530
608
|
availableOptionKeys: [].concat(PRESET_PERIOD_LIST, CUSTOM_PERIOD_LIST),
|
531
609
|
disableFutureDays: true,
|
@@ -576,6 +654,9 @@ HiDateRangeSelector.defaultProps = {
|
|
576
654
|
sliding_periods: 'Sliding periods'
|
577
655
|
}
|
578
656
|
};
|
579
|
-
|
657
|
+
|
658
|
+
var _default = (0, _withStyles.default)(styles, {
|
580
659
|
name: 'HmuiHiDateRangeSelector'
|
581
|
-
})(HiDateRangeSelector);
|
660
|
+
})(HiDateRangeSelector);
|
661
|
+
|
662
|
+
exports.default = _default;
|
@@ -1,25 +1,41 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.styles = exports.default = void 0;
|
9
|
+
|
8
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
11
|
+
|
9
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
13
|
+
|
10
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
15
|
+
|
11
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
17
|
+
|
12
18
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
+
|
13
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
+
|
14
22
|
var _react = _interopRequireDefault(require("react"));
|
23
|
+
|
15
24
|
var _classnames = _interopRequireDefault(require("classnames"));
|
25
|
+
|
16
26
|
var _reactCustomScrollbars = require("react-custom-scrollbars");
|
27
|
+
|
17
28
|
var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
|
29
|
+
|
18
30
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
31
|
+
|
19
32
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
33
|
+
|
20
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
35
|
+
|
21
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
22
|
-
|
37
|
+
|
38
|
+
var styles = function styles(theme) {
|
23
39
|
return {
|
24
40
|
itemRoot: {
|
25
41
|
'&:hover': {
|
@@ -38,20 +54,29 @@ var styles = exports.styles = function styles(theme) {
|
|
38
54
|
}
|
39
55
|
};
|
40
56
|
};
|
57
|
+
|
58
|
+
exports.styles = styles;
|
59
|
+
|
41
60
|
var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
42
61
|
(0, _inherits2.default)(ListPicker, _React$PureComponent);
|
62
|
+
|
43
63
|
var _super = _createSuper(ListPicker);
|
64
|
+
|
44
65
|
function ListPicker() {
|
45
66
|
var _this;
|
67
|
+
|
46
68
|
(0, _classCallCheck2.default)(this, ListPicker);
|
69
|
+
|
47
70
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
48
71
|
args[_key] = arguments[_key];
|
49
72
|
}
|
73
|
+
|
50
74
|
_this = _super.call.apply(_super, [this].concat(args));
|
51
75
|
_this.scrollbars = void 0;
|
52
76
|
_this.position = void 0;
|
53
77
|
return _this;
|
54
78
|
}
|
79
|
+
|
55
80
|
(0, _createClass2.default)(ListPicker, [{
|
56
81
|
key: "componentDidMount",
|
57
82
|
value: function componentDidMount() {
|
@@ -65,12 +90,13 @@ var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
65
90
|
key: "render",
|
66
91
|
value: function render() {
|
67
92
|
var _this2 = this;
|
93
|
+
|
68
94
|
var _this$props = this.props,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
95
|
+
classes = _this$props.classes,
|
96
|
+
itemList = _this$props.itemList,
|
97
|
+
onItemClick = _this$props.onItemClick,
|
98
|
+
selectedItem = _this$props.selectedItem,
|
99
|
+
type = _this$props.type;
|
74
100
|
this.position = itemList.indexOf(selectedItem);
|
75
101
|
var now = new Date();
|
76
102
|
return /*#__PURE__*/_react.default.createElement(_reactCustomScrollbars.Scrollbars, {
|
@@ -98,9 +124,13 @@ var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
98
124
|
}]);
|
99
125
|
return ListPicker;
|
100
126
|
}(_react.default.PureComponent);
|
127
|
+
|
101
128
|
ListPicker.defaultProps = {
|
102
129
|
initAtMiddleScroll: true
|
103
130
|
};
|
104
|
-
|
131
|
+
|
132
|
+
var _default = (0, _withStyles.default)(styles, {
|
105
133
|
name: 'HmuiListPicker'
|
106
|
-
})(ListPicker);
|
134
|
+
})(ListPicker);
|
135
|
+
|
136
|
+
exports.default = _default;
|
package/HiDatePicker/NavBar.js
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.styles = exports.default = void 0;
|
9
|
+
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
11
|
+
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
13
|
+
|
10
14
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
15
|
+
|
11
16
|
var _ChevronLeft = _interopRequireDefault(require("@mui/icons-material/ChevronLeft"));
|
17
|
+
|
12
18
|
var _ChevronRight = _interopRequireDefault(require("@mui/icons-material/ChevronRight"));
|
19
|
+
|
13
20
|
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
21
|
+
|
14
22
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
15
|
-
|
23
|
+
|
24
|
+
var styles = function styles(theme) {
|
16
25
|
return {
|
17
26
|
root: {
|
18
27
|
width: '100%',
|
@@ -40,20 +49,26 @@ var styles = exports.styles = function styles(theme) {
|
|
40
49
|
}
|
41
50
|
};
|
42
51
|
};
|
52
|
+
|
53
|
+
exports.styles = styles;
|
54
|
+
|
43
55
|
var _ref2 = /*#__PURE__*/_react.default.createElement(_ChevronLeft.default, null);
|
56
|
+
|
44
57
|
var _ref3 = /*#__PURE__*/_react.default.createElement(_ChevronRight.default, null);
|
58
|
+
|
45
59
|
var _ref4 = /*#__PURE__*/_react.default.createElement(_AccessTime.default, null);
|
60
|
+
|
46
61
|
var NavBar = function NavBar(_ref) {
|
47
62
|
var classes = _ref.classes,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
63
|
+
_ref$locale = _ref.locale,
|
64
|
+
locale = _ref$locale === void 0 ? 'en_US' : _ref$locale,
|
65
|
+
localeUtils = _ref.localeUtils,
|
66
|
+
nextMonth = _ref.nextMonth,
|
67
|
+
onClockClick = _ref.onClockClick,
|
68
|
+
onPreviousClick = _ref.onPreviousClick,
|
69
|
+
onNextClick = _ref.onNextClick,
|
70
|
+
previousMonth = _ref.previousMonth,
|
71
|
+
showClockButton = _ref.showClockButton;
|
57
72
|
var months = localeUtils.getMonths(locale);
|
58
73
|
var prev = "".concat(months[previousMonth.getMonth()], " ").concat(previousMonth.getFullYear());
|
59
74
|
var next = "".concat(months[nextMonth.getMonth()], " ").concat(nextMonth.getFullYear());
|
@@ -81,10 +96,14 @@ var NavBar = function NavBar(_ref) {
|
|
81
96
|
size: "large"
|
82
97
|
}, _ref4));
|
83
98
|
};
|
99
|
+
|
84
100
|
NavBar.defaultProps = {
|
85
101
|
showClockButton: false
|
86
102
|
};
|
87
|
-
|
103
|
+
|
104
|
+
var _default = (0, _withStyles.default)(styles, {
|
88
105
|
hiComponent: true,
|
89
106
|
name: 'HmuiNavBar'
|
90
|
-
})(NavBar);
|
107
|
+
})(NavBar);
|
108
|
+
|
109
|
+
exports.default = _default;
|