@hipay/hipay-material-ui 2.3.1-rc4 → 2.3.1-rc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HiAlertModal/HiAlertModal.js +77 -48
- package/HiAlertModal/index.js +15 -1
- package/HiAppBar/HiAppBar.js +63 -34
- package/HiAppBar/index.js +15 -1
- package/HiBadge/HiBadge.js +29 -10
- package/HiBadge/index.js +15 -1
- package/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/HiBreadcrumb/HiStep.js +58 -35
- package/HiBreadcrumb/HiStepConnector.js +58 -33
- package/HiBreadcrumb/HiStepContent.js +47 -26
- package/HiBreadcrumb/HiStepIcon.js +47 -27
- package/HiBreadcrumb/HiStepLabel.js +62 -37
- package/HiBreadcrumb/HiStepper.js +44 -24
- package/HiBreadcrumb/index.js +15 -1
- package/HiButton/HiButton.js +27 -9
- package/HiButton/index.js +13 -2
- package/HiCell/CellAddress.js +39 -21
- package/HiCell/CellDate.js +44 -27
- package/HiCell/CellIcon.js +48 -29
- package/HiCell/CellImage.js +41 -24
- package/HiCell/CellNumeric.js +45 -26
- package/HiCell/CellPinToAction.js +41 -20
- package/HiCell/CellRate.js +56 -33
- package/HiCell/CellSentinel.js +41 -23
- package/HiCell/CellSentinelScore.js +43 -24
- package/HiCell/CellText.js +54 -37
- package/HiCell/CellTextStyled.js +21 -8
- package/HiCell/index.js +79 -9
- package/HiCheckbox/HiCheckbox.js +61 -36
- package/HiCheckbox/index.js +15 -1
- package/HiChip/HiChip.js +44 -24
- package/HiChip/HiChipSwitch.js +73 -47
- package/HiChip/index.js +23 -2
- package/HiColoredLabel/HiColoredLabel.js +52 -28
- package/HiColoredLabel/index.js +15 -1
- package/HiDatePicker/Caption.js +28 -11
- package/HiDatePicker/HiDatePicker.js +131 -101
- package/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/HiDatePicker/HiDateRangePicker.js +168 -139
- package/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/HiDatePicker/ListPicker.js +54 -34
- package/HiDatePicker/NavBar.js +45 -18
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/Overlay.js +35 -18
- package/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/index.js +47 -5
- package/HiDatePicker/Weekday.js +13 -3
- package/HiDatePicker/hiLocaleUtils.js +8 -1
- package/HiDatePicker/index.js +15 -1
- package/HiDatePicker/stylesheet.js +22 -9
- package/HiDotsStepper/HiDot.js +56 -31
- package/HiDotsStepper/HiDotsStepper.js +47 -28
- package/HiDotsStepper/index.js +23 -2
- package/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/HiExpansionPanel/index.js +13 -2
- package/HiForm/HiAddressField.js +46 -29
- package/HiForm/HiEmailField.js +45 -27
- package/HiForm/HiFormControl.js +105 -72
- package/HiForm/HiFormLabel.js +53 -30
- package/HiForm/HiInput.js +89 -62
- package/HiForm/HiPasswordField.js +55 -29
- package/HiForm/HiSearchField.js +43 -28
- package/HiForm/HiSlider.js +64 -41
- package/HiForm/HiTextField.js +46 -29
- package/HiForm/HiUpload.js +76 -53
- package/HiForm/HiUploadField.js +40 -25
- package/HiForm/HiUploadInput.js +84 -56
- package/HiForm/index.js +95 -11
- package/HiIcon/HiIcon.js +44 -22
- package/HiIcon/index.js +15 -1
- package/HiIconButton/HiIconButton.js +40 -18
- package/HiIconButton/index.js +15 -1
- package/HiLoader/HiLoader.js +24 -9
- package/HiLoader/index.js +15 -1
- package/HiMap/HiMap.js +76 -51
- package/HiMap/HiMapExpand.js +64 -39
- package/HiMap/index.js +23 -2
- package/HiNotice/HiKPI.js +56 -33
- package/HiNotice/HiKPINotice.js +21 -7
- package/HiNotice/index.js +23 -2
- package/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/HiPaymentMeans/index.js +15 -1
- package/HiPdfReader/HiPdfReader.js +78 -52
- package/HiPdfReader/index.js +15 -1
- package/HiPin/HiPin.js +30 -9
- package/HiPin/index.js +15 -1
- package/HiRadio/HiRadio.js +24 -7
- package/HiRadio/index.js +15 -1
- package/HiSelect/HiDynamicSelect.js +58 -40
- package/HiSelect/HiDynamicSelectField.js +40 -22
- package/HiSelect/HiNestedSelect.js +85 -55
- package/HiSelect/HiNestedSelectContent.js +72 -46
- package/HiSelect/HiNestedSelectField.js +40 -22
- package/HiSelect/HiSelect.js +161 -123
- package/HiSelect/HiSelectContent.js +104 -73
- package/HiSelect/HiSelectField.js +40 -22
- package/HiSelect/HiSelectInput.js +94 -63
- package/HiSelect/HiSelectMobile.js +54 -35
- package/HiSelect/HiSuggestSelect.js +83 -56
- package/HiSelect/HiSuggestSelectField.js +40 -22
- package/HiSelect/index.js +85 -8
- package/HiSelectableList/HiSelectableList.js +80 -49
- package/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/HiSelectableList/HiSelectableListItem.js +101 -66
- package/HiSelectableList/index.js +31 -3
- package/HiSwitch/HiSwitch.js +45 -20
- package/HiSwitch/HiSwitchState.js +36 -15
- package/HiSwitch/index.js +23 -2
- package/HiTable/HiCellBuilder.js +69 -43
- package/HiTable/HiTable.js +46 -28
- package/HiTable/HiTableBody.js +34 -19
- package/HiTable/HiTableHeader.js +50 -29
- package/HiTable/HiTableRow.js +56 -29
- package/HiTable/constants.js +94 -43
- package/HiTable/index.js +15 -1
- package/es/HiAlertModal/HiAlertModal.js +77 -48
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +63 -34
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +29 -10
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/es/HiBreadcrumb/HiStep.js +58 -35
- package/es/HiBreadcrumb/HiStepConnector.js +58 -33
- package/es/HiBreadcrumb/HiStepContent.js +47 -26
- package/es/HiBreadcrumb/HiStepIcon.js +47 -27
- package/es/HiBreadcrumb/HiStepLabel.js +62 -37
- package/es/HiBreadcrumb/HiStepper.js +44 -24
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +27 -9
- package/es/HiButton/index.js +13 -2
- package/es/HiCell/CellAddress.js +39 -21
- package/es/HiCell/CellDate.js +44 -27
- package/es/HiCell/CellIcon.js +48 -29
- package/es/HiCell/CellImage.js +41 -24
- package/es/HiCell/CellNumeric.js +45 -26
- package/es/HiCell/CellPinToAction.js +41 -20
- package/es/HiCell/CellRate.js +56 -33
- package/es/HiCell/CellSentinel.js +41 -23
- package/es/HiCell/CellSentinelScore.js +43 -24
- package/es/HiCell/CellText.js +54 -37
- package/es/HiCell/CellTextStyled.js +21 -8
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +61 -36
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +44 -24
- package/es/HiChip/HiChipSwitch.js +73 -47
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +52 -28
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +28 -11
- package/es/HiDatePicker/HiDatePicker.js +131 -101
- package/es/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/es/HiDatePicker/HiDateRangePicker.js +168 -139
- package/es/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/es/HiDatePicker/ListPicker.js +54 -34
- package/es/HiDatePicker/NavBar.js +45 -18
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/Overlay.js +35 -18
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +13 -3
- package/es/HiDatePicker/hiLocaleUtils.js +8 -1
- package/es/HiDatePicker/index.js +15 -1
- package/es/HiDatePicker/stylesheet.js +22 -9
- package/es/HiDotsStepper/HiDot.js +56 -31
- package/es/HiDotsStepper/HiDotsStepper.js +47 -28
- package/es/HiDotsStepper/index.js +23 -2
- package/es/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/es/HiExpansionPanel/index.js +13 -2
- package/es/HiForm/HiAddressField.js +46 -29
- package/es/HiForm/HiEmailField.js +45 -27
- package/es/HiForm/HiFormControl.js +105 -72
- package/es/HiForm/HiFormLabel.js +53 -30
- package/es/HiForm/HiInput.js +89 -62
- package/es/HiForm/HiPasswordField.js +55 -29
- package/es/HiForm/HiSearchField.js +43 -28
- package/es/HiForm/HiSlider.js +64 -41
- package/es/HiForm/HiTextField.js +46 -29
- package/es/HiForm/HiUpload.js +76 -53
- package/es/HiForm/HiUploadField.js +40 -25
- package/es/HiForm/HiUploadInput.js +84 -56
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +44 -22
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +40 -18
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +24 -9
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +76 -51
- package/es/HiMap/HiMapExpand.js +64 -39
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +56 -33
- package/es/HiNotice/HiKPINotice.js +21 -7
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +78 -52
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +30 -9
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +24 -7
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +58 -40
- package/es/HiSelect/HiDynamicSelectField.js +40 -22
- package/es/HiSelect/HiNestedSelect.js +85 -55
- package/es/HiSelect/HiNestedSelectContent.js +72 -46
- package/es/HiSelect/HiNestedSelectField.js +40 -22
- package/es/HiSelect/HiSelect.js +161 -123
- package/es/HiSelect/HiSelectContent.js +104 -73
- package/es/HiSelect/HiSelectField.js +40 -22
- package/es/HiSelect/HiSelectInput.js +94 -63
- package/es/HiSelect/HiSelectMobile.js +54 -35
- package/es/HiSelect/HiSuggestSelect.js +83 -56
- package/es/HiSelect/HiSuggestSelectField.js +40 -22
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +80 -49
- package/es/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/es/HiSelectableList/HiSelectableListItem.js +101 -66
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +45 -20
- package/es/HiSwitch/HiSwitchState.js +36 -15
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +69 -43
- package/es/HiTable/HiTable.js +46 -28
- package/es/HiTable/HiTableBody.js +34 -19
- package/es/HiTable/HiTableHeader.js +50 -29
- package/es/HiTable/HiTableRow.js +56 -29
- package/es/HiTable/constants.js +94 -43
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +36 -18
- package/es/hi-svg-icons/HiActivity.js +35 -17
- package/es/hi-svg-icons/HiAll.js +42 -22
- package/es/hi-svg-icons/HiBilling.js +36 -18
- package/es/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/es/hi-svg-icons/HiCatalog.js +36 -18
- package/es/hi-svg-icons/HiCustomer.js +36 -18
- package/es/hi-svg-icons/HiDownload.js +25 -11
- package/es/hi-svg-icons/HiFinance.js +36 -18
- package/es/hi-svg-icons/HiPermission.js +35 -17
- package/es/hi-svg-icons/HiRoute.js +36 -18
- package/es/hi-svg-icons/HiSettlement.js +36 -18
- package/es/hi-svg-icons/HiSizeLarge.js +27 -12
- package/es/hi-svg-icons/HiSizeMedium.js +25 -11
- package/es/hi-svg-icons/HiSizeSmall.js +25 -11
- package/es/hi-svg-icons/HiTransaction.js +36 -18
- package/es/hi-svg-icons/HiUser.js +36 -18
- package/es/hi-svg-icons/HiWidget.js +42 -22
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +21 -11
- package/es/styleguide/Wrapper.js +36 -19
- package/es/styles/MuiThemeProvider.js +57 -39
- package/es/styles/colorManipulator.js +44 -16
- package/es/styles/createBreakpoints.js +20 -6
- package/es/styles/createGenerateClassName.js +15 -5
- package/es/styles/createMixins.js +19 -8
- package/es/styles/createMuiTheme.js +53 -34
- package/es/styles/createPalette.js +50 -30
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +30 -18
- package/es/styles/getStylesCreator.js +24 -11
- package/es/styles/getThemeProps.js +9 -1
- package/es/styles/index.js +47 -5
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +19 -7
- package/es/styles/shadows.js +8 -1
- package/es/styles/shape.js +8 -1
- package/es/styles/spacing.js +9 -1
- package/es/styles/themeListener.js +18 -5
- package/es/styles/transitions.js +38 -18
- package/es/styles/zIndex.js +8 -1
- package/es/test-utils/createMount.js +22 -11
- package/es/test-utils/createRender.js +19 -8
- package/es/test-utils/createShallow.js +23 -13
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +16 -6
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +10 -2
- package/es/theme/typography.js +11 -3
- package/es/theme.js +13 -4
- package/es/transitions/utils.js +13 -2
- package/es/utils/exactProp.js +18 -5
- package/es/utils/helpers.js +55 -18
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +22 -7
- package/hi-svg-icons/HiAccount.js +36 -18
- package/hi-svg-icons/HiActivity.js +35 -17
- package/hi-svg-icons/HiAll.js +42 -22
- package/hi-svg-icons/HiBilling.js +36 -18
- package/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/hi-svg-icons/HiCatalog.js +36 -18
- package/hi-svg-icons/HiCustomer.js +36 -18
- package/hi-svg-icons/HiDownload.js +25 -11
- package/hi-svg-icons/HiFinance.js +36 -18
- package/hi-svg-icons/HiPermission.js +35 -17
- package/hi-svg-icons/HiRoute.js +36 -18
- package/hi-svg-icons/HiSettlement.js +36 -18
- package/hi-svg-icons/HiSizeLarge.js +27 -12
- package/hi-svg-icons/HiSizeMedium.js +25 -11
- package/hi-svg-icons/HiSizeSmall.js +25 -11
- package/hi-svg-icons/HiTransaction.js +36 -18
- package/hi-svg-icons/HiUser.js +36 -18
- package/hi-svg-icons/HiWidget.js +42 -22
- package/hi-svg-icons/index.js +151 -18
- package/hi-svg-icons/index.text.js +21 -11
- package/package.json +2 -1
- package/styleguide/Wrapper.js +36 -19
- package/styles/MuiThemeProvider.js +57 -39
- package/styles/colorManipulator.js +44 -16
- package/styles/createBreakpoints.js +20 -6
- package/styles/createGenerateClassName.js +15 -5
- package/styles/createMixins.js +19 -8
- package/styles/createMuiTheme.js +53 -34
- package/styles/createPalette.js +50 -30
- package/styles/createStyles.js +8 -1
- package/styles/createTypography.js +30 -18
- package/styles/getStylesCreator.js +24 -11
- package/styles/getThemeProps.js +9 -1
- package/styles/index.js +47 -5
- package/styles/jssPreset.js +25 -9
- package/styles/mergeClasses.js +19 -7
- package/styles/shadows.js +8 -1
- package/styles/shape.js +8 -1
- package/styles/spacing.js +9 -1
- package/styles/themeListener.js +18 -5
- package/styles/transitions.js +38 -18
- package/styles/zIndex.js +8 -1
- package/test-utils/createMount.js +22 -11
- package/test-utils/createRender.js +19 -8
- package/test-utils/createShallow.js +23 -13
- package/test-utils/getClasses.js +11 -2
- package/test-utils/index.js +47 -5
- package/test-utils/until.js +16 -6
- package/test-utils/unwrap.js +8 -1
- package/theme/palette.js +10 -2
- package/theme/typography.js +11 -3
- package/theme.js +13 -4
- package/transitions/utils.js +13 -2
- package/utils/exactProp.js +18 -5
- package/utils/helpers.js +55 -18
- package/withMobileDialog/index.js +15 -1
- package/withMobileDialog/withMobileDialog.js +22 -7
- package/App.test.js +0 -8
- package/HiAlertModal/HiAlertModal.test.js +0 -189
- package/HiBadge/HiBadge.test.js +0 -49
- package/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/HiBreadcrumb/HiStep.test.js +0 -47
- package/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/HiBreadcrumb/HiStepper.test.js +0 -33
- package/HiCell/CellAddress.test.js +0 -75
- package/HiCell/CellDate.test.js +0 -173
- package/HiCell/CellIcon.test.js +0 -57
- package/HiCell/CellImage.test.js +0 -49
- package/HiCell/CellNumeric.test.js +0 -46
- package/HiCell/CellRate.test.js +0 -73
- package/HiCell/CellSentinel.test.js +0 -48
- package/HiCell/CellText.test.js +0 -76
- package/HiCheckbox/HiCheckbox.test.js +0 -55
- package/HiChip/HiChip.test.js +0 -136
- package/HiChip/HiChipSwitch.test.js +0 -99
- package/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/HiDatePicker/Caption.test.js +0 -65
- package/HiDatePicker/HiDatePicker.test.js +0 -370
- package/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/HiDatePicker/ListPicker.test.js +0 -53
- package/HiDatePicker/NavBar.test.js +0 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/HiDotsStepper/HiDot.test.js +0 -55
- package/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/HiForm/HiAddressField.test.js +0 -79
- package/HiForm/HiEmailField.test.js +0 -19
- package/HiForm/HiFormControl.test.js +0 -195
- package/HiForm/HiFormLabel.test.js +0 -66
- package/HiForm/HiInput.test.js +0 -202
- package/HiForm/HiPasswordField.test.js +0 -60
- package/HiForm/HiSearchField.test.js +0 -193
- package/HiForm/HiSlider.test.js +0 -99
- package/HiForm/HiTextField.test.js +0 -254
- package/HiForm/HiUpload.test.js +0 -241
- package/HiForm/HiUploadField.test.js +0 -55
- package/HiForm/HiUploadInput.test.js +0 -148
- package/HiIconButton/HiIconButton.test.js +0 -69
- package/HiLoader/HiLoader.test.js +0 -18
- package/HiMap/HiMap.test.js +0 -29
- package/HiMap/HiMapExpand.test.js +0 -48
- package/HiNotice/HiKPI.test.js +0 -171
- package/HiNotice/HiKPINotice.test.js +0 -88
- package/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/HiPin/HiPin.test.js +0 -61
- package/HiRadio/HiRadio.test.js +0 -57
- package/HiSelect/HiSelect.test.js +0 -1092
- package/HiSelect/HiSelectInput.test.js +0 -21
- package/HiSelectableList/HiSelectableList.test.js +0 -173
- package/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/HiSwitch/HiSwitch.test.js +0 -41
- package/HiSwitch/HiSwitchState.test.js +0 -76
- package/HiTable/HiTable.test.js +0 -29
- package/es/App.test.js +0 -8
- package/es/HiAlertModal/HiAlertModal.test.js +0 -189
- package/es/HiBadge/HiBadge.test.js +0 -49
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/es/HiBreadcrumb/HiStep.test.js +0 -47
- package/es/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/es/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/es/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/es/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/es/HiBreadcrumb/HiStepper.test.js +0 -33
- package/es/HiCell/CellAddress.test.js +0 -75
- package/es/HiCell/CellDate.test.js +0 -173
- package/es/HiCell/CellIcon.test.js +0 -57
- package/es/HiCell/CellImage.test.js +0 -49
- package/es/HiCell/CellNumeric.test.js +0 -46
- package/es/HiCell/CellRate.test.js +0 -73
- package/es/HiCell/CellSentinel.test.js +0 -48
- package/es/HiCell/CellText.test.js +0 -76
- package/es/HiCheckbox/HiCheckbox.test.js +0 -55
- package/es/HiChip/HiChip.test.js +0 -136
- package/es/HiChip/HiChipSwitch.test.js +0 -99
- package/es/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/es/HiDatePicker/Caption.test.js +0 -65
- package/es/HiDatePicker/HiDatePicker.test.js +0 -370
- package/es/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/es/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/es/HiDatePicker/ListPicker.test.js +0 -53
- package/es/HiDatePicker/NavBar.test.js +0 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/es/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/es/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/es/HiDotsStepper/HiDot.test.js +0 -55
- package/es/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/es/HiForm/HiAddressField.test.js +0 -79
- package/es/HiForm/HiEmailField.test.js +0 -19
- package/es/HiForm/HiFormControl.test.js +0 -195
- package/es/HiForm/HiFormLabel.test.js +0 -66
- package/es/HiForm/HiInput.test.js +0 -202
- package/es/HiForm/HiPasswordField.test.js +0 -60
- package/es/HiForm/HiSearchField.test.js +0 -193
- package/es/HiForm/HiSlider.test.js +0 -99
- package/es/HiForm/HiTextField.test.js +0 -254
- package/es/HiForm/HiUpload.test.js +0 -241
- package/es/HiForm/HiUploadField.test.js +0 -55
- package/es/HiForm/HiUploadInput.test.js +0 -148
- package/es/HiIconButton/HiIconButton.test.js +0 -69
- package/es/HiLoader/HiLoader.test.js +0 -18
- package/es/HiMap/HiMap.test.js +0 -29
- package/es/HiMap/HiMapExpand.test.js +0 -48
- package/es/HiNotice/HiKPI.test.js +0 -171
- package/es/HiNotice/HiKPINotice.test.js +0 -88
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/es/HiPin/HiPin.test.js +0 -61
- package/es/HiRadio/HiRadio.test.js +0 -57
- package/es/HiSelect/HiSelect.test.js +0 -1092
- package/es/HiSelect/HiSelectInput.test.js +0 -21
- package/es/HiSelectableList/HiSelectableList.test.js +0 -173
- package/es/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/es/HiSwitch/HiSwitch.test.js +0 -41
- package/es/HiSwitch/HiSwitchState.test.js +0 -76
- package/es/HiTable/HiTable.test.js +0 -29
- package/es/styles/colorManipulator.test.js +0 -242
- package/es/styles/createBreakpoints.test.js +0 -48
- package/es/styles/createGenerateClassName.test.js +0 -141
- package/es/styles/createMixins.test.js +0 -24
- package/es/styles/createMuiTheme.test.js +0 -67
- package/es/styles/createPalette.test.js +0 -159
- package/es/styles/createStyles.test.js +0 -8
- package/es/styles/createTypography.test.js +0 -60
- package/es/styles/getStylesCreator.test.js +0 -92
- package/es/styles/getThemeProps.test.js +0 -39
- package/es/styles/themeListener.test.js +0 -26
- package/es/styles/transitions.test.js +0 -208
- package/es/test-utils/until.test.js +0 -157
- package/es/withMobileDialog/withMobileDialog.test.js +0 -67
- package/styles/colorManipulator.test.js +0 -242
- package/styles/createBreakpoints.test.js +0 -48
- package/styles/createGenerateClassName.test.js +0 -141
- package/styles/createMixins.test.js +0 -24
- package/styles/createMuiTheme.test.js +0 -67
- package/styles/createPalette.test.js +0 -159
- package/styles/createStyles.test.js +0 -8
- package/styles/createTypography.test.js +0 -60
- package/styles/getStylesCreator.test.js +0 -92
- package/styles/getThemeProps.test.js +0 -39
- package/styles/themeListener.test.js +0 -26
- package/styles/transitions.test.js +0 -208
- package/test-utils/until.test.js +0 -157
- package/withMobileDialog/withMobileDialog.test.js +0 -67
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { assert } from 'chai';
|
|
2
|
-
import { stub } from 'sinon';
|
|
3
|
-
import transitions, { easing, duration, formatMs, isString, isNumber } from './transitions';
|
|
4
|
-
describe('transitions', function () {
|
|
5
|
-
var consoleErrorStub;
|
|
6
|
-
beforeEach(function () {
|
|
7
|
-
consoleErrorStub = stub(console, 'error');
|
|
8
|
-
});
|
|
9
|
-
afterEach(function () {
|
|
10
|
-
consoleErrorStub.restore();
|
|
11
|
-
});
|
|
12
|
-
describe('formatMs() function', function () {
|
|
13
|
-
it('should round decimal digits and return formatted value', function () {
|
|
14
|
-
var formattedValue = formatMs(12.125);
|
|
15
|
-
assert.strictEqual(formattedValue, '12ms');
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('isString() function', function () {
|
|
19
|
-
it('should return false when passed undefined', function () {
|
|
20
|
-
var value = isString();
|
|
21
|
-
assert.strictEqual(value, false);
|
|
22
|
-
});
|
|
23
|
-
it('should return false when not passed a string', function () {
|
|
24
|
-
var value = isString(1);
|
|
25
|
-
assert.strictEqual(value, false);
|
|
26
|
-
value = isString({});
|
|
27
|
-
assert.strictEqual(value, false);
|
|
28
|
-
value = isString([]);
|
|
29
|
-
assert.strictEqual(value, false);
|
|
30
|
-
});
|
|
31
|
-
it('should return true when passed a string', function () {
|
|
32
|
-
var value = isString('');
|
|
33
|
-
assert.strictEqual(value, true);
|
|
34
|
-
value = isString('test');
|
|
35
|
-
assert.strictEqual(value, true);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
describe('isNumber() function', function () {
|
|
39
|
-
it('should return false when passed undefined', function () {
|
|
40
|
-
var value = isNumber();
|
|
41
|
-
assert.strictEqual(value, false);
|
|
42
|
-
});
|
|
43
|
-
it('should return false when not passed a number', function () {
|
|
44
|
-
var value = isNumber('');
|
|
45
|
-
assert.strictEqual(value, false);
|
|
46
|
-
value = isNumber('test');
|
|
47
|
-
assert.strictEqual(value, false);
|
|
48
|
-
value = isNumber({});
|
|
49
|
-
assert.strictEqual(value, false);
|
|
50
|
-
value = isNumber([]);
|
|
51
|
-
assert.strictEqual(value, false);
|
|
52
|
-
});
|
|
53
|
-
it('should return true when passed a number', function () {
|
|
54
|
-
var value = isNumber(1);
|
|
55
|
-
assert.strictEqual(value, true);
|
|
56
|
-
value = isNumber(1.5);
|
|
57
|
-
assert.strictEqual(value, true);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe('create() function', function () {
|
|
61
|
-
it('should create default transition without arguments', function () {
|
|
62
|
-
var transition = transitions.create();
|
|
63
|
-
assert.strictEqual(transition, "all ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 0ms"));
|
|
64
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
65
|
-
});
|
|
66
|
-
it('should take string props as a first argument', function () {
|
|
67
|
-
var transition = transitions.create('color');
|
|
68
|
-
assert.strictEqual(transition, "color ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 0ms"));
|
|
69
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
70
|
-
});
|
|
71
|
-
it('should also take array of props as first argument', function () {
|
|
72
|
-
var options = {
|
|
73
|
-
delay: 20
|
|
74
|
-
};
|
|
75
|
-
var multiple = transitions.create(['color', 'size'], options);
|
|
76
|
-
var single1 = transitions.create('color', options);
|
|
77
|
-
var single2 = transitions.create('size', options);
|
|
78
|
-
var expected = "".concat(single1, ",").concat(single2);
|
|
79
|
-
assert.strictEqual(multiple, expected);
|
|
80
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
81
|
-
});
|
|
82
|
-
it('should warn when first argument is of bad type', function () {
|
|
83
|
-
// $FlowIgnore
|
|
84
|
-
transitions.create(5554); // $FlowIgnore
|
|
85
|
-
|
|
86
|
-
transitions.create({});
|
|
87
|
-
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
|
88
|
-
});
|
|
89
|
-
it('should optionally accept number "duration" option in second argument', function () {
|
|
90
|
-
var transition = transitions.create('font', {
|
|
91
|
-
duration: 500
|
|
92
|
-
});
|
|
93
|
-
assert.strictEqual(transition, "font 500ms ".concat(easing.easeInOut, " 0ms"));
|
|
94
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
95
|
-
});
|
|
96
|
-
it('should optionally accept string "duration" option in second argument', function () {
|
|
97
|
-
var transition = transitions.create('font', {
|
|
98
|
-
duration: '500ms'
|
|
99
|
-
});
|
|
100
|
-
assert.strictEqual(transition, "font 500ms ".concat(easing.easeInOut, " 0ms"));
|
|
101
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
102
|
-
});
|
|
103
|
-
it('should round decimal digits of "duration" prop to whole numbers', function () {
|
|
104
|
-
var transition = transitions.create('font', {
|
|
105
|
-
duration: 12.125
|
|
106
|
-
});
|
|
107
|
-
assert.strictEqual(transition, "font 12ms ".concat(easing.easeInOut, " 0ms"));
|
|
108
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
109
|
-
});
|
|
110
|
-
it('should warn when bad "duration" option type', function () {
|
|
111
|
-
// $FlowIgnore
|
|
112
|
-
transitions.create('font', {
|
|
113
|
-
duration: null
|
|
114
|
-
}); // $FlowIgnore
|
|
115
|
-
|
|
116
|
-
transitions.create('font', {
|
|
117
|
-
duration: {}
|
|
118
|
-
});
|
|
119
|
-
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
|
120
|
-
});
|
|
121
|
-
it('should optionally accept string "easing" option in second argument', function () {
|
|
122
|
-
var transition = transitions.create('transform', {
|
|
123
|
-
easing: easing.sharp
|
|
124
|
-
});
|
|
125
|
-
assert.strictEqual(transition, "transform ".concat(duration.standard, "ms ").concat(easing.sharp, " 0ms"));
|
|
126
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
127
|
-
});
|
|
128
|
-
it('should warn when bad "easing" option type', function () {
|
|
129
|
-
// $FlowIgnore
|
|
130
|
-
transitions.create('transform', {
|
|
131
|
-
easing: 123
|
|
132
|
-
}); // $FlowIgnore
|
|
133
|
-
|
|
134
|
-
transitions.create('transform', {
|
|
135
|
-
easing: {}
|
|
136
|
-
});
|
|
137
|
-
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
|
138
|
-
});
|
|
139
|
-
it('should optionally accept number "delay" option in second argument', function () {
|
|
140
|
-
var transition = transitions.create('size', {
|
|
141
|
-
delay: 150
|
|
142
|
-
});
|
|
143
|
-
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 150ms"));
|
|
144
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
145
|
-
});
|
|
146
|
-
it('should optionally accept string "delay" option in second argument', function () {
|
|
147
|
-
var transition = transitions.create('size', {
|
|
148
|
-
delay: '150ms'
|
|
149
|
-
});
|
|
150
|
-
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 150ms"));
|
|
151
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
152
|
-
});
|
|
153
|
-
it('should round decimal digits of "delay" prop to whole numbers', function () {
|
|
154
|
-
var transition = transitions.create('size', {
|
|
155
|
-
delay: 1.547
|
|
156
|
-
});
|
|
157
|
-
assert.strictEqual(transition, "size ".concat(duration.standard, "ms ").concat(easing.easeInOut, " 2ms"));
|
|
158
|
-
assert.strictEqual(consoleErrorStub.callCount, 0, 'Wrong number of calls of warning()');
|
|
159
|
-
});
|
|
160
|
-
it('should warn when bad "delay" option type', function () {
|
|
161
|
-
// $FlowIgnore
|
|
162
|
-
transitions.create('size', {
|
|
163
|
-
delay: null
|
|
164
|
-
}); // $FlowIgnore
|
|
165
|
-
|
|
166
|
-
transitions.create('size', {
|
|
167
|
-
delay: {}
|
|
168
|
-
});
|
|
169
|
-
assert.strictEqual(consoleErrorStub.callCount, 2, 'Wrong number of calls of warning()');
|
|
170
|
-
});
|
|
171
|
-
it('should warn when passed unrecognized option', function () {
|
|
172
|
-
transitions.create('size', {
|
|
173
|
-
fffds: 'value'
|
|
174
|
-
});
|
|
175
|
-
assert.strictEqual(consoleErrorStub.callCount, 1, 'Wrong number of calls of warning()');
|
|
176
|
-
});
|
|
177
|
-
it('should return zero when not passed arguments', function () {
|
|
178
|
-
var zeroHeightDuration = transitions.getAutoHeightDuration();
|
|
179
|
-
assert.strictEqual(zeroHeightDuration, 0);
|
|
180
|
-
});
|
|
181
|
-
it('should return zero when passed undefined', function () {
|
|
182
|
-
var zeroHeightDuration = transitions.getAutoHeightDuration(undefined);
|
|
183
|
-
assert.strictEqual(zeroHeightDuration, 0);
|
|
184
|
-
});
|
|
185
|
-
it('should return zero when passed null', function () {
|
|
186
|
-
var zeroHeightDuration = transitions.getAutoHeightDuration(null);
|
|
187
|
-
assert.strictEqual(zeroHeightDuration, 0);
|
|
188
|
-
});
|
|
189
|
-
it('should return NaN when passed a negative number', function () {
|
|
190
|
-
var zeroHeightDurationNegativeOne = transitions.getAutoHeightDuration(-1);
|
|
191
|
-
assert.strictEqual(Number.isNaN(zeroHeightDurationNegativeOne), true);
|
|
192
|
-
var zeroHeightDurationSmallNegative = transitions.getAutoHeightDuration(-0.000001);
|
|
193
|
-
assert.strictEqual(Number.isNaN(zeroHeightDurationSmallNegative), true);
|
|
194
|
-
var zeroHeightDurationBigNegative = transitions.getAutoHeightDuration(-100000);
|
|
195
|
-
assert.strictEqual(Number.isNaN(zeroHeightDurationBigNegative), true);
|
|
196
|
-
});
|
|
197
|
-
it('should return values for pre-calculated positive examples', function () {
|
|
198
|
-
var zeroHeightDuration = transitions.getAutoHeightDuration(14);
|
|
199
|
-
assert.strictEqual(zeroHeightDuration, 159);
|
|
200
|
-
zeroHeightDuration = transitions.getAutoHeightDuration(100);
|
|
201
|
-
assert.strictEqual(zeroHeightDuration, 239);
|
|
202
|
-
zeroHeightDuration = transitions.getAutoHeightDuration(0.0001);
|
|
203
|
-
assert.strictEqual(zeroHeightDuration, 46);
|
|
204
|
-
zeroHeightDuration = transitions.getAutoHeightDuration(100000);
|
|
205
|
-
assert.strictEqual(zeroHeightDuration, 6685);
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
});
|
package/test-utils/until.test.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
-
import assert from 'assert';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import { shallow } from 'enzyme';
|
|
12
|
-
import until from './until';
|
|
13
|
-
|
|
14
|
-
var Div = function Div() {
|
|
15
|
-
return React.createElement("div", null);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
var hoc = function hoc(Component) {
|
|
19
|
-
return function () {
|
|
20
|
-
return React.createElement(Component, null);
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
describe('until', function () {
|
|
25
|
-
it('shallow renders the current wrapper one level deep', function () {
|
|
26
|
-
var EnhancedDiv = hoc(Div);
|
|
27
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedDiv, null)), 'Div');
|
|
28
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null)), true);
|
|
29
|
-
});
|
|
30
|
-
it('shallow renders the current wrapper several levels deep', function () {
|
|
31
|
-
var EnhancedDiv = hoc(hoc(hoc(Div)));
|
|
32
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedDiv, null)), 'Div');
|
|
33
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null)), true);
|
|
34
|
-
});
|
|
35
|
-
it('stops shallow rendering when the wrapper is empty', function () {
|
|
36
|
-
var nullHoc = function nullHoc() {
|
|
37
|
-
return function () {
|
|
38
|
-
return null;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var EnhancedDiv = nullHoc();
|
|
43
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedDiv, null)), 'Div');
|
|
44
|
-
assert.strictEqual(wrapper.html(), null);
|
|
45
|
-
});
|
|
46
|
-
it('shallow renders as much as possible when no selector is provided', function () {
|
|
47
|
-
var EnhancedDiv = hoc(hoc(Div));
|
|
48
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedDiv, null)));
|
|
49
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null)), true);
|
|
50
|
-
});
|
|
51
|
-
it('shallow renders the current wrapper even if the selector never matches', function () {
|
|
52
|
-
var EnhancedDiv = hoc(Div);
|
|
53
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedDiv, null)), 'NotDiv');
|
|
54
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null)), true);
|
|
55
|
-
});
|
|
56
|
-
it('stops shallow rendering when it encounters a DOM element', function () {
|
|
57
|
-
var wrapper = until.call(shallow(React.createElement("div", null, React.createElement(Div, null))), 'Div');
|
|
58
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null, React.createElement(Div, null))), true);
|
|
59
|
-
});
|
|
60
|
-
it('throws when assert.strictEqual called on an empty wrapper', function () {
|
|
61
|
-
assert.throws(function () {
|
|
62
|
-
until.call(shallow(React.createElement(Div, null)).find('Foo'), 'div');
|
|
63
|
-
}, Error, 'Method “until” is only meant to be run on a single node. 0 found instead.');
|
|
64
|
-
});
|
|
65
|
-
it('shallow renders non-root wrappers', function () {
|
|
66
|
-
var Container = function Container() {
|
|
67
|
-
return React.createElement("div", null, React.createElement(Div, null));
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var wrapper = until.call(shallow(React.createElement(Container, null)).find(Div));
|
|
71
|
-
assert.strictEqual(wrapper.contains(React.createElement("div", null)), true);
|
|
72
|
-
}); // eslint-disable-next-line react/prefer-stateless-function
|
|
73
|
-
|
|
74
|
-
var Foo =
|
|
75
|
-
/*#__PURE__*/
|
|
76
|
-
function (_React$Component) {
|
|
77
|
-
_inherits(Foo, _React$Component);
|
|
78
|
-
|
|
79
|
-
function Foo() {
|
|
80
|
-
_classCallCheck(this, Foo);
|
|
81
|
-
|
|
82
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
_createClass(Foo, [{
|
|
86
|
-
key: "render",
|
|
87
|
-
value: function render() {
|
|
88
|
-
return React.createElement(Div, null);
|
|
89
|
-
}
|
|
90
|
-
}]);
|
|
91
|
-
|
|
92
|
-
return Foo;
|
|
93
|
-
}(React.Component);
|
|
94
|
-
|
|
95
|
-
Foo.contextTypes = {
|
|
96
|
-
quux: PropTypes.bool.isRequired
|
|
97
|
-
};
|
|
98
|
-
it('context propagation passes down context from the root component', function () {
|
|
99
|
-
var EnhancedFoo = hoc(Foo);
|
|
100
|
-
var options = {
|
|
101
|
-
context: {
|
|
102
|
-
quux: true
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedFoo, null), options), 'Foo', options);
|
|
106
|
-
assert.strictEqual(wrapper.context('quux'), true);
|
|
107
|
-
assert.strictEqual(wrapper.contains(React.createElement(Div, null)), true);
|
|
108
|
-
}); // eslint-disable-next-line react/no-multi-comp
|
|
109
|
-
|
|
110
|
-
var Bar =
|
|
111
|
-
/*#__PURE__*/
|
|
112
|
-
function (_React$Component2) {
|
|
113
|
-
_inherits(Bar, _React$Component2);
|
|
114
|
-
|
|
115
|
-
function Bar() {
|
|
116
|
-
var _getPrototypeOf2;
|
|
117
|
-
|
|
118
|
-
var _this;
|
|
119
|
-
|
|
120
|
-
_classCallCheck(this, Bar);
|
|
121
|
-
|
|
122
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
123
|
-
args[_key] = arguments[_key];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Bar)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
127
|
-
|
|
128
|
-
_defineProperty(_assertThisInitialized(_this), "getChildContext", function () {
|
|
129
|
-
return {
|
|
130
|
-
quux: true
|
|
131
|
-
};
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
return _this;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
_createClass(Bar, [{
|
|
138
|
-
key: "render",
|
|
139
|
-
value: function render() {
|
|
140
|
-
return React.createElement(Foo, null);
|
|
141
|
-
}
|
|
142
|
-
}]);
|
|
143
|
-
|
|
144
|
-
return Bar;
|
|
145
|
-
}(React.Component);
|
|
146
|
-
|
|
147
|
-
_defineProperty(Bar, "childContextTypes", {
|
|
148
|
-
quux: PropTypes.bool
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
it('context propagation passes down context from an intermediary component', function () {
|
|
152
|
-
var EnhancedBar = hoc(Bar);
|
|
153
|
-
var wrapper = until.call(shallow(React.createElement(EnhancedBar, null)), 'Foo');
|
|
154
|
-
assert.strictEqual(wrapper.context('quux'), true);
|
|
155
|
-
assert.strictEqual(wrapper.contains(React.createElement(Div, null)), true);
|
|
156
|
-
});
|
|
157
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { assert } from 'chai';
|
|
3
|
-
import { createShallow, getClasses } from '../test-utils';
|
|
4
|
-
import Paper from '@material-ui/core/Paper';
|
|
5
|
-
import Dialog from '@material-ui/core/Dialog';
|
|
6
|
-
import withMobileDialog from './withMobileDialog';
|
|
7
|
-
describe('withMobileDialog', function () {
|
|
8
|
-
var shallow;
|
|
9
|
-
var classes;
|
|
10
|
-
var defaultProps = {
|
|
11
|
-
open: false
|
|
12
|
-
};
|
|
13
|
-
before(function () {
|
|
14
|
-
shallow = createShallow({
|
|
15
|
-
untilSelector: 'Dialog'
|
|
16
|
-
});
|
|
17
|
-
classes = getClasses(React.createElement(Dialog, defaultProps, "foo"));
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
function isFullScreen(breakpoints, width) {
|
|
21
|
-
breakpoints.forEach(function (breakpoint) {
|
|
22
|
-
it("is for width: ".concat(width, " <= ").concat(breakpoint), function () {
|
|
23
|
-
var ResponsiveDialog = withMobileDialog({
|
|
24
|
-
breakpoint: breakpoint
|
|
25
|
-
})(Dialog);
|
|
26
|
-
var wrapper = shallow(React.createElement(ResponsiveDialog, Object.assign({}, defaultProps, {
|
|
27
|
-
width: width
|
|
28
|
-
}), "foo"));
|
|
29
|
-
assert.strictEqual(wrapper.find(Paper).hasClass(classes.paperFullScreen), true);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isNotFullScreen(breakpoints, width) {
|
|
35
|
-
breakpoints.forEach(function (breakpoint) {
|
|
36
|
-
it("is not for width: ".concat(width, " > ").concat(breakpoint), function () {
|
|
37
|
-
var ResponsiveDialog = withMobileDialog({
|
|
38
|
-
breakpoint: breakpoint
|
|
39
|
-
})(Dialog);
|
|
40
|
-
var wrapper = shallow(React.createElement(ResponsiveDialog, Object.assign({}, defaultProps, {
|
|
41
|
-
width: width
|
|
42
|
-
}), "foo"));
|
|
43
|
-
assert.strictEqual(wrapper.find(Paper).hasClass(classes.paperFullScreen), false);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
describe('screen width: xs', function () {
|
|
49
|
-
isFullScreen(['xs', 'sm', 'md', 'lg', 'xl'], 'xs');
|
|
50
|
-
});
|
|
51
|
-
describe('screen width: sm (default)', function () {
|
|
52
|
-
isFullScreen(['sm', 'md', 'lg', 'xl'], 'sm');
|
|
53
|
-
isNotFullScreen(['xs'], 'sm');
|
|
54
|
-
});
|
|
55
|
-
describe('screen width: md', function () {
|
|
56
|
-
isFullScreen(['md', 'lg', 'xl'], 'md');
|
|
57
|
-
isNotFullScreen(['xs', 'sm'], 'md');
|
|
58
|
-
});
|
|
59
|
-
describe('screen width: lg', function () {
|
|
60
|
-
isFullScreen(['lg', 'xl'], 'lg');
|
|
61
|
-
isNotFullScreen(['xs', 'sm', 'md'], 'lg');
|
|
62
|
-
});
|
|
63
|
-
describe('screen width: xl', function () {
|
|
64
|
-
isFullScreen(['xl'], 'xl');
|
|
65
|
-
isNotFullScreen(['xs', 'sm', 'md', 'lg'], 'xl');
|
|
66
|
-
});
|
|
67
|
-
});
|