@hipay/hipay-material-ui 2.3.1-rc4 → 2.3.1-rc5
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAlertModal/HiAlertModal.js +77 -48
- package/HiAlertModal/index.js +15 -1
- package/HiAppBar/HiAppBar.js +63 -34
- package/HiAppBar/index.js +15 -1
- package/HiBadge/HiBadge.js +29 -10
- package/HiBadge/index.js +15 -1
- package/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/HiBreadcrumb/HiStep.js +58 -35
- package/HiBreadcrumb/HiStepConnector.js +58 -33
- package/HiBreadcrumb/HiStepContent.js +47 -26
- package/HiBreadcrumb/HiStepIcon.js +47 -27
- package/HiBreadcrumb/HiStepLabel.js +62 -37
- package/HiBreadcrumb/HiStepper.js +44 -24
- package/HiBreadcrumb/index.js +15 -1
- package/HiButton/HiButton.js +27 -9
- package/HiButton/index.js +13 -2
- package/HiCell/CellAddress.js +39 -21
- package/HiCell/CellDate.js +44 -27
- package/HiCell/CellIcon.js +48 -29
- package/HiCell/CellImage.js +41 -24
- package/HiCell/CellNumeric.js +45 -26
- package/HiCell/CellPinToAction.js +41 -20
- package/HiCell/CellRate.js +56 -33
- package/HiCell/CellSentinel.js +41 -23
- package/HiCell/CellSentinelScore.js +43 -24
- package/HiCell/CellText.js +54 -37
- package/HiCell/CellTextStyled.js +21 -8
- package/HiCell/index.js +79 -9
- package/HiCheckbox/HiCheckbox.js +61 -36
- package/HiCheckbox/index.js +15 -1
- package/HiChip/HiChip.js +44 -24
- package/HiChip/HiChipSwitch.js +73 -47
- package/HiChip/index.js +23 -2
- package/HiColoredLabel/HiColoredLabel.js +52 -28
- package/HiColoredLabel/index.js +15 -1
- package/HiDatePicker/Caption.js +28 -11
- package/HiDatePicker/HiDatePicker.js +131 -101
- package/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/HiDatePicker/HiDateRangePicker.js +168 -139
- package/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/HiDatePicker/ListPicker.js +54 -34
- package/HiDatePicker/NavBar.js +45 -18
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/Overlay.js +35 -18
- package/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/index.js +47 -5
- package/HiDatePicker/Weekday.js +13 -3
- package/HiDatePicker/hiLocaleUtils.js +8 -1
- package/HiDatePicker/index.js +15 -1
- package/HiDatePicker/stylesheet.js +22 -9
- package/HiDotsStepper/HiDot.js +56 -31
- package/HiDotsStepper/HiDotsStepper.js +47 -28
- package/HiDotsStepper/index.js +23 -2
- package/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/HiExpansionPanel/index.js +13 -2
- package/HiForm/HiAddressField.js +46 -29
- package/HiForm/HiEmailField.js +45 -27
- package/HiForm/HiFormControl.js +105 -72
- package/HiForm/HiFormLabel.js +53 -30
- package/HiForm/HiInput.js +89 -62
- package/HiForm/HiPasswordField.js +55 -29
- package/HiForm/HiSearchField.js +43 -28
- package/HiForm/HiSlider.js +64 -41
- package/HiForm/HiTextField.js +46 -29
- package/HiForm/HiUpload.js +76 -53
- package/HiForm/HiUploadField.js +40 -25
- package/HiForm/HiUploadInput.js +84 -56
- package/HiForm/index.js +95 -11
- package/HiIcon/HiIcon.js +44 -22
- package/HiIcon/index.js +15 -1
- package/HiIconButton/HiIconButton.js +40 -18
- package/HiIconButton/index.js +15 -1
- package/HiLoader/HiLoader.js +24 -9
- package/HiLoader/index.js +15 -1
- package/HiMap/HiMap.js +76 -51
- package/HiMap/HiMapExpand.js +64 -39
- package/HiMap/index.js +23 -2
- package/HiNotice/HiKPI.js +56 -33
- package/HiNotice/HiKPINotice.js +21 -7
- package/HiNotice/index.js +23 -2
- package/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/HiPaymentMeans/index.js +15 -1
- package/HiPdfReader/HiPdfReader.js +78 -52
- package/HiPdfReader/index.js +15 -1
- package/HiPin/HiPin.js +30 -9
- package/HiPin/index.js +15 -1
- package/HiRadio/HiRadio.js +24 -7
- package/HiRadio/index.js +15 -1
- package/HiSelect/HiDynamicSelect.js +58 -40
- package/HiSelect/HiDynamicSelectField.js +40 -22
- package/HiSelect/HiNestedSelect.js +85 -55
- package/HiSelect/HiNestedSelectContent.js +72 -46
- package/HiSelect/HiNestedSelectField.js +40 -22
- package/HiSelect/HiSelect.js +161 -123
- package/HiSelect/HiSelectContent.js +104 -73
- package/HiSelect/HiSelectField.js +40 -22
- package/HiSelect/HiSelectInput.js +94 -63
- package/HiSelect/HiSelectMobile.js +54 -35
- package/HiSelect/HiSuggestSelect.js +83 -56
- package/HiSelect/HiSuggestSelectField.js +40 -22
- package/HiSelect/index.js +85 -8
- package/HiSelectableList/HiSelectableList.js +80 -49
- package/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/HiSelectableList/HiSelectableListItem.js +101 -66
- package/HiSelectableList/index.js +31 -3
- package/HiSwitch/HiSwitch.js +45 -20
- package/HiSwitch/HiSwitchState.js +36 -15
- package/HiSwitch/index.js +23 -2
- package/HiTable/HiCellBuilder.js +69 -43
- package/HiTable/HiTable.js +46 -28
- package/HiTable/HiTableBody.js +34 -19
- package/HiTable/HiTableHeader.js +50 -29
- package/HiTable/HiTableRow.js +56 -29
- package/HiTable/constants.js +94 -43
- package/HiTable/index.js +15 -1
- package/es/HiAlertModal/HiAlertModal.js +77 -48
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +63 -34
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +29 -10
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/es/HiBreadcrumb/HiStep.js +58 -35
- package/es/HiBreadcrumb/HiStepConnector.js +58 -33
- package/es/HiBreadcrumb/HiStepContent.js +47 -26
- package/es/HiBreadcrumb/HiStepIcon.js +47 -27
- package/es/HiBreadcrumb/HiStepLabel.js +62 -37
- package/es/HiBreadcrumb/HiStepper.js +44 -24
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +27 -9
- package/es/HiButton/index.js +13 -2
- package/es/HiCell/CellAddress.js +39 -21
- package/es/HiCell/CellDate.js +44 -27
- package/es/HiCell/CellIcon.js +48 -29
- package/es/HiCell/CellImage.js +41 -24
- package/es/HiCell/CellNumeric.js +45 -26
- package/es/HiCell/CellPinToAction.js +41 -20
- package/es/HiCell/CellRate.js +56 -33
- package/es/HiCell/CellSentinel.js +41 -23
- package/es/HiCell/CellSentinelScore.js +43 -24
- package/es/HiCell/CellText.js +54 -37
- package/es/HiCell/CellTextStyled.js +21 -8
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +61 -36
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +44 -24
- package/es/HiChip/HiChipSwitch.js +73 -47
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +52 -28
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +28 -11
- package/es/HiDatePicker/HiDatePicker.js +131 -101
- package/es/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/es/HiDatePicker/HiDateRangePicker.js +168 -139
- package/es/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/es/HiDatePicker/ListPicker.js +54 -34
- package/es/HiDatePicker/NavBar.js +45 -18
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/Overlay.js +35 -18
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +13 -3
- package/es/HiDatePicker/hiLocaleUtils.js +8 -1
- package/es/HiDatePicker/index.js +15 -1
- package/es/HiDatePicker/stylesheet.js +22 -9
- package/es/HiDotsStepper/HiDot.js +56 -31
- package/es/HiDotsStepper/HiDotsStepper.js +47 -28
- package/es/HiDotsStepper/index.js +23 -2
- package/es/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/es/HiExpansionPanel/index.js +13 -2
- package/es/HiForm/HiAddressField.js +46 -29
- package/es/HiForm/HiEmailField.js +45 -27
- package/es/HiForm/HiFormControl.js +105 -72
- package/es/HiForm/HiFormLabel.js +53 -30
- package/es/HiForm/HiInput.js +89 -62
- package/es/HiForm/HiPasswordField.js +55 -29
- package/es/HiForm/HiSearchField.js +43 -28
- package/es/HiForm/HiSlider.js +64 -41
- package/es/HiForm/HiTextField.js +46 -29
- package/es/HiForm/HiUpload.js +76 -53
- package/es/HiForm/HiUploadField.js +40 -25
- package/es/HiForm/HiUploadInput.js +84 -56
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +44 -22
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +40 -18
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +24 -9
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +76 -51
- package/es/HiMap/HiMapExpand.js +64 -39
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +56 -33
- package/es/HiNotice/HiKPINotice.js +21 -7
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +78 -52
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +30 -9
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +24 -7
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +58 -40
- package/es/HiSelect/HiDynamicSelectField.js +40 -22
- package/es/HiSelect/HiNestedSelect.js +85 -55
- package/es/HiSelect/HiNestedSelectContent.js +72 -46
- package/es/HiSelect/HiNestedSelectField.js +40 -22
- package/es/HiSelect/HiSelect.js +161 -123
- package/es/HiSelect/HiSelectContent.js +104 -73
- package/es/HiSelect/HiSelectField.js +40 -22
- package/es/HiSelect/HiSelectInput.js +94 -63
- package/es/HiSelect/HiSelectMobile.js +54 -35
- package/es/HiSelect/HiSuggestSelect.js +83 -56
- package/es/HiSelect/HiSuggestSelectField.js +40 -22
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +80 -49
- package/es/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/es/HiSelectableList/HiSelectableListItem.js +101 -66
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +45 -20
- package/es/HiSwitch/HiSwitchState.js +36 -15
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +69 -43
- package/es/HiTable/HiTable.js +46 -28
- package/es/HiTable/HiTableBody.js +34 -19
- package/es/HiTable/HiTableHeader.js +50 -29
- package/es/HiTable/HiTableRow.js +56 -29
- package/es/HiTable/constants.js +94 -43
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +36 -18
- package/es/hi-svg-icons/HiActivity.js +35 -17
- package/es/hi-svg-icons/HiAll.js +42 -22
- package/es/hi-svg-icons/HiBilling.js +36 -18
- package/es/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/es/hi-svg-icons/HiCatalog.js +36 -18
- package/es/hi-svg-icons/HiCustomer.js +36 -18
- package/es/hi-svg-icons/HiDownload.js +25 -11
- package/es/hi-svg-icons/HiFinance.js +36 -18
- package/es/hi-svg-icons/HiPermission.js +35 -17
- package/es/hi-svg-icons/HiRoute.js +36 -18
- package/es/hi-svg-icons/HiSettlement.js +36 -18
- package/es/hi-svg-icons/HiSizeLarge.js +27 -12
- package/es/hi-svg-icons/HiSizeMedium.js +25 -11
- package/es/hi-svg-icons/HiSizeSmall.js +25 -11
- package/es/hi-svg-icons/HiTransaction.js +36 -18
- package/es/hi-svg-icons/HiUser.js +36 -18
- package/es/hi-svg-icons/HiWidget.js +42 -22
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +21 -11
- package/es/styleguide/Wrapper.js +36 -19
- package/es/styles/MuiThemeProvider.js +57 -39
- package/es/styles/colorManipulator.js +44 -16
- package/es/styles/createBreakpoints.js +20 -6
- package/es/styles/createGenerateClassName.js +15 -5
- package/es/styles/createMixins.js +19 -8
- package/es/styles/createMuiTheme.js +53 -34
- package/es/styles/createPalette.js +50 -30
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +30 -18
- package/es/styles/getStylesCreator.js +24 -11
- package/es/styles/getThemeProps.js +9 -1
- package/es/styles/index.js +47 -5
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +19 -7
- package/es/styles/shadows.js +8 -1
- package/es/styles/shape.js +8 -1
- package/es/styles/spacing.js +9 -1
- package/es/styles/themeListener.js +18 -5
- package/es/styles/transitions.js +38 -18
- package/es/styles/zIndex.js +8 -1
- package/es/test-utils/createMount.js +22 -11
- package/es/test-utils/createRender.js +19 -8
- package/es/test-utils/createShallow.js +23 -13
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +16 -6
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +10 -2
- package/es/theme/typography.js +11 -3
- package/es/theme.js +13 -4
- package/es/transitions/utils.js +13 -2
- package/es/utils/exactProp.js +18 -5
- package/es/utils/helpers.js +55 -18
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +22 -7
- package/hi-svg-icons/HiAccount.js +36 -18
- package/hi-svg-icons/HiActivity.js +35 -17
- package/hi-svg-icons/HiAll.js +42 -22
- package/hi-svg-icons/HiBilling.js +36 -18
- package/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/hi-svg-icons/HiCatalog.js +36 -18
- package/hi-svg-icons/HiCustomer.js +36 -18
- package/hi-svg-icons/HiDownload.js +25 -11
- package/hi-svg-icons/HiFinance.js +36 -18
- package/hi-svg-icons/HiPermission.js +35 -17
- package/hi-svg-icons/HiRoute.js +36 -18
- package/hi-svg-icons/HiSettlement.js +36 -18
- package/hi-svg-icons/HiSizeLarge.js +27 -12
- package/hi-svg-icons/HiSizeMedium.js +25 -11
- package/hi-svg-icons/HiSizeSmall.js +25 -11
- package/hi-svg-icons/HiTransaction.js +36 -18
- package/hi-svg-icons/HiUser.js +36 -18
- package/hi-svg-icons/HiWidget.js +42 -22
- package/hi-svg-icons/index.js +151 -18
- package/hi-svg-icons/index.text.js +21 -11
- package/package.json +2 -1
- package/styleguide/Wrapper.js +36 -19
- package/styles/MuiThemeProvider.js +57 -39
- package/styles/colorManipulator.js +44 -16
- package/styles/createBreakpoints.js +20 -6
- package/styles/createGenerateClassName.js +15 -5
- package/styles/createMixins.js +19 -8
- package/styles/createMuiTheme.js +53 -34
- package/styles/createPalette.js +50 -30
- package/styles/createStyles.js +8 -1
- package/styles/createTypography.js +30 -18
- package/styles/getStylesCreator.js +24 -11
- package/styles/getThemeProps.js +9 -1
- package/styles/index.js +47 -5
- package/styles/jssPreset.js +25 -9
- package/styles/mergeClasses.js +19 -7
- package/styles/shadows.js +8 -1
- package/styles/shape.js +8 -1
- package/styles/spacing.js +9 -1
- package/styles/themeListener.js +18 -5
- package/styles/transitions.js +38 -18
- package/styles/zIndex.js +8 -1
- package/test-utils/createMount.js +22 -11
- package/test-utils/createRender.js +19 -8
- package/test-utils/createShallow.js +23 -13
- package/test-utils/getClasses.js +11 -2
- package/test-utils/index.js +47 -5
- package/test-utils/until.js +16 -6
- package/test-utils/unwrap.js +8 -1
- package/theme/palette.js +10 -2
- package/theme/typography.js +11 -3
- package/theme.js +13 -4
- package/transitions/utils.js +13 -2
- package/utils/exactProp.js +18 -5
- package/utils/helpers.js +55 -18
- package/withMobileDialog/index.js +15 -1
- package/withMobileDialog/withMobileDialog.js +22 -7
- package/App.test.js +0 -8
- package/HiAlertModal/HiAlertModal.test.js +0 -189
- package/HiBadge/HiBadge.test.js +0 -49
- package/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/HiBreadcrumb/HiStep.test.js +0 -47
- package/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/HiBreadcrumb/HiStepper.test.js +0 -33
- package/HiCell/CellAddress.test.js +0 -75
- package/HiCell/CellDate.test.js +0 -173
- package/HiCell/CellIcon.test.js +0 -57
- package/HiCell/CellImage.test.js +0 -49
- package/HiCell/CellNumeric.test.js +0 -46
- package/HiCell/CellRate.test.js +0 -73
- package/HiCell/CellSentinel.test.js +0 -48
- package/HiCell/CellText.test.js +0 -76
- package/HiCheckbox/HiCheckbox.test.js +0 -55
- package/HiChip/HiChip.test.js +0 -136
- package/HiChip/HiChipSwitch.test.js +0 -99
- package/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/HiDatePicker/Caption.test.js +0 -65
- package/HiDatePicker/HiDatePicker.test.js +0 -370
- package/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/HiDatePicker/ListPicker.test.js +0 -53
- package/HiDatePicker/NavBar.test.js +0 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/HiDotsStepper/HiDot.test.js +0 -55
- package/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/HiForm/HiAddressField.test.js +0 -79
- package/HiForm/HiEmailField.test.js +0 -19
- package/HiForm/HiFormControl.test.js +0 -195
- package/HiForm/HiFormLabel.test.js +0 -66
- package/HiForm/HiInput.test.js +0 -202
- package/HiForm/HiPasswordField.test.js +0 -60
- package/HiForm/HiSearchField.test.js +0 -193
- package/HiForm/HiSlider.test.js +0 -99
- package/HiForm/HiTextField.test.js +0 -254
- package/HiForm/HiUpload.test.js +0 -241
- package/HiForm/HiUploadField.test.js +0 -55
- package/HiForm/HiUploadInput.test.js +0 -148
- package/HiIconButton/HiIconButton.test.js +0 -69
- package/HiLoader/HiLoader.test.js +0 -18
- package/HiMap/HiMap.test.js +0 -29
- package/HiMap/HiMapExpand.test.js +0 -48
- package/HiNotice/HiKPI.test.js +0 -171
- package/HiNotice/HiKPINotice.test.js +0 -88
- package/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/HiPin/HiPin.test.js +0 -61
- package/HiRadio/HiRadio.test.js +0 -57
- package/HiSelect/HiSelect.test.js +0 -1092
- package/HiSelect/HiSelectInput.test.js +0 -21
- package/HiSelectableList/HiSelectableList.test.js +0 -173
- package/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/HiSwitch/HiSwitch.test.js +0 -41
- package/HiSwitch/HiSwitchState.test.js +0 -76
- package/HiTable/HiTable.test.js +0 -29
- package/es/App.test.js +0 -8
- package/es/HiAlertModal/HiAlertModal.test.js +0 -189
- package/es/HiBadge/HiBadge.test.js +0 -49
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/es/HiBreadcrumb/HiStep.test.js +0 -47
- package/es/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/es/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/es/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/es/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/es/HiBreadcrumb/HiStepper.test.js +0 -33
- package/es/HiCell/CellAddress.test.js +0 -75
- package/es/HiCell/CellDate.test.js +0 -173
- package/es/HiCell/CellIcon.test.js +0 -57
- package/es/HiCell/CellImage.test.js +0 -49
- package/es/HiCell/CellNumeric.test.js +0 -46
- package/es/HiCell/CellRate.test.js +0 -73
- package/es/HiCell/CellSentinel.test.js +0 -48
- package/es/HiCell/CellText.test.js +0 -76
- package/es/HiCheckbox/HiCheckbox.test.js +0 -55
- package/es/HiChip/HiChip.test.js +0 -136
- package/es/HiChip/HiChipSwitch.test.js +0 -99
- package/es/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/es/HiDatePicker/Caption.test.js +0 -65
- package/es/HiDatePicker/HiDatePicker.test.js +0 -370
- package/es/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/es/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/es/HiDatePicker/ListPicker.test.js +0 -53
- package/es/HiDatePicker/NavBar.test.js +0 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/es/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/es/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/es/HiDotsStepper/HiDot.test.js +0 -55
- package/es/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/es/HiForm/HiAddressField.test.js +0 -79
- package/es/HiForm/HiEmailField.test.js +0 -19
- package/es/HiForm/HiFormControl.test.js +0 -195
- package/es/HiForm/HiFormLabel.test.js +0 -66
- package/es/HiForm/HiInput.test.js +0 -202
- package/es/HiForm/HiPasswordField.test.js +0 -60
- package/es/HiForm/HiSearchField.test.js +0 -193
- package/es/HiForm/HiSlider.test.js +0 -99
- package/es/HiForm/HiTextField.test.js +0 -254
- package/es/HiForm/HiUpload.test.js +0 -241
- package/es/HiForm/HiUploadField.test.js +0 -55
- package/es/HiForm/HiUploadInput.test.js +0 -148
- package/es/HiIconButton/HiIconButton.test.js +0 -69
- package/es/HiLoader/HiLoader.test.js +0 -18
- package/es/HiMap/HiMap.test.js +0 -29
- package/es/HiMap/HiMapExpand.test.js +0 -48
- package/es/HiNotice/HiKPI.test.js +0 -171
- package/es/HiNotice/HiKPINotice.test.js +0 -88
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/es/HiPin/HiPin.test.js +0 -61
- package/es/HiRadio/HiRadio.test.js +0 -57
- package/es/HiSelect/HiSelect.test.js +0 -1092
- package/es/HiSelect/HiSelectInput.test.js +0 -21
- package/es/HiSelectableList/HiSelectableList.test.js +0 -173
- package/es/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/es/HiSwitch/HiSwitch.test.js +0 -41
- package/es/HiSwitch/HiSwitchState.test.js +0 -76
- package/es/HiTable/HiTable.test.js +0 -29
- package/es/styles/colorManipulator.test.js +0 -242
- package/es/styles/createBreakpoints.test.js +0 -48
- package/es/styles/createGenerateClassName.test.js +0 -141
- package/es/styles/createMixins.test.js +0 -24
- package/es/styles/createMuiTheme.test.js +0 -67
- package/es/styles/createPalette.test.js +0 -159
- package/es/styles/createStyles.test.js +0 -8
- package/es/styles/createTypography.test.js +0 -60
- package/es/styles/getStylesCreator.test.js +0 -92
- package/es/styles/getThemeProps.test.js +0 -39
- package/es/styles/themeListener.test.js +0 -26
- package/es/styles/transitions.test.js +0 -208
- package/es/test-utils/until.test.js +0 -157
- package/es/withMobileDialog/withMobileDialog.test.js +0 -67
- package/styles/colorManipulator.test.js +0 -242
- package/styles/createBreakpoints.test.js +0 -48
- package/styles/createGenerateClassName.test.js +0 -141
- package/styles/createMixins.test.js +0 -24
- package/styles/createMuiTheme.test.js +0 -67
- package/styles/createPalette.test.js +0 -159
- package/styles/createStyles.test.js +0 -8
- package/styles/createTypography.test.js +0 -60
- package/styles/getStylesCreator.test.js +0 -92
- package/styles/getThemeProps.test.js +0 -39
- package/styles/themeListener.test.js +0 -26
- package/styles/transitions.test.js +0 -208
- package/test-utils/until.test.js +0 -157
- package/withMobileDialog/withMobileDialog.test.js +0 -67
package/es/HiSelect/HiSelect.js
CHANGED
@@ -1,31 +1,67 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = exports.styles = void 0;
|
9
|
+
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
+
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
13
|
+
|
14
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
15
|
+
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
17
|
+
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
19
|
+
|
20
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
21
|
+
|
22
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
23
|
+
|
24
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
25
|
+
|
26
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
27
|
+
|
28
|
+
var _react = _interopRequireDefault(require("react"));
|
29
|
+
|
30
|
+
var _reactCustomScrollbars = _interopRequireDefault(require("react-custom-scrollbars"));
|
31
|
+
|
32
|
+
var _Grow = _interopRequireDefault(require("@material-ui/core/Grow"));
|
33
|
+
|
34
|
+
var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
35
|
+
|
36
|
+
var _Popper = _interopRequireDefault(require("@material-ui/core/Popper"));
|
37
|
+
|
38
|
+
var _ClickAwayListener = _interopRequireDefault(require("@material-ui/core/ClickAwayListener"));
|
39
|
+
|
40
|
+
var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
|
41
|
+
|
42
|
+
var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
|
43
|
+
|
44
|
+
var _HiSelectInput = _interopRequireDefault(require("./HiSelectInput"));
|
45
|
+
|
46
|
+
var _styles = require("@material-ui/core/styles");
|
47
|
+
|
48
|
+
var _helpers = require("../utils/helpers");
|
49
|
+
|
50
|
+
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
51
|
+
|
52
|
+
var _keycode = _interopRequireDefault(require("keycode"));
|
53
|
+
|
54
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
55
|
+
|
56
|
+
var _HiAlertModal = _interopRequireDefault(require("../HiAlertModal"));
|
57
|
+
|
58
|
+
var _reactDeviceDetect = require("react-device-detect");
|
59
|
+
|
60
|
+
var _HiSelectMobile = _interopRequireDefault(require("./HiSelectMobile"));
|
61
|
+
|
62
|
+
var _reactDom = require("react-dom");
|
63
|
+
|
64
|
+
var styles = function styles(theme) {
|
29
65
|
return {
|
30
66
|
root: {
|
31
67
|
backgroundColor: theme.palette.background2,
|
@@ -58,7 +94,7 @@ export var styles = function styles(theme) {
|
|
58
94
|
margin: '0 4px',
|
59
95
|
verticalAlign: 'text-bottom'
|
60
96
|
},
|
61
|
-
selectIconLabel:
|
97
|
+
selectIconLabel: (0, _objectSpread2.default)({
|
62
98
|
whiteSpace: 'nowrap',
|
63
99
|
overflow: 'hidden',
|
64
100
|
textOverflow: 'ellipsis',
|
@@ -67,7 +103,7 @@ export var styles = function styles(theme) {
|
|
67
103
|
display: 'inline-block',
|
68
104
|
width: '100%'
|
69
105
|
}),
|
70
|
-
selectImgLabel:
|
106
|
+
selectImgLabel: (0, _objectSpread2.default)({
|
71
107
|
whiteSpace: 'nowrap',
|
72
108
|
overflow: 'hidden',
|
73
109
|
textOverflow: 'ellipsis',
|
@@ -82,8 +118,10 @@ export var styles = function styles(theme) {
|
|
82
118
|
};
|
83
119
|
};
|
84
120
|
|
121
|
+
exports.styles = styles;
|
122
|
+
|
85
123
|
function filterValue(item, search) {
|
86
|
-
return search === '' || foldAccents(item.label.toString().toLowerCase()).search(foldAccents(search.toLowerCase())) !== -1;
|
124
|
+
return search === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(search.toLowerCase())) !== -1;
|
87
125
|
}
|
88
126
|
/**
|
89
127
|
*
|
@@ -105,43 +143,42 @@ function filterValue(item, search) {
|
|
105
143
|
var HiSelect =
|
106
144
|
/*#__PURE__*/
|
107
145
|
function (_React$PureComponent) {
|
108
|
-
|
146
|
+
(0, _inherits2.default)(HiSelect, _React$PureComponent);
|
109
147
|
|
110
148
|
function HiSelect(props) {
|
111
149
|
var _this;
|
112
150
|
|
113
|
-
|
151
|
+
(0, _classCallCheck2.default)(this, HiSelect);
|
152
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HiSelect).call(this, props));
|
114
153
|
|
115
|
-
_this =
|
116
|
-
|
117
|
-
_defineProperty(_assertThisInitialized(_this), "buildSelectProps", function (options) {
|
154
|
+
_this.buildSelectProps = function (options) {
|
118
155
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
119
156
|
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
120
157
|
var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
121
158
|
// build item list
|
122
|
-
var itemList = [].concat(
|
159
|
+
var itemList = [].concat((0, _toConsumableArray2.default)(loading ? [{
|
123
160
|
id: '_loading',
|
124
161
|
type: 'loader',
|
125
162
|
disabled: true,
|
126
163
|
centered: true,
|
127
164
|
hideCheckbox: true,
|
128
165
|
label: 'loading'
|
129
|
-
}] : []),
|
166
|
+
}] : []), (0, _toConsumableArray2.default)(search !== '' ? (0, _toConsumableArray2.default)(options.filter(function (item) {
|
130
167
|
return _this.props.filterFunc(item, search);
|
131
|
-
})) : [].concat(
|
168
|
+
})) : [].concat((0, _toConsumableArray2.default)(_this.props.hasAll ? [(0, _objectSpread2.default)({
|
132
169
|
id: '_all',
|
133
170
|
label: _this.props.translations.all
|
134
171
|
}, _this.props.iconAll && {
|
135
172
|
type: 'icon',
|
136
173
|
icon: _this.props.iconAll
|
137
|
-
})] : []),
|
174
|
+
})] : []), (0, _toConsumableArray2.default)(options))));
|
138
175
|
return {
|
139
176
|
itemList: itemList,
|
140
177
|
inputValue: _this.buildInputValue(options, value, loading)
|
141
178
|
};
|
142
|
-
}
|
179
|
+
};
|
143
180
|
|
144
|
-
|
181
|
+
_this.buildInputValue = function (options) {
|
145
182
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
146
183
|
var loading = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
147
184
|
var _this$props = _this.props,
|
@@ -167,17 +204,17 @@ function (_React$PureComponent) {
|
|
167
204
|
if (item === undefined) {
|
168
205
|
inputValue = translations.one_item_selected;
|
169
206
|
} else if (type === 'icon' || item.type === 'icon') {
|
170
|
-
inputValue =
|
207
|
+
inputValue = _react.default.createElement("span", {
|
171
208
|
className: classes.selectIconLabel
|
172
|
-
},
|
209
|
+
}, _react.default.createElement(_HiIcon.default, {
|
173
210
|
className: classes.labelIcon,
|
174
211
|
color: item.color,
|
175
212
|
icon: item.icon
|
176
213
|
}), item.label);
|
177
214
|
} else if (type === 'image' || item.type === 'image') {
|
178
|
-
inputValue =
|
215
|
+
inputValue = _react.default.createElement("span", {
|
179
216
|
className: classes.selectIconLabel
|
180
|
-
}, item.img &&
|
217
|
+
}, item.img && _react.default.createElement("img", {
|
181
218
|
className: classes.labelImg,
|
182
219
|
src: item.img,
|
183
220
|
alt: item.label,
|
@@ -195,9 +232,9 @@ function (_React$PureComponent) {
|
|
195
232
|
}
|
196
233
|
|
197
234
|
return inputValue;
|
198
|
-
}
|
235
|
+
};
|
199
236
|
|
200
|
-
|
237
|
+
_this.focusOnFirstItem = function () {
|
201
238
|
if (_this.overlay && _this.overlay.getElementsByTagName('li')[0]) {
|
202
239
|
setTimeout(function () {
|
203
240
|
var item = _this.overlay.getElementsByTagName('li')[0];
|
@@ -205,17 +242,17 @@ function (_React$PureComponent) {
|
|
205
242
|
item.focus();
|
206
243
|
}, 1);
|
207
244
|
}
|
208
|
-
}
|
245
|
+
};
|
209
246
|
|
210
|
-
|
247
|
+
_this.getInputElement = function (el) {
|
211
248
|
_this.searchField = el;
|
212
249
|
|
213
250
|
if (_this.props.inputRef) {
|
214
251
|
_this.props.inputRef(_this.searchField);
|
215
252
|
}
|
216
|
-
}
|
253
|
+
};
|
217
254
|
|
218
|
-
|
255
|
+
_this.handleBlur = function (event) {
|
219
256
|
_this.handleSearchReset();
|
220
257
|
|
221
258
|
_this.setState({
|
@@ -225,9 +262,9 @@ function (_React$PureComponent) {
|
|
225
262
|
if (_this.props.onBlur && !_this.inputEl.contains(event.relatedTarget) && !_this.state.open) {
|
226
263
|
_this.props.onBlur(event);
|
227
264
|
}
|
228
|
-
}
|
265
|
+
};
|
229
266
|
|
230
|
-
|
267
|
+
_this.handleClick = function () {
|
231
268
|
if (_this.state.open) {
|
232
269
|
_this.handleClose();
|
233
270
|
} else if (_this.props.alert && !_this.state.alertOpen) {
|
@@ -252,27 +289,27 @@ function (_React$PureComponent) {
|
|
252
289
|
}
|
253
290
|
}, 1);
|
254
291
|
}
|
255
|
-
}
|
292
|
+
};
|
256
293
|
|
257
|
-
|
294
|
+
_this.handleSubmitAlert = function () {
|
258
295
|
_this.handleClick();
|
259
|
-
}
|
296
|
+
};
|
260
297
|
|
261
|
-
|
298
|
+
_this.handleCancelAlert = function () {
|
262
299
|
_this.handleClose();
|
263
|
-
}
|
300
|
+
};
|
264
301
|
|
265
|
-
|
302
|
+
_this.handleExitedAlert = function () {
|
266
303
|
if (_this.searchField) {
|
267
304
|
_this.searchField.focus();
|
268
305
|
}
|
269
|
-
}
|
306
|
+
};
|
270
307
|
|
271
|
-
|
308
|
+
_this.handleCloseAlert = function () {
|
272
309
|
_this.handleClose();
|
273
|
-
}
|
310
|
+
};
|
274
311
|
|
275
|
-
|
312
|
+
_this.focusOnSelectedItem = function (selectedValue) {
|
276
313
|
if (_this.overlay && _this.overlay.getElementsByTagName('li')[0]) {
|
277
314
|
setTimeout(function () {
|
278
315
|
if (_this.overlay) {
|
@@ -291,16 +328,16 @@ function (_React$PureComponent) {
|
|
291
328
|
}
|
292
329
|
}, 1);
|
293
330
|
}
|
294
|
-
}
|
331
|
+
};
|
295
332
|
|
296
|
-
|
333
|
+
_this.handleClickAway = function (event) {
|
297
334
|
// Au clic sur le bouton, on laisse le handleClick fermer le select
|
298
335
|
if (!_this.inputEl.contains(event.target)) {
|
299
336
|
_this.handleClose(event);
|
300
337
|
}
|
301
|
-
}
|
338
|
+
};
|
302
339
|
|
303
|
-
|
340
|
+
_this.handleClose = function () {
|
304
341
|
_this.handleSearchReset();
|
305
342
|
|
306
343
|
_this.setState({
|
@@ -315,16 +352,16 @@ function (_React$PureComponent) {
|
|
315
352
|
if (_this.inputEl) {
|
316
353
|
_this.inputEl.focus();
|
317
354
|
}
|
318
|
-
}
|
355
|
+
};
|
319
356
|
|
320
|
-
|
357
|
+
_this.handleFocus = function () {
|
321
358
|
_this.setState({
|
322
359
|
focused: true
|
323
360
|
});
|
324
|
-
}
|
361
|
+
};
|
325
362
|
|
326
|
-
|
327
|
-
var key =
|
363
|
+
_this.handleKeyDownCapture = function (event) {
|
364
|
+
var key = (0, _keycode.default)(event);
|
328
365
|
|
329
366
|
if (key === 'enter') {
|
330
367
|
if (_this.state.open) {
|
@@ -335,10 +372,10 @@ function (_React$PureComponent) {
|
|
335
372
|
}
|
336
373
|
}
|
337
374
|
}
|
338
|
-
}
|
375
|
+
};
|
339
376
|
|
340
|
-
|
341
|
-
var key =
|
377
|
+
_this.handleKeyDown = function (event) {
|
378
|
+
var key = (0, _keycode.default)(event);
|
342
379
|
|
343
380
|
if (!_this.state.alertOpen) {
|
344
381
|
if (key === 'esc') {
|
@@ -359,10 +396,10 @@ function (_React$PureComponent) {
|
|
359
396
|
_this.handleClose();
|
360
397
|
}
|
361
398
|
}
|
362
|
-
}
|
399
|
+
};
|
363
400
|
|
364
|
-
|
365
|
-
var key =
|
401
|
+
_this.handleKeyDownSearch = function (event) {
|
402
|
+
var key = (0, _keycode.default)(event);
|
366
403
|
|
367
404
|
if (_this.overlay && (key === 'down' || key === 'up')) {
|
368
405
|
_this.focusOnFirstItem();
|
@@ -375,15 +412,15 @@ function (_React$PureComponent) {
|
|
375
412
|
open: false
|
376
413
|
});
|
377
414
|
}
|
378
|
-
}
|
415
|
+
};
|
379
416
|
|
380
|
-
|
417
|
+
_this.handleScroll = function (e) {
|
381
418
|
if (e.target.scrollHeight - e.target.clientHeight - e.target.scrollTop < 15) {
|
382
419
|
_this.props.onScrollReachBottom();
|
383
420
|
}
|
384
|
-
}
|
421
|
+
};
|
385
422
|
|
386
|
-
|
423
|
+
_this.handleSelect = function (event, item) {
|
387
424
|
var _this$props2 = _this.props,
|
388
425
|
hasAll = _this$props2.hasAll,
|
389
426
|
multiple = _this$props2.multiple,
|
@@ -406,7 +443,7 @@ function (_React$PureComponent) {
|
|
406
443
|
return option.id;
|
407
444
|
}), item);
|
408
445
|
}
|
409
|
-
} else if (isMobile && multiple) {
|
446
|
+
} else if (_reactDeviceDetect.isMobile && multiple) {
|
410
447
|
// Array of selected values
|
411
448
|
onChange(event, item.map(function (option) {
|
412
449
|
return option.id;
|
@@ -417,11 +454,11 @@ function (_React$PureComponent) {
|
|
417
454
|
return id !== item.id;
|
418
455
|
}), item);
|
419
456
|
} else {
|
420
|
-
onChange(event, [].concat(
|
457
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
421
458
|
}
|
422
|
-
}
|
459
|
+
};
|
423
460
|
|
424
|
-
|
461
|
+
_this.handleSuggestions = function (suggestions) {
|
425
462
|
var _this$props3 = _this.props,
|
426
463
|
hasAll = _this$props3.hasAll,
|
427
464
|
iconAll = _this$props3.iconAll,
|
@@ -430,7 +467,7 @@ function (_React$PureComponent) {
|
|
430
467
|
if (suggestions.length === 0) {
|
431
468
|
// Add '_no_result' suggestion
|
432
469
|
_this.setState(function (prevState) {
|
433
|
-
return
|
470
|
+
return (0, _objectSpread2.default)({}, prevState, {
|
434
471
|
suggestions: [{
|
435
472
|
id: '_no_result',
|
436
473
|
type: 'text',
|
@@ -443,18 +480,18 @@ function (_React$PureComponent) {
|
|
443
480
|
});
|
444
481
|
} else {
|
445
482
|
_this.setState({
|
446
|
-
suggestions: [].concat(
|
483
|
+
suggestions: [].concat((0, _toConsumableArray2.default)(hasAll ? [(0, _objectSpread2.default)({
|
447
484
|
id: '_all',
|
448
485
|
label: translations.all
|
449
486
|
}, iconAll && {
|
450
487
|
type: 'icon',
|
451
488
|
icon: iconAll
|
452
|
-
})] : []),
|
489
|
+
})] : []), (0, _toConsumableArray2.default)(suggestions))
|
453
490
|
});
|
454
491
|
}
|
455
|
-
}
|
492
|
+
};
|
456
493
|
|
457
|
-
|
494
|
+
_this.handleSearch = function (e, inputValue) {
|
458
495
|
var searchValue = inputValue && e.target.value ? inputValue : e.target.value;
|
459
496
|
|
460
497
|
if (_this.props.onSearch) {
|
@@ -464,17 +501,17 @@ function (_React$PureComponent) {
|
|
464
501
|
searchValue: searchValue
|
465
502
|
});
|
466
503
|
}
|
467
|
-
}
|
504
|
+
};
|
468
505
|
|
469
|
-
|
506
|
+
_this.handleSearchReset = function () {
|
470
507
|
_this.handleSearch({
|
471
508
|
target: {
|
472
509
|
value: ''
|
473
510
|
}
|
474
511
|
}, '');
|
475
|
-
}
|
512
|
+
};
|
476
513
|
|
477
|
-
|
514
|
+
_this.getLengthItemList = function (itemList) {
|
478
515
|
var itemListLength = 0;
|
479
516
|
itemList.forEach(function (parent) {
|
480
517
|
if (parent.displayed !== false) {
|
@@ -486,7 +523,7 @@ function (_React$PureComponent) {
|
|
486
523
|
}
|
487
524
|
});
|
488
525
|
return itemListLength;
|
489
|
-
}
|
526
|
+
};
|
490
527
|
|
491
528
|
_this.state = {
|
492
529
|
alertOpen: false,
|
@@ -500,7 +537,7 @@ function (_React$PureComponent) {
|
|
500
537
|
return _this;
|
501
538
|
}
|
502
539
|
|
503
|
-
|
540
|
+
(0, _createClass2.default)(HiSelect, [{
|
504
541
|
key: "componentDidMount",
|
505
542
|
value: function componentDidMount() {
|
506
543
|
if (this.props.autoFocus) {
|
@@ -509,7 +546,7 @@ function (_React$PureComponent) {
|
|
509
546
|
|
510
547
|
if (this.overlay) {
|
511
548
|
this.setState({
|
512
|
-
overlayWidth: findDOMNode(this.overlay).clientWidth
|
549
|
+
overlayWidth: (0, _reactDom.findDOMNode)(this.overlay).clientWidth
|
513
550
|
});
|
514
551
|
}
|
515
552
|
}
|
@@ -560,7 +597,7 @@ function (_React$PureComponent) {
|
|
560
597
|
var selectedItemIdList = [];
|
561
598
|
|
562
599
|
if (value) {
|
563
|
-
selectedItemIdList = multiple ?
|
600
|
+
selectedItemIdList = multiple ? (0, _toConsumableArray2.default)(value) : [value];
|
564
601
|
}
|
565
602
|
|
566
603
|
var _buildSelectProps = buildSelectProps(options, selectedItemIdList, searchValue, loading),
|
@@ -580,11 +617,11 @@ function (_React$PureComponent) {
|
|
580
617
|
}
|
581
618
|
}
|
582
619
|
|
583
|
-
var popperClass =
|
620
|
+
var popperClass = (0, _classnames.default)(classes.popper, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.popperWidth, !this.props.containerWidth), (0, _defineProperty2.default)(_classNames, classes.popperRightAlign, this.props.containerWidth && this.props.align === 'right'), _classNames));
|
584
621
|
|
585
622
|
var searchInput = function searchInput(position) {
|
586
623
|
if (searchable) {
|
587
|
-
return
|
624
|
+
return _react.default.createElement(_HiInput.default, (0, _extends2.default)({
|
588
625
|
value: searchValue,
|
589
626
|
autoFocus: true,
|
590
627
|
inputRef: _this2.getInputElement,
|
@@ -594,7 +631,7 @@ function (_React$PureComponent) {
|
|
594
631
|
placeholder: translations.search,
|
595
632
|
startAdornment: 'search',
|
596
633
|
tabIndex: 0,
|
597
|
-
className:
|
634
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, classes.separator, position === 'top'))
|
598
635
|
}, hiSearchInputProps));
|
599
636
|
}
|
600
637
|
|
@@ -621,20 +658,20 @@ function (_React$PureComponent) {
|
|
621
658
|
|
622
659
|
var nbItemsDisplayed = !!searchable ? maxOptionsDisplayed - 1 : maxOptionsDisplayed;
|
623
660
|
var autoHeightMax = nbItemsDisplayed * 40 - 10;
|
624
|
-
return
|
661
|
+
return _react.default.createElement(_ClickAwayListener.default, {
|
625
662
|
onClickAway: _this2.handleClickAway
|
626
|
-
},
|
663
|
+
}, _react.default.createElement(_Grow.default, {
|
627
664
|
in: open,
|
628
665
|
id: "menu-list",
|
629
666
|
style: {
|
630
667
|
transformOrigin: '0 0 0'
|
631
668
|
}
|
632
|
-
},
|
669
|
+
}, _react.default.createElement(_Paper.default, {
|
633
670
|
style: maxOptionsDisplayed < 12 ? {
|
634
671
|
maxHeight: 40 * maxOptionsDisplayed
|
635
672
|
} : {},
|
636
673
|
className: classes.paper
|
637
|
-
}, (_this2.placement && _this2.placement.indexOf('bottom') >= 0 || staticPosition) && searchInput('bottom'), startAdornment,
|
674
|
+
}, (_this2.placement && _this2.placement.indexOf('bottom') >= 0 || staticPosition) && searchInput('bottom'), startAdornment, _react.default.createElement(_reactCustomScrollbars.default, (0, _extends2.default)({
|
638
675
|
ref: function ref(contentEl) {
|
639
676
|
_this2.optionsContent = contentEl;
|
640
677
|
},
|
@@ -642,7 +679,7 @@ function (_React$PureComponent) {
|
|
642
679
|
autoHeightMax: autoHeightMax
|
643
680
|
}, onScrollReachBottom && {
|
644
681
|
onScroll: _this2.handleScroll
|
645
|
-
}),
|
682
|
+
}), _react.default.createElement(_HiSelectableList.default, (0, _extends2.default)({
|
646
683
|
type: type,
|
647
684
|
itemList: itemList,
|
648
685
|
onSelect: _this2.handleSelect,
|
@@ -653,14 +690,14 @@ function (_React$PureComponent) {
|
|
653
690
|
}, hiSelectableListProps))), _this2.placement && _this2.placement.indexOf('top') >= 0 && !staticPosition && searchInput('top'))));
|
654
691
|
};
|
655
692
|
|
656
|
-
return !isMobile ?
|
693
|
+
return !_reactDeviceDetect.isMobile ? _react.default.createElement("div", {
|
657
694
|
className: classes.root,
|
658
695
|
ref: function ref(el) {
|
659
696
|
_this2.overlay = el;
|
660
697
|
},
|
661
698
|
onKeyDown: this.handleKeyDown,
|
662
699
|
onKeyDownCapture: this.handleKeyDownCapture
|
663
|
-
}, alert &&
|
700
|
+
}, alert && _react.default.createElement(_HiAlertModal.default, {
|
664
701
|
open: alertOpen,
|
665
702
|
title: alert.title,
|
666
703
|
content: alert.content,
|
@@ -670,7 +707,7 @@ function (_React$PureComponent) {
|
|
670
707
|
onExited: this.handleExitedAlert,
|
671
708
|
labelSubmitButton: alert.submitButton,
|
672
709
|
labelCancelButton: alert.cancelButton
|
673
|
-
}),
|
710
|
+
}), _react.default.createElement(_HiSelectInput.default, (0, _extends2.default)({
|
674
711
|
id: id,
|
675
712
|
value: inputValue,
|
676
713
|
open: open,
|
@@ -691,21 +728,21 @@ function (_React$PureComponent) {
|
|
691
728
|
refElement: function refElement(el) {
|
692
729
|
_this2.inputEl = el;
|
693
730
|
}
|
694
|
-
})), open && staticPosition ?
|
731
|
+
})), open && staticPosition ? _react.default.createElement("div", {
|
695
732
|
style: popperStyle,
|
696
733
|
className: popperClass
|
697
|
-
}, content({})) :
|
734
|
+
}, content({})) : _react.default.createElement(_Popper.default, {
|
698
735
|
anchorEl: this.inputEl,
|
699
736
|
placement: "bottom-start",
|
700
737
|
open: open,
|
701
738
|
className: popperClass,
|
702
739
|
disablePortal: true,
|
703
740
|
style: popperStyle
|
704
|
-
}, content)) :
|
741
|
+
}, content)) : _react.default.createElement("div", {
|
705
742
|
ref: function ref(el) {
|
706
743
|
_this2.overlay = el;
|
707
744
|
}
|
708
|
-
},
|
745
|
+
}, _react.default.createElement(_HiSelectInput.default, (0, _extends2.default)({
|
709
746
|
id: id,
|
710
747
|
value: inputValue,
|
711
748
|
open: open,
|
@@ -724,7 +761,7 @@ function (_React$PureComponent) {
|
|
724
761
|
refElement: function refElement(el) {
|
725
762
|
_this2.inputEl = el;
|
726
763
|
}
|
727
|
-
})),
|
764
|
+
})), _react.default.createElement(_HiSelectMobile.default, {
|
728
765
|
onChange: this.handleSelect,
|
729
766
|
multiple: multiple,
|
730
767
|
id: id,
|
@@ -737,7 +774,7 @@ function (_React$PureComponent) {
|
|
737
774
|
key: "getDerivedStateFromProps",
|
738
775
|
value: function getDerivedStateFromProps(nextProps, prevState) {
|
739
776
|
if (nextProps.options !== prevState.suggestions) {
|
740
|
-
return
|
777
|
+
return (0, _objectSpread2.default)({}, prevState, {
|
741
778
|
suggestions: nextProps.options
|
742
779
|
});
|
743
780
|
}
|
@@ -754,11 +791,10 @@ function (_React$PureComponent) {
|
|
754
791
|
*/
|
755
792
|
|
756
793
|
}]);
|
757
|
-
|
758
794
|
return HiSelect;
|
759
|
-
}(
|
795
|
+
}(_react.default.PureComponent);
|
760
796
|
|
761
|
-
|
797
|
+
HiSelect.defaultProps = {
|
762
798
|
align: 'left',
|
763
799
|
autoFocus: false,
|
764
800
|
disabled: false,
|
@@ -784,9 +820,11 @@ _defineProperty(HiSelect, "defaultProps", {
|
|
784
820
|
type: 'text',
|
785
821
|
filterFunc: filterValue,
|
786
822
|
maxOptionsDisplayed: 12
|
787
|
-
}
|
823
|
+
};
|
788
824
|
|
789
|
-
|
825
|
+
var _default = (0, _styles.withStyles)(styles, {
|
790
826
|
hiComponent: true,
|
791
827
|
name: 'HmuiHiSelect'
|
792
|
-
})(HiSelect);
|
828
|
+
})(HiSelect);
|
829
|
+
|
830
|
+
exports.default = _default;
|