diff --git a/packages/dx-react-scheduler-demos/src/demo-data/tasks.js b/packages/dx-react-scheduler-demos/src/demo-data/tasks.js
index 6f7dec4a34..57db75e52d 100644
--- a/packages/dx-react-scheduler-demos/src/demo-data/tasks.js
+++ b/packages/dx-react-scheduler-demos/src/demo-data/tasks.js
@@ -213,18 +213,21 @@ export const priorities = [
title: 'Low',
color: '#81c784',
activeColor: '#43a047',
+ shortTitle: 'L',
},
{
id: 2,
title: 'Medium',
color: '#4fc3f7',
activeColor: '#039be5',
+ shortTitle: 'M',
},
{
id: 3,
title: 'High',
color: '#ff8a65',
activeColor: '#f4511e',
+ shortTitle: 'H',
},
];
diff --git a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-appearance-customization/material-ui/demo.jsx b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-appearance-customization/material-ui/demo.jsx
index 86c900462e..59984d3d55 100644
--- a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-appearance-customization/material-ui/demo.jsx
+++ b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-appearance-customization/material-ui/demo.jsx
@@ -37,6 +37,8 @@ const filterTasks = (items, priorityId) => items.filter(task => (
!priorityId || task.priorityId === priorityId
));
const getPriorityById = priorityId => priorities.find(({ id }) => id === priorityId).title;
+const getShortPriorityById = priorityId => priorities
+ .find(({ id }) => id === priorityId).shortTitle;
const createClassesByPriorityId = (
priorityId, classes,
@@ -71,6 +73,11 @@ const styles = theme => ({
prioritySelector: {
marginLeft: theme.spacing(2),
minWidth: 140,
+ '@media (max-width: 500px)': {
+ minWidth: 0,
+ fontSize: '0.75rem',
+ marginLeft: theme.spacing(0.5),
+ },
},
prioritySelectorItem: {
display: 'flex',
@@ -83,6 +90,16 @@ const styles = theme => ({
marginRight: theme.spacing(2),
display: 'inline-block',
},
+ priorityText: {
+ '@media (max-width: 500px)': {
+ display: 'none',
+ },
+ },
+ priorityShortText: {
+ '@media (min-width: 500px)': {
+ display: 'none',
+ },
+ },
defaultBullet: {
background: theme.palette.divider,
},
@@ -138,14 +155,17 @@ const styles = theme => ({
const PrioritySelectorItem = ({ id, classes }) => {
let bulletClass = classes.defaultBullet;
let text = 'All Tasks';
+ let shortText = 'All';
if (id) {
bulletClass = createClassesByPriorityId(id, classes, { background: true });
text = getPriorityById(id);
+ shortText = getShortPriorityById(id);
}
return (
- {text}
+ {text}
+ {shortText}
);
};
diff --git a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-redux-integration/material-ui/demo.jsx b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-redux-integration/material-ui/demo.jsx
index fef922c44f..207c72d1ef 100644
--- a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-redux-integration/material-ui/demo.jsx
+++ b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-featured-redux-integration/material-ui/demo.jsx
@@ -29,7 +29,7 @@ const styles = ({ spacing, palette }) => ({
alignItems: 'center',
},
textField: {
- width: '100px',
+ width: '75px',
marginLeft: spacing(1),
marginTop: 0,
marginBottom: 0,
@@ -43,11 +43,12 @@ const styles = ({ spacing, palette }) => ({
paddingLeft: spacing(1),
paddingRight: spacing(1),
width: spacing(10),
+ '@media (max-width: 800px)': {
+ width: spacing(2),
+ fontSize: '0.75rem',
+ },
},
selectedButton: {
- paddingLeft: spacing(1),
- paddingRight: spacing(1),
- width: spacing(10),
background: palette.primary[400],
color: palette.primary[50],
'&:hover': {
@@ -59,6 +60,16 @@ const styles = ({ spacing, palette }) => ({
borderLeft: `1px solid ${palette.primary[50]}!important`,
},
},
+ longButtonText: {
+ '@media (max-width: 800px)': {
+ display: 'none',
+ },
+ },
+ shortButtonText: {
+ '@media (min-width: 800px)': {
+ display: 'none',
+ },
+ },
title: {
fontWeight: 'bold',
overflow: 'hidden',
@@ -118,6 +129,7 @@ const styles = ({ spacing, palette }) => ({
});
const LOCATIONS = ['Room 1', 'Room 2', 'Room 3'];
+const LOCATIONS_SHORT = [1, 2, 3];
const Appointment = withStyles(styles, { name: 'Appointment' })(({ classes, data, ...restProps }) => (
{
};
const getButtonClass = (locations, classes, location) => (
- locations.indexOf(location) > -1 ? classes.selectedButton : classes.button
+ locations.indexOf(location) > -1 && classes.selectedButton
);
const LocationSelector = withStyles(styles, { name: 'LocationSelector' })(({ onLocationsChange, locations, classes }) => (
- {LOCATIONS.map(location => (
+ {LOCATIONS.map((location, index) => (
))}
diff --git a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-localization/material-ui/custom-formatting.jsx b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-localization/material-ui/custom-formatting.jsx
index d98ca7206f..ca6e3a26f1 100644
--- a/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-localization/material-ui/custom-formatting.jsx
+++ b/packages/dx-react-scheduler-demos/src/demo-sources/scheduler-localization/material-ui/custom-formatting.jsx
@@ -7,6 +7,8 @@ import {
WeekView,
Appointments,
} from '@devexpress/dx-react-scheduler-material-ui';
+import { withStyles } from '@material-ui/core/styles';
+
import { appointments } from '../../../demo-data/appointments';
const formatDayScaleDate = (date, options) => {
@@ -16,9 +18,22 @@ const formatDayScaleDate = (date, options) => {
};
const formatTimeScaleDate = date => moment(date).format('hh:mm:ss');
-const DayScaleCell = (
- { formatDate, ...restProps },
-) => ;
+const styles = {
+ dayScaleCell: {
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ },
+};
+
+const DayScaleCell = withStyles(styles, 'DayScaleCell')((
+ { formatDate, classes, ...restProps },
+) => (
+
+));
const TimeScaleCell = (
{ formatDate, ...restProps },
) => ;
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/appointment-form/recurrence/layout.jsx b/packages/dx-react-scheduler-material-ui/src/templates/appointment-form/recurrence/layout.jsx
index e3ef998007..523f3ad287 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/appointment-form/recurrence/layout.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/appointment-form/recurrence/layout.jsx
@@ -58,7 +58,10 @@ const styles = ({ spacing }) => ({
},
},
invisible: {
- maxHeight: '500px',
+ maxHeight: 0,
+ '@media (min-width: 700px)': {
+ maxHeight: '500px',
+ },
},
label: {
width: '8em',
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/content.jsx b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/content.jsx
index 5b9bb9e864..b867bdb076 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/content.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/content.jsx
@@ -14,7 +14,6 @@ const styles = ({ spacing, palette, typography }) => ({
paddingTop: spacing(1),
backgroundColor: palette.background.paper,
boxSizing: 'border-box',
- width: '400px',
...typography.body2,
},
text: {
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/header.jsx b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/header.jsx
index 9f777df25b..c7877d38e7 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/header.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/header.jsx
@@ -5,7 +5,6 @@ import { withStyles } from '@material-ui/core/styles';
const styles = ({ spacing, palette }) => ({
head: {
- width: '400px',
position: 'relative',
paddingLeft: spacing(1),
paddingRight: spacing(0.5),
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/layout.jsx b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/layout.jsx
index 6776db00cb..bd101ed70b 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/layout.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/appointment-tooltip/layout.jsx
@@ -8,6 +8,10 @@ const verticalTopHorizontalCenterOptions = { vertical: 'top', horizontal: 'cente
const styles = {
popover: {
borderRadius: '8px',
+ width: '400px',
+ '@media (max-width: 500px)': {
+ width: '300px',
+ },
},
};
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/appointment/vertical-appointment.jsx b/packages/dx-react-scheduler-material-ui/src/templates/appointment/vertical-appointment.jsx
index 729f578962..fcd12e6296 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/appointment/vertical-appointment.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/appointment/vertical-appointment.jsx
@@ -32,9 +32,17 @@ const styles = ({ palette, spacing }) => ({
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
display: 'flex',
+ '@media (max-width: 500px)': {
+ paddingLeft: spacing(0.5),
+ paddingRight: spacing(0.5),
+ },
},
shortContent: {
padding: spacing(0.25, 1),
+ '@media (max-width: 500px)': {
+ paddingLeft: spacing(0.5),
+ paddingRight: spacing(0.5),
+ },
},
shortContainer: {
display: 'flex',
diff --git a/packages/dx-react-scheduler-material-ui/src/templates/confirmation-dialog/layout.jsx b/packages/dx-react-scheduler-material-ui/src/templates/confirmation-dialog/layout.jsx
index 4abb2bb9f2..c442715ac8 100644
--- a/packages/dx-react-scheduler-material-ui/src/templates/confirmation-dialog/layout.jsx
+++ b/packages/dx-react-scheduler-material-ui/src/templates/confirmation-dialog/layout.jsx
@@ -2,20 +2,35 @@ import * as React from 'react';
import * as PropTypes from 'prop-types';
import DialogActions from '@material-ui/core/DialogActions';
import DialogTitle from '@material-ui/core/DialogTitle';
+import { withStyles } from '@material-ui/core/styles';
-export const Layout = React.memo(({
+const styles = ({ typography }) => ({
+ title: {
+ ...typography.h6,
+ },
+ '@media (max-width: 500px)': {
+ title: {
+ fontSize: '1.1rem',
+ },
+ },
+});
+
+const LayoutBase = React.memo(({
buttonComponent: Button,
handleCancel,
handleConfirm,
getMessage,
isDeleting,
appointmentData,
+ classes,
...restProps
}) => (
-
{getMessage(isDeleting ? 'confirmDeleteMessage' : 'confirmCancelMessage')}
+
+ {getMessage(isDeleting ? 'confirmDeleteMessage' : 'confirmCancelMessage')}
+