@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
@@ -1,48 +1,28 @@
|
|
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.filterValue = exports.default = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
-
|
12
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
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 _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
27
|
-
|
28
17
|
var _react = _interopRequireDefault(require("react"));
|
29
|
-
|
30
18
|
var _reactCustomScrollbars = _interopRequireDefault(require("react-custom-scrollbars"));
|
31
|
-
|
32
19
|
var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
|
33
|
-
|
34
20
|
var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
|
35
|
-
|
36
21
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
37
|
-
|
38
22
|
var _helpers = require("../utils/helpers");
|
39
|
-
|
40
23
|
var _keycode = _interopRequireDefault(require("keycode"));
|
41
|
-
|
42
24
|
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); }; }
|
43
|
-
|
44
25
|
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; } }
|
45
|
-
|
46
26
|
var styles = function styles(theme) {
|
47
27
|
return {
|
48
28
|
labelIcon: {
|
@@ -74,12 +54,11 @@ var styles = function styles(theme) {
|
|
74
54
|
})
|
75
55
|
};
|
76
56
|
};
|
77
|
-
|
78
57
|
exports.styles = styles;
|
79
|
-
|
80
58
|
var filterValue = function filterValue(item, searchValue) {
|
81
59
|
return searchValue === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(searchValue.toLowerCase())) !== -1;
|
82
60
|
};
|
61
|
+
|
83
62
|
/**
|
84
63
|
*
|
85
64
|
* Utilisé pour tous types de selects dans les formulaires.
|
@@ -94,25 +73,18 @@ var filterValue = function filterValue(item, searchValue) {
|
|
94
73
|
* - HiSearchField : intègre une barre de recherche dans le Popper, il filtre la liste des suggestions
|
95
74
|
* - HiSelectableList : affiche la liste des suggestions selon le type des éléments
|
96
75
|
*/
|
97
|
-
|
98
|
-
|
99
76
|
exports.filterValue = filterValue;
|
100
|
-
|
101
77
|
var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
102
78
|
(0, _inherits2.default)(HiSelectContent, _React$PureComponent);
|
103
|
-
|
104
79
|
var _super = _createSuper(HiSelectContent);
|
105
|
-
|
106
80
|
function HiSelectContent(props) {
|
107
81
|
var _this;
|
108
|
-
|
109
82
|
(0, _classCallCheck2.default)(this, HiSelectContent);
|
110
83
|
_this = _super.call(this, props);
|
111
|
-
|
84
|
+
// Key down on list items
|
112
85
|
_this.handleKeyDown = function (event) {
|
113
86
|
var nextItem;
|
114
87
|
var key = (0, _keycode.default)(event);
|
115
|
-
|
116
88
|
if (key === 'down') {
|
117
89
|
event.preventDefault();
|
118
90
|
nextItem = (0, _helpers.getNextItemSelectable)(document.activeElement, 'down');
|
@@ -125,47 +97,48 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
125
97
|
});
|
126
98
|
} else if (key === 'space' || key === 'enter' && !_this.props.multiple) {
|
127
99
|
event.preventDefault();
|
128
|
-
|
129
100
|
var item = _this.props.options.find(function (elem) {
|
130
101
|
return String(elem.id) === event.target.id;
|
131
102
|
});
|
132
|
-
|
133
103
|
_this.handleSelect(null, item);
|
134
104
|
} else if (key === 'enter' && _this.props.multiple) {
|
135
105
|
event.preventDefault();
|
136
|
-
|
137
106
|
_this.handleClose();
|
138
107
|
}
|
139
|
-
|
140
108
|
if (nextItem) {
|
141
109
|
nextItem.focus();
|
142
110
|
}
|
143
111
|
};
|
144
|
-
|
112
|
+
// Key down on search input
|
145
113
|
_this.handleKeyDownSearch = function (event) {
|
146
114
|
var key = (0, _keycode.default)(event);
|
147
|
-
|
148
115
|
if (_this.overlay && (key === 'down' || key === 'up')) {
|
149
116
|
_this.focusOnFirstItem();
|
150
117
|
} else if (_this.overlay && (key === 'esc' || key === 'enter')) {
|
151
118
|
event.preventDefault();
|
152
|
-
|
153
119
|
_this.handleClose();
|
154
120
|
}
|
155
121
|
};
|
156
|
-
|
122
|
+
/**
|
123
|
+
* Call onChange with the updated value
|
124
|
+
*
|
125
|
+
* - handle single value
|
126
|
+
* - handle multiple value
|
127
|
+
* - handle '_all' id
|
128
|
+
*
|
129
|
+
* @param event
|
130
|
+
* @param item
|
131
|
+
*/
|
157
132
|
_this.handleSelect = function (event, item) {
|
158
133
|
var _this$props = _this.props,
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
134
|
+
hasAll = _this$props.hasAll,
|
135
|
+
multiple = _this$props.multiple,
|
136
|
+
onChange = _this$props.onChange,
|
137
|
+
options = _this$props.options,
|
138
|
+
value = _this$props.value;
|
165
139
|
if (!multiple) {
|
166
140
|
// single value
|
167
141
|
_this.handleClose();
|
168
|
-
|
169
142
|
onChange(event, item.id, item);
|
170
143
|
} else if (hasAll && item.id === '_all') {
|
171
144
|
if (value.length === options.length) {
|
@@ -186,17 +159,20 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
186
159
|
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
187
160
|
}
|
188
161
|
};
|
189
|
-
|
190
162
|
_this.handleClose = function () {
|
191
163
|
if (_this.props.onClose) _this.props.onClose();
|
192
164
|
};
|
193
|
-
|
165
|
+
/**
|
166
|
+
* Update suggestions list
|
167
|
+
* - add '_no_result' item if suggestion list is empty
|
168
|
+
* - add '_all' item if suggestion list is complete
|
169
|
+
* @param suggestions
|
170
|
+
*/
|
194
171
|
_this.handleSuggestions = function (suggestions) {
|
195
172
|
var _this$props2 = _this.props,
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
173
|
+
hasAll = _this$props2.hasAll,
|
174
|
+
iconAll = _this$props2.iconAll,
|
175
|
+
translations = _this$props2.translations;
|
200
176
|
if (suggestions.length === 0) {
|
201
177
|
// Add '_no_result' suggestion
|
202
178
|
_this.setState(function (prevState) {
|
@@ -223,16 +199,17 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
223
199
|
});
|
224
200
|
}
|
225
201
|
};
|
226
|
-
|
202
|
+
/**
|
203
|
+
* Call onScrollReachBottom
|
204
|
+
* @param e
|
205
|
+
*/
|
227
206
|
_this.handleScroll = function (e) {
|
228
207
|
if (e.target.scrollHeight - e.target.clientHeight - e.target.scrollTop < 15) {
|
229
208
|
_this.props.onScrollReachBottom();
|
230
209
|
}
|
231
210
|
};
|
232
|
-
|
233
211
|
_this.handleSearch = function (e, inputValue) {
|
234
212
|
var searchValue = inputValue && e.target.value ? inputValue : e.target.value;
|
235
|
-
|
236
213
|
if (_this.props.onSearch) {
|
237
214
|
_this.props.onSearch(e, searchValue);
|
238
215
|
} else {
|
@@ -241,7 +218,6 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
241
218
|
});
|
242
219
|
}
|
243
220
|
};
|
244
|
-
|
245
221
|
_this.handleSearchReset = function () {
|
246
222
|
_this.handleSearch({
|
247
223
|
target: {
|
@@ -249,7 +225,15 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
249
225
|
}
|
250
226
|
}, '');
|
251
227
|
};
|
252
|
-
|
228
|
+
/**
|
229
|
+
* Build itemList & inputValue from select props
|
230
|
+
* @param options
|
231
|
+
* @param value
|
232
|
+
* @param search
|
233
|
+
* @param loading
|
234
|
+
* @returns {{itemList: *[], inputValue: *}}
|
235
|
+
*/
|
236
|
+
// eslint-disable-next-line no-unused-vars
|
253
237
|
_this.buildSelectProps = function (options) {
|
254
238
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
255
239
|
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
@@ -275,15 +259,12 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
275
259
|
itemList: itemList
|
276
260
|
};
|
277
261
|
};
|
278
|
-
|
279
262
|
_this.getInputElement = function (el) {
|
280
263
|
_this.searchField = el;
|
281
|
-
|
282
264
|
if (_this.props.inputRef) {
|
283
265
|
_this.props.inputRef(_this.searchField);
|
284
266
|
}
|
285
267
|
};
|
286
|
-
|
287
268
|
_this.state = {
|
288
269
|
open: false,
|
289
270
|
focused: false,
|
@@ -296,45 +277,38 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
296
277
|
_this.handleSuggestions = _this.handleSuggestions.bind((0, _assertThisInitialized2.default)(_this));
|
297
278
|
return _this;
|
298
279
|
}
|
299
|
-
|
300
280
|
(0, _createClass2.default)(HiSelectContent, [{
|
301
281
|
key: "render",
|
302
282
|
value: function render() {
|
303
283
|
var _this2 = this;
|
304
|
-
|
305
284
|
var _this$props3 = this.props,
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
285
|
+
loading = _this$props3.loading,
|
286
|
+
options = _this$props3.options,
|
287
|
+
searchable = _this$props3.searchable,
|
288
|
+
type = _this$props3.type,
|
289
|
+
value = _this$props3.value,
|
290
|
+
multiple = _this$props3.multiple,
|
291
|
+
translations = _this$props3.translations,
|
292
|
+
hiSelectableListProps = _this$props3.hiSelectableListProps,
|
293
|
+
onScrollReachBottom = _this$props3.onScrollReachBottom,
|
294
|
+
startAdornment = _this$props3.startAdornment,
|
295
|
+
_this$props3$searchVa = _this$props3.searchValue,
|
296
|
+
searchValue = _this$props3$searchVa === void 0 ? this.state.searchValue : _this$props3$searchVa,
|
297
|
+
_this$props3$buildSel = _this$props3.buildSelectProps,
|
298
|
+
buildSelectProps = _this$props3$buildSel === void 0 ? this.buildSelectProps : _this$props3$buildSel,
|
299
|
+
autoHeight = _this$props3.autoHeight,
|
300
|
+
height = _this$props3.height;
|
323
301
|
if (multiple) {
|
324
302
|
if (!Array.isArray(value)) {
|
325
303
|
throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
|
326
304
|
}
|
327
305
|
}
|
328
|
-
|
329
306
|
var selectedItemIdList = [];
|
330
|
-
|
331
307
|
if (value) {
|
332
308
|
selectedItemIdList = multiple ? (0, _toConsumableArray2.default)(value) : [value];
|
333
309
|
}
|
334
|
-
|
335
310
|
var _buildSelectProps = buildSelectProps(options, selectedItemIdList, searchValue, loading),
|
336
|
-
|
337
|
-
|
311
|
+
itemList = _buildSelectProps.itemList;
|
338
312
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !!searchable && /*#__PURE__*/_react.default.createElement(_HiInput.default, {
|
339
313
|
value: searchValue,
|
340
314
|
autoFocus: true,
|
@@ -358,7 +332,6 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
358
332
|
}, {
|
359
333
|
autoHeight: true,
|
360
334
|
autoHeightMax: height // TODO ?
|
361
|
-
|
362
335
|
}, onScrollReachBottom && {
|
363
336
|
onScroll: this.handleScroll
|
364
337
|
}), /*#__PURE__*/_react.default.createElement(_HiSelectableList.default, (0, _extends2.default)({
|
@@ -378,14 +351,11 @@ var HiSelectContent = /*#__PURE__*/function (_React$PureComponent) {
|
|
378
351
|
suggestions: nextProps.options
|
379
352
|
});
|
380
353
|
}
|
381
|
-
|
382
354
|
return null;
|
383
|
-
}
|
384
|
-
|
355
|
+
}
|
385
356
|
}]);
|
386
357
|
return HiSelectContent;
|
387
358
|
}(_react.default.PureComponent);
|
388
|
-
|
389
359
|
HiSelectContent.defaultProps = {
|
390
360
|
autoHeight: true,
|
391
361
|
height: 400,
|
@@ -408,10 +378,8 @@ HiSelectContent.defaultProps = {
|
|
408
378
|
type: 'text',
|
409
379
|
filterFunc: filterValue
|
410
380
|
};
|
411
|
-
|
412
381
|
var _default = (0, _withStyles.default)(styles, {
|
413
382
|
hiComponent: true,
|
414
383
|
name: 'HmuiHiSelectContent'
|
415
384
|
})(HiSelectContent);
|
416
|
-
|
417
385
|
exports.default = _default;
|
@@ -1,86 +1,66 @@
|
|
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 _react = _interopRequireDefault(require("react"));
|
25
|
-
|
26
16
|
var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
|
27
|
-
|
28
17
|
var _HiSelect = _interopRequireDefault(require("./HiSelect"));
|
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 HiSelect
|
38
22
|
var styles = {
|
39
23
|
root: {
|
40
24
|
maxWidth: 500
|
41
25
|
}
|
42
26
|
};
|
27
|
+
|
43
28
|
/**
|
44
29
|
* Champs input pour formulaire
|
45
30
|
*/
|
46
|
-
|
47
31
|
exports.styles = styles;
|
48
|
-
|
49
32
|
var HiSelectField = /*#__PURE__*/function (_React$PureComponent) {
|
50
33
|
(0, _inherits2.default)(HiSelectField, _React$PureComponent);
|
51
|
-
|
52
34
|
var _super = _createSuper(HiSelectField);
|
53
|
-
|
54
35
|
function HiSelectField() {
|
55
36
|
(0, _classCallCheck2.default)(this, HiSelectField);
|
56
37
|
return _super.apply(this, arguments);
|
57
38
|
}
|
58
|
-
|
59
39
|
(0, _createClass2.default)(HiSelectField, [{
|
60
40
|
key: "render",
|
61
41
|
value: function render() {
|
62
42
|
var _this$props = this.props,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
43
|
+
label = _this$props.label,
|
44
|
+
required = _this$props.required,
|
45
|
+
disabled = _this$props.disabled,
|
46
|
+
error = _this$props.error,
|
47
|
+
errorText = _this$props.errorText,
|
48
|
+
helperText = _this$props.helperText,
|
49
|
+
helperIcon = _this$props.helperIcon,
|
50
|
+
id = _this$props.id,
|
51
|
+
name = _this$props.name,
|
52
|
+
value = _this$props.value,
|
53
|
+
options = _this$props.options,
|
54
|
+
type = _this$props.type,
|
55
|
+
multiple = _this$props.multiple,
|
56
|
+
iconAll = _this$props.iconAll,
|
57
|
+
checkbox = _this$props.checkbox,
|
58
|
+
searchable = _this$props.searchable,
|
59
|
+
translations = _this$props.translations,
|
60
|
+
className = _this$props.className,
|
61
|
+
classes = _this$props.classes,
|
62
|
+
HiInputLabelProps = _this$props.HiInputLabelProps,
|
63
|
+
others = (0, _objectWithoutProperties2.default)(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className", "classes", "HiInputLabelProps"]);
|
84
64
|
return /*#__PURE__*/_react.default.createElement(_HiFormControl.default, {
|
85
65
|
id: id,
|
86
66
|
label: label,
|
@@ -110,7 +90,5 @@ var HiSelectField = /*#__PURE__*/function (_React$PureComponent) {
|
|
110
90
|
}]);
|
111
91
|
return HiSelectField;
|
112
92
|
}(_react.default.PureComponent);
|
113
|
-
|
114
93
|
var _default = (0, _withStyles.default)(styles)(HiSelectField);
|
115
|
-
|
116
94
|
exports.default = _default;
|
@@ -1,48 +1,28 @@
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
13
|
-
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
15
|
-
|
16
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
17
|
-
|
18
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
-
|
20
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
-
|
22
14
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
23
|
-
|
24
15
|
var _react = _interopRequireDefault(require("react"));
|
25
|
-
|
26
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
27
|
-
|
28
17
|
var _ArrowDropDown = _interopRequireDefault(require("@mui/icons-material/ArrowDropDown"));
|
29
|
-
|
30
18
|
var _ButtonBase = _interopRequireDefault(require("@mui/material/ButtonBase"));
|
31
|
-
|
32
19
|
var _Icon = _interopRequireDefault(require("@mui/material/Icon"));
|
33
|
-
|
34
20
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
35
|
-
|
36
21
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
37
|
-
|
38
22
|
var _keycode = _interopRequireDefault(require("keycode"));
|
39
|
-
|
40
23
|
var _reactDeviceDetect = require("react-device-detect");
|
41
|
-
|
42
24
|
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); }; }
|
43
|
-
|
44
25
|
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; } }
|
45
|
-
|
46
26
|
var styles = function styles(theme) {
|
47
27
|
return {
|
48
28
|
root: {
|
@@ -71,8 +51,8 @@ var styles = function styles(theme) {
|
|
71
51
|
easing: theme.transitions.easing.ease
|
72
52
|
}),
|
73
53
|
pointerEvents: 'none' // Transparent to the hover style.
|
74
|
-
|
75
54
|
},
|
55
|
+
|
76
56
|
'&:hover:not($disabled):before': {
|
77
57
|
backgroundColor: theme.palette.input.bottomLine,
|
78
58
|
height: 2
|
@@ -102,8 +82,8 @@ var styles = function styles(theme) {
|
|
102
82
|
easing: theme.transitions.easing.easeOut
|
103
83
|
}),
|
104
84
|
pointerEvents: 'none' // Transparent to the hover style.
|
105
|
-
|
106
85
|
},
|
86
|
+
|
107
87
|
'&:hover:after': {
|
108
88
|
transform: 'scaleX(1)'
|
109
89
|
},
|
@@ -111,7 +91,7 @@ var styles = function styles(theme) {
|
|
111
91
|
transform: 'scaleX(1)'
|
112
92
|
},
|
113
93
|
'&$error': {
|
114
|
-
border: "1px solid ".concat(theme.palette.
|
94
|
+
border: "1px solid ".concat(theme.palette.error.main),
|
115
95
|
borderRadius: 2
|
116
96
|
}
|
117
97
|
}
|
@@ -151,54 +131,39 @@ var styles = function styles(theme) {
|
|
151
131
|
}
|
152
132
|
};
|
153
133
|
};
|
134
|
+
|
154
135
|
/**
|
155
136
|
* @ignore - internal component.
|
156
137
|
*/
|
157
|
-
|
158
|
-
|
159
138
|
exports.styles = styles;
|
160
|
-
|
161
139
|
var _ref = /*#__PURE__*/_react.default.createElement(_ArrowDropDown.default, null);
|
162
|
-
|
163
140
|
var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
164
141
|
(0, _inherits2.default)(HiSelectInput, _React$PureComponent);
|
165
|
-
|
166
142
|
var _super = _createSuper(HiSelectInput);
|
167
|
-
|
168
143
|
function HiSelectInput() {
|
169
144
|
var _this;
|
170
|
-
|
171
145
|
(0, _classCallCheck2.default)(this, HiSelectInput);
|
172
|
-
|
173
146
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
174
147
|
args[_key] = arguments[_key];
|
175
148
|
}
|
176
|
-
|
177
149
|
_this = _super.call.apply(_super, [this].concat(args));
|
178
|
-
|
179
150
|
_this.handleKeyDown = function (event) {
|
180
151
|
var key = (0, _keycode.default)(event);
|
181
|
-
|
182
152
|
if (_this.props.onKeyDown) {
|
183
153
|
_this.props.onKeyDown(event);
|
184
154
|
} else if (key === 'enter' && _this.props.onSubmit) {
|
185
155
|
event.preventDefault();
|
186
|
-
|
187
156
|
_this.props.onSubmit(event);
|
188
157
|
}
|
189
158
|
};
|
190
|
-
|
191
159
|
_this.handleKeyDownReset = function (event) {
|
192
160
|
var key = (0, _keycode.default)(event);
|
193
|
-
|
194
161
|
if (key === 'enter' || key === 'space') {
|
195
162
|
_this.handleReset(event);
|
196
|
-
|
197
163
|
event.stopPropagation();
|
198
164
|
event.preventDefault();
|
199
165
|
}
|
200
166
|
};
|
201
|
-
|
202
167
|
_this.handleClick = function (event) {
|
203
168
|
// Do not open select if press on resetIcon
|
204
169
|
if ((!_this.resetIcon || !_this.resetIcon.contains(event.target)) && _this.props.onClick) {
|
@@ -208,56 +173,45 @@ var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
208
173
|
}
|
209
174
|
}
|
210
175
|
};
|
211
|
-
|
212
176
|
_this.handleReset = function (event) {
|
213
177
|
_this.props.onReset(event);
|
214
|
-
|
215
178
|
if (_this.input) {
|
216
179
|
_this.input.focus();
|
217
180
|
}
|
218
181
|
};
|
219
|
-
|
220
182
|
_this.handleBlur = function (event) {
|
221
183
|
if ((!_this.input || !_this.input.contains(event.relatedTarget)) && _this.props.onBlur) {
|
222
184
|
_this.props.onBlur(event);
|
223
|
-
}
|
224
|
-
|
225
|
-
|
226
|
-
}*/
|
227
|
-
|
185
|
+
} /* else if (this.input && (!this.resetIcon || !this.resetIcon.contains(event.relatedTarget))) {
|
186
|
+
this.input.focus();
|
187
|
+
}*/
|
228
188
|
};
|
229
|
-
|
230
189
|
_this.ref = function (el) {
|
231
190
|
_this.input = el;
|
232
|
-
|
233
191
|
if (_this.props.refElement) {
|
234
192
|
_this.props.refElement(el);
|
235
193
|
}
|
236
194
|
};
|
237
|
-
|
238
195
|
return _this;
|
239
196
|
}
|
240
|
-
|
241
197
|
(0, _createClass2.default)(HiSelectInput, [{
|
242
198
|
key: "render",
|
243
199
|
value: function render() {
|
244
200
|
var _classNames,
|
245
|
-
|
246
|
-
|
247
|
-
|
201
|
+
_classNames2,
|
202
|
+
_this2 = this;
|
248
203
|
var _this$props = this.props,
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
204
|
+
classes = _this$props.classes,
|
205
|
+
noButton = _this$props.noButton,
|
206
|
+
disabled = _this$props.disabled,
|
207
|
+
onClick = _this$props.onClick,
|
208
|
+
onReset = _this$props.onReset,
|
209
|
+
value = _this$props.value,
|
210
|
+
open = _this$props.open,
|
211
|
+
focused = _this$props.focused,
|
212
|
+
error = _this$props.error,
|
213
|
+
id = _this$props.id,
|
214
|
+
placeholder = _this$props.placeholder; // On utilise classNames pour variabiliser les styles et merge les classes appliquées
|
261
215
|
var rootClass = (0, _classnames.default)(classes.root, classes.inkbar, classes.underline, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.focused, focused), (0, _defineProperty2.default)(_classNames, classes.error, error && !focused), (0, _defineProperty2.default)(_classNames, classes.rootMobile, _reactDeviceDetect.isMobile), _classNames));
|
262
216
|
var iconClass = (0, _classnames.default)(classes.icon, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.iconOpen, open), (0, _defineProperty2.default)(_classNames2, classes.iconClose, !open), _classNames2));
|
263
217
|
return noButton ? /*#__PURE__*/_react.default.createElement("div", {
|
@@ -310,7 +264,6 @@ var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
310
264
|
}]);
|
311
265
|
return HiSelectInput;
|
312
266
|
}(_react.default.PureComponent);
|
313
|
-
|
314
267
|
HiSelectInput.defaultProps = {
|
315
268
|
disabled: false,
|
316
269
|
open: false,
|
@@ -318,10 +271,8 @@ HiSelectInput.defaultProps = {
|
|
318
271
|
noButton: false,
|
319
272
|
error: false
|
320
273
|
};
|
321
|
-
|
322
274
|
var _default = (0, _withStyles.default)(styles, {
|
323
275
|
hiComponent: true,
|
324
276
|
name: 'HmuiHiSelectInput'
|
325
277
|
})(HiSelectInput);
|
326
|
-
|
327
278
|
exports.default = _default;
|