@linagora/twake-mui 1.5.0 → 1.6.1

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +54 -0
  3. package/dist/components/Avatar/Avatar.stories.d.ts +7 -0
  4. package/dist/components/Avatar/Avatar.stories.js +73 -0
  5. package/dist/lib/makeDarkOverrides.js +7 -47
  6. package/dist/lib/makeLightOverrides.js +659 -39
  7. package/dist/stories/Alert.stories.d.ts +7 -0
  8. package/dist/stories/Alert.stories.js +81 -0
  9. package/dist/stories/Button.stories.d.ts +7 -0
  10. package/dist/stories/Button.stories.js +78 -0
  11. package/dist/stories/Dialog.stories.d.ts +7 -0
  12. package/dist/stories/Dialog.stories.js +40 -0
  13. package/dist/stories/Input.stories.d.ts +7 -0
  14. package/dist/stories/Input.stories.js +41 -0
  15. package/dist/stories/Selection.stories.d.ts +7 -0
  16. package/dist/stories/Selection.stories.js +37 -0
  17. package/dist/stories/Typography.stories.d.ts +7 -0
  18. package/dist/stories/Typography.stories.js +50 -0
  19. package/package.json +36 -26
  20. package/dist/lib/overrides/accordionOverrides.d.ts +0 -2
  21. package/dist/lib/overrides/accordionOverrides.js +0 -63
  22. package/dist/lib/overrides/autocompleteOverrides.d.ts +0 -2
  23. package/dist/lib/overrides/autocompleteOverrides.js +0 -31
  24. package/dist/lib/overrides/avatarOverrides.d.ts +0 -2
  25. package/dist/lib/overrides/avatarOverrides.js +0 -85
  26. package/dist/lib/overrides/backdropOverrides.d.ts +0 -2
  27. package/dist/lib/overrides/backdropOverrides.js +0 -17
  28. package/dist/lib/overrides/buttonOverrides.d.ts +0 -2
  29. package/dist/lib/overrides/buttonOverrides.js +0 -86
  30. package/dist/lib/overrides/checkboxOverrides.d.ts +0 -2
  31. package/dist/lib/overrides/checkboxOverrides.js +0 -11
  32. package/dist/lib/overrides/datePickerOverrides.d.ts +0 -2
  33. package/dist/lib/overrides/datePickerOverrides.js +0 -150
  34. package/dist/lib/overrides/dialogOverrides.d.ts +0 -5
  35. package/dist/lib/overrides/dialogOverrides.js +0 -43
  36. package/dist/lib/overrides/iconButtonOverrides.d.ts +0 -2
  37. package/dist/lib/overrides/iconButtonOverrides.js +0 -13
  38. package/dist/lib/overrides/menuItemOverrides.d.ts +0 -2
  39. package/dist/lib/overrides/menuItemOverrides.js +0 -22
  40. package/dist/lib/overrides/popoverOverrides.d.ts +0 -2
  41. package/dist/lib/overrides/popoverOverrides.js +0 -11
  42. package/dist/lib/overrides/swipeableDrawerOverrides.d.ts +0 -2
  43. package/dist/lib/overrides/swipeableDrawerOverrides.js +0 -26
  44. package/dist/lib/overrides/textFieldOverrides.d.ts +0 -5
  45. package/dist/lib/overrides/textFieldOverrides.js +0 -95
  46. package/dist/lib/overrides/toggleButtonOverrides.d.ts +0 -3
  47. package/dist/lib/overrides/toggleButtonOverrides.js +0 -42
@@ -1,39 +1,436 @@
1
+ import { menuItemClasses } from '@mui/material/MenuItem';
1
2
  import { alpha } from '@mui/material/styles';
