@hipay/hipay-material-ui 4.0.1-beta5 → 4.1.0
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 +35 -97
- 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 +13 -52
- package/HiSelect/HiSuggestSelect.js +30 -88
- package/HiSelect/HiSuggestSelectField.js +20 -46
- package/HiSelect/index.js +2 -14
- package/HiSelectableList/HiSelectableList.js +40 -98
- package/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- package/HiSelectableList/HiSelectableListItem.js +45 -88
- 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 +35 -97
- 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 +13 -52
- 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 +40 -98
- package/es/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- 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 +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 +184 -80
- 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
package/es/HiForm/HiInput.js
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.styles = exports.default = void 0;
|
9
|
-
|
10
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
11
|
-
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
13
|
-
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
15
|
-
|
16
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
17
|
-
|
18
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
19
|
-
|
20
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
21
|
-
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
23
|
-
|
24
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
25
|
-
|
26
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
27
|
-
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
28
16
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
29
|
-
|
30
17
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
19
|
var _index = _interopRequireDefault(require("keycode/index"));
|
35
|
-
|
36
20
|
var _Input = _interopRequireDefault(require("@mui/material/Input"));
|
37
|
-
|
38
21
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
39
|
-
|
40
22
|
var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
|
41
|
-
|
42
23
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
43
|
-
|
44
|
-
function
|
45
|
-
|
46
|
-
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) {
|
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) {
|
49
27
|
return {
|
50
28
|
root: (0, _objectSpread2.default)({
|
51
29
|
position: 'relative'
|
@@ -78,7 +56,6 @@ var styles = function styles(theme) {
|
|
78
56
|
easing: theme.transitions.easing.easeOut
|
79
57
|
}),
|
80
58
|
pointerEvents: 'none' // Transparent to the hover style.
|
81
|
-
|
82
59
|
},
|
83
60
|
'&:not($error):hover:after': {
|
84
61
|
transform: 'scaleX(1)'
|
@@ -160,64 +137,49 @@ var styles = function styles(theme) {
|
|
160
137
|
}
|
161
138
|
};
|
162
139
|
};
|
163
|
-
|
164
|
-
exports.styles = styles;
|
165
|
-
|
166
140
|
var _ref = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
167
141
|
icon: "close",
|
168
142
|
size: 20,
|
169
143
|
color: "neutral"
|
170
144
|
});
|
171
|
-
|
172
145
|
var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
173
|
-
(0, _inherits2.default)(HiInput, _React$PureComponent);
|
174
|
-
|
175
|
-
var _super = _createSuper(HiInput);
|
176
|
-
|
177
146
|
function HiInput() {
|
178
147
|
var _this;
|
179
|
-
|
180
148
|
(0, _classCallCheck2.default)(this, HiInput);
|
181
|
-
_this =
|
182
|
-
|
149
|
+
_this = _callSuper(this, HiInput);
|
183
150
|
_this.handleKeyDown = function (event) {
|
184
151
|
var key = (0, _index.default)(event);
|
185
|
-
|
186
152
|
if (_this.props.onKeyDown) {
|
187
153
|
_this.props.onKeyDown(event);
|
188
154
|
}
|
189
|
-
|
190
155
|
if (key === 'enter' && _this.props.onSubmit) {
|
191
156
|
_this.props.onSubmit(event);
|
192
157
|
}
|
193
158
|
};
|
194
|
-
|
195
159
|
_this.handleClick = function (event) {
|
196
160
|
if (_this.props.onClick) {
|
197
161
|
_this.props.onClick(event);
|
198
162
|
}
|
199
163
|
};
|
200
|
-
|
201
164
|
_this.state = {
|
202
165
|
focused: false
|
203
166
|
};
|
204
|
-
_this.handleChange = _this.handleChange.bind(
|
205
|
-
_this.handleFocus = _this.handleFocus.bind(
|
206
|
-
_this.handleDivClick = _this.handleDivClick.bind(
|
207
|
-
_this.handleBlur = _this.handleBlur.bind(
|
208
|
-
_this.handleReset = _this.handleReset.bind(
|
209
|
-
_this.handleMouseEnter = _this.handleMouseEnter.bind(
|
210
|
-
_this.handleMouseLeave = _this.handleMouseLeave.bind(
|
211
|
-
_this.getInputElement = _this.getInputElement.bind(
|
212
|
-
_this.handleOverlayRef = _this.handleOverlayRef.bind(
|
167
|
+
_this.handleChange = _this.handleChange.bind(_this);
|
168
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
169
|
+
_this.handleDivClick = _this.handleDivClick.bind(_this);
|
170
|
+
_this.handleBlur = _this.handleBlur.bind(_this);
|
171
|
+
_this.handleReset = _this.handleReset.bind(_this);
|
172
|
+
_this.handleMouseEnter = _this.handleMouseEnter.bind(_this);
|
173
|
+
_this.handleMouseLeave = _this.handleMouseLeave.bind(_this);
|
174
|
+
_this.getInputElement = _this.getInputElement.bind(_this);
|
175
|
+
_this.handleOverlayRef = _this.handleOverlayRef.bind(_this);
|
213
176
|
return _this;
|
214
177
|
}
|
215
|
-
|
216
|
-
(0, _createClass2.default)(HiInput, [{
|
178
|
+
(0, _inherits2.default)(HiInput, _React$PureComponent);
|
179
|
+
return (0, _createClass2.default)(HiInput, [{
|
217
180
|
key: "getInputElement",
|
218
181
|
value: function getInputElement(el) {
|
219
182
|
this.inputElement = el;
|
220
|
-
|
221
183
|
if (this.props.customRef) {
|
222
184
|
this.props.customRef(this.inputElement);
|
223
185
|
} else if (this.props.inputRef) {
|
@@ -237,7 +199,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
237
199
|
if (this.props.onReset) {
|
238
200
|
this.props.onReset();
|
239
201
|
}
|
240
|
-
|
241
202
|
this.inputElement.focus();
|
242
203
|
}
|
243
204
|
}, {
|
@@ -253,14 +214,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
253
214
|
} else if (this.endAdornmentNode.contains(event.relatedTarget) && this.props.onBlur) {
|
254
215
|
this.props.onBlur(event);
|
255
216
|
}
|
256
|
-
|
257
217
|
event.preventDefault();
|
258
218
|
event.stopPropagation();
|
259
219
|
} else {
|
260
220
|
this.setState({
|
261
221
|
focused: false
|
262
222
|
});
|
263
|
-
|
264
223
|
if (this.props.onBlur) {
|
265
224
|
this.props.onBlur(event);
|
266
225
|
}
|
@@ -276,9 +235,8 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
276
235
|
this.setState({
|
277
236
|
focused: true
|
278
237
|
});
|
279
|
-
}
|
280
|
-
|
281
|
-
|
238
|
+
}
|
239
|
+
// If focus came from erase icon => stay focused and don't call onFocus props
|
282
240
|
if (this.eraseIconNode && this.eraseIconNode.contains(event.relatedTarget)) {
|
283
241
|
event.preventDefault();
|
284
242
|
event.stopPropagation();
|
@@ -298,7 +256,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
298
256
|
focused: true
|
299
257
|
});
|
300
258
|
}
|
301
|
-
|
302
259
|
this.inputElement.focus();
|
303
260
|
}
|
304
261
|
}
|
@@ -320,7 +277,6 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
320
277
|
key: "handleOverlayRef",
|
321
278
|
value: function handleOverlayRef(el) {
|
322
279
|
this.overlayNode = el;
|
323
|
-
|
324
280
|
if (this.props.overlayRef) {
|
325
281
|
this.props.overlayRef(el);
|
326
282
|
}
|
@@ -328,34 +284,31 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
328
284
|
}, {
|
329
285
|
key: "render",
|
330
286
|
value: function render() {
|
331
|
-
var
|
332
|
-
_this2 = this,
|
333
|
-
_classNames4;
|
334
|
-
|
287
|
+
var _this2 = this;
|
335
288
|
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
|
-
|
289
|
+
value = _this$props.value,
|
290
|
+
classes = _this$props.classes,
|
291
|
+
placeholder = _this$props.placeholder,
|
292
|
+
startAdornment = _this$props.startAdornment,
|
293
|
+
endAdornmentProps = _this$props.endAdornment,
|
294
|
+
className = _this$props.className,
|
295
|
+
error = _this$props.error,
|
296
|
+
type = _this$props.type,
|
297
|
+
disabled = _this$props.disabled,
|
298
|
+
autoComplete = _this$props.autoComplete,
|
299
|
+
autoFocus = _this$props.autoFocus,
|
300
|
+
inputId = _this$props.inputId,
|
301
|
+
name = _this$props.name,
|
302
|
+
multiline = _this$props.multiline,
|
303
|
+
rows = _this$props.rows,
|
304
|
+
inputClassName = _this$props.inputClassName,
|
305
|
+
onReset = _this$props.onReset,
|
306
|
+
spellcheck = _this$props.spellcheck,
|
307
|
+
startAdornmentColor = _this$props.startAdornmentColor,
|
308
|
+
inputProps = _this$props.inputProps;
|
356
309
|
var focused = this.state.focused;
|
357
310
|
var overlayProps = (0, _objectSpread2.default)({
|
358
|
-
className: (0, _classnames.default)(classes.root, (
|
311
|
+
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
312
|
}, !disabled && {
|
360
313
|
onClick: this.handleDivClick,
|
361
314
|
onMouseEnter: this.handleMouseEnter,
|
@@ -364,16 +317,12 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
364
317
|
ref: this.handleOverlayRef
|
365
318
|
});
|
366
319
|
var leftIcon;
|
367
|
-
|
368
320
|
if (!!startAdornment) {
|
369
|
-
var _classNames2;
|
370
|
-
|
371
321
|
var leftIconProps = {
|
372
322
|
color: startAdornmentColor,
|
373
323
|
onClick: this.props.onLeftIconClick,
|
374
|
-
className: (0, _classnames.default)(classes.startAdornment, (
|
324
|
+
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
325
|
};
|
376
|
-
|
377
326
|
if (typeof startAdornment === 'string') {
|
378
327
|
leftIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
379
328
|
icon: startAdornment
|
@@ -385,9 +334,9 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
385
334
|
className: "".concat(leftIconProps.className, " ").concat(leftIcon.props.className)
|
386
335
|
});
|
387
336
|
}
|
388
|
-
}
|
389
|
-
|
337
|
+
}
|
390
338
|
|
339
|
+
// Build endAdornment with eraseIcon + endAdornmentProps
|
391
340
|
var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && /*#__PURE__*/_react.default.createElement(_HiIconButton.default, {
|
392
341
|
className: classes.eraseButton,
|
393
342
|
classes: {
|
@@ -399,21 +348,16 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
399
348
|
_this2.eraseIconNode = el;
|
400
349
|
}
|
401
350
|
}, _ref);
|
402
|
-
|
403
351
|
var endAdornment = endAdornmentProps;
|
404
|
-
|
405
352
|
if (typeof endAdornmentProps === 'string' && endAdornmentProps !== '') {
|
406
|
-
var _classNames3;
|
407
|
-
|
408
353
|
endAdornment = /*#__PURE__*/_react.default.createElement(_HiIcon.default, {
|
409
354
|
icon: endAdornmentProps,
|
410
355
|
size: 20,
|
411
356
|
color: "neutral",
|
412
357
|
onClick: this.props.onRightIconClick,
|
413
|
-
className: (0, _classnames.default)(classes.rightIcon, (
|
358
|
+
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
359
|
});
|
415
360
|
}
|
416
|
-
|
417
361
|
return /*#__PURE__*/_react.default.createElement("div", overlayProps, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
418
362
|
id: inputId,
|
419
363
|
type: type,
|
@@ -443,7 +387,7 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
443
387
|
}, eraseIcon, endAdornment),
|
444
388
|
inputProps: (0, _objectSpread2.default)({
|
445
389
|
spellCheck: spellcheck ? 'true' : 'false',
|
446
|
-
className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (
|
390
|
+
className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, classes.inputText, !multiline), classes.inputTextArea, multiline))
|
447
391
|
}, inputProps)
|
448
392
|
}));
|
449
393
|
}
|
@@ -455,13 +399,10 @@ var HiInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
455
399
|
focused: nextProps.focused
|
456
400
|
};
|
457
401
|
}
|
458
|
-
|
459
402
|
return null;
|
460
403
|
}
|
461
404
|
}]);
|
462
|
-
return HiInput;
|
463
405
|
}(_react.default.PureComponent);
|
464
|
-
|
465
406
|
HiInput.defaultProps = {
|
466
407
|
value: '',
|
467
408
|
placeholder: '',
|
@@ -475,10 +416,7 @@ HiInput.defaultProps = {
|
|
475
416
|
onlyNumbers: false,
|
476
417
|
spellcheck: false
|
477
418
|
};
|
478
|
-
|
479
|
-
var _default = (0, _withStyles.default)(styles, {
|
419
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
480
420
|
hiComponent: true,
|
481
421
|
name: 'HiMuiHiInput'
|
482
|
-
})(HiInput);
|
483
|
-
|
484
|
-
exports.default = _default;
|
422
|
+
})(HiInput);
|
@@ -1,45 +1,26 @@
|
|
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
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
23
|
-
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
25
|
-
|
26
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
27
|
-
|
28
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
29
|
-
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
30
17
|
var _react = _interopRequireDefault(require("react"));
|
31
|
-
|
32
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
33
|
-
|
34
19
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
35
|
-
|
36
20
|
var _HiTextField = _interopRequireDefault(require("./HiTextField"));
|
37
|
-
|
38
|
-
function
|
39
|
-
|
40
|
-
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; } }
|
41
|
-
|
42
|
-
var styles = function styles() {
|
21
|
+
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)); }
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // @inheritedComponent HiTextField
|
23
|
+
var styles = exports.styles = function styles() {
|
43
24
|
return {
|
44
25
|
inputPassword: {
|
45
26
|
fontWeight: 'bolder',
|
@@ -49,31 +30,23 @@ var styles = function styles() {
|
|
49
30
|
}
|
50
31
|
};
|
51
32
|
};
|
33
|
+
|
52
34
|
/**
|
53
35
|
* Champs input email pour formulaire
|
54
36
|
*/
|
55
|
-
|
56
|
-
|
57
|
-
exports.styles = styles;
|
58
|
-
|
59
37
|
var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
60
|
-
(0, _inherits2.default)(HiPasswordField, _React$Component);
|
61
|
-
|
62
|
-
var _super = _createSuper(HiPasswordField);
|
63
|
-
|
64
38
|
function HiPasswordField(props) {
|
65
39
|
var _this;
|
66
|
-
|
67
40
|
(0, _classCallCheck2.default)(this, HiPasswordField);
|
68
|
-
_this =
|
41
|
+
_this = _callSuper(this, HiPasswordField, [props]);
|
69
42
|
_this.state = {
|
70
43
|
showText: false
|
71
44
|
};
|
72
|
-
_this.handlePasswordToggle = _this.handlePasswordToggle.bind(
|
45
|
+
_this.handlePasswordToggle = _this.handlePasswordToggle.bind(_this);
|
73
46
|
return _this;
|
74
47
|
}
|
75
|
-
|
76
|
-
(0, _createClass2.default)(HiPasswordField, [{
|
48
|
+
(0, _inherits2.default)(HiPasswordField, _React$Component);
|
49
|
+
return (0, _createClass2.default)(HiPasswordField, [{
|
77
50
|
key: "handlePasswordToggle",
|
78
51
|
value: function handlePasswordToggle() {
|
79
52
|
this.setState(function (prevState) {
|
@@ -86,40 +59,28 @@ var HiPasswordField = /*#__PURE__*/function (_React$Component) {
|
|
86
59
|
key: "render",
|
87
60
|
value: function render() {
|
88
61
|
var _this$props = this.props,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps", "autoComplete"]);
|
62
|
+
classes = _this$props.classes,
|
63
|
+
HiInputProps = _this$props.HiInputProps,
|
64
|
+
otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "HiInputProps"]);
|
93
65
|
var endAdornment = this.state.showText ? 'visibility_off' : 'visibility';
|
94
66
|
var type = this.state.showText ? 'text' : 'password';
|
95
|
-
var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, classes.inputPassword, !this.state.showText && otherProps.value !==
|
67
|
+
var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, classes.inputPassword, !this.state.showText && otherProps.value !== ''));
|
96
68
|
return /*#__PURE__*/_react.default.createElement(_HiTextField.default, (0, _extends2.default)({}, otherProps, {
|
97
69
|
type: type,
|
98
70
|
onRightIconClick: this.handlePasswordToggle,
|
99
71
|
HiInputProps: (0, _objectSpread2.default)({
|
100
|
-
placeholder: ''
|
72
|
+
placeholder: '',
|
73
|
+
maxLength: 1024
|
101
74
|
}, HiInputProps, {
|
102
75
|
endAdornment: endAdornment,
|
103
76
|
inputClassName: inputClassName,
|
104
|
-
|
77
|
+
autocomplete: 'new-password'
|
105
78
|
})
|
106
79
|
}));
|
107
80
|
}
|
108
81
|
}]);
|
109
|
-
return HiPasswordField;
|
110
82
|
}(_react.default.Component);
|
111
|
-
|
112
|
-
HiPasswordField.defaultProps = {
|
113
|
-
/**
|
114
|
-
* Autocomplete off by default
|
115
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
|
116
|
-
*/
|
117
|
-
autoComplete: 'off'
|
118
|
-
};
|
119
|
-
|
120
|
-
var _default = (0, _withStyles.default)(styles, {
|
83
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
121
84
|
hiComponent: true,
|
122
85
|
name: 'HmuiHiPasswordField'
|
123
|
-
})(HiPasswordField);
|
124
|
-
|
125
|
-
exports.default = _default;
|
86
|
+
})(HiPasswordField);
|
@@ -1,36 +1,21 @@
|
|
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
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
19
|
-
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
-
|
22
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
23
|
-
|
24
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
25
|
-
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
26
15
|
var _react = _interopRequireDefault(require("react"));
|
27
|
-
|
28
16
|
var _HiInput = _interopRequireDefault(require("./HiInput"));
|
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
|
-
|
17
|
+
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)); }
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
34
19
|
/**
|
35
20
|
* Construit une barre de recherche avec icône Search (Magnify),
|
36
21
|
* permet de filtrer une liste d'éléments en spécifiant le nom de la/les propriétés sur lesquelles filtrer,
|
@@ -38,42 +23,34 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
38
23
|
* Un bouton reset s'affiche à la saisie permettant de réinitialiser l'input.
|
39
24
|
*/
|
40
25
|
var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
41
|
-
(0, _inherits2.default)(HiSearchField, _React$Component);
|
42
|
-
|
43
|
-
var _super = _createSuper(HiSearchField);
|
44
|
-
|
45
26
|
function HiSearchField(props) {
|
46
27
|
var _this;
|
47
|
-
|
48
28
|
(0, _classCallCheck2.default)(this, HiSearchField);
|
49
|
-
_this =
|
29
|
+
_this = _callSuper(this, HiSearchField, [props]);
|
50
30
|
_this.state = {
|
51
31
|
inputValue: ''
|
52
32
|
};
|
53
|
-
_this.filterOnProperties = _this.filterOnProperties.bind(
|
54
|
-
_this.handleChange = _this.handleChange.bind(
|
55
|
-
_this.handleReset = _this.handleReset.bind(
|
33
|
+
_this.filterOnProperties = _this.filterOnProperties.bind(_this);
|
34
|
+
_this.handleChange = _this.handleChange.bind(_this);
|
35
|
+
_this.handleReset = _this.handleReset.bind(_this);
|
56
36
|
return _this;
|
57
37
|
}
|
58
|
-
|
59
|
-
(0, _createClass2.default)(HiSearchField, [{
|
38
|
+
(0, _inherits2.default)(HiSearchField, _React$Component);
|
39
|
+
return (0, _createClass2.default)(HiSearchField, [{
|
60
40
|
key: "filterOnProperties",
|
61
41
|
value: function filterOnProperties(item, search) {
|
62
42
|
if (!this.props.filterPropertyList || this.props.filterPropertyList.length < 1) {
|
63
43
|
// If no properties specify, search on item
|
64
44
|
return item.toString().toLowerCase().search(search.toLowerCase()) !== -1;
|
65
45
|
}
|
66
|
-
|
67
46
|
var searchSucceed = false;
|
68
47
|
this.props.filterPropertyList.forEach(function (filter) {
|
69
48
|
var itemProperty = null;
|
70
|
-
|
71
49
|
if (filter.indexOf('.') > 0) {
|
72
50
|
itemProperty = item[filter.split('.')[0]][filter.split('.')[1]];
|
73
51
|
} else {
|
74
52
|
itemProperty = item[filter];
|
75
53
|
}
|
76
|
-
|
77
54
|
if (itemProperty.toString().toLowerCase().search(search.toLowerCase()) !== -1) {
|
78
55
|
searchSucceed = true;
|
79
56
|
}
|
@@ -84,35 +61,28 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
84
61
|
key: "handleChange",
|
85
62
|
value: function handleChange(event, inputValue) {
|
86
63
|
var _this2 = this;
|
87
|
-
|
88
64
|
var searchedValue;
|
89
|
-
|
90
65
|
if (typeof inputValue !== 'undefined' && typeof event.target.value === 'undefined') {
|
91
66
|
searchedValue = inputValue;
|
92
67
|
} else {
|
93
68
|
searchedValue = event.target.value;
|
94
69
|
}
|
95
|
-
|
96
70
|
this.setState({
|
97
71
|
inputValue: searchedValue
|
98
72
|
});
|
99
|
-
|
100
73
|
if (this.props.onSearch === undefined) {
|
101
74
|
var currentParent = null;
|
102
75
|
var filteredList = [];
|
103
76
|
this.props.itemList.forEach(function (item) {
|
104
77
|
var add = _this2.filterOnProperties(item, searchedValue);
|
105
|
-
|
106
78
|
if (item.hasChildren === true && add === false) {
|
107
79
|
currentParent = item;
|
108
80
|
}
|
109
|
-
|
110
81
|
if (add === true) {
|
111
82
|
if (currentParent !== null && item.parentId === currentParent.id) {
|
112
83
|
filteredList.push(currentParent);
|
113
84
|
currentParent = null;
|
114
85
|
}
|
115
|
-
|
116
86
|
filteredList.push(item);
|
117
87
|
}
|
118
88
|
});
|
@@ -127,7 +97,6 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
127
97
|
this.setState({
|
128
98
|
inputValue: ''
|
129
99
|
});
|
130
|
-
|
131
100
|
if (typeof this.props.onSearch === 'undefined') {
|
132
101
|
this.props.onFilteredList(this.props.itemList);
|
133
102
|
} else {
|
@@ -138,8 +107,8 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
138
107
|
key: "render",
|
139
108
|
value: function render() {
|
140
109
|
var _this$props = this.props,
|
141
|
-
|
142
|
-
|
110
|
+
placeholder = _this$props.placeholder,
|
111
|
+
others = (0, _objectWithoutProperties2.default)(_this$props, ["placeholder"]);
|
143
112
|
return /*#__PURE__*/_react.default.createElement(_HiInput.default, (0, _extends2.default)({
|
144
113
|
placeholder: placeholder,
|
145
114
|
onReset: this.handleReset,
|
@@ -149,11 +118,8 @@ var HiSearchField = /*#__PURE__*/function (_React$Component) {
|
|
149
118
|
}, others));
|
150
119
|
}
|
151
120
|
}]);
|
152
|
-
return HiSearchField;
|
153
121
|
}(_react.default.Component);
|
154
|
-
|
155
122
|
HiSearchField.defaultProps = {
|
156
123
|
placeholder: 'Search'
|
157
124
|
};
|
158
|
-
var _default = HiSearchField;
|
159
|
-
exports.default = _default;
|
125
|
+
var _default = exports.default = HiSearchField;
|