@mui/docs 6.0.0-alpha.6 → 6.0.0-alpha.8

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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import ArrowDropDownRounded from '@mui/icons-material/ArrowDropDownRounded';
3
2
  import { createTheme, Theme, alpha } from '@mui/material/styles';
4
3
  // TODO: enable this once types conflict is fixed
@@ -94,57 +93,75 @@ export const getMetaThemeColor = mode => {
94
93
  return themeColor[mode];
95
94
  };
96
95
  export const getDesignTokens = mode => ({
97
- palette: _extends({
98
- primary: _extends({}, blue, mode === 'dark' && {
99
- main: blue[400]
100
- }),
101
- secondary: _extends({}, grey, mode === 'light' && {
102
- main: blueDark[100],
103
- contrastText: blueDark[600]
104
- }, mode === 'dark' && {
105
- main: blueDark[700],
106
- contrastText: blueDark[600]
107
- }),
96
+ palette: {
97
+ primary: {
98
+ ...blue,
99
+ ...(mode === 'dark' && {
100
+ main: blue[400]
101
+ })
102
+ },
103
+ secondary: {
104
+ ...grey,
105
+ ...(mode === 'light' && {
106
+ main: blueDark[100],
107
+ contrastText: blueDark[600]
108
+ }),
109
+ ...(mode === 'dark' && {
110
+ main: blueDark[700],
111
+ contrastText: blueDark[600]
112
+ })
113
+ },
108
114
  divider: mode === 'dark' ? alpha(blueDark[500], 0.3) : grey[100],
109
115
  primaryDark: blueDark,
110
- mode
111
- }, mode === 'dark' && {
112
- background: {
113
- default: blueDark[900],
114
- paper: alpha(blueDark[800], 0.8)
115
- }
116
- }, {
116
+ mode,
117
+ ...(mode === 'dark' && {
118
+ background: {
119
+ default: blueDark[900],
120
+ paper: alpha(blueDark[800], 0.8)
121
+ }
122
+ }),
117
123
  common: {
118
124
  black: 'hsl(200, 10%, 4%)'
119
125
  },
120
- text: _extends({}, mode === 'light' && {
121
- primary: grey[900],
122
- secondary: grey[800],
123
- tertiary: grey[700]
124
- }, mode === 'dark' && {
125
- primary: '#fff',
126
- secondary: grey[400],
127
- tertiary: grey[500]
128
- }),
129
- grey: _extends({}, grey, mode === 'light' && {
130
- main: grey[100],
131
- contrastText: grey[600]
132
- }, mode === 'dark' && {
133
- main: grey[700],
134
- contrastText: grey[600]
135
- }),
126
+ text: {
127
+ ...(mode === 'light' && {
128
+ primary: grey[900],
129
+ secondary: grey[800],
130
+ tertiary: grey[700]
131
+ }),
132
+ ...(mode === 'dark' && {
133
+ primary: '#fff',
134
+ secondary: grey[400],
135
+ tertiary: grey[500]
136
+ })
137
+ },
138
+ grey: {
139
+ ...grey,
140
+ ...(mode === 'light' && {
141
+ main: grey[100],
142
+ contrastText: grey[600]
143
+ }),
144
+ ...(mode === 'dark' && {
145
+ main: grey[700],
146
+ contrastText: grey[600]
147
+ })
148
+ },
136
149
  error,
137
- success: _extends({}, success, mode === 'dark' && {
138
- main: success[600]
139
- }, mode === 'light' && {
140
- main: success[700]
141
- }),
150
+ success: {
151
+ ...success,
152
+ ...(mode === 'dark' && {
153
+ main: success[600]
154
+ }),
155
+ ...(mode === 'light' && {
156
+ main: success[700]
157
+ })
158
+ },
142
159
  warning,
143
160
  gradients: {
144
161
  radioSubtle: mode === 'dark' ? `radial-gradient(100% 100% at 100% 100%, transparent 0, ${alpha(blue[900], 0.3)} 300%)` : `radial-gradient(100% 90% at 50% 0, transparent 0, ${alpha(blue[100], 0.3)} 300%)`,
145
162
  linearSubtle: mode === 'dark' ? `linear-gradient(0deg, ${alpha(blue[900], 0.1)}, ${alpha(blueDark[900], 0.5)})` : `linear-gradient(0deg, ${alpha(blue[50], 0.4)}, ${alpha(grey[50], 0.1)})`
146
163
  }
147
- }),
164
+ },
148
165
  shape: {
149
166
  borderRadius: 12
150
167
  },
@@ -166,15 +183,16 @@ export const getDesignTokens = mode => ({
166
183
  fontFamilySystem: systemFont.join(','),
167
184
  fontWeightSemiBold: 600,
168
185
  fontWeightExtraBold: 800,
169
- h1: _extends({
186
+ h1: {
170
187
  fontFamily: ['"General Sans"', ...systemFont].join(','),
171
188
  fontSize: 'clamp(2.5rem, 1.125rem + 3.5vw, 3.5em)',
172
189
  fontWeight: 600,
173
190
  lineHeight: 78 / 70,
174
- letterSpacing: -0.2
175
- }, mode === 'light' && {
176
- color: blueDark[900]
177
- }),
191
+ letterSpacing: -0.2,
192
+ ...(mode === 'light' && {
193
+ color: blueDark[900]
194
+ })
195
+ },
178
196
  h2: {
179
197
  fontFamily: ['"General Sans"', ...systemFont].join(','),
180
198
  fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)',
@@ -350,107 +368,118 @@ export function getThemedComponents() {
350
368
  root: ({
351
369
  theme,
352
370
  ownerState
353
- }) => _extends({
354
- transition: 'all 120ms ease-in'
355
- }, ownerState.size === 'large' && _extends({}, theme.typography.body1, {
356
- lineHeight: 21 / 16,
357
- padding: theme.spacing('8px', '10px', '10px', '12px'),
358
- fontWeight: theme.typography.fontWeightSemiBold,
359
- borderRadius: 10,
360
- '& > span': {
361
- transition: '0.2s',
362
- marginLeft: 4
363
- },
364
- '&:hover > span': {
365
- transform: 'translateX(2px)'
366
- }
367
- }), ownerState.size === 'medium' && {
368
- fontSize: defaultTheme.typography.pxToRem(15),
369
- padding: theme.spacing('8px', '12px', '8px', '14px'),
370
- fontWeight: theme.typography.fontWeightSemiBold,
371
- borderRadius: 8,
372
- '& > span': {
373
- transition: '0.2s',
374
- marginLeft: 4
375
- },
376
- '&:hover > span': {
377
- transform: 'translateX(2px)'
378
- }
379
- }, ownerState.size === 'small' && {
380
- padding: theme.spacing('6px', 1.5),
381
- fontFamily: theme.typography.fontFamily,
382
- fontSize: defaultTheme.typography.pxToRem(13),
383
- fontWeight: theme.typography.fontWeightSemiBold,
384
- borderRadius: 8,
385
- '& .MuiButton-startIcon': {
386
- transition: '0.15s',
387
- marginRight: 4,
388
- marginLeft: -1
389
- },
390
- '& .MuiButton-endIcon': {
391
- transition: '0.15s',
392
- marginLeft: 4
393
- },
394
- '&:hover': {
371
+ }) => ({
372
+ transition: 'all 120ms ease-in',
373
+ ...(ownerState.size === 'large' && {
374
+ ...theme.typography.body1,
375
+ lineHeight: 21 / 16,
376
+ padding: theme.spacing('8px', '10px', '10px', '12px'),
377
+ fontWeight: theme.typography.fontWeightSemiBold,
378
+ borderRadius: 10,
379
+ '& > span': {
380
+ transition: '0.2s',
381
+ marginLeft: 4
382
+ },
383
+ '&:hover > span': {
384
+ transform: 'translateX(2px)'
385
+ }
386
+ }),
387
+ ...(ownerState.size === 'medium' && {
388
+ fontSize: defaultTheme.typography.pxToRem(15),
389
+ padding: theme.spacing('8px', '12px', '8px', '14px'),
390
+ fontWeight: theme.typography.fontWeightSemiBold,
391
+ borderRadius: 8,
392
+ '& > span': {
393
+ transition: '0.2s',
394
+ marginLeft: 4
395
+ },
396
+ '&:hover > span': {
397
+ transform: 'translateX(2px)'
398
+ }
399
+ }),
400
+ ...(ownerState.size === 'small' && {
401
+ padding: theme.spacing('6px', 1.5),
402
+ fontFamily: theme.typography.fontFamily,
403
+ fontSize: defaultTheme.typography.pxToRem(13),
404
+ fontWeight: theme.typography.fontWeightSemiBold,
405
+ borderRadius: 8,
395
406
  '& .MuiButton-startIcon': {
396
- transform: 'translateX(-2px)'
407
+ transition: '0.15s',
408
+ marginRight: 4,
409
+ marginLeft: -1
397
410
  },
398
411
  '& .MuiButton-endIcon': {
399
- transform: 'translateX(2px)'
412
+ transition: '0.15s',
413
+ marginLeft: 4
414
+ },
415
+ '&:hover': {
416
+ '& .MuiButton-startIcon': {
417
+ transform: 'translateX(-2px)'
418
+ },
419
+ '& .MuiButton-endIcon': {
420
+ transform: 'translateX(2px)'
421
+ }
400
422
  }
401
- }
402
- }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && _extends({
403
- color: (theme.vars || theme).palette.text.primary,
404
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
405
- borderColor: (theme.vars || theme).palette.primaryDark[100],
406
- boxShadow: `${alpha(theme.palette.grey[50], 0.5)} 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -2px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
407
- '&:hover': {
408
- backgroundColor: (theme.vars || theme).palette.grey[50]
409
- }
410
- }, theme.applyDarkStyles({
411
- color: (theme.vars || theme).palette.primaryDark[100],
412
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
413
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
414
- boxShadow: `${alpha(theme.palette.primaryDark[600], 0.2)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
415
- '&:hover': {
416
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
417
- borderColor: (theme.vars || theme).palette.primaryDark[600]
418
- }
419
- })), ownerState.variant === 'outlined' && ownerState.color === 'primary' && _extends({
420
- color: (theme.vars || theme).palette.primary[600],
421
- backgroundColor: alpha(theme.palette.primary[50], 0.2),
422
- borderColor: (theme.vars || theme).palette.primary[100],
423
- boxShadow: `${alpha(theme.palette.primary[50], 0.8)} 0 2px 0 inset, ${alpha(theme.palette.primary[100], 0.4)} 0 -2px 0 inset, ${alpha(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
424
- '&:hover': {
425
- backgroundColor: (theme.vars || theme).palette.primary[50],
426
- borderColor: (theme.vars || theme).palette.primary[200]
427
- }
428
- }, theme.applyDarkStyles({
429
- color: (theme.vars || theme).palette.primary[200],
430
- borderColor: alpha(theme.palette.primary[900], 0.7),
431
- backgroundColor: alpha(theme.palette.primary[900], 0.2),
432
- boxShadow: `${alpha(theme.palette.primary[900], 0.2)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
433
- '&:hover': {
434
- backgroundColor: (theme.vars || theme).palette.primary[900],
435
- borderColor: (theme.vars || theme).palette.primary[700]
436
- }
437
- })), ownerState.variant === 'contained' && ownerState.color === 'primary' && {
438
- color: '#fff',
439
- textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
440
- backgroundColor: (theme.vars || theme).palette.primary[500],
441
- backgroundImage: `linear-gradient(180deg, ${alpha(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
442
- boxShadow: `${theme.palette.primary[400]} 0 2px 0 inset, ${theme.palette.primary[700]} 0 -2px 0 inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
443
- '&:hover': {
444
- backgroundColor: (theme.vars || theme).palette.primary[700]
445
- },
446
- '&:active': {
447
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
448
- }
449
- }, ownerState.variant === 'text' && _extends({
450
- color: (theme.vars || theme).palette.primary[600]
451
- }, theme.applyDarkStyles({
452
- color: (theme.vars || theme).palette.primary[300]
453
- })))
423
+ }),
424
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
425
+ color: (theme.vars || theme).palette.text.primary,
426
+ backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
427
+ borderColor: (theme.vars || theme).palette.primaryDark[100],
428
+ boxShadow: `${alpha(theme.palette.grey[50], 0.5)} 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -2px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
429
+ '&:hover': {
430
+ backgroundColor: (theme.vars || theme).palette.grey[50]
431
+ },
432
+ ...theme.applyDarkStyles({
433
+ color: (theme.vars || theme).palette.primaryDark[100],
434
+ borderColor: alpha(theme.palette.primaryDark[600], 0.5),
435
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
436
+ boxShadow: `${alpha(theme.palette.primaryDark[600], 0.2)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
437
+ '&:hover': {
438
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
439
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
440
+ }
441
+ })
442
+ }),
443
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'primary' && {
444
+ color: (theme.vars || theme).palette.primary[600],
445
+ backgroundColor: alpha(theme.palette.primary[50], 0.2),
446
+ borderColor: (theme.vars || theme).palette.primary[100],
447
+ boxShadow: `${alpha(theme.palette.primary[50], 0.8)} 0 2px 0 inset, ${alpha(theme.palette.primary[100], 0.4)} 0 -2px 0 inset, ${alpha(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
448
+ '&:hover': {
449
+ backgroundColor: (theme.vars || theme).palette.primary[50],
450
+ borderColor: (theme.vars || theme).palette.primary[200]
451
+ },
452
+ ...theme.applyDarkStyles({
453
+ color: (theme.vars || theme).palette.primary[200],
454
+ borderColor: alpha(theme.palette.primary[900], 0.7),
455
+ backgroundColor: alpha(theme.palette.primary[900], 0.2),
456
+ boxShadow: `${alpha(theme.palette.primary[900], 0.2)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
457
+ '&:hover': {
458
+ backgroundColor: (theme.vars || theme).palette.primary[900],
459
+ borderColor: (theme.vars || theme).palette.primary[700]
460
+ }
461
+ })
462
+ }),
463
+ ...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
464
+ color: '#fff',
465
+ textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
466
+ backgroundColor: (theme.vars || theme).palette.primary[500],
467
+ backgroundImage: `linear-gradient(180deg, ${alpha(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
468
+ boxShadow: `${theme.palette.primary[400]} 0 2px 0 inset, ${theme.palette.primary[700]} 0 -2px 0 inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
469
+ '&:hover': {
470
+ backgroundColor: (theme.vars || theme).palette.primary[700]
471
+ },
472
+ '&:active': {
473
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
474
+ }
475
+ }),
476
+ ...(ownerState.variant === 'text' && {
477
+ color: (theme.vars || theme).palette.primary[600],
478
+ ...theme.applyDarkStyles({
479
+ color: (theme.vars || theme).palette.primary[300]
480
+ })
481
+ })
482
+ })
454
483
  },
