@mui/docs 6.0.0-dev.240424162023-9968b4889d → 6.0.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.
Files changed (125) hide show
  1. package/Ad/Ad.d.ts +6 -0
  2. package/Ad/Ad.js +228 -0
  3. package/Ad/AdCarbon.d.ts +3 -0
  4. package/Ad/AdCarbon.js +120 -0
  5. package/Ad/AdDisplay.d.ts +16 -0
  6. package/Ad/AdDisplay.js +89 -0
  7. package/Ad/AdGuest.d.ts +10 -0
  8. package/Ad/AdGuest.js +29 -0
  9. package/Ad/AdInHouse.d.ts +5 -0
  10. package/Ad/AdInHouse.js +15 -0
  11. package/Ad/AdManager.d.ts +16 -0
  12. package/Ad/AdManager.js +36 -0
  13. package/Ad/AdProvider.d.ts +15 -0
  14. package/Ad/AdProvider.js +24 -0
  15. package/Ad/ad.styles.d.ts +4327 -0
  16. package/Ad/ad.styles.js +89 -0
  17. package/Ad/index.d.ts +5 -0
  18. package/Ad/index.js +7 -0
  19. package/Ad/package.json +6 -0
  20. package/CHANGELOG.md +1367 -22
  21. package/CodeCopy/CodeCopy.js +1 -1
  22. package/CodeCopy/CodeCopyButton.js +11 -20
  23. package/CodeCopy/index.js +3 -3
  24. package/CodeCopy/useClipboardCopy.js +1 -1
  25. package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
  26. package/ComponentLinkHeader/ComponentLinkHeader.js +197 -0
  27. package/ComponentLinkHeader/index.d.ts +2 -0
  28. package/ComponentLinkHeader/index.js +2 -0
  29. package/ComponentLinkHeader/package.json +6 -0
  30. package/DocsProvider/DocsProvider.d.ts +3 -1
  31. package/DocsProvider/DocsProvider.js +10 -5
  32. package/DocsProvider/index.js +1 -1
  33. package/HighlightedCode/HighlightedCode.d.ts +3 -1
  34. package/HighlightedCode/HighlightedCode.js +50 -24
  35. package/HighlightedCode/index.js +1 -1
  36. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.ts +29 -0
  37. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +355 -0
  38. package/HighlightedCodeWithTabs/index.d.ts +2 -0
  39. package/HighlightedCodeWithTabs/index.js +2 -0
  40. package/HighlightedCodeWithTabs/package.json +6 -0
  41. package/InfoCard/InfoCard.d.ts +0 -1
  42. package/InfoCard/InfoCard.js +46 -45
  43. package/InfoCard/index.js +1 -1
  44. package/Link/Link.js +41 -41
  45. package/Link/index.js +1 -1
  46. package/MarkdownElement/MarkdownElement.d.ts +1 -0
  47. package/MarkdownElement/MarkdownElement.js +187 -165
  48. package/MarkdownElement/index.js +1 -1
  49. package/NProgressBar/NProgressBar.js +6 -7
  50. package/NProgressBar/index.js +1 -1
  51. package/README.md +2 -2
  52. package/SectionTitle/SectionTitle.d.ts +7 -0
  53. package/SectionTitle/SectionTitle.js +30 -0
  54. package/SectionTitle/index.d.ts +1 -0
  55. package/SectionTitle/index.js +1 -0
  56. package/SectionTitle/package.json +6 -0
  57. package/branding/BrandingProvider.d.ts +1 -1
  58. package/branding/BrandingProvider.js +1 -1
  59. package/branding/brandingTheme.d.ts +2 -2
  60. package/branding/brandingTheme.js +657 -369
  61. package/branding/index.js +2 -2
  62. package/i18n/i18n.d.ts +2 -1
  63. package/i18n/i18n.js +19 -9
  64. package/i18n/index.js +1 -1
  65. package/node/Ad/Ad.js +238 -0
  66. package/node/Ad/AdCarbon.js +130 -0
  67. package/node/Ad/AdDisplay.js +97 -0
  68. package/node/Ad/AdGuest.js +37 -0
  69. package/node/Ad/AdInHouse.js +24 -0
  70. package/node/Ad/AdManager.js +46 -0
  71. package/node/Ad/AdProvider.js +33 -0
  72. package/node/Ad/ad.styles.js +97 -0
  73. package/node/Ad/index.js +63 -0
  74. package/node/CodeCopy/CodeCopy.js +10 -16
  75. package/node/CodeCopy/CodeCopyButton.js +10 -19
  76. package/node/CodeCopy/useClipboardCopy.js +1 -1
  77. package/node/ComponentLinkHeader/ComponentLinkHeader.js +206 -0
  78. package/node/ComponentLinkHeader/index.js +24 -0
  79. package/node/DocsProvider/DocsProvider.js +9 -4
  80. package/node/HighlightedCode/HighlightedCode.js +48 -22
  81. package/node/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +365 -0
  82. package/node/HighlightedCodeWithTabs/index.js +24 -0
  83. package/node/InfoCard/InfoCard.js +45 -44
  84. package/node/Link/Link.js +43 -42
  85. package/node/MarkdownElement/MarkdownElement.js +642 -623
  86. package/node/NProgressBar/NProgressBar.js +6 -7
  87. package/node/SectionTitle/SectionTitle.js +38 -0
  88. package/node/SectionTitle/index.js +16 -0
  89. package/node/branding/brandingTheme.js +657 -369
  90. package/node/i18n/i18n.js +18 -8
  91. package/node/svgIcons/AdobeXDIcon.js +22 -0
  92. package/node/svgIcons/BundleSizeIcon.js +22 -0
  93. package/node/svgIcons/FigmaIcon.js +31 -0
  94. package/node/svgIcons/FileDownload.js +3 -3
  95. package/node/svgIcons/JavaScript.js +3 -3
  96. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  97. package/node/svgIcons/SketchIcon.js +36 -0
  98. package/node/svgIcons/TypeScript.js +3 -3
  99. package/node/svgIcons/W3CIcon.js +24 -0
  100. package/node/translations/translations.json +9 -4
  101. package/node/utils/loadScript.js +15 -0
  102. package/package.json +12 -10
  103. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  104. package/svgIcons/AdobeXDIcon.js +14 -0
  105. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  106. package/svgIcons/BundleSizeIcon.js +14 -0
  107. package/svgIcons/FigmaIcon.d.ts +4 -0
  108. package/svgIcons/FigmaIcon.js +23 -0
  109. package/svgIcons/FileDownload.d.ts +7 -0
  110. package/svgIcons/FileDownload.js +3 -3
  111. package/svgIcons/JavaScript.d.ts +7 -0
  112. package/svgIcons/JavaScript.js +3 -3
  113. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  114. package/svgIcons/MaterialDesignIcon.js +19 -0
  115. package/svgIcons/SketchIcon.d.ts +4 -0
  116. package/svgIcons/SketchIcon.js +28 -0
  117. package/svgIcons/TypeScript.d.ts +7 -0
  118. package/svgIcons/TypeScript.js +3 -3
  119. package/svgIcons/W3CIcon.d.ts +4 -0
  120. package/svgIcons/W3CIcon.js +16 -0
  121. package/translations/index.js +1 -1
  122. package/translations/translations.json +9 -4
  123. package/tsconfig.build.tsbuildinfo +1 -1
  124. package/utils/loadScript.d.ts +1 -0
  125. package/utils/loadScript.js +9 -0
