@mui/docs 6.0.0-alpha.1 → 6.0.0-alpha.11

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 (99) hide show
  1. package/CHANGELOG.md +538 -4
  2. package/CodeCopy/CodeCopy.d.ts +20 -0
  3. package/CodeCopy/CodeCopy.js +172 -0
  4. package/CodeCopy/CodeCopyButton.d.ts +5 -0
  5. package/CodeCopy/CodeCopyButton.js +41 -0
  6. package/CodeCopy/index.d.ts +3 -0
  7. package/CodeCopy/index.js +3 -0
  8. package/CodeCopy/package.json +6 -0
  9. package/CodeCopy/useClipboardCopy.d.ts +4 -0
  10. package/CodeCopy/useClipboardCopy.js +21 -0
  11. package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
  12. package/ComponentLinkHeader/ComponentLinkHeader.js +179 -0
  13. package/ComponentLinkHeader/index.d.ts +2 -0
  14. package/ComponentLinkHeader/index.js +2 -0
  15. package/ComponentLinkHeader/package.json +6 -0
  16. package/HighlightedCode/HighlightedCode.d.ts +14 -0
  17. package/HighlightedCode/HighlightedCode.js +68 -0
  18. package/HighlightedCode/index.d.ts +1 -0
  19. package/HighlightedCode/index.js +1 -0
  20. package/HighlightedCode/package.json +6 -0
  21. package/InfoCard/InfoCard.d.ts +0 -1
  22. package/InfoCard/InfoCard.js +45 -44
  23. package/Link/Link.js +40 -38
  24. package/MarkdownElement/MarkdownElement.d.ts +6 -0
  25. package/MarkdownElement/MarkdownElement.js +847 -0
  26. package/MarkdownElement/index.d.ts +1 -0
  27. package/MarkdownElement/index.js +1 -0
  28. package/MarkdownElement/package.json +6 -0
  29. package/NProgressBar/NProgressBar.js +6 -7
  30. package/SectionTitle/SectionTitle.d.ts +7 -0
  31. package/SectionTitle/SectionTitle.js +30 -0
  32. package/SectionTitle/index.d.ts +1 -0
  33. package/SectionTitle/index.js +1 -0
  34. package/SectionTitle/package.json +6 -0
  35. package/branding/brandingTheme.js +569 -369
  36. package/node/CodeCopy/CodeCopy.js +188 -0
  37. package/node/CodeCopy/CodeCopyButton.js +50 -0
  38. package/node/CodeCopy/index.js +40 -0
  39. package/node/CodeCopy/useClipboardCopy.js +30 -0
  40. package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
  41. package/node/ComponentLinkHeader/index.js +24 -0
  42. package/node/HighlightedCode/HighlightedCode.js +77 -0
  43. package/node/HighlightedCode/index.js +16 -0
  44. package/node/InfoCard/InfoCard.js +45 -44
  45. package/node/Link/Link.js +43 -40
  46. package/node/MarkdownElement/MarkdownElement.js +859 -0
  47. package/node/MarkdownElement/index.js +16 -0
  48. package/node/NProgressBar/NProgressBar.js +6 -7
  49. package/node/SectionTitle/SectionTitle.js +38 -0
  50. package/node/SectionTitle/index.js +16 -0
  51. package/node/branding/brandingTheme.js +569 -369
  52. package/node/svgIcons/AdobeXDIcon.js +22 -0
  53. package/node/svgIcons/BundleSizeIcon.js +22 -0
  54. package/node/svgIcons/FigmaIcon.js +31 -0
  55. package/node/svgIcons/FileDownload.js +3 -3
  56. package/node/svgIcons/JavaScript.js +3 -3
  57. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  58. package/node/svgIcons/SketchIcon.js +36 -0
  59. package/node/svgIcons/TypeScript.js +3 -3
  60. package/node/svgIcons/W3CIcon.js +24 -0
  61. package/node/translations/translations.json +4 -2
  62. package/package.json +6 -4
  63. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  64. package/svgIcons/AdobeXDIcon.js +14 -0
  65. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  66. package/svgIcons/BundleSizeIcon.js +14 -0
  67. package/svgIcons/FigmaIcon.d.ts +4 -0
  68. package/svgIcons/FigmaIcon.js +23 -0
  69. package/svgIcons/FileDownload.d.ts +7 -0
  70. package/svgIcons/FileDownload.js +3 -3
  71. package/svgIcons/JavaScript.d.ts +7 -0
  72. package/svgIcons/JavaScript.js +3 -3
  73. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  74. package/svgIcons/MaterialDesignIcon.js +19 -0
  75. package/svgIcons/SketchIcon.d.ts +4 -0
  76. package/svgIcons/SketchIcon.js +28 -0
  77. package/svgIcons/TypeScript.d.ts +7 -0
  78. package/svgIcons/TypeScript.js +3 -3
  79. package/svgIcons/W3CIcon.d.ts +4 -0
  80. package/svgIcons/W3CIcon.js +16 -0
  81. package/translations/translations.json +4 -2
  82. package/tsconfig.build.tsbuildinfo +1 -1
  83. package/legacy/DocsProvider/DocsProvider.js +0 -25
  84. package/legacy/DocsProvider/index.js +0 -1
  85. package/legacy/InfoCard/InfoCard.js +0 -86
  86. package/legacy/InfoCard/index.js +0 -1
  87. package/legacy/Link/Link.js +0 -101
  88. package/legacy/Link/index.js +0 -1
  89. package/legacy/NProgressBar/NProgressBar.js +0 -80
  90. package/legacy/NProgressBar/index.js +0 -1
  91. package/legacy/branding/BrandingProvider.js +0 -17
  92. package/legacy/branding/brandingTheme.js +0 -1168
  93. package/legacy/branding/index.js +0 -2
  94. package/legacy/i18n/i18n.js +0 -105
  95. package/legacy/i18n/index.js +0 -1
  96. package/legacy/svgIcons/FileDownload.js +0 -14
  97. package/legacy/svgIcons/JavaScript.js +0 -14
  98. package/legacy/svgIcons/TypeScript.js +0 -14
  99. package/legacy/translations/index.js +0 -4
