@applica-software-guru/react-admin 1.0.71 → 1.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applica-software-guru/react-admin",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -93,6 +93,14 @@ const Breadcrumbs = ({
93
93
  // item separator
94
94
  const SeparatorIcon = separator;
95
95
  const separatorIcon = separator ? <SeparatorIcon style={{ fontSize: '0.75rem', marginTop: 2 }} /> : '/';
96
+ const cardSx = {
97
+ mb: 2,
98
+ bgcolor: card === false ? 'transparent' : 'inherit',
99
+ ...sx,
100
+ [theme.breakpoints.down('sm')]: {
101
+ mb: 1
102
+ }
103
+ };
96
104
 
97
105
  let mainContent;
98
106
  let itemContent;
@@ -102,13 +110,7 @@ const Breadcrumbs = ({
102
110
  let ItemIcon;
103
111
  if (mode === 'breadcrumbs') {
104
112
  return (
105
- <MainCard
106
- border={card}
107
- sx={card === false ? { mb: 3, bgcolor: 'transparent', ...sx } : { mb: 3, ...sx }}
108
- {...others}
109
- content={card}
110
- shadow="none"
111
- >
113
+ <MainCard border={card} sx={cardSx} {...others} content={card} shadow="none">
112
114
  <Grid
113
115
  container
114
116
  direction={rightAlign ? 'row' : 'column'}
@@ -122,7 +124,16 @@ const Breadcrumbs = ({
122
124
  </Grid>
123
125
  )}
124
126
  <Grid item>
125
- <MuiBreadcrumbs aria-label="breadcrumb" maxItems={maxItems || 8} separator={separatorIcon}>
127
+ <MuiBreadcrumbs
128
+ aria-label="breadcrumb"
129
+ maxItems={maxItems || 8}
130
+ separator={separatorIcon}
131
+ sx={{
132
+ [theme.breakpoints.down('sm')]: {
133
+ mt: 1
134
+ }
135
+ }}
136
+ >
126
137
  {home !== false && (
127
138
  <Typography component={Link} to="/" color="textSecondary" variant="h6" sx={{ textDecoration: 'none' }}>
128
139
  {icons && <HomeOutlined style={iconSX} />}
@@ -159,13 +170,7 @@ const Breadcrumbs = ({
159
170
  </Typography>
160
171
  );
161
172
  breadcrumbContent = (
162
- <MainCard
163
- border={card}
164
- sx={card === false ? { mb: 3, bgcolor: 'transparent', ...sx } : { mb: 3, ...sx }}
165
- {...others}
166
- content={card}
167
- shadow="none"
168
- >
173
+ <MainCard border={card} sx={cardSx} {...others} content={card} shadow="none">
169
174
  <Grid
170
175
  container
171
176
  direction={rightAlign ? 'row' : 'column'}
@@ -221,7 +226,14 @@ const Breadcrumbs = ({
221
226
  breadcrumbContent = (
222
227
  <MainCard
223
228
  border={card}
224
- sx={card === false ? { mb: 3, bgcolor: 'transparent', ...sx } : { mb: 3, ...sx }}
229
+ sx={{
230
+ mb: 3,
231
+ bgcolor: card === false ? 'transparent' : 'inherit',
232
+ ...sx,
233
+ [theme.breakpoints.down('sm')]: {
234
+ mb: 1
235
+ }
236
+ }}
225
237
  {...others}
226
238
  content={card}
227
239
  shadow="none"
@@ -15,18 +15,22 @@ const StyledRoot = styled('div', {
15
15
  borderTop: border ? `1px solid ${theme.palette.divider}` : 'none'
16
16
  },
17
17
  '& .MuiToolbar-root': {
18
- marginTop: `-${theme.spacing(2)}`,
19
- marginBottom: theme.spacing(margin ? 0 : 1),
20
- marginLeft: theme.spacing(margin ? 1 : 2.5),
21
- marginRight: theme.spacing(margin ? 1 : 2.5),
22
- width: margin ? 'auto' : `calc(100% - ${theme.spacing(5)})`,
18
+ [theme.breakpoints.up('sm')]: {
19
+ marginTop: `-${theme.spacing(2)}`,
20
+ marginBottom: theme.spacing(margin ? 0 : 1),
21
+ marginLeft: theme.spacing(margin ? 1 : 2.5),
22
+ marginRight: theme.spacing(margin ? 1 : 2.5),
23
+ width: margin ? 'auto' : `calc(100% - ${theme.spacing(5)})`
24
+ },
23
25
  [theme.breakpoints.down('md')]: {
24
26
  marginTop: 0
25
27
  }
26
28
  },
27
29
  '& .RaDatagrid-root': {
28
30
  overflowX: 'auto',
29
- width: 'calc(100vw - 34px)'
31
+ [theme.breakpoints.down('sm')]: {
32
+ width: 'calc(100vw - 34px)'
33
+ }
30
34
  },
31
35
  '& .RaDatagrid-table': {
32
36
  borderBottom: `1px solid ${theme.palette.divider}`
@@ -16,16 +16,25 @@ const StyledGrid = styled(Grid, {
16
16
  slot: 'Root'
17
17
  })(({ theme }) => ({
18
18
  '& .MuiToolbar-root': {
19
+ position: 'initial',
19
20
  marginTop: theme.spacing(2),
20
- marginLeft: `-${theme.spacing(2)}`,
21
- marginRight: `-${theme.spacing(2.5)}`,
21
+ marginLeft: `-${theme.spacing(3)}`,
22
+ marginRight: `-${theme.spacing(3)}`,
22
23
  marginBottom: `-${theme.spacing(2)}`,
23
- borderTop: `1px solid ${theme.palette.divider}`
24
+ borderTop: `1px solid ${theme.palette.divider}`,
25
+ [theme.breakpoints.down('sm')]: {
26
+ position: 'initial !important',
27
+ width: 'auto !important'
28
+ }
24
29
  },
25
30
  '& form > .MuiToolbar-root': {
26
31
  // È molto importante: questa regola serve per poter inserire form, all'interno di altri form, evitando
27
32
  // che la toolbar del form interno recepisca gli stili della regola precedente (che genera un padding strano).
28
- margin: 0
33
+ margin: 0,
34
+ marginRight: `-${theme.spacing(0.5)}`,
35
+ [theme.breakpoints.down('sm')]: {
36
+ marginRight: theme.spacing(0.5)
37
+ }
29
38
  }
30
39
  }));
31
40
 
@@ -1,5 +1,4 @@
1
1
  import { Toolbar as RaToolbar } from 'react-admin';
2
- import React from 'react';
3
2
  import { styled } from '@mui/system';
4
3
 
5
4
  const ApplicaStyledToolbar = styled(RaToolbar, {
@@ -44,9 +44,9 @@ const ApplicaStyledList = styled(RaList, {
44
44
  }
45
45
  },
46
46
  '& .RaList-actions': {
47
- '& form': {
48
- padding: theme.spacing(2)
49
- }
47
+ // '& form': {
48
+ padding: theme.spacing(2)
49
+ // }
50
50
  },
51
51
  '& .RaList-content': {
52
52
  // Resolve an issue related to the visualization of the bulk actions toolbar.