@hipay/hipay-material-ui 4.0.1-beta5 → 4.1.1-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAccordion/HiAccordion.js +8 -26
- package/HiAccordion/index.js +1 -5
- package/HiAccordionActions/HiAccordionActions.js +1 -14
- package/HiAccordionActions/index.js +1 -5
- package/HiAccordionSummary/HiAccordionSummary.js +1 -15
- package/HiAccordionSummary/index.js +1 -5
- package/HiAlertModal/HiAlertModal.js +7 -22
- package/HiAlertModal/index.js +1 -5
- package/HiAppBar/HiAppBar.js +17 -51
- package/HiAppBar/index.js +0 -2
- package/HiAvatar/HiAvatar.js +3 -12
- package/HiAvatar/index.js +0 -2
- package/HiBadge/HiBadge.js +8 -24
- package/HiBadge/index.js +0 -2
- package/HiBreadcrumb/HiBreadcrumb.js +12 -38
- package/HiBreadcrumb/HiStep.js +19 -53
- package/HiBreadcrumb/HiStepConnector.js +20 -59
- package/HiBreadcrumb/HiStepContent.js +12 -38
- package/HiBreadcrumb/HiStepIcon.js +16 -43
- package/HiBreadcrumb/HiStepLabel.js +20 -52
- package/HiBreadcrumb/HiStepper.js +12 -38
- package/HiBreadcrumb/index.js +0 -2
- package/HiButton/HiButton.js +8 -33
- package/HiButton/index.js +1 -5
- package/HiCell/CellAddress.js +18 -41
- package/HiCell/CellDate.js +16 -44
- package/HiCell/CellHiddenContent.js +8 -30
- package/HiCell/CellIcon.js +18 -44
- package/HiCell/CellImage.js +18 -42
- package/HiCell/CellNumeric.js +19 -48
- package/HiCell/CellPinToAction.js +15 -41
- package/HiCell/CellRate.js +19 -55
- package/HiCell/CellSentinel.js +18 -41
- package/HiCell/CellSentinelScore.js +15 -39
- package/HiCell/CellText.js +23 -62
- package/HiCell/CellTextStyled.js +13 -24
- package/HiCell/index.js +0 -10
- package/HiCheckbox/HiCheckbox.js +21 -61
- package/HiCheckbox/index.js +0 -2
- package/HiChip/HiChip.js +24 -47
- package/HiChip/HiChipSwitch.js +25 -71
- package/HiChip/index.js +0 -3
- package/HiColoredLabel/HiColoredLabel.js +15 -49
- package/HiColoredLabel/index.js +0 -2
- package/HiDatePicker/Caption.js +9 -21
- package/HiDatePicker/HiDatePicker.js +22 -96
- package/HiDatePicker/HiDatePickerMobile.js +24 -51
- package/HiDatePicker/HiDateRangePicker.js +44 -142
- package/HiDatePicker/HiDateRangeSelector.js +55 -138
- package/HiDatePicker/ListPicker.js +14 -46
- package/HiDatePicker/NavBar.js +12 -31
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +11 -36
- package/HiDatePicker/Overlays/Overlay.js +8 -25
- package/HiDatePicker/Overlays/TimePickerOverlay.js +16 -50
- package/HiDatePicker/Overlays/YearPickerOverlay.js +15 -42
- package/HiDatePicker/Overlays/index.js +0 -6
- package/HiDatePicker/Weekday.js +4 -9
- package/HiDatePicker/hiLocaleUtils.js +8 -20
- package/HiDatePicker/index.js +0 -2
- package/HiDatePicker/stylesheet.js +6 -13
- package/HiDialog/HiDialog.js +7 -19
- package/HiDialog/index.js +0 -2
- package/HiDotsStepper/HiDot.js +14 -45
- package/HiDotsStepper/HiDotsStepper.js +18 -48
- package/HiDotsStepper/index.js +0 -3
- package/HiExpansionPanel/HiExpansionPanel.js +16 -38
- package/HiExpansionPanel/index.js +1 -5
- package/HiForm/HiAddressField.js +20 -49
- package/HiForm/HiEmailField.js +11 -38
- package/HiForm/HiFormControl.js +37 -86
- package/HiForm/HiFormLabel.js +20 -48
- package/HiForm/HiInput.js +47 -109
- package/HiForm/HiPasswordField.js +18 -57
- package/HiForm/HiSearchField.js +12 -46
- package/HiForm/HiSlider.js +28 -65
- package/HiForm/HiTextField.js +30 -58
- package/HiForm/HiUpload.js +36 -98
- package/HiForm/HiUploadField.js +16 -40
- package/HiForm/HiUploadInput.js +27 -84
- package/HiForm/index.js +0 -12
- package/HiIcon/HiIcon.js +9 -34
- package/HiIcon/index.js +0 -2
- package/HiIconButton/HiIconButton.js +6 -21
- package/HiIconButton/index.js +0 -2
- package/HiListItemLink/HiListItemLink.js +6 -19
- package/HiListItemLink/index.js +0 -2
- package/HiLoader/HiLoader.js +6 -16
- package/HiLoader/index.js +0 -2
- package/HiNotice/HiKPI.js +23 -57
- package/HiNotice/HiKPINotice.js +6 -16
- package/HiNotice/index.js +0 -3
- package/HiPagination/HiPagination.js +1 -11
- package/HiPagination/index.js +0 -2
- package/HiPaymentMeans/HiPaymentMeans.js +31 -72
- package/HiPaymentMeans/index.js +0 -2
- package/HiPdfReader/HiPdfReader.js +29 -64
- package/HiPdfReader/index.js +0 -2
- package/HiPin/HiPin.js +7 -19
- package/HiPin/index.js +0 -2
- package/HiRadio/HiRadio.js +11 -22
- package/HiRadio/index.js +0 -2
- package/HiScrollStepper/HiScrollStepper.js +29 -67
- package/HiScrollStepper/index.js +0 -2
- package/HiSelect/HiDynamicSelect.js +39 -52
- package/HiSelect/HiDynamicSelectField.js +29 -55
- package/HiSelect/HiNestedSelect.js +71 -120
- package/HiSelect/HiNestedSelectContent.js +65 -93
- package/HiSelect/HiNestedSelectField.js +29 -55
- package/HiSelect/HiSelect.js +95 -195
- package/HiSelect/HiSelectContent.js +72 -110
- package/HiSelect/HiSelectField.js +30 -56
- package/HiSelect/HiSelectInput.js +27 -84
- package/HiSelect/HiSelectMobile.js +14 -53
- package/HiSelect/HiSuggestSelect.js +30 -88
- package/HiSelect/HiSuggestSelectField.js +20 -46
- package/HiSelect/index.js +2 -14
- package/HiSelectableList/HiSelectableList.js +42 -98
- package/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- package/HiSelectableList/HiSelectableListItem.js +47 -89
- package/HiSelectableList/index.js +0 -4
- package/HiStepper/DefaultIndicator.js +1 -10
- package/HiStepper/HiStep.js +18 -48
- package/HiStepper/HiStepper.js +2 -15
- package/HiStepper/index.js +0 -3
- package/HiSwitch/HiSwitch.js +9 -33
- package/HiSwitch/HiSwitchState.js +15 -32
- package/HiSwitch/index.js +0 -3
- package/HiTable/HiCellBuilder.js +15 -72
- package/HiTable/HiTable.js +20 -48
- package/HiTable/HiTableBody.js +12 -31
- package/HiTable/HiTableHeader.js +23 -58
- package/HiTable/HiTableRow.js +18 -55
- package/HiTable/constants.js +48 -98
- package/HiTable/index.js +0 -2
- package/es/HiAccordion/HiAccordion.js +8 -26
- package/es/HiAccordion/index.js +1 -5
- package/es/HiAccordionActions/HiAccordionActions.js +1 -14
- package/es/HiAccordionActions/index.js +1 -5
- package/es/HiAccordionSummary/HiAccordionSummary.js +1 -15
- package/es/HiAccordionSummary/index.js +1 -5
- package/es/HiAlertModal/HiAlertModal.js +7 -22
- package/es/HiAlertModal/index.js +1 -5
- package/es/HiAppBar/HiAppBar.js +17 -51
- package/es/HiAppBar/index.js +0 -2
- package/es/HiAvatar/HiAvatar.js +3 -12
- package/es/HiAvatar/index.js +0 -2
- package/es/HiBadge/HiBadge.js +8 -24
- package/es/HiBadge/index.js +0 -2
- package/es/HiBreadcrumb/HiBreadcrumb.js +12 -38
- package/es/HiBreadcrumb/HiStep.js +19 -53
- package/es/HiBreadcrumb/HiStepConnector.js +20 -59
- package/es/HiBreadcrumb/HiStepContent.js +12 -38
- package/es/HiBreadcrumb/HiStepIcon.js +16 -43
- package/es/HiBreadcrumb/HiStepLabel.js +20 -52
- package/es/HiBreadcrumb/HiStepper.js +12 -38
- package/es/HiBreadcrumb/index.js +0 -2
- package/es/HiButton/HiButton.js +8 -33
- package/es/HiButton/index.js +1 -5
- package/es/HiCell/CellAddress.js +18 -41
- package/es/HiCell/CellDate.js +16 -44
- package/es/HiCell/CellHiddenContent.js +8 -30
- package/es/HiCell/CellIcon.js +18 -44
- package/es/HiCell/CellImage.js +18 -42
- package/es/HiCell/CellNumeric.js +19 -48
- package/es/HiCell/CellPinToAction.js +15 -41
- package/es/HiCell/CellRate.js +19 -55
- package/es/HiCell/CellSentinel.js +18 -41
- package/es/HiCell/CellSentinelScore.js +15 -39
- package/es/HiCell/CellText.js +23 -62
- package/es/HiCell/CellTextStyled.js +13 -24
- package/es/HiCell/index.js +0 -10
- package/es/HiCheckbox/HiCheckbox.js +21 -61
- package/es/HiCheckbox/index.js +0 -2
- package/es/HiChip/HiChip.js +24 -47
- package/es/HiChip/HiChipSwitch.js +25 -71
- package/es/HiChip/index.js +0 -3
- package/es/HiColoredLabel/HiColoredLabel.js +15 -49
- package/es/HiColoredLabel/index.js +0 -2
- package/es/HiDatePicker/Caption.js +9 -21
- package/es/HiDatePicker/HiDatePicker.js +22 -96
- package/es/HiDatePicker/HiDatePickerMobile.js +24 -51
- package/es/HiDatePicker/HiDateRangePicker.js +44 -142
- package/es/HiDatePicker/HiDateRangeSelector.js +55 -138
- package/es/HiDatePicker/ListPicker.js +14 -46
- package/es/HiDatePicker/NavBar.js +12 -31
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +11 -36
- package/es/HiDatePicker/Overlays/Overlay.js +8 -25
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +16 -50
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +15 -42
- package/es/HiDatePicker/Overlays/index.js +0 -6
- package/es/HiDatePicker/Weekday.js +4 -9
- package/es/HiDatePicker/hiLocaleUtils.js +8 -20
- package/es/HiDatePicker/index.js +0 -2
- package/es/HiDatePicker/stylesheet.js +6 -13
- package/es/HiDialog/HiDialog.js +7 -19
- package/es/HiDialog/index.js +0 -2
- package/es/HiDotsStepper/HiDot.js +14 -45
- package/es/HiDotsStepper/HiDotsStepper.js +18 -48
- package/es/HiDotsStepper/index.js +0 -3
- package/es/HiExpansionPanel/HiExpansionPanel.js +16 -38
- package/es/HiExpansionPanel/index.js +1 -5
- package/es/HiForm/HiAddressField.js +20 -49
- package/es/HiForm/HiEmailField.js +11 -38
- package/es/HiForm/HiFormControl.js +37 -86
- package/es/HiForm/HiFormLabel.js +20 -48
- package/es/HiForm/HiInput.js +47 -109
- package/es/HiForm/HiPasswordField.js +18 -57
- package/es/HiForm/HiSearchField.js +12 -46
- package/es/HiForm/HiSlider.js +28 -65
- package/es/HiForm/HiTextField.js +30 -58
- package/es/HiForm/HiUpload.js +36 -98
- package/es/HiForm/HiUploadField.js +16 -40
- package/es/HiForm/HiUploadInput.js +27 -84
- package/es/HiForm/index.js +0 -12
- package/es/HiIcon/HiIcon.js +9 -34
- package/es/HiIcon/index.js +0 -2
- package/es/HiIconButton/HiIconButton.js +6 -21
- package/es/HiIconButton/index.js +0 -2
- package/es/HiListItemLink/HiListItemLink.js +6 -19
- package/es/HiListItemLink/index.js +0 -2
- package/es/HiLoader/HiLoader.js +6 -16
- package/es/HiLoader/index.js +0 -2
- package/es/HiNotice/HiKPI.js +23 -57
- package/es/HiNotice/HiKPINotice.js +6 -16
- package/es/HiNotice/index.js +0 -3
- package/es/HiPagination/HiPagination.js +1 -11
- package/es/HiPagination/index.js +0 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +31 -72
- package/es/HiPaymentMeans/index.js +0 -2
- package/es/HiPdfReader/HiPdfReader.js +29 -64
- package/es/HiPdfReader/index.js +0 -2
- package/es/HiPin/HiPin.js +7 -19
- package/es/HiPin/index.js +0 -2
- package/es/HiRadio/HiRadio.js +11 -22
- package/es/HiRadio/index.js +0 -2
- package/es/HiScrollStepper/HiScrollStepper.js +29 -67
- package/es/HiScrollStepper/index.js +0 -2
- package/es/HiSelect/HiDynamicSelect.js +39 -52
- package/es/HiSelect/HiDynamicSelectField.js +29 -55
- package/es/HiSelect/HiNestedSelect.js +71 -120
- package/es/HiSelect/HiNestedSelectContent.js +65 -93
- package/es/HiSelect/HiNestedSelectField.js +29 -55
- package/es/HiSelect/HiSelect.js +95 -195
- package/es/HiSelect/HiSelectContent.js +72 -110
- package/es/HiSelect/HiSelectField.js +30 -56
- package/es/HiSelect/HiSelectInput.js +27 -84
- package/es/HiSelect/HiSelectMobile.js +14 -53
- package/es/HiSelect/HiSuggestSelect.js +30 -88
- package/es/HiSelect/HiSuggestSelectField.js +20 -46
- package/es/HiSelect/index.js +2 -14
- package/es/HiSelectableList/HiSelectableList.js +42 -98
- package/es/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- package/es/HiSelectableList/HiSelectableListItem.js +47 -89
- package/es/HiSelectableList/index.js +0 -4
- package/es/HiStepper/DefaultIndicator.js +1 -10
- package/es/HiStepper/HiStep.js +18 -48
- package/es/HiStepper/HiStepper.js +2 -15
- package/es/HiStepper/index.js +0 -3
- package/es/HiSwitch/HiSwitch.js +9 -33
- package/es/HiSwitch/HiSwitchState.js +15 -32
- package/es/HiSwitch/index.js +0 -3
- package/es/HiTable/HiCellBuilder.js +15 -72
- package/es/HiTable/HiTable.js +20 -48
- package/es/HiTable/HiTableBody.js +12 -31
- package/es/HiTable/HiTableHeader.js +23 -58
- package/es/HiTable/HiTableRow.js +18 -55
- package/es/HiTable/constants.js +48 -98
- package/es/HiTable/index.js +0 -2
- package/es/hi-svg-icons/HiAccount.js +4 -14
- package/es/hi-svg-icons/HiActivity.js +4 -14
- package/es/hi-svg-icons/HiAll.js +7 -18
- package/es/hi-svg-icons/HiBilling.js +4 -14
- package/es/hi-svg-icons/HiBriefcaseRescue.js +4 -14
- package/es/hi-svg-icons/HiBusiness.js +4 -14
- package/es/hi-svg-icons/HiCatalog.js +4 -14
- package/es/hi-svg-icons/HiCustomer.js +4 -14
- package/es/hi-svg-icons/HiDownload.js +4 -14
- package/es/hi-svg-icons/HiFinance.js +4 -14
- package/es/hi-svg-icons/HiFinanceMenu.js +4 -14
- package/es/hi-svg-icons/HiHostedPaymentPage.js +4 -14
- package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
- package/es/hi-svg-icons/HiIntegration.js +4 -14
- package/es/hi-svg-icons/HiIntegrationMenu.js +4 -14
- package/es/hi-svg-icons/HiIntelligence.js +4 -14
- package/es/hi-svg-icons/HiIntelligenceMenu.js +4 -14
- package/es/hi-svg-icons/HiInvoice.js +4 -14
- package/es/hi-svg-icons/HiInvoiceMenu.js +4 -14
- package/es/hi-svg-icons/HiLogoRounded.js +6 -17
- package/es/hi-svg-icons/HiOrder.js +4 -14
- package/es/hi-svg-icons/HiPaymentOrder.js +4 -14
- package/es/hi-svg-icons/HiPermission.js +4 -14
- package/es/hi-svg-icons/HiPriceGrid.js +4 -14
- package/es/hi-svg-icons/HiPrivate.js +4 -14
- package/es/hi-svg-icons/HiRoute.js +4 -14
- package/es/hi-svg-icons/HiRouteMenu.js +4 -14
- package/es/hi-svg-icons/HiRouteSwitch.js +7 -19
- package/es/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
- package/es/hi-svg-icons/HiSettlement.js +4 -14
- package/es/hi-svg-icons/HiSizeLarge.js +4 -14
- package/es/hi-svg-icons/HiSizeMedium.js +4 -14
- package/es/hi-svg-icons/HiSizeSmall.js +4 -14
- package/es/hi-svg-icons/HiStore.js +4 -14
- package/es/hi-svg-icons/HiStoreMenu.js +4 -14
- package/es/hi-svg-icons/HiTransaction.js +4 -14
- package/es/hi-svg-icons/HiTransactionMenu.js +4 -14
- package/es/hi-svg-icons/HiUser.js +4 -14
- package/es/hi-svg-icons/HiVendor.js +4 -14
- package/es/hi-svg-icons/HiWidget.js +4 -14
- package/es/hi-svg-icons/index.js +0 -41
- package/es/hi-svg-images/HiLogo.js +4 -12
- package/es/hi-svg-images/HiLogoWhite.js +4 -12
- 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 +20 -56
- package/es/styles/colorManipulator.js +15 -50
- package/es/styles/createBreakpoints.js +14 -29
- package/es/styles/createGenerateClassName.js +14 -24
- package/es/styles/createMixins.js +4 -10
- package/es/styles/createMuiTheme.js +11 -28
- package/es/styles/createPalette.js +66 -89
- package/es/styles/createStyles.js +0 -1
- package/es/styles/createTypography.js +15 -24
- package/es/styles/getStylesCreator.js +2 -14
- package/es/styles/getThemeProps.js +2 -7
- package/es/styles/index.js +0 -6
- package/es/styles/jssPreset.js +1 -11
- package/es/styles/makeStyles.js +2 -9
- package/es/styles/mergeClasses.js +5 -16
- package/es/styles/shadows.js +1 -4
- package/es/styles/shape.js +1 -2
- package/es/styles/spacing.js +1 -4
- package/es/styles/themeListener.js +2 -10
- package/es/styles/transitions.js +20 -35
- package/es/styles/withStyles.js +2 -9
- package/es/styles/zIndex.js +1 -2
- 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 +1 -4
- 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 +2 -7
- package/es/theme/typography.js +7 -15
- package/es/theme.js +2 -8
- package/es/transitions/utils.js +3 -7
- package/es/utils/exactProp.js +3 -13
- package/es/utils/helpers.js +19 -58
- package/es/withMobileDialog/index.js +0 -2
- package/es/withMobileDialog/withMobileDialog.js +3 -12
- package/hi-svg-icons/HiAccount.js +4 -14
- package/hi-svg-icons/HiActivity.js +4 -14
- package/hi-svg-icons/HiAll.js +7 -18
- package/hi-svg-icons/HiBilling.js +4 -14
- package/hi-svg-icons/HiBriefcaseRescue.js +4 -14
- package/hi-svg-icons/HiBusiness.js +4 -14
- package/hi-svg-icons/HiCatalog.js +4 -14
- package/hi-svg-icons/HiCustomer.js +4 -14
- package/hi-svg-icons/HiDownload.js +4 -14
- package/hi-svg-icons/HiFinance.js +4 -14
- package/hi-svg-icons/HiFinanceMenu.js +4 -14
- package/hi-svg-icons/HiHostedPaymentPage.js +4 -14
- package/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
- package/hi-svg-icons/HiIntegration.js +4 -14
- package/hi-svg-icons/HiIntegrationMenu.js +4 -14
- package/hi-svg-icons/HiIntelligence.js +4 -14
- package/hi-svg-icons/HiIntelligenceMenu.js +4 -14
- package/hi-svg-icons/HiInvoice.js +4 -14
- package/hi-svg-icons/HiInvoiceMenu.js +4 -14
- package/hi-svg-icons/HiLogoRounded.js +6 -17
- package/hi-svg-icons/HiOrder.js +4 -14
- package/hi-svg-icons/HiPaymentOrder.js +4 -14
- package/hi-svg-icons/HiPermission.js +4 -14
- package/hi-svg-icons/HiPriceGrid.js +4 -14
- package/hi-svg-icons/HiPrivate.js +4 -14
- package/hi-svg-icons/HiRoute.js +4 -14
- package/hi-svg-icons/HiRouteMenu.js +4 -14
- package/hi-svg-icons/HiRouteSwitch.js +7 -19
- package/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
- package/hi-svg-icons/HiSettlement.js +4 -14
- package/hi-svg-icons/HiSizeLarge.js +4 -14
- package/hi-svg-icons/HiSizeMedium.js +4 -14
- package/hi-svg-icons/HiSizeSmall.js +4 -14
- package/hi-svg-icons/HiStore.js +4 -14
- package/hi-svg-icons/HiStoreMenu.js +4 -14
- package/hi-svg-icons/HiTransaction.js +4 -14
- package/hi-svg-icons/HiTransactionMenu.js +4 -14
- package/hi-svg-icons/HiUser.js +4 -14
- package/hi-svg-icons/HiVendor.js +4 -14
- package/hi-svg-icons/HiWidget.js +4 -14
- package/hi-svg-icons/index.js +0 -41
- package/hi-svg-images/HiLogo.js +4 -12
- package/hi-svg-images/HiLogoWhite.js +4 -12
- 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 +20 -56
- package/styles/colorManipulator.js +15 -50
- package/styles/createBreakpoints.js +14 -29
- package/styles/createGenerateClassName.js +14 -24
- package/styles/createMixins.js +4 -10
- package/styles/createMuiTheme.js +11 -28
- package/styles/createPalette.js +66 -89
- package/styles/createStyles.js +0 -1
- package/styles/createTypography.js +15 -24
- package/styles/getStylesCreator.js +2 -14
- package/styles/getThemeProps.js +2 -7
- package/styles/index.js +0 -6
- package/styles/jssPreset.js +1 -11
- package/styles/makeStyles.js +2 -9
- package/styles/mergeClasses.js +5 -16
- package/styles/shadows.js +1 -4
- package/styles/shape.js +1 -2
- package/styles/spacing.js +1 -4
- package/styles/themeListener.js +2 -10
- package/styles/transitions.js +20 -35
- package/styles/withStyles.js +2 -9
- package/styles/zIndex.js +1 -2
- 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 +1 -4
- 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 +2 -7
- package/theme/typography.js +7 -15
- package/theme.js +2 -8
- package/transitions/utils.js +3 -7
- package/utils/exactProp.js +3 -13
- package/utils/helpers.js +19 -58
- package/withMobileDialog/index.js +0 -2
- package/withMobileDialog/withMobileDialog.js +3 -12
@@ -1,49 +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 _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
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
17
|
-
|
18
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
-
|
20
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
-
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
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
|
-
function
|
43
|
-
|
44
|
-
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
|
-
var styles = function styles(theme) {
|
24
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
26
|
+
var styles = exports.styles = function styles(theme) {
|
47
27
|
return {
|
48
28
|
root: {
|
49
29
|
width: '100%',
|
@@ -71,7 +51,6 @@ 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
|
},
|
76
55
|
'&:hover:not($disabled):before': {
|
77
56
|
backgroundColor: theme.palette.input.bottomLine,
|
@@ -102,7 +81,6 @@ var styles = function styles(theme) {
|
|
102
81
|
easing: theme.transitions.easing.easeOut
|
103
82
|
}),
|
104
83
|
pointerEvents: 'none' // Transparent to the hover style.
|
105
|
-
|
106
84
|
},
|
107
85
|
'&:hover:after': {
|
108
86
|
transform: 'scaleX(1)'
|
@@ -151,54 +129,36 @@ var styles = function styles(theme) {
|
|
151
129
|
}
|
152
130
|
};
|
153
131
|
};
|
132
|
+
|
154
133
|
/**
|
155
134
|
* @ignore - internal component.
|
156
135
|
*/
|
157
|
-
|
158
|
-
|
159
|
-
exports.styles = styles;
|
160
|
-
|
161
136
|
var _ref = /*#__PURE__*/_react.default.createElement(_ArrowDropDown.default, null);
|
162
|
-
|
163
137
|
var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
164
|
-
(0, _inherits2.default)(HiSelectInput, _React$PureComponent);
|
165
|
-
|
166
|
-
var _super = _createSuper(HiSelectInput);
|
167
|
-
|
168
138
|
function HiSelectInput() {
|
169
139
|
var _this;
|
170
|
-
|
171
140
|
(0, _classCallCheck2.default)(this, HiSelectInput);
|
172
|
-
|
173
141
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
174
142
|
args[_key] = arguments[_key];
|
175
143
|
}
|
176
|
-
|
177
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
178
|
-
|
144
|
+
_this = _callSuper(this, HiSelectInput, [].concat(args));
|
179
145
|
_this.handleKeyDown = function (event) {
|
180
146
|
var key = (0, _keycode.default)(event);
|
181
|
-
|
182
147
|
if (_this.props.onKeyDown) {
|
183
148
|
_this.props.onKeyDown(event);
|
184
149
|
} else if (key === 'enter' && _this.props.onSubmit) {
|
185
150
|
event.preventDefault();
|
186
|
-
|
187
151
|
_this.props.onSubmit(event);
|
188
152
|
}
|
189
153
|
};
|
190
|
-
|
191
154
|
_this.handleKeyDownReset = function (event) {
|
192
155
|
var key = (0, _keycode.default)(event);
|
193
|
-
|
194
156
|
if (key === 'enter' || key === 'space') {
|
195
157
|
_this.handleReset(event);
|
196
|
-
|
197
158
|
event.stopPropagation();
|
198
159
|
event.preventDefault();
|
199
160
|
}
|
200
161
|
};
|
201
|
-
|
202
162
|
_this.handleClick = function (event) {
|
203
163
|
// Do not open select if press on resetIcon
|
204
164
|
if ((!_this.resetIcon || !_this.resetIcon.contains(event.target)) && _this.props.onClick) {
|
@@ -208,58 +168,46 @@ var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
208
168
|
}
|
209
169
|
}
|
210
170
|
};
|
211
|
-
|
212
171
|
_this.handleReset = function (event) {
|
213
172
|
_this.props.onReset(event);
|
214
|
-
|
215
173
|
if (_this.input) {
|
216
174
|
_this.input.focus();
|
217
175
|
}
|
218
176
|
};
|
219
|
-
|
220
177
|
_this.handleBlur = function (event) {
|
221
178
|
if ((!_this.input || !_this.input.contains(event.relatedTarget)) && _this.props.onBlur) {
|
222
179
|
_this.props.onBlur(event);
|
223
|
-
}
|
224
|
-
|
225
|
-
|
226
|
-
}*/
|
227
|
-
|
180
|
+
} /* else if (this.input && (!this.resetIcon || !this.resetIcon.contains(event.relatedTarget))) {
|
181
|
+
this.input.focus();
|
182
|
+
}*/
|
228
183
|
};
|
229
|
-
|
230
184
|
_this.ref = function (el) {
|
231
185
|
_this.input = el;
|
232
|
-
|
233
186
|
if (_this.props.refElement) {
|
234
187
|
_this.props.refElement(el);
|
235
188
|
}
|
236
189
|
};
|
237
|
-
|
238
190
|
return _this;
|
239
191
|
}
|
240
|
-
|
241
|
-
(0, _createClass2.default)(HiSelectInput, [{
|
192
|
+
(0, _inherits2.default)(HiSelectInput, _React$PureComponent);
|
193
|
+
return (0, _createClass2.default)(HiSelectInput, [{
|
242
194
|
key: "render",
|
243
195
|
value: function render() {
|
244
|
-
var
|
245
|
-
_classNames2,
|
246
|
-
_this2 = this;
|
247
|
-
|
196
|
+
var _this2 = this;
|
248
197
|
var _this$props = this.props,
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
var
|
262
|
-
var iconClass = (0, _classnames.default)(classes.icon, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.iconOpen, open), (0, _defineProperty2.default)(_classNames2, classes.iconClose, !open), _classNames2));
|
198
|
+
classes = _this$props.classes,
|
199
|
+
noButton = _this$props.noButton,
|
200
|
+
disabled = _this$props.disabled,
|
201
|
+
onClick = _this$props.onClick,
|
202
|
+
onReset = _this$props.onReset,
|
203
|
+
value = _this$props.value,
|
204
|
+
open = _this$props.open,
|
205
|
+
focused = _this$props.focused,
|
206
|
+
error = _this$props.error,
|
207
|
+
id = _this$props.id,
|
208
|
+
placeholder = _this$props.placeholder; // On utilise classNames pour variabiliser les styles et merge les classes appliquées
|
209
|
+
var rootClass = (0, _classnames.default)(classes.root, classes.inkbar, classes.underline, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.disabled, disabled), classes.focused, focused), classes.error, error && !focused), classes.rootMobile, _reactDeviceDetect.isMobile));
|
210
|
+
var iconClass = (0, _classnames.default)(classes.icon, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.iconOpen, open), classes.iconClose, !open));
|
263
211
|
return noButton ? /*#__PURE__*/_react.default.createElement("div", {
|
264
212
|
id: id,
|
265
213
|
className: rootClass,
|
@@ -308,9 +256,7 @@ var HiSelectInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
308
256
|
}, _ref));
|
309
257
|
}
|
310
258
|
}]);
|
311
|
-
return HiSelectInput;
|
312
259
|
}(_react.default.PureComponent);
|
313
|
-
|
314
260
|
HiSelectInput.defaultProps = {
|
315
261
|
disabled: false,
|
316
262
|
open: false,
|
@@ -318,10 +264,7 @@ HiSelectInput.defaultProps = {
|
|
318
264
|
noButton: false,
|
319
265
|
error: false
|
320
266
|
};
|
321
|
-
|
322
|
-
var _default = (0, _withStyles.default)(styles, {
|
267
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
323
268
|
hiComponent: true,
|
324
269
|
name: 'HmuiHiSelectInput'
|
325
|
-
})(HiSelectInput);
|
326
|
-
|
327
|
-
exports.default = _default;
|
270
|
+
})(HiSelectInput);
|
@@ -1,37 +1,23 @@
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
13
|
-
|
14
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
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
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
-
|
22
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
23
|
-
|
24
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
25
|
-
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
26
16
|
var _react = _interopRequireDefault(require("react"));
|
27
|
-
|
28
17
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
29
|
-
|
30
|
-
function
|
31
|
-
|
32
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
33
|
-
|
34
|
-
var styles = function styles(theme) {
|
18
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
20
|
+
var styles = exports.styles = function styles(theme) {
|
35
21
|
return {
|
36
22
|
root: {
|
37
23
|
position: 'absolute',
|
@@ -41,28 +27,16 @@ var styles = function styles(theme) {
|
|
41
27
|
}
|
42
28
|
};
|
43
29
|
};
|
44
|
-
|
45
|
-
exports.styles = styles;
|
46
|
-
|
47
30
|
var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
48
|
-
(0, _inherits2.default)(HiSelectMobile, _React$Component);
|
49
|
-
|
50
|
-
var _super = _createSuper(HiSelectMobile);
|
51
|
-
|
52
31
|
function HiSelectMobile() {
|
53
32
|
var _this;
|
54
|
-
|
55
33
|
(0, _classCallCheck2.default)(this, HiSelectMobile);
|
56
|
-
|
57
34
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
58
35
|
args[_key] = arguments[_key];
|
59
36
|
}
|
60
|
-
|
61
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
62
|
-
|
37
|
+
_this = _callSuper(this, HiSelectMobile, [].concat(args));
|
63
38
|
_this.buildOptionList = function (itemList) {
|
64
39
|
var optionList = [];
|
65
|
-
|
66
40
|
if (itemList.length) {
|
67
41
|
var parentId;
|
68
42
|
var groupList = [];
|
@@ -73,7 +47,6 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
73
47
|
optionList.push(_this.buildChildrenList(groupList));
|
74
48
|
groupList = [];
|
75
49
|
}
|
76
|
-
|
77
50
|
parentId = item.id;
|
78
51
|
groupList.push(item);
|
79
52
|
} else if (parentId) {
|
@@ -81,7 +54,7 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
81
54
|
} else if (item.children) {
|
82
55
|
optionList.push(_this.buildChildrenList([item].concat((0, _toConsumableArray2.default)(item.children))));
|
83
56
|
} else {
|
84
|
-
optionList.push(
|
57
|
+
optionList.push(/*#__PURE__*/_react.default.createElement("option", {
|
85
58
|
key: item.id,
|
86
59
|
"data-item": JSON.stringify(item),
|
87
60
|
value: item.id
|
@@ -89,15 +62,12 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
89
62
|
}
|
90
63
|
}
|
91
64
|
});
|
92
|
-
|
93
65
|
if (groupList.length) {
|
94
66
|
optionList.push(_this.buildChildrenList(groupList));
|
95
67
|
}
|
96
68
|
}
|
97
|
-
|
98
69
|
return optionList;
|
99
70
|
};
|
100
|
-
|
101
71
|
_this.buildChildrenList = function (itemList) {
|
102
72
|
var group = itemList.shift();
|
103
73
|
return /*#__PURE__*/_react.default.createElement("optgroup", {
|
@@ -111,11 +81,9 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
111
81
|
}, item.label);
|
112
82
|
}));
|
113
83
|
};
|
114
|
-
|
115
84
|
_this.handleChange = function (event) {
|
116
85
|
if (!_this.props.multiple) {
|
117
86
|
var itemSelected = event.target[event.target.selectedIndex];
|
118
|
-
|
119
87
|
_this.props.onChange(event, JSON.parse(itemSelected.getAttribute('data-item')));
|
120
88
|
} else {
|
121
89
|
// Multiple on mobile trigger on change with all selected items
|
@@ -125,23 +93,21 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
125
93
|
optionsSelected.push(JSON.parse(option.getAttribute('data-item')));
|
126
94
|
}
|
127
95
|
});
|
128
|
-
|
129
96
|
_this.props.onChange(event, optionsSelected);
|
130
97
|
}
|
131
98
|
};
|
132
|
-
|
133
99
|
return _this;
|
134
100
|
}
|
135
|
-
|
136
|
-
(0, _createClass2.default)(HiSelectMobile, [{
|
101
|
+
(0, _inherits2.default)(HiSelectMobile, _React$Component);
|
102
|
+
return (0, _createClass2.default)(HiSelectMobile, [{
|
137
103
|
key: "render",
|
138
104
|
value: function render() {
|
139
105
|
var _this$props = this.props,
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
106
|
+
classes = _this$props.classes,
|
107
|
+
id = _this$props.id,
|
108
|
+
itemList = _this$props.itemList,
|
109
|
+
multiple = _this$props.multiple,
|
110
|
+
value = _this$props.value;
|
145
111
|
var additionalProps = (0, _objectSpread2.default)({}, multiple && {
|
146
112
|
multiple: 'multiple'
|
147
113
|
});
|
@@ -157,13 +123,8 @@ var HiSelectMobile = /*#__PURE__*/function (_React$Component) {
|
|
157
123
|
}, additionalProps), this.buildOptionList(itemList));
|
158
124
|
}
|
159
125
|
}]);
|
160
|
-
return HiSelectMobile;
|
161
126
|
}(_react.default.Component);
|
162
|
-
|
163
127
|
HiSelectMobile.defaultProps = {
|
164
128
|
itemList: []
|
165
129
|
};
|
166
|
-
|
167
|
-
var _default = (0, _withStyles.default)(styles)(HiSelectMobile);
|
168
|
-
|
169
|
-
exports.default = _default;
|
130
|
+
var _default = exports.default = (0, _withStyles.default)(styles)(HiSelectMobile);
|
@@ -1,55 +1,32 @@
|
|
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
13
|
-
|
14
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
15
|
-
|
16
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
17
|
-
|
18
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
19
|
-
|
20
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
21
|
-
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
25
|
-
|
26
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
27
|
-
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
28
17
|
var _react = _interopRequireDefault(require("react"));
|
29
|
-
|
30
18
|
var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
|
31
|
-
|
32
19
|
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
33
|
-
|
34
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
35
|
-
|
36
21
|
var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
|
37
|
-
|
38
22
|
var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
|
39
|
-
|
40
23
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
41
|
-
|
42
24
|
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
43
|
-
|
44
25
|
var _helpers = require("../utils/helpers");
|
45
|
-
|
46
26
|
var _keycode = _interopRequireDefault(require("keycode"));
|
47
|
-
|
48
|
-
function
|
49
|
-
|
50
|
-
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; } }
|
51
|
-
|
52
|
-
var styles = function styles(theme) {
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // @inheritedComponent HiInput
|
29
|
+
var styles = exports.styles = function styles(theme) {
|
53
30
|
return {
|
54
31
|
root: {
|
55
32
|
backgroundColor: theme.palette.background2,
|
@@ -73,35 +50,21 @@ var styles = function styles(theme) {
|
|
73
50
|
}
|
74
51
|
};
|
75
52
|
};
|
76
|
-
|
77
|
-
exports.styles = styles;
|
78
|
-
|
79
53
|
var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
80
|
-
(0, _inherits2.default)(HiSuggestSelect, _React$PureComponent);
|
81
|
-
|
82
|
-
var _super = _createSuper(HiSuggestSelect);
|
83
|
-
|
84
54
|
function HiSuggestSelect(props) {
|
85
55
|
var _this;
|
86
|
-
|
87
56
|
(0, _classCallCheck2.default)(this, HiSuggestSelect);
|
88
|
-
_this =
|
89
|
-
|
57
|
+
_this = _callSuper(this, HiSuggestSelect, [props]);
|
90
58
|
_this.getInputElement = function (el) {
|
91
59
|
_this.textInput = el;
|
92
|
-
|
93
60
|
if (_this.props.inputRef) {
|
94
61
|
_this.props.inputRef(_this.textInput);
|
95
62
|
}
|
96
63
|
};
|
97
|
-
|
98
64
|
_this.handleSelect = function (event, value) {
|
99
65
|
document.body.style.overflow = 'auto';
|
100
|
-
|
101
66
|
_this.props.onSelect(event, value);
|
102
|
-
|
103
67
|
var textInput = _this.textInput;
|
104
|
-
|
105
68
|
if (textInput) {
|
106
69
|
setTimeout(function () {
|
107
70
|
textInput.focus();
|
@@ -109,11 +72,10 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
109
72
|
}, 1);
|
110
73
|
}
|
111
74
|
};
|
112
|
-
|
75
|
+
// Key down on list items
|
113
76
|
_this.handleKeyDown = function (event) {
|
114
77
|
var nextItem;
|
115
78
|
var key = (0, _keycode.default)(event);
|
116
|
-
|
117
79
|
if (key === 'down') {
|
118
80
|
event.preventDefault();
|
119
81
|
nextItem = (0, _helpers.getNextItemSelectable)(document.activeElement, 'down');
|
@@ -122,37 +84,31 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
122
84
|
nextItem = (0, _helpers.getNextItemSelectable)(document.activeElement, 'up');
|
123
85
|
} else if (key === 'tab') {
|
124
86
|
document.body.style.overflow = 'auto';
|
125
|
-
|
126
87
|
if ((0, _helpers.getNextItemSelectable)(document.activeElement, 'down') === null) {
|
127
88
|
_this.setState({
|
128
89
|
options: [],
|
129
90
|
focused: false,
|
130
91
|
suggestionFocusIndex: -1
|
131
92
|
});
|
132
|
-
|
133
93
|
if (_this.props.onBlurInput) {
|
134
94
|
_this.props.onBlurInput(event);
|
135
95
|
}
|
136
96
|
}
|
137
97
|
} else if (key === 'escape' || 'enter') {
|
138
98
|
event.preventDefault();
|
139
|
-
|
140
99
|
var item = _this.props.options.find(function (elem) {
|
141
100
|
return String(elem.id) === event.target.id;
|
142
101
|
});
|
143
|
-
|
144
102
|
_this.handleSelect(null, item);
|
145
103
|
}
|
146
|
-
|
147
104
|
if (nextItem) {
|
148
105
|
nextItem.focus();
|
149
106
|
}
|
150
107
|
};
|
151
|
-
|
108
|
+
// Key down on search input
|
152
109
|
_this.handleKeyDownSearch = function (event) {
|
153
110
|
if (event.key === 'ArrowDown') {
|
154
111
|
event.preventDefault();
|
155
|
-
|
156
112
|
if (_this.state.suggestionFocusIndex < _this.props.options.length - 1) {
|
157
113
|
_this.setState(function (prevState) {
|
158
114
|
return {
|
@@ -162,7 +118,6 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
162
118
|
}
|
163
119
|
} else if (event.key === 'ArrowUp') {
|
164
120
|
event.preventDefault();
|
165
|
-
|
166
121
|
if (_this.state.suggestionFocusIndex >= 0) {
|
167
122
|
_this.setState(function (prevState) {
|
168
123
|
return {
|
@@ -171,8 +126,8 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
171
126
|
});
|
172
127
|
}
|
173
128
|
} else if (event.key === 'Enter' && _this.state.suggestionFocusIndex >= 0) {
|
174
|
-
event.preventDefault();
|
175
|
-
|
129
|
+
event.preventDefault();
|
130
|
+
// Suggestion focused
|
176
131
|
_this.handleSelect(event, _this.state.options[_this.state.suggestionFocusIndex]);
|
177
132
|
} else if (event.key === 'Escape') {
|
178
133
|
_this.setState({
|
@@ -181,17 +136,14 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
181
136
|
});
|
182
137
|
}
|
183
138
|
};
|
184
|
-
|
185
139
|
_this.handleFocus = function (event) {
|
186
140
|
_this.setState({
|
187
141
|
focused: true
|
188
142
|
});
|
189
|
-
|
190
143
|
if (_this.props.onFocusInput) {
|
191
144
|
_this.props.onFocusInput(event);
|
192
145
|
}
|
193
146
|
};
|
194
|
-
|
195
147
|
_this.handleBlur = function (event) {
|
196
148
|
// Si on click sur un élément de HiInput, on garde le focus
|
197
149
|
// Par exemple sur l'icone reset
|
@@ -201,7 +153,6 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
201
153
|
focused: false,
|
202
154
|
suggestionFocusIndex: -1
|
203
155
|
});
|
204
|
-
|
205
156
|
if (_this.props.onBlurInput) {
|
206
157
|
_this.props.onBlurInput(event);
|
207
158
|
}
|
@@ -210,13 +161,11 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
210
161
|
options: [],
|
211
162
|
suggestionFocusIndex: -1
|
212
163
|
});
|
213
|
-
|
214
164
|
if (_this.textInput) {
|
215
165
|
_this.textInput.focus();
|
216
166
|
}
|
217
167
|
}
|
218
168
|
};
|
219
|
-
|
220
169
|
_this.state = {
|
221
170
|
focused: false,
|
222
171
|
options: props.options,
|
@@ -224,31 +173,31 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
224
173
|
};
|
225
174
|
return _this;
|
226
175
|
}
|
227
|
-
|
228
|
-
(0, _createClass2.default)(HiSuggestSelect, [{
|
176
|
+
(0, _inherits2.default)(HiSuggestSelect, _React$PureComponent);
|
177
|
+
return (0, _createClass2.default)(HiSuggestSelect, [{
|
229
178
|
key: "render",
|
230
179
|
value: function render() {
|
231
180
|
var _this2 = this;
|
232
|
-
|
233
181
|
var _this$props = this.props,
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
182
|
+
classes = _this$props.classes,
|
183
|
+
id = _this$props.id,
|
184
|
+
loading = _this$props.loading,
|
185
|
+
showMinLength = _this$props.showMinLength,
|
186
|
+
showNoResults = _this$props.showNoResults,
|
187
|
+
onSearch = _this$props.onSearch,
|
188
|
+
translations = _this$props.translations,
|
189
|
+
align = _this$props.align,
|
190
|
+
inputClasses = _this$props.inputClasses,
|
191
|
+
_this$props$HiInputPr = _this$props.HiInputProps,
|
192
|
+
HiInputProps = _this$props$HiInputPr === void 0 ? {} : _this$props$HiInputPr,
|
193
|
+
otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align", "inputClasses", "HiInputProps"]);
|
246
194
|
var _this$state = this.state,
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
var optionsShown = options;
|
195
|
+
focused = _this$state.focused,
|
196
|
+
options = _this$state.options,
|
197
|
+
suggestionFocusIndex = _this$state.suggestionFocusIndex;
|
198
|
+
var optionsShown = options;
|
251
199
|
|
200
|
+
// If loading
|
252
201
|
if (loading) {
|
253
202
|
optionsShown = [{
|
254
203
|
id: '_loading',
|
@@ -270,7 +219,6 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
270
219
|
selectable: false
|
271
220
|
}];
|
272
221
|
}
|
273
|
-
|
274
222
|
var open = !!optionsShown.length && focused;
|
275
223
|
return /*#__PURE__*/_react.default.createElement("div", {
|
276
224
|
className: classes.root,
|
@@ -320,13 +268,10 @@ var HiSuggestSelect = /*#__PURE__*/function (_React$PureComponent) {
|
|
320
268
|
suggestionFocusIndex: -1
|
321
269
|
};
|
322
270
|
}
|
323
|
-
|
324
271
|
return null;
|
325
272
|
}
|
326
273
|
}]);
|
327
|
-
return HiSuggestSelect;
|
328
274
|
}(_react.default.PureComponent);
|
329
|
-
|
330
275
|
HiSuggestSelect.defaultProps = {
|
331
276
|
align: 'left',
|
332
277
|
showMinLength: false,
|
@@ -337,10 +282,7 @@ HiSuggestSelect.defaultProps = {
|
|
337
282
|
},
|
338
283
|
options: []
|
339
284
|
};
|
340
|
-
|
341
|
-
var _default = (0, _withStyles.default)(styles, {
|
285
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
342
286
|
hiComponent: true,
|
343
287
|
name: 'HmuiHiSuggestSelect'
|
344
|
-
})(HiSuggestSelect);
|
345
|
-
|
346
|
-
exports.default = _default;
|
288
|
+
})(HiSuggestSelect);
|