@@ -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
- linearSubtle: mode === 'light' ? `linear-gradient(to bottom right, ${alpha(blue[50], 0.3)} 25%, ${alpha(grey[50], 0.2)} 100%)` : `linear-gradient(to bottom right, ${alpha(blue[900], 0.1)} 25%, ${alpha(blueDark[800], 0.2)} 100%)`
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)',
@@ -218,20 +236,17 @@ export const getDesignTokens = mode => ({
218
236
  },
219
237
  body1: {
220
238
  fontSize: defaultTheme.typography.pxToRem(16),
221
- // 16px
222
239
  lineHeight: 24 / 16,
223
240
  letterSpacing: 0
224
241
  },
225
242
  body2: {
226
243
  fontSize: defaultTheme.typography.pxToRem(14),
227
- // 14px
228
244
  lineHeight: 21 / 14,
229
245
  letterSpacing: 0
230
246
  },
231
247
  caption: {
232
248
  display: 'inline-block',
233
249
  fontSize: defaultTheme.typography.pxToRem(12),
234
- // 12px
235
250
  lineHeight: 18 / 12,
236
251
  letterSpacing: 0,
237
252
  fontWeight: 700
@@ -303,29 +318,95 @@ export function getThemedComponents() {
303
318
  MuiAlert: {
304
319
  styleOverrides: {
305
320
  root: {
306
- padding: '12px 16px'
321
+ padding: '16px',
322
+ gap: '12px',
323
+ fontSize: '1rem',
324
+ '& * ul': {
325
+ paddingLeft: '24px !important',
326
+ marginBottom: '0 !important'
327
+ },
328
+ // !important is used here to override the anchor tag color coming from MarkdownElement
329
+ '& .MuiAlert-icon': {
330
+ margin: 0,
331
+ marginTop: '2px',
332
+ padding: 0
333
+ },
334
+ '& .MuiAlert-message': {
335
+ padding: 0
336
+ }
337
+ },
338
+ icon: {
339
+ paddingTop: 10,
340
+ paddingBottom: 0
307
341
  },
308
342
  standardWarning: ({
309
343
  theme
310
- }) => [{
344
+ }) => [
345
+ // same styles from the MarkdownElement callout
346
+ {
311
347
  backgroundColor: alpha(theme.palette.warning[50], 0.5),
312
348
  color: (theme.vars || theme).palette.grey[900],
313
349
  border: '1px solid',
314
- borderColor: alpha(theme.palette.warning[600], 0.3),
350
+ borderColor: alpha(theme.palette.warning[700], 0.15),
315
351
  '& .MuiAlert-icon': {
316
- color: (theme.vars || theme).palette.warning[700]
352
+ color: (theme.vars || theme).palette.warning[600]
353
+ },
354
+ '& * a': {
355
+ // !important is used here to override the anchor tag color coming from MarkdownElement
356
+ color: `${(theme.vars || theme).palette.warning[900]} !important`,
357
+ textDecorationColor: `${alpha(theme.palette.warning.main, 0.4)} !important`,
358
+ '&:hover': {
359
+ textDecorationColor: `${(theme.vars || theme).palette.warning[900]} !important`
360
+ }
317
361
  }
318
362
  }, theme.applyDarkStyles({
319
- backgroundColor: alpha(theme.palette.warning[700], 0.2),
363
+ backgroundColor: alpha(theme.palette.warning[700], 0.12),
320
364
  color: (theme.vars || theme).palette.warning[50],
321
365
  '& .MuiAlert-icon': {
322
- color: (theme.vars || theme).palette.warning[200]
366
+ color: (theme.vars || theme).palette.warning[400]
367
+ },
368
+ '& * a': {
369
+ color: `${(theme.vars || theme).palette.warning[100]} !important`,
370
+ textDecorationColor: `${alpha(theme.palette.warning[600], 0.4)} !important`,
371
+ '&:hover': {
372
+ textDecorationColor: `${(theme.vars || theme).palette.warning[600]} !important`
373
+ }
323
374
  }
324
375
  })],
325
- icon: {
326
- paddingTop: 12,
327
- paddingBottom: 0
328
- }
376
+ standardSuccess: ({
377
+ theme
378
+ }) => [
379
+ // same styles from the MarkdownElement callout
380
+ {
381
+ backgroundColor: alpha(theme.palette.success[50], 0.5),
382
+ color: (theme.vars || theme).palette.success[900],
383
+ border: `1px solid ${(theme.vars || theme).palette.success[100]}`,
384
+ '& .MuiAlert-icon': {
385
+ color: (theme.vars || theme).palette.success[600]
386
+ },
387
+ '& * a': {
388
+ // !important is used here to override the anchor tag color coming from MarkdownElement
389
+ color: `${(theme.vars || theme).palette.success[900]} !important`,
390
+ textDecorationColor: `${alpha(theme.palette.success.main, 0.4)} !important`,
391
+ '&:hover': {
392
+ textDecorationColor: `${(theme.vars || theme).palette.success[900]} !important`
393
+ }
394
+ }
395
+ }, theme.applyDarkStyles({
396
+ backgroundColor: alpha(theme.palette.success[700], 0.12),
397
+ color: (theme.vars || theme).palette.success[50],
398
+ borderColor: alpha(theme.palette.success[400], 0.1),
399
+ '& .MuiAlert-icon': {
400
+ color: (theme.vars || theme).palette.success[500]
401
+ },
402
+ '& * a': {
403
+ color: `${(theme.vars || theme).palette.success[100]} !important`,
404
+ textDecorationColor: `${alpha(theme.palette.success[600], 0.4)} !important`,
405
+ '&:hover': {
406
+ textDecorationColor: `${(theme.vars || theme).palette.success[600]} !important`
407
+ }
408
+ }
409
+ })]
329
410
  }
330
411
  },
331
412
  MuiButtonBase: {
@@ -353,107 +434,135 @@ export function getThemedComponents() {
353
434
  root: ({
354
435
  theme,
355
436
  ownerState
356
- }) => _extends({
357
- transition: 'all 120ms ease-in'
358
- }, ownerState.size === 'large' && _extends({}, theme.typography.body1, {
359
- lineHeight: 21 / 16,
360
- padding: theme.spacing('8px', '10px', '10px', '12px'),
361
- fontWeight: theme.typography.fontWeightSemiBold,
362
- borderRadius: 10,
363
- '& > span': {
364
- transition: '0.2s',
365
- marginLeft: 4
366
- },
367
- '&:hover > span': {
368
- transform: 'translateX(2px)'
369
- }
370
- }), ownerState.size === 'medium' && {
371
- fontSize: defaultTheme.typography.pxToRem(15),
372
- padding: theme.spacing('8px', '12px', '8px', '14px'),
373
- fontWeight: theme.typography.fontWeightSemiBold,
374
- borderRadius: 8,
375
- '& > span': {
376
- transition: '0.2s',
377
- marginLeft: 4
378
- },
379
- '&:hover > span': {
380
- transform: 'translateX(2px)'
381
- }
382
- }, ownerState.size === 'small' && {
383
- padding: theme.spacing('6px', 1),
384
- fontFamily: theme.typography.fontFamily,
385
- fontSize: defaultTheme.typography.pxToRem(13),
386
- fontWeight: theme.typography.fontWeightSemiBold,
387
- borderRadius: 8,
388
- '& .MuiButton-startIcon': {
389
- transition: '0.15s',
390
- marginRight: 4,
391
- marginLeft: -1
392
- },
393
- '& .MuiButton-endIcon': {
394
- transition: '0.15s',
395
- marginLeft: 4
396
- },
397
- '&:hover': {
437
+ }) => ({
438
+ transition: 'all 120ms ease-in',
439
+ ...(ownerState.size === 'large' && {
440
+ ...theme.typography.body1,
441
+ lineHeight: 21 / 16,
442
+ padding: theme.spacing('8px', '10px', '10px', '12px'),
443
+ fontWeight: theme.typography.fontWeightMedium,
444
+ borderRadius: 10,
445
+ '& > span': {
446
+ transition: '0.2s',
447
+ marginLeft: 4
448
+ },
449
+ '&:hover > span': {
450
+ transform: 'translateX(2px)'
451
+ }
452
+ }),
453
+ ...(ownerState.size === 'medium' && {
454
+ fontSize: defaultTheme.typography.pxToRem(15),
455
+ padding: theme.spacing('8px', '12px', '8px', '14px'),
456
+ fontWeight: theme.typography.fontWeightMedium,
457
+ borderRadius: 8,
458
+ '& > span': {
459
+ transition: '0.2s',
460
+ marginLeft: 4
461
+ },
462
+ '&:hover > span': {
463
+ transform: 'translateX(2px)'
464
+ }
465
+ }),
466
+ ...(ownerState.size === 'small' && {
467
+ padding: '6px 8px',
468
+ fontFamily: theme.typography.fontFamily,
469
+ fontSize: defaultTheme.typography.pxToRem(13),
470
+ fontWeight: theme.typography.fontWeightMedium,
471
+ borderRadius: 8,
398
472
  '& .MuiButton-startIcon': {
399
- transform: 'translateX(-2px)'
473
+ transition: '0.15s',
474
+ marginRight: 4,
475
+ marginLeft: -1
400
476
  },
401
477
  '& .MuiButton-endIcon': {
402
- transform: 'translateX(2px)'
478
+ transition: '0.15s',
479
+ marginLeft: 4
480
+ },
481
+ '&:hover': {
482
+ '& .MuiButton-startIcon': {
483
+ transform: 'translateX(-2px)'
484
+ },
485
+ '& .MuiButton-endIcon': {
486
+ transform: 'translateX(2px)'
487
+ }
403
488
  }
404
- }
405
- }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && _extends({
406
- color: (theme.vars || theme).palette.text.primary,
407
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
408
- borderColor: (theme.vars || theme).palette.primaryDark[100],
409
- 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`,
410
- '&:hover': {
411
- backgroundColor: (theme.vars || theme).palette.grey[50]
412
- }
413
- }, theme.applyDarkStyles({
414
- color: (theme.vars || theme).palette.primaryDark[100],
415
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
416
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
417
- 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`,
418
- '&:hover': {
419
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
420
- borderColor: (theme.vars || theme).palette.primaryDark[600]
421
- }
422
- })), ownerState.variant === 'outlined' && ownerState.color === 'primary' && _extends({
423
- color: (theme.vars || theme).palette.primary[600],
424
- backgroundColor: alpha(theme.palette.primary[50], 0.2),
425
- borderColor: (theme.vars || theme).palette.primary[100],
426
- 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`,
427
- '&:hover': {
428
- backgroundColor: (theme.vars || theme).palette.primary[50],
429
- borderColor: (theme.vars || theme).palette.primary[200]
430
- }
431
- }, theme.applyDarkStyles({
432
- color: (theme.vars || theme).palette.primary[200],
433
- borderColor: alpha(theme.palette.primary[900], 0.7),
434
- backgroundColor: alpha(theme.palette.primary[900], 0.2),
435
- 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`,
436
- '&:hover': {
437
- backgroundColor: (theme.vars || theme).palette.primary[900],
438
- borderColor: (theme.vars || theme).palette.primary[700]
439
- }
440
- })), ownerState.variant === 'contained' && ownerState.color === 'primary' && {
441
- color: '#fff',
442
- textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
443
- backgroundColor: (theme.vars || theme).palette.primary[500],
444
- backgroundImage: `linear-gradient(180deg, ${alpha(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
445
- 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`,
446
- '&:hover': {
447
- backgroundColor: (theme.vars || theme).palette.primary[700]
448
- },
449
- '&:active': {
450
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
451
- }
452
- }, ownerState.variant === 'text' && _extends({
453
- color: (theme.vars || theme).palette.primary[600]
454
- }, theme.applyDarkStyles({
455
- color: (theme.vars || theme).palette.primary[300]
456
- })))
489
+ }),
490
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
491
+ color: (theme.vars || theme).palette.text.primary,
492
+ backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
493
+ borderColor: (theme.vars || theme).palette.primaryDark[100],
494
+ boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
495
+ '&:hover': {
496
+ backgroundColor: (theme.vars || theme).palette.grey[50]
497
+ },
498
+ ...theme.applyDarkStyles({
499
+ color: (theme.vars || theme).palette.primaryDark[100],
500
+ borderColor: alpha(theme.palette.primaryDark[600], 0.5),
501
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
502
+ boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
503
+ '&:hover': {
504
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
505
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
506
+ }
507
+ })
508
+ }),
509
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'primary' && {
510
+ color: (theme.vars || theme).palette.primary[600],
511
+ backgroundColor: alpha(theme.palette.primary[50], 0.2),
512
+ borderColor: (theme.vars || theme).palette.primary[100],
513
+ 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`,
514
+ '&:hover': {
515
+ backgroundColor: (theme.vars || theme).palette.primary[50],
516
+ borderColor: (theme.vars || theme).palette.primary[200]
517
+ },
518
+ ...theme.applyDarkStyles({
519
+ color: (theme.vars || theme).palette.primary[200],
520
+ borderColor: alpha(theme.palette.primary[900], 0.7),
521
+ backgroundColor: alpha(theme.palette.primary[900], 0.2),
522
+ 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`,
523
+ '&:hover': {
524
+ backgroundColor: (theme.vars || theme).palette.primary[900],
525
+ borderColor: (theme.vars || theme).palette.primary[700]
526
+ }
527
+ })
528
+ }),
529
+ ...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
530
+ color: '#fff',
531
+ textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
532
+ backgroundColor: (theme.vars || theme).palette.primary[500],
533
+ backgroundImage: `linear-gradient(180deg, ${alpha(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
534
+ 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`,
535
+ '&:hover': {
536
+ backgroundColor: (theme.vars || theme).palette.primary[700]
537
+ },
538
+ '&:active': {
539
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
540
+ }
541
+ }),
542
+ ...(ownerState.variant === 'text' && ownerState.color === 'secondary' && {
543
+ color: (theme.vars || theme).palette.text.secondary,
544
+ '&:hover': {
545
+ backgroundColor: (theme.vars || theme).palette.grey[50]
546
+ },
547
+ '&:active': {
548
+ backgroundColor: (theme.vars || theme).palette.grey[200]
549
+ },
550
+ ...theme.applyDarkStyles({
551
+ '&:hover': {
552
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
553
+ },
554
+ '&:active': {
555
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
556
+ }
557
+ })
558
+ }),
559
+ ...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
560
+ color: (theme.vars || theme).palette.primary[600],
561
+ ...theme.applyDarkStyles({
562
+ color: (theme.vars || theme).palette.primary[300]
563
+ })
564
+ })
565
+ })
457
566
  },
