Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3710 | Rev 3712 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3596 stevensc 1
import { createTheme } from '@mui/material';
2
 
3706 stevensc 3
import { typography, typographyStyles } from './components/typography';
3703 stevensc 4
import { shape } from './components/shape';
5
import { shadows } from './components/shadows';
3706 stevensc 6
import { formControlStyles } from './components/formControl';
3703 stevensc 7
 
3596 stevensc 8
import { accordionStyles } from './components/accordion';
9
import { listStyles } from './components/list';
10
import { menuStyles } from './components/menu';
11
import { tabsStyles } from './components/tabs';
12
import { inputStyles } from './components/input';
3706 stevensc 13
import { rootSelectStyles, selectSelectStyles } from './components/select';
3596 stevensc 14
 
15
import colors from './config/colors';
16
 
17
export const defaultTheme = createTheme({
3703 stevensc 18
  typography,
19
  shape,
20
  shadows,
3706 stevensc 21
  spacing: 8,
3596 stevensc 22
  components: {
3706 stevensc 23
    MuiTypography: { styleOverrides: typographyStyles },
24
    MuiFormControl: { styleOverrides: formControlStyles },
3710 stevensc 25
    MuiButtonBase: {
26
      styleOverrides: {
27
        root: {
28
          fontFamily: ['Source Sans 3', 'sans-serif']
29
        }
30
      }
31
    },
3596 stevensc 32
    MuiButton: {
33
      styleOverrides: {
34
        root: ({ theme }) => ({
35
          display: 'flex',
36
          alignItems: 'center',
37
          justifyContent: 'center',
38
          gap: theme.spacing(0.5),
39
          padding: theme.spacing(0.33, 1),
3711 stevensc 40
          fontFamily: ['Source Sans 3', 'sans-serif'],
3596 stevensc 41
          lineHeight: 1.25,
42
          borderWidth: 0,
43
          borderRadius: '30px',
44
          color: colors.font.primary,
45
          cursor: 'pointer',
46
          textAlign: 'center',
47
          textTransform: 'capitalize',
48
          '&:disabled': {
49
            cursor: 'no-drop',
50
            backgroundColor: '#dddddd',
51
            color: '#a3a1a1'
52
          },
53
          '&>svg': {
54
            color: 'currentColor',
55
            fontSize: '1.3rem'
56
          }
57
        }),
58
        containedPrimary: {
59
          backgroundColor: colors.button.background.primary,
60
          color: colors.button.text.primary,
61
          ':hover': {
62
            backgroundColor: colors.button.background.primary,
63
            opacity: 0.9
64
          }
65
        },
66
        containedSecondary: {
67
          backgroundColor: colors.button.background.secondary,
68
          color: colors.button.text.secondary,
69
          ':hover': {
70
            backgroundColor: colors.button.background.secondary,
71
            opacity: 0.9
72
          }
73
        },
74
        containedInfo: {
75
          backgroundColor: colors.button.background.tertiary,
76
          color: colors.button.text.tertiary,
77
          ':hover': {
78
            backgroundColor: colors.button.background.tertiary,
79
            opacity: 0.9
80
          }
81
        },
82
        containedInherit: {
83
          backgroundColor: 'transparent',
84
          color: 'rgba(0, 0, 0, 0.54)',
85
          ':hover': {
86
            backgroundColor: 'rgba(0, 0, 0, 0.04)'
87
          }
88
        }
89
      },
90
      defaultProps: { variant: 'contained', color: 'inherit' }
91
    },
92
    MuiDrawer: {
93
      styleOverrides: {
94
        paper: {
95
          backgroundColor: colors.main
96
        }
97
      }
98
    },
99
    MuiPaper: {
100
      styleOverrides: {
101
        root: ({ theme }) => ({
102
          boxShadow: theme.shadows[1],
103
          backgroundColor: colors.main
104
        })
105
      }
106
    },
107
    MuiAccordion: {
108
      styleOverrides: {
109
        root: accordionStyles
110
      }
111
    },
112
    MuiFormLabel: {
113
      styleOverrides: {
114
        root: {
115
          fontWeight: 'bold',
116
          color: colors.font.primary
117
        }
118
      }
119
    },
120
    MuiInputLabel: {
121
      styleOverrides: {
122
        root: {
123
          position: 'relative',
124
          top: 'auto',
125
          left: 'auto',
126
          transform: 'none'
127
        }
128
      }
129
    },
130
    MuiInputBase: {
131
      styleOverrides: {
132
        root: inputStyles,
133
        colorSecondary: {
134
          backgroundColor: colors.main
135
        }
136
      },
137
      variants: [
138
        {
139
          props: { variant: 'search' },
140
          style: { borderRadius: 20 }
141
        }
142
      ],
143
      defaultProps: {
144
        size: 'small'
145
      }
146
    },
147
    MuiSelect: {
148
      styleOverrides: {
149
        root: rootSelectStyles,
150
        select: selectSelectStyles
151
      }
152
    },
153
    MuiOutlinedInput: {
154
      styleOverrides: {
155
        notchedOutline: {
156
          display: 'none'
157
        }
158
      }
159
    },
160
    MuiList: {
161
      styleOverrides: {
162
        root: listStyles
163
      }
164
    },
165
    MuiMenu: {
166
      styleOverrides: {
167
        root: menuStyles
168
      }
169
    },
170
    MuiSvgIcon: {
171
      defaultProps: { fontSize: 'small' }
172
    },
173
    MuiAppBar: {
174
      styleOverrides: {
175
        root: {
176
          backgroundColor: colors.main,
177
          boxShadow: 1,
178
          zIndex: 50
179
        }
180
      }
181
    },
182
    MuiCard: {
183
      styleOverrides: {
184
        root: {
185
          boxShadow: 'none',
186
          position: 'relative',
187
          borderRadius: {
188
            xs: 0,
189
            sm: 10
190
          },
191
          backgroundColor: colors.main
192
        }
193
      }
194
    },
195
    MuiIconButton: {
196
      styleOverrides: {
197
        root: {
198
          color: colors.icon.primary
199
        }
200
      }
201
    },
202
    MuiLinearProgress: {
203
      styleOverrides: {
204
        root: {
205
          backgroundColor: colors.main,
206
          borderRadius: 10,
207
          flex: 1,
208
          '& .MuiLinearProgress-bar': {
209
            backgroundColor: colors.button.background.primary,
210
            borderRadius: 10
211
          }
212
        }
213
      }
214
    },
215
    MuiCardActions: {
216
      styleOverrides: {
217
        root: {
218
          padding: '0.5rem',
219
          justifyContent: 'space-around',
220
          gap: '0.5rem',
221
          '& > button': { flex: 1, flexWrap: 'wrap' },
222
          borderTop: `1px solid ${colors.border.primary}`
223
        }
224
      }
225
    },
226
    MuiCardHeader: {
227
      styleOverrides: {
228
        avatar: ({ theme }) => ({
229
          marginRight: theme.spacing(0.5)
230
        })
231
      }
232
    },
233
    MuiAvatarGroup: {
234
      styleOverrides: {
235
        root: {
236
          flexDirection: 'row',
237
          '& .MuiAvatar-root:last-child': {
238
            marginLeft: '-8px'
239
          }
240
        }
241
      }
242
    },
243
    MuiChip: {
244
      styleOverrides: {
245
        root: {
246
          backgroundColor: colors.button.background.primary
247
        },
248
        label: {
249
          color: colors.button.text.primary
250
        }
251
      }
252
    },
253
    MuiTabs: {
254
      styleOverrides: {
255
        root: tabsStyles
256
      }
257
    }
258
  }
259
});