455
484
  variants: [{
456
485
  // @ts-ignore internal repo module augmentation issue
@@ -568,20 +597,21 @@ export function getThemedComponents() {
568
597
  },
569
598
  style: ({
570
599
  theme
571
- }) => _extends({
600
+ }) => ({
572
601
  marginBottom: 1,
573
602
  fontSize: theme.typography.pxToRem(14),
574
603
  fontWeight: theme.typography.fontWeightBold,
575
604
  color: (theme.vars || theme).palette.primary[600],
576
605
  '&:hover': {
577
606
  backgroundColor: (theme.vars || theme).palette.primary[50]
578
- }
579
- }, theme.applyDarkStyles({
580
- color: (theme.vars || theme).palette.primary[300],
581
- '&:hover': {
582
- backgroundColor: alpha(theme.palette.primary[800], 0.3)
583
- }
584
- }))
607
+ },
608
+ ...theme.applyDarkStyles({
609
+ color: (theme.vars || theme).palette.primary[300],
610
+ '&:hover': {
611
+ backgroundColor: alpha(theme.palette.primary[800], 0.3)
612
+ }
613
+ })
614
+ })
585
615
  }]
586
616
  },
587
617
  MuiIconButton: {
@@ -692,22 +722,24 @@ export function getThemedComponents() {
692
722
  styleOverrides: {
693
723
  paper: ({
694
724
  theme
695
- }) => _extends({
696
- boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)'
697
- }, theme.applyDarkStyles({
698
- boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
699
- }))
725
+ }) => ({
726
+ boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)',
727
+ ...theme.applyDarkStyles({
728
+ boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
729
+ })
730
+ })
700
731
  }