458
567
  variants: [{
459
568
  // @ts-ignore internal repo module augmentation issue
@@ -571,23 +680,48 @@ export function getThemedComponents() {
571
680
  },
572
681
  style: ({
573
682
  theme
574
- }) => _extends({
683
+ }) => ({
575
684
  marginBottom: 1,
576
685
  fontSize: theme.typography.pxToRem(14),
577
686
  fontWeight: theme.typography.fontWeightBold,
578
687
  color: (theme.vars || theme).palette.primary[600],
579
688
  '&:hover': {
580
689
  backgroundColor: (theme.vars || theme).palette.primary[50]
581
- }
582
- }, theme.applyDarkStyles({
583
- color: (theme.vars || theme).palette.primary[300],
584
- '&:hover': {
585
- backgroundColor: alpha(theme.palette.primary[800], 0.3)
586
- }
587
- }))
690
+ },
691
+ ...theme.applyDarkStyles({
692
+ color: (theme.vars || theme).palette.primary[300],
693
+ '&:hover': {
694
+ backgroundColor: alpha(theme.palette.primary[800], 0.3)
695
+ }
696
+ })
697
+ })
588
698
  }]
589
699
  },
590
700
  MuiIconButton: {
701
+ styleOverrides: {
702
+ root: ({
703
+ theme,
704
+ ownerState
705
+ }) => ({
706
+ borderRadius: theme.shape.borderRadius,
707
+ transition: 'all 100ms ease-in',
708
+ '&:hover': {
709
+ borderColor: (theme.vars || theme).palette.grey[300],
710
+ background: (theme.vars || theme).palette.grey[50],
711
+ ...theme.applyDarkStyles({
712
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
713
+ background: alpha(theme.palette.primaryDark[700], 0.8)
714
+ })
715
+ },
716
+ ...(ownerState.size === 'small' && {
717
+ height: 32,
718
+ width: 32,
719
+ '& .MuiSvgIcon-root': {
720
+ fontSize: defaultTheme.typography.pxToRem(18)
721
+ }
722
+ })
723
+ })
724
+ },
591
725
  variants: [{
592
726
  props: {
593
727
  color: 'primary'
@@ -595,14 +729,10 @@ export function getThemedComponents() {
595
729
  style: ({
596
730
  theme
597
731
  }) => [{
598
- height: 34,
599
- width: 34,
600
- border: `1px solid`,
601
- borderRadius: theme.shape.borderRadius,
602
732
  color: (theme.vars || theme).palette.primary.main,
603
733
  backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
604
- borderColor: (theme.vars || theme).palette.primaryDark[100],
605
- boxShadow: `${alpha(theme.palette.grey[50], 0.4)} 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
734
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
735
+ boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
606
736
  '&:hover': {
607
737
  borderColor: (theme.vars || theme).palette.grey[300],
608
738
  background: (theme.vars || theme).palette.grey[50]
@@ -611,10 +741,10 @@ export function getThemedComponents() {
611
741
  color: (theme.vars || theme).palette.primary[300],
612
742
  borderColor: alpha(theme.palette.primaryDark[600], 0.5),
613
743
  backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
614
- 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`,
744
+ boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
615
745
  '&:hover': {
616
- borderColor: (theme.vars || theme).palette.primaryDark[500],
617
- background: alpha(theme.palette.primaryDark[700], 0.4)
746
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
747
+ background: alpha(theme.palette.primaryDark[700], 0.8)
618
748
  }
619
749
  })]
620
750
  }, {
@@ -624,27 +754,22 @@ export function getThemedComponents() {
624
754
  style: ({
625
755
  theme
626
756
  }) => [{
627
- height: 34,
628
- width: 34,
629
- color: (theme.vars || theme).palette.text.tertiary,
630
- borderRadius: theme.shape.borderRadius,
631
- border: `1px solid`,
757
+ color: (theme.vars || theme).palette.text.secondary,
632
758
  backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
633
- borderColor: (theme.vars || theme).palette.primaryDark[100],
634
- boxShadow: `${alpha(theme.palette.grey[50], 0.4)} 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
759
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
760
+ boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
635
761
  '&:hover': {
636
- color: (theme.vars || theme).palette.primary.main,
762
+ color: (theme.vars || theme).palette.text.primary,
637
763
  borderColor: (theme.vars || theme).palette.grey[300],
638
764
  background: (theme.vars || theme).palette.grey[50]
639
765
  }
640
766
  }, theme.applyDarkStyles({
641
767
  borderColor: alpha(theme.palette.primaryDark[600], 0.5),
642
768
  backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
643
- 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`,
769
+ boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
644
770
  '&:hover': {
645
- color: (theme.vars || theme).palette.primary[400],
646
- borderColor: (theme.vars || theme).palette.primaryDark[500],
647
- background: alpha(theme.palette.primaryDark[700], 0.4)
771
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
772
+ background: alpha(theme.palette.primaryDark[700], 0.8)
648
773
  }
649
774
  })]
650
775
  }]
@@ -654,17 +779,29 @@ export function getThemedComponents() {
654
779
  paper: ({
655
780
  theme
656
781
  }) => [{
782
+ padding: '6px',
657
783
  minWidth: 160,
658
784
  color: (theme.vars || theme).palette.text.secondary,
659
785
  backgroundImage: 'none',
660
786
  border: '1px solid',
661
787
  backgroundColor: (theme.vars || theme).palette.background.paper,
662
788
  borderColor: (theme.vars || theme).palette.grey[200],
789
+ '& .MuiMenu-list': {
790
+ display: 'flex',
791
+ flexDirection: 'column',
792
+ gap: '2px',
793
+ '& .MuiDivider-root': {
794
+ margin: '4px -8px 4px -8px'
795
+ }
796
+ },
663
797
  '& .MuiMenuItem-root': {
798
+ padding: '6px 8px',
799
+ borderRadius: '6px',
664
800
  fontSize: theme.typography.pxToRem(14),
665
- fontWeight: 500,
666
- '&:hover, &:focus': {
667
- backgroundColor: (theme.vars || theme).palette.grey[50]
801
+ fontWeight: theme.typography.fontWeightMedium,
802
+ '&:hover': {
803
+ backgroundColor: (theme.vars || theme).palette.grey[100],
804
+ color: (theme.vars || theme).palette.text.primary
668
805
  },
669
806
  '&:focus-visible': {
670
807
  outline: 'none'
@@ -679,11 +816,11 @@ export function getThemedComponents() {
679
816
  backgroundColor: (theme.vars || theme).palette.primaryDark[900],
680
817
  borderColor: (theme.vars || theme).palette.primaryDark[700],
681
818
  '& .MuiMenuItem-root': {
682
- '&:hover, &:focus': {
819
+ '&:hover': {
683
820
  backgroundColor: (theme.vars || theme).palette.primaryDark[700]
684
821
  },
685
822
  '&.Mui-selected': {
686
- color: (theme.vars || theme).palette.primary[300],
823
+ color: (theme.vars || theme).palette.primary[200],
687
824
  backgroundColor: alpha(theme.palette.primary[900], 0.4)
688
825
  }
689
826
  }
@@ -694,22 +831,21 @@ export function getThemedComponents() {
694
831
  styleOverrides: {
695
832
  paper: ({
696
833
  theme
697
- }) => _extends({
698
- boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)'
699
- }, theme.applyDarkStyles({
700
- boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
701
- }))
834
+ }) => ({
835
+ boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)',
836
+ ...theme.applyDarkStyles({
837
+ boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
838
+ })
839
+ })
702
840
  }
703
841
  },
704
842
  MuiDivider: {
705
843
  styleOverrides: {
706
844
  root: ({
707
845
  theme
708
- }) => _extends({
709
- borderColor: (theme.vars || theme).palette.grey[100]
710
- }, theme.applyDarkStyles({
711
- borderColor: alpha(theme.palette.primaryDark[700], 0.8)
712
- }))
846
+ }) => ({
847
+ borderColor: (theme.vars || theme).palette.divider
848
+ })
713
849
  }
714
850
  },
715
851
  MuiLink: {
@@ -762,107 +898,131 @@ export function getThemedComponents() {
762
898
  variant
763
899
  },
764
900
  theme
765
- }) => _extends({
901
+ }) => ({
766
902
  fontWeight: theme.typography.fontWeightSemiBold,
767
- paddingBottom: 0.2
768
- }, variant === 'outlined' && color === 'default' && _extends({
769
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
770
- color: (theme.vars || theme).palette.grey[900],
771
- borderColor: (theme.vars || theme).palette.grey[200],
772
- '&:hover': {
773
- backgroundColor: (theme.vars || theme).palette.grey[100],
774
- color: (theme.vars || theme).palette.grey[900]
775
- }
776
- }, theme.applyDarkStyles({
777
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
778
- color: (theme.vars || theme).palette.grey[300],
779
- borderColor: alpha(theme.palette.primaryDark[500], 0.5),
780
- '&:hover': {
781
- color: (theme.vars || theme).palette.grey[300],
782
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
783
- }
784
- })), variant === 'outlined' && color === 'info' && _extends({
785
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
786
- color: (theme.vars || theme).palette.grey[900],
787
- borderColor: (theme.vars || theme).palette.grey[200]
788
- }, theme.applyDarkStyles({
789
- color: (theme.vars || theme).palette.grey[300],
790
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
791
- borderColor: (theme.vars || theme).palette.primaryDark[600]
792
- })), variant === 'outlined' && color === 'primary' && _extends({
793
- borderColor: (theme.vars || theme).palette.primary[100],
794
- backgroundColor: (theme.vars || theme).palette.primary[50]
795
- }, theme.applyDarkStyles({
796
- color: (theme.vars || theme).palette.primary[300],
797
- borderColor: alpha(theme.palette.primary[500], 0.2),
798
- backgroundColor: alpha(theme.palette.primary[700], 0.2)
799
- })), variant === 'outlined' && color === 'success' && _extends({
800
- borderColor: (theme.vars || theme).palette.success[100],
801
- backgroundColor: (theme.vars || theme).palette.success[50],
802
- color: (theme.vars || theme).palette.success[900]
803
- }, theme.applyDarkStyles({
804
- color: (theme.vars || theme).palette.success[300],
805
- borderColor: alpha(theme.palette.success[300], 0.2),
806
- background: alpha(theme.palette.success[800], 0.2)
807
- })), variant === 'filled' && _extends({}, color === 'default' && _extends({
808
- border: '1px solid transparent',
809
- color: (theme.vars || theme).palette.primary[700],
810
- backgroundColor: alpha(theme.palette.primary[100], 0.5),
811
- '&:hover': {
812
- backgroundColor: (theme.vars || theme).palette.primary[100]
813
- }
814
- }, theme.applyDarkStyles({
815
- color: '#fff',
816
- backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
817
- '&:hover': {
818
- backgroundColor: (theme.vars || theme).palette.primaryDark[600]
819
- }
820
- })), color === 'primary' && _extends({
821
- color: (theme.vars || theme).palette.primary[600],
822
- backgroundColor: alpha(theme.palette.primary[100], 0.4),
823
- '&:hover': {
824
- backgroundColor: (theme.vars || theme).palette.primary[100]
825
- },
826
- '& .MuiChip-deleteIcon': {
827
- color: (theme.vars || theme).palette.primary[600],
828
- '&:hover': {
829
- color: (theme.vars || theme).palette.primary[700]
830
- }
831
- },
832
- '&.Mui-focusVisible': {
833
- backgroundColor: (theme.vars || theme).palette.primary[200]
834
- }
835
- }, theme.applyDarkStyles({
836
- color: (theme.vars || theme).palette.primary[100],
837
- backgroundColor: alpha(theme.palette.primary[800], 0.5),
838
- '&:hover': {
839
- backgroundColor: alpha(theme.palette.primary[900], 0.5)
840
- },
841
- '& .MuiChip-deleteIcon': {
842
- color: (theme.vars || theme).palette.primary[100],
903
+ paddingBottom: 0.2,
904
+ ...(variant === 'outlined' && color === 'default' && {
905
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
906
+ color: (theme.vars || theme).palette.grey[900],
907
+ borderColor: (theme.vars || theme).palette.grey[200],
843
908
  '&:hover': {
844
- color: (theme.vars || theme).palette.primary[50]
845
- }
846
- }
847
- }))), variant === 'light' && _extends({}, color === 'default' && _extends({
848
- color: (theme.vars || theme).palette.primary[700],
849
- backgroundColor: alpha(theme.palette.primary[100], 0.3)
850
- }, theme.applyDarkStyles({
851
- color: (theme.vars || theme).palette.primary[200],
852
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
853
- })), color === 'warning' && _extends({
854
- color: (theme.vars || theme).palette.warning[900],
855
- backgroundColor: (theme.vars || theme).palette.warning[100]
856
- }, theme.applyDarkStyles({
857
- color: '#fff',
858
- backgroundColor: (theme.vars || theme).palette.warning[900]
859
- })), color === 'success' && _extends({
860
- color: (theme.vars || theme).palette.success[900],
861
- backgroundColor: (theme.vars || theme).palette.success[100]
862
- }, theme.applyDarkStyles({
863
- color: '#fff',
864
- backgroundColor: (theme.vars || theme).palette.success[900]
865
- }))))
909
+ backgroundColor: (theme.vars || theme).palette.grey[100],
910
+ color: (theme.vars || theme).palette.grey[900]
911
+ },
912
+ ...theme.applyDarkStyles({
913
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
914
+ color: (theme.vars || theme).palette.grey[300],
915
+ borderColor: alpha(theme.palette.primaryDark[500], 0.5),
916
+ '&:hover': {
917
+ color: (theme.vars || theme).palette.grey[300],
918
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
919
+ }
920
+ })
921
+ }),
922
+ ...(variant === 'outlined' && color === 'info' && {
923
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
924
+ color: (theme.vars || theme).palette.grey[900],
925
+ borderColor: (theme.vars || theme).palette.grey[200],
926
+ ...theme.applyDarkStyles({
927
+ color: (theme.vars || theme).palette.grey[300],
928
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
929
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
930
+ })
931
+ }),
932
+ ...(variant === 'outlined' && color === 'primary' && {
933
+ borderColor: (theme.vars || theme).palette.primary[100],
934
+ backgroundColor: alpha(theme.palette.primary[100], 0.2),
935
+ ...theme.applyDarkStyles({
936
+ color: (theme.vars || theme).palette.primary[300],
937
+ borderColor: alpha(theme.palette.primary[500], 0.2),
938
+ backgroundColor: alpha(theme.palette.primary[700], 0.2)
939
+ })
940
+ }),
941
+ ...(variant === 'outlined' && color === 'success' && {
942
+ borderColor: (theme.vars || theme).palette.success[100],
943
+ backgroundColor: (theme.vars || theme).palette.success[50],
944
+ color: (theme.vars || theme).palette.success[900],
945
+ ...theme.applyDarkStyles({
946
+ color: (theme.vars || theme).palette.success[300],
947
+ borderColor: alpha(theme.palette.success[300], 0.2),
948
+ background: alpha(theme.palette.success[800], 0.2)
949
+ })
950
+ }),
951
+ ...(variant === 'filled' && {
952
+ ...(color === 'default' && {
953
+ border: '1px solid transparent',
954
+ color: (theme.vars || theme).palette.primary[700],
955
+ backgroundColor: alpha(theme.palette.primary[100], 0.5),
956
+ '&:hover': {
957
+ backgroundColor: (theme.vars || theme).palette.primary[100]
958
+ },
959
+ ...theme.applyDarkStyles({
960
+ color: '#fff',
961
+ backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
962
+ '&:hover': {
963
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600]
964
+ }
965
+ })
966
+ }),
967
+ ...(color === 'primary' && {
968
+ color: (theme.vars || theme).palette.primary[600],
969
+ backgroundColor: alpha(theme.palette.primary[100], 0.4),
970
+ '&:hover': {
971
+ backgroundColor: (theme.vars || theme).palette.primary[100]
972
+ },
973
+ '& .MuiChip-deleteIcon': {
974
+ color: (theme.vars || theme).palette.primary[600],
975
+ '&:hover': {
976
+ color: (theme.vars || theme).palette.primary[700]
977
+ }
978
+ },
979
+ '&.Mui-focusVisible': {
980
+ backgroundColor: (theme.vars || theme).palette.primary[200]
981
+ },
982
+ ...theme.applyDarkStyles({
983
+ color: (theme.vars || theme).palette.primary[100],
984
+ backgroundColor: alpha(theme.palette.primary[800], 0.5),
985
+ '&:hover': {
986
+ backgroundColor: alpha(theme.palette.primary[900], 0.5)
987
+ },
988
+ '& .MuiChip-deleteIcon': {
989
+ color: (theme.vars || theme).palette.primary[100],
990
+ '&:hover': {
991
+ color: (theme.vars || theme).palette.primary[50]
992
+ }
993
+ }
994
+ })
995
+ })
996
+ }),
997
+ // for labelling product in the search
998
+ // @ts-ignore internal repo module augmentation issue
999
+ ...(variant === 'light' && {
1000
+ ...(color === 'default' && {
1001
+ color: (theme.vars || theme).palette.primary[700],
1002
+ backgroundColor: alpha(theme.palette.primary[100], 0.3),
1003
+ ...theme.applyDarkStyles({
1004
+ color: (theme.vars || theme).palette.primary[200],
1005
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
1006
+ })
1007
+ }),
1008
+ ...(color === 'warning' && {
1009
+ color: (theme.vars || theme).palette.warning[900],
1010
+ backgroundColor: (theme.vars || theme).palette.warning[100],
1011
+ ...theme.applyDarkStyles({
1012
+ color: '#fff',
1013
+ backgroundColor: (theme.vars || theme).palette.warning[900]
1014
+ })
1015
+ }),
1016
+ ...(color === 'success' && {
1017
+ color: (theme.vars || theme).palette.success[900],
1018
+ backgroundColor: (theme.vars || theme).palette.success[100],
1019
+ ...theme.applyDarkStyles({
1020
+ color: '#fff',
1021
+ backgroundColor: (theme.vars || theme).palette.success[900]
1022
+ })
1023
+ })
1024
+ })
1025
+ })
866
1026
  }
