@hipay/hipay-material-ui 3.15.2 → 3.15.3-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 +11 -42
- package/HiAppBar/index.js +0 -2
- package/HiAvatar/HiAvatar.js +3 -12
- package/HiAvatar/index.js +0 -2
- package/HiBadge/HiBadge.js +17 -33
- package/HiBadge/index.js +0 -2
- package/HiBreadcrumb/HiBreadcrumb.js +6 -30
- package/HiBreadcrumb/HiStep.js +13 -45
- package/HiBreadcrumb/HiStepConnector.js +15 -50
- package/HiBreadcrumb/HiStepContent.js +6 -30
- package/HiBreadcrumb/HiStepIcon.js +17 -42
- package/HiBreadcrumb/HiStepLabel.js +17 -47
- package/HiBreadcrumb/HiStepper.js +6 -30
- package/HiBreadcrumb/index.js +0 -2
- package/HiButton/HiButton.js +12 -37
- package/HiButton/index.js +1 -5
- package/HiCell/CellAddress.js +12 -33
- package/HiCell/CellDate.js +10 -36
- package/HiCell/CellHiddenContent.js +8 -30
- package/HiCell/CellIcon.js +12 -36
- package/HiCell/CellImage.js +12 -34
- package/HiCell/CellNumeric.js +13 -40
- package/HiCell/CellPinToAction.js +9 -33
- package/HiCell/CellRate.js +17 -51
- package/HiCell/CellSentinel.js +12 -33
- package/HiCell/CellSentinelScore.js +9 -31
- package/HiCell/CellText.js +16 -52
- package/HiCell/CellTextStyled.js +13 -24
- package/HiCell/index.js +0 -10
- package/HiCheckbox/HiCheckbox.js +19 -56
- package/HiCheckbox/index.js +0 -2
- package/HiChip/HiChip.js +24 -47
- package/HiChip/HiChipSwitch.js +16 -59
- package/HiChip/index.js +0 -3
- package/HiColoredLabel/HiColoredLabel.js +47 -69
- package/HiColoredLabel/index.js +0 -2
- package/HiDatePicker/Caption.js +9 -21
- package/HiDatePicker/HiDatePicker.js +16 -88
- package/HiDatePicker/HiDatePickerMobile.js +18 -43
- package/HiDatePicker/HiDateRangePicker.js +38 -134
- package/HiDatePicker/HiDateRangeSelector.js +49 -130
- package/HiDatePicker/ListPicker.js +8 -38
- 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 +4 -26
- package/HiDatePicker/Overlays/Overlay.js +8 -25
- package/HiDatePicker/Overlays/TimePickerOverlay.js +8 -39
- package/HiDatePicker/Overlays/YearPickerOverlay.js +8 -31
- 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 +7 -13
- package/HiDialog/HiDialog.js +7 -19
- package/HiDialog/index.js +0 -2
- package/HiDotsStepper/HiDot.js +9 -38
- package/HiDotsStepper/HiDotsStepper.js +10 -37
- package/HiDotsStepper/index.js +0 -3
- package/HiExpansionPanel/HiExpansionPanel.js +16 -38
- package/HiExpansionPanel/index.js +1 -5
- package/HiForm/HiAddressField.js +10 -36
- package/HiForm/HiEmailField.js +5 -29
- package/HiForm/HiFormControl.js +31 -77
- package/HiForm/HiFormLabel.js +16 -42
- package/HiForm/HiInput.js +34 -92
- package/HiForm/HiPasswordField.js +8 -36
- package/HiForm/HiSearchField.js +3 -34
- package/HiForm/HiSlider.js +22 -57
- package/HiForm/HiTextField.js +22 -47
- package/HiForm/HiUpload.js +35 -95
- package/HiForm/HiUploadField.js +10 -32
- package/HiForm/HiUploadInput.js +24 -77
- package/HiForm/index.js +0 -12
- package/HiIcon/HiIcon.js +9 -34
- package/HiIcon/index.js +0 -2
- package/HiIconButton/HiIconButton.js +7 -22
- package/HiIconButton/index.js +0 -2
- package/HiListItemLink/HiListItemLink.js +7 -19
- package/HiListItemLink/index.js +0 -2
- package/HiLoader/HiLoader.js +6 -16
- package/HiLoader/index.js +0 -2
- package/HiNotice/HiKPI.js +17 -48
- 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 +24 -57
- package/HiPdfReader/index.js +0 -2
- package/HiPin/HiPin.js +16 -28
- package/HiPin/index.js +0 -2
- package/HiRadio/HiRadio.js +12 -23
- package/HiRadio/index.js +0 -2
- package/HiScrollStepper/HiScrollStepper.js +29 -67
- package/HiScrollStepper/index.js +0 -2
- package/HiSelect/HiDynamicSelect.js +32 -42
- package/HiSelect/HiDynamicSelectField.js +24 -48
- package/HiSelect/HiNestedSelect.js +65 -111
- package/HiSelect/HiNestedSelectContent.js +60 -86
- package/HiSelect/HiNestedSelectField.js +24 -48
- package/HiSelect/HiSelect.js +89 -187
- package/HiSelect/HiSelectContent.js +62 -97
- package/HiSelect/HiSelectField.js +25 -49
- package/HiSelect/HiSelectInput.js +24 -77
- package/HiSelect/HiSelectMobile.js +7 -44
- package/HiSelect/HiSuggestSelect.js +25 -81
- package/HiSelect/HiSuggestSelectField.js +15 -39
- package/HiSelect/index.js +2 -14
- package/HiSelectableList/HiSelectableList.js +34 -90
- package/HiSelectableList/HiSelectableListHierarchic.js +34 -60
- package/HiSelectableList/HiSelectableListItem.js +45 -88
- package/HiSelectableList/index.js +0 -4
- package/HiStepper/DefaultIndicator.js +1 -10
- package/HiStepper/HiStep.js +21 -51
- package/HiStepper/HiStepper.js +2 -15
- package/HiStepper/index.js +0 -3
- package/HiSwitch/HiSwitch.js +19 -43
- package/HiSwitch/HiSwitchState.js +22 -39
- package/HiSwitch/index.js +0 -3
- package/HiTable/HiCellBuilder.js +10 -65
- package/HiTable/HiTable.js +20 -48
- package/HiTable/HiTableBody.js +7 -24
- package/HiTable/HiTableHeader.js +18 -51
- package/HiTable/HiTableRow.js +12 -46
- 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 +11 -42
- 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 +17 -33
- package/es/HiBadge/index.js +0 -2
- package/es/HiBreadcrumb/HiBreadcrumb.js +6 -30
- package/es/HiBreadcrumb/HiStep.js +13 -45
- package/es/HiBreadcrumb/HiStepConnector.js +15 -50
- package/es/HiBreadcrumb/HiStepContent.js +6 -30
- package/es/HiBreadcrumb/HiStepIcon.js +17 -42
- package/es/HiBreadcrumb/HiStepLabel.js +17 -47
- package/es/HiBreadcrumb/HiStepper.js +6 -30
- package/es/HiBreadcrumb/index.js +0 -2
- package/es/HiButton/HiButton.js +12 -37
- package/es/HiButton/index.js +1 -5
- package/es/HiCell/CellAddress.js +12 -33
- package/es/HiCell/CellDate.js +10 -36
- package/es/HiCell/CellHiddenContent.js +8 -30
- package/es/HiCell/CellIcon.js +12 -36
- package/es/HiCell/CellImage.js +12 -34
- package/es/HiCell/CellNumeric.js +13 -40
- package/es/HiCell/CellPinToAction.js +9 -33
- package/es/HiCell/CellRate.js +17 -51
- package/es/HiCell/CellSentinel.js +12 -33
- package/es/HiCell/CellSentinelScore.js +9 -31
- package/es/HiCell/CellText.js +16 -52
- package/es/HiCell/CellTextStyled.js +13 -24
- package/es/HiCell/index.js +0 -10
- package/es/HiCheckbox/HiCheckbox.js +19 -56
- package/es/HiCheckbox/index.js +0 -2
- package/es/HiChip/HiChip.js +24 -47
- package/es/HiChip/HiChipSwitch.js +16 -59
- package/es/HiChip/index.js +0 -3
- package/es/HiColoredLabel/HiColoredLabel.js +47 -69
- package/es/HiColoredLabel/index.js +0 -2
- package/es/HiDatePicker/Caption.js +9 -21
- package/es/HiDatePicker/HiDatePicker.js +16 -88
- package/es/HiDatePicker/HiDatePickerMobile.js +18 -43
- package/es/HiDatePicker/HiDateRangePicker.js +38 -134
- package/es/HiDatePicker/HiDateRangeSelector.js +49 -130
- package/es/HiDatePicker/ListPicker.js +8 -38
- 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 +4 -26
- package/es/HiDatePicker/Overlays/Overlay.js +8 -25
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +8 -39
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +8 -31
- 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 +7 -13
- package/es/HiDialog/HiDialog.js +7 -19
- package/es/HiDialog/index.js +0 -2
- package/es/HiDotsStepper/HiDot.js +9 -38
- package/es/HiDotsStepper/HiDotsStepper.js +10 -37
- 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 +10 -36
- package/es/HiForm/HiEmailField.js +5 -29
- package/es/HiForm/HiFormControl.js +31 -77
- package/es/HiForm/HiFormLabel.js +16 -42
- package/es/HiForm/HiInput.js +34 -92
- package/es/HiForm/HiPasswordField.js +8 -36
- package/es/HiForm/HiSearchField.js +3 -34
- package/es/HiForm/HiSlider.js +22 -57
- package/es/HiForm/HiTextField.js +22 -47
- package/es/HiForm/HiUpload.js +35 -95
- package/es/HiForm/HiUploadField.js +10 -32
- package/es/HiForm/HiUploadInput.js +24 -77
- 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 +7 -22
- package/es/HiIconButton/index.js +0 -2
- package/es/HiListItemLink/HiListItemLink.js +7 -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 +17 -48
- 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 +24 -57
- package/es/HiPdfReader/index.js +0 -2
- package/es/HiPin/HiPin.js +16 -28
- package/es/HiPin/index.js +0 -2
- package/es/HiRadio/HiRadio.js +12 -23
- 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 +32 -42
- package/es/HiSelect/HiDynamicSelectField.js +24 -48
- package/es/HiSelect/HiNestedSelect.js +65 -111
- package/es/HiSelect/HiNestedSelectContent.js +60 -86
- package/es/HiSelect/HiNestedSelectField.js +24 -48
- package/es/HiSelect/HiSelect.js +89 -187
- package/es/HiSelect/HiSelectContent.js +62 -97
- package/es/HiSelect/HiSelectField.js +25 -49
- package/es/HiSelect/HiSelectInput.js +24 -77
- package/es/HiSelect/HiSelectMobile.js +7 -44
- package/es/HiSelect/HiSuggestSelect.js +25 -81
- package/es/HiSelect/HiSuggestSelectField.js +15 -39
- package/es/HiSelect/index.js +2 -14
- package/es/HiSelectableList/HiSelectableList.js +34 -90
- package/es/HiSelectableList/HiSelectableListHierarchic.js +34 -60
- package/es/HiSelectableList/HiSelectableListItem.js +45 -88
- package/es/HiSelectableList/index.js +0 -4
- package/es/HiStepper/DefaultIndicator.js +1 -10
- package/es/HiStepper/HiStep.js +21 -51
- package/es/HiStepper/HiStepper.js +2 -15
- package/es/HiStepper/index.js +0 -3
- package/es/HiSwitch/HiSwitch.js +19 -43
- package/es/HiSwitch/HiSwitchState.js +22 -39
- package/es/HiSwitch/index.js +0 -3
- package/es/HiTable/HiCellBuilder.js +10 -65
- package/es/HiTable/HiTable.js +20 -48
- package/es/HiTable/HiTableBody.js +7 -24
- package/es/HiTable/HiTableHeader.js +18 -51
- package/es/HiTable/HiTableRow.js +12 -46
- 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 +15 -49
- 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 +67 -89
- package/es/styles/createStyles.js +0 -1
- package/es/styles/createTypography.js +15 -24
- package/es/styles/getStylesCreator.js +1 -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 +15 -49
- 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 +67 -89
- package/styles/createStyles.js +0 -1
- package/styles/createTypography.js +15 -24
- package/styles/getStylesCreator.js +1 -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
package/HiForm/HiInput.js
CHANGED
@@ -1,51 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.styles = exports.default = void 0;
|
9
|
-
|
10
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
11
|
-
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
13
|
-
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
15
|
-
|
16
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
17
|
-
|
18
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
19
|
-
|
20
13
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
21
|
-
|
22
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
25
|
-
|
26
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
27
|
-
|
28
17
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
29
|
-
|
30
18
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
20
|
var _index = _interopRequireDefault(require("keycode/index"));
|
35
|
-
|
36
21
|
var _Input = _interopRequireDefault(require("@mui/material/Input"));
|
37
|
-
|
38
22
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
39
|
-
|
40
23
|
var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
|
41
|
-
|
42
24
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
43
|
-
|
44
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
45
|
-
|
46
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
47
|
-
|
48
|
-
var styles = function styles(theme) {
|
27
|
+
var styles = exports.styles = function styles(theme) {
|
49
28
|
return {
|
50
29
|
root: (0, _objectSpread2.default)({
|
51
30
|
position: 'relative'
|
@@ -78,8 +57,8 @@ var styles = function styles(theme) {
|
|
78
57
|
easing: theme.transitions.easing.easeOut
|
79
58
|
}),
|
80
59
|
pointerEvents: 'none' // Transparent to the hover style.
|
81
|
-
|
82
60
|
},
|
61
|
+
|
83
62
|
'&:not($error):hover:after': {
|
84
63
|
transform: 'scaleX(1)'
|
85
64
|
},
|
@@ -89,7 +68,7 @@ var styles = function styles(theme) {
|
|
89
68
|
},
|
90
69
|
focused: {},
|
91
70
|
error: {
|
92
|
-
border: "1px solid ".concat(theme.palette.
|
71
|
+
border: "1px solid ".concat(theme.palette.error.main),
|
93
72
|
paddingLeft: 8,
|
94
73
|
borderRadius: 2
|
95
74
|
},
|
@@ -160,44 +139,32 @@ var styles = function styles(theme) {
|
|
160
139
|
}
|
161
140
|
};
|
162
141
|
};
|
163
|
-
|
164
|
-
exports.styles = styles;
|
165
|
-
|
166
142
|
var _ref = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
167
143
|
icon: "close",
|
168
144
|
size: 20,
|
169
145
|
color: "neutral"
|
170
146
|
});
|
171
|
-
|
172
147
|
var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
173
148
|
(0, _inherits2.default)(HiInput, _React$PureComponent);
|
174
|
-
|
175
149
|
var _super = _createSuper(HiInput);
|
176
|
-
|
177
150
|
function HiInput() {
|
178
151
|
var _this;
|
179
|
-
|
180
152
|
(0, _classCallCheck2.default)(this, HiInput);
|
181
153
|
_this = _super.call(this);
|
182
|
-
|
183
154
|
_this.handleKeyDown = function (event) {
|
184
155
|
var key = (0, _index.default)(event);
|
185
|
-
|
186
156
|
if (_this.props.onKeyDown) {
|
187
157
|
_this.props.onKeyDown(event);
|
188
158
|
}
|
189
|
-
|
190
159
|
if (key === 'enter' && _this.props.onSubmit) {
|
191
160
|
_this.props.onSubmit(event);
|
192
161
|
}
|
193
162
|
};
|
194
|
-
|
195
163
|
_this.handleClick = function (event) {
|
196
164
|
if (_this.props.onClick) {
|
197
165
|
_this.props.onClick(event);
|
198
166
|
}
|
199
167
|
};
|
200
|
-
|
201
168
|
_this.state = {
|
202
169
|
focused: false
|
203
170
|
};
|
@@ -212,12 +179,10 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
212
179
|
_this.handleOverlayRef = _this.handleOverlayRef.bind((0, _assertThisInitialized2.default)(_this));
|
213
180
|
return _this;
|
214
181
|
}
|
215
|
-
|
216
182
|
(0, _createClass2.default)(HiInput, [{
|
217
183
|
key: "getInputElement",
|
218
184
|
value: function getInputElement(el) {
|
219
185
|
this.inputElement = el;
|
220
|
-
|
221
186
|
if (this.props.customRef) {
|
222
187
|
this.props.customRef(this.inputElement);
|
223
188
|
} else if (this.props.inputRef) {
|
@@ -237,7 +202,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
237
202
|
if (this.props.onReset) {
|
238
203
|
this.props.onReset();
|
239
204
|
}
|
240
|
-
|
241
205
|
this.inputElement.focus();
|
242
206
|
}
|
243
207
|
}, {
|
@@ -253,14 +217,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
253
217
|
} else if (this.endAdornmentNode.contains(event.relatedTarget) && this.props.onBlur) {
|
254
218
|
this.props.onBlur(event);
|
255
219
|
}
|
256
|
-
|
257
220
|
event.preventDefault();
|
258
221
|
event.stopPropagation();
|
259
222
|
} else {
|
260
223
|
this.setState({
|
261
224
|
focused: false
|
262
225
|
});
|
263
|
-
|
264
226
|
if (this.props.onBlur) {
|
265
227
|
this.props.onBlur(event);
|
266
228
|
}
|
@@ -276,9 +238,8 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
276
238
|
this.setState({
|
277
239
|
focused: true
|
278
240
|
});
|
279
|
-
}
|
280
|
-
|
281
|
-
|
241
|
+
}
|
242
|
+
// If focus came from erase icon => stay focused and don't call onFocus props
|
282
243
|
if (this.eraseIconNode && this.eraseIconNode.contains(event.relatedTarget)) {
|
283
244
|
event.preventDefault();
|
284
245
|
event.stopPropagation();
|
@@ -298,7 +259,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
298
259
|
focused: true
|
299
260
|
});
|
300
261
|
}
|
301
|
-
|
302
262
|
this.inputElement.focus();
|
303
263
|
}
|
304
264
|
}
|
@@ -320,7 +280,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
320
280
|
key: "handleOverlayRef",
|
321
281
|
value: function handleOverlayRef(el) {
|
322
282
|
this.overlayNode = el;
|
323
|
-
|
324
283
|
if (this.props.overlayRef) {
|
325
284
|
this.props.overlayRef(el);
|
326
285
|
}
|
@@ -328,34 +287,31 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
328
287
|
}, {
|
329
288
|
key: "render",
|
330
289
|
value: function render() {
|
331
|
-
var
|
332
|
-
_this2 = this,
|
333
|
-
_classNames4;
|
334
|
-
|
290
|
+
var _this2 = this;
|
335
291
|
var _this$props = this.props,
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
292
|
+
value = _this$props.value,
|
293
|
+
classes = _this$props.classes,
|
294
|
+
placeholder = _this$props.placeholder,
|
295
|
+
startAdornment = _this$props.startAdornment,
|
296
|
+
endAdornmentProps = _this$props.endAdornment,
|
297
|
+
className = _this$props.className,
|
298
|
+
error = _this$props.error,
|
299
|
+
type = _this$props.type,
|
300
|
+
disabled = _this$props.disabled,
|
301
|
+
autoComplete = _this$props.autoComplete,
|
302
|
+
autoFocus = _this$props.autoFocus,
|
303
|
+
inputId = _this$props.inputId,
|
304
|
+
name = _this$props.name,
|
305
|
+
multiline = _this$props.multiline,
|
306
|
+
rows = _this$props.rows,
|
307
|
+
inputClassName = _this$props.inputClassName,
|
308
|
+
onReset = _this$props.onReset,
|
309
|
+
spellcheck = _this$props.spellcheck,
|
310
|
+
startAdornmentColor = _this$props.startAdornmentColor,
|
311
|
+
inputProps = _this$props.inputProps;
|
356
312
|
var focused = this.state.focused;
|
357
313
|
var overlayProps = (0, _objectSpread2.default)({
|
358
|
-
className: (0, _classnames.default)(classes.root, (
|
314
|
+
className: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.disabled, disabled && !error), classes.inkbar, !disabled), classes.focused, focused), classes.error, error), className)
|
359
315
|
}, !disabled && {
|
360
316
|
onClick: this.handleDivClick,
|
361
317
|
onMouseEnter: this.handleMouseEnter,
|
@@ -364,16 +320,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
364
320
|
ref: this.handleOverlayRef
|
365
321
|
});
|
366
322
|
var leftIcon;
|
367
|
-
|
368
323
|
if (!!startAdornment) {
|
369
|
-
var _classNames2;
|
370
|
-
|
371
324
|
var leftIconProps = {
|
372
325
|
color: startAdornmentColor,
|
373
326
|
onClick: this.props.onLeftIconClick,
|
374
|
-
className: (0, _classnames.default)(classes.startAdornment, (
|
327
|
+
className: (0, _classnames.default)(classes.startAdornment, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.startAdornmentDefaultColor, !startAdornmentColor), classes.startAdornmentFocus, focused && !startAdornmentColor), classes.startAdornmentDisabled, disabled && !startAdornmentColor), classes.iconPointer, this.props.onLeftIconClick))
|
375
328
|
};
|
376
|
-
|
377
329
|
if (typeof startAdornment === 'string') {
|
378
330
|
leftIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
379
331
|
icon: startAdornment
|
@@ -385,9 +337,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
385
337
|
className: "".concat(leftIconProps.className, " ").concat(leftIcon.props.className)
|
386
338
|
});
|
387
339
|
}
|
388
|
-
}
|
389
|
-
|
340
|
+
}
|
390
341
|
|
342
|
+
// Build endAdornment with eraseIcon + endAdornmentProps
|
391
343
|
var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && /*#__PURE__*/_react.default.createElement(_HiIconButton.default, {
|
392
344
|
className: classes.eraseButton,
|
393
345
|
classes: {
|
@@ -399,21 +351,16 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
399
351
|
_this2.eraseIconNode = el;
|
400
352
|
}
|
401
353
|
}, _ref);
|
402
|
-
|
403
354
|
var endAdornment = endAdornmentProps;
|
404
|
-
|
405
355
|
if (typeof endAdornmentProps === 'string' && endAdornmentProps !== '') {
|
406
|
-
var _classNames3;
|
407
|
-
|
408
356
|
endAdornment = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
409
357
|
icon: endAdornmentProps,
|
410
358
|
size: 20,
|
411
359
|
color: "neutral",
|
412
360
|
onClick: this.props.onRightIconClick,
|
413
|
-
className: (0, _classnames.default)(classes.rightIcon, (
|
361
|
+
className: (0, _classnames.default)(classes.rightIcon, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.rightIconFocus, focused), classes.rightIconDisabled, disabled), classes.rightIconError, error), classes.iconPointer, this.props.onRightIconClick))
|
414
362
|
});
|
415
363
|
}
|
416
|
-
|
417
364
|
return /*#__PURE__*/_react.default.createElement("div", overlayProps, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
418
365
|
id: inputId,
|
419
366
|
type: type,
|
@@ -443,7 +390,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
443
390
|
}, eraseIcon, endAdornment),
|
444
391
|
inputProps: (0, _objectSpread2.default)({
|
445
392
|
spellCheck: spellcheck ? 'true' : 'false',
|
446
|
-
className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (
|
393
|
+
className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.inputText, !multiline), classes.inputTextArea, multiline))
|
447
394
|
}, inputProps)
|
448
395
|
}));
|
449
396
|
}
|
@@ -455,13 +402,11 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
455
402
|
focused: nextProps.focused
|
456
403
|
};
|
457
404
|
}
|
458
|
-
|
459
405
|
return null;
|
460
406
|
}
|
461
407
|
}]);
|
462
408
|
return HiInput;
|
463
409
|
}(_react.default.PureComponent);
|
464
|
-
|
465
410
|
HiInput.defaultProps = {
|
466
411
|
value: '',
|
467
412
|
placeholder: '',
|
@@ -475,10 +420,7 @@ HiInput.defaultProps = {
|
|
475
420
|
onlyNumbers: false,
|
476
421
|
spellcheck: false
|
477
422
|
};
|
478
|
-
|
479
|
-
var _default = (0, _withStyles.default)(styles, {
|
423
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
480
424
|
hiComponent: true,
|
481
425
|
name: 'HiMuiHiInput'
|
482
|
-
})(HiInput);
|
483
|
-
|
484
|
-
exports.default = _default;
|
426
|
+
})(HiInput);
|
@@ -1,45 +1,27 @@
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
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
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
23
|
-
|
24
15
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
25
|
-
|
26
16
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
27
|
-
|
28
17
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
29
|
-
|
30
18
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
20
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
35
|
-
|
36
21
|
var _HiTextField = _interopRequireDefault(require("./HiTextField"));
|
37
|
-
|
38
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
var styles = function styles() {
|
23
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @inheritedComponent HiTextField
|
24
|
+
var styles = exports.styles = function styles() {
|
43
25
|
return {
|
44
26
|
inputPassword: {
|
45
27
|
fontWeight: 'bolder',
|
@@ -49,21 +31,15 @@ var styles = function styles() {
|
|
49
31
|
}
|
50
32
|
};
|
51
33
|
};
|
34
|
+
|
52
35
|
/**
|
53
36
|
* Champs input email pour formulaire
|
54
37
|
*/
|
55
|
-
|
56
|
-
|
57
|
-
exports.styles = styles;
|
58
|
-
|
59
38
|
var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
60
39
|
(0, _inherits2.default)(HiPasswordField, _React$Component);
|
61
|
-
|
62
40
|
var _super = _createSuper(HiPasswordField);
|
63
|
-
|
64
41
|
function HiPasswordField(props) {
|
65
42
|
var _this;
|
66
|
-
|
67
43
|
(0, _classCallCheck2.default)(this, HiPasswordField);
|
68
44
|
_this = _super.call(this, props);
|
69
45
|
_this.state = {
|
@@ -72,7 +48,6 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
|
72
48
|
_this.handlePasswordToggle = _this.handlePasswordToggle.bind((0, _assertThisInitialized2.default)(_this));
|
73
49
|
return _this;
|
74
50
|
}
|
75
|
-
|
76
51
|
(0, _createClass2.default)(HiPasswordField, [{
|
77
52
|
key: "handlePasswordToggle",
|
78
53
|
value: function handlePasswordToggle() {
|
@@ -86,9 +61,9 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
|
86
61
|
key: "render",
|
87
62
|
value: function render() {
|
88
63
|
var _this$props = this.props,
|
89
|
-
|
90
|
-
|
91
|
-
|
64
|
+
classes = _this$props.classes,
|
65
|
+
HiInputProps = _this$props.HiInputProps,
|
66
|
+
otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps"]);
|
92
67
|
var endAdornment = this.state.showText ? 'visibility_off' : 'visibility';
|
93
68
|
var type = this.state.showText ? 'text' : 'password';
|
94
69
|
var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, classes.inputPassword, !this.state.showText && otherProps.value !== ""));
|
@@ -107,10 +82,7 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
|
107
82
|
}]);
|
108
83
|
return HiPasswordField;
|
109
84
|
}(_react.default.Component);
|
110
|
-
|
111
|
-
var _default = (0, _withStyles.default)(styles, {
|
85
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
112
86
|
hiComponent: true,
|
113
87
|
name: 'HmuiHiPasswordField'
|
114
|
-
})(HiPasswordField);
|
115
|
-
|
116
|
-
exports.default = _default;
|
88
|
+
})(HiPasswordField);
|
package/HiForm/HiSearchField.js
CHANGED
@@ -1,36 +1,22 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.default = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
-
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
-
|
14
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
15
|
-
|
16
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
17
|
-
|
18
12
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
19
|
-
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
-
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
23
|
-
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
25
|
-
|
26
16
|
var _react = _interopRequireDefault(require("react"));
|
27
|
-
|
28
17
|
var _HiInput = _interopRequireDefault(require("./HiInput"));
|
29
|
-
|
30
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
31
|
-
|
32
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
33
|
-
|
34
20
|
/**
|
35
21
|
* Construit une barre de recherche avec icône Search (Magnify),
|
36
22
|
* permet de filtrer une liste d'éléments en spécifiant le nom de la/les propriétés sur lesquelles filtrer,
|
@@ -39,12 +25,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
39
25
|
*/
|
40
26
|
var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
41
27
|
(0, _inherits2.default)(HiSearchField, _React$Component);
|
42
|
-
|
43
28
|
var _super = _createSuper(HiSearchField);
|
44
|
-
|
45
29
|
function HiSearchField(props) {
|
46
30
|
var _this;
|
47
|
-
|
48
31
|
(0, _classCallCheck2.default)(this, HiSearchField);
|
49
32
|
_this = _super.call(this, props);
|
50
33
|
_this.state = {
|
@@ -55,7 +38,6 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
55
38
|
_this.handleReset = _this.handleReset.bind((0, _assertThisInitialized2.default)(_this));
|
56
39
|
return _this;
|
57
40
|
}
|
58
|
-
|
59
41
|
(0, _createClass2.default)(HiSearchField, [{
|
60
42
|
key: "filterOnProperties",
|
61
43
|
value: function filterOnProperties(item, search) {
|
@@ -63,17 +45,14 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
63
45
|
// If no properties specify, search on item
|
64
46
|
return item.toString().toLowerCase().search(search.toLowerCase()) !== -1;
|
65
47
|
}
|
66
|
-
|
67
48
|
var searchSucceed = false;
|
68
49
|
this.props.filterPropertyList.forEach(function (filter) {
|
69
50
|
var itemProperty = null;
|
70
|
-
|
71
51
|
if (filter.indexOf('.') > 0) {
|
72
52
|
itemProperty = item[filter.split('.')[0]][filter.split('.')[1]];
|
73
53
|
} else {
|
74
54
|
itemProperty = item[filter];
|
75
55
|
}
|
76
|
-
|
77
56
|
if (itemProperty.toString().toLowerCase().search(search.toLowerCase()) !== -1) {
|
78
57
|
searchSucceed = true;
|
79
58
|
}
|
@@ -84,35 +63,28 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
84
63
|
key: "handleChange",
|
85
64
|
value: function handleChange(event, inputValue) {
|
86
65
|
var _this2 = this;
|
87
|
-
|
88
66
|
var searchedValue;
|
89
|
-
|
90
67
|
if (typeof inputValue !== 'undefined' && typeof event.target.value === 'undefined') {
|
91
68
|
searchedValue = inputValue;
|
92
69
|
} else {
|
93
70
|
searchedValue = event.target.value;
|
94
71
|
}
|
95
|
-
|
96
72
|
this.setState({
|
97
73
|
inputValue: searchedValue
|
98
74
|
});
|
99
|
-
|
100
75
|
if (this.props.onSearch === undefined) {
|
101
76
|
var currentParent = null;
|
102
77
|
var filteredList = [];
|
103
78
|
this.props.itemList.forEach(function (item) {
|
104
79
|
var add = _this2.filterOnProperties(item, searchedValue);
|
105
|
-
|
106
80
|
if (item.hasChildren === true && add === false) {
|
107
81
|
currentParent = item;
|
108
82
|
}
|
109
|
-
|
110
83
|
if (add === true) {
|
111
84
|
if (currentParent !== null && item.parentId === currentParent.id) {
|
112
85
|
filteredList.push(currentParent);
|
113
86
|
currentParent = null;
|
114
87
|
}
|
115
|
-
|
116
88
|
filteredList.push(item);
|
117
89
|
}
|
118
90
|
});
|
@@ -127,7 +99,6 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
127
99
|
this.setState({
|
128
100
|
inputValue: ''
|
129
101
|
});
|
130
|
-
|
131
102
|
if (typeof this.props.onSearch === 'undefined') {
|
132
103
|
this.props.onFilteredList(this.props.itemList);
|
133
104
|
} else {
|
@@ -138,8 +109,8 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
138
109
|
key: "render",
|
139
110
|
value: function render() {
|
140
111
|
var _this$props = this.props,
|
141
|
-
|
142
|
-
|
112
|
+
placeholder = _this$props.placeholder,
|
113
|
+
others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
|
143
114
|
return /*#__PURE__*/_react.default.createElement(_HiInput.default, (0, _extends2.default)({
|
144
115
|
placeholder: placeholder,
|
145
116
|
onReset: this.handleReset,
|
@@ -151,9 +122,7 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
151
122
|
}]);
|
152
123
|
return HiSearchField;
|
153
124
|
}(_react.default.Component);
|
154
|
-
|
155
125
|
HiSearchField.defaultProps = {
|
156
126
|
placeholder: 'Search'
|
157
127
|
};
|
158
|
-
var _default = HiSearchField;
|
159
|
-
exports.default = _default;
|
128
|
+
var _default = exports.default = HiSearchField;
|