@mui/docs 6.0.0-alpha.0 → 6.0.0-alpha.10

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 (106) hide show
  1. package/CHANGELOG.md +591 -6
  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 +20 -0
  22. package/InfoCard/InfoCard.js +87 -0
  23. package/InfoCard/index.d.ts +1 -0
  24. package/InfoCard/index.js +1 -0
  25. package/InfoCard/package.json +6 -0
  26. package/Link/Link.js +40 -38
  27. package/MarkdownElement/MarkdownElement.d.ts +6 -0
  28. package/MarkdownElement/MarkdownElement.js +825 -0
  29. package/MarkdownElement/index.d.ts +1 -0
  30. package/MarkdownElement/index.js +1 -0
  31. package/MarkdownElement/package.json +6 -0
  32. package/NProgressBar/NProgressBar.js +6 -7
  33. package/SectionTitle/SectionTitle.d.ts +7 -0
  34. package/SectionTitle/SectionTitle.js +30 -0
  35. package/SectionTitle/index.d.ts +1 -0
  36. package/SectionTitle/index.js +1 -0
  37. package/SectionTitle/package.json +6 -0
  38. package/branding/BrandingProvider.d.ts +9 -0
  39. package/branding/BrandingProvider.js +17 -0
  40. package/branding/brandingTheme.d.ts +152 -0
  41. package/branding/brandingTheme.js +1346 -0
  42. package/branding/index.d.ts +2 -0
  43. package/branding/index.js +2 -0
  44. package/branding/package.json +6 -0
  45. package/node/CodeCopy/CodeCopy.js +188 -0
  46. package/node/CodeCopy/CodeCopyButton.js +50 -0
  47. package/node/CodeCopy/index.js +40 -0
  48. package/node/CodeCopy/useClipboardCopy.js +30 -0
  49. package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
  50. package/node/ComponentLinkHeader/index.js +24 -0
  51. package/node/HighlightedCode/HighlightedCode.js +77 -0
  52. package/node/HighlightedCode/index.js +16 -0
  53. package/node/InfoCard/InfoCard.js +97 -0
  54. package/node/InfoCard/index.js +16 -0
  55. package/node/Link/Link.js +43 -40
  56. package/node/MarkdownElement/MarkdownElement.js +837 -0
  57. package/node/MarkdownElement/index.js +16 -0
  58. package/node/NProgressBar/NProgressBar.js +6 -7
  59. package/node/SectionTitle/SectionTitle.js +38 -0
  60. package/node/SectionTitle/index.js +16 -0
  61. package/node/branding/BrandingProvider.js +25 -0
  62. package/node/branding/brandingTheme.js +1357 -0
  63. package/node/branding/index.js +27 -0
  64. package/node/svgIcons/AdobeXDIcon.js +22 -0
  65. package/node/svgIcons/BundleSizeIcon.js +22 -0
  66. package/node/svgIcons/FigmaIcon.js +31 -0
  67. package/node/svgIcons/FileDownload.js +3 -3
  68. package/node/svgIcons/JavaScript.js +3 -3
  69. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  70. package/node/svgIcons/SketchIcon.js +36 -0
  71. package/node/svgIcons/TypeScript.js +3 -3
  72. package/node/svgIcons/W3CIcon.js +24 -0
  73. package/node/translations/translations.json +216 -0
  74. package/package.json +11 -8
  75. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  76. package/svgIcons/AdobeXDIcon.js +14 -0
  77. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  78. package/svgIcons/BundleSizeIcon.js +14 -0
  79. package/svgIcons/FigmaIcon.d.ts +4 -0
  80. package/svgIcons/FigmaIcon.js +23 -0
  81. package/svgIcons/FileDownload.d.ts +7 -0
  82. package/svgIcons/FileDownload.js +3 -3
  83. package/svgIcons/JavaScript.d.ts +7 -0
  84. package/svgIcons/JavaScript.js +3 -3
  85. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  86. package/svgIcons/MaterialDesignIcon.js +19 -0
  87. package/svgIcons/SketchIcon.d.ts +4 -0
  88. package/svgIcons/SketchIcon.js +28 -0
  89. package/svgIcons/TypeScript.d.ts +7 -0
  90. package/svgIcons/TypeScript.js +3 -3
  91. package/svgIcons/W3CIcon.d.ts +4 -0
  92. package/svgIcons/W3CIcon.js +16 -0
  93. package/translations/translations.json +4 -2
  94. package/tsconfig.build.tsbuildinfo +1 -1
  95. package/legacy/DocsProvider/DocsProvider.js +0 -25
  96. package/legacy/DocsProvider/index.js +0 -1
  97. package/legacy/Link/Link.js +0 -101
  98. package/legacy/Link/index.js +0 -1
  99. package/legacy/NProgressBar/NProgressBar.js +0 -80
  100. package/legacy/NProgressBar/index.js +0 -1
  101. package/legacy/i18n/i18n.js +0 -105
  102. package/legacy/i18n/index.js +0 -1
  103. package/legacy/svgIcons/FileDownload.js +0 -14
  104. package/legacy/svgIcons/JavaScript.js +0 -14
  105. package/legacy/svgIcons/TypeScript.js +0 -14
  106. package/legacy/translations/index.js +0 -4
