cozy-ui 123.0.0 → 123.1.0

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.
@@ -1,1087 +0,0 @@
1
- import { alpha, darken } from '../../styles'
2
- import {
3
- makeAlertColor,
4
- makeChipStyleByColor,
5
- makeSecondaryButtonStyle,
6
- makeTextButtonStyle,
7
- makeContainedButtonStyle,
8
- getFlagshipCssVar
9
- } from '../helpers'
10
-
11
- const SWITCH_BAR_WIDTH = 25
12
-
13
- export const makeLightNormalCozyOverrides = theme => ({
14
- MuiSelect: {
15
- iconOutlined: {
16
- top: 'auto',
17
- right: 14
18
- },
19
- outlined: {
20
- '&&': {
21
- paddingRight: 39
22
- }
23
- }
24
- },
25
- MuiOutlinedInput: {
26
- root: {
27
- borderRadius: 4,
28
- '&$disabled': {
29
- background: theme.palette.background.contrast
30
- },
31
- '&$focused $notchedOutline': {
32
- borderWidth: '0.0625rem'
33
- },
34
- '&$error $notchedOutline': {
35
- borderColor: alpha(
36
- theme.palette.error.main,
37
- theme.palette.border.opacity
38
- )
39
- },
40
- '&$focused&$error $notchedOutline': {
41
- borderColor: theme.palette.error.main
42
- },
43
- '&:hover $notchedOutline': {
44
- borderColor: theme.palette.text.hint
45
- },
46
- '&:hover&$error $notchedOutline': {
47
- borderColor: theme.palette.error.main
48
- }
49
- },
50
- notchedOutline: {
51
- borderColor: theme.palette.border.main,
52
- transition: `border-color ${theme.transitions.duration.shorter}ms`
53
- },
54
- input: {
55
- textAlign: 'left',
56
- padding: '18.5px 16px'
57
- },
58
- inputMarginDense: {
59
- paddingTop: 14,
60
- paddingBottom: 15
61
- }
62
- },
63
- MuiInputLabel: {
64
- outlined: {
65
- '&$marginDense': {
66
- transform: 'translate(14px, 14px) scale(1)'
67
- },
68
- '&:not($shrink)': {
69
- '&$error': {
70
- color: theme.palette.text.secondary
71
- }
72
- }
73
- }
74
- },
75
- MuiToggleButtonGroup: {
76
- groupedHorizontal: {
77
- '&.rounded': {
78
- marginRight: 12,
79
- '&:last-child': {
80
- marginRight: 0
81
- },
82
- '&:not(:first-child)': {
83
- borderTopLeftRadius: 'inherit',
84
- borderBottomLeftRadius: 'inherit',
85
- marginLeft: 'inherit',
86
- borderLeft: 'inherit'
87
- },
88
- '&:not(:last-child)': {
89
- '&.rounded': {
90
- borderTopRightRadius: 'inherit',
91
- borderBottomRightRadius: 'inherit'
92
- }
93
- }
94
- }
95
- }
96
- },
97
- MuiToggleButton: {
98
- root: {
99
- borderRadius: 0,
100
- color: theme.palette.text.secondary,
101
- border: `1px solid ${theme.palette.border.main}`,
102
- padding: 15,
103
- '&$selected': {
104
- color: theme.palette.text.primary,
105
- backgroundColor: 'transparent',
106
- '&:not($disabled)': {
107
- '&.customColor': {
108
- '&-primary': {
109
- color: theme.palette.primary.main
110
- }
111
- }
112
- }
113
- },
114
- '&$disabled': {
115
- color: theme.palette.text.disabled
116
- },
117
- '&.rounded': {
118
- border: 0,
119
- borderRadius: theme.shape.borderRadius,
120
- padding: '10px 12px',
121
- '&$selected': {
122
- backgroundColor: theme.palette.action.selected,
123
- '&:not($disabled)': {
124
- '&.customColor': {
125
- '&-primary': {
126
- color: theme.palette.text.primary,
127
- backgroundColor: alpha(
128
- theme.palette.primary.main,
129
- theme.palette.action.selectedOpacity
130
- ),
131
- '&:hover': {
132
- textDecoration: 'none',
133
- backgroundColor: alpha(
134
- theme.palette.primary.main,
135
- theme.palette.action.activatedOpacity
136
- ),
137
- '@media (hover: none)': {
138
- backgroundColor: 'transparent'
139
- }
140
- }
141
- }
142
- }
143
- }
144
- }
145
- }
146
- },
147
- sizeSmall: {
148
- padding: 11,
149
- '&.rounded': {
150
- padding: '7px 10px'
151
- }
152
- },
153
- sizeLarge: {
154
- padding: 19,
155
- '&.rounded': {
156
- padding: 12
157
- }
158
- }
159
- },
160
- MuiButton: {
161
- root: {
162
- borderRadius: 2,
163
- lineHeight: 'normal',
164
- padding: '0 1rem',
165
- '&.customSize': {
166
- '&-default': {
167
- height: '2.5rem'
168
- },
169
- '&-auto': {
170
- minHeight: '2.5rem'
171
- }
172
- },
173
- '&.ghost': {
174
- borderStyle: 'dashed !important', // important needed to override disable state
175
- '&:hover': {
176
- borderStyle: 'dashed !important' // important needed to override disable state
177
- }
178
- }
179
- },
180
- sizeSmall: {
181
- padding: '0 0.75rem',
182
- '&.customSize': {
183
- '&-default': {
184
- height: '2rem'
185
- },
186
- '&-auto': {
187
- minHeight: '2rem'
188
- }
189
- },
190
- '&$text': {
191
- padding: '8px 6px'
192
- }
193
- },
194
- sizeLarge: {
195
- padding: '0 1.25rem',
196
- '&.customSize': {
197
- '&-default': {
198
- height: '3rem'
199
- },
200
- '&-auto': {
201
- minHeight: '3rem'
202
- }
203
- },
204
- '&$text': {
205
- padding: '14px 10px'
206
- }
207
- },
208
- text: {
209
- minWidth: 'auto',
210
- padding: '11px 8px',
211
- '&:not($disabled)': {
212
- '&.customColor': {
213
- '&-success': makeTextButtonStyle(theme, 'success'),
214
- '&-warning': makeTextButtonStyle(theme, 'warning'),
215
- '&-error': makeTextButtonStyle(theme, 'error'),
216
- '&-info': makeTextButtonStyle(theme, 'info')
217
- }
218
- }
219
- },
220
- outlined: {
221
- '&:not($disabled)': {
222
- '&.ghost': {
223
- backgroundColor: alpha(
224
- theme.palette.primary.main,
225
- theme.palette.action.ghostOpacity
226
- ),
227
- '&:hover': {
228
- backgroundColor: alpha(
229
- theme.palette.primary.main,
230
- theme.palette.action.hoverGhostOpacity
231
- ),
232
- '@media (hover: none)': {
233
- backgroundColor: alpha(
234
- theme.palette.primary.main,
235
- theme.palette.action.ghostOpacity
236
- )
237
- }
238
- }
239
- },
240
- '&.customColor': {
241
- '&-primary': {
242
- color: theme.palette.text.primary,
243
- borderColor: theme.palette.border.main,
244
- '&:hover': {
245
- backgroundColor: theme.palette.action.hover,
246
- '@media (hover: none)': {
247
- backgroundColor: 'transparent'
248
- }
249
- },
250
- '&.ghost': {
251
- color: theme.palette.primary.main,
252
- borderColor: alpha(
253
- theme.palette.primary.main,
254
- theme.palette.border.ghostOpacity
255
- )
256
- }
257
- },
258
- '&-success': makeSecondaryButtonStyle(theme, 'success'),
259
- '&-warning': makeSecondaryButtonStyle(theme, 'warning'),
260
- '&-error': makeSecondaryButtonStyle(theme, 'error'),
261
- '&-info': makeSecondaryButtonStyle(theme, 'info')
262
- }
263
- }
264
- },
265
- contained: {
266
- boxShadow: 0,
267
- '&:not($disabled)': {
268
- '&.customColor': {
269
- '&-success': makeContainedButtonStyle(theme, 'success'),
270
- '&-warning': makeContainedButtonStyle(theme, 'warning'),
271
- '&-error': makeContainedButtonStyle(theme, 'error'),
272
- '&-info': makeContainedButtonStyle(theme, 'info')
273
- }
274
- }
275
- },
276
- startIcon: {
277
- // !important needed to override all sizes
278
- // should be remove when https://github.com/cozy/cozy-ui/issues/1808 is fixed
279
- marginLeft: '0 !important'
280
- }
281
- },
282
- MuiTabs: {
283
- root: {
284
- '&.segmented': {
285
- borderRadius: '99px',
286
- backgroundColor: theme.palette.background.contrast,
287
- overflow: 'visible',
288
- minHeight: '2.5rem',
289
- '& $indicator': {
290
- top: '1px',
291
- height: 'calc(100% - 2px)',
292
- transform: 'scale(0.99)',
293
- borderRadius: '99px',
294
- zIndex: 0,
295
- boxShadow: theme.shadows[1],
296
- backgroundColor: theme.palette.background.paper
297
- },
298
- '& $fixed': {
299
- overflow: 'visible !important'
300
- },
301
- '& $scrollButtons': {
302
- borderRadius: '99px'
303
- }
304
- }
305
- }
306
- },
307
- MuiTab: {
308
- root: {
309
- ...theme.typography.subtitle2,
310
- '&:hover': {
311
- color: theme.palette.text.primary,
312
- opacity: 1
313
- },
314
- '&:focus': {
315
- color: theme.palette.text.primary
316
- },
317
- '&.narrowed': {
318
- minWidth: 'auto',
319
- [theme.breakpoints.up('sm')]: {
320
- minWidth: 'auto'
321
- }
322
- },
323
- '&.segmented': {
324
- ...theme.typography.body2,
325
- textTransform: 'initial',
326
- zIndex: 1,
327
- borderRadius: '99px',
328
- minHeight: '2.5rem',
329
- '&$selected': {
330
- color: theme.palette.text.primary
331
- }
332
- }
333
- }
334
- },
335
- MuiAccordion: {
336
- rounded: {
337
- borderRadius: theme.shape.borderRadius
338
- },
339
- root: {
340
- boxShadow: '0 4px 12px 0 rgba(0, 0, 0, 0.08)',
341
- borderWidth: '0.0625rem',
342
- borderStyle: 'solid',
343
- borderColor: theme.palette.border.main,
344
- overflow: 'hidden',
345
- marginBottom: '1rem'
346
- }
347
- },
348
- MuiAccordionSummary: {
349
- expanded: {},
350
- root: {
351
- backgroundColor: theme.palette.grey[100],
352
- textTransform: 'uppercase',
353
- fontWeight: 'bold',
354
- fontSize: '0.875rem',
355
- minHeight: '3.5rem',
356
- padding: 0,
357
- color: theme.palette.text.primary,
358
- '&$expanded': {
359
- minHeight: '3.5rem'
360
- }
361
- },
362
- expandIcon: {
363
- order: 0,
364
- '&&': {
365
- marginLeft: '0.3125rem'
366
- },
367
- transform: 'rotate(-90deg)',
368
- '&$expanded': {
369
- marginLeft: '0.3125rem',
370
- transform: 'rotate(0)'
371
- }
372
- },
373
- content: {
374
- margin: '0.75rem 0',
375
- paddingLeft: '0.5rem',
376
- paddingRight: '0.25rem',
377
- order: 1,
378
- '& > :last-child': {
379
- paddingRight: 0
380
- },
381
- '&$expanded': {
382
- margin: '0.75rem 0'
383
- }
384
- }
385
- },
386
- MuiAccordionDetails: {
387
- root: {
388
- padding: 0,
389
- borderTop: `0.0625rem solid ${theme.palette.border.main}`
390
- }
391
- },
392
- MuiStepConnector: {
393
- line: {
394
- borderColor: theme.palette.divider
395
- }
396
- },
397
- MuiStepContent: {
398
- root: {
399
- borderColor: theme.palette.divider
400
- }
401
- },
402
- MuiStepLabel: {
403
- label: {
404
- ...theme.typography.body1,
405
- '&$active': {
406
- ...theme.typography.h6
407
- },
408
- '&$completed': {
409
- ...theme.typography.h6
410
- }
411
- }
412
- },
413
- MuiListItemIcon: {
414
- root: {
415
- minWidth: 'auto',
416
- width: 32,
417
- height: 32,
418
- alignItems: 'center',
419
- justifyContent: 'center',
420
- color: theme.palette.text.icon
421
- }
422
- },
423
- MuiListItem: {
424
- root: {
425
- gap: 16,
426
- paddingTop: 12,
427
- paddingBottom: 12,
428
- minHeight: 56,
429
- '&.small': {
430
- paddingTop: 8,
431
- paddingBottom: 8,
432
- minHeight: 48
433
- },
434
- '&.large': {
435
- paddingTop: 16,
436
- paddingBottom: 16,
437
- minHeight: 64
438
- },
439
- '&.cozyActionsItem': {
440
- wordBreak: 'break-word'
441
- }
442
- },
443
- dense: {
444
- paddingTop: 8,
445
- paddingBottom: 8,
446
- minHeight: 48,
447
- '&.small': {
448
- paddingTop: 4,
449
- paddingBottom: 4,
450
- minHeight: 40
451
- },
452
- '&.large': {
453
- paddingTop: 12,
454
- paddingBottom: 12,
455
- minHeight: 56
456
- }
457
- }
458
- },
459
- MuiListSubheader: {
460
- root: {
461
- ...theme.typography.subtitle2,
462
- paddingBottom: 8,
463
- paddingTop: 8,
464
- marginBottom: '0.5rem',
465
- backgroundColor: theme.palette.background.contrast
466
- },
467
- sticky: {
468
- backgroundColor: theme.palette.background.default
469
- }
470
- },
471
- MuiListItemText: {
472
- root: {
473
- marginTop: 1,
474
- marginBottom: 1
475
- },
476
- multiline: {
477
- marginTop: 1,
478
- marginBottom: 1
479
- },
480
- secondary: {
481
- marginTop: 1
482
- }
483
- },
484
- MuiListItemSecondaryAction: {
485
- root: {
486
- right: 0
487
- }
488
- },
489
- MuiMenu: {
490
- paper: {
491
- maxWidth: 320
492
- }
493
- },
494
- MuiMenuItem: {
495
- root: {
496
- whiteSpace: 'normal',
497
- overflow: 'auto',
498
- wordBreak: 'break-word',
499
- paddingTop: 4,
500
- paddingBottom: 4,
501
- [theme.breakpoints.up('sm')]: {
502
- minHeight: 40
503
- },
504
- '&.cozyActionsItem': {
505
- minWidth: 256
506
- },
507
- '& .cozyListItemIcon': {
508
- width: 16,
509
- height: 16
510
- }
511
- },
512
- gutters: {
513
- paddingLeft: 16,
514
- paddingRight: 16
515
- }
516
- },
517
- MuiFormLabel: {
518
- root: {
519
- color: theme.palette.text.secondary,
520
- '&$disabled&$error': {
521
- color: theme.palette.text.disabled
522
- }
523
- }
524
- },
525
- MuiFormHelperText: {
526
- root: {
527
- fontStyle: 'italic',
528
- fontSize: '0.875rem',
529
- marginTop: 4,
530
- '&$disabled&$error': {
531
- color: theme.palette.text.disabled
532
- }
533
- }
534
- },
535
- MuiDialog: {
536
- paper: {
537
- '&.small': {
538
- width: '480px',
539
- maxWidth: '480px',
540
- [theme.breakpoints.down('md')]: {
541
- margin: '16px',
542
- padding: '0 8px 8px',
543
- height: 'auto',
544
- maxHeight: 'calc(100% - 32px)',
545
- borderRadius: '6px',
546
- '& .divider--dialog': {
547
- marginLeft: '-8px',
548
- marginRight: '-8px'
549
- }
550
- }
551
- },
552
- '&.medium': {
553
- [theme.breakpoints.up('md')]: {
554
- width: '544px',
555
- maxWidth: '544px'
556
- }
557
- },
558
- '&.large': {
559
- [theme.breakpoints.up('md')]: {
560
- width: '800px',
561
- maxWidth: '800px'
562
- }
563
- },
564
- '&.full': {
565
- width: '100%',
566
- maxWidth: '100%'
567
- }
568
- },
569
- scrollPaper: {
570
- '&.alignTop': {
571
- alignItems: 'start'
572
- }
573
- },
574
- paperFullScreen: {
575
- '& .cozyDialogActions': {
576
- paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar(
577
- 'bottom'
578
- )})`
579
- },
580
- // Can't do that within the stylus file because we need to only target
581
- // the fullscreen dialog
582
- '& [class*="DialogCloseButton"]': {
583
- transform: `translateY(${getFlagshipCssVar('top')})`
584
- },
585
- '& [class*="DialogBackButton"]': {
586
- transform: `translateY(${getFlagshipCssVar('top')})`
587
- },
588
- // 0.75rm === MuiDialogTitle.root.sm
589
- // we should not target specifically flagship-app since
590
- // we should only rely on the css var. But this is for
591
- // another time.
592
- '.flagship-app & .cozyDialogTitle': {
593
- paddingTop: `calc(${getFlagshipCssVar('top')} + 0.75rem) !important`
594
- },
595
- '.flagship-app & .cozyDialogContent': {
596
- marginBottom: `${getFlagshipCssVar('bottom')} !important`
597
- }
598
- }
599
- },
600
- MuiDialogTitle: {
601
- root: {
602
- ...theme.typography.h3,
603
- boxSizing: 'border-box',
604
- width: '100%',
605
- padding: '1.5rem 2rem',
606
- [theme.breakpoints.down('sm')]: {
607
- ...theme.typography.h4,
608
- padding: '0.75rem 1rem'
609
- },
610
- '&.dialogTitleWithBack': {
611
- paddingLeft: '4rem', // padding base (2rem) + buttonWidth (1rem) + buttonMargin (1rem)
612
- [theme.breakpoints.down('sm')]: {
613
- paddingLeft: '3rem' // padding base (1rem) + buttonWidth (1rem) + buttonMargin (1rem)
614
- }
615
- },
616
- '&.dialogTitleWithClose': {
617
- paddingRight: '4rem', // padding base (2rem) + buttonWidth (1rem) + buttonMargin (1rem)
618
- [theme.breakpoints.down('sm')]: {
619
- paddingRight: '3rem' // padding base (1rem) + buttonWidth (1rem) + buttonMargin (1rem)
620
- }
621
- },
622
- '&.dialogTitleFluid': {
623
- paddingTop: 0
624
- }
625
- }
626
- },
627
- MuiDialogContent: {
628
- root: {
629
- padding: '24px 32px 0',
630
- [theme.breakpoints.down('sm')]: {
631
- padding: '24px 16px 0'
632
- },
633
- '&.disableGutters': {
634
- padding: 0,
635
- '& .dialogContentInner': {
636
- marginBottom: 0
637
- },
638
- '& .dialogTitleFluidContainer': {
639
- marginLeft: 0,
640
- marginRight: 0,
641
- marginTop: 0
642
- }
643
- },
644
- '& .dialogContentInner': {
645
- marginBottom: '24px',
646
- '&.withFluidActions': {
647
- [theme.breakpoints.down('sm')]: {
648
- marginBottom: 0,
649
- display: 'flex',
650
- flexDirection: 'column',
651
- height: '100%',
652
- '& .dialogContentWrapper': {
653
- flexGrow: 1,
654
- '&:not(.withActions)': {
655
- paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar(
656
- 'bottom'
657
- )} + 16px)`
658
- }
659
- },
660
- '& .cozyDialogActions': {
661
- paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar(
662
- 'bottom'
663
- )} + 16px)`
664
- }
665
- }
666
- },
667
- '& .dialogTitleFluidContainer': {
668
- marginLeft: '-2rem',
669
- marginRight: '-2rem',
670
- [theme.breakpoints.down('sm')]: {
671
- marginLeft: '-1rem',
672
- marginRight: '-1rem',
673
- marginTop: '-0.75rem'
674
- }
675
- }
676
- }
677
- }
678
- },
679
- MuiDialogActions: {
680
- root: {
681
- margin: '16px 32px',
682
- padding: 0,
683
- [theme.breakpoints.down('sm')]: {
684
- margin: '8px 16px',
685
- '& button': {
686
- flexGrow: 1
687
- }
688
- },
689
- '&.dialogActionsFluid': {
690
- margin: '24px 0 0'
691
- },
692
- '&.columnLayout': {
693
- display: 'flex',
694
- flexDirection: 'column-reverse',
695
- '& button': {
696
- width: '100%',
697
- margin: 0,
698
- '&:not(:first-child)': {
699
- marginBottom: '8px'
700
- }
701
- }
702
- },
703
-
704
- // To keep muiV3 behavior
705
- // TODO check later if we need this behavior
706
- '&:not(.columnLayout) > :not(:first-child):not(:first-child)': {
707
- marginLeft: 4
708
- }
709
- }
710
- },
711
- MuiDivider: {
712
- inset: {
713
- marginLeft: 64,
714
- '&.divider--dialog': {
715
- marginLeft: 80
716
- }
717
- }
718
- },
719
- MuiAvatarGroup: {
720
- avatar: {
721
- border: `2px solid ${theme.palette.background.paper}`
722
- }
723
- },
724
- MuiAvatar: {
725
- root: {
726
- fontWeight: 600,
727
- '&.size': {
728
- '&-xs': {
729
- width: 16,
730
- height: 16,
731
- fontSize: 8,
732
- '& svg': {
733
- width: 8,
734
- height: 8
735
- }
736
- },
737
- '&-s': {
738
- width: 24,
739
- height: 24,
740
- fontSize: 12,
741
- '& svg': {
742
- width: 12,
743
- height: 12
744
- }
745
- },
746
- '&-m': {
747
- width: 32,
748
- height: 32,
749
- fontSize: 16,
750
- '& svg': {
751
- width: 16,
752
- height: 16
753
- }
754
- },
755
- '&-l': {
756
- width: 48,
757
- height: 48,
758
- fontSize: 24,
759
- '& svg': {
760
- width: 24,
761
- height: 24
762
- }
763
- },
764
- '&-xl': {
765
- width: 64,
766
- height: 64,
767
- fontSize: 32,
768
- '& svg': {
769
- width: 32,
770
- height: 32
771
- }
772
- }
773
- },
774
- '&.disabled': {
775
- color: theme.palette.primary.contrastText,
776
- background: 'var(--silver)', // should be semantic but used legacy component color for now
777
- '& img': {
778
- filter: 'grayscale(1) brightness(2)',
779
- opacity: 0.5
780
- }
781
- },
782
- '&.border': {
783
- border: `2px solid ${theme.palette.background.paper}`
784
- },
785
- '&.innerBorder': {
786
- boxShadow: `inset 0px 0px 0px 1px ${theme.palette.border.main}`
787
- }
788
- }
789
- },
790
- MuiCheckbox: {
791
- colorSecondary: {
792
- '&$checked': {
793
- color: theme.palette.error.main
794
- }
795
- }
796
- },
797
- MuiSwitch: {
798
- checked: {
799
- '& + $track$track': {
800
- opacity: 1
801
- }
802
- },
803
- switchBase: {
804
- top: 1,
805
- '&$checked': {
806
- transform: 'translateX(15px)'
807
- }
808
- },
809
- thumb: {
810
- width: 16,
811
- height: 16,
812
- backgroundColor: theme.palette.common.white
813
- },
814
- track: {
815
- width: SWITCH_BAR_WIDTH,
816
- height: 12,
817
- opacity: 1,
818
- backgroundColor: theme.palette.text.disabled
819
- },
820
- colorSecondary: {
821
- '&$checked': {
822
- '& + $track': {
823
- backgroundColor: theme.palette.success.main
824
- }
825
- }
826
- },
827
- disabled: {
828
- '&$checked + $track': {
829
- backgroundColor: `${theme.palette.grey[200]} !important`
830
- },
831
- '& $thumb': {
832
- backgroundColor: theme.palette.common.white
833
- }
834
- }
835
- },
836
- MuiTooltip: {
837
- tooltip: {
838
- borderRadius: '8px',
839
- fontSize: '1rem',
840
- lineHeight: '1.3',
841
- padding: '16px'
842
- }
843
- },
844
- MuiIconButton: {
845
- root: {
846
- color: theme.palette.text.secondary,
847
- '&.small': {
848
- padding: 3
849
- },
850
- '&.medium': {
851
- padding: 12
852
- },
853
- '&.large': {
854
- padding: 16
855
- },
856
- '&.dialogIconButton': {
857
- backgroundColor: theme.palette.background.paper,
858
- '&:hover': {
859
- backgroundColor: theme.palette.action.selected
860
- }
861
- },
862
- '&.cozyStyles': {
863
- '&-error': {
864
- color: theme.palette.error.main,
865
- '&:hover': {
866
- backgroundColor: alpha(
867
- theme.palette.error.main,
868
- theme.palette.action.hoverOpacity
869
- ),
870
- '@media (hover: none)': {
871
- backgroundColor: 'transparent'
872
- }
873
- }
874
- }
875
- }
876
- }
877
- },
878
- MuiBadge: {
879
- badge: {
880
- boxSizing: 'content-box',
881
- padding: 0,
882
- borderRadius: '100%',
883
- '&.badgeBorder': {
884
- border: `2px solid ${theme.palette.background.paper}`
885
- },
886
- '&.badgeSizeLarge': {
887
- fontSize: '.6875rem',
888
- height: '1rem',
889
- minWidth: '1rem'
890
- },
891
- '&.badgeSizeMedium': {
892
- height: '.875rem',
893
- minWidth: '.875rem',
894
- fontSize: '.625rem'
895
- },
896
- '&.badgeSizeSmall': {
897
- height: '.75rem',
898
- minWidth: '.75rem',
899
- fontSize: '.5rem'
900
- }
901
- },
902
- colorPrimary: {
903
- '&.colorSuccess': {
904
- backgroundColor: theme.palette.success.main,
905
- color: theme.palette.success.contrastText
906
- },
907
- '&.colorWarning': {
908
- backgroundColor: theme.palette.warning.main,
909
- color: theme.palette.warning.contrastText
910
- },
911
- '&.colorInfo': {
912
- backgroundColor: theme.palette.info.main,
913
- color: theme.palette.info.contrastText
914
- }
915
- },
916
- anchorOriginTopRightRectangular: {
917
- transform: 'scale(1) translate(37%, -37%)'
918
- },
919
- anchorOriginBottomRightRectangular: {
920
- transform: 'scale(1) translate(37%, 37%)'
921
- },
922
- anchorOriginBottomLeftRectangular: {
923
- transform: 'scale(1) translate(-37%, 37%)'
924
- },
925
- anchorOriginTopLeftRectangular: {
926
- transform: 'scale(1) translate(-37%, -37%)'
927
- },
928
- dot: {
929
- borderRadius: '100%',
930
- padding: 0,
931
- '&.badgeSizeLarge': {
932
- height: '.625rem',
933
- minWidth: '.625rem'
934
- },
935
- '&.badgeSizeMedium': {
936
- height: '.5rem',
937
- minWidth: '.5rem'
938
- },
939
- '&.badgeSizeSmall': {
940
- height: '.375rem',
941
- minWidth: '.375rem'
942
- }
943
- }
944
- },
945
- MuiRadio: {
946
- root: {
947
- padding: '12px',
948
- '&$disabled svg': {
949
- borderRadius: '50%',
950
- backgroundColor: theme.palette.background.contrast,
951
- fill: theme.palette.border.disabled
952
- },
953
- '&:not($checked) svg': {
954
- fill: theme.palette.border.main
955
- }
956
- },
957
- colorPrimary: {
958
- '&$checked svg': {
959
- fill: theme.palette.primary.main
960
- },
961
- '&$disabled&$checked svg': {
962
- fill: theme.palette.text.disabled
963
- }
964
- },
965
- colorSecondary: {
966
- '&$checked svg': {
967
- fill: theme.palette.error.main
968
- },
969
- '&$disabled&$checked svg': {
970
- fill: theme.palette.text.disabled
971
- }
972
- }
973
- },
974
- MuiChip: {
975
- root: {
976
- '&.noLabel': {
977
- width: '32px',
978
- '& $label': {
979
- display: 'none'
980
- },
981
- '& $icon': {
982
- margin: 0
983
- }
984
- },
985
- '&.customColor': {
986
- '&-primary': makeChipStyleByColor(theme, 'primary'),
987
- '&-success': makeChipStyleByColor(theme, 'success'),
988
- '&-error': makeChipStyleByColor(theme, 'error'),
989
- '&-warning': makeChipStyleByColor(theme, 'warning'),
990
- '&-info': makeChipStyleByColor(theme, 'info')
991
- }
992
- }
993
- },
994
- MuiAlert: {
995
- root: {
996
- padding: '8px 16px',
997
- '&.cozyStyles': {
998
- '&-primary': makeAlertColor(theme, 'primary'),
999
- '&-secondary': makeAlertColor(theme, 'secondary'),
1000
- '&-success': makeAlertColor(theme, 'success'),
1001
- '&-error': makeAlertColor(theme, 'error'),
1002
- '&-warning': makeAlertColor(theme, 'warning'),
1003
- '&-info': makeAlertColor(theme, 'info')
1004
- },
1005
- '& $icon': {
1006
- paddingTop: '9px'
1007
- },
1008
- '&.block': {
1009
- flexWrap: 'wrap',
1010
- '& $action': {
1011
- width: '100%',
1012
- paddingLeft: 0,
1013
- justifyContent: 'end'
1014
- }
1015
- }
1016
- },
1017
- message: {
1018
- flex: 'auto',
1019
- display: 'flex',
1020
- alignItems: 'center',
1021
- flexWrap: 'wrap'
1022
- },
1023
- action: {
1024
- marginRight: '-8px'
1025
- }
1026
- },
1027
- MuiAlertTitle: {
1028
- root: {
1029
- width: '100%',
1030
- fontWeight: 'bold'
1031
- }
1032
- },
1033
- MuiSnackbarContent: {
1034
- root: {
1035
- padding: '4px 12px',
1036
- backgroundColor: theme.palette.grey[600]
1037
- }
1038
- },
1039
- MuiFab: {
1040
- root: {
1041
- color: theme.palette.text.primary,
1042
- backgroundColor: theme.palette.background.paper,
1043
- '&:hover': {
1044
- backgroundColor: darken(theme.palette.background.paper, 0.05)
1045
- },
1046
- '@media (hover: none)': {
1047
- backgroundColor: theme.palette.background.paper
1048
- }
1049
- },
1050
- extended: {
1051
- borderRadius: 56 / 2,
1052
- height: 56,
1053
- minWidth: 56,
1054
- padding: '0 20px',
1055
- '&$sizeSmall': {
1056
- borderRadius: 40 / 2,
1057
- height: 40,
1058
- minWidth: 40,
1059
- padding: '0 12px'
1060
- },
1061
- '&$sizeMedium': {
1062
- borderRadius: 48 / 2,
1063
- height: 48,
1064
- minWidth: 48,
1065
- padding: '0 16px'
1066
- }
1067
- }
1068
- },
1069
- MuiMobileStepper: {
1070
- root: {
1071
- background: 'transparent',
1072
- height: 40,
1073
- padding: 0
1074
- },
1075
- dot: {
1076
- backgroundColor: 'transparent',
1077
- width: '10px',
1078
- height: '10px',
1079
- margin: '0 3px',
1080
- border: `1px solid ${theme.palette.border.main}`,
1081
- boxSizing: 'border-box'
1082
- },
1083
- dotActive: {
1084
- border: 'none'
1085
- }
1086
- }
1087
- })