@@ -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)',
@@ -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,183 @@ 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: 1.5,
442
+ fontWeight: theme.typography.fontWeightMedium,
443
+ padding: theme.spacing('8px', '12px', '8px', '14px'),
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
+ fontWeight: theme.typography.fontWeightMedium,
456
+ lineHeight: 1.25,
457
+ padding: theme.spacing('8px', '10px', '10px', '12px'),
458
+ borderRadius: 10,
459
+ '& > span': {
460
+ transition: '0.2s',
461
+ marginLeft: 4
462
+ },
463
+ '&:hover > span': {
464
+ transform: 'translateX(2px)'
465
+ }
466
+ }),
467
+ ...(ownerState.size === 'small' && {
468
+ padding: '6px 10px',
469
+ fontFamily: theme.typography.fontFamily,
470
+ fontSize: defaultTheme.typography.pxToRem(13),
471
+ fontWeight: theme.typography.fontWeightMedium,
472
+ borderRadius: 10,
398
473
  '& .MuiButton-startIcon': {
399
- transform: 'translateX(-2px)'
474
+ transition: '0.15s',
475
+ marginRight: 4,
476
+ marginLeft: -1
400
477
  },
401
478
  '& .MuiButton-endIcon': {
402
- transform: 'translateX(2px)'
479
+ transition: '0.15s',
480
+ marginLeft: 4
481
+ },
482
+ '&:hover': {
483
+ '& .MuiButton-startIcon': {
484
+ transform: 'translateX(-2px)'
485
+ },
486
+ '& .MuiButton-endIcon': {
487
+ transform: 'translateX(2px)'
488
+ }
403
489
  }
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
- })))
490
+ }),
491
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
492
+ color: (theme.vars || theme).palette.text.primary,
493
+ backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
494
+ borderColor: (theme.vars || theme).palette.primaryDark[100],
495
+ boxShadow: `#FFF 0 1px 0 1px inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
496
+ '&:hover': {
497
+ backgroundColor: (theme.vars || theme).palette.grey[50]
498
+ },
499
+ '&:active': {
500
+ backgroundColor: (theme.vars || theme).palette.grey[100]
501
+ },
502
+ ...theme.applyDarkStyles({
503
+ color: (theme.vars || theme).palette.primaryDark[100],
504
+ borderColor: alpha(theme.palette.primaryDark[600], 0.5),
505
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
506
+ boxShadow: `${alpha(theme.palette.primaryDark[700], 0.3)} 0 1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
507
+ '&:hover': {
508
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
509
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
510
+ },
511
+ '&:active': {
512
+ backgroundColor: (theme.vars || theme).palette.primaryDark[800]
513
+ }
514
+ })
515
+ }),
516
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'primary' && {
517
+ color: (theme.vars || theme).palette.primary[600],
518
+ backgroundColor: alpha(theme.palette.primary[50], 0.2),
519
+ borderColor: (theme.vars || theme).palette.primary[100],
520
+ boxShadow: `${alpha(theme.palette.primary[100], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
521
+ '&:hover': {
522
+ backgroundColor: (theme.vars || theme).palette.primary[50],
523
+ borderColor: (theme.vars || theme).palette.primary[200]
524
+ },
525
+ '&:active': {
526
+ backgroundColor: alpha(theme.palette.primary[100], 0.7)
527
+ },
528
+ ...theme.applyDarkStyles({
529
+ color: (theme.vars || theme).palette.primary[200],
530
+ borderColor: alpha(theme.palette.primary[900], 0.7),
531
+ backgroundColor: alpha(theme.palette.primary[900], 0.2),
532
+ boxShadow: `${alpha(theme.palette.primary[900], 0.2)} 0 1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
533
+ '&:hover': {
534
+ backgroundColor: alpha(theme.palette.primary[900], 0.5),
535
+ borderColor: (theme.vars || theme).palette.primary[900]
536
+ },
537
+ '&:active': {
538
+ backgroundColor: alpha(theme.palette.primary[900], 0.3)
539
+ }
540
+ })
541
+ }),
542
+ ...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
543
+ color: '#fff',
544
+ textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
545
+ backgroundColor: (theme.vars || theme).palette.primary[500],
546
+ backgroundImage: 'transparent',
547
+ border: '1px solid ',
548
+ borderColor: (theme.vars || theme).palette.primary[600],
549
+ boxShadow: `${alpha(theme.palette.primary[400], 0.5)} 0 1px 0 inset, ${alpha(theme.palette.primary[800], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
550
+ '&:hover': {
551
+ backgroundColor: (theme.vars || theme).palette.primary[700],
552
+ borderColor: (theme.vars || theme).palette.primary[800]
553
+ },
554
+ '&:active': {
555
+ backgroundColor: (theme.vars || theme).palette.primary[800],
556
+ borderColor: (theme.vars || theme).palette.primary[600],
557
+ boxShadow: `${alpha(theme.palette.primary[900], 0.7)} 0 1px 0 1px inset`
558
+ }
559
+ }),
560
+ ...(ownerState.variant === 'contained' && ownerState.color === 'secondary' && {
561
+ color: '#fff',
562
+ textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
563
+ backgroundColor: (theme.vars || theme).palette.primaryDark[500],
564
+ backgroundImage: 'transparent',
565
+ border: '1px solid ',
566
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
567
+ boxShadow: `${alpha(theme.palette.primaryDark[400], 0.5)} 0 1px 0 1px inset, ${alpha(theme.palette.primaryDark[800], 0.7)} 0 -1px 0 1px inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
568
+ '&:hover': {
569
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600],
570
+ borderColor: (theme.vars || theme).palette.primaryDark[700]
571
+ },
572
+ '&:active': {
573
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
574
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
575
+ boxShadow: `${alpha(theme.palette.primaryDark[900], 0.7)} 0 1px 0 1px inset`
576
+ }
577
+ }),
578
+ ...(ownerState.variant === 'text' && ownerState.color === 'secondary' && {
579
+ color: (theme.vars || theme).palette.text.secondary,
580
+ '&:hover': {
581
+ backgroundColor: (theme.vars || theme).palette.grey[50]
582
+ },
583
+ '&:active': {
584
+ backgroundColor: (theme.vars || theme).palette.grey[200]
585
+ },
586
+ ...theme.applyDarkStyles({
587
+ '&:hover': {
588
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
589
+ },
590
+ '&:active': {
591
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
592
+ }
593
+ })
594
+ }),
595
+ ...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
596
+ color: (theme.vars || theme).palette.primary[600],
597
+ '&:hover': {
598
+ backgroundColor: alpha(theme.palette.primary[100], 0.3)
599
+ },
600
+ '&:active': {
601
+ backgroundColor: alpha(theme.palette.primary[100], 0.5)
602
+ },
603
+ ...theme.applyDarkStyles({
604
+ color: (theme.vars || theme).palette.primary[300],
605
+ '&:hover': {
606
+ backgroundColor: alpha(theme.palette.primary[900], 0.3)
607
+ },
608
+ '&:active': {
609
+ backgroundColor: alpha(theme.palette.primary[900], 0.1)
610
+ }
611
+ })
612
+ })
613
+ })
457
614
  },
