@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,50 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
17
|
+
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
19
|
+
|
|
20
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
21
|
+
|
|
22
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
23
|
+
|
|
24
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
25
|
+
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
|
+
|
|
28
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
29
|
+
|
|
30
|
+
var _warning = _interopRequireDefault(require("warning"));
|
|
31
|
+
|
|
32
|
+
var _brcast = _interopRequireDefault(require("brcast"));
|
|
33
|
+
|
|
34
|
+
var _themeListener = _interopRequireWildcard(require("./themeListener"));
|
|
35
|
+
|
|
36
|
+
var _exactProp = _interopRequireDefault(require("../utils/exactProp"));
|
|
37
|
+
|
|
15
38
|
/**
|
|
16
39
|
* This component takes a `theme` property.
|
|
17
40
|
* It makes the `theme` available down the React tree thanks to React context.
|
|
18
41
|
* This component should preferably be used at **the root of your component tree**.
|
|
19
42
|
*/
|
|
20
|
-
|
|
21
43
|
var MuiThemeProvider =
|
|
22
44
|
/*#__PURE__*/
|
|
23
45
|
function (_React$Component) {
|
|
24
|
-
|
|
46
|
+
(0, _inherits2.default)(MuiThemeProvider, _React$Component);
|
|
25
47
|
|
|
26
48
|
// We are not using the React state in order to avoid unnecessary rerender.
|
|
27
49
|
function MuiThemeProvider(props, context) {
|
|
28
50
|
var _this;
|
|
29
51
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(MuiThemeProvider).call(this)); // Get the outer theme from the context, can be null
|
|
33
|
-
|
|
34
|
-
_defineProperty(_assertThisInitialized(_this), "broadcast", createBroadcast());
|
|
52
|
+
(0, _classCallCheck2.default)(this, MuiThemeProvider);
|
|
53
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MuiThemeProvider).call(this)); // Get the outer theme from the context, can be null
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_this.outerTheme = themeListener.initial(context); // Propagate the theme so it can be accessed by the children
|
|
55
|
+
_this.broadcast = (0, _brcast.default)();
|
|
56
|
+
_this.unsubscribeId = null;
|
|
57
|
+
_this.outerTheme = null;
|
|
58
|
+
_this.outerTheme = _themeListener.default.initial(context); // Propagate the theme so it can be accessed by the children
|
|
41
59
|
|
|
42
60
|
_this.broadcast.setState(_this.mergeOuterLocalTheme(props.theme));
|
|
43
61
|
|
|
44
62
|
return _this;
|
|
45
63
|
}
|
|
46
64
|
|
|
47
|
-
|
|
65
|
+
(0, _createClass2.default)(MuiThemeProvider, [{
|
|
48
66
|
key: "getChildContext",
|
|
49
67
|
value: function getChildContext() {
|
|
50
68
|
var _ref;
|
|
@@ -62,7 +80,7 @@ function (_React$Component) {
|
|
|
62
80
|
muiThemeProviderOptions.disableStylesGeneration = disableStylesGeneration;
|
|
63
81
|
}
|
|
64
82
|
|
|
65
|
-
return _ref = {},
|
|
83
|
+
return _ref = {}, (0, _defineProperty2.default)(_ref, _themeListener.CHANNEL, this.broadcast), (0, _defineProperty2.default)(_ref, "muiThemeProviderOptions", muiThemeProviderOptions), _ref;
|
|
66
84
|
}
|
|
67
85
|
}, {
|
|
68
86
|
key: "componentDidMount",
|
|
@@ -70,7 +88,7 @@ function (_React$Component) {
|
|
|
70
88
|
var _this2 = this;
|
|
71
89
|
|
|
72
90
|
// Subscribe on the outer theme, if present
|
|
73
|
-
this.unsubscribeId =
|
|
91
|
+
this.unsubscribeId = _themeListener.default.subscribe(this.context, function (outerTheme) {
|
|
74
92
|
_this2.outerTheme = outerTheme; // Forward the parent theme update to the children
|
|
75
93
|
|
|
76
94
|
_this2.broadcast.setState(_this2.mergeOuterLocalTheme(_this2.props.theme));
|
|
@@ -88,7 +106,7 @@ function (_React$Component) {
|
|
|
88
106
|
key: "componentWillUnmount",
|
|
89
107
|
value: function componentWillUnmount() {
|
|
90
108
|
if (this.unsubscribeId !== null) {
|
|
91
|
-
|
|
109
|
+
_themeListener.default.unsubscribe(this.context, this.unsubscribeId);
|
|
92
110
|
}
|
|
93
111
|
} // Simple merge between the outer theme and the local theme
|
|
94
112
|
|
|
@@ -97,7 +115,7 @@ function (_React$Component) {
|
|
|
97
115
|
value: function mergeOuterLocalTheme(localTheme) {
|
|
98
116
|
// To support composition of theme.
|
|
99
117
|
if (typeof localTheme === 'function') {
|
|
100
|
-
|
|
118
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(this.outerTheme, ['Material-UI: you are providing a theme function property ' + 'to the MuiThemeProvider component:', '<MuiThemeProvider theme={outerTheme => outerTheme} />', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n')) : void 0;
|
|
101
119
|
return localTheme(this.outerTheme);
|
|
102
120
|
}
|
|
103
121
|
|
|
@@ -105,7 +123,7 @@ function (_React$Component) {
|
|
|
105
123
|
return localTheme;
|
|
106
124
|
}
|
|
107
125
|
|
|
108
|
-
return
|
|
126
|
+
return (0, _objectSpread2.default)({}, this.outerTheme, {}, localTheme);
|
|
109
127
|
}
|
|
110
128
|
}, {
|
|
111
129
|
key: "render",
|
|
@@ -122,14 +140,14 @@ function (_React$Component) {
|
|
|
122
140
|
return this.props.children;
|
|
123
141
|
}
|
|
124
142
|
}]);
|
|
125
|
-
|
|
126
143
|
return MuiThemeProvider;
|
|
127
|
-
}(
|
|
144
|
+
}(_react.default.Component);
|
|
128
145
|
|
|
129
|
-
MuiThemeProvider.childContextTypes =
|
|
130
|
-
muiThemeProviderOptions:
|
|
146
|
+
MuiThemeProvider.childContextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
|
|
147
|
+
muiThemeProviderOptions: _propTypes.default.object
|
|
131
148
|
});
|
|
132
|
-
MuiThemeProvider.contextTypes =
|
|
133
|
-
muiThemeProviderOptions:
|
|
149
|
+
MuiThemeProvider.contextTypes = (0, _objectSpread2.default)({}, _themeListener.default.contextTypes, {
|
|
150
|
+
muiThemeProviderOptions: _propTypes.default.object
|
|
134
151
|
});
|
|
135
|
-
|
|
152
|
+
var _default = MuiThemeProvider;
|
|
153
|
+
exports.default = _default;
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.convertHexToRGB = convertHexToRGB;
|
|
9
|
+
exports.rgbToHex = rgbToHex;
|
|
10
|
+
exports.decomposeColor = decomposeColor;
|
|
11
|
+
exports.recomposeColor = recomposeColor;
|
|
12
|
+
exports.getContrastRatio = getContrastRatio;
|
|
13
|
+
exports.getLuminance = getLuminance;
|
|
14
|
+
exports.emphasize = emphasize;
|
|
15
|
+
exports.fade = fade;
|
|
16
|
+
exports.darken = darken;
|
|
17
|
+
exports.lighten = lighten;
|
|
18
|
+
|
|
19
|
+
var _warning = _interopRequireDefault(require("warning"));
|
|
20
|
+
|
|
1
21
|
/* eslint-disable no-use-before-define */
|
|
2
|
-
|
|
22
|
+
|
|
3
23
|
/**
|
|
4
24
|
* Returns a number whose value is limited to the given range.
|
|
5
25
|
*
|
|
@@ -8,11 +28,10 @@ import warning from 'warning';
|
|
|
8
28
|
* @param {number} max The upper boundary of the output range
|
|
9
29
|
* @returns {number} A number in the range [min, max]
|
|
10
30
|
*/
|
|
11
|
-
|
|
12
31
|
function clamp(value) {
|
|
13
32
|
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
14
33
|
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
15
|
-
|
|
34
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(value >= min && value <= max, "Material-UI: the value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "].")) : void 0;
|
|
16
35
|
|
|
17
36
|
if (value < min) {
|
|
18
37
|
return min;
|
|
@@ -32,7 +51,7 @@ function clamp(value) {
|
|
|
32
51
|
*/
|
|
33
52
|
|
|
34
53
|
|
|
35
|
-
|
|
54
|
+
function convertHexToRGB(color) {
|
|
36
55
|
color = color.substr(1);
|
|
37
56
|
var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g');
|
|
38
57
|
var colors = color.match(re);
|
|
@@ -54,7 +73,8 @@ export function convertHexToRGB(color) {
|
|
|
54
73
|
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
|
|
55
74
|
*/
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
|
|
77
|
+
function rgbToHex(color) {
|
|
58
78
|
// Pass hex straight through
|
|
59
79
|
if (color.indexOf('#') === 0) {
|
|
60
80
|
return color;
|
|
@@ -82,7 +102,8 @@ export function rgbToHex(color) {
|
|
|
82
102
|
* @returns {object} - A MUI color object: {type: string, values: number[]}
|
|
83
103
|
*/
|
|
84
104
|
|
|
85
|
-
|
|
105
|
+
|
|
106
|
+
function decomposeColor(color) {
|
|
86
107
|
if (color.charAt(0) === '#') {
|
|
87
108
|
return decomposeColor(convertHexToRGB(color));
|
|
88
109
|
}
|
|
@@ -114,7 +135,8 @@ export function decomposeColor(color) {
|
|
|
114
135
|
* @returns {string} A CSS color string
|
|
115
136
|
*/
|
|
116
137
|
|
|
117
|
-
|
|
138
|
+
|
|
139
|
+
function recomposeColor(color) {
|
|
118
140
|
var type = color.type;
|
|
119
141
|
var values = color.values;
|
|
120
142
|
|
|
@@ -142,7 +164,8 @@ export function recomposeColor(color) {
|
|
|
142
164
|
* @returns {number} A contrast ratio value in the range 0 - 21.
|
|
143
165
|
*/
|
|
144
166
|
|
|
145
|
-
|
|
167
|
+
|
|
168
|
+
function getContrastRatio(foreground, background) {
|
|
146
169
|
var lumA = getLuminance(foreground);
|
|
147
170
|
var lumB = getLuminance(background);
|
|
148
171
|
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
|
@@ -157,7 +180,8 @@ export function getContrastRatio(foreground, background) {
|
|
|
157
180
|
* @returns {number} The relative brightness of the color in the range 0 - 1
|
|
158
181
|
*/
|
|
159
182
|
|
|
160
|
-
|
|
183
|
+
|
|
184
|
+
function getLuminance(color) {
|
|
161
185
|
var decomposedColor = decomposeColor(color);
|
|
162
186
|
|
|
163
187
|
if (decomposedColor.type.indexOf('rgb') !== -1) {
|
|
@@ -182,7 +206,8 @@ export function getLuminance(color) {
|
|
|
182
206
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
|
183
207
|
*/
|
|
184
208
|
|
|
185
|
-
|
|
209
|
+
|
|
210
|
+
function emphasize(color) {
|
|
186
211
|
var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
|
|
187
212
|
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
|
188
213
|
}
|
|
@@ -195,8 +220,9 @@ export function emphasize(color) {
|
|
|
195
220
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
|
196
221
|
*/
|
|
197
222
|
|
|
198
|
-
|
|
199
|
-
|
|
223
|
+
|
|
224
|
+
function fade(color, value) {
|
|
225
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0;
|
|
200
226
|
if (!color) return color;
|
|
201
227
|
color = decomposeColor(color);
|
|
202
228
|
value = clamp(value);
|
|
@@ -216,8 +242,9 @@ export function fade(color, value) {
|
|
|
216
242
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
|
217
243
|
*/
|
|
218
244
|
|
|
219
|
-
|
|
220
|
-
|
|
245
|
+
|
|
246
|
+
function darken(color, coefficient) {
|
|
247
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
|
221
248
|
if (!color) return color;
|
|
222
249
|
color = decomposeColor(color);
|
|
223
250
|
coefficient = clamp(coefficient);
|
|
@@ -240,8 +267,9 @@ export function darken(color, coefficient) {
|
|
|
240
267
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
|
241
268
|
*/
|
|
242
269
|
|
|
243
|
-
|
|
244
|
-
|
|
270
|
+
|
|
271
|
+
function lighten(color, coefficient) {
|
|
272
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
|
245
273
|
if (!color) return color;
|
|
246
274
|
color = decomposeColor(color);
|
|
247
275
|
coefficient = clamp(coefficient);
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = createBreakpoints;
|
|
9
|
+
exports.keys = void 0;
|
|
10
|
+
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
12
|
+
|
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
14
|
+
|
|
3
15
|
// Sorted ASC by size. That's important.
|
|
4
16
|
// It can't be configured as it's used statically for propTypes.
|
|
5
|
-
|
|
17
|
+
var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.
|
|
18
|
+
|
|
19
|
+
exports.keys = keys;
|
|
6
20
|
|
|
7
|
-
|
|
21
|
+
function createBreakpoints(breakpoints) {
|
|
8
22
|
var _breakpoints$values = breakpoints.values,
|
|
9
23
|
values = _breakpoints$values === void 0 ? {
|
|
10
24
|
xs: 0,
|
|
@@ -17,7 +31,7 @@ export default function createBreakpoints(breakpoints) {
|
|
|
17
31
|
unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
|
|
18
32
|
_breakpoints$step = breakpoints.step,
|
|
19
33
|
step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
|
|
20
|
-
other =
|
|
34
|
+
other = (0, _objectWithoutProperties2.default)(breakpoints, ["values", "unit", "step"]);
|
|
21
35
|
|
|
22
36
|
function up(key) {
|
|
23
37
|
var value = typeof values[key] === 'number' ? values[key] : key;
|
|
@@ -55,7 +69,7 @@ export default function createBreakpoints(breakpoints) {
|
|
|
55
69
|
return values[key];
|
|
56
70
|
}
|
|
57
71
|
|
|
58
|
-
return
|
|
72
|
+
return (0, _objectSpread2.default)({
|
|
59
73
|
keys: keys,
|
|
60
74
|
values: values,
|
|
61
75
|
up: up,
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = createGenerateClassName;
|
|
9
|
+
|
|
10
|
+
var _warning = _interopRequireDefault(require("warning"));
|
|
11
|
+
|
|
1
12
|
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
|
|
13
|
+
// People might bundle this classname generator twice.
|
|
3
14
|
// We need to use a global.
|
|
4
|
-
|
|
5
15
|
global.__MUI_GENERATOR_COUNTER__ = 0;
|
|
6
16
|
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
|
|
7
17
|
|
|
8
18
|
function safePrefix(classNamePrefix) {
|
|
9
19
|
var prefix = String(classNamePrefix);
|
|
10
|
-
|
|
20
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(prefix.length < 256, "Material-UI: the class name prefix is too long: ".concat(prefix, ".")) : void 0; // Sanitize the string as will be used to prefix the generated class name.
|
|
11
21
|
|
|
12
22
|
return prefix.replace(escapeRegex, '-');
|
|
13
23
|
} // Returns a function which generates unique class names based on counters.
|
|
@@ -18,7 +28,7 @@ function safePrefix(classNamePrefix) {
|
|
|
18
28
|
// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js
|
|
19
29
|
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
function createGenerateClassName() {
|
|
22
32
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23
33
|
var _options$dangerouslyU = options.dangerouslyUseGlobalCSS,
|
|
24
34
|
dangerouslyUseGlobalCSS = _options$dangerouslyU === void 0 ? false : _options$dangerouslyU,
|
|
@@ -40,7 +50,7 @@ export default function createGenerateClassName() {
|
|
|
40
50
|
|
|
41
51
|
return function (rule, styleSheet) {
|
|
42
52
|
ruleCounter += 1;
|
|
43
|
-
|
|
53
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(ruleCounter < 1e10, ['Material-UI: you might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join('')) : void 0; // Code branch the whole block at the expense of more code.
|
|
44
54
|
|
|
45
55
|
if (dangerouslyUseGlobalCSS) {
|
|
46
56
|
if (styleSheet) {
|
package/styles/createMixins.js
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = createMixins;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
function createMixins(breakpoints, spacing, mixins) {
|
|
4
15
|
var _toolbar;
|
|
5
16
|
|
|
6
|
-
return
|
|
17
|
+
return (0, _objectSpread3.default)({
|
|
7
18
|
gutters: function gutters() {
|
|
8
19
|
var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9
|
-
return
|
|
20
|
+
return (0, _objectSpread3.default)({
|
|
10
21
|
paddingLeft: spacing(4),
|
|
11
22
|
paddingRight: spacing(4)
|
|
12
|
-
}, styles,
|
|
23
|
+
}, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _objectSpread3.default)({
|
|
13
24
|
paddingLeft: spacing(6),
|
|
14
25
|
paddingRight: spacing(6)
|
|
15
26
|
}, styles[breakpoints.up('sm')])));
|
|
16
27
|
},
|
|
17
28
|
toolbar: (_toolbar = {
|
|
18
29
|
minHeight: 56
|
|
19
|
-
},
|
|
30
|
+
}, (0, _defineProperty2.default)(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
|
|
20
31
|
minHeight: 48
|
|
21
|
-
}),
|
|
32
|
+
}), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {
|
|
22
33
|
minHeight: 64
|
|
23
34
|
}), _toolbar)
|
|
24
35
|
}, mixins);
|
package/styles/createMuiTheme.js
CHANGED
|
@@ -1,22 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import deepmerge from 'deepmerge'; // < 1kb payload overhead when lodash/merge is > 3kb.
|
|
4
|
-
|
|
5
|
-
import isPlainObject from 'is-plain-object';
|
|
6
|
-
import warning from 'warning';
|
|
7
|
-
import createBreakpoints from './createBreakpoints';
|
|
8
|
-
import createMixins from './createMixins';
|
|
9
|
-
import createPalette from './createPalette';
|
|
10
|
-
import createTypography from './createTypography';
|
|
11
|
-
import shadows from './shadows';
|
|
12
|
-
import shape from './shape';
|
|
13
|
-
import spacing from './spacing';
|
|
14
|
-
import transitions from './transitions';
|
|
15
|
-
import zIndex from './zIndex';
|
|
1
|
+
"use strict";
|
|
16
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _deepmerge = _interopRequireDefault(require("deepmerge"));
|
|
15
|
+
|
|
16
|
+
var _isPlainObject = _interopRequireDefault(require("is-plain-object"));
|
|
17
|
+
|
|
18
|
+
var _warning = _interopRequireDefault(require("warning"));
|
|
19
|
+
|
|
20
|
+
var _createBreakpoints = _interopRequireDefault(require("./createBreakpoints"));
|
|
21
|
+
|
|
22
|
+
var _createMixins = _interopRequireDefault(require("./createMixins"));
|
|
23
|
+
|
|
24
|
+
var _createPalette = _interopRequireDefault(require("./createPalette"));
|
|
25
|
+
|
|
26
|
+
var _createTypography = _interopRequireDefault(require("./createTypography"));
|
|
27
|
+
|
|
28
|
+
var _shadows = _interopRequireDefault(require("./shadows"));
|
|
29
|
+
|
|
30
|
+
var _shape = _interopRequireDefault(require("./shape"));
|
|
31
|
+
|
|
32
|
+
var _spacing = _interopRequireDefault(require("./spacing"));
|
|
33
|
+
|
|
34
|
+
var _transitions = _interopRequireDefault(require("./transitions"));
|
|
35
|
+
|
|
36
|
+
var _zIndex = _interopRequireDefault(require("./zIndex"));
|
|
37
|
+
|
|
38
|
+
// < 1kb payload overhead when lodash/merge is > 3kb.
|
|
17
39
|
function createMuiTheme() {
|
|
18
40
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
|
-
|
|
20
41
|
var _options$breakpoints = options.breakpoints,
|
|
21
42
|
breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,
|
|
22
43
|
_options$mixins = options.mixins,
|
|
@@ -26,33 +47,31 @@ function createMuiTheme() {
|
|
|
26
47
|
shadowsInput = options.shadows,
|
|
27
48
|
_options$typography = options.typography,
|
|
28
49
|
typographyInput = _options$typography === void 0 ? {} : _options$typography,
|
|
29
|
-
other =
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var muiTheme = _objectSpread({
|
|
50
|
+
other = (0, _objectWithoutProperties2.default)(options, ["breakpoints", "mixins", "palette", "shadows", "typography"]);
|
|
51
|
+
var palette = (0, _createPalette.default)(paletteInput);
|
|
52
|
+
var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);
|
|
53
|
+
var muiTheme = (0, _objectSpread2.default)({
|
|
35
54
|
breakpoints: breakpoints,
|
|
36
55
|
direction: 'ltr',
|
|
37
|
-
mixins:
|
|
56
|
+
mixins: (0, _createMixins.default)(breakpoints, _spacing.default, mixinsInput),
|
|
38
57
|
overrides: {},
|
|
39
58
|
// Inject custom styles
|
|
40
59
|
palette: palette,
|
|
41
60
|
props: {},
|
|
42
61
|
// Inject custom properties
|
|
43
|
-
shadows: shadowsInput ||
|
|
44
|
-
typography:
|
|
45
|
-
},
|
|
46
|
-
shape:
|
|
47
|
-
spacing:
|
|
48
|
-
transitions:
|
|
49
|
-
zIndex:
|
|
62
|
+
shadows: shadowsInput || _shadows.default,
|
|
63
|
+
typography: (0, _createTypography.default)(palette, typographyInput)
|
|
64
|
+
}, (0, _deepmerge.default)({
|
|
65
|
+
shape: _shape.default,
|
|
66
|
+
spacing: _spacing.default,
|
|
67
|
+
transitions: _transitions.default,
|
|
68
|
+
zIndex: _zIndex.default
|
|
50
69
|
}, other, {
|
|
51
|
-
isMergeableObject:
|
|
70
|
+
isMergeableObject: _isPlainObject.default
|
|
52
71
|
}));
|
|
53
|
-
|
|
54
|
-
warning(muiTheme.shadows.length === 25, 'Material-UI: the shadows array provided to createMuiTheme should support 25 elevations.');
|
|
72
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(muiTheme.shadows.length === 25, 'Material-UI: the shadows array provided to createMuiTheme should support 25 elevations.') : void 0;
|
|
55
73
|
return muiTheme;
|
|
56
74
|
}
|
|
57
75
|
|
|
58
|
-
|
|
76
|
+
var _default = createMuiTheme;
|
|
77
|
+
exports.default = _default;
|