701
732
  },
702
733
  MuiDivider: {
703
734
  styleOverrides: {
704
735
  root: ({
705
736
  theme
706
- }) => _extends({
707
- borderColor: (theme.vars || theme).palette.grey[100]
708
- }, theme.applyDarkStyles({
709
- borderColor: alpha(theme.palette.primaryDark[500], 0.3)
710
- }))
737
+ }) => ({
738
+ borderColor: (theme.vars || theme).palette.grey[100],
739
+ ...theme.applyDarkStyles({
740
+ borderColor: alpha(theme.palette.primaryDark[500], 0.3)
741
+ })
742
+ })
711
743
  }
712
744
  },
713
745
  MuiLink: {
@@ -760,107 +792,131 @@ export function getThemedComponents() {
760
792
  variant
761
793
  },
762
794
  theme
763
- }) => _extends({
795
+ }) => ({
764
796
  fontWeight: theme.typography.fontWeightSemiBold,
765
- paddingBottom: 0.2
766
- }, variant === 'outlined' && color === 'default' && _extends({
767
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
768
- color: (theme.vars || theme).palette.grey[900],
769
- borderColor: (theme.vars || theme).palette.grey[200],
770
- '&:hover': {
771
- backgroundColor: (theme.vars || theme).palette.grey[100],
772
- color: (theme.vars || theme).palette.grey[900]
773
- }
774
- }, theme.applyDarkStyles({
775
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
776
- color: (theme.vars || theme).palette.grey[300],
777
- borderColor: alpha(theme.palette.primaryDark[500], 0.5),
778
- '&:hover': {
779
- color: (theme.vars || theme).palette.grey[300],
780
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
781
- }
782
- })), variant === 'outlined' && color === 'info' && _extends({
783
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
784
- color: (theme.vars || theme).palette.grey[900],
785
- borderColor: (theme.vars || theme).palette.grey[200]
786
- }, theme.applyDarkStyles({
787
- color: (theme.vars || theme).palette.grey[300],
788
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
789
- borderColor: (theme.vars || theme).palette.primaryDark[600]
790
- })), variant === 'outlined' && color === 'primary' && _extends({
791
- borderColor: (theme.vars || theme).palette.primary[100],
792
- backgroundColor: alpha(theme.palette.primary[100], 0.2)
793
- }, theme.applyDarkStyles({
794
- color: (theme.vars || theme).palette.primary[300],
795
- borderColor: alpha(theme.palette.primary[500], 0.2),
796
- backgroundColor: alpha(theme.palette.primary[700], 0.2)
797
- })), variant === 'outlined' && color === 'success' && _extends({
798
- borderColor: (theme.vars || theme).palette.success[100],
799
- backgroundColor: (theme.vars || theme).palette.success[50],
800
- color: (theme.vars || theme).palette.success[900]
801
- }, theme.applyDarkStyles({
802
- color: (theme.vars || theme).palette.success[300],
803
- borderColor: alpha(theme.palette.success[300], 0.2),
804
- background: alpha(theme.palette.success[800], 0.2)
805
- })), variant === 'filled' && _extends({}, color === 'default' && _extends({
806
- border: '1px solid transparent',
807
- color: (theme.vars || theme).palette.primary[700],
808
- backgroundColor: alpha(theme.palette.primary[100], 0.5),
809
- '&:hover': {
810
- backgroundColor: (theme.vars || theme).palette.primary[100]
811
- }
812
- }, theme.applyDarkStyles({
813
- color: '#fff',
814
- backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
815
- '&:hover': {
816
- backgroundColor: (theme.vars || theme).palette.primaryDark[600]
817
- }
818
- })), color === 'primary' && _extends({
819
- color: (theme.vars || theme).palette.primary[600],
820
- backgroundColor: alpha(theme.palette.primary[100], 0.4),
821
- '&:hover': {
822
- backgroundColor: (theme.vars || theme).palette.primary[100]
823
- },
824
- '& .MuiChip-deleteIcon': {
825
- color: (theme.vars || theme).palette.primary[600],
826
- '&:hover': {
827
- color: (theme.vars || theme).palette.primary[700]
828
- }
829
- },
830
- '&.Mui-focusVisible': {
831
- backgroundColor: (theme.vars || theme).palette.primary[200]
832
- }
833
- }, theme.applyDarkStyles({
834
- color: (theme.vars || theme).palette.primary[100],
835
- backgroundColor: alpha(theme.palette.primary[800], 0.5),
836
- '&:hover': {
837
- backgroundColor: alpha(theme.palette.primary[900], 0.5)
838
- },
839
- '& .MuiChip-deleteIcon': {
840
- color: (theme.vars || theme).palette.primary[100],
797
+ paddingBottom: 0.2,
798
+ ...(variant === 'outlined' && color === 'default' && {
799
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
800
+ color: (theme.vars || theme).palette.grey[900],
801
+ borderColor: (theme.vars || theme).palette.grey[200],
841
802
  '&:hover': {
842
- color: (theme.vars || theme).palette.primary[50]
843
- }
844
- }
845
- }))), variant === 'light' && _extends({}, color === 'default' && _extends({
846
- color: (theme.vars || theme).palette.primary[700],
847
- backgroundColor: alpha(theme.palette.primary[100], 0.3)
848
- }, theme.applyDarkStyles({
849
- color: (theme.vars || theme).palette.primary[200],
850
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
851
- })), color === 'warning' && _extends({
852
- color: (theme.vars || theme).palette.warning[900],
853
- backgroundColor: (theme.vars || theme).palette.warning[100]
854
- }, theme.applyDarkStyles({
855
- color: '#fff',
856
- backgroundColor: (theme.vars || theme).palette.warning[900]
857
- })), color === 'success' && _extends({
858
- color: (theme.vars || theme).palette.success[900],
859
- backgroundColor: (theme.vars || theme).palette.success[100]
860
- }, theme.applyDarkStyles({
861
- color: '#fff',
862
- backgroundColor: (theme.vars || theme).palette.success[900]
863
- }))))
803
+ backgroundColor: (theme.vars || theme).palette.grey[100],
804
+ color: (theme.vars || theme).palette.grey[900]
805
+ },
806
+ ...theme.applyDarkStyles({
807
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
808
+ color: (theme.vars || theme).palette.grey[300],
809
+ borderColor: alpha(theme.palette.primaryDark[500], 0.5),
810
+ '&:hover': {
811
+ color: (theme.vars || theme).palette.grey[300],
812
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
813
+ }
814
+ })
815
+ }),
816
+ ...(variant === 'outlined' && color === 'info' && {
817
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
818
+ color: (theme.vars || theme).palette.grey[900],
819
+ borderColor: (theme.vars || theme).palette.grey[200],
820
+ ...theme.applyDarkStyles({
821
+ color: (theme.vars || theme).palette.grey[300],
822
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
823
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
824
+ })
825
+ }),
826
+ ...(variant === 'outlined' && color === 'primary' && {
827
+ borderColor: (theme.vars || theme).palette.primary[100],
828
+ backgroundColor: alpha(theme.palette.primary[100], 0.2),
829
+ ...theme.applyDarkStyles({
830
+ color: (theme.vars || theme).palette.primary[300],
831
+ borderColor: alpha(theme.palette.primary[500], 0.2),
832
+ backgroundColor: alpha(theme.palette.primary[700], 0.2)
833
+ })
834
+ }),
835
+ ...(variant === 'outlined' && color === 'success' && {
836
+ borderColor: (theme.vars || theme).palette.success[100],
837
+ backgroundColor: (theme.vars || theme).palette.success[50],
838
+ color: (theme.vars || theme).palette.success[900],
839
+ ...theme.applyDarkStyles({
840
+ color: (theme.vars || theme).palette.success[300],
841
+ borderColor: alpha(theme.palette.success[300], 0.2),
842
+ background: alpha(theme.palette.success[800], 0.2)
843
+ })
844
+ }),
845
+ ...(variant === 'filled' && {
846
+ ...(color === 'default' && {
847
+ border: '1px solid transparent',
848
+ color: (theme.vars || theme).palette.primary[700],
849
+ backgroundColor: alpha(theme.palette.primary[100], 0.5),
850
+ '&:hover': {
851
+ backgroundColor: (theme.vars || theme).palette.primary[100]
852
+ },
853
+ ...theme.applyDarkStyles({
854
+ color: '#fff',
855
+ backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
856
+ '&:hover': {
857
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600]
858
+ }
859
+ })
860
+ }),
861
+ ...(color === 'primary' && {
862
+ color: (theme.vars || theme).palette.primary[600],
863
+ backgroundColor: alpha(theme.palette.primary[100], 0.4),
864
+ '&:hover': {
865
+ backgroundColor: (theme.vars || theme).palette.primary[100]
866
+ },
867
+ '& .MuiChip-deleteIcon': {
868
+ color: (theme.vars || theme).palette.primary[600],
869
+ '&:hover': {
870
+ color: (theme.vars || theme).palette.primary[700]
871
+ }
872
+ },
873
+ '&.Mui-focusVisible': {
874
+ backgroundColor: (theme.vars || theme).palette.primary[200]
875
+ },
876
+ ...theme.applyDarkStyles({
877
+ color: (theme.vars || theme).palette.primary[100],
878
+ backgroundColor: alpha(theme.palette.primary[800], 0.5),
879
+ '&:hover': {
880
+ backgroundColor: alpha(theme.palette.primary[900], 0.5)
881
+ },
882
+ '& .MuiChip-deleteIcon': {
883
+ color: (theme.vars || theme).palette.primary[100],
884
+ '&:hover': {
885
+ color: (theme.vars || theme).palette.primary[50]
886
+ }
887
+ }
888
+ })
889
+ })
890
+ }),
891
+ // for labelling product in the search
892
+ // @ts-ignore internal repo module augmentation issue
893
+ ...(variant === 'light' && {
894
+ ...(color === 'default' && {
895
+ color: (theme.vars || theme).palette.primary[700],
896
+ backgroundColor: alpha(theme.palette.primary[100], 0.3),
897
+ ...theme.applyDarkStyles({
898
+ color: (theme.vars || theme).palette.primary[200],
899
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
900
+ })
901
+ }),
902
+ ...(color === 'warning' && {
903
+ color: (theme.vars || theme).palette.warning[900],
904
+ backgroundColor: (theme.vars || theme).palette.warning[100],
905
+ ...theme.applyDarkStyles({
906
+ color: '#fff',
907
+ backgroundColor: (theme.vars || theme).palette.warning[900]
908
+ })
909
+ }),
910
+ ...(color === 'success' && {
911
+ color: (theme.vars || theme).palette.success[900],
912
+ backgroundColor: (theme.vars || theme).palette.success[100],
913
+ ...theme.applyDarkStyles({
914
+ color: '#fff',
915
+ backgroundColor: (theme.vars || theme).palette.success[900]
916
+ })
917
+ })
918
+ })
919
+ })
864
920
  }