458
615
  variants: [{
459
616
  // @ts-ignore internal repo module augmentation issue
@@ -571,23 +728,54 @@ export function getThemedComponents() {
571
728
  },
572
729
  style: ({
573
730
  theme
574
- }) => _extends({
731
+ }) => ({
575
732
  marginBottom: 1,
576
733
  fontSize: theme.typography.pxToRem(14),
577
734
  fontWeight: theme.typography.fontWeightBold,
578
735
  color: (theme.vars || theme).palette.primary[600],
579
736
  '&:hover': {
580
737
  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
- }))
738
+ },
739
+ ...theme.applyDarkStyles({
740
+ color: (theme.vars || theme).palette.primary[300],
741
+ '&:hover': {
742
+ backgroundColor: alpha(theme.palette.primary[800], 0.3)
743
+ }
744
+ })
745
+ })
588
746
  }]
589
747
  },
590
748
  MuiIconButton: {
749
+ styleOverrides: {
750
+ root: ({
751
+ theme,
752
+ ownerState
753
+ }) => ({
754
+ borderRadius: theme.shape.borderRadius,
755
+ transition: 'all 100ms ease-in',
756
+ '&:hover': {
757
+ borderColor: (theme.vars || theme).palette.grey[300],
758
+ background: (theme.vars || theme).palette.grey[50],
759
+ ...theme.applyDarkStyles({
760
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
761
+ background: alpha(theme.palette.primaryDark[700], 0.8)
762
+ })
763
+ },
764
+ '&:active': {
765
+ background: (theme.vars || theme).palette.grey[100],
766
+ ...theme.applyDarkStyles({
767
+ background: theme.palette.primaryDark[800]
768
+ })
769
+ },
770
+ ...(ownerState.size === 'small' && {
771
+ height: 32,
772
+ width: 32,
773
+ '& .MuiSvgIcon-root': {
774
+ fontSize: defaultTheme.typography.pxToRem(18)
775
+ }
776
+ })
777
+ })
778
+ },
591
779
  variants: [{
592
780
  props: {
593
781
  color: 'primary'
@@ -595,26 +783,30 @@ export function getThemedComponents() {
595
783
  style: ({
596
784
  theme
597
785
  }) => [{
598
- height: 34,
599
- width: 34,
600
- border: `1px solid`,
601
- borderRadius: theme.shape.borderRadius,
602
786
  color: (theme.vars || theme).palette.primary.main,
603
787
  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`,
788
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
789
+ 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
790
  '&:hover': {
607
791
  borderColor: (theme.vars || theme).palette.grey[300],
608
- background: (theme.vars || theme).palette.grey[50]
792
+ background: (theme.vars || theme).palette.grey[50],
793
+ boxShadow: `${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
794
+ },
795
+ '&:active': {
796
+ background: (theme.vars || theme).palette.grey[100]
609
797
  }
610
798
  }, theme.applyDarkStyles({
611
799
  color: (theme.vars || theme).palette.primary[300],
612
800
  borderColor: alpha(theme.palette.primaryDark[600], 0.5),
613
801
  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`,
802
+ 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
803
  '&:hover': {
616
- borderColor: (theme.vars || theme).palette.primaryDark[500],
617
- background: alpha(theme.palette.primaryDark[700], 0.4)
804
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
805
+ background: alpha(theme.palette.primaryDark[700], 0.8),
806
+ boxShadow: `${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
807
+ },
808
+ '&:active': {
809
+ background: theme.palette.primaryDark[800]
618
810
  }
619
811
  })]
620
812
  }, {
@@ -624,27 +816,30 @@ export function getThemedComponents() {
624
816
  style: ({
625
817
  theme
626
818
  }) => [{
627
- height: 34,
628
- width: 34,
629
- color: (theme.vars || theme).palette.text.tertiary,
630
- borderRadius: theme.shape.borderRadius,
631
- border: `1px solid`,
819
+ color: (theme.vars || theme).palette.text.secondary,
632
820
  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`,
821
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
822
+ 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
823
  '&:hover': {
636
- color: (theme.vars || theme).palette.primary.main,
824
+ color: (theme.vars || theme).palette.text.primary,
637
825
  borderColor: (theme.vars || theme).palette.grey[300],
638
- background: (theme.vars || theme).palette.grey[50]
826
+ background: (theme.vars || theme).palette.grey[50],
827
+ boxShadow: `${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
828
+ },
829
+ '&:active': {
830
+ background: (theme.vars || theme).palette.grey[100]
639
831
  }
640
832
  }, theme.applyDarkStyles({
641
833
  borderColor: alpha(theme.palette.primaryDark[600], 0.5),
642
834
  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`,
835
+ 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
836
  '&: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)
837
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
838
+ background: alpha(theme.palette.primaryDark[700], 0.8),
839
+ boxShadow: `${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
840
+ },
841
+ '&:active': {
842
+ background: theme.palette.primaryDark[800]
648
843
  }
649
844
  })]
650
845
  }]
@@ -654,17 +849,29 @@ export function getThemedComponents() {
654
849
  paper: ({
655
850
  theme
656
851
  }) => [{
852
+ padding: '6px',
657
853
  minWidth: 160,
658
854
  color: (theme.vars || theme).palette.text.secondary,
659
855
  backgroundImage: 'none',
660
856
  border: '1px solid',
661
857
  backgroundColor: (theme.vars || theme).palette.background.paper,
662
858
  borderColor: (theme.vars || theme).palette.grey[200],
859
+ '& .MuiMenu-list': {
860
+ display: 'flex',
861
+ flexDirection: 'column',
862
+ gap: '2px',
863
+ '& .MuiDivider-root': {
864
+ margin: '4px -8px 4px -8px'
865
+ }
866
+ },
663
867
  '& .MuiMenuItem-root': {
868
+ padding: '6px 8px',
869
+ borderRadius: '6px',
664
870
  fontSize: theme.typography.pxToRem(14),
665
- fontWeight: 500,
666
- '&:hover, &:focus': {
667
- backgroundColor: (theme.vars || theme).palette.grey[50]
871
+ fontWeight: theme.typography.fontWeightMedium,
872
+ '&:hover': {
873
+ backgroundColor: (theme.vars || theme).palette.grey[100],
874
+ color: (theme.vars || theme).palette.text.primary
668
875
  },
669
876
  '&:focus-visible': {
670
877
  outline: 'none'
@@ -679,11 +886,11 @@ export function getThemedComponents() {
679
886
  backgroundColor: (theme.vars || theme).palette.primaryDark[900],
680
887
  borderColor: (theme.vars || theme).palette.primaryDark[700],
681
888
  '& .MuiMenuItem-root': {
682
- '&:hover, &:focus': {
889
+ '&:hover': {
683
890
  backgroundColor: (theme.vars || theme).palette.primaryDark[700]
684
891
  },
685
892
  '&.Mui-selected': {
686
- color: (theme.vars || theme).palette.primary[300],
893
+ color: (theme.vars || theme).palette.primary[200],
687
894
  backgroundColor: alpha(theme.palette.primary[900], 0.4)
688
895
  }
689
896
  }
@@ -694,22 +901,21 @@ export function getThemedComponents() {
694
901
  styleOverrides: {
695
902
  paper: ({
696
903
  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
- }))
904
+ }) => ({
905
+ boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)',
906
+ ...theme.applyDarkStyles({
907
+ boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
908
+ })
909
+ })
702
910
  }
703
911
  },
704
912
  MuiDivider: {
705
913
  styleOverrides: {
706
914
  root: ({
707
915
  theme
708
- }) => _extends({
709
- borderColor: (theme.vars || theme).palette.grey[100]
710
- }, theme.applyDarkStyles({
711
- borderColor: alpha(theme.palette.primaryDark[500], 0.3)
712
- }))
916
+ }) => ({
917
+ borderColor: (theme.vars || theme).palette.divider
918
+ })
713
919
  }
714
920
  },
715
921
  MuiLink: {
@@ -762,107 +968,131 @@ export function getThemedComponents() {
762
968
  variant
763
969
  },
764
970
  theme
765
- }) => _extends({
971
+ }) => ({
766
972
  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: alpha(theme.palette.primary[100], 0.2)
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],
973
+ paddingBottom: 0.2,
974
+ ...(variant === 'outlined' && color === 'default' && {
975
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
976
+ color: (theme.vars || theme).palette.grey[900],
977
+ borderColor: (theme.vars || theme).palette.grey[200],
828
978
  '&: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],
843
- '&: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
- }))))
979
+ backgroundColor: (theme.vars || theme).palette.grey[100],
980
+ color: (theme.vars || theme).palette.grey[900]
981
+ },
982
+ ...theme.applyDarkStyles({
983
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
984
+ color: (theme.vars || theme).palette.grey[300],
985
+ borderColor: alpha(theme.palette.primaryDark[500], 0.5),
986
+ '&:hover': {
987
+ color: (theme.vars || theme).palette.grey[300],
988
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
989
+ }
990
+ })
991
+ }),
992
+ ...(variant === 'outlined' && color === 'info' && {
993
+ backgroundColor: alpha(theme.palette.grey[50], 0.5),
994
+ color: (theme.vars || theme).palette.grey[900],
995
+ borderColor: (theme.vars || theme).palette.grey[200],
996
+ ...theme.applyDarkStyles({
997
+ color: (theme.vars || theme).palette.grey[300],
998
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
999
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
1000
+ })
1001
+ }),
1002
+ ...(variant === 'outlined' && color === 'primary' && {
1003
+ borderColor: (theme.vars || theme).palette.primary[100],
1004
+ backgroundColor: alpha(theme.palette.primary[100], 0.2),
1005
+ ...theme.applyDarkStyles({
1006
+ color: (theme.vars || theme).palette.primary[300],
1007
+ borderColor: alpha(theme.palette.primary[500], 0.2),
1008
+ backgroundColor: alpha(theme.palette.primary[700], 0.2)
1009
+ })
1010
+ }),
1011
+ ...(variant === 'outlined' && color === 'success' && {
1012
+ borderColor: (theme.vars || theme).palette.success[100],
1013
+ backgroundColor: (theme.vars || theme).palette.success[50],
1014
+ color: (theme.vars || theme).palette.success[900],
1015
+ ...theme.applyDarkStyles({
1016
+ color: (theme.vars || theme).palette.success[300],
1017
+ borderColor: alpha(theme.palette.success[300], 0.2),
1018
+ background: alpha(theme.palette.success[800], 0.2)
1019
+ })
1020
+ }),
1021
+ ...(variant === 'filled' && {
1022
+ ...(color === 'default' && {
1023
+ border: '1px solid transparent',
1024
+ color: (theme.vars || theme).palette.primary[700],
1025
+ backgroundColor: alpha(theme.palette.primary[100], 0.5),
1026
+ '&:hover': {
1027
+ backgroundColor: (theme.vars || theme).palette.primary[100]
1028
+ },
1029
+ ...theme.applyDarkStyles({
1030
+ color: '#fff',
1031
+ backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
1032
+ '&:hover': {
1033
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600]
1034
+ }
1035
+ })
1036
+ }),
1037
+ ...(color === 'primary' && {
1038
+ color: (theme.vars || theme).palette.primary[600],
1039
+ backgroundColor: alpha(theme.palette.primary[100], 0.4),
1040
+ '&:hover': {
1041
+ backgroundColor: (theme.vars || theme).palette.primary[100]
1042
+ },
1043
+ '& .MuiChip-deleteIcon': {
1044
+ color: (theme.vars || theme).palette.primary[600],
1045
+ '&:hover': {
1046
+ color: (theme.vars || theme).palette.primary[700]
1047
+ }
1048
+ },
1049
+ '&.Mui-focusVisible': {
1050
+ backgroundColor: (theme.vars || theme).palette.primary[200]
1051
+ },
1052
+ ...theme.applyDarkStyles({
1053
+ color: (theme.vars || theme).palette.primary[100],
1054
+ backgroundColor: alpha(theme.palette.primary[800], 0.5),
1055
+ '&:hover': {
1056
+ backgroundColor: alpha(theme.palette.primary[900], 0.5)
1057
+ },
1058
+ '& .MuiChip-deleteIcon': {
1059
+ color: (theme.vars || theme).palette.primary[100],
1060
+ '&:hover': {
1061
+ color: (theme.vars || theme).palette.primary[50]
1062
+ }
1063
+ }
1064
+ })
1065
+ })
1066
+ }),
1067
+ // for labelling product in the search
1068
+ // @ts-ignore internal repo module augmentation issue
1069
+ ...(variant === 'light' && {
1070
+ ...(color === 'default' && {
1071
+ color: (theme.vars || theme).palette.primary[700],
1072
+ backgroundColor: alpha(theme.palette.primary[100], 0.3),
1073
+ ...theme.applyDarkStyles({
1074
+ color: (theme.vars || theme).palette.primary[200],
1075
+ backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
1076
+ })
1077
+ }),
1078
+ ...(color === 'warning' && {
1079
+ color: (theme.vars || theme).palette.warning[900],
1080
+ backgroundColor: (theme.vars || theme).palette.warning[100],
1081
+ ...theme.applyDarkStyles({
1082
+ color: '#fff',
1083
+ backgroundColor: (theme.vars || theme).palette.warning[900]
1084
+ })
1085
+ }),
1086
+ ...(color === 'success' && {
1087
+ color: (theme.vars || theme).palette.success[900],
1088
+ backgroundColor: (theme.vars || theme).palette.success[100],
1089
+ ...theme.applyDarkStyles({
1090
+ color: '#fff',
1091
+ backgroundColor: (theme.vars || theme).palette.success[900]
1092
+ })
1093
+ })
1094
+ })
1095
+ })
866
1096
  }