867
1027
  },
868
1028
  MuiList: {
@@ -932,7 +1092,7 @@ export function getThemedComponents() {
932
1092
  root: ({
933
1093
  theme,
934
1094
  ownerState
935
- }) => [_extends({
1095
+ }) => [{
936
1096
  backgroundImage: 'none',
937
1097
  backgroundColor: '#fff',
938
1098
  '&[href]': {
@@ -940,47 +1100,49 @@ export function getThemedComponents() {
940
1100
  },
941
1101
  transition: theme.transitions.create(['border', 'box-shadow'], {
942
1102
  duration: theme.transitions.duration.shortest
943
- })
944
- }, ownerState.variant === 'outlined' && {
945
- display: 'block',
946
- borderColor: (theme.vars || theme).palette.grey[100],
947
- '&[href]': {
948
- textDecorationLine: 'none',
949
- 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`,
950
- '&:hover': {
951
- borderColor: (theme.vars || theme).palette.primary[200],
952
- boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1103
+ }),
1104
+ ...(ownerState.variant === 'outlined' && {
1105
+ display: 'block',
1106
+ borderColor: (theme.vars || theme).palette.grey[100],
1107
+ '&[href]': {
1108
+ textDecorationLine: 'none',
1109
+ 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`,
1110
+ '&:hover': {
1111
+ borderColor: (theme.vars || theme).palette.primary[200],
1112
+ boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1113
+ },
1114
+ '&:focus-visible': {
1115
+ outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
1116
+ outlineOffset: '2px'
1117
+ }
953
1118
  },
954
- '&:focus-visible': {
955
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
956
- outlineOffset: '2px'
957
- }
958
- },
959
- ':is(a&), :is(button&)': {
960
- '&:hover': {
961
- borderColor: (theme.vars || theme).palette.primary[200],
962
- boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
963
- }
964
- }
965
- }), theme.applyDarkStyles(_extends({
966
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
967
- }, ownerState.variant === 'outlined' && {
968
- borderColor: (theme.vars || theme).palette.primaryDark[700],
969
- backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
970
- '&[href]': {
971
- textDecorationLine: 'none',
972
- 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`,
973
- '&:hover': {
974
- borderColor: alpha(theme.palette.primary[600], 0.5),
975
- boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
1119
+ ':is(a&), :is(button&)': {
1120
+ '&:hover': {
1121
+ borderColor: (theme.vars || theme).palette.primary[200],
1122
+ boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1123
+ }
976
1124
  }
977
- },
978
- ':is(a&), :is(button&)': {
979
- '&:hover': {
980
- boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1125
+ })
1126
+ }, theme.applyDarkStyles({
1127
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900],
1128
+ ...(ownerState.variant === 'outlined' && {
1129
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
1130
+ backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
1131
+ '&[href]': {
1132
+ textDecorationLine: 'none',
1133
+ 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`,
1134
+ '&:hover': {
1135
+ borderColor: alpha(theme.palette.primary[600], 0.5),
1136
+ boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
1137
+ }
1138
+ },
1139
+ ':is(a&), :is(button&)': {
1140
+ '&:hover': {
1141
+ boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1142
+ }
981
1143
  }
982
- }
983
- }))]
1144
+ })
1145
+ })]
984
1146
  }