2
- import { accordionOverrides } from './overrides/accordionOverrides';
3
- import { autocompleteOverrides } from './overrides/autocompleteOverrides';
4
- import { avatarOverrides } from './overrides/avatarOverrides';
5
- import { backdropOverrides } from './overrides/backdropOverrides';
6
- import { buttonOverrides } from './overrides/buttonOverrides';
7
- import { checkboxOverrides } from './overrides/checkboxOverrides';
8
- import { datePickerOverrides } from './overrides/datePickerOverrides';
9
- import { dialogOverrides, dialogTitleOverrides, dialogContentOverrides, dialogActionsOverrides } from './overrides/dialogOverrides';
10
- import { iconButtonOverrides } from './overrides/iconButtonOverrides';
11
- import { menuItemOverrides } from './overrides/menuItemOverrides';
12
- import { popoverOverrides } from './overrides/popoverOverrides';
13
- import { swipeableDrawerOverrides } from './overrides/swipeableDrawerOverrides';
14
- import { textFieldOverrides, outlinedInputOverrides, inputBaseOverrides, selectOverrides } from './overrides/textFieldOverrides';
15
- import { toggleButtonGroupOverrides, toggleButtonOverrides } from './overrides/toggleButtonOverrides';
3
+ import paletteJson from './palette.json';
4
+ import { radius } from './radius';
5
+ const paletteData = paletteJson;
16
6
  export const makeLightOverrides = (theme) => {
17
- const datePickerOverridesResult = datePickerOverrides(theme);
18
- const accordionOverridesResult = accordionOverrides(theme);
19
7
  return {
20
- MuiButton: buttonOverrides(theme),
21
- MuiTextField: textFieldOverrides(),
22
- MuiOutlinedInput: outlinedInputOverrides(),
23
- MuiInputBase: inputBaseOverrides(),
24
- MuiSelect: selectOverrides(),
25
- MuiAutocomplete: autocompleteOverrides(),
26
- MuiDialog: dialogOverrides(),
27
- MuiDialogTitle: dialogTitleOverrides(),
28
- MuiDialogContent: dialogContentOverrides(),
29
- MuiDialogActions: dialogActionsOverrides(),
30
- MuiPopover: popoverOverrides(),
31
- MuiAvatar: avatarOverrides(theme),
32
- MuiToggleButtonGroup: toggleButtonGroupOverrides(),
33
- MuiToggleButton: toggleButtonOverrides(theme),
34
- MuiIconButton: iconButtonOverrides(),
35
- MuiCheckbox: checkboxOverrides(),
36
- MuiBackdrop: backdropOverrides(theme),
8
+ MuiButton: {
9
+ styleOverrides: {
10
+ root: {
11
+ borderRadius: radius.pill,
12
+ boxShadow: 'none',
13
+ '&:hover': {
14
+ boxShadow: 'none'
15
+ },
16
+ '&:active': {
17
+ boxShadow: 'none'
18
+ },
19
+ '&:focus': {
20
+ boxShadow: 'none'
21
+ },
22
+ variants: [
23
+ {
24
+ props: { variant: 'contained', color: 'secondary' },
25
+ style: {
26
+ backgroundColor: theme.palette.secondary.main,
27
+ color: alpha(theme.palette.text.primary, 0.9),
28
+ borderRadius: radius.sm,
29
+ '&:hover': {
30
+ backgroundColor: paletteData.Secondary[700],
31
+ color: alpha(theme.palette.text.primary, 0.9)
32
+ },
33
+ '&.Mui-disabled': {
34
+ backgroundColor: theme.palette.action.disabledBackground
35
+ }
36
+ }
37
+ },
38
+ {
39
+ props: { size: 'small' },
40
+ style: {
41
+ padding: '6px 16px'
42
+ }
43
+ },
44
+ {
45
+ props: { size: 'medium' },
46
+ style: {
47
+ padding: '9px 24px'
48
+ }
49
+ },
50
+ {
51
+ props: { size: 'large' },
52
+ style: {
53
+ padding: '12px 32px'
54
+ }
55
+ },
56
+ {
57
+ props: { variant: 'contained', size: 'small' },
58
+ style: {
59
+ paddingTop: '7px',
60
+ paddingBottom: '7px'
61
+ }
62
+ },
63
+ {
64
+ props: { variant: 'contained', size: 'medium' },
65
+ style: {
66
+ paddingTop: '10px',
67
+ paddingBottom: '10px'
68
+ }
69
+ },
70
+ {
71
+ props: { variant: 'contained', size: 'large' },
72
+ style: {
73
+ paddingTop: '13px',
74
+ paddingBottom: '13px'
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ contained: {
80
+ boxShadow: 'none',
81
+ '&:hover': {
82
+ boxShadow: 'none'
83
+ },
84
+ '&:active': {
85
+ boxShadow: 'none'
86
+ },
87
+ '&:focus': {
88
+ boxShadow: 'none'
89
+ }
90
+ },
91
+ outlined: {
92
+ backgroundColor: theme.palette.background.paper,
93
+ borderColor: alpha(paletteData.Grey.A900, 0.28),
94
+ color: alpha(theme.palette.text.primary, 0.9),
95
+ '&:hover': {
96
+ backgroundColor: alpha(theme.palette.primary.main, 0.04),
97
+ color: theme.palette.primary.main,
98
+ borderColor: alpha(theme.palette.primary.main, 0.32)
99
+ },
100
+ '&.Mui-disabled': {
101
+ backgroundColor: theme.palette.background.paper,
102
+ color: alpha(theme.palette.grey[900], 0.38),
103
+ borderColor: alpha(paletteData.Grey.A900, 0.28)
104
+ }
105
+ }
106
+ }
107
+ },
108
+ MuiTextField: {
109
+ defaultProps: {
110
+ size: 'medium'
111
+ },
112
+ styleOverrides: {
113
+ root: {
114
+ '& .MuiOutlinedInput-root': {
115
+ borderRadius: radius.sm,
116
+ '& fieldset': {
117
+ borderRadius: radius.sm
118
+ }
119
+ }
120
+ }
121
+ }
122
+ },
123
+ MuiOutlinedInput: {
124
+ styleOverrides: {
125
+ root: {
126
+ borderRadius: radius.sm,
127
+ '&.Mui-focused fieldset': {
128
+ borderWidth: '1px'
129
+ },
130
+ '& input::placeholder': {
131
+ color: '#8C9CAF',
132
+ opacity: 1
133
+ },
134
+ '& .MuiSvgIcon-root': {
135
+ fontSize: '18px'
136
+ }
137
+ },
138
+ input: {
139
+ padding: '11px 16px', // Default medium: 48px height
140
+ height: 'auto',
141
+ lineHeight: '24px',
142
+ variants: [
143
+ {
144
+ props: { size: 'small' },
145
+ style: {
146
+ padding: '8px 16px',
147
+ fontSize: '14px',
148
+ fontWeight: 400,
149
+ lineHeight: '20px',
150
+ minHeight: '26px'
151
+ }
152
+ }
153
+ ]
154
+ }
155
+ },
156
+ variants: [
157
+ {
158
+ props: { size: 'large' },
159
+ style: {
160
+ '& .MuiOutlinedInput-input': {
161
+ padding: '14px 16px' // Large: 54px height
162
+ }
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ MuiInputBase: {
168
+ styleOverrides: {
169
+ root: {
170
+ '&.MuiInputBase-sizeLarge': {
171
+ fontSize: '16px'
172
+ }
173
+ }
174
+ }
175
+ },
176
+ MuiSelect: {
177
+ styleOverrides: {
178
+ root: {
179
+ '&.MuiOutlinedInput-root': {
180
+ '& .MuiSvgIcon-root': {
181
+ fontSize: '25px'
182
+ },
183
+ '&.MuiInputBase-sizeSmall': {
184
+ '& .MuiSelect-select': {
185
+ padding: '10px 25px 10px 15px',
186
+ fontSize: '14px',
187
+ lineHeight: '20px',
188
+ // Note: :has() selector removed due to jsdom compatibility in tests
189
+ // If SVG is present, padding should be handled via component-level sx prop
190
+ '& svg': {
191
+ marginRight: '8px'
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ },
199
+ MuiAutocomplete: {
200
+ styleOverrides: {
201
+ root: {
202
+ // Using "&&" to increase CSS specificity
203
+ '&&': {
204
+ '& .MuiOutlinedInput-root': {
205
+ paddingLeft: '16px',
206
+ borderRadius: radius.sm,
207
+ '& fieldset.MuiOutlinedInput-notchedOutline': {
208
+ borderRadius: radius.sm
209
+ },
210
+ '&.MuiInputBase-sizeSmall': {
211
+ paddingTop: '8px',
212
+ paddingBottom: '8px',
213
+ paddingLeft: '16px',
214
+ '& .MuiAutocomplete-input': {
215
+ padding: '0px 4px 0px 8px'
216
+ }
217
+ }
218
+ }
219
+ }
220
+ },
221
+ // Styling for chips in Autocomplete
222
+ tag: {
223
+ margin: '2px'
224
+ }
225
+ }
226
+ },
227
+ MuiDialog: {
228
+ styleOverrides: {
229
+ paper: {
230
+ borderRadius: radius.md,
231
+ boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15)',
232
+ maxWidth: '570px'
233
+ },
234
+ paperFullScreen: {
235
+ borderRadius: 0,
236
+ maxWidth: '100%'
237
+ }
238
+ }
239
+ },
240
+ MuiDialogTitle: {
241
+ styleOverrides: {
242
+ root: {
243
+ padding: '12px 32px',
244
+ fontSize: 17,
245
+ fontWeight: 400,
246
+ lineHeight: 1.273,
247
+ letterSpacing: '0'
248
+ }
249
+ }
250
+ },
251
+ MuiDialogContent: {
252
+ styleOverrides: {
253
+ root: {
254
+ padding: '24px 32px'
255
+ }
256
+ }
257
+ },
258
+ MuiDialogActions: {
259
+ styleOverrides: {
260
+ root: {
261
+ padding: '16px 32px'
262
+ }
263
+ }
264
+ },
265
+ MuiPopover: {
266
+ styleOverrides: {
267
+ paper: {
268
+ borderRadius: radius.md,
269
+ boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15)'
270
+ }
271
+ }
272
+ },
273
+ MuiAvatar: {
274
+ styleOverrides: {
275
+ root: {
276
+ fontWeight: 600,
277
+ '&.size-xs': {
278
+ width: 18,
279
+ height: 18,
280
+ fontSize: '9.109px',
281
+ fontWeight: 500,
282
+ lineHeight: '18.219px',
283
+ '& svg': {
284
+ width: '50%',
285
+ height: '50%'
286
+ }
287
+ },
288
+ '&.size-s': {
289
+ width: 28,
290
+ height: 28,
291
+ fontSize: '12.525px',
292
+ fontWeight: 500,
293
+ lineHeight: '18.219px',
294
+ '& svg': {
295
+ width: '50%',
296
+ height: '50%'
297
+ }
298
+ },
299
+ '&.size-m': {
300
+ width: 36,
301
+ height: 36,
302
+ fontSize: '18.219px',
303
+ fontWeight: 500,
304
+ lineHeight: '27.328px',
305
+ '& svg': {
306
+ width: '50%',
307
+ height: '50%'
308
+ }
309
+ },
310
+ '&.size-l': {
311
+ width: 54,
312
+ height: 54,
313
+ fontSize: '27.328px',
314
+ fontWeight: 600,
315
+ lineHeight: '36.438px',
316
+ '& svg': {
317
+ width: '50%',
318
+ height: '50%'
319
+ }
320
+ },
321
+ '&.size-xl': {
322
+ width: 72,
323
+ height: 72,
324
+ fontSize: '36.438px',
325
+ fontWeight: 600,
326
+ lineHeight: '45.547px',
327
+ '& svg': {
328
+ width: '50%',
329
+ height: '50%'
330
+ }
331
+ },
332
+ '&.disabled': {
333
+ color: theme.palette.primary.contrastText,
334
+ background: theme.palette.grey[300],
335
+ '& img': {
336
+ filter: 'grayscale(1) brightness(2)',
337
+ opacity: 0.5
338
+ }
339
+ },
340
+ '&.displayInline': {
341
+ display: 'inline-flex'
342
+ },
343
+ '&.border': {
344
+ border: `2px solid ${theme.palette.background.paper}`
345
+ },
346
+ '&.innerBorder': {
347
+ boxShadow: `inset 0px 0px 0px 1px ${theme.palette.divider}`
348
+ },
349
+ variants: [
350
+ {
351
+ props: { color: 'default' },
352
+ style: {
353
+ backgroundColor: theme.palette.background.paper,
354
+ color: theme.palette.text.secondary
355
+ }
356
+ }
357
+ ]
358
+ }
359
+ }
360
+ },
361
+ MuiToggleButtonGroup: {
362
+ styleOverrides: {
363
+ root: {
364
+ borderColor: '#AEAEC0',
365
+ '& .MuiToggleButton-root:not(.Mui-selected)': {
366
+ color: '#8C9CAF',
367
+ backgroundColor: alpha('#49454F', 0.08),
368
+ '&:hover': {
369
+ backgroundColor: alpha('#49454F', 0.08)
370
+ },
371
+ '& svg, & .MuiSvgIcon-root': {
372
+ color: '#8C9CAF'
373
+ }
374
+ }
375
+ }
376
+ }
377
+ },
378
+ MuiToggleButton: {
379
+ styleOverrides: {
380
+ root: {
381
+ color: '#525256',
382
+ '&.Mui-selected': {
383
+ color: '#243B55',
384
+ backgroundColor: 'transparent',
385
+ '&:hover': {
386
+ backgroundColor: 'transparent'
387
+ },
388
+ '& svg, & .MuiSvgIcon-root': {
389
+ color: theme.palette.primary.main
390
+ }
391
+ },
392
+ variants: [
393
+ {
394
+ props: { size: 'medium' },
395
+ style: {
396
+ padding: '9px 24px'
397
+ }
398
+ }
399
+ ]
400
+ }
401
+ }
402
+ },
403
+ MuiIconButton: {
404
+ styleOverrides: {
405
+ root: {
406
+ color: alpha(paletteData.Grey[900], 0.48),
407
+ padding: '4px'
408
+ }
409
+ }
410
+ },
411
+ MuiCheckbox: {
412
+ styleOverrides: {
413
+ root: {
414
+ '&.MuiCheckbox-sizeSmall': {
415
+ padding: '6px'
416
+ }
417
+ }
418
+ }
419
+ },
420
+ MuiBackdrop: {
421
+ styleOverrides: {
422
+ root: {
423
+ variants: [
424
+ {
425
+ props: { invisible: false },
426
+ style: {
427
+ backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.focusOpacity)
428
+ }
429
+ }
430
+ ]
431
+ }
432
+ }
433
+ },
37
434
  MuiTypography: {
38
435
  styleOverrides: {
39
436
  root: {
@@ -44,15 +441,238 @@ export const makeLightOverrides = (theme) => {
44
441
  }
45
442
  }
46
443
  },
47
- ...datePickerOverridesResult,
48
- MuiAccordionSummary: accordionOverridesResult.MuiAccordionSummary,
444
+ MuiAccordion: {
445
+ styleOverrides: {
446
+ root: {
447
+ '&::before': {
448
+ display: 'none'
449
+ }
450
+ }
451
+ }
452
+ },
453
+ MuiAccordionSummary: {
454
+ styleOverrides: {
455
+ root: {
456
+ padding: '0',
457
+ minHeight: '32px',
458
+ '&.Mui-expanded': {
459
+ minHeight: '32px'
460
+ }
461
+ },
462
+ content: {
463
+ fontSize: '14px',
464
+ fontWeight: 500,
465
+ lineHeight: '20px',
466
+ color: alpha(paletteData.Grey[900], 0.9),
467
+ margin: 0,
468
+ '&.Mui-expanded': {
469
+ margin: 0
470
+ }
471
+ },
472
+ expandIconWrapper: {
473
+ padding: '4px',
474
+ color: alpha(paletteData.Grey[900], 0.48),
475
+ borderRadius: '50%',
476
+ '&:hover': {
477
+ backgroundColor: alpha(paletteData.Primary.A400, 0.04)
478
+ }
479
+ }
480
+ }
481
+ },
49
482
  MuiCssBaseline: {
50
483
  styleOverrides: {
51
- ...(datePickerOverridesResult.MuiCssBaseline?.styleOverrides || {}),
52
- ...(accordionOverridesResult.MuiCssBaseline?.styleOverrides || {})
484
+ '.MuiDateCalendar-root.MuiDateCalendar-root': {
485
+ width: '230px',
486
+ maxWidth: '230px',
487
+ height: '300px',
488
+ maxHeight: '300px'
489
+ },
490
+ '.MuiDateCalendar-root .MuiDayCalendar-slideTransition': {
491
+ minHeight: '208px'
492
+ },
493
+ '.MuiDateCalendar-root .MuiPickersCalendarHeader-root': {
494
+ padding: '6px 4px',
495
+ maxHeight: '32px',
496
+ minHeight: '32px'
497
+ },
498
+ '.MuiDateCalendar-root .MuiPickersCalendarHeader-label': {
499
+ fontSize: '14px',
500
+ fontStyle: 'normal',
501
+ fontWeight: 600,
502
+ lineHeight: '20px',
503
+ color: alpha(theme.palette.grey[900], 0.9)
504
+ },
505
+ '.MuiDateCalendar-root .MuiPickersCalendarHeader-switchViewButton': {
506
+ padding: '0',
507
+ width: '32px',
508
+ height: '32px',
509
+ color: theme.palette.grey[900]
510
+ },
511
+ '.MuiDateCalendar-root .MuiPickersCalendarHeader-switchViewIcon': {
512
+ fontSize: '15px'
513
+ },
514
+ '.MuiDateCalendar-root .MuiPickersArrowSwitcher-button': {
515
+ padding: '0',
516
+ width: '32px',
517
+ height: '32px',
518
+ color: alpha(theme.palette.grey[900], 0.48)
519
+ },
520
+ '.MuiDateCalendar-root .MuiDayCalendar-weekDayLabel': {
521
+ fontSize: '10px',
522
+ fontStyle: 'normal',
523
+ fontWeight: 500,
524
+ lineHeight: '16px',
525
+ height: '32px',
526
+ width: '32px',
527
+ margin: '0',
528
+ color: alpha(theme.palette.grey[900], 0.48)
529
+ },
530
+ '.MuiDateCalendar-root .MuiPickersDay-root': {
531
+ fontSize: '10px',
532
+ fontStyle: 'normal',
533
+ fontWeight: 500,
534
+ lineHeight: '16px',
535
+ height: '32px',
536
+ width: '32px',
537
+ margin: '0',
538
+ color: alpha(theme.palette.grey[900], 0.9)
539
+ },
540
+ '.MuiDateCalendar-root .MuiPickersDay-root.Mui-selected': {
541
+ backgroundColor: theme.palette.primary.main,
542
+ '&:hover': {
543
+ backgroundColor: theme.palette.primary.dark
544
+ }
545
+ },
546
+ '.MuiDateCalendar-root .MuiButtonBase-root.MuiPickersDay-root.Mui-selected': {
547
+ backgroundColor: `${theme.palette.primary.main}`,
548
+ '&:hover': {
549
+ backgroundColor: `${theme.palette.primary.dark}`
550
+ }
551
+ },
552
+ '.MuiDateCalendar-root .MuiMonthCalendar-root': {
553
+ width: '215px'
554
+ },
555
+ '.MuiDateCalendar-root .MuiMonthCalendar-button': {
556
+ fontSize: '14px',
557
+ lineHeight: 1,
558
+ height: '30px',
559
+ width: '55px'
560
+ },
561
+ '.MuiDateCalendar-root .MuiMonthCalendar-button[tabindex="0"]': {
562
+ background: 'transparent'
563
+ },
564
+ '.MuiDateCalendar-root .MuiMonthCalendar-button.Mui-selected': {
565
+ color: theme.palette.primary.contrastText,
566
+ background: theme.palette.primary.main,
567
+ '&:hover': {
568
+ background: theme.palette.primary.dark
569
+ },
570
+ '&:focus': {
571
+ background: theme.palette.primary.dark
572
+ }
573
+ },
574
+ '.MuiDateCalendar-root .MuiMonthCalendar-button.Mui-selected[tabindex="0"]': {
575
+ color: theme.palette.primary.contrastText,
576
+ background: theme.palette.primary.main,
577
+ '&:hover': {
578
+ background: theme.palette.primary.dark
579
+ },
580
+ '&:focus': {
581
+ background: theme.palette.primary.dark
582
+ }
583
+ },
584
+ '.MuiDateCalendar-root .MuiYearCalendar-root': {
585
+ width: '245px',
586
+ maxWidth: '245px'
587
+ },
588
+ '.MuiDateCalendar-root .MuiYearCalendar-button': {
589
+ fontSize: '14px',
590
+ lineHeight: 1,
591
+ height: '30px',
592
+ width: '55px'
593
+ },
594
+ '.MuiDateCalendar-root .MuiYearCalendar-button[tabindex="0"]': {
595
+ background: 'transparent'
596
+ },
597
+ '.MuiDateCalendar-root .MuiYearCalendar-button.Mui-selected': {
598
+ color: theme.palette.primary.contrastText,
599
+ background: theme.palette.primary.main,
600
+ '&:hover': {
601
+ background: theme.palette.primary.dark
602
+ },
603
+ '&:focus': {
604
+ background: theme.palette.primary.dark
605
+ }
606
+ },
607
+ '.MuiDateCalendar-root .MuiYearCalendar-button.Mui-selected[tabindex="0"]': {
608
+ color: theme.palette.primary.contrastText,
609
+ background: theme.palette.primary.main,
610
+ '&:hover': {
611
+ background: theme.palette.primary.dark
612
+ },
613
+ '&:focus': {
614
+ background: theme.palette.primary.dark
615
+ }
616
+ },
617
+ '.MuiButtonBase-root.MuiMenuItem-root.MuiDigitalClock-item.Mui-selected': {
618
+ backgroundColor: theme.palette.primary.main,
619
+ color: theme.palette.primary.contrastText,
620
+ '&:hover': {
621
+ backgroundColor: theme.palette.primary.dark
622
+ }
623
+ },
624
+ '.MuiAccordion-root .MuiListItem-root': {
625
+ padding: '0',
626
+ borderRadius: '4px',
627
+ '&:hover': {
628
+ backgroundColor: alpha(paletteData.Grey.A900, 0.04)
629
+ }
630
+ },
631
+ '.MuiAccordion-root .MuiListItem-root label': {
632
+ fontSize: '14px',
633
+ fontStyle: 'normal',
634
+ fontWeight: 400,
635
+ color: alpha(paletteData.Grey[900], 0.9)
636
+ }
637
+ }
638
+ },
639
+ MuiMenuItem: {
640
+ styleOverrides: {
641
+ root: {
642
+ borderRadius: radius.md,
643
+ '&&&:hover': {
644
+ backgroundColor: `${alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)}`
645
+ },
646
+ [`&.${menuItemClasses.selected}`]: {
647
+ backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
648
+ '&:hover': {
649
+ backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity +
650
+ theme.palette.action.hoverOpacity)
651
+ }
652
+ }
653
+ }
53
654
  }
54
655
  },
55
- MuiMenuItem: menuItemOverrides(theme),
56
- MuiSwipeableDrawer: swipeableDrawerOverrides(theme)
656
+ MuiSwipeableDrawer: {
657
+ defaultProps: {
658
+ sx: {
659
+ '& .MuiDrawer-paper': {
660
+ borderTopLeftRadius: radius.md,
661
+ borderTopRightRadius: radius.md,
662
+ '&::before': {
663
+ content: '""',
664
+ display: 'block',
665
+ width: '64px',
666
+ height: '4px',
667
+ backgroundColor: theme.palette.action.disabledBackground,
668
+ borderRadius: radius.md,
669
+ margin: '12px auto',
670
+ marginTop: '30px',
671
+ flexShrink: 0
672
+ }
673
+ }
674
+ }
675
+ }
676
+ }
57
677
  };
58
678
  };