865
921
  },
866
922
  MuiList: {
@@ -930,7 +986,7 @@ export function getThemedComponents() {
930
986
  root: ({
931
987
  theme,
932
988
  ownerState
933
- }) => [_extends({
989
+ }) => [{
934
990
  backgroundImage: 'none',
935
991
  backgroundColor: '#fff',
936
992
  '&[href]': {
@@ -938,47 +994,49 @@ export function getThemedComponents() {
938
994
  },
939
995
  transition: theme.transitions.create(['border', 'box-shadow'], {
940
996
  duration: theme.transitions.duration.shortest
941
- })
942
- }, ownerState.variant === 'outlined' && {
943
- display: 'block',
944
- borderColor: (theme.vars || theme).palette.grey[100],
945
- '&[href]': {
946
- textDecorationLine: 'none',
947
- boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.3)} 0 -2px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
948
- '&:hover': {
949
- borderColor: (theme.vars || theme).palette.primary[200],
950
- boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
997
+ }),
998
+ ...(ownerState.variant === 'outlined' && {
999
+ display: 'block',
1000
+ borderColor: (theme.vars || theme).palette.grey[100],
1001
+ '&[href]': {
1002
+ textDecorationLine: 'none',
1003
+ boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.3)} 0 -2px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
1004
+ '&:hover': {
1005
+ borderColor: (theme.vars || theme).palette.primary[200],
1006
+ boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1007
+ },
1008
+ '&:focus-visible': {
1009
+ outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
1010
+ outlineOffset: '2px'
1011
+ }
951
1012
  },
952
- '&:focus-visible': {
953
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
954
- outlineOffset: '2px'
955
- }
956
- },
957
- ':is(a&), :is(button&)': {
958
- '&:hover': {
959
- borderColor: (theme.vars || theme).palette.primary[200],
960
- boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1013
+ ':is(a&), :is(button&)': {
1014
+ '&:hover': {
1015
+ borderColor: (theme.vars || theme).palette.primary[200],
1016
+ boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1017
+ }
961
1018
  }
962
- }
963
- }), theme.applyDarkStyles(_extends({
964
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
965
- }, ownerState.variant === 'outlined' && {
966
- borderColor: (theme.vars || theme).palette.primaryDark[700],
967
- backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
968
- '&[href]': {
969
- textDecorationLine: 'none',
970
- boxShadow: `${alpha(theme.palette.primaryDark[700], 0.4)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
971
- '&:hover': {
972
- borderColor: alpha(theme.palette.primary[600], 0.5),
973
- boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
974
- }
975
- },
976
- ':is(a&), :is(button&)': {
977
- '&:hover': {
978
- boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1019
+ })
1020
+ }, theme.applyDarkStyles({
1021
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900],
1022
+ ...(ownerState.variant === 'outlined' && {
1023
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
1024
+ backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
1025
+ '&[href]': {
1026
+ textDecorationLine: 'none',
1027
+ boxShadow: `${alpha(theme.palette.primaryDark[700], 0.4)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
1028
+ '&:hover': {
1029
+ borderColor: alpha(theme.palette.primary[600], 0.5),
1030
+ boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
1031
+ }
1032
+ },
1033
+ ':is(a&), :is(button&)': {
1034
+ '&:hover': {
1035
+ boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1036
+ }
979
1037
  }
980
- }
981
- }))]
1038
+ })
1039
+ })]
982
1040
  }
