@hipay/hipay-material-ui 3.15.1 → 3.15.3-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAccordion/HiAccordion.js +5 -22
- package/HiAccordion/index.js +0 -3
- package/HiAccordionActions/HiAccordionActions.js +0 -12
- package/HiAccordionActions/index.js +0 -3
- package/HiAccordionSummary/HiAccordionSummary.js +0 -13
- package/HiAccordionSummary/index.js +0 -3
- package/HiAlertModal/HiAlertModal.js +4 -18
- package/HiAlertModal/index.js +0 -3
- package/HiAppBar/HiAppBar.js +8 -37
- package/HiAppBar/index.js +0 -2
- package/HiAvatar/HiAvatar.js +2 -10
- package/HiAvatar/index.js +0 -2
- package/HiBadge/HiBadge.js +14 -27
- package/HiBadge/index.js +0 -2
- package/HiBreadcrumb/HiBreadcrumb.js +5 -28
- package/HiBreadcrumb/HiStep.js +10 -40
- package/HiBreadcrumb/HiStepConnector.js +11 -43
- package/HiBreadcrumb/HiStepContent.js +3 -25
- package/HiBreadcrumb/HiStepIcon.js +11 -33
- package/HiBreadcrumb/HiStepLabel.js +12 -39
- package/HiBreadcrumb/HiStepper.js +3 -25
- package/HiBreadcrumb/index.js +0 -2
- package/HiButton/HiButton.js +8 -31
- package/HiButton/index.js +0 -3
- package/HiCell/CellAddress.js +9 -28
- package/HiCell/CellDate.js +7 -31
- package/HiCell/CellHiddenContent.js +4 -24
- package/HiCell/CellIcon.js +9 -31
- package/HiCell/CellImage.js +9 -29
- package/HiCell/CellNumeric.js +10 -35
- package/HiCell/CellPinToAction.js +6 -28
- package/HiCell/CellRate.js +14 -45
- package/HiCell/CellSentinel.js +9 -28
- package/HiCell/CellSentinelScore.js +5 -24
- package/HiCell/CellText.js +13 -47
- package/HiCell/CellTextStyled.js +12 -22
- package/HiCell/index.js +0 -10
- package/HiCheckbox/HiCheckbox.js +16 -50
- package/HiCheckbox/index.js +0 -2
- package/HiChip/HiChip.js +22 -43
- package/HiChip/HiChipSwitch.js +12 -52
- package/HiChip/index.js +0 -3
- package/HiColoredLabel/HiColoredLabel.js +37 -56
- package/HiColoredLabel/index.js +0 -2
- package/HiDatePicker/Caption.js +6 -16
- package/HiDatePicker/HiDatePicker.js +14 -85
- package/HiDatePicker/HiDatePickerMobile.js +17 -41
- package/HiDatePicker/HiDateRangePicker.js +35 -129
- package/HiDatePicker/HiDateRangeSelector.js +45 -123
- package/HiDatePicker/ListPicker.js +5 -33
- package/HiDatePicker/NavBar.js +9 -26
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
- package/HiDatePicker/Overlays/Overlay.js +4 -18
- package/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
- package/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
- package/HiDatePicker/Overlays/index.js +0 -6
- package/HiDatePicker/Weekday.js +3 -7
- package/HiDatePicker/hiLocaleUtils.js +7 -18
- package/HiDatePicker/index.js +0 -2
- package/HiDatePicker/stylesheet.js +5 -10
- package/HiDialog/HiDialog.js +4 -15
- package/HiDialog/index.js +0 -2
- package/HiDotsStepper/HiDot.js +6 -33
- package/HiDotsStepper/HiDotsStepper.js +7 -32
- package/HiDotsStepper/index.js +0 -3
- package/HiExpansionPanel/HiExpansionPanel.js +13 -34
- package/HiExpansionPanel/index.js +0 -3
- package/HiForm/HiAddressField.js +9 -34
- package/HiForm/HiEmailField.js +4 -27
- package/HiForm/HiFormControl.js +27 -70
- package/HiForm/HiFormLabel.js +13 -37
- package/HiForm/HiInput.js +28 -80
- package/HiForm/HiPasswordField.js +5 -31
- package/HiForm/HiSearchField.js +2 -32
- package/HiForm/HiSlider.js +19 -52
- package/HiForm/HiTextField.js +21 -45
- package/HiForm/HiUpload.js +31 -87
- package/HiForm/HiUploadField.js +9 -30
- package/HiForm/HiUploadInput.js +20 -70
- package/HiForm/index.js +0 -12
- package/HiIcon/HiIcon.js +5 -28
- package/HiIcon/index.js +0 -2
- package/HiIconButton/HiIconButton.js +5 -18
- package/HiIconButton/index.js +0 -2
- package/HiListItemLink/HiListItemLink.js +6 -17
- package/HiListItemLink/index.js +0 -2
- package/HiLoader/HiLoader.js +4 -13
- package/HiLoader/index.js +0 -2
- package/HiNotice/HiKPI.js +14 -42
- package/HiNotice/HiKPINotice.js +4 -13
- package/HiNotice/index.js +0 -3
- package/HiPagination/HiPagination.js +0 -9
- package/HiPagination/index.js +0 -2
- package/HiPaymentMeans/HiPaymentMeans.js +24 -60
- package/HiPaymentMeans/index.js +0 -2
- package/HiPdfReader/HiPdfReader.js +21 -52
- package/HiPdfReader/index.js +0 -2
- package/HiPin/HiPin.js +14 -23
- package/HiPin/index.js +0 -2
- package/HiRadio/HiRadio.js +9 -18
- package/HiRadio/index.js +0 -2
- package/HiScrollStepper/HiScrollStepper.js +26 -63
- package/HiScrollStepper/index.js +0 -2
- package/HiSelect/HiDynamicSelect.js +31 -40
- package/HiSelect/HiDynamicSelectField.js +22 -44
- package/HiSelect/HiNestedSelect.js +61 -104
- package/HiSelect/HiNestedSelectContent.js +58 -82
- package/HiSelect/HiNestedSelectField.js +22 -44
- package/HiSelect/HiSelect.js +85 -180
- package/HiSelect/HiSelectContent.js +58 -90
- package/HiSelect/HiSelectField.js +23 -45
- package/HiSelect/HiSelectInput.js +20 -69
- package/HiSelect/HiSelectMobile.js +5 -40
- package/HiSelect/HiSuggestSelect.js +22 -76
- package/HiSelect/HiSuggestSelectField.js +13 -35
- package/HiSelect/index.js +0 -12
- package/HiSelectableList/HiSelectableList.js +29 -83
- package/HiSelectableList/HiSelectableListHierarchic.js +31 -55
- package/HiSelectableList/HiSelectableListItem.js +37 -76
- package/HiSelectableList/index.js +0 -4
- package/HiStepper/DefaultIndicator.js +0 -8
- package/HiStepper/HiStep.js +18 -47
- package/HiStepper/HiStepper.js +1 -13
- package/HiStepper/index.js +0 -3
- package/HiSwitch/HiSwitch.js +15 -36
- package/HiSwitch/HiSwitchState.js +17 -31
- package/HiSwitch/index.js +0 -3
- package/HiTable/HiCellBuilder.js +7 -61
- package/HiTable/HiTable.js +17 -44
- package/HiTable/HiTableBody.js +6 -22
- package/HiTable/HiTableHeader.js +14 -46
- package/HiTable/HiTableRow.js +7 -39
- package/HiTable/constants.js +9 -14
- package/HiTable/index.js +0 -2
- package/es/HiAccordion/HiAccordion.js +5 -22
- package/es/HiAccordion/index.js +0 -3
- package/es/HiAccordionActions/HiAccordionActions.js +0 -12
- package/es/HiAccordionActions/index.js +0 -3
- package/es/HiAccordionSummary/HiAccordionSummary.js +0 -13
- package/es/HiAccordionSummary/index.js +0 -3
- package/es/HiAlertModal/HiAlertModal.js +4 -18
- package/es/HiAlertModal/index.js +0 -3
- package/es/HiAppBar/HiAppBar.js +8 -37
- package/es/HiAppBar/index.js +0 -2
- package/es/HiAvatar/HiAvatar.js +2 -10
- package/es/HiAvatar/index.js +0 -2
- package/es/HiBadge/HiBadge.js +14 -27
- package/es/HiBadge/index.js +0 -2
- package/es/HiBreadcrumb/HiBreadcrumb.js +5 -28
- package/es/HiBreadcrumb/HiStep.js +10 -40
- package/es/HiBreadcrumb/HiStepConnector.js +11 -43
- package/es/HiBreadcrumb/HiStepContent.js +3 -25
- package/es/HiBreadcrumb/HiStepIcon.js +11 -33
- package/es/HiBreadcrumb/HiStepLabel.js +12 -39
- package/es/HiBreadcrumb/HiStepper.js +3 -25
- package/es/HiBreadcrumb/index.js +0 -2
- package/es/HiButton/HiButton.js +8 -31
- package/es/HiButton/index.js +0 -3
- package/es/HiCell/CellAddress.js +9 -28
- package/es/HiCell/CellDate.js +7 -31
- package/es/HiCell/CellHiddenContent.js +4 -24
- package/es/HiCell/CellIcon.js +9 -31
- package/es/HiCell/CellImage.js +9 -29
- package/es/HiCell/CellNumeric.js +10 -35
- package/es/HiCell/CellPinToAction.js +6 -28
- package/es/HiCell/CellRate.js +14 -45
- package/es/HiCell/CellSentinel.js +9 -28
- package/es/HiCell/CellSentinelScore.js +5 -24
- package/es/HiCell/CellText.js +13 -47
- package/es/HiCell/CellTextStyled.js +12 -22
- package/es/HiCell/index.js +0 -10
- package/es/HiCheckbox/HiCheckbox.js +16 -50
- package/es/HiCheckbox/index.js +0 -2
- package/es/HiChip/HiChip.js +22 -43
- package/es/HiChip/HiChipSwitch.js +12 -52
- package/es/HiChip/index.js +0 -3
- package/es/HiColoredLabel/HiColoredLabel.js +37 -56
- package/es/HiColoredLabel/index.js +0 -2
- package/es/HiDatePicker/Caption.js +6 -16
- package/es/HiDatePicker/HiDatePicker.js +14 -85
- package/es/HiDatePicker/HiDatePickerMobile.js +17 -41
- package/es/HiDatePicker/HiDateRangePicker.js +35 -129
- package/es/HiDatePicker/HiDateRangeSelector.js +45 -123
- package/es/HiDatePicker/ListPicker.js +5 -33
- package/es/HiDatePicker/NavBar.js +9 -26
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
- package/es/HiDatePicker/Overlays/Overlay.js +4 -18
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
- package/es/HiDatePicker/Overlays/index.js +0 -6
- package/es/HiDatePicker/Weekday.js +3 -7
- package/es/HiDatePicker/hiLocaleUtils.js +7 -18
- package/es/HiDatePicker/index.js +0 -2
- package/es/HiDatePicker/stylesheet.js +5 -10
- package/es/HiDialog/HiDialog.js +4 -15
- package/es/HiDialog/index.js +0 -2
- package/es/HiDotsStepper/HiDot.js +6 -33
- package/es/HiDotsStepper/HiDotsStepper.js +7 -32
- package/es/HiDotsStepper/index.js +0 -3
- package/es/HiExpansionPanel/HiExpansionPanel.js +13 -34
- package/es/HiExpansionPanel/index.js +0 -3
- package/es/HiForm/HiAddressField.js +9 -34
- package/es/HiForm/HiEmailField.js +4 -27
- package/es/HiForm/HiFormControl.js +27 -70
- package/es/HiForm/HiFormLabel.js +13 -37
- package/es/HiForm/HiInput.js +28 -80
- package/es/HiForm/HiPasswordField.js +5 -31
- package/es/HiForm/HiSearchField.js +2 -32
- package/es/HiForm/HiSlider.js +19 -52
- package/es/HiForm/HiTextField.js +21 -45
- package/es/HiForm/HiUpload.js +31 -87
- package/es/HiForm/HiUploadField.js +9 -30
- package/es/HiForm/HiUploadInput.js +20 -70
- package/es/HiForm/index.js +0 -12
- package/es/HiIcon/HiIcon.js +5 -28
- package/es/HiIcon/index.js +0 -2
- package/es/HiIconButton/HiIconButton.js +5 -18
- package/es/HiIconButton/index.js +0 -2
- package/es/HiListItemLink/HiListItemLink.js +6 -17
- package/es/HiListItemLink/index.js +0 -2
- package/es/HiLoader/HiLoader.js +4 -13
- package/es/HiLoader/index.js +0 -2
- package/es/HiNotice/HiKPI.js +14 -42
- package/es/HiNotice/HiKPINotice.js +4 -13
- package/es/HiNotice/index.js +0 -3
- package/es/HiPagination/HiPagination.js +0 -9
- package/es/HiPagination/index.js +0 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +24 -60
- package/es/HiPaymentMeans/index.js +0 -2
- package/es/HiPdfReader/HiPdfReader.js +21 -52
- package/es/HiPdfReader/index.js +0 -2
- package/es/HiPin/HiPin.js +14 -23
- package/es/HiPin/index.js +0 -2
- package/es/HiRadio/HiRadio.js +9 -18
- package/es/HiRadio/index.js +0 -2
- package/es/HiScrollStepper/HiScrollStepper.js +26 -63
- package/es/HiScrollStepper/index.js +0 -2
- package/es/HiSelect/HiDynamicSelect.js +31 -40
- package/es/HiSelect/HiDynamicSelectField.js +22 -44
- package/es/HiSelect/HiNestedSelect.js +61 -104
- package/es/HiSelect/HiNestedSelectContent.js +58 -82
- package/es/HiSelect/HiNestedSelectField.js +22 -44
- package/es/HiSelect/HiSelect.js +85 -180
- package/es/HiSelect/HiSelectContent.js +58 -90
- package/es/HiSelect/HiSelectField.js +23 -45
- package/es/HiSelect/HiSelectInput.js +20 -69
- package/es/HiSelect/HiSelectMobile.js +5 -40
- package/es/HiSelect/HiSuggestSelect.js +22 -76
- package/es/HiSelect/HiSuggestSelectField.js +13 -35
- package/es/HiSelect/index.js +0 -12
- package/es/HiSelectableList/HiSelectableList.js +29 -83
- package/es/HiSelectableList/HiSelectableListHierarchic.js +31 -55
- package/es/HiSelectableList/HiSelectableListItem.js +37 -76
- package/es/HiSelectableList/index.js +0 -4
- package/es/HiStepper/DefaultIndicator.js +0 -8
- package/es/HiStepper/HiStep.js +18 -47
- package/es/HiStepper/HiStepper.js +1 -13
- package/es/HiStepper/index.js +0 -3
- package/es/HiSwitch/HiSwitch.js +15 -36
- package/es/HiSwitch/HiSwitchState.js +17 -31
- package/es/HiSwitch/index.js +0 -3
- package/es/HiTable/HiCellBuilder.js +7 -61
- package/es/HiTable/HiTable.js +17 -44
- package/es/HiTable/HiTableBody.js +6 -22
- package/es/HiTable/HiTableHeader.js +14 -46
- package/es/HiTable/HiTableRow.js +7 -39
- package/es/HiTable/constants.js +9 -14
- package/es/HiTable/index.js +0 -2
- package/es/hi-svg-icons/HiAccount.js +3 -12
- package/es/hi-svg-icons/HiActivity.js +3 -12
- package/es/hi-svg-icons/HiAll.js +6 -16
- package/es/hi-svg-icons/HiBilling.js +3 -12
- package/es/hi-svg-icons/HiBriefcaseRescue.js +3 -12
- package/es/hi-svg-icons/HiBusiness.js +3 -12
- package/es/hi-svg-icons/HiCatalog.js +3 -12
- package/es/hi-svg-icons/HiCustomer.js +3 -12
- package/es/hi-svg-icons/HiDownload.js +3 -12
- package/es/hi-svg-icons/HiFinance.js +3 -12
- package/es/hi-svg-icons/HiFinanceMenu.js +3 -12
- package/es/hi-svg-icons/HiHostedPaymentPage.js +3 -12
- package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
- package/es/hi-svg-icons/HiIntegration.js +3 -12
- package/es/hi-svg-icons/HiIntegrationMenu.js +3 -12
- package/es/hi-svg-icons/HiIntelligence.js +3 -12
- package/es/hi-svg-icons/HiIntelligenceMenu.js +3 -12
- package/es/hi-svg-icons/HiInvoice.js +3 -12
- package/es/hi-svg-icons/HiInvoiceMenu.js +3 -12
- package/es/hi-svg-icons/HiLogoRounded.js +5 -15
- package/es/hi-svg-icons/HiOrder.js +3 -12
- package/es/hi-svg-icons/HiPaymentOrder.js +3 -12
- package/es/hi-svg-icons/HiPermission.js +3 -12
- package/es/hi-svg-icons/HiPriceGrid.js +3 -12
- package/es/hi-svg-icons/HiPrivate.js +3 -12
- package/es/hi-svg-icons/HiRoute.js +3 -12
- package/es/hi-svg-icons/HiRouteMenu.js +3 -12
- package/es/hi-svg-icons/HiRouteSwitch.js +6 -17
- package/es/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
- package/es/hi-svg-icons/HiSettlement.js +3 -12
- package/es/hi-svg-icons/HiSizeLarge.js +3 -12
- package/es/hi-svg-icons/HiSizeMedium.js +3 -12
- package/es/hi-svg-icons/HiSizeSmall.js +3 -12
- package/es/hi-svg-icons/HiStore.js +3 -12
- package/es/hi-svg-icons/HiStoreMenu.js +3 -12
- package/es/hi-svg-icons/HiTransaction.js +3 -12
- package/es/hi-svg-icons/HiTransactionMenu.js +3 -12
- package/es/hi-svg-icons/HiUser.js +3 -12
- package/es/hi-svg-icons/HiVendor.js +3 -12
- package/es/hi-svg-icons/HiWidget.js +3 -12
- package/es/hi-svg-icons/index.js +0 -41
- package/es/hi-svg-images/HiLogo.js +3 -10
- package/es/hi-svg-images/HiLogoWhite.js +3 -10
- package/es/hi-svg-images/index.js +0 -3
- package/es/setupTest.js +2 -13
- package/es/styleguide/Wrapper.js +0 -6
- package/es/styles/MuiThemeProvider.js +11 -43
- package/es/styles/colorManipulator.js +15 -50
- package/es/styles/createBreakpoints.js +14 -28
- package/es/styles/createGenerateClassName.js +14 -24
- package/es/styles/createMixins.js +0 -5
- package/es/styles/createMuiTheme.js +10 -26
- package/es/styles/createPalette.js +65 -85
- package/es/styles/createStyles.js +0 -1
- package/es/styles/createTypography.js +15 -24
- package/es/styles/getStylesCreator.js +0 -12
- package/es/styles/getThemeProps.js +1 -5
- package/es/styles/index.js +0 -6
- package/es/styles/jssPreset.js +0 -9
- package/es/styles/makeStyles.js +0 -6
- package/es/styles/mergeClasses.js +4 -14
- package/es/styles/shadows.js +0 -2
- package/es/styles/spacing.js +0 -2
- package/es/styles/themeListener.js +0 -6
- package/es/styles/transitions.js +13 -22
- package/es/styles/withStyles.js +0 -6
- package/es/test-utils/createMount.js +2 -12
- package/es/test-utils/createRender.js +2 -9
- package/es/test-utils/createShallow.js +6 -17
- package/es/test-utils/getClasses.js +0 -2
- package/es/test-utils/index.js +0 -6
- package/es/test-utils/until.js +3 -14
- package/es/test-utils/unwrap.js +0 -1
- package/es/theme/palette.js +0 -4
- package/es/theme/typography.js +5 -12
- package/es/theme.js +0 -5
- package/es/transitions/utils.js +2 -5
- package/es/utils/exactProp.js +1 -9
- package/es/utils/helpers.js +19 -58
- package/es/withMobileDialog/index.js +0 -2
- package/es/withMobileDialog/withMobileDialog.js +2 -10
- package/hi-svg-icons/HiAccount.js +3 -12
- package/hi-svg-icons/HiActivity.js +3 -12
- package/hi-svg-icons/HiAll.js +6 -16
- package/hi-svg-icons/HiBilling.js +3 -12
- package/hi-svg-icons/HiBriefcaseRescue.js +3 -12
- package/hi-svg-icons/HiBusiness.js +3 -12
- package/hi-svg-icons/HiCatalog.js +3 -12
- package/hi-svg-icons/HiCustomer.js +3 -12
- package/hi-svg-icons/HiDownload.js +3 -12
- package/hi-svg-icons/HiFinance.js +3 -12
- package/hi-svg-icons/HiFinanceMenu.js +3 -12
- package/hi-svg-icons/HiHostedPaymentPage.js +3 -12
- package/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
- package/hi-svg-icons/HiIntegration.js +3 -12
- package/hi-svg-icons/HiIntegrationMenu.js +3 -12
- package/hi-svg-icons/HiIntelligence.js +3 -12
- package/hi-svg-icons/HiIntelligenceMenu.js +3 -12
- package/hi-svg-icons/HiInvoice.js +3 -12
- package/hi-svg-icons/HiInvoiceMenu.js +3 -12
- package/hi-svg-icons/HiLogoRounded.js +5 -15
- package/hi-svg-icons/HiOrder.js +3 -12
- package/hi-svg-icons/HiPaymentOrder.js +3 -12
- package/hi-svg-icons/HiPermission.js +3 -12
- package/hi-svg-icons/HiPriceGrid.js +3 -12
- package/hi-svg-icons/HiPrivate.js +3 -12
- package/hi-svg-icons/HiRoute.js +3 -12
- package/hi-svg-icons/HiRouteMenu.js +3 -12
- package/hi-svg-icons/HiRouteSwitch.js +6 -17
- package/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
- package/hi-svg-icons/HiSettlement.js +3 -12
- package/hi-svg-icons/HiSizeLarge.js +3 -12
- package/hi-svg-icons/HiSizeMedium.js +3 -12
- package/hi-svg-icons/HiSizeSmall.js +3 -12
- package/hi-svg-icons/HiStore.js +3 -12
- package/hi-svg-icons/HiStoreMenu.js +3 -12
- package/hi-svg-icons/HiTransaction.js +3 -12
- package/hi-svg-icons/HiTransactionMenu.js +3 -12
- package/hi-svg-icons/HiUser.js +3 -12
- package/hi-svg-icons/HiVendor.js +3 -12
- package/hi-svg-icons/HiWidget.js +3 -12
- package/hi-svg-icons/index.js +0 -41
- package/hi-svg-images/HiLogo.js +3 -10
- package/hi-svg-images/HiLogoWhite.js +3 -10
- package/hi-svg-images/index.js +0 -3
- package/package.json +4 -4
- package/setupTest.js +2 -13
- package/styleguide/Wrapper.js +0 -6
- package/styles/MuiThemeProvider.js +11 -43
- package/styles/colorManipulator.js +15 -50
- package/styles/createBreakpoints.js +14 -28
- package/styles/createGenerateClassName.js +14 -24
- package/styles/createMixins.js +0 -5
- package/styles/createMuiTheme.js +10 -26
- package/styles/createPalette.js +65 -85
- package/styles/createStyles.js +0 -1
- package/styles/createTypography.js +15 -24
- package/styles/getStylesCreator.js +0 -12
- package/styles/getThemeProps.js +1 -5
- package/styles/index.js +0 -6
- package/styles/jssPreset.js +0 -9
- package/styles/makeStyles.js +0 -6
- package/styles/mergeClasses.js +4 -14
- package/styles/shadows.js +0 -2
- package/styles/spacing.js +0 -2
- package/styles/themeListener.js +0 -6
- package/styles/transitions.js +13 -22
- package/styles/withStyles.js +0 -6
- package/test-utils/createMount.js +2 -12
- package/test-utils/createRender.js +2 -9
- package/test-utils/createShallow.js +6 -17
- package/test-utils/getClasses.js +0 -2
- package/test-utils/index.js +0 -6
- package/test-utils/until.js +3 -14
- package/test-utils/unwrap.js +0 -1
- package/theme/palette.js +0 -4
- package/theme/typography.js +5 -12
- package/theme.js +0 -5
- package/transitions/utils.js +2 -5
- package/utils/exactProp.js +1 -9
- package/utils/helpers.js +19 -58
- package/withMobileDialog/index.js +0 -2
- package/withMobileDialog/withMobileDialog.js +2 -10
package/es/HiForm/HiUpload.js
CHANGED
@@ -1,44 +1,26 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.styles = exports.default = void 0;
|
9
|
-
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
11
|
-
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
15
|
-
|
16
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
17
|
-
|
18
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
19
|
-
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
-
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
23
|
-
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
25
|
-
|
26
16
|
var _react = _interopRequireDefault(require("react"));
|
27
|
-
|
28
17
|
var _classnames = _interopRequireDefault(require("classnames"));
|
29
|
-
|
30
18
|
var _index = _interopRequireDefault(require("keycode/index"));
|
31
|
-
|
32
19
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
33
|
-
|
34
20
|
var _HiUploadInput = _interopRequireDefault(require("./HiUploadInput"));
|
35
|
-
|
36
21
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
37
|
-
|
38
22
|
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); }; }
|
39
|
-
|
40
23
|
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; } }
|
41
|
-
|
42
24
|
var styles = function styles(theme) {
|
43
25
|
return {
|
44
26
|
flexContainer: {
|
@@ -52,8 +34,8 @@ var styles = function styles(theme) {
|
|
52
34
|
padding: '24px',
|
53
35
|
borderRadius: '2px',
|
54
36
|
backgroundColor: theme.palette.background2,
|
55
|
-
border: "1px solid ".concat(theme.palette.
|
56
|
-
color: "".concat(theme.palette.
|
37
|
+
border: "1px solid ".concat(theme.palette.warning.main),
|
38
|
+
color: "".concat(theme.palette.warning.main, " !important"),
|
57
39
|
fontSize: '80px'
|
58
40
|
},
|
59
41
|
dragOver: {},
|
@@ -66,13 +48,13 @@ var styles = function styles(theme) {
|
|
66
48
|
color: "".concat(theme.palette.neutral.main, " !important")
|
67
49
|
},
|
68
50
|
complete: {
|
69
|
-
border: "1px solid ".concat(theme.palette.
|
70
|
-
color: "".concat(theme.palette.
|
51
|
+
border: "1px solid ".concat(theme.palette.success.main),
|
52
|
+
color: "".concat(theme.palette.success.main, " !important"),
|
71
53
|
fontSize: '32px'
|
72
54
|
},
|
73
55
|
error: {
|
74
|
-
border: "1px solid ".concat(theme.palette.
|
75
|
-
color: "".concat(theme.palette.
|
56
|
+
border: "1px solid ".concat(theme.palette.error.main),
|
57
|
+
color: "".concat(theme.palette.error.main, " !important")
|
76
58
|
},
|
77
59
|
fileButton: {
|
78
60
|
marginRight: 8,
|
@@ -87,34 +69,25 @@ var styles = function styles(theme) {
|
|
87
69
|
focusable: {}
|
88
70
|
};
|
89
71
|
};
|
90
|
-
|
91
72
|
exports.styles = styles;
|
92
|
-
|
93
73
|
var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
94
74
|
(0, _inherits2.default)(HiUpload, _React$PureComponent);
|
95
|
-
|
96
75
|
var _super = _createSuper(HiUpload);
|
97
|
-
|
98
76
|
function HiUpload() {
|
99
77
|
var _this;
|
100
|
-
|
101
78
|
(0, _classCallCheck2.default)(this, HiUpload);
|
102
79
|
_this = _super.call(this);
|
103
|
-
|
80
|
+
// Action when files are dropped on the field
|
104
81
|
_this.handleDrop = function (event) {
|
105
82
|
if (event.path[0].id === _this.uploadIconRef.props.id) {
|
106
83
|
event.preventDefault();
|
107
84
|
event.stopPropagation();
|
108
|
-
|
109
85
|
if (_this.state.droppable) {
|
110
86
|
var index = _this.getNextInputIndex();
|
111
|
-
|
112
87
|
var param = _this.handleFile(event.dataTransfer.files, index);
|
113
|
-
|
114
88
|
_this.setState({
|
115
89
|
dragOver: false
|
116
90
|
});
|
117
|
-
|
118
91
|
_this.props.onChange(param, 0);
|
119
92
|
} else {
|
120
93
|
_this.setState({
|
@@ -123,20 +96,17 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
123
96
|
}
|
124
97
|
}
|
125
98
|
};
|
126
|
-
|
99
|
+
// Action when files are dragged over the field.
|
127
100
|
_this.handleDragEnter = function (event) {
|
128
101
|
event.preventDefault();
|
129
102
|
event.stopPropagation();
|
130
|
-
|
131
103
|
if (event.path[0].id === _this.uploadIconRef.props.id) {
|
132
104
|
if (event.dataTransfer.items.length !== 1) {
|
133
105
|
event.dataTransfer.dropEffect = 'none';
|
134
|
-
|
135
106
|
_this.props.onChange({
|
136
107
|
errorMessage: _this.props.translations.errorDragEnter,
|
137
108
|
value: null
|
138
109
|
}, 0);
|
139
|
-
|
140
110
|
_this.setState({
|
141
111
|
dragOver: true
|
142
112
|
});
|
@@ -148,59 +118,47 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
148
118
|
}
|
149
119
|
}
|
150
120
|
};
|
151
|
-
|
121
|
+
// Action when files are not dragged over the field anymore.
|
152
122
|
_this.handleDragLeave = function (event) {
|
153
123
|
event.preventDefault();
|
154
124
|
event.stopPropagation();
|
155
|
-
|
156
125
|
if (event.path[0].id === _this.uploadIconRef.props.id && event.relatedTarget.parentElement !== _this.uploadFieldRef) {
|
157
126
|
_this.props.onChange({
|
158
127
|
errorMessage: '',
|
159
128
|
value: null
|
160
129
|
}, 0);
|
161
|
-
|
162
130
|
_this.setState({
|
163
131
|
droppable: false,
|
164
132
|
dragOver: false
|
165
133
|
});
|
166
134
|
}
|
167
135
|
};
|
168
|
-
|
169
136
|
_this.handleChange = function (event) {
|
170
137
|
var index = _this.getNextInputIndex();
|
171
|
-
|
172
138
|
var param = _this.handleFile(event.target.files, index);
|
173
|
-
|
174
139
|
_this.props.onChange(param, index);
|
175
140
|
};
|
176
|
-
|
177
141
|
_this.handleEmptyField = function (event) {
|
178
142
|
event.target.value = '';
|
179
143
|
};
|
180
|
-
|
181
144
|
_this.handleKeyPress = function (event) {
|
182
145
|
var key = (0, _index.default)(event);
|
183
|
-
|
184
146
|
if (key === 'enter' || key === 'space') {
|
185
147
|
event.preventDefault();
|
186
|
-
|
187
148
|
_this.uploadInput.click();
|
188
149
|
}
|
189
150
|
};
|
190
|
-
|
151
|
+
// Handles the file wether it is selected via the input or dropped on it.
|
191
152
|
_this.handleFile = function (files, index) {
|
192
153
|
var error = false;
|
193
154
|
var errorMessage = '';
|
194
155
|
var file = null;
|
195
|
-
|
196
156
|
if (files.length === 1) {
|
197
157
|
file = files[0];
|
198
|
-
|
199
158
|
if (_this.props.inputs[index] && file.size > _this.props.inputs[index].maxSize) {
|
200
159
|
errorMessage += _this.props.translations.errorSize.replace('maxSize', _this.props.inputs[index].maxSize / 1000000);
|
201
160
|
error = true;
|
202
161
|
}
|
203
|
-
|
204
162
|
if (_this.props.inputs[index] && _this.props.inputs[index].acceptedTypes && _this.props.inputs[index].acceptedTypes.length !== 0 && _this.props.inputs[index].acceptedTypes.indexOf(file.type) === -1) {
|
205
163
|
errorMessage += _this.props.translations.errorType;
|
206
164
|
error = true;
|
@@ -208,26 +166,23 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
208
166
|
} else {
|
209
167
|
errorMessage = _this.props.translations.errorDropMultiple;
|
210
168
|
}
|
211
|
-
|
212
169
|
return {
|
213
170
|
errorMessage: errorMessage,
|
214
171
|
error: error,
|
215
172
|
value: file
|
216
173
|
};
|
217
174
|
};
|
218
|
-
|
219
175
|
_this.createInputs = function (others) {
|
220
176
|
var _this$props = _this.props,
|
221
|
-
|
222
|
-
|
223
|
-
var files = inputs;
|
177
|
+
inputs = _this$props.inputs,
|
178
|
+
values = _this$props.values;
|
179
|
+
var files = inputs;
|
224
180
|
|
181
|
+
// unlimited number of files
|
225
182
|
if (inputs.length === 0) {
|
226
183
|
files = values;
|
227
184
|
}
|
228
|
-
|
229
185
|
var inputComponents = [];
|
230
|
-
|
231
186
|
for (var i = 0; i < files.length; i += 1) {
|
232
187
|
if (files.length > 1 || values[i] && values[i].value) {
|
233
188
|
inputComponents.push( /*#__PURE__*/_react.default.createElement(_HiUploadInput.default, (0, _extends2.default)({
|
@@ -245,19 +200,17 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
245
200
|
}, others)));
|
246
201
|
}
|
247
202
|
}
|
248
|
-
|
249
203
|
return inputComponents;
|
250
204
|
};
|
251
|
-
|
252
205
|
_this.uploadFieldRef = void 0;
|
253
206
|
_this.state = {
|
254
207
|
dragOver: false,
|
255
208
|
droppable: false
|
256
209
|
};
|
257
210
|
return _this;
|
258
|
-
}
|
259
|
-
|
211
|
+
}
|
260
212
|
|
213
|
+
// When component mounts, we add eventListeners to handle the file drag and drop
|
261
214
|
(0, _createClass2.default)(HiUpload, [{
|
262
215
|
key: "componentDidMount",
|
263
216
|
value: function componentDidMount() {
|
@@ -281,8 +234,9 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
281
234
|
}, {
|
282
235
|
key: "getNextInputIndex",
|
283
236
|
value: function getNextInputIndex() {
|
284
|
-
var index = 0;
|
237
|
+
var index = 0;
|
285
238
|
|
239
|
+
// Add an input at the end
|
286
240
|
if (!this.props.inputs.length) {
|
287
241
|
index = this.props.values.length + 1;
|
288
242
|
} else {
|
@@ -294,31 +248,29 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
294
248
|
}
|
295
249
|
}
|
296
250
|
}
|
297
|
-
|
298
251
|
return index;
|
299
|
-
}
|
300
|
-
|
252
|
+
}
|
301
253
|
}, {
|
302
254
|
key: "render",
|
303
255
|
value: function render() {
|
304
256
|
var _classNames,
|
305
|
-
|
306
|
-
|
307
|
-
|
257
|
+
_classNames2,
|
258
|
+
_this2 = this;
|
308
259
|
var _this$props2 = this.props,
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
260
|
+
id = _this$props2.id,
|
261
|
+
inputs = _this$props2.inputs,
|
262
|
+
classes = _this$props2.classes,
|
263
|
+
values = _this$props2.values,
|
264
|
+
focused = _this$props2.focused,
|
265
|
+
others = (0, _objectWithoutProperties2.default)(_this$props2, ["id", "inputs", "classes", "values", "focused"]);
|
315
266
|
var _this$state = this.state,
|
316
|
-
|
317
|
-
|
267
|
+
dragOver = _this$state.dragOver,
|
268
|
+
droppable = _this$state.droppable;
|
318
269
|
var complete = true;
|
319
270
|
var empty = true;
|
320
|
-
var error = false;
|
271
|
+
var error = false;
|
321
272
|
|
273
|
+
// For unlimited inputs: always grey
|
322
274
|
if (!inputs.length) {
|
323
275
|
complete = false;
|
324
276
|
} else if (values.length === 0 || inputs.length > 0 && inputs.length !== values.length) {
|
@@ -326,7 +278,6 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
326
278
|
} else {
|
327
279
|
for (var i = 0, len = values.length; i < len; i += 1) {
|
328
280
|
var value = values[i];
|
329
|
-
|
330
281
|
if (value !== undefined) {
|
331
282
|
complete = value.value === null || value.error ? false : complete;
|
332
283
|
empty = value.value !== null && !value.error ? false : empty;
|
@@ -336,10 +287,8 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
336
287
|
}
|
337
288
|
}
|
338
289
|
}
|
339
|
-
|
340
290
|
var statusClass = (0, _classnames.default)(classes.statusIcon, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.empty, empty), (0, _defineProperty2.default)(_classNames, classes.complete, complete), _classNames));
|
341
291
|
var icon;
|
342
|
-
|
343
292
|
if (error) {
|
344
293
|
icon = 'warning';
|
345
294
|
} else if (complete) {
|
@@ -347,13 +296,10 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
347
296
|
} else {
|
348
297
|
icon = 'file_upload';
|
349
298
|
}
|
350
|
-
|
351
299
|
var focusable = true;
|
352
|
-
|
353
300
|
if (complete && values.length > 1) {
|
354
301
|
focusable = false;
|
355
302
|
}
|
356
|
-
|
357
303
|
var iconClass = (0, _classnames.default)(statusClass, classes.fileButton, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.dragOver, dragOver), (0, _defineProperty2.default)(_classNames2, classes.droppable, droppable), (0, _defineProperty2.default)(_classNames2, classes.focused, focused), (0, _defineProperty2.default)(_classNames2, classes.error, error && !focused), (0, _defineProperty2.default)(_classNames2, classes.focusable, focusable), _classNames2));
|
358
304
|
return /*#__PURE__*/_react.default.createElement("div", {
|
359
305
|
className: classes.flexContainer
|
@@ -387,10 +333,8 @@ var HiUpload = /*#__PURE__*/function (_React$PureComponent) {
|
|
387
333
|
}]);
|
388
334
|
return HiUpload;
|
389
335
|
}(_react.default.PureComponent);
|
390
|
-
|
391
336
|
var _default = (0, _withStyles.default)(styles, {
|
392
337
|
hiComponent: true,
|
393
338
|
name: 'HmuiHiUpload'
|
394
339
|
})(HiUpload);
|
395
|
-
|
396
340
|
exports.default = _default;
|
@@ -1,73 +1,53 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.default = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
-
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
15
|
-
|
16
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
17
|
-
|
18
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
19
|
-
|
20
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
21
|
-
|
22
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
23
|
-
|
24
15
|
var _react = _interopRequireDefault(require("react"));
|
25
|
-
|
26
16
|
var _HiFormControl = _interopRequireDefault(require("./HiFormControl"));
|
27
|
-
|
28
17
|
var _HiUpload = _interopRequireDefault(require("./HiUpload"));
|
29
|
-
|
30
18
|
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); }; }
|
31
|
-
|
32
19
|
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; } }
|
33
|
-
|
34
20
|
var HiUploadField = /*#__PURE__*/function (_React$PureComponent) {
|
35
21
|
(0, _inherits2.default)(HiUploadField, _React$PureComponent);
|
36
|
-
|
37
22
|
var _super = _createSuper(HiUploadField);
|
38
|
-
|
39
23
|
function HiUploadField() {
|
40
24
|
(0, _classCallCheck2.default)(this, HiUploadField);
|
41
25
|
return _super.apply(this, arguments);
|
42
26
|
}
|
43
|
-
|
44
27
|
(0, _createClass2.default)(HiUploadField, [{
|
45
28
|
key: "render",
|
46
29
|
value: function render() {
|
47
30
|
var _this$props = this.props,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
31
|
+
className = _this$props.className,
|
32
|
+
label = _this$props.label,
|
33
|
+
helperIcon = _this$props.helperIcon,
|
34
|
+
helperText = _this$props.helperText,
|
35
|
+
values = _this$props.values,
|
36
|
+
fullWidth = _this$props.fullWidth,
|
37
|
+
required = _this$props.required,
|
38
|
+
HiInputLabelProps = _this$props.HiInputLabelProps,
|
39
|
+
others = (0, _objectWithoutProperties2.default)(_this$props, ["className", "label", "helperIcon", "helperText", "values", "fullWidth", "required", "HiInputLabelProps"]);
|
57
40
|
var empty = true;
|
58
41
|
var error = false;
|
59
42
|
var errorText = '';
|
60
|
-
|
61
43
|
for (var i = 0, len = values.length; i < len; i += 1) {
|
62
44
|
var value = values[i];
|
63
|
-
|
64
45
|
if (value !== undefined) {
|
65
46
|
empty = value.value !== null && !value.error ? false : empty;
|
66
47
|
error = value.error || error;
|
67
48
|
errorText += "".concat(value.errorMessage);
|
68
49
|
}
|
69
50
|
}
|
70
|
-
|
71
51
|
return /*#__PURE__*/_react.default.createElement(_HiFormControl.default, {
|
72
52
|
label: label,
|
73
53
|
className: className,
|
@@ -85,7 +65,6 @@ var HiUploadField = /*#__PURE__*/function (_React$PureComponent) {
|
|
85
65
|
}]);
|
86
66
|
return HiUploadField;
|
87
67
|
}(_react.default.PureComponent);
|
88
|
-
|
89
68
|
HiUploadField.defaultProps = {
|
90
69
|
helperText: '',
|
91
70
|
helperIcon: false,
|