@hipay/hipay-material-ui 4.0.1-beta3 → 4.0.1-beta5
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/HiAccordion/HiAccordion.js +26 -8
- package/HiAccordion/index.js +5 -1
- package/HiAccordionActions/HiAccordionActions.js +14 -1
- package/HiAccordionActions/index.js +5 -1
- package/HiAccordionSummary/HiAccordionSummary.js +15 -1
- package/HiAccordionSummary/index.js +5 -1
- package/HiAlertModal/HiAlertModal.js +22 -7
- package/HiAlertModal/index.js +5 -1
- package/HiAppBar/HiAppBar.js +47 -15
- package/HiAppBar/index.js +2 -0
- package/HiAvatar/HiAvatar.js +12 -3
- package/HiAvatar/index.js +2 -0
- package/HiBadge/HiBadge.js +24 -8
- package/HiBadge/index.js +2 -0
- package/HiBreadcrumb/HiBreadcrumb.js +35 -10
- package/HiBreadcrumb/HiStep.js +50 -17
- package/HiBreadcrumb/HiStepConnector.js +55 -18
- package/HiBreadcrumb/HiStepContent.js +35 -10
- package/HiBreadcrumb/HiStepIcon.js +40 -14
- package/HiBreadcrumb/HiStepLabel.js +49 -18
- package/HiBreadcrumb/HiStepper.js +35 -10
- package/HiBreadcrumb/index.js +2 -0
- package/HiButton/HiButton.js +33 -8
- package/HiButton/index.js +5 -1
- package/HiCell/CellAddress.js +38 -16
- package/HiCell/CellDate.js +41 -14
- package/HiCell/CellHiddenContent.js +30 -8
- package/HiCell/CellIcon.js +41 -16
- package/HiCell/CellImage.js +39 -16
- package/HiCell/CellNumeric.js +45 -17
- package/HiCell/CellPinToAction.js +38 -13
- package/HiCell/CellRate.js +52 -17
- package/HiCell/CellSentinel.js +38 -16
- package/HiCell/CellSentinelScore.js +36 -13
- package/HiCell/CellText.js +58 -21
- package/HiCell/CellTextStyled.js +24 -13
- package/HiCell/index.js +10 -0
- package/HiCheckbox/HiCheckbox.js +57 -19
- package/HiCheckbox/index.js +2 -0
- package/HiChip/HiChip.js +47 -24
- package/HiChip/HiChipSwitch.js +65 -21
- package/HiChip/index.js +3 -0
- package/HiColoredLabel/HiColoredLabel.js +49 -15
- package/HiColoredLabel/index.js +2 -0
- package/HiDatePicker/Caption.js +21 -9
- package/HiDatePicker/HiDatePicker.js +93 -20
- package/HiDatePicker/HiDatePickerMobile.js +48 -22
- package/HiDatePicker/HiDateRangePicker.js +139 -42
- package/HiDatePicker/HiDateRangeSelector.js +135 -53
- package/HiDatePicker/ListPicker.js +43 -12
- package/HiDatePicker/NavBar.js +31 -12
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +32 -9
- package/HiDatePicker/Overlays/Overlay.js +25 -8
- package/HiDatePicker/Overlays/TimePickerOverlay.js +45 -13
- package/HiDatePicker/Overlays/YearPickerOverlay.js +38 -13
- package/HiDatePicker/Overlays/index.js +6 -0
- package/HiDatePicker/Weekday.js +9 -4
- package/HiDatePicker/hiLocaleUtils.js +20 -8
- package/HiDatePicker/index.js +2 -0
- package/HiDatePicker/stylesheet.js +13 -6
- package/HiDialog/HiDialog.js +19 -7
- package/HiDialog/index.js +2 -0
- package/HiDotsStepper/HiDot.js +42 -12
- package/HiDotsStepper/HiDotsStepper.js +43 -15
- package/HiDotsStepper/index.js +3 -0
- package/HiExpansionPanel/HiExpansionPanel.js +38 -16
- package/HiExpansionPanel/index.js +5 -1
- package/HiForm/HiAddressField.js +41 -14
- package/HiForm/HiEmailField.js +34 -9
- package/HiForm/HiFormControl.js +79 -32
- package/HiForm/HiFormLabel.js +45 -18
- package/HiForm/HiInput.js +97 -37
- package/HiForm/HiPasswordField.js +43 -13
- package/HiForm/HiSearchField.js +40 -8
- package/HiForm/HiSlider.js +62 -26
- package/HiForm/HiTextField.js +52 -26
- package/HiForm/HiUpload.js +94 -33
- package/HiForm/HiUploadField.js +37 -14
- package/HiForm/HiUploadInput.js +81 -25
- package/HiForm/index.js +12 -0
- package/HiIcon/HiIcon.js +34 -9
- package/HiIcon/index.js +2 -0
- package/HiIconButton/HiIconButton.js +21 -6
- package/HiIconButton/index.js +2 -0
- package/HiListItemLink/HiListItemLink.js +19 -6
- package/HiListItemLink/index.js +2 -0
- package/HiLoader/HiLoader.js +16 -6
- package/HiLoader/index.js +2 -0
- package/HiNotice/HiKPI.js +53 -21
- package/HiNotice/HiKPINotice.js +16 -6
- package/HiNotice/index.js +3 -0
- package/HiPagination/HiPagination.js +11 -1
- package/HiPagination/index.js +2 -0
- package/HiPaymentMeans/HiPaymentMeans.js +72 -31
- package/HiPaymentMeans/index.js +2 -0
- package/HiPdfReader/HiPdfReader.js +61 -27
- package/HiPdfReader/index.js +2 -0
- package/HiPin/HiPin.js +19 -7
- package/HiPin/index.js +2 -0
- package/HiRadio/HiRadio.js +22 -11
- package/HiRadio/index.js +2 -0
- package/HiScrollStepper/HiScrollStepper.js +67 -29
- package/HiScrollStepper/index.js +2 -0
- package/HiSelect/HiDynamicSelect.js +47 -36
- package/HiSelect/HiDynamicSelectField.js +52 -27
- package/HiSelect/HiNestedSelect.js +116 -69
- package/HiSelect/HiNestedSelectContent.js +90 -63
- package/HiSelect/HiNestedSelectField.js +52 -27
- package/HiSelect/HiSelect.js +192 -93
- package/HiSelect/HiSelectContent.js +103 -67
- package/HiSelect/HiSelectField.js +53 -28
- package/HiSelect/HiSelectInput.js +81 -25
- package/HiSelect/HiSelectMobile.js +49 -11
- package/HiSelect/HiSuggestSelect.js +85 -28
- package/HiSelect/HiSuggestSelectField.js +43 -18
- package/HiSelect/index.js +14 -2
- package/HiSelectableList/HiSelectableList.js +95 -38
- package/HiSelectableList/HiSelectableListHierarchic.js +65 -38
- package/HiSelectableList/HiSelectableListItem.js +88 -45
- package/HiSelectableList/index.js +4 -0
- package/HiStepper/DefaultIndicator.js +10 -1
- package/HiStepper/HiStep.js +48 -18
- package/HiStepper/HiStepper.js +15 -2
- package/HiStepper/index.js +3 -0
- package/HiSwitch/HiSwitch.js +33 -9
- package/HiSwitch/HiSwitchState.js +32 -15
- package/HiSwitch/index.js +3 -0
- package/HiTable/HiCellBuilder.js +69 -13
- package/HiTable/HiTable.js +48 -20
- package/HiTable/HiTableBody.js +28 -10
- package/HiTable/HiTableHeader.js +55 -21
- package/HiTable/HiTableRow.js +51 -16
- package/HiTable/constants.js +98 -48
- package/HiTable/index.js +2 -0
- package/es/HiAccordion/HiAccordion.js +26 -8
- package/es/HiAccordion/index.js +5 -1
- package/es/HiAccordionActions/HiAccordionActions.js +14 -1
- package/es/HiAccordionActions/index.js +5 -1
- package/es/HiAccordionSummary/HiAccordionSummary.js +15 -1
- package/es/HiAccordionSummary/index.js +5 -1
- package/es/HiAlertModal/HiAlertModal.js +22 -7
- package/es/HiAlertModal/index.js +5 -1
- package/es/HiAppBar/HiAppBar.js +47 -15
- package/es/HiAppBar/index.js +2 -0
- package/es/HiAvatar/HiAvatar.js +12 -3
- package/es/HiAvatar/index.js +2 -0
- package/es/HiBadge/HiBadge.js +24 -8
- package/es/HiBadge/index.js +2 -0
- package/es/HiBreadcrumb/HiBreadcrumb.js +35 -10
- package/es/HiBreadcrumb/HiStep.js +50 -17
- package/es/HiBreadcrumb/HiStepConnector.js +55 -18
- package/es/HiBreadcrumb/HiStepContent.js +35 -10
- package/es/HiBreadcrumb/HiStepIcon.js +40 -14
- package/es/HiBreadcrumb/HiStepLabel.js +49 -18
- package/es/HiBreadcrumb/HiStepper.js +35 -10
- package/es/HiBreadcrumb/index.js +2 -0
- package/es/HiButton/HiButton.js +33 -8
- package/es/HiButton/index.js +5 -1
- package/es/HiCell/CellAddress.js +38 -16
- package/es/HiCell/CellDate.js +41 -14
- package/es/HiCell/CellHiddenContent.js +30 -8
- package/es/HiCell/CellIcon.js +41 -16
- package/es/HiCell/CellImage.js +39 -16
- package/es/HiCell/CellNumeric.js +45 -17
- package/es/HiCell/CellPinToAction.js +38 -13
- package/es/HiCell/CellRate.js +52 -17
- package/es/HiCell/CellSentinel.js +38 -16
- package/es/HiCell/CellSentinelScore.js +36 -13
- package/es/HiCell/CellText.js +58 -21
- package/es/HiCell/CellTextStyled.js +24 -13
- package/es/HiCell/index.js +10 -0
- package/es/HiCheckbox/HiCheckbox.js +57 -19
- package/es/HiCheckbox/index.js +2 -0
- package/es/HiChip/HiChip.js +47 -24
- package/es/HiChip/HiChipSwitch.js +65 -21
- package/es/HiChip/index.js +3 -0
- package/es/HiColoredLabel/HiColoredLabel.js +49 -15
- package/es/HiColoredLabel/index.js +2 -0
- package/es/HiDatePicker/Caption.js +21 -9
- package/es/HiDatePicker/HiDatePicker.js +93 -20
- package/es/HiDatePicker/HiDatePickerMobile.js +48 -22
- package/es/HiDatePicker/HiDateRangePicker.js +139 -42
- package/es/HiDatePicker/HiDateRangeSelector.js +135 -53
- package/es/HiDatePicker/ListPicker.js +43 -12
- package/es/HiDatePicker/NavBar.js +31 -12
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +28 -11
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +28 -11
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +32 -9
- package/es/HiDatePicker/Overlays/Overlay.js +25 -8
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +45 -13
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +38 -13
- package/es/HiDatePicker/Overlays/index.js +6 -0
- package/es/HiDatePicker/Weekday.js +9 -4
- package/es/HiDatePicker/hiLocaleUtils.js +20 -8
- package/es/HiDatePicker/index.js +2 -0
- package/es/HiDatePicker/stylesheet.js +13 -6
- package/es/HiDialog/HiDialog.js +19 -7
- package/es/HiDialog/index.js +2 -0
- package/es/HiDotsStepper/HiDot.js +42 -12
- package/es/HiDotsStepper/HiDotsStepper.js +43 -15
- package/es/HiDotsStepper/index.js +3 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +38 -16
- package/es/HiExpansionPanel/index.js +5 -1
- package/es/HiForm/HiAddressField.js +41 -14
- package/es/HiForm/HiEmailField.js +34 -9
- package/es/HiForm/HiFormControl.js +79 -32
- package/es/HiForm/HiFormLabel.js +45 -18
- package/es/HiForm/HiInput.js +97 -37
- package/es/HiForm/HiPasswordField.js +43 -13
- package/es/HiForm/HiSearchField.js +40 -8
- package/es/HiForm/HiSlider.js +62 -26
- package/es/HiForm/HiTextField.js +52 -26
- package/es/HiForm/HiUpload.js +94 -33
- package/es/HiForm/HiUploadField.js +37 -14
- package/es/HiForm/HiUploadInput.js +81 -25
- package/es/HiForm/index.js +12 -0
- package/es/HiIcon/HiIcon.js +34 -9
- package/es/HiIcon/index.js +2 -0
- package/es/HiIconButton/HiIconButton.js +21 -6
- package/es/HiIconButton/index.js +2 -0
- package/es/HiListItemLink/HiListItemLink.js +19 -6
- package/es/HiListItemLink/index.js +2 -0
- package/es/HiLoader/HiLoader.js +16 -6
- package/es/HiLoader/index.js +2 -0
- package/es/HiNotice/HiKPI.js +53 -21
- package/es/HiNotice/HiKPINotice.js +16 -6
- package/es/HiNotice/index.js +3 -0
- package/es/HiPagination/HiPagination.js +11 -1
- package/es/HiPagination/index.js +2 -0
- package/es/HiPaymentMeans/HiPaymentMeans.js +72 -31
- package/es/HiPaymentMeans/index.js +2 -0
- package/es/HiPdfReader/HiPdfReader.js +61 -27
- package/es/HiPdfReader/index.js +2 -0
- package/es/HiPin/HiPin.js +19 -7
- package/es/HiPin/index.js +2 -0
- package/es/HiRadio/HiRadio.js +22 -11
- package/es/HiRadio/index.js +2 -0
- package/es/HiScrollStepper/HiScrollStepper.js +67 -29
- package/es/HiScrollStepper/index.js +2 -0
- package/es/HiSelect/HiDynamicSelect.js +47 -36
- package/es/HiSelect/HiDynamicSelectField.js +52 -27
- package/es/HiSelect/HiNestedSelect.js +116 -69
- package/es/HiSelect/HiNestedSelectContent.js +90 -63
- package/es/HiSelect/HiNestedSelectField.js +52 -27
- package/es/HiSelect/HiSelect.js +192 -93
- package/es/HiSelect/HiSelectContent.js +103 -67
- package/es/HiSelect/HiSelectField.js +53 -28
- package/es/HiSelect/HiSelectInput.js +81 -25
- package/es/HiSelect/HiSelectMobile.js +49 -11
- package/es/HiSelect/HiSuggestSelect.js +85 -28
- package/es/HiSelect/HiSuggestSelectField.js +43 -18
- package/es/HiSelect/index.js +14 -2
- package/es/HiSelectableList/HiSelectableList.js +95 -38
- package/es/HiSelectableList/HiSelectableListHierarchic.js +65 -38
- package/es/HiSelectableList/HiSelectableListItem.js +88 -45
- package/es/HiSelectableList/index.js +4 -0
- package/es/HiStepper/DefaultIndicator.js +10 -1
- package/es/HiStepper/HiStep.js +48 -18
- package/es/HiStepper/HiStepper.js +15 -2
- package/es/HiStepper/index.js +3 -0
- package/es/HiSwitch/HiSwitch.js +33 -9
- package/es/HiSwitch/HiSwitchState.js +32 -15
- package/es/HiSwitch/index.js +3 -0
- package/es/HiTable/HiCellBuilder.js +69 -13
- package/es/HiTable/HiTable.js +48 -20
- package/es/HiTable/HiTableBody.js +28 -10
- package/es/HiTable/HiTableHeader.js +55 -21
- package/es/HiTable/HiTableRow.js +51 -16
- package/es/HiTable/constants.js +98 -48
- package/es/HiTable/index.js +2 -0
- package/es/hi-svg-icons/HiAccount.js +14 -4
- package/es/hi-svg-icons/HiActivity.js +14 -4
- package/es/hi-svg-icons/HiAll.js +18 -7
- package/es/hi-svg-icons/HiBilling.js +14 -4
- package/es/hi-svg-icons/HiBriefcaseRescue.js +14 -4
- package/es/hi-svg-icons/HiBusiness.js +14 -4
- package/es/hi-svg-icons/HiCatalog.js +14 -4
- package/es/hi-svg-icons/HiCustomer.js +14 -4
- package/es/hi-svg-icons/HiDownload.js +14 -4
- package/es/hi-svg-icons/HiFinance.js +14 -4
- package/es/hi-svg-icons/HiFinanceMenu.js +14 -4
- package/es/hi-svg-icons/HiHostedPaymentPage.js +14 -4
- package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
- package/es/hi-svg-icons/HiIntegration.js +14 -4
- package/es/hi-svg-icons/HiIntegrationMenu.js +14 -4
- package/es/hi-svg-icons/HiIntelligence.js +14 -4
- package/es/hi-svg-icons/HiIntelligenceMenu.js +14 -4
- package/es/hi-svg-icons/HiInvoice.js +14 -4
- package/es/hi-svg-icons/HiInvoiceMenu.js +14 -4
- package/es/hi-svg-icons/HiLogoRounded.js +17 -6
- package/es/hi-svg-icons/HiOrder.js +14 -4
- package/es/hi-svg-icons/HiPaymentOrder.js +14 -4
- package/es/hi-svg-icons/HiPermission.js +14 -4
- package/es/hi-svg-icons/HiPriceGrid.js +14 -4
- package/es/hi-svg-icons/HiPrivate.js +14 -4
- package/es/hi-svg-icons/HiRoute.js +14 -4
- package/es/hi-svg-icons/HiRouteMenu.js +14 -4
- package/es/hi-svg-icons/HiRouteSwitch.js +19 -7
- package/es/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
- package/es/hi-svg-icons/HiSettlement.js +14 -4
- package/es/hi-svg-icons/HiSizeLarge.js +14 -4
- package/es/hi-svg-icons/HiSizeMedium.js +14 -4
- package/es/hi-svg-icons/HiSizeSmall.js +14 -4
- package/es/hi-svg-icons/HiStore.js +14 -4
- package/es/hi-svg-icons/HiStoreMenu.js +14 -4
- package/es/hi-svg-icons/HiTransaction.js +14 -4
- package/es/hi-svg-icons/HiTransactionMenu.js +14 -4
- package/es/hi-svg-icons/HiUser.js +14 -4
- package/es/hi-svg-icons/HiVendor.js +14 -4
- package/es/hi-svg-icons/HiWidget.js +14 -4
- package/es/hi-svg-icons/index.js +41 -0
- package/es/hi-svg-images/HiLogo.js +12 -4
- package/es/hi-svg-images/HiLogoWhite.js +12 -4
- package/es/hi-svg-images/index.js +3 -0
- package/es/setupTest.js +13 -2
- package/es/styleguide/Wrapper.js +6 -0
- package/es/styles/MuiThemeProvider.js +53 -18
- package/es/styles/colorManipulator.js +50 -15
- package/es/styles/createBreakpoints.js +29 -14
- package/es/styles/createGenerateClassName.js +24 -14
- package/es/styles/createMixins.js +10 -4
- package/es/styles/createMuiTheme.js +28 -11
- package/es/styles/createPalette.js +89 -66
- package/es/styles/createStyles.js +1 -0
- package/es/styles/createTypography.js +24 -15
- package/es/styles/getStylesCreator.js +14 -2
- package/es/styles/getThemeProps.js +7 -2
- package/es/styles/index.js +6 -0
- package/es/styles/jssPreset.js +11 -1
- package/es/styles/makeStyles.js +9 -2
- package/es/styles/mergeClasses.js +16 -5
- package/es/styles/shadows.js +4 -1
- package/es/styles/shape.js +2 -1
- package/es/styles/spacing.js +4 -1
- package/es/styles/themeListener.js +10 -2
- package/es/styles/transitions.js +35 -20
- package/es/styles/withStyles.js +9 -2
- package/es/styles/zIndex.js +2 -1
- package/es/test-utils/createMount.js +12 -2
- package/es/test-utils/createRender.js +9 -2
- package/es/test-utils/createShallow.js +17 -6
- package/es/test-utils/getClasses.js +4 -1
- package/es/test-utils/index.js +6 -0
- package/es/test-utils/until.js +14 -3
- package/es/test-utils/unwrap.js +1 -0
- package/es/theme/palette.js +7 -2
- package/es/theme/typography.js +15 -7
- package/es/theme.js +8 -2
- package/es/transitions/utils.js +7 -3
- package/es/utils/exactProp.js +13 -3
- package/es/utils/helpers.js +58 -19
- package/es/withMobileDialog/index.js +2 -0
- package/es/withMobileDialog/withMobileDialog.js +12 -3
- package/hi-svg-icons/HiAccount.js +14 -4
- package/hi-svg-icons/HiActivity.js +14 -4
- package/hi-svg-icons/HiAll.js +18 -7
- package/hi-svg-icons/HiBilling.js +14 -4
- package/hi-svg-icons/HiBriefcaseRescue.js +14 -4
- package/hi-svg-icons/HiBusiness.js +14 -4
- package/hi-svg-icons/HiCatalog.js +14 -4
- package/hi-svg-icons/HiCustomer.js +14 -4
- package/hi-svg-icons/HiDownload.js +14 -4
- package/hi-svg-icons/HiFinance.js +14 -4
- package/hi-svg-icons/HiFinanceMenu.js +14 -4
- package/hi-svg-icons/HiHostedPaymentPage.js +14 -4
- package/hi-svg-icons/HiHostedPaymentPageMenu.js +14 -4
- package/hi-svg-icons/HiIntegration.js +14 -4
- package/hi-svg-icons/HiIntegrationMenu.js +14 -4
- package/hi-svg-icons/HiIntelligence.js +14 -4
- package/hi-svg-icons/HiIntelligenceMenu.js +14 -4
- package/hi-svg-icons/HiInvoice.js +14 -4
- package/hi-svg-icons/HiInvoiceMenu.js +14 -4
- package/hi-svg-icons/HiLogoRounded.js +17 -6
- package/hi-svg-icons/HiOrder.js +14 -4
- package/hi-svg-icons/HiPaymentOrder.js +14 -4
- package/hi-svg-icons/HiPermission.js +14 -4
- package/hi-svg-icons/HiPriceGrid.js +14 -4
- package/hi-svg-icons/HiPrivate.js +14 -4
- package/hi-svg-icons/HiRoute.js +14 -4
- package/hi-svg-icons/HiRouteMenu.js +14 -4
- package/hi-svg-icons/HiRouteSwitch.js +19 -7
- package/hi-svg-icons/HiRouteSwitchMenu.js +19 -7
- package/hi-svg-icons/HiSettlement.js +14 -4
- package/hi-svg-icons/HiSizeLarge.js +14 -4
- package/hi-svg-icons/HiSizeMedium.js +14 -4
- package/hi-svg-icons/HiSizeSmall.js +14 -4
- package/hi-svg-icons/HiStore.js +14 -4
- package/hi-svg-icons/HiStoreMenu.js +14 -4
- package/hi-svg-icons/HiTransaction.js +14 -4
- package/hi-svg-icons/HiTransactionMenu.js +14 -4
- package/hi-svg-icons/HiUser.js +14 -4
- package/hi-svg-icons/HiVendor.js +14 -4
- package/hi-svg-icons/HiWidget.js +14 -4
- package/hi-svg-icons/index.js +41 -0
- package/hi-svg-images/HiLogo.js +12 -4
- package/hi-svg-images/HiLogoWhite.js +12 -4
- package/hi-svg-images/index.js +3 -0
- package/package.json +1 -1
- package/setupTest.js +13 -2
- package/styleguide/Wrapper.js +6 -0
- package/styles/MuiThemeProvider.js +53 -18
- package/styles/colorManipulator.js +50 -15
- package/styles/createBreakpoints.js +29 -14
- package/styles/createGenerateClassName.js +24 -14
- package/styles/createMixins.js +10 -4
- package/styles/createMuiTheme.js +28 -11
- package/styles/createPalette.js +89 -66
- package/styles/createStyles.js +1 -0
- package/styles/createTypography.js +24 -15
- package/styles/getStylesCreator.js +14 -2
- package/styles/getThemeProps.js +7 -2
- package/styles/index.js +6 -0
- package/styles/jssPreset.js +11 -1
- package/styles/makeStyles.js +9 -2
- package/styles/mergeClasses.js +16 -5
- package/styles/shadows.js +4 -1
- package/styles/shape.js +2 -1
- package/styles/spacing.js +4 -1
- package/styles/themeListener.js +10 -2
- package/styles/transitions.js +35 -20
- package/styles/withStyles.js +9 -2
- package/styles/zIndex.js +2 -1
- package/test-utils/createMount.js +12 -2
- package/test-utils/createRender.js +9 -2
- package/test-utils/createShallow.js +17 -6
- package/test-utils/getClasses.js +4 -1
- package/test-utils/index.js +6 -0
- package/test-utils/until.js +14 -3
- package/test-utils/unwrap.js +1 -0
- package/theme/palette.js +7 -2
- package/theme/typography.js +15 -7
- package/theme.js +8 -2
- package/transitions/utils.js +7 -3
- package/utils/exactProp.js +13 -3
- package/utils/helpers.js +58 -19
- package/withMobileDialog/index.js +2 -0
- package/withMobileDialog/withMobileDialog.js +12 -3
package/es/HiChip/HiChip.js
CHANGED
@@ -1,19 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.default = void 0;
|
9
|
+
|
8
10
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
11
|
+
|
9
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
13
|
+
|
10
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
15
|
+
|
11
16
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
17
|
+
|
12
18
|
var _react = _interopRequireDefault(require("react"));
|
19
|
+
|
13
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
21
|
+
|
14
22
|
var _keycode = _interopRequireDefault(require("keycode"));
|
23
|
+
|
15
24
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
25
|
+
|
16
26
|
var _makeStyles = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
27
|
+
|
17
28
|
var useStyles = (0, _makeStyles.default)(function (theme) {
|
18
29
|
return {
|
19
30
|
root: (0, _objectSpread2.default)({}, theme.typography.body3, {
|
@@ -102,38 +113,43 @@ var useStyles = (0, _makeStyles.default)(function (theme) {
|
|
102
113
|
}
|
103
114
|
};
|
104
115
|
});
|
116
|
+
|
105
117
|
var handleKeyDown = function handleKeyDown(e, fn) {
|
106
118
|
if ((0, _keycode.default)(e) === 'space' || (0, _keycode.default)(e) === 'enter') {
|
107
119
|
e.preventDefault();
|
108
120
|
fn();
|
109
121
|
}
|
110
122
|
};
|
123
|
+
|
111
124
|
var HiChip = function HiChip(props) {
|
125
|
+
var _classNames2;
|
126
|
+
|
112
127
|
var className = props.className,
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
128
|
+
fallbackImage = props.fallbackImage,
|
129
|
+
icon = props.icon,
|
130
|
+
_props$iconSize = props.iconSize,
|
131
|
+
iconSize = _props$iconSize === void 0 ? 20 : _props$iconSize,
|
132
|
+
id = props.id,
|
133
|
+
img = props.img,
|
134
|
+
label = props.label,
|
135
|
+
labelIcon = props.labelIcon,
|
136
|
+
onClick = props.onClick,
|
137
|
+
onKeyDown = props.onKeyDown,
|
138
|
+
onPrevious = props.onPrevious,
|
139
|
+
onNext = props.onNext,
|
140
|
+
onDelete = props.onDelete,
|
141
|
+
prefix = props.prefix,
|
142
|
+
onIconClick = props.onIconClick,
|
143
|
+
title = props.title,
|
144
|
+
titleDelete = props.titleDelete,
|
145
|
+
titleIcon = props.titleIcon,
|
146
|
+
titleImg = props.titleImg,
|
147
|
+
titleNext = props.titleNext,
|
148
|
+
titlePrevious = props.titlePrevious,
|
149
|
+
style = props.style;
|
135
150
|
var classes = useStyles(props);
|
136
151
|
var chipIcon;
|
152
|
+
|
137
153
|
if (icon) {
|
138
154
|
var iconProps = {
|
139
155
|
className: (0, _classnames.default)(classes.icon, (0, _defineProperty2.default)({}, classes.iconClickable, onIconClick)),
|
@@ -145,6 +161,7 @@ var HiChip = function HiChip(props) {
|
|
145
161
|
title: titleIcon,
|
146
162
|
tabIndex: onIconClick ? 0 : -1
|
147
163
|
};
|
164
|
+
|
148
165
|
if (typeof icon === 'string') {
|
149
166
|
chipIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
150
167
|
icon: icon
|
@@ -154,7 +171,9 @@ var HiChip = function HiChip(props) {
|
|
154
171
|
chipIcon.props = (0, _objectSpread2.default)({}, iconProps);
|
155
172
|
}
|
156
173
|
}
|
174
|
+
|
157
175
|
var chipLabelIcon;
|
176
|
+
|
158
177
|
if (labelIcon) {
|
159
178
|
var _iconProps = {
|
160
179
|
className: classes.icon,
|
@@ -163,6 +182,7 @@ var HiChip = function HiChip(props) {
|
|
163
182
|
title: titleIcon,
|
164
183
|
tabIndex: -1
|
165
184
|
};
|
185
|
+
|
166
186
|
if (typeof labelIcon === 'string') {
|
167
187
|
chipLabelIcon = /*#__PURE__*/_react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
168
188
|
icon: labelIcon
|
@@ -176,10 +196,11 @@ var HiChip = function HiChip(props) {
|
|
176
196
|
});
|
177
197
|
}
|
178
198
|
}
|
199
|
+
|
179
200
|
return /*#__PURE__*/_react.default.createElement("div", {
|
180
201
|
id: id,
|
181
202
|
role: 'button',
|
182
|
-
className: (0, _classnames.default)(classes.root, className, (
|
203
|
+
className: (0, _classnames.default)(classes.root, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.leftNavigation, onPrevious), (0, _defineProperty2.default)(_classNames2, classes.rightNavigation, onNext), (0, _defineProperty2.default)(_classNames2, classes.deletable, onDelete), (0, _defineProperty2.default)(_classNames2, classes.leftIcon, icon), _classNames2)),
|
183
204
|
title: title,
|
184
205
|
onClick: onClick,
|
185
206
|
onKeyDown: onKeyDown,
|
@@ -241,4 +262,6 @@ var HiChip = function HiChip(props) {
|
|
241
262
|
tabIndex: 0
|
242
263
|
}));
|
243
264
|
};
|
244
|
-
|
265
|
+
|
266
|
+
var _default = HiChip;
|
267
|
+
exports.default = _default;
|
@@ -1,28 +1,47 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.styles = exports.default = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
+
|
9
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
13
|
+
|
10
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
15
|
+
|
11
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
12
|
-
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
17
|
+
|
14
18
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
19
|
+
|
15
20
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
21
|
+
|
22
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
23
|
+
|
24
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
25
|
+
|
16
26
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
27
|
+
|
17
28
|
var _react = _interopRequireDefault(require("react"));
|
29
|
+
|
18
30
|
var _classnames = _interopRequireDefault(require("classnames"));
|
31
|
+
|
19
32
|
var _index = _interopRequireDefault(require("keycode/index"));
|
33
|
+
|
20
34
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
35
|
+
|
21
36
|
var _styles = require("@mui/material/styles");
|
37
|
+
|
22
38
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
23
|
-
|
24
|
-
function
|
25
|
-
|
39
|
+
|
40
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
41
|
+
|
42
|
+
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; } }
|
43
|
+
|
44
|
+
var styles = function styles(theme) {
|
26
45
|
return {
|
27
46
|
root: (0, _objectSpread2.default)({}, theme.typography.body3, {
|
28
47
|
display: 'inline-flex',
|
@@ -98,48 +117,64 @@ var styles = exports.styles = function styles(theme) {
|
|
98
117
|
}
|
99
118
|
};
|
100
119
|
};
|
120
|
+
|
121
|
+
exports.styles = styles;
|
122
|
+
|
101
123
|
var HiChipSwitch = /*#__PURE__*/function (_React$PureComponent) {
|
102
124
|
(0, _inherits2.default)(HiChipSwitch, _React$PureComponent);
|
125
|
+
|
126
|
+
var _super = _createSuper(HiChipSwitch);
|
127
|
+
|
103
128
|
function HiChipSwitch(props) {
|
104
129
|
var _this;
|
130
|
+
|
105
131
|
(0, _classCallCheck2.default)(this, HiChipSwitch);
|
106
|
-
_this =
|
132
|
+
_this = _super.call(this, props);
|
107
133
|
_this.chipSwitchRef = null;
|
134
|
+
|
108
135
|
_this.handleKeyDown = function (event) {
|
109
136
|
// Ignore events from children of `Chip`.
|
110
137
|
if (event.currentTarget !== event.target) {
|
111
138
|
return;
|
112
139
|
}
|
140
|
+
|
113
141
|
var _this$props = _this.props,
|
114
|
-
|
115
|
-
|
142
|
+
onClick = _this$props.onClick,
|
143
|
+
onKeyDown = _this$props.onKeyDown;
|
116
144
|
var key = (0, _index.default)(event);
|
145
|
+
|
117
146
|
if (onClick && (key === 'space' || key === 'enter')) {
|
118
147
|
event.preventDefault();
|
119
148
|
onClick(event);
|
120
149
|
} else if (key === 'esc') {
|
121
150
|
event.preventDefault();
|
151
|
+
|
122
152
|
if (_this.chipSwitchRef) {
|
123
153
|
_this.chipSwitchRef.blur();
|
124
154
|
}
|
125
155
|
}
|
156
|
+
|
126
157
|
if (onKeyDown) {
|
127
158
|
onKeyDown(event);
|
128
159
|
}
|
129
160
|
};
|
161
|
+
|
130
162
|
_this.handleKeyDownSelection = function (event) {
|
131
163
|
var onSelectionClick = _this.props.onSelectionClick;
|
132
164
|
var key = (0, _index.default)(event);
|
165
|
+
|
133
166
|
if (onSelectionClick && (key === 'space' || key === 'enter')) {
|
134
167
|
event.preventDefault();
|
135
168
|
onSelectionClick(event);
|
136
169
|
}
|
137
170
|
};
|
171
|
+
|
138
172
|
_this.handleClickSelection = _this.handleClickSelection.bind((0, _assertThisInitialized2.default)(_this));
|
139
173
|
_this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2.default)(_this));
|
140
174
|
_this.handleKeyDownSelection = _this.handleKeyDownSelection.bind((0, _assertThisInitialized2.default)(_this));
|
141
175
|
return _this;
|
142
176
|
}
|
177
|
+
|
143
178
|
(0, _createClass2.default)(HiChipSwitch, [{
|
144
179
|
key: "handleClickSelection",
|
145
180
|
value: function handleClickSelection(event) {
|
@@ -147,26 +182,30 @@ var HiChipSwitch = /*#__PURE__*/function (_React$PureComponent) {
|
|
147
182
|
if (event) {
|
148
183
|
event.stopPropagation();
|
149
184
|
}
|
185
|
+
|
150
186
|
this.props.onSelectionClick();
|
151
187
|
}
|
152
188
|
}
|
153
189
|
}, {
|
154
190
|
key: "render",
|
155
191
|
value: function render() {
|
156
|
-
var
|
192
|
+
var _classNames,
|
193
|
+
_this2 = this;
|
194
|
+
|
157
195
|
var _this$props2 = this.props,
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
196
|
+
id = _this$props2.id,
|
197
|
+
label = _this$props2.label,
|
198
|
+
classes = _this$props2.classes,
|
199
|
+
activeIcon = _this$props2.activeIcon,
|
200
|
+
active = _this$props2.active,
|
201
|
+
onClick = _this$props2.onClick,
|
202
|
+
onSelectionClick = _this$props2.onSelectionClick,
|
203
|
+
selection = _this$props2.selection,
|
204
|
+
selectionTitle = _this$props2.selectionTitle;
|
167
205
|
var selectionProps = {
|
168
206
|
tabIndex: '-1'
|
169
207
|
};
|
208
|
+
|
170
209
|
if (onSelectionClick && selection !== 0) {
|
171
210
|
selectionProps = {
|
172
211
|
onClick: this.handleClickSelection,
|
@@ -176,9 +215,10 @@ var HiChipSwitch = /*#__PURE__*/function (_React$PureComponent) {
|
|
176
215
|
title: selectionTitle
|
177
216
|
};
|
178
217
|
}
|
218
|
+
|
179
219
|
return /*#__PURE__*/_react.default.createElement("div", {
|
180
220
|
id: id,
|
181
|
-
className: (0, _classnames.default)(classes.root, (
|
221
|
+
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.active, !!active), (0, _defineProperty2.default)(_classNames, classes.inactive, !active), _classNames)),
|
182
222
|
onClick: onClick,
|
183
223
|
role: "button",
|
184
224
|
tabIndex: "0",
|
@@ -199,13 +239,17 @@ var HiChipSwitch = /*#__PURE__*/function (_React$PureComponent) {
|
|
199
239
|
}]);
|
200
240
|
return HiChipSwitch;
|
201
241
|
}(_react.default.PureComponent);
|
242
|
+
|
202
243
|
HiChipSwitch.defaultProps = {
|
203
244
|
active: false,
|
204
245
|
activeIcon: 'check',
|
205
246
|
selection: null,
|
206
247
|
selectionTitle: ''
|
207
248
|
};
|
208
|
-
|
249
|
+
|
250
|
+
var _default = (0, _withStyles.default)(styles, {
|
209
251
|
hiComponent: true,
|
210
252
|
name: 'HmuiHiChipSwitch'
|
211
|
-
})(HiChipSwitch);
|
253
|
+
})(HiChipSwitch);
|
254
|
+
|
255
|
+
exports.default = _default;
|
package/es/HiChip/index.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -16,5 +17,7 @@ Object.defineProperty(exports, "default", {
|
|
16
17
|
return _HiChip.default;
|
17
18
|
}
|
18
19
|
});
|
20
|
+
|
19
21
|
var _HiChip = _interopRequireDefault(require("./HiChip"));
|
22
|
+
|
20
23
|
var _HiChipSwitch = _interopRequireDefault(require("./HiChipSwitch"));
|
@@ -1,20 +1,31 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.styles = exports.default = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
11
|
+
|
9
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
13
|
+
|
10
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
15
|
+
|
11
16
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
17
|
+
|
12
18
|
var _react = _interopRequireDefault(require("react"));
|
19
|
+
|
13
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
21
|
+
|
14
22
|
var _styles = require("@mui/material/styles");
|
23
|
+
|
15
24
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
25
|
+
|
16
26
|
var _helpers = require("../utils/helpers");
|
17
|
-
|
27
|
+
|
28
|
+
var styles = function styles(theme) {
|
18
29
|
return {
|
19
30
|
root: {
|
20
31
|
display: 'inline-block',
|
@@ -35,36 +46,43 @@ var styles = exports.styles = function styles(theme) {
|
|
35
46
|
color: {
|
36
47
|
fontWeight: 400
|
37
48
|
},
|
49
|
+
|
38
50
|
/* Styles applied to the root element if `color="primary"`. */
|
39
51
|
colorPrimary: {
|
40
52
|
color: theme.palette.primary.main,
|
41
53
|
backgroundColor: (0, _styles.alpha)(theme.palette.primary.main, 0.08)
|
42
54
|
},
|
55
|
+
|
43
56
|
/* Styles applied to the root element if `color="secondary"`. */
|
44
57
|
colorSecondary: {
|
45
58
|
color: theme.palette.secondary.main,
|
46
59
|
backgroundColor: (0, _styles.alpha)(theme.palette.secondary.main, 0.08)
|
47
60
|
},
|
61
|
+
|
48
62
|
/* Styles applied to the root element if `color="positive"`. */
|
49
63
|
colorSuccess: {
|
50
64
|
color: theme.palette.success.main,
|
51
65
|
backgroundColor: (0, _styles.alpha)(theme.palette.success.main, 0.08)
|
52
66
|
},
|
67
|
+
|
53
68
|
/* Styles applied to the root element if `color="negative"`. */
|
54
69
|
colorError: {
|
55
70
|
color: theme.palette.error.main,
|
56
71
|
backgroundColor: (0, _styles.alpha)(theme.palette.error.main, 0.08)
|
57
72
|
},
|
73
|
+
|
58
74
|
/* Styles applied to the root element if `color="warning"`. */
|
59
75
|
colorWarning: {
|
60
76
|
color: theme.palette.warning.main,
|
61
77
|
backgroundColor: (0, _styles.alpha)(theme.palette.warning.main, 0.08)
|
62
78
|
},
|
79
|
+
|
63
80
|
/* Styles applied to the root element if `color="neutral"`. */
|
64
81
|
colorNeutral: {
|
65
82
|
color: theme.palette.neutral.main,
|
66
83
|
backgroundColor: (0, _styles.alpha)(theme.palette.neutral.main, 0.08)
|
67
84
|
},
|
85
|
+
|
68
86
|
/* Styles applied to the root element if `color="info"`. */
|
69
87
|
colorInfo: {
|
70
88
|
color: theme.palette.info.main,
|
@@ -73,36 +91,43 @@ var styles = exports.styles = function styles(theme) {
|
|
73
91
|
activeColor: {
|
74
92
|
fontWeight: 500
|
75
93
|
},
|
94
|
+
|
76
95
|
/* Styles applied to the root element if `color="primary"`. */
|
77
96
|
activeColorPrimary: {
|
78
97
|
color: theme.palette.primary.contrastText,
|
79
98
|
backgroundColor: theme.palette.primary.main
|
80
99
|
},
|
100
|
+
|
81
101
|
/* Styles applied to the root element if `color="secondary"`. */
|
82
102
|
activeColorSecondary: {
|
83
103
|
color: theme.palette.secondary.contrastText,
|
84
104
|
backgroundColor: theme.palette.secondary.main
|
85
105
|
},
|
106
|
+
|
86
107
|
/* Styles applied to the root element if `color="success"`. */
|
87
108
|
activeColorSuccess: {
|
88
109
|
color: theme.palette.success.contrastText,
|
89
110
|
backgroundColor: theme.palette.success.main
|
90
111
|
},
|
112
|
+
|
91
113
|
/* Styles applied to the root element if `color="negative"`. */
|
92
114
|
activeColorError: {
|
93
115
|
color: theme.palette.error.contrastText,
|
94
116
|
backgroundColor: theme.palette.error.main
|
95
117
|
},
|
118
|
+
|
96
119
|
/* Styles applied to the root element if `color="warning"`. */
|
97
120
|
activeColorWarning: {
|
98
121
|
color: theme.palette.warning.contrastText,
|
99
122
|
backgroundColor: theme.palette.warning.main
|
100
123
|
},
|
124
|
+
|
101
125
|
/* Styles applied to the root element if `color="neutral"`. */
|
102
126
|
activeColorNeutral: {
|
103
127
|
color: theme.palette.neutral.contrastText,
|
104
128
|
backgroundColor: theme.palette.neutral.main
|
105
129
|
},
|
130
|
+
|
106
131
|
/* Styles applied to the root element if `color="info"`. */
|
107
132
|
activeColorInfo: {
|
108
133
|
color: theme.palette.info.contrastText,
|
@@ -113,29 +138,34 @@ var styles = exports.styles = function styles(theme) {
|
|
113
138
|
}
|
114
139
|
};
|
115
140
|
};
|
116
|
-
|
117
141
|
/**
|
118
142
|
* HiColoredLabel
|
119
143
|
*
|
120
144
|
* Label with background color & text color
|
121
145
|
*/
|
146
|
+
|
147
|
+
|
148
|
+
exports.styles = styles;
|
149
|
+
|
122
150
|
function HiColoredLabel(props) {
|
151
|
+
var _classNames;
|
152
|
+
|
123
153
|
var classes = props.classes,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
154
|
+
className = props.className,
|
155
|
+
fontSize = props.fontSize,
|
156
|
+
label = props.label,
|
157
|
+
propsColor = props.color,
|
158
|
+
active = props.active,
|
159
|
+
outlined = props.outlined,
|
160
|
+
fontWeight = props.fontWeight,
|
161
|
+
style = props.style,
|
162
|
+
theme = props.theme,
|
163
|
+
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "fontSize", "label", "color", "active", "outlined", "fontWeight", "style", "theme"]);
|
134
164
|
var color = propsColor || 'primary';
|
135
165
|
var isHiColor = ['primary', 'secondary', 'success', 'error', 'warning', 'neutral', 'info'].includes(color);
|
136
166
|
var isHexColor = !isHiColor && /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color);
|
137
167
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
138
|
-
className: (0, _classnames.default)(classes.root, (
|
168
|
+
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.color, !active), (0, _defineProperty2.default)(_classNames, classes.activeColor, active), (0, _defineProperty2.default)(_classNames, classes.outlined, outlined), (0, _defineProperty2.default)(_classNames, classes["activeColor".concat((0, _helpers.capitalize)(color))], active && isHiColor), (0, _defineProperty2.default)(_classNames, classes["color".concat((0, _helpers.capitalize)(color))], !active && isHiColor), (0, _defineProperty2.default)(_classNames, classes.body1, fontSize >= 15), (0, _defineProperty2.default)(_classNames, classes.body2, fontSize === 14), (0, _defineProperty2.default)(_classNames, classes.body3, fontSize === 13), (0, _defineProperty2.default)(_classNames, classes.body4, fontSize === 12), (0, _defineProperty2.default)(_classNames, classes.body5, fontSize <= 11), _classNames), className),
|
139
169
|
style: (0, _objectSpread2.default)({}, style, {}, isHexColor && {
|
140
170
|
backgroundColor: active ? color : (0, _styles.alpha)(color, 0.08),
|
141
171
|
color: active ? theme.palette.getContrastText(color) : color
|
@@ -144,14 +174,18 @@ function HiColoredLabel(props) {
|
|
144
174
|
})
|
145
175
|
}, other), label);
|
146
176
|
}
|
177
|
+
|
147
178
|
HiColoredLabel.defaultProps = {
|
148
179
|
active: false,
|
149
180
|
color: 'primary',
|
150
181
|
fontSize: 15,
|
151
182
|
outlined: false
|
152
183
|
};
|
153
|
-
|
184
|
+
|
185
|
+
var _default = (0, _withStyles.default)(styles, {
|
154
186
|
hiComponent: true,
|
155
187
|
withTheme: true,
|
156
188
|
name: 'HmuiHiColoredLabel'
|
157
|
-
})(HiColoredLabel);
|
189
|
+
})(HiColoredLabel);
|
190
|
+
|
191
|
+
exports.default = _default;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -10,4 +11,5 @@ Object.defineProperty(exports, "default", {
|
|
10
11
|
return _HiColoredLabel.default;
|
11
12
|
}
|
12
13
|
});
|
14
|
+
|
13
15
|
var _HiColoredLabel = _interopRequireDefault(require("./HiColoredLabel"));
|
@@ -1,15 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports.styles = exports.default = void 0;
|
9
|
+
|
8
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
|
+
|
9
12
|
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
10
14
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
15
|
+
|
11
16
|
var _HiButton = _interopRequireDefault(require("../HiButton"));
|
12
|
-
|
17
|
+
|
18
|
+
var styles = function styles(theme) {
|
13
19
|
return {
|
14
20
|
caption: (0, _objectSpread2.default)({
|
15
21
|
display: 'table-caption',
|
@@ -21,14 +27,17 @@ var styles = exports.styles = function styles(theme) {
|
|
21
27
|
})
|
22
28
|
};
|
23
29
|
};
|
30
|
+
|
31
|
+
exports.styles = styles;
|
32
|
+
|
24
33
|
var Caption = function Caption(_ref) {
|
25
34
|
var classes = _ref.classes,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
35
|
+
date = _ref.date,
|
36
|
+
_ref$locale = _ref.locale,
|
37
|
+
locale = _ref$locale === void 0 ? 'en_US' : _ref$locale,
|
38
|
+
localeUtils = _ref.localeUtils,
|
39
|
+
onMonthClick = _ref.onMonthClick,
|
40
|
+
onYearClick = _ref.onYearClick;
|
32
41
|
var months = localeUtils.getMonths(locale);
|
33
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
34
43
|
className: classes.caption
|
@@ -40,6 +49,9 @@ var Caption = function Caption(_ref) {
|
|
40
49
|
onClick: onYearClick
|
41
50
|
}, date.getFullYear()));
|
42
51
|
};
|
43
|
-
|
52
|
+
|
53
|
+
var _default = (0, _withStyles.default)(styles, {
|
44
54
|
name: 'HmuiCaption'
|
45
|
-
})(Caption);
|
55
|
+
})(Caption);
|
56
|
+
|
57
|
+
exports.default = _default;
|