@@ -0,0 +1,1357 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getMetaThemeColor = exports.getDesignTokens = exports.error = exports.brandingLightTheme = exports.brandingDarkTheme = exports.blueDark = exports.blue = void 0;
8
+ exports.getThemedComponents = getThemedComponents;
9
+ exports.warning = exports.success = exports.grey = void 0;
10
+ var _ArrowDropDownRounded = _interopRequireDefault(require("@mui/icons-material/ArrowDropDownRounded"));
11
+ var _styles = require("@mui/material/styles");
12
+ // TODO: enable this once types conflict is fixed
13
+ // declare module '@mui/material/Button' {
14
+ // interface ButtonPropsVariantOverrides {
15
+ // code: true;
16
+ // }
17
+ // }
18
+
19
+ const defaultTheme = (0, _styles.createTheme)();
20
+ const blue = exports.blue = {
21
+ 50: 'hsl(210, 100%, 96%)',
22
+ 100: 'hsl(210, 100%, 90%)',
23
+ 200: 'hsl(210, 100%, 80%)',
24
+ 300: 'hsl(210, 100%, 70%)',
25
+ 400: 'hsl(210, 100%, 60%)',
26
+ main: 'hsl(210, 100%, 45%)',
27
+ 500: 'hsl(210, 100%, 45%)',
28
+ 600: 'hsl(210, 100%, 42%)',
29
+ 700: 'hsl(210, 100%, 38%)',
30
+ 800: 'hsl(210, 100%, 30%)',
31
+ 900: 'hsl(210, 100%, 23%)'
32
+ };
33
+ const blueDark = exports.blueDark = {
34
+ 50: 'hsl(210, 14%, 92%)',
35
+ 100: 'hsl(210, 14%, 87%)',
36
+ 200: 'hsl(210, 14%, 72%)',
37
+ 300: 'hsl(210, 14%, 56%)',
38
+ main: 'hsl(210, 14%, 56%)',
39
+ 400: 'hsl(210, 14%, 36%)',
40
+ 500: 'hsl(210, 14%, 28%)',
41
+ 600: 'hsl(210, 14%, 22%)',
42
+ 700: 'hsl(210, 14%, 13%)',
43
+ 800: 'hsl(210, 14%, 9%)',
44
+ 900: 'hsl(210, 14%, 7%)'
45
+ };
46
+ const grey = exports.grey = {
47
+ 50: 'hsl(215, 15%, 97%)',
48
+ 100: 'hsl(215, 15%, 92%)',
49
+ 200: 'hsl(215, 15%, 89%)',
50
+ 300: 'hsl(215, 15%, 82%)',
51
+ 400: 'hsl(215, 15%, 75%)',
52
+ 500: 'hsl(215, 15%, 65%)',
53
+ 600: 'hsl(215, 15%, 50%)',
54
+ 700: 'hsl(215, 15%, 40%)',
55
+ 800: 'hsl(215, 15%, 22%)',
56
+ 900: 'hsl(215, 15%, 12%)'
57
+ };
58
+ const error = exports.error = {
59
+ 50: 'hsl(355, 98%, 97%)',
60
+ 100: 'hsl(355, 98%, 93%)',
61
+ 200: 'hsl(355, 98%, 87%)',
62
+ 300: 'hsl(355, 98%, 80%)',
63
+ 400: 'hsl(355, 98%, 74%)',
64
+ 500: 'hsl(355, 98%, 66%)',
65
+ main: 'hsl(355, 98%, 66%)',
66
+ 600: 'hsl(355, 98%, 46%)',
67
+ 700: 'hsl(355, 98%, 39%)',
68
+ 800: 'hsl(355, 98%, 29%)',
69
+ 900: 'hsl(355, 98%, 17%)'
70
+ };
71
+ const success = exports.success = {
72
+ 50: 'hsl(144, 72%, 95%)',
73
+ 100: 'hsl(144, 72%, 87%)',
74
+ 200: 'hsl(144, 72%, 77%)',
75
+ 300: 'hsl(144, 72%, 66%)',
76
+ 400: 'hsl(144, 72%, 56%)',
77
+ 500: 'hsl(144, 72%, 46%)',
78
+ 600: 'hsl(144, 72%, 41%)',
79
+ 700: 'hsl(144, 72%, 37%)',
80
+ 800: 'hsl(144, 72%, 32%)',
81
+ 900: 'hsl(144, 72%, 21%)'
82
+ };
83
+ const warning = exports.warning = {
84
+ 50: 'hsl(48, 100%, 96%)',
85
+ 100: 'hsl(48, 100%, 88%)',
86
+ 200: 'hsl(48, 100%, 82%)',
87
+ 300: 'hsl(48, 100%, 64%)',
88
+ 400: 'hsl(48, 100%, 48%)',
89
+ 500: 'hsl(48, 100%, 44%)',
90
+ main: 'hsl(48, 100%, 44%)',
91
+ 600: 'hsl(40, 100%, 40%)',
92
+ 700: 'hsl(36, 100%, 34%)',
93
+ 800: 'hsl(36, 100%, 27%)',
94
+ 900: 'hsl(36, 100%, 18%)'
95
+ };
96
+ const systemFont = ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'];
97
+ const getMetaThemeColor = mode => {
98
+ const themeColor = {
99
+ light: blue[600],
100
+ dark: blueDark[900]
101
+ };
102
+ return themeColor[mode];
103
+ };
104
+ exports.getMetaThemeColor = getMetaThemeColor;
105
+ const getDesignTokens = mode => ({
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
+ },
124
+ divider: mode === 'dark' ? (0, _styles.alpha)(blueDark[500], 0.3) : grey[100],
125
+ primaryDark: blueDark,
126
+ mode,
127
+ ...(mode === 'dark' && {
128
+ background: {
129
+ default: blueDark[900],
130
+ paper: (0, _styles.alpha)(blueDark[800], 0.8)
131
+ }
132
+ }),
133
+ common: {
134
+ black: 'hsl(200, 10%, 4%)'
135
+ },
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
+ },
159
+ error,
160
+ success: {
161
+ ...success,
162
+ ...(mode === 'dark' && {
163
+ main: success[600]
164
+ }),
165
+ ...(mode === 'light' && {
166
+ main: success[700]
167
+ })
168
+ },
169
+ warning,
170
+ gradients: {
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%)`,
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)})`
173
+ }
174
+ },
175
+ shape: {
176
+ borderRadius: 12
177
+ },
178
+ spacing: 8,
179
+ typography: {
180
+ fontFamily: ['"IBM Plex Sans"', ...systemFont].join(','),
181
+ // Match VS Code
182
+ // https://github.com/microsoft/vscode/blob/b38691f611d1ce3ef437c67a1b047c757b7b4e53/src/vs/editor/common/config/editorOptions.ts#L4578-L4580
183
+ // https://github.com/microsoft/vscode/blob/d950552131d7350a45dac8b59bf179469c36c2ac/src/vs/editor/standalone/browser/standalone-tokens.css#L10
184
+ fontFamilyCode: ['Menlo',
185
+ // macOS
186
+ 'Consolas',
187
+ // Windows
188
+ '"Droid Sans Mono"',
189
+ // Linux
190
+ 'monospace' // fallback
191
+ ].join(','),
192
+ fontFamilyTagline: ['"General Sans"', ...systemFont].join(','),
193
+ fontFamilySystem: systemFont.join(','),
194
+ fontWeightSemiBold: 600,
195
+ fontWeightExtraBold: 800,
196
+ h1: {
197
+ fontFamily: ['"General Sans"', ...systemFont].join(','),
198
+ fontSize: 'clamp(2.5rem, 1.125rem + 3.5vw, 3.5em)',
199
+ fontWeight: 600,
200
+ lineHeight: 78 / 70,
201
+ letterSpacing: -0.2,
202
+ ...(mode === 'light' && {
203
+ color: blueDark[900]
204
+ })
205
+ },
206
+ h2: {
207
+ fontFamily: ['"General Sans"', ...systemFont].join(','),
208
+ fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)',
209
+ fontWeight: 600,
210
+ lineHeight: 44 / 36,
211
+ letterSpacing: -0.2,
212
+ color: mode === 'dark' ? grey[100] : blueDark[700]
213
+ },
214
+ h3: {
215
+ fontFamily: ['"General Sans"', ...systemFont].join(','),
216
+ fontSize: defaultTheme.typography.pxToRem(36),
217
+ lineHeight: 44 / 36,
218
+ letterSpacing: 0.2
219
+ },
220
+ h4: {
221
+ fontFamily: ['"General Sans"', ...systemFont].join(','),
222
+ fontSize: defaultTheme.typography.pxToRem(30),
223
+ lineHeight: 42 / 28,
224
+ letterSpacing: 0.2
225
+ },
226
+ h5: {
227
+ fontSize: defaultTheme.typography.pxToRem(24),
228
+ lineHeight: 36 / 24,
229
+ letterSpacing: 0.1,
230
+ color: mode === 'dark' ? blue[300] : blue.main
231
+ },
232
+ h6: {
233
+ fontSize: defaultTheme.typography.pxToRem(20),
234
+ lineHeight: 30 / 20
235
+ },
236
+ button: {
237
+ textTransform: 'initial',
238
+ fontWeight: 700,
239
+ letterSpacing: 0
240
+ },
241
+ subtitle1: {
242
+ fontSize: defaultTheme.typography.pxToRem(18),
243
+ lineHeight: 24 / 18,
244
+ letterSpacing: 0,
245
+ fontWeight: 500
246
+ },
247
+ body1: {
248
+ fontSize: defaultTheme.typography.pxToRem(16),
249
+ lineHeight: 24 / 16,
250
+ letterSpacing: 0
251
+ },
252
+ body2: {
253
+ fontSize: defaultTheme.typography.pxToRem(14),
254
+ lineHeight: 21 / 14,
255
+ letterSpacing: 0
256
+ },
257
+ caption: {
258
+ display: 'inline-block',
259
+ fontSize: defaultTheme.typography.pxToRem(12),
260
+ lineHeight: 18 / 12,
261
+ letterSpacing: 0,
262
+ fontWeight: 700
263
+ },
264
+ allVariants: {
265
+ scrollMarginTop: 'calc(var(--MuiDocs-header-height) + 32px)'
266
+ }
267
+ },
268
+ /**
269
+ * This utility exists to help transitioning to CSS variables page by page (prevent dark mode flicker).
270
+ * It will use the proper styling method based on the theme because the component might be on the page that does not support CSS variables yet.
271
+ *
272
+ * 😓 Without this utility:
273
+ * {
274
+ * ...theme.vars ? {
275
+ * color: theme.vars.palette.primary.main,
276
+ * [theme.getColorScheme('dark')]: {
277
+ * color: '#fff',
278
+ * }
279
+ * } : {
280
+ * color: theme.palette.mode === 'dark' ? '#fff' : theme.palette.primary.main,
281
+ * }
282
+ * }
283
+ *
284
+ * 🤩 Using the utility:
285
+ * {
286
+ * color: (theme.vars || theme).palette.primary.main,
287
+ * ...theme.applyDarkStyles({
288
+ * color: '#fff',
289
+ * }),
290
+ * }
291
+ *
292
+ * -------------------------------------------------------------------------------------------------
293
+ * 💡 This util should be used in an array if the styles contain pseudo classes or nested selectors:
294
+ *
295
+ * ❌ There is a chance that the upper selectors could be overridden
296
+ * {
297
+ * // the whole selector could be overridden
298
+ * '&::before': {
299
+ * color: ...
300
+ * },
301
+ * ...theme.applyDarkStyles({
302
+ * '&::before': {
303
+ * color: ...
304
+ * }
305
+ * })
306
+ * }
307
+ *
308
+ * ✅ use an array (supports in both emotion and styled-components)
309
+ * Only the `color` will be overridden in dark mode.
310
+ * [
311
+ * '&::before': {
312
+ * color: ...
313
+ * },
314
+ * theme.applyDarkStyles({
315
+ * '&::before': {
316
+ * color: ...
317
+ * }
318
+ * })
319
+ * ]
320
+ */
321
+ applyDarkStyles(css) {
322
+ return this.applyStyles('dark', css);
323
+ }
324
+ });
325
+ exports.getDesignTokens = getDesignTokens;
326
+ function getThemedComponents() {
327
+ return {
328
+ components: {
329
+ MuiAlert: {
330
+ styleOverrides: {
331
+ root: {
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
352
+ },
353
+ standardWarning: ({
354
+ theme
355
+ }) => [
356
+ // same styles from the MarkdownElement callout
357
+ {
358
+ backgroundColor: (0, _styles.alpha)(theme.palette.warning[50], 0.5),
359
+ color: (theme.vars || theme).palette.grey[900],
360
+ border: '1px solid',
361
+ borderColor: (0, _styles.alpha)(theme.palette.warning[700], 0.15),
362
+ '& .MuiAlert-icon': {
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
+ }
372
+ }
373
+ }, theme.applyDarkStyles({
374
+ backgroundColor: (0, _styles.alpha)(theme.palette.warning[700], 0.12),
375
+ color: (theme.vars || theme).palette.warning[50],
376
+ '& .MuiAlert-icon': {
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
+ }
385
+ }
386
+ })],
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
+ })]
421
+ }
422
+ },
423
+ MuiButtonBase: {
424
+ defaultProps: {
425
+ disableTouchRipple: true,
426
+ disableRipple: true
427
+ },
428
+ styleOverrides: {
429
+ root: ({
430
+ theme
431
+ }) => ({
432
+ transition: 'all 100ms ease-in',
433
+ '&:focus-visible': {
434
+ outline: `3px solid ${(0, _styles.alpha)(theme.palette.primary[500], 0.5)}`,
435
+ outlineOffset: '2px'
436
+ }
437
+ })
438
+ }
439
+ },
440
+ MuiButton: {
441
+ defaultProps: {
442
+ disableElevation: true
443
+ },
444
+ styleOverrides: {
445
+ root: ({
446
+ theme,
447
+ ownerState
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,
483
+ '& .MuiButton-startIcon': {
484
+ transition: '0.15s',
485
+ marginRight: 4,
486
+ marginLeft: -1
487
+ },
488
+ '& .MuiButton-endIcon': {
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
+ }
499
+ }
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
+ })
577
+ },
578
+ variants: [{
579
+ // @ts-ignore internal repo module augmentation issue
580
+ props: {
581
+ variant: 'code'
582
+ },
583
+ style: ({
584
+ theme
585
+ }) => [{
586
+ cursor: 'copy',
587
+ padding: 0,
588
+ width: 'max-content',
589
+ backgroundColor: 'transparent',
590
+ color: (theme.vars || theme).palette.grey[600],
591
+ fontFamily: theme.typography.fontFamilyCode,
592
+ fontWeight: 400,
593
+ fontSize: defaultTheme.typography.pxToRem(12),
594
+ lineHeight: 21 / 14,
595
+ letterSpacing: 0,
596
+ WebkitFontSmoothing: 'subpixel-antialiased',
597
+ '& .MuiButton-startIcon': {
598
+ color: (theme.vars || theme).palette.grey[400]
599
+ },
600
+ '& .MuiButton-endIcon': {
601
+ display: 'inline-block',
602
+ position: 'absolute',
603
+ color: (theme.vars || theme).palette.primary.main,
604
+ right: -22,
605
+ top: -1,
606
+ opacity: 0,
607
+ transitionProperty: 'opacity',
608
+ transitionDuration: '100ms',
609
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)'
610
+ },
611
+ '&:hover, &.Mui-focusVisible': {
612
+ backgroundColor: 'transparent',
613
+ color: (theme.vars || theme).palette.primary.main,
614
+ '& .MuiButton-endIcon': {
615
+ color: (theme.vars || theme).palette.primary.main,
616
+ opacity: 1
617
+ }
618
+ }
619
+ }, theme.applyDarkStyles({
620
+ '& .MuiButton-endIcon': {
621
+ color: (theme.vars || theme).palette.primary[300]
622
+ },
623
+ '&:hover, &.Mui-focusVisible': {
624
+ color: (theme.vars || theme).palette.primary[300],
625
+ '& .MuiButton-endIcon': {
626
+ opacity: 1
627
+ }
628
+ }
629
+ })]
630
+ }, {
631
+ // @ts-ignore internal repo module augmentation issue
632
+ props: {
633
+ variant: 'codeOutlined'
634
+ },
635
+ style: ({
636
+ theme
637
+ }) => [{
638
+ display: 'inline-block',
639
+ justifyContent: 'start',
640
+ overflowX: 'hidden',
641
+ whiteSpace: 'nowrap',
642
+ textOverflow: 'ellipsis',
643
+ position: 'relative',
644
+ border: '1px solid',
645
+ color: (theme.vars || theme).palette.grey[900],
646
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[50], 0.3),
647
+ borderColor: (theme.vars || theme).palette.grey[200],
648
+ boxShadow: `0px 2px 2px ${(0, _styles.alpha)(theme.palette.primary[100], 0.2)}, inset 0px 4px 4px ${(0, _styles.alpha)(theme.palette.primary[100], 0.2)}`,
649
+ fontFamily: theme.typography.fontFamilyCode,
650
+ fontWeight: 400,
651
+ fontSize: defaultTheme.typography.pxToRem(12),
652
+ lineHeight: 21 / 14,
653
+ letterSpacing: 0,
654
+ WebkitFontSmoothing: 'subpixel-antialiased',
655
+ '& .MuiButton-endIcon': {
656
+ display: 'inline-block',
657
+ position: 'absolute',
658
+ top: 12,
659
+ right: 0,
660
+ marginRight: 10,
661
+ color: (theme.vars || theme).palette.grey[600]
662
+ },
663
+ '&:hover, &.Mui-focusVisible': {
664
+ borderColor: (theme.vars || theme).palette.primary.main,
665
+ backgroundColor: (theme.vars || theme).palette.primary[50],
666
+ color: (theme.vars || theme).palette.primary[600],
667
+ '& .MuiButton-endIcon': {
668
+ color: (theme.vars || theme).palette.primary.main
669
+ }
670
+ }
671
+ }, theme.applyDarkStyles({
672
+ color: (theme.vars || theme).palette.grey[500],
673
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
674
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
675
+ boxShadow: '0px 2px 2px #0B0D0E, inset 0px 4px 4px rgba(20, 25, 31, 0.3)',
676
+ '& .MuiButton-endIcon': {
677
+ color: (theme.vars || theme).palette.grey[400]
678
+ },
679
+ '&:hover, &.Mui-focusVisible': {
680
+ backgroundColor: (theme.vars || theme).palette.primary[900],
681
+ color: (theme.vars || theme).palette.primary[100],
682
+ '& .MuiButton-endIcon': {
683
+ color: (theme.vars || theme).palette.primary[300]
684
+ }
685
+ }
686
+ })]
687
+ }, {
688
+ // @ts-ignore internal repo module augmentation issue
689
+ props: {
690
+ variant: 'link'
691
+ },
692
+ style: ({
693
+ theme
694
+ }) => ({
695
+ marginBottom: 1,
696
+ fontSize: theme.typography.pxToRem(14),
697
+ fontWeight: theme.typography.fontWeightBold,
698
+ color: (theme.vars || theme).palette.primary[600],
699
+ '&:hover': {
700
+ backgroundColor: (theme.vars || theme).palette.primary[50]
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
+ })
709
+ }]
710
+ },
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
+ },
736
+ variants: [{
737
+ props: {
738
+ color: 'primary'
739
+ },
740
+ style: ({
741
+ theme
742
+ }) => [{
743
+ color: (theme.vars || theme).palette.primary.main,
744
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
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`,
747
+ '&:hover': {
748
+ borderColor: (theme.vars || theme).palette.grey[300],
749
+ background: (theme.vars || theme).palette.grey[50]
750
+ }
751
+ }, theme.applyDarkStyles({
752
+ color: (theme.vars || theme).palette.primary[300],
753
+ borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
754
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
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`,
756
+ '&:hover': {
757
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
758
+ background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
759
+ }
760
+ })]
761
+ }, {
762
+ props: {
763
+ color: 'info'
764
+ },
765
+ style: ({
766
+ theme
767
+ }) => [{
768
+ color: (theme.vars || theme).palette.text.secondary,
769
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[50], 0.1),
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`,
772
+ '&:hover': {
773
+ color: (theme.vars || theme).palette.text.primary,
774
+ borderColor: (theme.vars || theme).palette.grey[300],
775
+ background: (theme.vars || theme).palette.grey[50]
776
+ }
777
+ }, theme.applyDarkStyles({
778
+ borderColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.5),
779
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.2),
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`,
781
+ '&:hover': {
782
+ borderColor: (theme.vars || theme).palette.primaryDark[600],
783
+ background: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.8)
784
+ }
785
+ })]
786
+ }]
787
+ },
788
+ MuiMenu: {
789
+ styleOverrides: {
790
+ paper: ({
791
+ theme
792
+ }) => [{
793
+ padding: '6px',
794
+ minWidth: 160,
795
+ color: (theme.vars || theme).palette.text.secondary,
796
+ backgroundImage: 'none',
797
+ border: '1px solid',
798
+ backgroundColor: (theme.vars || theme).palette.background.paper,
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
+ },
808
+ '& .MuiMenuItem-root': {
809
+ padding: '6px 8px',
810
+ borderRadius: '6px',
811
+ fontSize: theme.typography.pxToRem(14),
812
+ fontWeight: theme.typography.fontWeightMedium,
813
+ '&:hover': {
814
+ backgroundColor: (theme.vars || theme).palette.grey[100],
815
+ color: (theme.vars || theme).palette.text.primary
816
+ },
817
+ '&:focus-visible': {
818
+ outline: 'none'
819
+ },
820
+ '&.Mui-selected': {
821
+ fontWeight: 500,
822
+ color: (theme.vars || theme).palette.primary[600],
823
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[100], 0.6)
824
+ }
825
+ }
826
+ }, theme.applyDarkStyles({
827
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900],
828
+ borderColor: (theme.vars || theme).palette.primaryDark[700],
829
+ '& .MuiMenuItem-root': {
830
+ '&:hover': {
831
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700]
832
+ },
833
+ '&.Mui-selected': {
834
+ color: (theme.vars || theme).palette.primary[200],
835
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.4)
836
+ }
837
+ }
838
+ })]
839
+ }
840
+ },
841
+ MuiPopover: {
842
+ styleOverrides: {
843
+ paper: ({
844
+ theme
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
+ })
851
+ }
852
+ },
853
+ MuiDivider: {
854
+ styleOverrides: {
855
+ root: ({
856
+ theme
857
+ }) => ({
858
+ borderColor: (theme.vars || theme).palette.divider
859
+ })
860
+ }
861
+ },
862
+ MuiLink: {
863
+ defaultProps: {
864
+ underline: 'none'
865
+ },
866
+ styleOverrides: {
867
+ root: ({
868
+ theme
869
+ }) => ({
870
+ display: 'inline-flex',
871
+ alignItems: 'center',
872
+ fontWeight: theme.typography.fontWeightSemiBold,
873
+ '&.MuiTypography-body1 > svg': {
874
+ marginTop: 2
875
+ },
876
+ '& svg:last-child': {
877
+ marginLeft: 2
878
+ },
879
+ '&:focus-visible': {
880
+ outline: `3px solid ${(0, _styles.alpha)(theme.palette.primary[500], 0.5)}`,
881
+ outlineOffset: '2px'
882
+ }
883
+ })
884
+ },
885
+ variants: [{
886
+ props: {
887
+ color: 'primary'
888
+ },
889
+ style: ({
890
+ theme
891
+ }) => [{
892
+ color: (theme.vars || theme).palette.primary[600],
893
+ '&:hover': {
894
+ color: (theme.vars || theme).palette.primary[700]
895
+ }
896
+ }, theme.applyDarkStyles({
897
+ color: (theme.vars || theme).palette.primary[300],
898
+ '&:hover': {
899
+ color: (theme.vars || theme).palette.primary[200]
900
+ }
901
+ })]
902
+ }]
903
+ },
904
+ MuiChip: {
905
+ styleOverrides: {
906
+ root: ({
907
+ ownerState: {
908
+ color,
909
+ variant
910
+ },
911
+ theme
912
+ }) => ({
913
+ fontWeight: theme.typography.fontWeightSemiBold,
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],
919
+ '&:hover': {
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
+ })
1037
+ }
1038
+ },
1039
+ MuiList: {
1040
+ styleOverrides: {
1041
+ root: {
1042
+ padding: 0
1043
+ }
1044
+ }
1045
+ },
1046
+ MuiListItemButton: {
1047
+ styleOverrides: {
1048
+ root: ({
1049
+ theme
1050
+ }) => [{
1051
+ padding: '8px',
1052
+ textTransform: 'none',
1053
+ fontWeight: 500,
1054
+ fontSize: theme.typography.pxToRem(14),
1055
+ color: theme.palette.grey[700],
1056
+ borderRadius: 0,
1057
+ '&:hover': {
1058
+ backgroundColor: theme.palette.grey[50]
1059
+ },
1060
+ '&.Mui-selected': {
1061
+ borderRadius: 10,
1062
+ border: '1px solid',
1063
+ color: (theme.vars || theme).palette.primary[500],
1064
+ borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1065
+ backgroundColor: (theme.vars || theme).palette.primary[50],
1066
+ '&:hover': {
1067
+ backgroundColor: (theme.vars || theme).palette.primary[100]
1068
+ }
1069
+ }
1070
+ }, theme.applyDarkStyles({
1071
+ color: theme.palette.grey[300],
1072
+ '&:hover': {
1073
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[700], 0.4)
1074
+ },
1075
+ '&.Mui-selected': {
1076
+ color: '#fff',
1077
+ borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1078
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
1079
+ '&:hover': {
1080
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600]
1081
+ }
1082
+ }
1083
+ })]
1084
+ }
1085
+ },
1086
+ MuiSelect: {
1087
+ defaultProps: {
1088
+ IconComponent: _ArrowDropDownRounded.default
1089
+ },
1090
+ styleOverrides: {
1091
+ iconFilled: {
1092
+ top: 'calc(50% - .25em)'
1093
+ }
1094
+ }
1095
+ },
1096
+ MuiTab: {
1097
+ defaultProps: {
1098
+ disableTouchRipple: true
1099
+ }
1100
+ },
1101
+ MuiPaper: {
1102
+ styleOverrides: {
1103
+ root: ({
1104
+ theme,
1105
+ ownerState
1106
+ }) => [{
1107
+ backgroundImage: 'none',
1108
+ backgroundColor: '#fff',
1109
+ '&[href]': {
1110
+ textDecorationLine: 'none'
1111
+ },
1112
+ transition: theme.transitions.create(['border', 'box-shadow'], {
1113
+ duration: theme.transitions.duration.shortest
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
+ }
1129
+ },
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
+ }
1135
+ }
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
+ }
1154
+ }
1155
+ })
1156
+ })]
1157
+ }
1158
+ },
1159
+ MuiTableCell: {
1160
+ styleOverrides: {
1161
+ root: ({
1162
+ theme,
1163
+ ownerState
1164
+ }) => ({
1165
+ padding: theme.spacing(1, 2),
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
+ })
1174
+ })
1175
+ }
1176
+ },
1177
+ MuiToggleButtonGroup: {
1178
+ styleOverrides: {
1179
+ root: ({
1180
+ theme
1181
+ }) => ({
1182
+ backgroundColor: '#fff',
1183
+ ...theme.applyDarkStyles({
1184
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1185
+ })
1186
+ })
1187
+ }
1188
+ },
1189
+ MuiToggleButton: {
1190
+ styleOverrides: {
1191
+ root: ({
1192
+ theme,
1193
+ ownerState
1194
+ }) => [{
1195
+ textTransform: 'none',
1196
+ fontWeight: theme.typography.fontWeightMedium,
1197
+ color: theme.palette.text.secondary,
1198
+ borderColor: theme.palette.grey[200],
1199
+ ...(ownerState.size === 'small' && {
1200
+ padding: '0.375rem 0.75rem'
1201
+ }),
1202
+ '&.Mui-selected': {
1203
+ color: (theme.vars || theme).palette.primary[700],
1204
+ borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
1205
+ backgroundColor: (theme.vars || theme).palette.primary[50],
1206
+ '&:hover': {
1207
+ backgroundColor: (theme.vars || theme).palette.primary[100]
1208
+ }
1209
+ }
1210
+ }, theme.applyDarkStyles({
1211
+ borderColor: theme.palette.primaryDark[700],
1212
+ '&:hover': {
1213
+ backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[600], 0.2)
1214
+ },
1215
+ '&.Mui-selected': {
1216
+ color: (theme.vars || theme).palette.primary[200],
1217
+ borderColor: `${(theme.vars || theme).palette.primary[800]} !important`,
1218
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.4),
1219
+ '&:hover': {
1220
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.8),
1221
+ borderColor: `${(theme.vars || theme).palette.primary[400]} !important`
1222
+ }
1223
+ }
1224
+ })]
1225
+ }
1226
+ },
1227
+ MuiTooltip: {
1228
+ defaultProps: {
1229
+ arrow: true
1230
+ },
1231
+ styleOverrides: {
1232
+ tooltip: ({
1233
+ theme
1234
+ }) => ({
1235
+ padding: '6px 8px',
1236
+ borderRadius: 6,
1237
+ backgroundColor: (theme.vars || theme).palette.grey[800],
1238
+ '& .MuiTooltip-arrow': {
1239
+ color: (theme.vars || theme).palette.grey[800]
1240
+ }
1241
+ })
1242
+ }
1243
+ },
1244
+ MuiSwitch: {
1245
+ styleOverrides: {
1246
+ root: {
1247
+ width: 32,
1248
+ height: 20,
1249
+ padding: 0,
1250
+ '& .MuiSwitch-switchBase': {
1251
+ '&.Mui-checked': {
1252
+ transform: 'translateX(11px)',
1253
+ color: '#fff'
1254
+ }
1255
+ }
1256
+ },
1257
+ switchBase: {
1258
+ height: 20,
1259
+ width: 20,
1260
+ padding: 0,
1261
+ color: '#fff',
1262
+ '&.Mui-checked + .MuiSwitch-track': {
1263
+ opacity: 1
1264
+ }
1265
+ },
1266
+ track: ({
1267
+ theme
1268
+ }) => ({
1269
+ opacity: 1,
1270
+ borderRadius: 32,
1271
+ backgroundColor: theme.palette.grey[400],
1272
+ ...theme.applyDarkStyles({
1273
+ backgroundColor: theme.palette.grey[800]
1274
+ })
1275
+ }),
1276
+ thumb: {
1277
+ flexShrink: 0,
1278
+ width: '14px',
1279
+ height: '14px'
1280
+ }
1281
+ }
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
+ },
1302
+ MuiPaginationItem: {
1303
+ styleOverrides: {
1304
+ root: ({
1305
+ theme
1306
+ }) => [{
1307
+ textTransform: 'none',
1308
+ fontWeight: theme.typography.fontWeightSemiBold,
1309
+ color: theme.palette.grey[700],
1310
+ borderColor: theme.palette.grey[200],
1311
+ borderRadius: '8px',
1312
+ '&.Mui-selected': {
1313
+ color: (theme.vars || theme).palette.primary[500],
1314
+ borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1315
+ backgroundColor: (theme.vars || theme).palette.primary[50],
1316
+ '&:hover': {
1317
+ backgroundColor: (theme.vars || theme).palette.primary[100]
1318
+ }
1319
+ }
1320
+ }, theme.applyDarkStyles({
1321
+ color: theme.palette.grey[200],
1322
+ borderColor: theme.palette.primaryDark[700],
1323
+ '&.Mui-selected': {
1324
+ color: theme.palette.primary[100],
1325
+ borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1326
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.5),
1327
+ '&:hover': {
1328
+ backgroundColor: (0, _styles.alpha)(theme.palette.primary[900], 0.8)
1329
+ }
1330
+ }
1331
+ })]
1332
+ }
1333
+ },
1334
+ MuiCssBaseline: {
1335
+ defaultProps: {
1336
+ enableColorScheme: true
1337
+ },
1338
+ styleOverrides: {
1339
+ html: {
1340
+ overflowY: 'scroll'
1341
+ // TODO add support for it,
1342
+ // https://github.com/mui/material-ui/issues/40748
1343
+ // scrollbarGutter: 'stable',
1344
+ }
1345
+ }
1346
+ }
1347
+ }
1348
+ };
1349
+ }
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
+ });