@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
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getMetaThemeColor = exports.getDesignTokens = exports.error = exports.brandingLightTheme = exports.brandingDarkTheme = exports.blueDark = exports.blue = void 0;
8
8
  exports.getThemedComponents = getThemedComponents;
9
9
  exports.warning = exports.success = exports.grey = void 0;
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
10
  var _ArrowDropDownRounded = _interopRequireDefault(require("@mui/icons-material/ArrowDropDownRounded"));
12
11
  var _styles = require("@mui/material/styles");
13
12
  // TODO: enable this once types conflict is fixed
@@ -104,57 +103,75 @@ const getMetaThemeColor = mode => {
104
103
  };
105
104
  exports.getMetaThemeColor = getMetaThemeColor;
106
105
  const getDesignTokens = mode => ({
107
- palette: (0, _extends2.default)({
108
- primary: (0, _extends2.default)({}, blue, mode === 'dark' && {
109
- main: blue[400]
110
- }),
111
- secondary: (0, _extends2.default)({}, grey, mode === 'light' && {
112
- main: blueDark[100],
113
- contrastText: blueDark[600]
114
- }, mode === 'dark' && {
115
- main: blueDark[700],
116
- contrastText: blueDark[600]
117
- }),
106
+ palette: {
107
+ primary: {
108
+ ...blue,
109
+ ...(mode === 'dark' && {
110
+ main: blue[400]
111
+ })
112
+ },
113
+ secondary: {
114
+ ...grey,
115
+ ...(mode === 'light' && {
116
+ main: blueDark[100],
117
+ contrastText: blueDark[600]
118
+ }),
119
+ ...(mode === 'dark' && {
120
+ main: blueDark[700],
121
+ contrastText: blueDark[600]
122
+ })
123
+ },
118
124
  divider: mode === 'dark' ? (0, _styles.alpha)(blueDark[500], 0.3) : grey[100],
119
125
  primaryDark: blueDark,
120
- mode
121
- }, mode === 'dark' && {
122
- background: {
123
- default: blueDark[900],
124
- paper: (0, _styles.alpha)(blueDark[800], 0.8)
125
- }
126
- }, {
126
+ mode,
127
+ ...(mode === 'dark' && {
128
+ background: {
129
+ default: blueDark[900],
130
+ paper: (0, _styles.alpha)(blueDark[800], 0.8)
131
+ }
132
+ }),
127
133
  common: {
128
134
  black: 'hsl(200, 10%, 4%)'
129
135
  },
130
- text: (0, _extends2.default)({}, mode === 'light' && {
131
- primary: grey[900],
132
- secondary: grey[800],
133
- tertiary: grey[700]
134
- }, mode === 'dark' && {
135
- primary: '#fff',
136
- secondary: grey[400],
137
- tertiary: grey[500]
138
- }),
139
- grey: (0, _extends2.default)({}, grey, mode === 'light' && {
140
- main: grey[100],
141
- contrastText: grey[600]
142
- }, mode === 'dark' && {
143
- main: grey[700],
144
- contrastText: grey[600]
145
- }),
136
+ text: {
137
+ ...(mode === 'light' && {
138
+ primary: grey[900],
139
+ secondary: grey[800],
140
+ tertiary: grey[700]
141
+ }),
142
+ ...(mode === 'dark' && {
143
+ primary: '#fff',
144
+ secondary: grey[400],
145
+ tertiary: grey[500]
146
+ })
147
+ },
148
+ grey: {
149
+ ...grey,
150
+ ...(mode === 'light' && {
151
+ main: grey[100],
152
+ contrastText: grey[600]
153
+ }),
154
+ ...(mode === 'dark' && {
155
+ main: grey[700],
156
+ contrastText: grey[600]
157
+ })
158
+ },
146
159
  error,
147
- success: (0, _extends2.default)({}, success, mode === 'dark' && {
148
- main: success[600]
149
- }, mode === 'light' && {
150
- main: success[700]
151
- }),
160
+ success: {
161
+ ...success,
162
+ ...(mode === 'dark' && {
163
+ main: success[600]
164
+ }),
165
+ ...(mode === 'light' && {
166
+ main: success[700]
167
+ })
168
+ },
152
169
  warning,
153
170
  gradients: {
154
171
  radioSubtle: mode === 'dark' ? `radial-gradient(100% 100% at 100% 100%, transparent 0, ${(0, _styles.alpha)(blue[900], 0.3)} 300%)` : `radial-gradient(100% 90% at 50% 0, transparent 0, ${(0, _styles.alpha)(blue[100], 0.3)} 300%)`,
155
- linearSubtle: mode === 'light' ? `linear-gradient(to bottom right, ${(0, _styles.alpha)(blue[50], 0.3)} 25%, ${(0, _styles.alpha)(grey[50], 0.2)} 100%)` : `linear-gradient(to bottom right, ${(0, _styles.alpha)(blue[900], 0.1)} 25%, ${(0, _styles.alpha)(blueDark[800], 0.2)} 100%)`
172
+ linearSubtle: mode === 'dark' ? `linear-gradient(0deg, ${(0, _styles.alpha)(blue[900], 0.1)}, ${(0, _styles.alpha)(blueDark[900], 0.5)})` : `linear-gradient(0deg, ${(0, _styles.alpha)(blue[50], 0.4)}, ${(0, _styles.alpha)(grey[50], 0.1)})`
156
173
  }
157
- }),
174
+ },
158
175
  shape: {
159
176
  borderRadius: 12
160
177
  },
@@ -176,15 +193,16 @@ const getDesignTokens = mode => ({
176
193
  fontFamilySystem: systemFont.join(','),
177
194
  fontWeightSemiBold: 600,
178
195
  fontWeightExtraBold: 800,
179
- h1: (0, _extends2.default)({
196
+ h1: {
180
197
  fontFamily: ['"General Sans"', ...systemFont].join(','),
181
198
  fontSize: 'clamp(2.5rem, 1.125rem + 3.5vw, 3.5em)',
182
199
  fontWeight: 600,
183
200
  lineHeight: 78 / 70,
184
- letterSpacing: -0.2
185
- }, mode === 'light' && {
186
- color: blueDark[900]
187
- }),
201
+ letterSpacing: -0.2,
202
+ ...(mode === 'light' && {
203
+ color: blueDark[900]
204
+ })
205
+ },
188
206
  h2: {
189
207
  fontFamily: ['"General Sans"', ...systemFont].join(','),
190
208
  fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)',
@@ -228,20 +246,17 @@ const getDesignTokens = mode => ({
228
246
  },
229
247
  body1: {
230
248
  fontSize: defaultTheme.typography.pxToRem(16),
231
- // 16px
232
249
  lineHeight: 24 / 16,
233
250
  letterSpacing: 0
234
251
  },
235
252
  body2: {
236
253
  fontSize: defaultTheme.typography.pxToRem(14),
237
- // 14px
238
254
  lineHeight: 21 / 14,
239
255
  letterSpacing: 0
240
256
  },
241
257
  caption: {
242
258
  display: 'inline-block',
243
259
  fontSize: defaultTheme.typography.pxToRem(12),
244
- // 12px
245
260
  lineHeight: 18 / 12,
246
261
  letterSpacing: 0,
247
262
  fontWeight: 700
@@ -314,29 +329,95 @@ function getThemedComponents() {
314
329
  MuiAlert: {
315
330
  styleOverrides: {
316
331
  root: {
317
- padding: '12px 16px'
332
+ padding: '16px',
333
+ gap: '12px',
334
+ fontSize: '1rem',
335
+ '& * ul': {
336
+ paddingLeft: '24px !important',
337
+ marginBottom: '0 !important'
338
+ },
339
+ // !important is used here to override the anchor tag color coming from MarkdownElement
340
+ '& .MuiAlert-icon': {
341
+ margin: 0,
342
+ marginTop: '2px',
343
+ padding: 0
344
+ },
345
+ '& .MuiAlert-message': {
346
+ padding: 0
347
+ }
348
+ },
349
+ icon: {
350
+ paddingTop: 10,
351
+ paddingBottom: 0
318
352
  },
319
353
  standardWarning: ({
320
354
  theme
321
- }) => [{
355
+ }) => [
356
+ // same styles from the MarkdownElement callout
357
+ {
322
358
  backgroundColor: (0, _styles.alpha)(theme.palette.warning[50], 0.5),
323
359
  color: (theme.vars || theme).palette.grey[900],
324
360
  border: '1px solid',
325
- borderColor: (0, _styles.alpha)(theme.palette.warning[600], 0.3),
361
+ borderColor: (0, _styles.alpha)(theme.palette.warning[700], 0.15),
326
362
  '& .MuiAlert-icon': {
327
- color: (theme.vars || theme).palette.warning[700]
363
+ color: (theme.vars || theme).palette.warning[600]
364
+ },
365
+ '& * a': {
366
+ // !important is used here to override the anchor tag color coming from MarkdownElement
367
+ color: `${(theme.vars || theme).palette.warning[900]} !important`,
368
+ textDecorationColor: `${(0, _styles.alpha)(theme.palette.warning.main, 0.4)} !important`,
369
+ '&:hover': {
370
+ textDecorationColor: `${(theme.vars || theme).palette.warning[900]} !important`
371
+ }
328
372
  }
329
373
  }, theme.applyDarkStyles({
330
- backgroundColor: (0, _styles.alpha)(theme.palette.warning[700], 0.2),
374
+ backgroundColor: (0, _styles.alpha)(theme.palette.warning[700], 0.12),
331
375
  color: (theme.vars || theme).palette.warning[50],
332
376
  '& .MuiAlert-icon': {
333
- color: (theme.vars || theme).palette.warning[200]
377
+ color: (theme.vars || theme).palette.warning[400]
378
+ },
379
+ '& * a': {
380
+ color: `${(theme.vars || theme).palette.warning[100]} !important`,
381
+ textDecorationColor: `${(0, _styles.alpha)(theme.palette.warning[600], 0.4)} !important`,
382
+ '&:hover': {
383
+ textDecorationColor: `${(theme.vars || theme).palette.warning[600]} !important`
384
+ }
334
385
  }
335
386
  })],
336
- icon: {
337
- paddingTop: 12,
338
- paddingBottom: 0
339
- }
387
+ standardSuccess: ({
388
+ theme
389
+ }) => [
390
+ // same styles from the MarkdownElement callout
391
+ {
392
+ backgroundColor: (0, _styles.alpha)(theme.palette.success[50], 0.5),
393
+ color: (theme.vars || theme).palette.success[900],
394
+ border: `1px solid ${(theme.vars || theme).palette.success[100]}`,
395
+ '& .MuiAlert-icon': {
396
+ color: (theme.vars || theme).palette.success[600]
397
+ },
398
+ '& * a': {
399
+ // !important is used here to override the anchor tag color coming from MarkdownElement
400
+ color: `${(theme.vars || theme).palette.success[900]} !important`,
401
+ textDecorationColor: `${(0, _styles.alpha)(theme.palette.success.main, 0.4)} !important`,
402
+ '&:hover': {
403
+ textDecorationColor: `${(theme.vars || theme).palette.success[900]} !important`
404
+ }
405
+ }
406
+ }, theme.applyDarkStyles({
407
+ backgroundColor: (0, _styles.alpha)(theme.palette.success[700], 0.12),
408
+ color: (theme.vars || theme).palette.success[50],
409
+ borderColor: (0, _styles.alpha)(theme.palette.success[400], 0.1),
410
+ '& .MuiAlert-icon': {
411
+ color: (theme.vars || theme).palette.success[500]
412
+ },
413
+ '& * a': {
414
+ color: `${(theme.vars || theme).palette.success[100]} !important`,
415
+ textDecorationColor: `${(0, _styles.alpha)(theme.palette.success[600], 0.4)} !important`,
416
+ '&:hover': {
417
+ textDecorationColor: `${(theme.vars || theme).palette.success[600]} !important`
418
+ }
419
+ }
420
+ })]
340
421
  }
341
422
  },
342
423
  MuiButtonBase: {
@@ -364,107 +445,135 @@ function getThemedComponents() {
364
445
  root: ({
365
446
  theme,
366
447
  ownerState
367
- }) => (0, _extends2.default)({
368
- transition: 'all 120ms ease-in'
369
- }, ownerState.size === 'large' && (0, _extends2.default)({}, theme.typography.body1, {
370
- lineHeight: 21 / 16,
371
- padding: theme.spacing('8px', '10px', '10px', '12px'),
372
- fontWeight: theme.typography.fontWeightSemiBold,
373
- borderRadius: 10,
374
- '& > span': {
375
- transition: '0.2s',
376
- marginLeft: 4
377
- },
378
- '&:hover > span': {
379
- transform: 'translateX(2px)'
380
- }
381
- }), ownerState.size === 'medium' && {
382
- fontSize: defaultTheme.typography.pxToRem(15),
383
- padding: theme.spacing('8px', '12px', '8px', '14px'),
384
- fontWeight: theme.typography.fontWeightSemiBold,
385
- borderRadius: 8,
386
- '& > span': {
387
- transition: '0.2s',
388
- marginLeft: 4
389
- },
390
- '&:hover > span': {
391
- transform: 'translateX(2px)'
392
- }
393
- }, ownerState.size === 'small' && {
394
- padding: theme.spacing('6px', 1),
395
- fontFamily: theme.typography.fontFamily,
396
- fontSize: defaultTheme.typography.pxToRem(13),
397
- fontWeight: theme.typography.fontWeightSemiBold,
398
- borderRadius: 8,
399
- '& .MuiButton-startIcon': {
400
- transition: '0.15s',
401
- marginRight: 4,
402
- marginLeft: -1
403
- },
404
- '& .MuiButton-endIcon': {
405
- transition: '0.15s',
406
- marginLeft: 4
407
- },
408
- '&:hover': {
448
+ }) => ({
449
+ transition: 'all 120ms ease-in',
450
+ ...(ownerState.size === 'large' && {
451
+ ...theme.typography.body1,
452
+ lineHeight: 21 / 16,
453
+ padding: theme.spacing('8px', '10px', '10px', '12px'),
454
+ fontWeight: theme.typography.fontWeightMedium,
455
+ borderRadius: 10,
456
+ '& > span': {
457
+ transition: '0.2s',
458
+ marginLeft: 4
459
+ },
460
+ '&:hover > span': {
461
+ transform: 'translateX(2px)'
462
+ }
463
+ }),
464
+ ...(ownerState.size === 'medium' && {
465
+ fontSize: defaultTheme.typography.pxToRem(15),
466
+ padding: theme.spacing('8px', '12px', '8px', '14px'),
467
+ fontWeight: theme.typography.fontWeightMedium,
468
+ borderRadius: 8,
469
+ '& > span': {
470
+ transition: '0.2s',
471
+ marginLeft: 4
472
+ },
473
+ '&:hover > span': {
474
+ transform: 'translateX(2px)'
475
+ }
476
+ }),
477
+ ...(ownerState.size === 'small' && {
478
+ padding: '6px 8px',
479
+ fontFamily: theme.typography.fontFamily,
480
+ fontSize: defaultTheme.typography.pxToRem(13),
481
+ fontWeight: theme.typography.fontWeightMedium,
482
+ borderRadius: 8,
409
483
  '& .MuiButton-startIcon': {
410
- transform: 'translateX(-2px)'
484
+ transition: '0.15s',
485
+ marginRight: 4,
486
+ marginLeft: -1
411
487
  },
412
488
  '& .MuiButton-endIcon': {
413
- transform: 'translateX(2px)'
489
+ transition: '0.15s',
490
+ marginLeft: 4
491
+ },
492
+ '&:hover': {
493
+ '& .MuiButton-startIcon': {
494
+ transform: 'translateX(-2px)'
495
+ },
496
+ '& .MuiButton-endIcon': {
497
+ transform: 'translateX(2px)'
498
+ }
414
499
  }
415
- }
416
- }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && (0, _extends2.default)({
417
- color: (theme.vars || theme).palette.text.primary,
418
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
419
- borderColor: (theme.vars || theme).palette.primaryDark[100],
420
- boxShadow: `${(0, _styles.alpha)(theme.palette.grey[50], 0.5)} 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[100], 0.5)} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
421
- '&:hover': {
422
- backgroundColor: (theme.vars || theme).palette.grey[50]
423
- }
424
- }, theme.applyDarkStyles({
425
- color: (theme.vars || theme).palette.primaryDark[100],
426
- borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
427
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
428
- boxShadow: `${(0, _styles.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`,
429
- '&:hover': {
430
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
431
- borderColor: (theme.vars || theme).palette.primaryDark[600]
432
- }
433
- })), ownerState.variant === 'outlined' && ownerState.color === 'primary' && (0, _extends2.default)({
434
- color: (theme.vars || theme).palette.primary[600],
435
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[50], 0.2),
436
- borderColor: (theme.vars || theme).palette.primary[100],
437
- boxShadow: `${(0, _styles.alpha)(theme.palette.primary[50], 0.8)} 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.primary[100], 0.4)} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
438
- '&:hover': {
439
- backgroundColor: (theme.vars || theme).palette.primary[50],
440
- borderColor: (theme.vars || theme).palette.primary[200]
441
- }
442
- }, theme.applyDarkStyles({
443
- color: (theme.vars || theme).palette.primary[200],
444
- borderColor: (0, _styles.alpha)(theme.palette.primary[900], 0.7),
445
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.2),
446
- boxShadow: `${(0, _styles.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`,
447
- '&:hover': {
448
- backgroundColor: (theme.vars || theme).palette.primary[900],
449
- borderColor: (theme.vars || theme).palette.primary[700]
450
- }
451
- })), ownerState.variant === 'contained' && ownerState.color === 'primary' && {
452
- color: '#fff',
453
- textShadow: `0 1px 1px ${(0, _styles.alpha)(theme.palette.common.black, 0.6)}`,
454
- backgroundColor: (theme.vars || theme).palette.primary[500],
455
- backgroundImage: `linear-gradient(180deg, ${(0, _styles.alpha)(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
456
- boxShadow: `${theme.palette.primary[400]} 0 2px 0 inset, ${theme.palette.primary[700]} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
457
- '&:hover': {
458
- backgroundColor: (theme.vars || theme).palette.primary[700]
459
- },
460
- '&:active': {
461
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
462
- }
463
- }, ownerState.variant === 'text' && (0, _extends2.default)({
464
- color: (theme.vars || theme).palette.primary[600]
465
- }, theme.applyDarkStyles({
466
- color: (theme.vars || theme).palette.primary[300]
467
- })))
500
+ }),
501
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
502
+ color: (theme.vars || theme).palette.text.primary,
503
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
504
+ borderColor: (theme.vars || theme).palette.primaryDark[100],
505
+ boxShadow: `#FFF 0 1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
506
+ '&:hover': {
507
+ backgroundColor: (theme.vars || theme).palette.grey[50]
508
+ },
509
+ ...theme.applyDarkStyles({
510
+ color: (theme.vars || theme).palette.primaryDark[100],
511
+ borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
512
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
513
+ boxShadow: `${(0, _styles.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`,
514
+ '&:hover': {
515
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
516
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
517
+ }
518
+ })
519
+ }),
520
+ ...(ownerState.variant === 'outlined' && ownerState.color === 'primary' && {
521
+ color: (theme.vars || theme).palette.primary[600],
522
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[50], 0.2),
523
+ borderColor: (theme.vars || theme).palette.primary[100],
524
+ boxShadow: `${(0, _styles.alpha)(theme.palette.primary[50], 0.8)} 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.primary[100], 0.4)} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
525
+ '&:hover': {
526
+ backgroundColor: (theme.vars || theme).palette.primary[50],
527
+ borderColor: (theme.vars || theme).palette.primary[200]
528
+ },
529
+ ...theme.applyDarkStyles({
530
+ color: (theme.vars || theme).palette.primary[200],
531
+ borderColor: (0, _styles.alpha)(theme.palette.primary[900], 0.7),
532
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.2),
533
+ boxShadow: `${(0, _styles.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`,
534
+ '&:hover': {
535
+ backgroundColor: (theme.vars || theme).palette.primary[900],
536
+ borderColor: (theme.vars || theme).palette.primary[700]
537
+ }
538
+ })
539
+ }),
540
+ ...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
541
+ color: '#fff',
542
+ textShadow: `0 1px 1px ${(0, _styles.alpha)(theme.palette.common.black, 0.6)}`,
543
+ backgroundColor: (theme.vars || theme).palette.primary[500],
544
+ backgroundImage: `linear-gradient(180deg, ${(0, _styles.alpha)(theme.palette.primary[500], 0.6)} 0%, ${theme.palette.primary[600]} 100%)`,
545
+ boxShadow: `${theme.palette.primary[400]} 0 2px 0 inset, ${theme.palette.primary[700]} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
546
+ '&:hover': {
547
+ backgroundColor: (theme.vars || theme).palette.primary[700]
548
+ },
549
+ '&:active': {
550
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
551
+ }
552
+ }),
553
+ ...(ownerState.variant === 'text' && ownerState.color === 'secondary' && {
554
+ color: (theme.vars || theme).palette.text.secondary,
555
+ '&:hover': {
556
+ backgroundColor: (theme.vars || theme).palette.grey[50]
557
+ },
558
+ '&:active': {
559
+ backgroundColor: (theme.vars || theme).palette.grey[200]
560
+ },
561
+ ...theme.applyDarkStyles({
562
+ '&:hover': {
563
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.5)
564
+ },
565
+ '&:active': {
566
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
567
+ }
568
+ })
569
+ }),
570
+ ...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
571
+ color: (theme.vars || theme).palette.primary[600],
572
+ ...theme.applyDarkStyles({
573
+ color: (theme.vars || theme).palette.primary[300]
574
+ })
575
+ })
576
+ })
468
577
  },
469
578
  variants: [{
470
579
  // @ts-ignore internal repo module augmentation issue
@@ -582,23 +691,48 @@ function getThemedComponents() {
582
691
  },
583
692
  style: ({
584
693
  theme
585
- }) => (0, _extends2.default)({
694
+ }) => ({
586
695
  marginBottom: 1,
587
696
  fontSize: theme.typography.pxToRem(14),
588
697
  fontWeight: theme.typography.fontWeightBold,
589
698
  color: (theme.vars || theme).palette.primary[600],
590
699
  '&:hover': {
591
700
  backgroundColor: (theme.vars || theme).palette.primary[50]
592
- }
593
- }, theme.applyDarkStyles({
594
- color: (theme.vars || theme).palette.primary[300],
595
- '&:hover': {
596
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[800], 0.3)
597
- }
598
- }))
701
+ },
702
+ ...theme.applyDarkStyles({
703
+ color: (theme.vars || theme).palette.primary[300],
704
+ '&:hover': {
705
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[800], 0.3)
706
+ }
707
+ })
708
+ })
599
709
  }]
600
710
  },
601
711
  MuiIconButton: {
712
+ styleOverrides: {
713
+ root: ({
714
+ theme,
715
+ ownerState
716
+ }) => ({
717
+ borderRadius: theme.shape.borderRadius,
718
+ transition: 'all 100ms ease-in',
719
+ '&:hover': {
720
+ borderColor: (theme.vars || theme).palette.grey[300],
721
+ background: (theme.vars || theme).palette.grey[50],
722
+ ...theme.applyDarkStyles({
723
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
724
+ background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
725
+ })
726
+ },
727
+ ...(ownerState.size === 'small' && {
728
+ height: 32,
729
+ width: 32,
730
+ '& .MuiSvgIcon-root': {
731
+ fontSize: defaultTheme.typography.pxToRem(18)
732
+ }
733
+ })
734
+ })
735
+ },
602
736
  variants: [{
603
737
  props: {
604
738
  color: 'primary'
@@ -606,14 +740,10 @@ function getThemedComponents() {
606
740
  style: ({
607
741
  theme
608
742
  }) => [{
609
- height: 34,
610
- width: 34,
611
- border: `1px solid`,
612
- borderRadius: theme.shape.borderRadius,
613
743
  color: (theme.vars || theme).palette.primary.main,
614
744
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
615
- borderColor: (theme.vars || theme).palette.primaryDark[100],
616
- boxShadow: `${(0, _styles.alpha)(theme.palette.grey[50], 0.4)} 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
745
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
746
+ boxShadow: `#FFF 0 1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
617
747
  '&:hover': {
618
748
  borderColor: (theme.vars || theme).palette.grey[300],
619
749
  background: (theme.vars || theme).palette.grey[50]
@@ -622,10 +752,10 @@ function getThemedComponents() {
622
752
  color: (theme.vars || theme).palette.primary[300],
623
753
  borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
624
754
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
625
- boxShadow: `${(0, _styles.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`,
755
+ boxShadow: `${(0, _styles.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`,
626
756
  '&:hover': {
627
- borderColor: (theme.vars || theme).palette.primaryDark[500],
628
- background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.4)
757
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
758
+ background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
629
759
  }
630
760
  })]
631
761
  }, {
@@ -635,27 +765,22 @@ function getThemedComponents() {
635
765
  style: ({
636
766
  theme
637
767
  }) => [{
638
- height: 34,
639
- width: 34,
640
- color: (theme.vars || theme).palette.text.tertiary,
641
- borderRadius: theme.shape.borderRadius,
642
- border: `1px solid`,
768
+ color: (theme.vars || theme).palette.text.secondary,
643
769
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
644
- borderColor: (theme.vars || theme).palette.primaryDark[100],
645
- boxShadow: `${(0, _styles.alpha)(theme.palette.grey[50], 0.4)} 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
770
+ border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
771
+ boxShadow: `#FFF 0 1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
646
772
  '&:hover': {
647
- color: (theme.vars || theme).palette.primary.main,
773
+ color: (theme.vars || theme).palette.text.primary,
648
774
  borderColor: (theme.vars || theme).palette.grey[300],
649
775
  background: (theme.vars || theme).palette.grey[50]
650
776
  }
651
777
  }, theme.applyDarkStyles({
652
778
  borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
653
779
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
654
- boxShadow: `${(0, _styles.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`,
780
+ boxShadow: `${(0, _styles.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`,
655
781
  '&:hover': {
656
- color: (theme.vars || theme).palette.primary[400],
657
- borderColor: (theme.vars || theme).palette.primaryDark[500],
658
- background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.4)
782
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
783
+ background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
659
784
  }
660
785
  })]
661
786
  }]
@@ -665,17 +790,29 @@ function getThemedComponents() {
665
790
  paper: ({
666
791
  theme
667
792
  }) => [{
793
+ padding: '6px',
668
794
  minWidth: 160,
669
795
  color: (theme.vars || theme).palette.text.secondary,
670
796
  backgroundImage: 'none',
671
797
  border: '1px solid',
672
798
  backgroundColor: (theme.vars || theme).palette.background.paper,
673
799
  borderColor: (theme.vars || theme).palette.grey[200],
800
+ '& .MuiMenu-list': {
801
+ display: 'flex',
802
+ flexDirection: 'column',
803
+ gap: '2px',
804
+ '& .MuiDivider-root': {
805
+ margin: '4px -8px 4px -8px'
806
+ }
807
+ },
674
808
  '& .MuiMenuItem-root': {
809
+ padding: '6px 8px',
810
+ borderRadius: '6px',
675
811
  fontSize: theme.typography.pxToRem(14),
676
- fontWeight: 500,
677
- '&:hover, &:focus': {
678
- backgroundColor: (theme.vars || theme).palette.grey[50]
812
+ fontWeight: theme.typography.fontWeightMedium,
813
+ '&:hover': {
814
+ backgroundColor: (theme.vars || theme).palette.grey[100],
815
+ color: (theme.vars || theme).palette.text.primary
679
816
  },
680
817
  '&:focus-visible': {
681
818
  outline: 'none'
@@ -690,11 +827,11 @@ function getThemedComponents() {
690
827
  backgroundColor: (theme.vars || theme).palette.primaryDark[900],
691
828
  borderColor: (theme.vars || theme).palette.primaryDark[700],
692
829
  '& .MuiMenuItem-root': {
693
- '&:hover, &:focus': {
830
+ '&:hover': {
694
831
  backgroundColor: (theme.vars || theme).palette.primaryDark[700]
695
832
  },
696
833
  '&.Mui-selected': {
697
- color: (theme.vars || theme).palette.primary[300],
834
+ color: (theme.vars || theme).palette.primary[200],
698
835
  backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.4)
699
836
  }
700
837
  }
@@ -705,22 +842,21 @@ function getThemedComponents() {
705
842
  styleOverrides: {
706
843
  paper: ({
707
844
  theme
708
- }) => (0, _extends2.default)({
709
- boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)'
710
- }, theme.applyDarkStyles({
711
- boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
712
- }))
845
+ }) => ({
846
+ boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)',
847
+ ...theme.applyDarkStyles({
848
+ boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
849
+ })
850
+ })
713
851
  }
714
852
  },
715
853
  MuiDivider: {
716
854
  styleOverrides: {
717
855
  root: ({
718
856
  theme
719
- }) => (0, _extends2.default)({
720
- borderColor: (theme.vars || theme).palette.grey[100]
721
- }, theme.applyDarkStyles({
722
- borderColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
723
- }))
857
+ }) => ({
858
+ borderColor: (theme.vars || theme).palette.divider
859
+ })
724
860
  }
725
861
  },
726
862
  MuiLink: {
@@ -773,107 +909,131 @@ function getThemedComponents() {
773
909
  variant
774
910
  },
775
911
  theme
776
- }) => (0, _extends2.default)({
912
+ }) => ({
777
913
  fontWeight: theme.typography.fontWeightSemiBold,
778
- paddingBottom: 0.2
779
- }, variant === 'outlined' && color === 'default' && (0, _extends2.default)({
780
- backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.5),
781
- color: (theme.vars || theme).palette.grey[900],
782
- borderColor: (theme.vars || theme).palette.grey[200],
783
- '&:hover': {
784
- backgroundColor: (theme.vars || theme).palette.grey[100],
785
- color: (theme.vars || theme).palette.grey[900]
786
- }
787
- }, theme.applyDarkStyles({
788
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.4),
789
- color: (theme.vars || theme).palette.grey[300],
790
- borderColor: (0, _styles.alpha)(theme.palette.primaryDark[500], 0.5),
791
- '&:hover': {
792
- color: (theme.vars || theme).palette.grey[300],
793
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
794
- }
795
- })), variant === 'outlined' && color === 'info' && (0, _extends2.default)({
796
- backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.5),
797
- color: (theme.vars || theme).palette.grey[900],
798
- borderColor: (theme.vars || theme).palette.grey[200]
799
- }, theme.applyDarkStyles({
800
- color: (theme.vars || theme).palette.grey[300],
801
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.5),
802
- borderColor: (theme.vars || theme).palette.primaryDark[600]
803
- })), variant === 'outlined' && color === 'primary' && (0, _extends2.default)({
804
- borderColor: (theme.vars || theme).palette.primary[100],
805
- backgroundColor: (theme.vars || theme).palette.primary[50]
806
- }, theme.applyDarkStyles({
807
- color: (theme.vars || theme).palette.primary[300],
808
- borderColor: (0, _styles.alpha)(theme.palette.primary[500], 0.2),
809
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[700], 0.2)
810
- })), variant === 'outlined' && color === 'success' && (0, _extends2.default)({
811
- borderColor: (theme.vars || theme).palette.success[100],
812
- backgroundColor: (theme.vars || theme).palette.success[50],
813
- color: (theme.vars || theme).palette.success[900]
814
- }, theme.applyDarkStyles({
815
- color: (theme.vars || theme).palette.success[300],
816
- borderColor: (0, _styles.alpha)(theme.palette.success[300], 0.2),
817
- background: (0, _styles.alpha)(theme.palette.success[800], 0.2)
818
- })), variant === 'filled' && (0, _extends2.default)({}, color === 'default' && (0, _extends2.default)({
819
- border: '1px solid transparent',
820
- color: (theme.vars || theme).palette.primary[700],
821
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.5),
822
- '&:hover': {
823
- backgroundColor: (theme.vars || theme).palette.primary[100]
824
- }
825
- }, theme.applyDarkStyles({
826
- color: '#fff',
827
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[500], 0.8),
828
- '&:hover': {
829
- backgroundColor: (theme.vars || theme).palette.primaryDark[600]
830
- }
831
- })), color === 'primary' && (0, _extends2.default)({
832
- color: (theme.vars || theme).palette.primary[600],
833
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.4),
834
- '&:hover': {
835
- backgroundColor: (theme.vars || theme).palette.primary[100]
836
- },
837
- '& .MuiChip-deleteIcon': {
838
- color: (theme.vars || theme).palette.primary[600],
839
- '&:hover': {
840
- color: (theme.vars || theme).palette.primary[700]
841
- }
842
- },
843
- '&.Mui-focusVisible': {
844
- backgroundColor: (theme.vars || theme).palette.primary[200]
845
- }
846
- }, theme.applyDarkStyles({
847
- color: (theme.vars || theme).palette.primary[100],
848
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[800], 0.5),
849
- '&:hover': {
850
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.5)
851
- },
852
- '& .MuiChip-deleteIcon': {
853
- color: (theme.vars || theme).palette.primary[100],
914
+ paddingBottom: 0.2,
915
+ ...(variant === 'outlined' && color === 'default' && {
916
+ backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.5),
917
+ color: (theme.vars || theme).palette.grey[900],
918
+ borderColor: (theme.vars || theme).palette.grey[200],
854
919
  '&:hover': {
855
- color: (theme.vars || theme).palette.primary[50]
856
- }
857
- }
858
- }))), variant === 'light' && (0, _extends2.default)({}, color === 'default' && (0, _extends2.default)({
859
- color: (theme.vars || theme).palette.primary[700],
860
- backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.3)
861
- }, theme.applyDarkStyles({
862
- color: (theme.vars || theme).palette.primary[200],
863
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.5)
864
- })), color === 'warning' && (0, _extends2.default)({
865
- color: (theme.vars || theme).palette.warning[900],
866
- backgroundColor: (theme.vars || theme).palette.warning[100]
867
- }, theme.applyDarkStyles({
868
- color: '#fff',
869
- backgroundColor: (theme.vars || theme).palette.warning[900]
870
- })), color === 'success' && (0, _extends2.default)({
871
- color: (theme.vars || theme).palette.success[900],
872
- backgroundColor: (theme.vars || theme).palette.success[100]
873
- }, theme.applyDarkStyles({
874
- color: '#fff',
875
- backgroundColor: (theme.vars || theme).palette.success[900]
876
- }))))
920
+ backgroundColor: (theme.vars || theme).palette.grey[100],
921
+ color: (theme.vars || theme).palette.grey[900]
922
+ },
923
+ ...theme.applyDarkStyles({
924
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.4),
925
+ color: (theme.vars || theme).palette.grey[300],
926
+ borderColor: (0, _styles.alpha)(theme.palette.primaryDark[500], 0.5),
927
+ '&:hover': {
928
+ color: (theme.vars || theme).palette.grey[300],
929
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
930
+ }
931
+ })
932
+ }),
933
+ ...(variant === 'outlined' && color === 'info' && {
934
+ backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.5),
935
+ color: (theme.vars || theme).palette.grey[900],
936
+ borderColor: (theme.vars || theme).palette.grey[200],
937
+ ...theme.applyDarkStyles({
938
+ color: (theme.vars || theme).palette.grey[300],
939
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.5),
940
+ borderColor: (theme.vars || theme).palette.primaryDark[600]
941
+ })
942
+ }),
943
+ ...(variant === 'outlined' && color === 'primary' && {
944
+ borderColor: (theme.vars || theme).palette.primary[100],
945
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.2),
946
+ ...theme.applyDarkStyles({
947
+ color: (theme.vars || theme).palette.primary[300],
948
+ borderColor: (0, _styles.alpha)(theme.palette.primary[500], 0.2),
949
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[700], 0.2)
950
+ })
951
+ }),
952
+ ...(variant === 'outlined' && color === 'success' && {
953
+ borderColor: (theme.vars || theme).palette.success[100],
954
+ backgroundColor: (theme.vars || theme).palette.success[50],
955
+ color: (theme.vars || theme).palette.success[900],
956
+ ...theme.applyDarkStyles({
957
+ color: (theme.vars || theme).palette.success[300],
958
+ borderColor: (0, _styles.alpha)(theme.palette.success[300], 0.2),
959
+ background: (0, _styles.alpha)(theme.palette.success[800], 0.2)
960
+ })
961
+ }),
962
+ ...(variant === 'filled' && {
963
+ ...(color === 'default' && {
964
+ border: '1px solid transparent',
965
+ color: (theme.vars || theme).palette.primary[700],
966
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.5),
967
+ '&:hover': {
968
+ backgroundColor: (theme.vars || theme).palette.primary[100]
969
+ },
970
+ ...theme.applyDarkStyles({
971
+ color: '#fff',
972
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[500], 0.8),
973
+ '&:hover': {
974
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600]
975
+ }
976
+ })
977
+ }),
978
+ ...(color === 'primary' && {
979
+ color: (theme.vars || theme).palette.primary[600],
980
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.4),
981
+ '&:hover': {
982
+ backgroundColor: (theme.vars || theme).palette.primary[100]
983
+ },
984
+ '& .MuiChip-deleteIcon': {
985
+ color: (theme.vars || theme).palette.primary[600],
986
+ '&:hover': {
987
+ color: (theme.vars || theme).palette.primary[700]
988
+ }
989
+ },
990
+ '&.Mui-focusVisible': {
991
+ backgroundColor: (theme.vars || theme).palette.primary[200]
992
+ },
993
+ ...theme.applyDarkStyles({
994
+ color: (theme.vars || theme).palette.primary[100],
995
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[800], 0.5),
996
+ '&:hover': {
997
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.5)
998
+ },
999
+ '& .MuiChip-deleteIcon': {
1000
+ color: (theme.vars || theme).palette.primary[100],
1001
+ '&:hover': {
1002
+ color: (theme.vars || theme).palette.primary[50]
1003
+ }
1004
+ }
1005
+ })
1006
+ })
1007
+ }),
1008
+ // for labelling product in the search
1009
+ // @ts-ignore internal repo module augmentation issue
1010
+ ...(variant === 'light' && {
1011
+ ...(color === 'default' && {
1012
+ color: (theme.vars || theme).palette.primary[700],
1013
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.3),
1014
+ ...theme.applyDarkStyles({
1015
+ color: (theme.vars || theme).palette.primary[200],
1016
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.5)
1017
+ })
1018
+ }),
1019
+ ...(color === 'warning' && {
1020
+ color: (theme.vars || theme).palette.warning[900],
1021
+ backgroundColor: (theme.vars || theme).palette.warning[100],
1022
+ ...theme.applyDarkStyles({
1023
+ color: '#fff',
1024
+ backgroundColor: (theme.vars || theme).palette.warning[900]
1025
+ })
1026
+ }),
1027
+ ...(color === 'success' && {
1028
+ color: (theme.vars || theme).palette.success[900],
1029
+ backgroundColor: (theme.vars || theme).palette.success[100],
1030
+ ...theme.applyDarkStyles({
1031
+ color: '#fff',
1032
+ backgroundColor: (theme.vars || theme).palette.success[900]
1033
+ })
1034
+ })
1035
+ })
1036
+ })
877
1037
  }
878
1038
  },
879
1039
  MuiList: {
@@ -943,7 +1103,7 @@ function getThemedComponents() {
943
1103
  root: ({
944
1104
  theme,
945
1105
  ownerState
946
- }) => [(0, _extends2.default)({
1106
+ }) => [{
947
1107
  backgroundImage: 'none',
948
1108
  backgroundColor: '#fff',
949
1109
  '&[href]': {
@@ -951,47 +1111,49 @@ function getThemedComponents() {
951
1111
  },
952
1112
  transition: theme.transitions.create(['border', 'box-shadow'], {
953
1113
  duration: theme.transitions.duration.shortest
954
- })
955
- }, ownerState.variant === 'outlined' && {
956
- display: 'block',
957
- borderColor: (theme.vars || theme).palette.grey[100],
958
- '&[href]': {
959
- textDecorationLine: 'none',
960
- boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[100], 0.3)} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
961
- '&:hover': {
962
- borderColor: (theme.vars || theme).palette.primary[200],
963
- boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1114
+ }),
1115
+ ...(ownerState.variant === 'outlined' && {
1116
+ display: 'block',
1117
+ borderColor: (theme.vars || theme).palette.grey[100],
1118
+ '&[href]': {
1119
+ textDecorationLine: 'none',
1120
+ boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[100], 0.3)} 0 -2px 0 inset, ${(0, _styles.alpha)(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
1121
+ '&:hover': {
1122
+ borderColor: (theme.vars || theme).palette.primary[200],
1123
+ boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1124
+ },
1125
+ '&:focus-visible': {
1126
+ outline: `3px solid ${(0, _styles.alpha)(theme.palette.primary[500], 0.5)}`,
1127
+ outlineOffset: '2px'
1128
+ }
964
1129
  },
965
- '&:focus-visible': {
966
- outline: `3px solid ${(0, _styles.alpha)(theme.palette.primary[500], 0.5)}`,
967
- outlineOffset: '2px'
968
- }
969
- },
970
- ':is(a&), :is(button&)': {
971
- '&:hover': {
972
- borderColor: (theme.vars || theme).palette.primary[200],
973
- boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
974
- }
975
- }
976
- }), theme.applyDarkStyles((0, _extends2.default)({
977
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
978
- }, ownerState.variant === 'outlined' && {
979
- borderColor: (theme.vars || theme).palette.primaryDark[700],
980
- backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.6),
981
- '&[href]': {
982
- textDecorationLine: 'none',
983
- boxShadow: `${(0, _styles.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`,
984
- '&:hover': {
985
- borderColor: (0, _styles.alpha)(theme.palette.primary[600], 0.5),
986
- boxShadow: `0px 2px 8px ${(0, _styles.alpha)(theme.palette.primary[900], 0.6)}`
1130
+ ':is(a&), :is(button&)': {
1131
+ '&:hover': {
1132
+ borderColor: (theme.vars || theme).palette.primary[200],
1133
+ boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1134
+ }
987
1135
  }
988
- },
989
- ':is(a&), :is(button&)': {
990
- '&:hover': {
991
- boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1136
+ })
1137
+ }, theme.applyDarkStyles({
1138
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900],
1139
+ ...(ownerState.variant === 'outlined' && {
1140
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
1141
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.6),
1142
+ '&[href]': {
1143
+ textDecorationLine: 'none',
1144
+ boxShadow: `${(0, _styles.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`,
1145
+ '&:hover': {
1146
+ borderColor: (0, _styles.alpha)(theme.palette.primary[600], 0.5),
1147
+ boxShadow: `0px 2px 8px ${(0, _styles.alpha)(theme.palette.primary[900], 0.6)}`
1148
+ }
1149
+ },
1150
+ ':is(a&), :is(button&)': {
1151
+ '&:hover': {
1152
+ boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1153
+ }
992
1154
  }
993
- }
994
- }))]
1155
+ })
1156
+ })]
995
1157
  }
996
1158
  },
997
1159
  MuiTableCell: {
@@ -999,14 +1161,16 @@ function getThemedComponents() {
999
1161
  root: ({
1000
1162
  theme,
1001
1163
  ownerState
1002
- }) => (0, _extends2.default)({
1164
+ }) => ({
1003
1165
  padding: theme.spacing(1, 2),
1004
- borderColor: (theme.vars || theme).palette.divider
1005
- }, ownerState.variant === 'head' && {
1006
- color: (theme.vars || theme).palette.text.primary,
1007
- fontWeight: 700
1008
- }, ownerState.variant === 'body' && {
1009
- color: (theme.vars || theme).palette.text.secondary
1166
+ borderColor: (theme.vars || theme).palette.divider,
1167
+ ...(ownerState.variant === 'head' && {
1168
+ color: (theme.vars || theme).palette.text.primary,
1169
+ fontWeight: 700
1170
+ }),
1171
+ ...(ownerState.variant === 'body' && {
1172
+ color: (theme.vars || theme).palette.text.secondary
1173
+ })
1010
1174
  })
1011
1175
  }
1012
1176
  },
@@ -1014,11 +1178,12 @@ function getThemedComponents() {
1014
1178
  styleOverrides: {
1015
1179
  root: ({
1016
1180
  theme
1017
- }) => (0, _extends2.default)({
1018
- backgroundColor: '#fff'
1019
- }, theme.applyDarkStyles({
1020
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1021
- }))
1181
+ }) => ({
1182
+ backgroundColor: '#fff',
1183
+ ...theme.applyDarkStyles({
1184
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1185
+ })
1186
+ })
1022
1187
  }
1023
1188
  },
1024
1189
  MuiToggleButton: {
@@ -1026,30 +1191,30 @@ function getThemedComponents() {
1026
1191
  root: ({
1027
1192
  theme,
1028
1193
  ownerState
1029
- }) => [(0, _extends2.default)({
1194
+ }) => [{
1030
1195
  textTransform: 'none',
1031
1196
  fontWeight: theme.typography.fontWeightMedium,
1032
1197
  color: theme.palette.text.secondary,
1033
- borderColor: theme.palette.grey[200]
1034
- }, ownerState.size === 'small' && {
1035
- padding: '0.375rem 0.75rem'
1036
- }, {
1198
+ borderColor: theme.palette.grey[200],
1199
+ ...(ownerState.size === 'small' && {
1200
+ padding: '0.375rem 0.75rem'
1201
+ }),
1037
1202
  '&.Mui-selected': {
1038
1203
  color: (theme.vars || theme).palette.primary[700],
1039
- borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1204
+ borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
1040
1205
  backgroundColor: (theme.vars || theme).palette.primary[50],
1041
1206
  '&:hover': {
1042
1207
  backgroundColor: (theme.vars || theme).palette.primary[100]
1043
1208
  }
1044
1209
  }
1045
- }), theme.applyDarkStyles({
1210
+ }, theme.applyDarkStyles({
1046
1211
  borderColor: theme.palette.primaryDark[700],
1047
1212
  '&:hover': {
1048
1213
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.2)
1049
1214
  },
1050
1215
  '&.Mui-selected': {
1051
1216
  color: (theme.vars || theme).palette.primary[200],
1052
- borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1217
+ borderColor: `${(theme.vars || theme).palette.primary[800]} !important`,
1053
1218
  backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.4),
1054
1219
  '&:hover': {
1055
1220
  backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.8),
@@ -1060,11 +1225,20 @@ function getThemedComponents() {
1060
1225
  }
1061
1226
  },
1062
1227
  MuiTooltip: {
1228
+ defaultProps: {
1229
+ arrow: true
1230
+ },
1063
1231
  styleOverrides: {
1064
- tooltip: {
1232
+ tooltip: ({
1233
+ theme
1234
+ }) => ({
1235
+ padding: '6px 8px',
1065
1236
  borderRadius: 6,
1066
- padding: '6px 12px'
1067
- }
1237
+ backgroundColor: (theme.vars || theme).palette.grey[800],
1238
+ '& .MuiTooltip-arrow': {
1239
+ color: (theme.vars || theme).palette.grey[800]
1240
+ }
1241
+ })
1068
1242
  }
1069
1243
  },
1070
1244
  MuiSwitch: {
@@ -1091,13 +1265,14 @@ function getThemedComponents() {
1091
1265
  },
1092
1266
  track: ({
1093
1267
  theme
1094
- }) => (0, _extends2.default)({
1268
+ }) => ({
1095
1269
  opacity: 1,
1096
1270
  borderRadius: 32,
1097
- backgroundColor: theme.palette.grey[400]
1098
- }, theme.applyDarkStyles({
1099
- backgroundColor: theme.palette.grey[800]
1100
- })),
1271
+ backgroundColor: theme.palette.grey[400],
1272
+ ...theme.applyDarkStyles({
1273
+ backgroundColor: theme.palette.grey[800]
1274
+ })
1275
+ }),
1101
1276
  thumb: {
1102
1277
  flexShrink: 0,
1103
1278
  width: '14px',
@@ -1105,6 +1280,25 @@ function getThemedComponents() {
1105
1280
  }
1106
1281
  }
1107
1282
  },
1283
+ MuiSnackbar: {
1284
+ styleOverrides: {
1285
+ root: ({
1286
+ theme
1287
+ }) => ({
1288
+ '& .MuiSnackbarContent-root': {
1289
+ backgroundColor: '#FFF',
1290
+ color: (theme.vars || theme).palette.text.primary,
1291
+ fontWeight: theme.typography.fontWeightMedium,
1292
+ border: `1px solid ${(theme.vars || theme).palette.divider}`,
1293
+ boxShadow: `0 4px 16px ${(0, _styles.alpha)(theme.palette.grey[400], 0.2)}`,
1294
+ ...theme.applyDarkStyles({
1295
+ backgroundColor: (theme.vars || theme).palette.primaryDark[800],
1296
+ boxShadow: '0 4px 16px hsl(0, 100%, 1%)'
1297
+ })
1298
+ }
1299
+ })
1300
+ }
1301
+ },
1108
1302
  MuiPaginationItem: {
1109
1303
  styleOverrides: {
1110
1304
  root: ({
@@ -1153,5 +1347,11 @@ function getThemedComponents() {
1153
1347
  }
1154
1348
  };
1155
1349
  }
1156
- const brandingDarkTheme = exports.brandingDarkTheme = (0, _styles.createTheme)((0, _extends2.default)({}, getDesignTokens('dark'), getThemedComponents()));
1157
- const brandingLightTheme = exports.brandingLightTheme = (0, _styles.createTheme)((0, _extends2.default)({}, getDesignTokens('light'), getThemedComponents()));
1350
+ const brandingDarkTheme = exports.brandingDarkTheme = (0, _styles.createTheme)({
1351
+ ...getDesignTokens('dark'),
1352
+ ...getThemedComponents()
1353
+ });
1354
+ const brandingLightTheme = exports.brandingLightTheme = (0, _styles.createTheme)({
1355
+ ...getDesignTokens('light'),
1356
+ ...getThemedComponents()
1357
+ });