983
1041
  },
984
1042
  MuiTableCell: {
@@ -986,14 +1044,16 @@ export function getThemedComponents() {
986
1044
  root: ({
987
1045
  theme,
988
1046
  ownerState
989
- }) => _extends({
1047
+ }) => ({
990
1048
  padding: theme.spacing(1, 2),
991
- borderColor: (theme.vars || theme).palette.divider
992
- }, ownerState.variant === 'head' && {
993
- color: (theme.vars || theme).palette.text.primary,
994
- fontWeight: 700
995
- }, ownerState.variant === 'body' && {
996
- color: (theme.vars || theme).palette.text.secondary
1049
+ borderColor: (theme.vars || theme).palette.divider,
1050
+ ...(ownerState.variant === 'head' && {
1051
+ color: (theme.vars || theme).palette.text.primary,
1052
+ fontWeight: 700
1053
+ }),
1054
+ ...(ownerState.variant === 'body' && {
1055
+ color: (theme.vars || theme).palette.text.secondary
1056
+ })
997
1057
  })
998
1058
  }
999
1059
  },
@@ -1001,11 +1061,12 @@ export function getThemedComponents() {
1001
1061
  styleOverrides: {
1002
1062
  root: ({
1003
1063
  theme
1004
- }) => _extends({
1005
- backgroundColor: '#fff'
1006
- }, theme.applyDarkStyles({
1007
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1008
- }))
1064
+ }) => ({
1065
+ backgroundColor: '#fff',
1066
+ ...theme.applyDarkStyles({
1067
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1068
+ })
1069
+ })
1009
1070
  }