985
1147
  },
986
1148
  MuiTableCell: {
@@ -988,14 +1150,16 @@ export function getThemedComponents() {
988
1150
  root: ({
989
1151
  theme,
990
1152
  ownerState
991
- }) => _extends({
1153
+ }) => ({
992
1154
  padding: theme.spacing(1, 2),
993
- borderColor: (theme.vars || theme).palette.divider
994
- }, ownerState.variant === 'head' && {
995
- color: (theme.vars || theme).palette.text.primary,
996
- fontWeight: 700
997
- }, ownerState.variant === 'body' && {
998
- color: (theme.vars || theme).palette.text.secondary
1155
+ borderColor: (theme.vars || theme).palette.divider,
1156
+ ...(ownerState.variant === 'head' && {
1157
+ color: (theme.vars || theme).palette.text.primary,
1158
+ fontWeight: 700
1159
+ }),
1160
+ ...(ownerState.variant === 'body' && {
1161
+ color: (theme.vars || theme).palette.text.secondary
1162
+ })
999
1163
  })
1000
1164
  }
1001
1165
  },
@@ -1003,11 +1167,12 @@ export function getThemedComponents() {
1003
1167
  styleOverrides: {
1004
1168
  root: ({
1005
1169
  theme
1006
- }) => _extends({
1007
- backgroundColor: '#fff'
1008
- }, theme.applyDarkStyles({
1009
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1010
- }))
1170
+ }) => ({
1171
+ backgroundColor: '#fff',
1172
+ ...theme.applyDarkStyles({
1173
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1174
+ })
1175
+ })
1011
1176
  }