867
1097
  },
868
1098
  MuiList: {
@@ -932,7 +1162,7 @@ export function getThemedComponents() {
932
1162
  root: ({
933
1163
  theme,
934
1164
  ownerState
935
- }) => [_extends({
1165
+ }) => [{
936
1166
  backgroundImage: 'none',
937
1167
  backgroundColor: '#fff',
938
1168
  '&[href]': {
@@ -940,47 +1170,49 @@ export function getThemedComponents() {
940
1170
  },
941
1171
  transition: theme.transitions.create(['border', 'box-shadow'], {
942
1172
  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]}`
1173
+ }),
1174
+ ...(ownerState.variant === 'outlined' && {
1175
+ display: 'block',
1176
+ borderColor: (theme.vars || theme).palette.grey[100],
1177
+ '&[href]': {
1178
+ textDecorationLine: 'none',
1179
+ 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`,
1180
+ '&:hover': {
1181
+ borderColor: (theme.vars || theme).palette.primary[200],
1182
+ boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1183
+ },
1184
+ '&:focus-visible': {
1185
+ outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
1186
+ outlineOffset: '2px'
1187
+ }
953
1188
  },
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)}`
1189
+ ':is(a&), :is(button&)': {
1190
+ '&:hover': {
1191
+ borderColor: (theme.vars || theme).palette.primary[200],
1192
+ boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1193
+ }
976
1194
  }
977
- },
978
- ':is(a&), :is(button&)': {
979
- '&:hover': {
980
- boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1195
+ })
1196
+ }, theme.applyDarkStyles({
1197
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900],
1198
+ ...(ownerState.variant === 'outlined' && {
1199
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
1200
+ backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
1201
+ '&[href]': {
1202
+ textDecorationLine: 'none',
1203
+ 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`,
1204
+ '&:hover': {
1205
+ borderColor: alpha(theme.palette.primary[600], 0.5),
1206
+ boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
1207
+ }
1208
+ },
1209
+ ':is(a&), :is(button&)': {
1210
+ '&:hover': {
1211
+ boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1212
+ }
981
1213
  }
982
- }
983
- }))]
1214
+ })
1215
+ })]
984
1216
  }
