@hipay/hipay-material-ui 3.15.2 → 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 +2 -2
- 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/HiForm/HiFormControl.js
CHANGED
@@ -1,58 +1,33 @@
|
|
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
-
|
12
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
13
|
-
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
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 _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
21
|
-
|
22
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
25
|
-
|
26
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
27
|
-
|
28
17
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
29
|
-
|
30
18
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
20
|
var _Warning = _interopRequireDefault(require("@mui/icons-material/Warning"));
|
35
|
-
|
36
21
|
var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
|
37
|
-
|
38
22
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
39
|
-
|
40
23
|
var _FormHelperText = _interopRequireDefault(require("@mui/material/FormHelperText"));
|
41
|
-
|
42
24
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
43
|
-
|
44
25
|
var _HiFormLabel = _interopRequireDefault(require("./HiFormLabel"));
|
45
|
-
|
46
26
|
var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
|
47
|
-
|
48
27
|
var _helpers = require("../utils/helpers");
|
49
|
-
|
50
28
|
var _index = _interopRequireDefault(require("keycode/index"));
|
51
|
-
|
52
29
|
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); }; }
|
53
|
-
|
54
|
-
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; } }
|
55
|
-
|
30
|
+
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; } } // @inheritedComponent FormControl
|
56
31
|
var styles = function styles(theme) {
|
57
32
|
return {
|
58
33
|
helperTextClassName: {
|
@@ -68,7 +43,7 @@ var styles = function styles(theme) {
|
|
68
43
|
width: 20,
|
69
44
|
marginLeft: 3,
|
70
45
|
'&$iconButtonError': {
|
71
|
-
color: theme.palette.
|
46
|
+
color: theme.palette.error.main
|
72
47
|
},
|
73
48
|
'&$iconButtonInfo': {
|
74
49
|
color: theme.palette.neutral.main
|
@@ -88,7 +63,7 @@ var styles = function styles(theme) {
|
|
88
63
|
iconButtonInfoActive: {},
|
89
64
|
iconFullWidth: {},
|
90
65
|
errorDiv: (0, _objectSpread2.default)({}, theme.typography.body3, {
|
91
|
-
backgroundColor: theme.palette.
|
66
|
+
backgroundColor: theme.palette.error.main,
|
92
67
|
color: '#FFFFFF',
|
93
68
|
padding: theme.spacing(4, 2),
|
94
69
|
verticalAlign: 'middle',
|
@@ -114,7 +89,7 @@ var styles = function styles(theme) {
|
|
114
89
|
arrowNotFullWidth: {},
|
115
90
|
arrowFullWidth: {},
|
116
91
|
errorDivArrowDown: {
|
117
|
-
borderTopColor: theme.palette.
|
92
|
+
borderTopColor: theme.palette.error.main
|
118
93
|
},
|
119
94
|
helperDiv: (0, _objectSpread2.default)({}, theme.typography.body2, {
|
120
95
|
width: '100%',
|
@@ -136,44 +111,34 @@ var styles = function styles(theme) {
|
|
136
111
|
}
|
137
112
|
};
|
138
113
|
};
|
114
|
+
|
139
115
|
/**
|
140
116
|
* Champs input pour formulaire
|
141
117
|
*/
|
142
|
-
|
143
|
-
|
144
118
|
exports.styles = styles;
|
145
|
-
|
146
119
|
var HiFormControl = /*#__PURE__*/function (_React$PureComponent) {
|
147
120
|
(0, _inherits2.default)(HiFormControl, _React$PureComponent);
|
148
|
-
|
149
121
|
var _super = _createSuper(HiFormControl);
|
150
|
-
|
151
122
|
function HiFormControl(props) {
|
152
123
|
var _this;
|
153
|
-
|
154
124
|
(0, _classCallCheck2.default)(this, HiFormControl);
|
155
125
|
_this = _super.call(this, props);
|
156
|
-
|
157
126
|
_this.handleHelperClick = function (event) {
|
158
127
|
_this.setState(function (prevState) {
|
159
128
|
return {
|
160
129
|
helperOpen: !prevState.helperOpen
|
161
130
|
};
|
162
131
|
});
|
163
|
-
|
164
132
|
if (event) {
|
165
133
|
event.preventDefault();
|
166
134
|
}
|
167
135
|
};
|
168
|
-
|
169
136
|
_this.handleKeyDown = function (event) {
|
170
137
|
var key = (0, _index.default)(event);
|
171
|
-
|
172
138
|
if (['space', 'enter'].includes(key)) {
|
173
139
|
_this.handleHelperClick(event);
|
174
140
|
}
|
175
141
|
};
|
176
|
-
|
177
142
|
_this.handleHover = function (value) {
|
178
143
|
return function () {
|
179
144
|
_this.setState({
|
@@ -181,13 +146,11 @@ var HiFormControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
181
146
|
});
|
182
147
|
};
|
183
148
|
};
|
184
|
-
|
185
149
|
_this.handleFocus = function (value) {
|
186
150
|
return function () {
|
187
151
|
_this.setState({
|
188
152
|
focused: value
|
189
153
|
});
|
190
|
-
|
191
154
|
if (value === false && _this.state.hovered) {
|
192
155
|
_this.setState({
|
193
156
|
hovered: false
|
@@ -195,7 +158,6 @@ var HiFormControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
195
158
|
}
|
196
159
|
};
|
197
160
|
};
|
198
|
-
|
199
161
|
_this.state = {
|
200
162
|
helperOpen: false,
|
201
163
|
focused: false,
|
@@ -207,36 +169,34 @@ var HiFormControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
207
169
|
_this.handleHover = _this.handleHover.bind((0, _assertThisInitialized2.default)(_this));
|
208
170
|
return _this;
|
209
171
|
}
|
210
|
-
|
211
172
|
(0, _createClass2.default)(HiFormControl, [{
|
212
173
|
key: "render",
|
213
174
|
value: function render() {
|
214
175
|
var _classNames2;
|
215
|
-
|
216
176
|
var _this$props = this.props,
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
177
|
+
children = _this$props.children,
|
178
|
+
classes = _this$props.classes,
|
179
|
+
className = _this$props.className,
|
180
|
+
disabled = _this$props.disabled,
|
181
|
+
error = _this$props.error,
|
182
|
+
errorText = _this$props.errorText,
|
183
|
+
id = _this$props.id,
|
184
|
+
label = _this$props.label,
|
185
|
+
InputLabelProps = _this$props.InputLabelProps,
|
186
|
+
helperText = _this$props.helperText,
|
187
|
+
helperIcon = _this$props.helperIcon,
|
188
|
+
FormHelperTextProps = _this$props.FormHelperTextProps,
|
189
|
+
fullWidth = _this$props.fullWidth,
|
190
|
+
required = _this$props.required,
|
191
|
+
multiline = _this$props.multiline,
|
192
|
+
rootRef = _this$props.rootRef,
|
193
|
+
maxLength = _this$props.maxLength,
|
194
|
+
nbChars = _this$props.nbChars,
|
195
|
+
others = (0, _objectWithoutProperties2.default)(_this$props, ["children", "classes", "className", "disabled", "error", "errorText", "id", "label", "InputLabelProps", "helperText", "helperIcon", "FormHelperTextProps", "fullWidth", "required", "multiline", "rootRef", "maxLength", "nbChars"]);
|
236
196
|
var _this$state = this.state,
|
237
|
-
|
238
|
-
|
239
|
-
|
197
|
+
helperOpen = _this$state.helperOpen,
|
198
|
+
focused = _this$state.focused,
|
199
|
+
hovered = _this$state.hovered;
|
240
200
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, (0, _extends2.default)({
|
241
201
|
fullWidth: fullWidth,
|
242
202
|
className: className,
|
@@ -293,7 +253,6 @@ var HiFormControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
293
253
|
}]);
|
294
254
|
return HiFormControl;
|
295
255
|
}(_react.default.PureComponent);
|
296
|
-
|
297
256
|
HiFormControl.defaultProps = {
|
298
257
|
id: (0, _helpers.uniqueId)(),
|
299
258
|
fullWidth: true,
|
@@ -307,10 +266,8 @@ HiFormControl.defaultProps = {
|
|
307
266
|
nbChars: 0,
|
308
267
|
maxLength: 280
|
309
268
|
};
|
310
|
-
|
311
269
|
var _default = (0, _withStyles.default)(styles, {
|
312
270
|
hiComponent: true,
|
313
271
|
name: 'HmuiHiFormControl'
|
314
272
|
})(HiFormControl);
|
315
|
-
|
316
273
|
exports.default = _default;
|
package/HiForm/HiFormLabel.js
CHANGED
@@ -1,40 +1,24 @@
|
|
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 _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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
25
|
-
|
26
16
|
var _react = _interopRequireDefault(require("react"));
|
27
|
-
|
28
17
|
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
29
|
-
|
30
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
31
|
-
|
32
19
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
33
|
-
|
34
20
|
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
|
-
|
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; } }
|
37
|
-
|
21
|
+
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; } } // @inheritedComponent InputLabel
|
38
22
|
var styles = function styles(theme) {
|
39
23
|
return {
|
40
24
|
root: (0, _objectSpread2.default)({}, theme.typography.body2, {
|
@@ -47,7 +31,7 @@ var styles = function styles(theme) {
|
|
47
31
|
color: theme.palette.primary.main
|
48
32
|
},
|
49
33
|
'&$error': {
|
50
|
-
color: theme.palette.
|
34
|
+
color: theme.palette.error.main
|
51
35
|
},
|
52
36
|
display: 'flex',
|
53
37
|
alignItems: 'baseline'
|
@@ -60,37 +44,32 @@ var styles = function styles(theme) {
|
|
60
44
|
error: {}
|
61
45
|
};
|
62
46
|
};
|
47
|
+
|
63
48
|
/**
|
64
49
|
* Label pour champs de formulaire
|
65
50
|
*/
|
66
|
-
|
67
|
-
|
68
51
|
exports.styles = styles;
|
69
|
-
|
70
52
|
var HiFormLabel = /*#__PURE__*/function (_React$PureComponent) {
|
71
53
|
(0, _inherits2.default)(HiFormLabel, _React$PureComponent);
|
72
|
-
|
73
54
|
var _super = _createSuper(HiFormLabel);
|
74
|
-
|
75
55
|
function HiFormLabel() {
|
76
56
|
(0, _classCallCheck2.default)(this, HiFormLabel);
|
77
57
|
return _super.apply(this, arguments);
|
78
58
|
}
|
79
|
-
|
80
59
|
(0, _createClass2.default)(HiFormLabel, [{
|
81
60
|
key: "render",
|
82
61
|
value: function render() {
|
83
62
|
var _this$props = this.props,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
63
|
+
classes = _this$props.classes,
|
64
|
+
classNameProp = _this$props.className,
|
65
|
+
children = _this$props.children,
|
66
|
+
htmlFor = _this$props.htmlFor,
|
67
|
+
label = _this$props.label,
|
68
|
+
InputLabelProps = _this$props.InputLabelProps,
|
69
|
+
required = _this$props.required,
|
70
|
+
translations = _this$props.translations,
|
71
|
+
focused = _this$props.focused,
|
72
|
+
other = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "className", "children", "htmlFor", "label", "InputLabelProps", "required", "translations", "focused"]);
|
94
73
|
var className = (0, _classnames.default)(classes.root, classNameProp);
|
95
74
|
return /*#__PURE__*/_react.default.createElement(_InputLabel.default, (0, _extends2.default)({
|
96
75
|
htmlFor: htmlFor,
|
@@ -109,17 +88,14 @@ var HiFormLabel = /*#__PURE__*/function (_React$PureComponent) {
|
|
109
88
|
}]);
|
110
89
|
return HiFormLabel;
|
111
90
|
}(_react.default.PureComponent);
|
112
|
-
|
113
91
|
HiFormLabel.defaultProps = {
|
114
92
|
required: true,
|
115
93
|
translations: {
|
116
94
|
optional: 'optional'
|
117
95
|
}
|
118
96
|
};
|
119
|
-
|
120
97
|
var _default = (0, _withStyles.default)(styles, {
|
121
98
|
hiComponent: true,
|
122
99
|
name: 'HmuiHiFormLabel'
|
123
100
|
})(HiFormLabel);
|
124
|
-
|
125
101
|
exports.default = _default;
|
package/HiForm/HiInput.js
CHANGED
@@ -1,50 +1,29 @@
|
|
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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
11
|
-
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
13
|
-
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
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 _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
21
|
-
|
22
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
25
|
-
|
26
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
27
|
-
|
28
17
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
29
|
-
|
30
18
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
20
|
var _index = _interopRequireDefault(require("keycode/index"));
|
35
|
-
|
36
21
|
var _Input = _interopRequireDefault(require("@mui/material/Input"));
|
37
|
-
|
38
22
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
39
|
-
|
40
23
|
var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
|
41
|
-
|
42
24
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
43
|
-
|
44
25
|
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); }; }
|
45
|
-
|
46
26
|
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; } }
|
47
|
-
|
48
27
|
var styles = function styles(theme) {
|
49
28
|
return {
|
50
29
|
root: (0, _objectSpread2.default)({
|
@@ -78,8 +57,8 @@ var styles = function styles(theme) {
|
|
78
57
|
easing: theme.transitions.easing.easeOut
|
79
58
|
}),
|
80
59
|
pointerEvents: 'none' // Transparent to the hover style.
|
81
|
-
|
82
60
|
},
|
61
|
+
|
83
62
|
'&:not($error):hover:after': {
|
84
63
|
transform: 'scaleX(1)'
|
85
64
|
},
|
@@ -89,7 +68,7 @@ var styles = function styles(theme) {
|
|
89
68
|
},
|
90
69
|
focused: {},
|
91
70
|
error: {
|
92
|
-
border: "1px solid ".concat(theme.palette.
|
71
|
+
border: "1px solid ".concat(theme.palette.error.main),
|
93
72
|
paddingLeft: 8,
|
94
73
|
borderRadius: 2
|
95
74
|
},
|
@@ -160,44 +139,33 @@ var styles = function styles(theme) {
|
|
160
139
|
}
|
161
140
|
};
|
162
141
|
};
|
163
|
-
|
164
142
|
exports.styles = styles;
|
165
|
-
|
166
143
|
var _ref = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
167
144
|
icon: "close",
|
168
145
|
size: 20,
|
169
146
|
color: "neutral"
|
170
147
|
});
|
171
|
-
|
172
148
|
var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
173
149
|
(0, _inherits2.default)(HiInput, _React$PureComponent);
|
174
|
-
|
175
150
|
var _super = _createSuper(HiInput);
|
176
|
-
|
177
151
|
function HiInput() {
|
178
152
|
var _this;
|
179
|
-
|
180
153
|
(0, _classCallCheck2.default)(this, HiInput);
|
181
154
|
_this = _super.call(this);
|
182
|
-
|
183
155
|
_this.handleKeyDown = function (event) {
|
184
156
|
var key = (0, _index.default)(event);
|
185
|
-
|
186
157
|
if (_this.props.onKeyDown) {
|
187
158
|
_this.props.onKeyDown(event);
|
188
159
|
}
|
189
|
-
|
190
160
|
if (key === 'enter' && _this.props.onSubmit) {
|
191
161
|
_this.props.onSubmit(event);
|
192
162
|
}
|
193
163
|
};
|
194
|
-
|
195
164
|
_this.handleClick = function (event) {
|
196
165
|
if (_this.props.onClick) {
|
197
166
|
_this.props.onClick(event);
|
198
167
|
}
|
199
168
|
};
|
200
|
-
|
201
169
|
_this.state = {
|
202
170
|
focused: false
|
203
171
|
};
|
@@ -212,12 +180,10 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
212
180
|
_this.handleOverlayRef = _this.handleOverlayRef.bind((0, _assertThisInitialized2.default)(_this));
|
213
181
|
return _this;
|
214
182
|
}
|
215
|
-
|
216
183
|
(0, _createClass2.default)(HiInput, [{
|
217
184
|
key: "getInputElement",
|
218
185
|
value: function getInputElement(el) {
|
219
186
|
this.inputElement = el;
|
220
|
-
|
221
187
|
if (this.props.customRef) {
|
222
188
|
this.props.customRef(this.inputElement);
|
223
189
|
} else if (this.props.inputRef) {
|
@@ -237,7 +203,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
237
203
|
if (this.props.onReset) {
|
238
204
|
this.props.onReset();
|
239
205
|
}
|
240
|
-
|
241
206
|
this.inputElement.focus();
|
242
207
|
}
|
243
208
|
}, {
|
@@ -253,14 +218,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
253
218
|
} else if (this.endAdornmentNode.contains(event.relatedTarget) && this.props.onBlur) {
|
254
219
|
this.props.onBlur(event);
|
255
220
|
}
|
256
|
-
|
257
221
|
event.preventDefault();
|
258
222
|
event.stopPropagation();
|
259
223
|
} else {
|
260
224
|
this.setState({
|
261
225
|
focused: false
|
262
226
|
});
|
263
|
-
|
264
227
|
if (this.props.onBlur) {
|
265
228
|
this.props.onBlur(event);
|
266
229
|
}
|
@@ -276,9 +239,8 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
276
239
|
this.setState({
|
277
240
|
focused: true
|
278
241
|
});
|
279
|
-
}
|
280
|
-
|
281
|
-
|
242
|
+
}
|
243
|
+
// If focus came from erase icon => stay focused and don't call onFocus props
|
282
244
|
if (this.eraseIconNode && this.eraseIconNode.contains(event.relatedTarget)) {
|
283
245
|
event.preventDefault();
|
284
246
|
event.stopPropagation();
|
@@ -298,7 +260,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
298
260
|
focused: true
|
299
261
|
});
|
300
262
|
}
|
301
|
-
|
302
263
|
this.inputElement.focus();
|
303
264
|
}
|
304
265
|
}
|
@@ -320,7 +281,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
320
281
|
key: "handleOverlayRef",
|
321
282
|
value: function handleOverlayRef(el) {
|
322
283
|
this.overlayNode = el;
|
323
|
-
|
324
284
|
if (this.props.overlayRef) {
|
325
285
|
this.props.overlayRef(el);
|
326
286
|
}
|
@@ -329,30 +289,29 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
329
289
|
key: "render",
|
330
290
|
value: function render() {
|
331
291
|
var _classNames,
|
332
|
-
|
333
|
-
|
334
|
-
|
292
|
+
_this2 = this,
|
293
|
+
_classNames4;
|
335
294
|
var _this$props = this.props,
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
295
|
+
value = _this$props.value,
|
296
|
+
classes = _this$props.classes,
|
297
|
+
placeholder = _this$props.placeholder,
|
298
|
+
startAdornment = _this$props.startAdornment,
|
299
|
+
endAdornmentProps = _this$props.endAdornment,
|
300
|
+
className = _this$props.className,
|
301
|
+
error = _this$props.error,
|
302
|
+
type = _this$props.type,
|
303
|
+
disabled = _this$props.disabled,
|
304
|
+
autoComplete = _this$props.autoComplete,
|
305
|
+
autoFocus = _this$props.autoFocus,
|
306
|
+
inputId = _this$props.inputId,
|
307
|
+
name = _this$props.name,
|
308
|
+
multiline = _this$props.multiline,
|
309
|
+
rows = _this$props.rows,
|
310
|
+
inputClassName = _this$props.inputClassName,
|
311
|
+
onReset = _this$props.onReset,
|
312
|
+
spellcheck = _this$props.spellcheck,
|
313
|
+
startAdornmentColor = _this$props.startAdornmentColor,
|
314
|
+
inputProps = _this$props.inputProps;
|
356
315
|
var focused = this.state.focused;
|
357
316
|
var overlayProps = (0, _objectSpread2.default)({
|
358
317
|
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled && !error), (0, _defineProperty2.default)(_classNames, classes.inkbar, !disabled), (0, _defineProperty2.default)(_classNames, classes.focused, focused), (0, _defineProperty2.default)(_classNames, classes.error, error), _classNames), className)
|
@@ -364,16 +323,13 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
364
323
|
ref: this.handleOverlayRef
|
365
324
|
});
|
366
325
|
var leftIcon;
|
367
|
-
|
368
326
|
if (!!startAdornment) {
|
369
327
|
var _classNames2;
|
370
|
-
|
371
328
|
var leftIconProps = {
|
372
329
|
color: startAdornmentColor,
|
373
330
|
onClick: this.props.onLeftIconClick,
|
374
331
|
className: (0, _classnames.default)(classes.startAdornment, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.startAdornmentDefaultColor, !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.startAdornmentFocus, focused && !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.startAdornmentDisabled, disabled && !startAdornmentColor), (0, _defineProperty2.default)(_classNames2, classes.iconPointer, this.props.onLeftIconClick), _classNames2))
|
375
332
|
};
|
376
|
-
|
377
333
|
if (typeof startAdornment === 'string') {
|
378
334
|
leftIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
379
335
|
icon: startAdornment
|
@@ -385,9 +341,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
385
341
|
className: "".concat(leftIconProps.className, " ").concat(leftIcon.props.className)
|
386
342
|
});
|
387
343
|
}
|
388
|
-
}
|
389
|
-
|
344
|
+
}
|
390
345
|
|
346
|
+
// Build endAdornment with eraseIcon + endAdornmentProps
|
391
347
|
var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && /*#__PURE__*/_react.default.createElement(_HiIconButton.default, {
|
392
348
|
className: classes.eraseButton,
|
393
349
|
classes: {
|
@@ -399,12 +355,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
399
355
|
_this2.eraseIconNode = el;
|
400
356
|
}
|
401
357
|
}, _ref);
|
402
|
-
|
403
358
|
var endAdornment = endAdornmentProps;
|
404
|
-
|
405
359
|
if (typeof endAdornmentProps === 'string' && endAdornmentProps !== '') {
|
406
360
|
var _classNames3;
|
407
|
-
|
408
361
|
endAdornment = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
409
362
|
icon: endAdornmentProps,
|
410
363
|
size: 20,
|
@@ -413,7 +366,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
413
366
|
className: (0, _classnames.default)(classes.rightIcon, (_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, classes.rightIconFocus, focused), (0, _defineProperty2.default)(_classNames3, classes.rightIconDisabled, disabled), (0, _defineProperty2.default)(_classNames3, classes.rightIconError, error), (0, _defineProperty2.default)(_classNames3, classes.iconPointer, this.props.onRightIconClick), _classNames3))
|
414
367
|
});
|
415
368
|
}
|
416
|
-
|
417
369
|
return /*#__PURE__*/_react.default.createElement("div", overlayProps, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
418
370
|
id: inputId,
|
419
371
|
type: type,
|
@@ -455,13 +407,11 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
455
407
|
focused: nextProps.focused
|
456
408
|
};
|
457
409
|
}
|
458
|
-
|
459
410
|
return null;
|
460
411
|
}
|
461
412
|
}]);
|
462
413
|
return HiInput;
|
463
414
|
}(_react.default.PureComponent);
|
464
|
-
|
465
415
|
HiInput.defaultProps = {
|
466
416
|
value: '',
|
467
417
|
placeholder: '',
|
@@ -475,10 +425,8 @@ HiInput.defaultProps = {
|
|
475
425
|
onlyNumbers: false,
|
476
426
|
spellcheck: false
|
477
427
|
};
|
478
|
-
|
479
428
|
var _default = (0, _withStyles.default)(styles, {
|
480
429
|
hiComponent: true,
|
481
430
|
name: 'HiMuiHiInput'
|
482
431
|
})(HiInput);
|
483
|
-
|
484
432
|
exports.default = _default;
|