1010
1071
  },
1011
1072
  MuiToggleButton: {
@@ -1013,14 +1074,14 @@ export function getThemedComponents() {
1013
1074
  root: ({
1014
1075
  theme,
1015
1076
  ownerState
1016
- }) => [_extends({
1077
+ }) => [{
1017
1078
  textTransform: 'none',
1018
1079
  fontWeight: theme.typography.fontWeightMedium,
1019
1080
  color: theme.palette.text.secondary,
1020
- borderColor: theme.palette.grey[200]
1021
- }, ownerState.size === 'small' && {
1022
- padding: '0.375rem 0.75rem'
1023
- }, {
1081
+ borderColor: theme.palette.grey[200],
1082
+ ...(ownerState.size === 'small' && {
1083
+ padding: '0.375rem 0.75rem'
1084
+ }),
1024
1085
  '&.Mui-selected': {
1025
1086
  color: (theme.vars || theme).palette.primary[700],
1026
1087
  borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
@@ -1029,7 +1090,7 @@ export function getThemedComponents() {
1029
1090
  backgroundColor: (theme.vars || theme).palette.primary[100]
1030
1091
  }
1031
1092
  }
1032
- }), theme.applyDarkStyles({
1093
+ }, theme.applyDarkStyles({
1033
1094
  borderColor: theme.palette.primaryDark[700],
1034
1095
  '&:hover': {
1035
1096
  backgroundColor: alpha(theme.palette.primaryDark[600], 0.2)
@@ -1078,13 +1139,14 @@ export function getThemedComponents() {
1078
1139
  },
1079
1140
  track: ({
1080
1141
  theme
1081
- }) => _extends({
1142
+ }) => ({
1082
1143
  opacity: 1,
1083
1144
  borderRadius: 32,
1084
- backgroundColor: theme.palette.grey[400]
1085
- }, theme.applyDarkStyles({
1086
- backgroundColor: theme.palette.grey[800]
1087
- })),
1145
+ backgroundColor: theme.palette.grey[400],
1146
+ ...theme.applyDarkStyles({
1147
+ backgroundColor: theme.palette.grey[800]
1148
+ })
1149
+ }),
1088
1150
  thumb: {
1089
1151
  flexShrink: 0,
1090
1152
  width: '14px',
@@ -1140,5 +1202,11 @@ export function getThemedComponents() {
1140
1202
  }
1141
1203
  };
1142
1204
  }
1143
- export const brandingDarkTheme = createTheme(_extends({}, getDesignTokens('dark'), getThemedComponents()));
1144
- export const brandingLightTheme = createTheme(_extends({}, getDesignTokens('light'), getThemedComponents()));
1205
+ export const brandingDarkTheme = createTheme({
1206
+ ...getDesignTokens('dark'),
1207
+ ...getThemedComponents()
1208
+ });
1209
+ export const brandingLightTheme = createTheme({
1210
+ ...getDesignTokens('light'),
1211
+ ...getThemedComponents()
1212
+ });