985
1217
  },
986
1218
  MuiTableCell: {
@@ -988,14 +1220,16 @@ export function getThemedComponents() {
988
1220
  root: ({
989
1221
  theme,
990
1222
  ownerState
991
- }) => _extends({
1223
+ }) => ({
992
1224
  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
1225
+ borderColor: (theme.vars || theme).palette.divider,
1226
+ ...(ownerState.variant === 'head' && {
1227
+ color: (theme.vars || theme).palette.text.primary,
1228
+ fontWeight: 700
1229
+ }),
1230
+ ...(ownerState.variant === 'body' && {
1231
+ color: (theme.vars || theme).palette.text.secondary
1232
+ })
999
1233
  })
1000
1234
  }
1001
1235
  },
@@ -1003,11 +1237,12 @@ export function getThemedComponents() {
1003
1237
  styleOverrides: {
1004
1238
  root: ({
1005
1239
  theme
1006
- }) => _extends({
1007
- backgroundColor: '#fff'
1008
- }, theme.applyDarkStyles({
1009
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1010
- }))
1240
+ }) => ({
1241
+ backgroundColor: '#fff',
1242
+ ...theme.applyDarkStyles({
1243
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1244
+ })
1245
+ })
1011
1246
  }
1012
1247
  },
1013
1248
  MuiToggleButton: {
@@ -1015,14 +1250,14 @@ export function getThemedComponents() {
1015
1250
  root: ({
1016
1251
  theme,
1017
1252
  ownerState
1018
- }) => [_extends({
1253
+ }) => [{
1019
1254
  textTransform: 'none',
1020
1255
  fontWeight: theme.typography.fontWeightMedium,
1021
1256
  color: theme.palette.text.secondary,
1022
- borderColor: theme.palette.grey[200]
1023
- }, ownerState.size === 'small' && {
1024
- padding: '0.375rem 0.75rem'
1025
- }, {
1257
+ borderColor: theme.palette.grey[200],
1258
+ ...(ownerState.size === 'small' && {
1259
+ padding: '0.375rem 0.75rem'
1260
+ }),
1026
1261
  '&.Mui-selected': {
1027
1262
  color: (theme.vars || theme).palette.primary[700],
1028
1263
  borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
@@ -1031,7 +1266,7 @@ export function getThemedComponents() {
1031
1266
  backgroundColor: (theme.vars || theme).palette.primary[100]
1032
1267
  }
1033
1268
  }
1034
- }), theme.applyDarkStyles({
1269
+ }, theme.applyDarkStyles({
1035
1270
  borderColor: theme.palette.primaryDark[700],
1036
1271
  '&:hover': {
1037
1272
  backgroundColor: alpha(theme.palette.primaryDark[600], 0.2)
@@ -1049,11 +1284,20 @@ export function getThemedComponents() {
1049
1284
  }
1050
1285
  },
1051
1286
  MuiTooltip: {
1287
+ defaultProps: {
1288
+ arrow: true
1289
+ },
1052
1290
  styleOverrides: {
1053
- tooltip: {
1291
+ tooltip: ({
1292
+ theme
1293
+ }) => ({
1294
+ padding: '6px 8px',
1054
1295
  borderRadius: 6,
1055
- padding: '6px 12px'
1056
- }
1296
+ backgroundColor: (theme.vars || theme).palette.grey[800],
1297
+ '& .MuiTooltip-arrow': {
1298
+ color: (theme.vars || theme).palette.grey[800]
1299
+ }
1300
+ })
1057
1301
  }
1058
1302
  },
1059
1303
  MuiSwitch: {
@@ -1064,7 +1308,7 @@ export function getThemedComponents() {
1064
1308
  padding: 0,
1065
1309
  '& .MuiSwitch-switchBase': {
1066
1310
  '&.Mui-checked': {
1067
- transform: 'translateX(11px)',
1311
+ transform: 'translateX(12px)',
1068
1312
  color: '#fff'
1069
1313
  }
1070
1314
  }
@@ -1080,13 +1324,14 @@ export function getThemedComponents() {
1080
1324
  },
1081
1325
  track: ({
1082
1326
  theme
1083
- }) => _extends({
1327
+ }) => ({
1084
1328
  opacity: 1,
1085
1329
  borderRadius: 32,
1086
- backgroundColor: theme.palette.grey[400]
1087
- }, theme.applyDarkStyles({
1088
- backgroundColor: theme.palette.grey[800]
1089
- })),
1330
+ backgroundColor: theme.palette.grey[400],
1331
+ ...theme.applyDarkStyles({
1332
+ backgroundColor: theme.palette.grey[800]
1333
+ })
1334
+ }),
1090
1335
  thumb: {
1091
1336
  flexShrink: 0,
1092
1337
  width: '14px',
@@ -1094,6 +1339,25 @@ export function getThemedComponents() {
1094
1339
  }
1095
1340
  }
1096
1341
  },
1342
+ MuiSnackbar: {
1343
+ styleOverrides: {
1344
+ root: ({
1345
+ theme
1346
+ }) => ({
1347
+ '& .MuiSnackbarContent-root': {
1348
+ backgroundColor: '#FFF',
1349
+ color: (theme.vars || theme).palette.text.primary,
1350
+ fontWeight: theme.typography.fontWeightMedium,
1351
+ border: `1px solid ${(theme.vars || theme).palette.divider}`,
1352
+ boxShadow: `0 4px 16px ${alpha(theme.palette.grey[400], 0.2)}`,
1353
+ ...theme.applyDarkStyles({
1354
+ backgroundColor: (theme.vars || theme).palette.primaryDark[800],
1355
+ boxShadow: '0 4px 16px hsl(0, 100%, 1%)'
1356
+ })
1357
+ }
1358
+ })
1359
+ }
1360
+ },
1097
1361
  MuiPaginationItem: {
1098
1362
  styleOverrides: {
1099
1363
  root: ({
@@ -1138,9 +1402,33 @@ export function getThemedComponents() {
1138
1402
  // scrollbarGutter: 'stable',
1139
1403
  }
1140
1404
  }
1405
+ },
1406
+ MuiCard: {
1407
+ styleOverrides: {
1408
+ root: ({
1409
+ theme,
1410
+ ownerState
1411
+ }) => ({
1412
+ ...(ownerState.variant === 'elevation' && {
1413
+ border: '1px solid',
1414
+ borderColor: (theme.vars || theme).palette.grey[100],
1415
+ boxShadow: `${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[300], 0.5)} 0 1px 8px 0`,
1416
+ ...theme.applyDarkStyles({
1417
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
1418
+ boxShadow: `${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 8px 0`
1419
+ })
1420
+ })
1421
+ })
1422
+ }
1141
1423
  }
1142
1424
  }
1143
1425
  };
1144
1426
  }
1145
- export const brandingDarkTheme = createTheme(_extends({}, getDesignTokens('dark'), getThemedComponents()));
1146
- export const brandingLightTheme = createTheme(_extends({}, getDesignTokens('light'), getThemedComponents()));
1427
+ export const brandingDarkTheme = createTheme({
1428
+ ...getDesignTokens('dark'),
1429
+ ...getThemedComponents()
1430
+ });
1431
+ export const brandingLightTheme = createTheme({
1432
+ ...getDesignTokens('light'),
1433
+ ...getThemedComponents()
1434
+ });