1012
1177
  },
1013
1178
  MuiToggleButton: {
@@ -1015,30 +1180,30 @@ export function getThemedComponents() {
1015
1180
  root: ({
1016
1181
  theme,
1017
1182
  ownerState
1018
- }) => [_extends({
1183
+ }) => [{
1019
1184
  textTransform: 'none',
1020
1185
  fontWeight: theme.typography.fontWeightMedium,
1021
1186
  color: theme.palette.text.secondary,
1022
- borderColor: theme.palette.grey[200]
1023
- }, ownerState.size === 'small' && {
1024
- padding: '0.375rem 0.75rem'
1025
- }, {
1187
+ borderColor: theme.palette.grey[200],
1188
+ ...(ownerState.size === 'small' && {
1189
+ padding: '0.375rem 0.75rem'
1190
+ }),
1026
1191
  '&.Mui-selected': {
1027
1192
  color: (theme.vars || theme).palette.primary[700],
1028
- borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1193
+ borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
1029
1194
  backgroundColor: (theme.vars || theme).palette.primary[50],
1030
1195
  '&:hover': {
1031
1196
  backgroundColor: (theme.vars || theme).palette.primary[100]
1032
1197
  }
1033
1198
  }
1034
- }), theme.applyDarkStyles({
1199
+ }, theme.applyDarkStyles({
1035
1200
  borderColor: theme.palette.primaryDark[700],
1036
1201
  '&:hover': {
1037
1202
  backgroundColor: alpha(theme.palette.primaryDark[600], 0.2)
1038
1203
  },
1039
1204
  '&.Mui-selected': {
1040
1205
  color: (theme.vars || theme).palette.primary[200],
1041
- borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1206
+ borderColor: `${(theme.vars || theme).palette.primary[800]} !important`,
1042
1207
  backgroundColor: alpha(theme.palette.primary[900], 0.4),
1043
1208
  '&:hover': {
1044
1209
  backgroundColor: alpha(theme.palette.primary[900], 0.8),
@@ -1049,11 +1214,20 @@ export function getThemedComponents() {
1049
1214
  }
1050
1215
  },
1051
1216
  MuiTooltip: {
1217
+ defaultProps: {
1218
+ arrow: true
1219
+ },
1052
1220
  styleOverrides: {
1053
- tooltip: {
1221
+ tooltip: ({
1222
+ theme
1223
+ }) => ({
1224
+ padding: '6px 8px',
1054
1225
  borderRadius: 6,
1055
- padding: '6px 12px'
1056
- }
1226
+ backgroundColor: (theme.vars || theme).palette.grey[800],
1227
+ '& .MuiTooltip-arrow': {
1228
+ color: (theme.vars || theme).palette.grey[800]
1229
+ }
1230
+ })
1057
1231
  }
1058
1232
  },
1059
1233
  MuiSwitch: {
@@ -1080,13 +1254,14 @@ export function getThemedComponents() {
1080
1254
  },
1081
1255
  track: ({
1082
1256
  theme
1083
- }) => _extends({
1257
+ }) => ({
1084
1258
  opacity: 1,
1085
1259
  borderRadius: 32,
1086
- backgroundColor: theme.palette.grey[400]
1087
- }, theme.applyDarkStyles({
1088
- backgroundColor: theme.palette.grey[800]
1089
- })),
1260
+ backgroundColor: theme.palette.grey[400],
1261
+ ...theme.applyDarkStyles({
1262
+ backgroundColor: theme.palette.grey[800]
1263
+ })
1264
+ }),
1090
1265
  thumb: {
1091
1266
  flexShrink: 0,
1092
1267
  width: '14px',
@@ -1094,6 +1269,25 @@ export function getThemedComponents() {
1094
1269
  }
1095
1270
  }
1096
1271
  },
1272
+ MuiSnackbar: {
1273
+ styleOverrides: {
1274
+ root: ({
1275
+ theme
1276
+ }) => ({
1277
+ '& .MuiSnackbarContent-root': {
1278
+ backgroundColor: '#FFF',
1279
+ color: (theme.vars || theme).palette.text.primary,
1280
+ fontWeight: theme.typography.fontWeightMedium,
1281
+ border: `1px solid ${(theme.vars || theme).palette.divider}`,
1282
+ boxShadow: `0 4px 16px ${alpha(theme.palette.grey[400], 0.2)}`,
1283
+ ...theme.applyDarkStyles({
1284
+ backgroundColor: (theme.vars || theme).palette.primaryDark[800],
1285
+ boxShadow: '0 4px 16px hsl(0, 100%, 1%)'
1286
+ })
1287
+ }
1288
+ })
1289
+ }
1290
+ },
1097
1291
  MuiPaginationItem: {
1098
1292
  styleOverrides: {
1099
1293
  root: ({
@@ -1142,5 +1336,11 @@ export function getThemedComponents() {
1142
1336
  }
1143
1337
  };
1144
1338
  }
1145
- export const brandingDarkTheme = createTheme(_extends({}, getDesignTokens('dark'), getThemedComponents()));
1146
- export const brandingLightTheme = createTheme(_extends({}, getDesignTokens('light'), getThemedComponents()));
1339
+ export const brandingDarkTheme = createTheme({
1340
+ ...getDesignTokens('dark'),
1341
+ ...getThemedComponents()
1342
+ });
1343
+ export const brandingLightTheme = createTheme({
1344
+ ...getDesignTokens('light'),
1345
+ ...getThemedComponents()
1346
+ });