@mui/docs 9.0.0-alpha.2 → 9.0.0-alpha.3

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 (253) hide show
  1. package/Ad/Ad.js +33 -42
  2. package/Ad/AdCarbon.js +18 -27
  3. package/Ad/AdDisplay.js +22 -29
  4. package/Ad/AdGuest.js +8 -15
  5. package/Ad/AdInHouse.js +4 -11
  6. package/Ad/AdManager.js +8 -17
  7. package/Ad/AdProvider.js +5 -13
  8. package/Ad/ad.styles.js +5 -13
  9. package/Ad/index.js +6 -62
  10. package/AnalyticsProvider/AnalyticsProvider.d.ts +17 -0
  11. package/AnalyticsProvider/AnalyticsProvider.js +225 -0
  12. package/AnalyticsProvider/index.d.ts +1 -0
  13. package/AnalyticsProvider/index.js +1 -0
  14. package/CHANGELOG.md +37 -0
  15. package/CodeCopy/CodeCopy.js +10 -19
  16. package/CodeCopy/CodeCopyButton.js +9 -16
  17. package/CodeCopy/index.js +3 -40
  18. package/CodeCopy/useClipboardCopy.js +4 -12
  19. package/ComponentLinkHeader/ComponentLinkHeader.js +46 -54
  20. package/ComponentLinkHeader/index.js +2 -24
  21. package/DemoContext/DemoContext.d.ts +86 -0
  22. package/DemoContext/DemoContext.js +13 -0
  23. package/DemoContext/index.d.ts +2 -0
  24. package/DemoContext/index.js +1 -0
  25. package/DocsProvider/DocsProvider.js +9 -17
  26. package/DocsProvider/index.js +1 -16
  27. package/Document/Document.d.ts +16 -0
  28. package/Document/Document.js +147 -0
  29. package/Document/getInitialProps.d.ts +18 -0
  30. package/Document/getInitialProps.js +62 -0
  31. package/Document/index.d.ts +2 -0
  32. package/Document/index.js +2 -0
  33. package/GoogleAnalytics/GoogleAnalytics.d.ts +9 -0
  34. package/GoogleAnalytics/GoogleAnalytics.js +129 -0
  35. package/GoogleAnalytics/index.d.ts +1 -0
  36. package/GoogleAnalytics/index.js +1 -0
  37. package/HighlightedCode/HighlightedCode.js +18 -26
  38. package/HighlightedCode/index.js +1 -16
  39. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +22 -31
  40. package/HighlightedCodeWithTabs/index.js +2 -24
  41. package/IconImage/IconImage.js +13 -21
  42. package/IconImage/index.js +1 -13
  43. package/InfoCard/InfoCard.js +20 -29
  44. package/InfoCard/index.js +1 -16
  45. package/Link/Link.js +17 -25
  46. package/Link/MarkdownLinks.d.ts +2 -0
  47. package/Link/MarkdownLinks.js +84 -0
  48. package/Link/SkipLink.d.ts +1 -0
  49. package/Link/SkipLink.js +66 -0
  50. package/Link/index.d.ts +3 -1
  51. package/Link/index.js +3 -16
  52. package/MarkdownElement/MarkdownElement.js +178 -186
  53. package/MarkdownElement/index.js +1 -16
  54. package/MuiPage/MuiPage.d.ts +67 -0
  55. package/MuiPage/MuiPage.js +1 -0
  56. package/MuiPage/index.d.ts +1 -0
  57. package/MuiPage/index.js +1 -0
  58. package/NextNProgressBar/NextNProgressBar.d.ts +1 -0
  59. package/NextNProgressBar/NextNProgressBar.js +44 -0
  60. package/NextNProgressBar/index.d.ts +1 -0
  61. package/NextNProgressBar/index.js +1 -0
  62. package/PageContext/PageContext.d.ts +31 -0
  63. package/PageContext/PageContext.js +6 -0
  64. package/PageContext/index.d.ts +2 -0
  65. package/PageContext/index.js +1 -0
  66. package/SectionHeadline/SectionHeadline.js +9 -17
  67. package/SectionHeadline/index.js +2 -25
  68. package/SectionTitle/SectionTitle.js +7 -13
  69. package/SectionTitle/index.js +1 -16
  70. package/StyledEngineProvider/StyledEngineProvider.d.ts +9 -0
  71. package/StyledEngineProvider/StyledEngineProvider.js +44 -0
  72. package/StyledEngineProvider/index.d.ts +1 -0
  73. package/StyledEngineProvider/index.js +1 -0
  74. package/ThemeContext/ThemeContext.js +26 -38
  75. package/ThemeContext/index.js +1 -42
  76. package/branding/BrandingCssVarsProvider.d.ts +23 -0
  77. package/branding/BrandingCssVarsProvider.js +170 -0
  78. package/branding/BrandingProvider.js +8 -15
  79. package/branding/brandingTheme.js +115 -126
  80. package/branding/index.d.ts +2 -1
  81. package/branding/index.js +3 -27
  82. package/codeStyling/codeStyling.d.ts +10 -0
  83. package/codeStyling/codeStyling.js +84 -0
  84. package/codeStyling/index.d.ts +1 -0
  85. package/codeStyling/index.js +1 -0
  86. package/codeVariant/codeVariant.d.ts +10 -0
  87. package/codeVariant/codeVariant.js +73 -0
  88. package/codeVariant/index.d.ts +1 -0
  89. package/codeVariant/index.js +1 -0
  90. package/constants/constants.d.ts +13 -0
  91. package/constants/constants.js +15 -0
  92. package/constants/index.d.ts +1 -0
  93. package/constants/index.js +1 -0
  94. package/createEmotionCache/createEmotionCache.d.ts +1 -0
  95. package/createEmotionCache/createEmotionCache.js +12 -0
  96. package/createEmotionCache/index.d.ts +1 -0
  97. package/createEmotionCache/index.js +1 -0
  98. package/findActivePage/findActivePage.d.ts +5 -0
  99. package/findActivePage/findActivePage.js +35 -0
  100. package/findActivePage/index.d.ts +1 -0
  101. package/findActivePage/index.js +1 -0
  102. package/getProductInfoFromUrl/getProductInfoFromUrl.d.ts +8 -0
  103. package/getProductInfoFromUrl/getProductInfoFromUrl.js +50 -0
  104. package/getProductInfoFromUrl/index.d.ts +2 -0
  105. package/getProductInfoFromUrl/index.js +1 -0
  106. package/globalSelector/globalSelector.d.ts +2 -0
  107. package/globalSelector/globalSelector.js +17 -0
  108. package/globalSelector/index.d.ts +1 -0
  109. package/globalSelector/index.js +1 -0
  110. package/helpers/helpers.d.ts +31 -0
  111. package/helpers/helpers.js +87 -0
  112. package/helpers/index.d.ts +2 -0
  113. package/helpers/index.js +1 -0
  114. package/i18n/i18n.js +17 -29
  115. package/i18n/index.js +1 -16
  116. package/mapApiPageTranslations/index.d.ts +1 -0
  117. package/mapApiPageTranslations/index.js +1 -0
  118. package/mapApiPageTranslations/mapApiPageTranslations.d.ts +11 -0
  119. package/mapApiPageTranslations/mapApiPageTranslations.js +46 -0
  120. package/nextFonts/index.js +8 -15
  121. package/package.json +231 -126
  122. package/svgIcons/BundleSizeIcon.js +5 -11
  123. package/svgIcons/FigmaIcon.js +8 -14
  124. package/svgIcons/FileDownload.js +5 -12
  125. package/svgIcons/JavaScript.js +5 -12
  126. package/svgIcons/MarkdownIcon.js +7 -14
  127. package/svgIcons/MaterialDesignIcon.js +6 -12
  128. package/svgIcons/SketchIcon.js +10 -16
  129. package/svgIcons/TypeScript.js +5 -12
  130. package/svgIcons/W3CIcon.js +6 -12
  131. package/translations/index.js +3 -10
  132. package/translations/translations.json +0 -1
  133. package/useLazyCSS/index.js +1 -13
  134. package/useLazyCSS/useLazyCSS.js +5 -11
  135. package/utils/index.d.ts +1 -0
  136. package/utils/index.js +2 -0
  137. package/utils/loadScript.js +1 -7
  138. package/Ad/Ad.d.mts +0 -5
  139. package/Ad/Ad.mjs +0 -226
  140. package/Ad/AdCarbon.d.mts +0 -2
  141. package/Ad/AdCarbon.mjs +0 -125
  142. package/Ad/AdDisplay.d.mts +0 -16
  143. package/Ad/AdDisplay.mjs +0 -86
  144. package/Ad/AdGuest.d.mts +0 -10
  145. package/Ad/AdGuest.mjs +0 -29
  146. package/Ad/AdInHouse.d.mts +0 -4
  147. package/Ad/AdInHouse.mjs +0 -14
  148. package/Ad/AdManager.d.mts +0 -19
  149. package/Ad/AdManager.mjs +0 -36
  150. package/Ad/AdProvider.d.mts +0 -15
  151. package/Ad/AdProvider.mjs +0 -24
  152. package/Ad/ad.styles.d.mts +0 -4512
  153. package/Ad/ad.styles.mjs +0 -91
  154. package/Ad/index.d.mts +0 -5
  155. package/Ad/index.mjs +0 -7
  156. package/CodeCopy/CodeCopy.d.mts +0 -22
  157. package/CodeCopy/CodeCopy.mjs +0 -172
  158. package/CodeCopy/CodeCopyButton.d.mts +0 -4
  159. package/CodeCopy/CodeCopyButton.mjs +0 -40
  160. package/CodeCopy/index.d.mts +0 -3
  161. package/CodeCopy/index.mjs +0 -3
  162. package/CodeCopy/useClipboardCopy.d.mts +0 -4
  163. package/CodeCopy/useClipboardCopy.mjs +0 -21
  164. package/ComponentLinkHeader/ComponentLinkHeader.d.mts +0 -8
  165. package/ComponentLinkHeader/ComponentLinkHeader.mjs +0 -197
  166. package/ComponentLinkHeader/index.d.mts +0 -2
  167. package/ComponentLinkHeader/index.mjs +0 -2
  168. package/DocsProvider/DocsProvider.d.mts +0 -24
  169. package/DocsProvider/DocsProvider.mjs +0 -31
  170. package/DocsProvider/index.d.mts +0 -1
  171. package/DocsProvider/index.mjs +0 -1
  172. package/HighlightedCode/HighlightedCode.d.mts +0 -14
  173. package/HighlightedCode/HighlightedCode.mjs +0 -67
  174. package/HighlightedCode/index.d.mts +0 -1
  175. package/HighlightedCode/index.mjs +0 -1
  176. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.mts +0 -28
  177. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.mjs +0 -362
  178. package/HighlightedCodeWithTabs/index.d.mts +0 -2
  179. package/HighlightedCodeWithTabs/index.mjs +0 -2
  180. package/IconImage/IconImage.d.mts +0 -11
  181. package/IconImage/IconImage.mjs +0 -83
  182. package/IconImage/index.d.mts +0 -1
  183. package/IconImage/index.mjs +0 -1
  184. package/InfoCard/InfoCard.d.mts +0 -22
  185. package/InfoCard/InfoCard.mjs +0 -87
  186. package/InfoCard/index.d.mts +0 -1
  187. package/InfoCard/index.mjs +0 -1
  188. package/Link/Link.d.mts +0 -25
  189. package/Link/Link.mjs +0 -75
  190. package/Link/index.d.mts +0 -1
  191. package/Link/index.mjs +0 -1
  192. package/MarkdownElement/MarkdownElement.d.mts +0 -7
  193. package/MarkdownElement/MarkdownElement.mjs +0 -847
  194. package/MarkdownElement/index.d.mts +0 -1
  195. package/MarkdownElement/index.mjs +0 -1
  196. package/NProgressBar/NProgressBar.d.mts +0 -6
  197. package/NProgressBar/NProgressBar.js +0 -98
  198. package/NProgressBar/index.d.mts +0 -2
  199. package/NProgressBar/index.d.ts +0 -2
  200. package/NProgressBar/index.js +0 -13
  201. package/NProgressBar/index.mjs +0 -1
  202. package/SectionHeadline/SectionHeadline.d.mts +0 -13
  203. package/SectionHeadline/SectionHeadline.mjs +0 -81
  204. package/SectionHeadline/index.d.mts +0 -2
  205. package/SectionHeadline/index.mjs +0 -2
  206. package/SectionTitle/SectionTitle.d.mts +0 -6
  207. package/SectionTitle/SectionTitle.mjs +0 -29
  208. package/SectionTitle/index.d.mts +0 -1
  209. package/SectionTitle/index.mjs +0 -1
  210. package/ThemeContext/ThemeContext.d.mts +0 -92
  211. package/ThemeContext/ThemeContext.mjs +0 -200
  212. package/ThemeContext/index.d.mts +0 -1
  213. package/ThemeContext/index.mjs +0 -1
  214. package/branding/BrandingProvider.d.mts +0 -9
  215. package/branding/BrandingProvider.mjs +0 -17
  216. package/branding/brandingTheme.d.mts +0 -147
  217. package/branding/brandingTheme.mjs +0 -1527
  218. package/branding/index.d.mts +0 -2
  219. package/branding/index.mjs +0 -2
  220. package/i18n/i18n.d.mts +0 -27
  221. package/i18n/i18n.mjs +0 -111
  222. package/i18n/index.d.mts +0 -1
  223. package/i18n/index.mjs +0 -1
  224. package/nextFonts/index.d.mts +0 -6
  225. package/nextFonts/index.mjs +0 -59
  226. package/svgIcons/BundleSizeIcon.d.mts +0 -4
  227. package/svgIcons/BundleSizeIcon.mjs +0 -13
  228. package/svgIcons/FigmaIcon.d.mts +0 -4
  229. package/svgIcons/FigmaIcon.mjs +0 -22
  230. package/svgIcons/FileDownload.d.mts +0 -6
  231. package/svgIcons/FileDownload.mjs +0 -13
  232. package/svgIcons/JavaScript.d.mts +0 -6
  233. package/svgIcons/JavaScript.mjs +0 -13
  234. package/svgIcons/MarkdownIcon.d.mts +0 -2
  235. package/svgIcons/MarkdownIcon.mjs +0 -22
  236. package/svgIcons/MaterialDesignIcon.d.mts +0 -4
  237. package/svgIcons/MaterialDesignIcon.mjs +0 -18
  238. package/svgIcons/SketchIcon.d.mts +0 -4
  239. package/svgIcons/SketchIcon.mjs +0 -27
  240. package/svgIcons/TypeScript.d.mts +0 -6
  241. package/svgIcons/TypeScript.mjs +0 -13
  242. package/svgIcons/W3CIcon.d.mts +0 -4
  243. package/svgIcons/W3CIcon.mjs +0 -15
  244. package/translations/index.d.mts +0 -3
  245. package/translations/index.mjs +0 -4
  246. package/useLazyCSS/index.d.mts +0 -1
  247. package/useLazyCSS/index.mjs +0 -1
  248. package/useLazyCSS/useLazyCSS.d.mts +0 -11
  249. package/useLazyCSS/useLazyCSS.mjs +0 -70
  250. package/utils/loadScript.d.mts +0 -1
  251. package/utils/loadScript.mjs +0 -7
  252. /package/{NProgressBar → NextNProgressBar}/NProgressBar.d.ts +0 -0
  253. /package/{NProgressBar/NProgressBar.mjs → NextNProgressBar/NProgressBar.js} +0 -0
@@ -1,1527 +0,0 @@
1
- import ArrowDropDownRounded from '@mui/icons-material/ArrowDropDownRounded';
2
- import { createTheme, Theme, alpha } from '@mui/material/styles';
3
- // TODO: enable this once types conflict is fixed
4
- // declare module '@mui/material/Button' {
5
- // interface ButtonPropsVariantOverrides {
6
- // code: true;
7
- // }
8
- // }
9
-
10
- const defaultTheme = createTheme();
11
- export const blue = {
12
- 50: 'hsl(210, 100%, 96%)',
13
- 100: 'hsl(210, 100%, 90%)',
14
- 200: 'hsl(210, 100%, 80%)',
15
- 300: 'hsl(210, 100%, 70%)',
16
- 400: 'hsl(210, 100%, 60%)',
17
- main: 'hsl(210, 100%, 45%)',
18
- 500: 'hsl(210, 100%, 45%)',
19
- 600: 'hsl(210, 100%, 42%)',
20
- 700: 'hsl(210, 100%, 38%)',
21
- 800: 'hsl(210, 100%, 30%)',
22
- 900: 'hsl(210, 100%, 23%)'
23
- };
24
- export const blueDark = {
25
- 50: 'hsl(210, 14%, 92%)',
26
- 100: 'hsl(210, 14%, 87%)',
27
- 200: 'hsl(210, 14%, 72%)',
28
- 300: 'hsl(210, 14%, 56%)',
29
- main: 'hsl(210, 14%, 56%)',
30
- 400: 'hsl(210, 14%, 36%)',
31
- 500: 'hsl(210, 14%, 28%)',
32
- 600: 'hsl(210, 14%, 22%)',
33
- 700: 'hsl(210, 14%, 13%)',
34
- 800: 'hsl(210, 14%, 9%)',
35
- 900: 'hsl(210, 14%, 7%)'
36
- };
37
- export const grey = {
38
- 50: 'hsl(215, 15%, 97%)',
39
- 100: 'hsl(215, 15%, 92%)',
40
- 200: 'hsl(215, 15%, 89%)',
41
- 300: 'hsl(215, 15%, 82%)',
42
- 400: 'hsl(215, 15%, 75%)',
43
- 500: 'hsl(215, 15%, 65%)',
44
- 600: 'hsl(215, 15%, 50%)',
45
- 700: 'hsl(215, 15%, 40%)',
46
- 800: 'hsl(215, 15%, 22%)',
47
- 900: 'hsl(215, 15%, 12%)'
48
- };
49
- export const error = {
50
- 50: 'hsl(355, 98%, 97%)',
51
- 100: 'hsl(355, 98%, 93%)',
52
- 200: 'hsl(355, 98%, 87%)',
53
- 300: 'hsl(355, 98%, 80%)',
54
- 400: 'hsl(355, 98%, 74%)',
55
- 500: 'hsl(355, 98%, 66%)',
56
- main: 'hsl(355, 98%, 66%)',
57
- 600: 'hsl(355, 98%, 46%)',
58
- 700: 'hsl(355, 98%, 39%)',
59
- 800: 'hsl(355, 98%, 29%)',
60
- 900: 'hsl(355, 98%, 17%)'
61
- };
62
- export const success = {
63
- 50: 'hsl(144, 72%, 95%)',
64
- 100: 'hsl(144, 72%, 87%)',
65
- 200: 'hsl(144, 72%, 77%)',
66
- 300: 'hsl(144, 72%, 66%)',
67
- 400: 'hsl(144, 72%, 56%)',
68
- 500: 'hsl(144, 72%, 46%)',
69
- 600: 'hsl(144, 72%, 41%)',
70
- 700: 'hsl(144, 72%, 37%)',
71
- 800: 'hsl(144, 72%, 32%)',
72
- 900: 'hsl(144, 72%, 21%)'
73
- };
74
- export const warning = {
75
- 50: 'hsl(48, 100%, 96%)',
76
- 100: 'hsl(48, 100%, 88%)',
77
- 200: 'hsl(48, 100%, 82%)',
78
- 300: 'hsl(48, 100%, 64%)',
79
- 400: 'hsl(48, 100%, 48%)',
80
- 500: 'hsl(48, 100%, 44%)',
81
- main: 'hsl(48, 100%, 44%)',
82
- 600: 'hsl(40, 100%, 40%)',
83
- 700: 'hsl(36, 100%, 34%)',
84
- 800: 'hsl(36, 100%, 27%)',
85
- 900: 'hsl(36, 100%, 18%)'
86
- };
87
- const systemFont = ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'];
88
- export const getMetaThemeColor = mode => {
89
- const themeColor = {
90
- light: blue[600],
91
- dark: blueDark[900]
92
- };
93
- return themeColor[mode];
94
- };
95
- export const getDesignTokens = mode => ({
96
- palette: {
97
- primary: {
98
- ...blue,
99
- ...(mode === 'dark' && {
100
- main: blue[400]
101
- })
102
- },
103
- secondary: {
104
- ...grey,
105
- ...(mode === 'light' && {
106
- main: blueDark[100],
107
- contrastText: blueDark[600]
108
- }),
109
- ...(mode === 'dark' && {
110
- main: blueDark[700],
111
- contrastText: blueDark[600]
112
- })
113
- },
114
- divider: mode === 'dark' ? alpha(blueDark[500], 0.3) : grey[100],
115
- primaryDark: blueDark,
116
- mode,
117
- ...(mode === 'dark' && {
118
- background: {
119
- default: blueDark[900],
120
- paper: alpha(blueDark[800], 0.8)
121
- }
122
- }),
123
- common: {
124
- black: 'hsl(200, 10%, 4%)'
125
- },
126
- text: {
127
- ...(mode === 'light' && {
128
- primary: grey[900],
129
- secondary: grey[800],
130
- tertiary: grey[700]
131
- }),
132
- ...(mode === 'dark' && {
133
- primary: '#fff',
134
- secondary: grey[400],
135
- tertiary: grey[500]
136
- })
137
- },
138
- grey: {
139
- ...grey,
140
- ...(mode === 'light' && {
141
- main: grey[100],
142
- contrastText: grey[600]
143
- }),
144
- ...(mode === 'dark' && {
145
- main: grey[700],
146
- contrastText: grey[600]
147
- })
148
- },
149
- error,
150
- success: {
151
- ...success,
152
- ...(mode === 'dark' && {
153
- main: success[600]
154
- }),
155
- ...(mode === 'light' && {
156
- main: success[700]
157
- })
158
- },
159
- warning,
160
- gradients: {
161
- radioSubtle: mode === 'dark' ? `radial-gradient(100% 100% at 100% 100%, transparent 0, ${alpha(blue[900], 0.3)} 300%)` : `radial-gradient(100% 90% at 50% 0, transparent 0, ${alpha(blue[100], 0.3)} 300%)`,
162
- linearSubtle: mode === 'dark' ? `linear-gradient(0deg, ${alpha(blue[900], 0.1)}, ${alpha(blueDark[900], 0.5)})` : `linear-gradient(0deg, ${alpha(blue[50], 0.4)}, ${alpha(grey[50], 0.1)})`
163
- }
164
- },
165
- shape: {
166
- borderRadius: 12
167
- },
168
- spacing: 8,
169
- typography: {
170
- fontFamily: ['"IBM Plex Sans"', ...systemFont].join(','),
171
- // Match VS Code
172
- // https://github.com/microsoft/vscode/blob/b38691f611d1ce3ef437c67a1b047c757b7b4e53/src/vs/editor/common/config/editorOptions.ts#L4578-L4580
173
- // https://github.com/microsoft/vscode/blob/d950552131d7350a45dac8b59bf179469c36c2ac/src/vs/editor/standalone/browser/standalone-tokens.css#L10
174
- fontFamilyCode: ['Menlo',
175
- // macOS
176
- 'Consolas',
177
- // Windows
178
- '"Droid Sans Mono"',
179
- // Linux
180
- 'monospace' // fallback
181
- ].join(','),
182
- fontFamilyTagline: ['"General Sans"', ...systemFont].join(','),
183
- fontFamilySystem: systemFont.join(','),
184
- fontWeightSemiBold: 600,
185
- fontWeightExtraBold: 800,
186
- h1: {
187
- fontFamily: ['"General Sans"', ...systemFont].join(','),
188
- fontSize: 'clamp(2.5rem, 1.125rem + 3.5vw, 3.5em)',
189
- fontWeight: 600,
190
- lineHeight: 78 / 70,
191
- letterSpacing: -0.2,
192
- ...(mode === 'light' && {
193
- color: blueDark[900]
194
- })
195
- },
196
- h2: {
197
- fontFamily: ['"General Sans"', ...systemFont].join(','),
198
- fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)',
199
- fontWeight: 600,
200
- lineHeight: 44 / 36,
201
- letterSpacing: -0.2,
202
- color: mode === 'dark' ? grey[100] : blueDark[700]
203
- },
204
- h3: {
205
- fontFamily: ['"General Sans"', ...systemFont].join(','),
206
- fontSize: defaultTheme.typography.pxToRem(36),
207
- lineHeight: 44 / 36,
208
- letterSpacing: 0.2
209
- },
210
- h4: {
211
- fontFamily: ['"General Sans"', ...systemFont].join(','),
212
- fontSize: defaultTheme.typography.pxToRem(30),
213
- lineHeight: 42 / 28,
214
- letterSpacing: 0.2
215
- },
216
- h5: {
217
- fontSize: defaultTheme.typography.pxToRem(24),
218
- lineHeight: 36 / 24,
219
- letterSpacing: 0.1,
220
- color: mode === 'dark' ? blue[300] : blue.main
221
- },
222
- h6: {
223
- fontSize: defaultTheme.typography.pxToRem(20),
224
- lineHeight: 30 / 20
225
- },
226
- button: {
227
- textTransform: 'initial',
228
- fontWeight: 700,
229
- letterSpacing: 0
230
- },
231
- subtitle1: {
232
- fontSize: defaultTheme.typography.pxToRem(18),
233
- lineHeight: 24 / 18,
234
- letterSpacing: 0,
235
- fontWeight: 500
236
- },
237
- body1: {
238
- fontSize: defaultTheme.typography.pxToRem(16),
239
- lineHeight: 24 / 16,
240
- letterSpacing: 0
241
- },
242
- body2: {
243
- fontSize: defaultTheme.typography.pxToRem(14),
244
- lineHeight: 21 / 14,
245
- letterSpacing: 0
246
- },
247
- caption: {
248
- display: 'inline-block',
249
- fontSize: defaultTheme.typography.pxToRem(12),
250
- lineHeight: 18 / 12,
251
- letterSpacing: 0,
252
- fontWeight: 700
253
- },
254
- allVariants: {
255
- scrollMarginTop: 'calc(var(--MuiDocs-header-height) + 32px)'
256
- }
257
- },
258
- /**
259
- * This utility exists to help transitioning to CSS variables page by page (prevent dark mode flicker).
260
- * 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.
261
- *
262
- * 😓 Without this utility:
263
- * {
264
- * ...theme.vars ? {
265
- * color: theme.vars.palette.primary.main,
266
- * [theme.getColorScheme('dark')]: {
267
- * color: '#fff',
268
- * }
269
- * } : {
270
- * color: theme.palette.mode === 'dark' ? '#fff' : theme.palette.primary.main,
271
- * }
272
- * }
273
- *
274
- * 🤩 Using the utility:
275
- * {
276
- * color: (theme.vars || theme).palette.primary.main,
277
- * ...theme.applyDarkStyles({
278
- * color: '#fff',
279
- * }),
280
- * }
281
- *
282
- * -------------------------------------------------------------------------------------------------
283
- * 💡 This util should be used in an array if the styles contain pseudo classes or nested selectors:
284
- *
285
- * ❌ There is a chance that the upper selectors could be overridden
286
- * {
287
- * // the whole selector could be overridden
288
- * '&::before': {
289
- * color: ...
290
- * },
291
- * ...theme.applyDarkStyles({
292
- * '&::before': {
293
- * color: ...
294
- * }
295
- * })
296
- * }
297
- *
298
- * ✅ use an array (supports in both emotion and styled-components)
299
- * Only the `color` will be overridden in dark mode.
300
- * [
301
- * '&::before': {
302
- * color: ...
303
- * },
304
- * theme.applyDarkStyles({
305
- * '&::before': {
306
- * color: ...
307
- * }
308
- * })
309
- * ]
310
- */
311
- applyDarkStyles(css) {
312
- return this.applyStyles('dark', css);
313
- }
314
- });
315
- export function getThemedComponents() {
316
- return {
317
- components: {
318
- MuiAlert: {
319
- styleOverrides: {
320
- root: {
321
- padding: '16px',
322
- gap: '12px',
323
- fontSize: '1rem',
324
- '& * ul': {
325
- paddingLeft: '24px !important',
326
- marginBottom: '0 !important'
327
- },
328
- // !important is used here to override the anchor tag color coming from MarkdownElement
329
- '& .MuiAlert-icon': {
330
- margin: 0,
331
- marginTop: '2px',
332
- padding: 0
333
- },
334
- '& .MuiAlert-message': {
335
- padding: 0
336
- }
337
- },
338
- icon: {
339
- paddingTop: 10,
340
- paddingBottom: 0
341
- },
342
- standardWarning: ({
343
- theme
344
- }) => [
345
- // same styles from the MarkdownElement callout
346
- {
347
- backgroundColor: alpha(theme.palette.warning[50], 0.5),
348
- color: (theme.vars || theme).palette.grey[900],
349
- border: '1px solid',
350
- borderColor: alpha(theme.palette.warning[700], 0.15),
351
- '& .MuiAlert-icon': {
352
- color: (theme.vars || theme).palette.warning[600]
353
- },
354
- '& * a': {
355
- // !important is used here to override the anchor tag color coming from MarkdownElement
356
- color: `${(theme.vars || theme).palette.warning[900]} !important`,
357
- textDecorationColor: `${alpha(theme.palette.warning.main, 0.4)} !important`,
358
- '&:hover': {
359
- textDecorationColor: `${(theme.vars || theme).palette.warning[900]} !important`
360
- }
361
- }
362
- }, theme.applyDarkStyles({
363
- backgroundColor: alpha(theme.palette.warning[700], 0.12),
364
- color: (theme.vars || theme).palette.warning[50],
365
- '& .MuiAlert-icon': {
366
- color: (theme.vars || theme).palette.warning[400]
367
- },
368
- '& * a': {
369
- color: `${(theme.vars || theme).palette.warning[100]} !important`,
370
- textDecorationColor: `${alpha(theme.palette.warning[600], 0.4)} !important`,
371
- '&:hover': {
372
- textDecorationColor: `${(theme.vars || theme).palette.warning[600]} !important`
373
- }
374
- }
375
- })],
376
- standardSuccess: ({
377
- theme
378
- }) => [
379
- // same styles from the MarkdownElement callout
380
- {
381
- backgroundColor: alpha(theme.palette.success[50], 0.5),
382
- color: (theme.vars || theme).palette.success[900],
383
- border: `1px solid ${(theme.vars || theme).palette.success[100]}`,
384
- '& .MuiAlert-icon': {
385
- color: (theme.vars || theme).palette.success[600]
386
- },
387
- '& * a': {
388
- // !important is used here to override the anchor tag color coming from MarkdownElement
389
- color: `${(theme.vars || theme).palette.success[900]} !important`,
390
- textDecorationColor: `${alpha(theme.palette.success.main, 0.4)} !important`,
391
- '&:hover': {
392
- textDecorationColor: `${(theme.vars || theme).palette.success[900]} !important`
393
- }
394
- }
395
- }, theme.applyDarkStyles({
396
- backgroundColor: alpha(theme.palette.success[700], 0.12),
397
- color: (theme.vars || theme).palette.success[50],
398
- borderColor: alpha(theme.palette.success[400], 0.1),
399
- '& .MuiAlert-icon': {
400
- color: (theme.vars || theme).palette.success[500]
401
- },
402
- '& * a': {
403
- color: `${(theme.vars || theme).palette.success[100]} !important`,
404
- textDecorationColor: `${alpha(theme.palette.success[600], 0.4)} !important`,
405
- '&:hover': {
406
- textDecorationColor: `${(theme.vars || theme).palette.success[600]} !important`
407
- }
408
- }
409
- })]
410
- }
411
- },
412
- MuiButtonBase: {
413
- defaultProps: {
414
- disableTouchRipple: true,
415
- disableRipple: true
416
- },
417
- styleOverrides: {
418
- root: ({
419
- theme
420
- }) => ({
421
- transition: 'all 100ms ease-in',
422
- '&:focus-visible': {
423
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
424
- outlineOffset: 2
425
- }
426
- })
427
- }
428
- },
429
- MuiButton: {
430
- defaultProps: {
431
- disableElevation: true
432
- },
433
- styleOverrides: {
434
- root: ({
435
- theme,
436
- ownerState
437
- }) => ({
438
- transition: 'all 120ms ease-in',
439
- ...(ownerState.size === 'large' && {
440
- ...theme.typography.body1,
441
- lineHeight: 1.5,
442
- fontWeight: theme.typography.fontWeightMedium,
443
- padding: theme.spacing('8px', '12px', '8px', '14px'),
444
- borderRadius: 10,
445
- '& > span': {
446
- transition: '0.2s',
447
- marginLeft: 4
448
- },
449
- '&:hover > span': {
450
- transform: 'translateX(2px)'
451
- }
452
- }),
453
- ...(ownerState.size === 'medium' && {
454
- fontSize: defaultTheme.typography.pxToRem(15),
455
- fontWeight: theme.typography.fontWeightMedium,
456
- lineHeight: 1.25,
457
- padding: theme.spacing('8px', '10px', '10px', '12px'),
458
- borderRadius: 10,
459
- '& > span': {
460
- transition: '0.2s',
461
- marginLeft: 4
462
- },
463
- '&:hover > span': {
464
- transform: 'translateX(2px)'
465
- }
466
- }),
467
- ...(ownerState.size === 'small' && {
468
- padding: '6px 10px',
469
- fontFamily: theme.typography.fontFamily,
470
- fontSize: defaultTheme.typography.pxToRem(13),
471
- fontWeight: theme.typography.fontWeightMedium,
472
- borderRadius: 10,
473
- '& .MuiButton-startIcon': {
474
- transition: '0.15s',
475
- marginRight: 4,
476
- marginLeft: -1
477
- },
478
- '& .MuiButton-endIcon': {
479
- transition: '0.15s',
480
- marginLeft: 4
481
- },
482
- '&:hover': {
483
- '& .MuiButton-startIcon': {
484
- transform: 'translateX(-2px)'
485
- },
486
- '& .MuiButton-endIcon': {
487
- transform: 'translateX(2px)'
488
- }
489
- }
490
- }),
491
- ...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
492
- color: (theme.vars || theme).palette.text.primary,
493
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
494
- borderColor: (theme.vars || theme).palette.primaryDark[100],
495
- boxShadow: `#FFF 0 1px 0 1px inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
496
- '&:hover': {
497
- backgroundColor: (theme.vars || theme).palette.grey[50]
498
- },
499
- '&:active': {
500
- backgroundColor: (theme.vars || theme).palette.grey[100]
501
- },
502
- ...theme.applyDarkStyles({
503
- color: (theme.vars || theme).palette.primaryDark[100],
504
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
505
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
506
- boxShadow: `${alpha(theme.palette.primaryDark[700], 0.3)} 0 1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
507
- '&:hover': {
508
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
509
- borderColor: (theme.vars || theme).palette.primaryDark[600]
510
- },
511
- '&:active': {
512
- backgroundColor: (theme.vars || theme).palette.primaryDark[800]
513
- },
514
- '&.Mui-disabled:not(.MuiButton-loading)': {
515
- color: theme.palette.grey[500]
516
- }
517
- })
518
- }),
519
- ...(ownerState.variant === 'outlined' && ownerState.color === 'primary' && {
520
- color: (theme.vars || theme).palette.primary[600],
521
- backgroundColor: alpha(theme.palette.primary[50], 0.2),
522
- borderColor: (theme.vars || theme).palette.primary[100],
523
- boxShadow: `${alpha(theme.palette.primary[100], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.primary[100], 0.5)} 0 1px 2px 0`,
524
- '&:hover': {
525
- backgroundColor: (theme.vars || theme).palette.primary[50],
526
- borderColor: (theme.vars || theme).palette.primary[200]
527
- },
528
- '&:active': {
529
- backgroundColor: alpha(theme.palette.primary[100], 0.7)
530
- },
531
- ...theme.applyDarkStyles({
532
- color: (theme.vars || theme).palette.primary[200],
533
- borderColor: alpha(theme.palette.primary[900], 0.7),
534
- backgroundColor: alpha(theme.palette.primary[900], 0.2),
535
- boxShadow: `${alpha(theme.palette.primary[900], 0.2)} 0 1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 1px inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
536
- '&:hover': {
537
- backgroundColor: alpha(theme.palette.primary[900], 0.5),
538
- borderColor: (theme.vars || theme).palette.primary[900]
539
- },
540
- '&:active': {
541
- backgroundColor: alpha(theme.palette.primary[900], 0.3)
542
- },
543
- '&.Mui-disabled:not(.MuiButton-loading)': {
544
- background: 'none',
545
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
546
- color: theme.palette.grey[500]
547
- }
548
- })
549
- }),
550
- ...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
551
- color: '#fff',
552
- textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
553
- backgroundColor: (theme.vars || theme).palette.primary[500],
554
- backgroundImage: 'transparent',
555
- border: '1px solid ',
556
- borderColor: (theme.vars || theme).palette.primary[600],
557
- boxShadow: `${alpha(theme.palette.primary[400], 0.5)} 0 1px 0 inset, ${alpha(theme.palette.primary[800], 0.4)} 0 -1px 0 1px inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
558
- '&:hover': {
559
- backgroundColor: (theme.vars || theme).palette.primary[700],
560
- borderColor: (theme.vars || theme).palette.primary[800]
561
- },
562
- '&:active': {
563
- backgroundColor: (theme.vars || theme).palette.primary[800],
564
- borderColor: (theme.vars || theme).palette.primary[600],
565
- boxShadow: `${alpha(theme.palette.primary[900], 0.7)} 0 1px 0 1px inset`
566
- },
567
- '&.Mui-disabled': {
568
- color: theme.palette.grey[700],
569
- textShadow: 'none',
570
- borderColor: theme.palette.grey[400]
571
- },
572
- ...theme.applyDarkStyles({
573
- '&.Mui-disabled:not(.MuiButton-loading)': {
574
- color: theme.palette.grey[400],
575
- textShadow: 'none',
576
- borderColor: theme.palette.grey[800]
577
- }
578
- })
579
- }),
580
- ...(ownerState.variant === 'contained' && ownerState.color === 'secondary' && {
581
- color: '#fff',
582
- textShadow: `0 1px 1px ${alpha(theme.palette.common.black, 0.6)}`,
583
- backgroundColor: (theme.vars || theme).palette.primaryDark[500],
584
- backgroundImage: 'transparent',
585
- border: '1px solid ',
586
- borderColor: (theme.vars || theme).palette.primaryDark[600],
587
- boxShadow: `${alpha(theme.palette.primaryDark[400], 0.5)} 0 1px 0 1px inset, ${alpha(theme.palette.primaryDark[800], 0.7)} 0 -1px 0 1px inset, ${alpha(theme.palette.common.black, 0.1)} 0 2px 4px 0`,
588
- '&:hover': {
589
- backgroundColor: (theme.vars || theme).palette.primaryDark[600],
590
- borderColor: (theme.vars || theme).palette.primaryDark[700]
591
- },
592
- '&:active': {
593
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
594
- borderColor: (theme.vars || theme).palette.primaryDark[600],
595
- boxShadow: `${alpha(theme.palette.primaryDark[900], 0.7)} 0 1px 0 1px inset`
596
- },
597
- '&.Mui-disabled': {
598
- color: theme.palette.grey[700],
599
- textShadow: 'none',
600
- borderColor: theme.palette.grey[400]
601
- },
602
- ...theme.applyDarkStyles({
603
- '&.Mui-disabled:not(.MuiButton-loading)': {
604
- color: theme.palette.grey[400],
605
- textShadow: 'none',
606
- borderColor: theme.palette.grey[800]
607
- }
608
- })
609
- }),
610
- ...(ownerState.variant === 'text' && ownerState.color === 'secondary' && {
611
- color: (theme.vars || theme).palette.text.secondary,
612
- '&:hover': {
613
- backgroundColor: (theme.vars || theme).palette.grey[50]
614
- },
615
- '&:active': {
616
- backgroundColor: (theme.vars || theme).palette.grey[200]
617
- },
618
- ...theme.applyDarkStyles({
619
- '&:hover': {
620
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
621
- },
622
- '&:active': {
623
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
624
- },
625
- '&.Mui-disabled': {
626
- color: theme.palette.grey[500]
627
- }
628
- })
629
- }),
630
- ...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
631
- color: (theme.vars || theme).palette.primary[600],
632
- '&:hover': {
633
- backgroundColor: alpha(theme.palette.primary[100], 0.3)
634
- },
635
- '&:active': {
636
- backgroundColor: alpha(theme.palette.primary[100], 0.5)
637
- },
638
- ...theme.applyDarkStyles({
639
- color: (theme.vars || theme).palette.primary[300],
640
- '&:hover': {
641
- backgroundColor: alpha(theme.palette.primary[900], 0.3)
642
- },
643
- '&:active': {
644
- backgroundColor: alpha(theme.palette.primary[900], 0.1)
645
- },
646
- '&.Mui-disabled:not(.MuiButton-loading)': {
647
- color: theme.palette.grey[500]
648
- }
649
- })
650
- })
651
- })
652
- },
653
- variants: [{
654
- // @ts-ignore internal repo module augmentation issue
655
- props: {
656
- variant: 'code'
657
- },
658
- style: ({
659
- theme
660
- }) => [{
661
- cursor: 'copy',
662
- padding: 0,
663
- width: 'max-content',
664
- backgroundColor: 'transparent',
665
- color: (theme.vars || theme).palette.grey[600],
666
- fontFamily: theme.typography.fontFamilyCode,
667
- fontWeight: 400,
668
- fontSize: defaultTheme.typography.pxToRem(12),
669
- lineHeight: 21 / 14,
670
- letterSpacing: 0,
671
- WebkitFontSmoothing: 'subpixel-antialiased',
672
- '& .MuiButton-startIcon': {
673
- color: (theme.vars || theme).palette.grey[400]
674
- },
675
- '& .MuiButton-endIcon': {
676
- display: 'inline-block',
677
- position: 'absolute',
678
- color: (theme.vars || theme).palette.primary.main,
679
- right: -22,
680
- top: -1,
681
- opacity: 0,
682
- transitionProperty: 'opacity',
683
- transitionDuration: '100ms',
684
- transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)'
685
- },
686
- '&:hover, &.Mui-focusVisible': {
687
- backgroundColor: 'transparent',
688
- color: (theme.vars || theme).palette.primary.main,
689
- '& .MuiButton-endIcon': {
690
- color: (theme.vars || theme).palette.primary.main,
691
- opacity: 1
692
- }
693
- }
694
- }, theme.applyDarkStyles({
695
- '& .MuiButton-endIcon': {
696
- color: (theme.vars || theme).palette.primary[300]
697
- },
698
- '&:hover, &.Mui-focusVisible': {
699
- color: (theme.vars || theme).palette.primary[300],
700
- '& .MuiButton-endIcon': {
701
- opacity: 1
702
- }
703
- }
704
- })]
705
- }, {
706
- // @ts-ignore internal repo module augmentation issue
707
- props: {
708
- variant: 'codeOutlined'
709
- },
710
- style: ({
711
- theme
712
- }) => [{
713
- display: 'inline-block',
714
- justifyContent: 'start',
715
- overflowX: 'hidden',
716
- whiteSpace: 'nowrap',
717
- textOverflow: 'ellipsis',
718
- position: 'relative',
719
- border: '1px solid',
720
- color: (theme.vars || theme).palette.grey[900],
721
- backgroundColor: alpha(theme.palette.primary[50], 0.3),
722
- borderColor: (theme.vars || theme).palette.grey[200],
723
- boxShadow: `0px 2px 2px ${alpha(theme.palette.primary[100], 0.2)}, inset 0px 4px 4px ${alpha(theme.palette.primary[100], 0.2)}`,
724
- fontFamily: theme.typography.fontFamilyCode,
725
- fontWeight: 400,
726
- fontSize: defaultTheme.typography.pxToRem(12),
727
- lineHeight: 21 / 14,
728
- letterSpacing: 0,
729
- WebkitFontSmoothing: 'subpixel-antialiased',
730
- '& .MuiButton-endIcon': {
731
- display: 'inline-block',
732
- position: 'absolute',
733
- top: 12,
734
- right: 0,
735
- marginRight: 10,
736
- color: (theme.vars || theme).palette.grey[600]
737
- },
738
- '&:hover, &.Mui-focusVisible': {
739
- borderColor: (theme.vars || theme).palette.primary.main,
740
- backgroundColor: (theme.vars || theme).palette.primary[50],
741
- color: (theme.vars || theme).palette.primary[600],
742
- '& .MuiButton-endIcon': {
743
- color: (theme.vars || theme).palette.primary.main
744
- }
745
- }
746
- }, theme.applyDarkStyles({
747
- color: (theme.vars || theme).palette.grey[500],
748
- borderColor: (theme.vars || theme).palette.primaryDark[600],
749
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
750
- boxShadow: '0px 2px 2px #0B0D0E, inset 0px 4px 4px rgba(20, 25, 31, 0.3)',
751
- '& .MuiButton-endIcon': {
752
- color: (theme.vars || theme).palette.grey[400]
753
- },
754
- '&:hover, &.Mui-focusVisible': {
755
- backgroundColor: (theme.vars || theme).palette.primary[900],
756
- color: (theme.vars || theme).palette.primary[100],
757
- '& .MuiButton-endIcon': {
758
- color: (theme.vars || theme).palette.primary[300]
759
- }
760
- }
761
- })]
762
- }, {
763
- // @ts-ignore internal repo module augmentation issue
764
- props: {
765
- variant: 'link'
766
- },
767
- style: ({
768
- theme
769
- }) => ({
770
- marginBottom: 1,
771
- fontSize: theme.typography.pxToRem(14),
772
- fontWeight: theme.typography.fontWeightBold,
773
- color: (theme.vars || theme).palette.primary[600],
774
- '&:hover': {
775
- backgroundColor: (theme.vars || theme).palette.primary[50]
776
- },
777
- ...theme.applyDarkStyles({
778
- color: (theme.vars || theme).palette.primary[300],
779
- '&:hover': {
780
- backgroundColor: alpha(theme.palette.primary[800], 0.3)
781
- }
782
- })
783
- })
784
- }]
785
- },
786
- MuiIconButton: {
787
- styleOverrides: {
788
- root: ({
789
- theme,
790
- ownerState
791
- }) => ({
792
- borderRadius: theme.shape.borderRadius,
793
- transition: 'all 100ms ease-in',
794
- '&:hover': {
795
- borderColor: (theme.vars || theme).palette.grey[300],
796
- background: (theme.vars || theme).palette.grey[50],
797
- ...theme.applyDarkStyles({
798
- borderColor: (theme.vars || theme).palette.primaryDark[600],
799
- background: alpha(theme.palette.primaryDark[700], 0.8)
800
- })
801
- },
802
- '&:active': {
803
- background: (theme.vars || theme).palette.grey[100],
804
- ...theme.applyDarkStyles({
805
- background: theme.palette.primaryDark[800]
806
- })
807
- },
808
- ...(ownerState.size === 'small' && {
809
- height: 32,
810
- width: 32,
811
- '& .MuiSvgIcon-root': {
812
- fontSize: defaultTheme.typography.pxToRem(18)
813
- }
814
- })
815
- })
816
- },
817
- variants: [{
818
- props: {
819
- color: 'primary'
820
- },
821
- style: ({
822
- theme
823
- }) => [{
824
- color: (theme.vars || theme).palette.primary.main,
825
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
826
- border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
827
- boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
828
- '&:hover': {
829
- borderColor: (theme.vars || theme).palette.grey[300],
830
- background: (theme.vars || theme).palette.grey[50],
831
- boxShadow: `${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
832
- },
833
- '&:active': {
834
- background: (theme.vars || theme).palette.grey[100]
835
- }
836
- }, theme.applyDarkStyles({
837
- color: (theme.vars || theme).palette.primary[300],
838
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
839
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
840
- boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
841
- '&:hover': {
842
- borderColor: (theme.vars || theme).palette.primaryDark[600],
843
- background: alpha(theme.palette.primaryDark[700], 0.8),
844
- boxShadow: `${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
845
- },
846
- '&:active': {
847
- background: theme.palette.primaryDark[800]
848
- }
849
- })]
850
- }, {
851
- props: {
852
- color: 'info'
853
- },
854
- style: ({
855
- theme
856
- }) => [{
857
- color: (theme.vars || theme).palette.text.secondary,
858
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
859
- border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
860
- boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
861
- '&:hover': {
862
- color: (theme.vars || theme).palette.text.primary,
863
- borderColor: (theme.vars || theme).palette.grey[300],
864
- background: (theme.vars || theme).palette.grey[50],
865
- boxShadow: `${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
866
- },
867
- '&:active': {
868
- background: (theme.vars || theme).palette.grey[100]
869
- }
870
- }, theme.applyDarkStyles({
871
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
872
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
873
- boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
874
- '&:hover': {
875
- borderColor: (theme.vars || theme).palette.primaryDark[600],
876
- background: alpha(theme.palette.primaryDark[700], 0.8),
877
- boxShadow: `${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
878
- },
879
- '&:active': {
880
- background: theme.palette.primaryDark[800]
881
- }
882
- })]
883
- }]
884
- },
885
- MuiMenu: {
886
- styleOverrides: {
887
- paper: ({
888
- theme
889
- }) => [{
890
- padding: '6px',
891
- minWidth: 160,
892
- color: (theme.vars || theme).palette.text.secondary,
893
- backgroundImage: 'none',
894
- border: '1px solid',
895
- backgroundColor: (theme.vars || theme).palette.background.paper,
896
- borderColor: (theme.vars || theme).palette.grey[200],
897
- '& .MuiMenu-list': {
898
- display: 'flex',
899
- flexDirection: 'column',
900
- gap: '2px',
901
- '& .MuiDivider-root': {
902
- margin: '4px -8px 4px -8px'
903
- }
904
- },
905
- '& .MuiMenuItem-root': {
906
- padding: '6px 8px',
907
- borderRadius: '6px',
908
- fontSize: theme.typography.pxToRem(14),
909
- fontWeight: theme.typography.fontWeightMedium,
910
- '&:hover': {
911
- backgroundColor: (theme.vars || theme).palette.grey[100],
912
- color: (theme.vars || theme).palette.text.primary
913
- },
914
- '&:focus-visible': {
915
- outline: 'none'
916
- },
917
- '&.Mui-selected': {
918
- fontWeight: 500,
919
- color: (theme.vars || theme).palette.primary[600],
920
- backgroundColor: alpha(theme.palette.primary[100], 0.6)
921
- }
922
- }
923
- }, theme.applyDarkStyles({
924
- backgroundColor: (theme.vars || theme).palette.primaryDark[900],
925
- borderColor: (theme.vars || theme).palette.primaryDark[700],
926
- '& .MuiMenuItem-root': {
927
- '&:hover': {
928
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
929
- },
930
- '&.Mui-selected': {
931
- color: (theme.vars || theme).palette.primary[200],
932
- backgroundColor: alpha(theme.palette.primary[900], 0.4)
933
- }
934
- }
935
- })]
936
- }
937
- },
938
- MuiPopover: {
939
- styleOverrides: {
940
- paper: ({
941
- theme
942
- }) => ({
943
- boxShadow: '0px 4px 20px rgba(170, 180, 190, 0.3)',
944
- ...theme.applyDarkStyles({
945
- boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.5)'
946
- })
947
- })
948
- }
949
- },
950
- MuiDivider: {
951
- styleOverrides: {
952
- root: ({
953
- theme
954
- }) => ({
955
- borderColor: (theme.vars || theme).palette.divider
956
- })
957
- }
958
- },
959
- MuiLink: {
960
- defaultProps: {
961
- underline: 'none'
962
- },
963
- styleOverrides: {
964
- root: ({
965
- theme
966
- }) => ({
967
- display: 'inline-flex',
968
- alignItems: 'center',
969
- fontWeight: theme.typography.fontWeightSemiBold,
970
- '&.MuiTypography-body1 > svg': {
971
- marginTop: 2
972
- },
973
- '& svg:last-child': {
974
- marginLeft: 2
975
- },
976
- '&:focus-visible': {
977
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
978
- outlineOffset: 2
979
- }
980
- })
981
- },
982
- variants: [{
983
- props: {
984
- color: 'primary'
985
- },
986
- style: ({
987
- theme
988
- }) => [{
989
- color: (theme.vars || theme).palette.primary[600],
990
- '&:hover': {
991
- color: (theme.vars || theme).palette.primary[700]
992
- }
993
- }, theme.applyDarkStyles({
994
- color: (theme.vars || theme).palette.primary[300],
995
- '&:hover': {
996
- color: (theme.vars || theme).palette.primary[200]
997
- }
998
- })]
999
- }]
1000
- },
1001
- MuiChip: {
1002
- styleOverrides: {
1003
- root: ({
1004
- ownerState: {
1005
- color,
1006
- variant
1007
- },
1008
- theme
1009
- }) => ({
1010
- fontWeight: theme.typography.fontWeightSemiBold,
1011
- paddingBottom: 0.2,
1012
- ...(variant === 'outlined' && color === 'default' && {
1013
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
1014
- color: (theme.vars || theme).palette.grey[900],
1015
- borderColor: (theme.vars || theme).palette.grey[200],
1016
- '&:hover': {
1017
- backgroundColor: (theme.vars || theme).palette.grey[100],
1018
- color: (theme.vars || theme).palette.grey[900]
1019
- },
1020
- ...theme.applyDarkStyles({
1021
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
1022
- color: (theme.vars || theme).palette.grey[300],
1023
- borderColor: alpha(theme.palette.primaryDark[500], 0.5),
1024
- '&:hover': {
1025
- color: (theme.vars || theme).palette.grey[300],
1026
- backgroundColor: (theme.vars || theme).palette.primaryDark[700]
1027
- }
1028
- })
1029
- }),
1030
- ...(variant === 'outlined' && color === 'info' && {
1031
- backgroundColor: alpha(theme.palette.grey[50], 0.5),
1032
- color: (theme.vars || theme).palette.grey[900],
1033
- borderColor: (theme.vars || theme).palette.grey[200],
1034
- ...theme.applyDarkStyles({
1035
- color: (theme.vars || theme).palette.grey[300],
1036
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5),
1037
- borderColor: (theme.vars || theme).palette.primaryDark[600]
1038
- })
1039
- }),
1040
- ...(variant === 'outlined' && color === 'primary' && {
1041
- borderColor: (theme.vars || theme).palette.primary[100],
1042
- backgroundColor: alpha(theme.palette.primary[100], 0.2),
1043
- ...theme.applyDarkStyles({
1044
- color: (theme.vars || theme).palette.primary[300],
1045
- borderColor: alpha(theme.palette.primary[500], 0.2),
1046
- backgroundColor: alpha(theme.palette.primary[700], 0.2)
1047
- })
1048
- }),
1049
- ...(variant === 'outlined' && color === 'success' && {
1050
- borderColor: (theme.vars || theme).palette.success[100],
1051
- backgroundColor: (theme.vars || theme).palette.success[50],
1052
- color: (theme.vars || theme).palette.success[900],
1053
- ...theme.applyDarkStyles({
1054
- color: (theme.vars || theme).palette.success[300],
1055
- borderColor: alpha(theme.palette.success[300], 0.2),
1056
- background: alpha(theme.palette.success[800], 0.2)
1057
- })
1058
- }),
1059
- ...(variant === 'filled' && {
1060
- ...(color === 'default' && {
1061
- border: '1px solid transparent',
1062
- color: (theme.vars || theme).palette.primary[700],
1063
- backgroundColor: alpha(theme.palette.primary[100], 0.5),
1064
- '&:hover': {
1065
- backgroundColor: (theme.vars || theme).palette.primary[100]
1066
- },
1067
- ...theme.applyDarkStyles({
1068
- color: '#fff',
1069
- backgroundColor: alpha(theme.palette.primaryDark[500], 0.8),
1070
- '&:hover': {
1071
- backgroundColor: (theme.vars || theme).palette.primaryDark[600]
1072
- }
1073
- })
1074
- }),
1075
- ...(color === 'primary' && {
1076
- color: (theme.vars || theme).palette.primary[600],
1077
- backgroundColor: alpha(theme.palette.primary[100], 0.4),
1078
- '&:hover': {
1079
- backgroundColor: (theme.vars || theme).palette.primary[100]
1080
- },
1081
- '& .MuiChip-deleteIcon': {
1082
- color: (theme.vars || theme).palette.primary[600],
1083
- '&:hover': {
1084
- color: (theme.vars || theme).palette.primary[700]
1085
- }
1086
- },
1087
- '&.Mui-focusVisible': {
1088
- backgroundColor: (theme.vars || theme).palette.primary[200]
1089
- },
1090
- ...theme.applyDarkStyles({
1091
- color: (theme.vars || theme).palette.primary[100],
1092
- backgroundColor: alpha(theme.palette.primary[800], 0.5),
1093
- '&:hover': {
1094
- backgroundColor: alpha(theme.palette.primary[900], 0.5)
1095
- },
1096
- '& .MuiChip-deleteIcon': {
1097
- color: (theme.vars || theme).palette.primary[100],
1098
- '&:hover': {
1099
- color: (theme.vars || theme).palette.primary[50]
1100
- }
1101
- }
1102
- })
1103
- })
1104
- }),
1105
- // for labelling product in the search
1106
- // @ts-ignore internal repo module augmentation issue
1107
- ...(variant === 'light' && {
1108
- ...(color === 'default' && {
1109
- color: (theme.vars || theme).palette.primary[700],
1110
- backgroundColor: alpha(theme.palette.primary[100], 0.3),
1111
- ...theme.applyDarkStyles({
1112
- color: (theme.vars || theme).palette.primary[200],
1113
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.5)
1114
- })
1115
- }),
1116
- ...(color === 'warning' && {
1117
- color: (theme.vars || theme).palette.warning[900],
1118
- backgroundColor: (theme.vars || theme).palette.warning[100],
1119
- ...theme.applyDarkStyles({
1120
- color: '#fff',
1121
- backgroundColor: (theme.vars || theme).palette.warning[900]
1122
- })
1123
- }),
1124
- ...(color === 'success' && {
1125
- color: (theme.vars || theme).palette.success[900],
1126
- backgroundColor: (theme.vars || theme).palette.success[100],
1127
- ...theme.applyDarkStyles({
1128
- color: '#fff',
1129
- backgroundColor: (theme.vars || theme).palette.success[900]
1130
- })
1131
- })
1132
- })
1133
- })
1134
- }
1135
- },
1136
- MuiList: {
1137
- styleOverrides: {
1138
- root: {
1139
- padding: 0
1140
- }
1141
- }
1142
- },
1143
- MuiListItemButton: {
1144
- styleOverrides: {
1145
- root: ({
1146
- theme
1147
- }) => [{
1148
- padding: '8px',
1149
- textTransform: 'none',
1150
- fontWeight: 500,
1151
- fontSize: theme.typography.pxToRem(14),
1152
- color: theme.palette.grey[700],
1153
- borderRadius: 0,
1154
- '&:hover': {
1155
- backgroundColor: theme.palette.grey[50]
1156
- },
1157
- '&.Mui-selected': {
1158
- borderRadius: 10,
1159
- border: '1px solid',
1160
- color: (theme.vars || theme).palette.primary[500],
1161
- borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1162
- backgroundColor: (theme.vars || theme).palette.primary[50],
1163
- '&:hover': {
1164
- backgroundColor: (theme.vars || theme).palette.primary[100]
1165
- }
1166
- }
1167
- }, theme.applyDarkStyles({
1168
- color: theme.palette.grey[300],
1169
- '&:hover': {
1170
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.4)
1171
- },
1172
- '&.Mui-selected': {
1173
- color: '#fff',
1174
- borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1175
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
1176
- '&:hover': {
1177
- backgroundColor: (theme.vars || theme).palette.primaryDark[600]
1178
- }
1179
- }
1180
- })]
1181
- }
1182
- },
1183
- MuiSelect: {
1184
- defaultProps: {
1185
- IconComponent: ArrowDropDownRounded
1186
- },
1187
- styleOverrides: {
1188
- iconFilled: {
1189
- top: 'calc(50% - .25em)'
1190
- },
1191
- root: ({
1192
- theme
1193
- }) => ({
1194
- variants: [{
1195
- props: {
1196
- variant: 'outlined'
1197
- },
1198
- style: {
1199
- backgroundColor: alpha(theme.palette.primaryDark[50], 0.1),
1200
- '& .MuiOutlinedInput-notchedOutline': {
1201
- border: `1px solid ${(theme.vars || theme).palette.primaryDark[100]}`,
1202
- boxShadow: `#FFF 0 1px 0 inset, ${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
1203
- },
1204
- '&:not(.Mui-focused):hover': {
1205
- background: (theme.vars || theme).palette.grey[50],
1206
- '& .MuiOutlinedInput-notchedOutline': {
1207
- borderColor: (theme.vars || theme).palette.grey[300],
1208
- boxShadow: `${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`
1209
- }
1210
- },
1211
- ...theme.applyDarkStyles({
1212
- color: (theme.vars || theme).palette.primary[300],
1213
- backgroundColor: alpha(theme.palette.primaryDark[700], 0.2),
1214
- '& .MuiOutlinedInput-notchedOutline': {
1215
- borderColor: alpha(theme.palette.primaryDark[600], 0.5),
1216
- boxShadow: `${alpha(theme.palette.primaryDark[600], 0.3)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
1217
- },
1218
- '&:not(.Mui-focused):hover': {
1219
- background: alpha(theme.palette.primaryDark[700], 0.8),
1220
- '& .MuiOutlinedInput-notchedOutline': {
1221
- borderColor: (theme.vars || theme).palette.primaryDark[600],
1222
- boxShadow: `${(theme.vars || theme).palette.common.black} 0 1px 2px 0`
1223
- }
1224
- }
1225
- })
1226
- }
1227
- }, {
1228
- props: {
1229
- size: 'small'
1230
- },
1231
- style: {
1232
- minHeight: 32,
1233
- '& [role="combobox"]': {
1234
- paddingBlock: 5
1235
- }
1236
- }
1237
- }]
1238
- })
1239
- }
1240
- },
1241
- MuiTab: {
1242
- defaultProps: {
1243
- disableTouchRipple: true
1244
- }
1245
- },
1246
- MuiPaper: {
1247
- styleOverrides: {
1248
- root: ({
1249
- theme,
1250
- ownerState
1251
- }) => [{
1252
- backgroundImage: 'none',
1253
- backgroundColor: '#fff',
1254
- '&[href]': {
1255
- textDecorationLine: 'none'
1256
- },
1257
- transition: theme.transitions.create(['border', 'box-shadow'], {
1258
- duration: theme.transitions.duration.shortest
1259
- }),
1260
- ...(ownerState.variant === 'outlined' && {
1261
- display: 'block',
1262
- borderColor: (theme.vars || theme).palette.grey[100],
1263
- '&[href]': {
1264
- textDecorationLine: 'none',
1265
- boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.3)} 0 -2px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
1266
- '&:hover': {
1267
- borderColor: (theme.vars || theme).palette.primary[200],
1268
- boxShadow: `0px 2px 8px ${(theme.vars || theme).palette.primary[100]}`
1269
- },
1270
- '&:focus-visible': {
1271
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
1272
- outlineOffset: 2
1273
- }
1274
- },
1275
- ':is(a&), :is(button&)': {
1276
- '&:hover': {
1277
- borderColor: (theme.vars || theme).palette.primary[200],
1278
- boxShadow: `0px 4px 16px ${(theme.vars || theme).palette.grey[200]}`
1279
- }
1280
- }
1281
- })
1282
- }, theme.applyDarkStyles({
1283
- backgroundColor: (theme.vars || theme).palette.primaryDark[900],
1284
- ...(ownerState.variant === 'outlined' && {
1285
- borderColor: (theme.vars || theme).palette.primaryDark[700],
1286
- backgroundColor: alpha(theme.palette.primaryDark[800], 0.6),
1287
- '&[href]': {
1288
- textDecorationLine: 'none',
1289
- boxShadow: `${alpha(theme.palette.primaryDark[700], 0.4)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
1290
- '&:hover': {
1291
- borderColor: alpha(theme.palette.primary[600], 0.5),
1292
- boxShadow: `0px 2px 8px ${alpha(theme.palette.primary[900], 0.6)}`
1293
- }
1294
- },
1295
- ':is(a&), :is(button&)': {
1296
- '&:hover': {
1297
- boxShadow: `0px 4px 24px ${(theme.vars || theme).palette.common.black}`
1298
- }
1299
- }
1300
- })
1301
- })]
1302
- }
1303
- },
1304
- MuiTableCell: {
1305
- styleOverrides: {
1306
- root: ({
1307
- theme,
1308
- ownerState
1309
- }) => ({
1310
- padding: theme.spacing(1, 2),
1311
- borderColor: (theme.vars || theme).palette.divider,
1312
- ...(ownerState.variant === 'head' && {
1313
- color: (theme.vars || theme).palette.text.primary,
1314
- fontWeight: 700
1315
- }),
1316
- ...(ownerState.variant === 'body' && {
1317
- color: (theme.vars || theme).palette.text.secondary
1318
- })
1319
- })
1320
- }
1321
- },
1322
- MuiToggleButtonGroup: {
1323
- styleOverrides: {
1324
- root: ({
1325
- theme
1326
- }) => ({
1327
- backgroundColor: '#fff',
1328
- ...theme.applyDarkStyles({
1329
- backgroundColor: (theme.vars || theme).palette.primaryDark[900]
1330
- })
1331
- })
1332
- }
1333
- },
1334
- MuiToggleButton: {
1335
- styleOverrides: {
1336
- root: ({
1337
- theme,
1338
- ownerState
1339
- }) => [{
1340
- textTransform: 'none',
1341
- fontWeight: theme.typography.fontWeightMedium,
1342
- color: (theme.vars || theme).palette.text.secondary,
1343
- borderColor: theme.palette.grey[200],
1344
- ...(ownerState.size === 'small' && {
1345
- padding: '0.375rem 0.75rem'
1346
- }),
1347
- '&.Mui-selected': {
1348
- color: (theme.vars || theme).palette.primary[700],
1349
- borderColor: `${(theme.vars || theme).palette.primary[200]} !important`,
1350
- backgroundColor: (theme.vars || theme).palette.primary[50],
1351
- '&:hover': {
1352
- backgroundColor: (theme.vars || theme).palette.primary[100]
1353
- }
1354
- }
1355
- }, theme.applyDarkStyles({
1356
- borderColor: theme.palette.primaryDark[700],
1357
- '&:hover': {
1358
- backgroundColor: alpha(theme.palette.primaryDark[600], 0.2)
1359
- },
1360
- '&.Mui-selected': {
1361
- color: (theme.vars || theme).palette.primary[200],
1362
- borderColor: `${(theme.vars || theme).palette.primary[800]} !important`,
1363
- backgroundColor: alpha(theme.palette.primary[900], 0.4),
1364
- '&:hover': {
1365
- backgroundColor: alpha(theme.palette.primary[900], 0.8),
1366
- borderColor: `${(theme.vars || theme).palette.primary[400]} !important`
1367
- }
1368
- }
1369
- })]
1370
- }
1371
- },
1372
- MuiTooltip: {
1373
- defaultProps: {
1374
- arrow: true
1375
- },
1376
- styleOverrides: {
1377
- tooltip: ({
1378
- theme
1379
- }) => ({
1380
- padding: '6px 8px',
1381
- borderRadius: 6,
1382
- backgroundColor: (theme.vars || theme).palette.grey[800],
1383
- '& .MuiTooltip-arrow': {
1384
- color: (theme.vars || theme).palette.grey[800]
1385
- }
1386
- })
1387
- }
1388
- },
1389
- MuiSwitch: {
1390
- styleOverrides: {
1391
- root: ({
1392
- theme
1393
- }) => ({
1394
- width: 32,
1395
- height: 20,
1396
- padding: 0,
1397
- borderRadius: 10,
1398
- '&:has(input:focus-visible)': {
1399
- outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
1400
- outlineOffset: 2
1401
- },
1402
- '& .MuiSwitch-switchBase': {
1403
- '&.Mui-checked': {
1404
- transform: 'translateX(12px)',
1405
- color: '#fff'
1406
- }
1407
- }
1408
- }),
1409
- switchBase: {
1410
- height: 20,
1411
- width: 20,
1412
- padding: 0,
1413
- color: '#fff',
1414
- '&.Mui-checked + .MuiSwitch-track': {
1415
- opacity: 1
1416
- }
1417
- },
1418
- track: ({
1419
- theme
1420
- }) => ({
1421
- opacity: 1,
1422
- borderRadius: 32,
1423
- backgroundColor: theme.palette.grey[400],
1424
- ...theme.applyDarkStyles({
1425
- backgroundColor: theme.palette.grey[800]
1426
- })
1427
- }),
1428
- thumb: {
1429
- flexShrink: 0,
1430
- width: '14px',
1431
- height: '14px'
1432
- }
1433
- }
1434
- },
1435
- MuiSnackbar: {
1436
- styleOverrides: {
1437
- root: ({
1438
- theme
1439
- }) => ({
1440
- '& .MuiSnackbarContent-root': {
1441
- backgroundColor: '#FFF',
1442
- color: (theme.vars || theme).palette.text.primary,
1443
- fontWeight: theme.typography.fontWeightMedium,
1444
- border: `1px solid ${(theme.vars || theme).palette.divider}`,
1445
- boxShadow: `0 4px 16px ${alpha(theme.palette.grey[400], 0.2)}`,
1446
- ...theme.applyDarkStyles({
1447
- backgroundColor: (theme.vars || theme).palette.primaryDark[800],
1448
- boxShadow: '0 4px 16px hsl(0, 100%, 1%)'
1449
- })
1450
- }
1451
- })
1452
- }
1453
- },
1454
- MuiPaginationItem: {
1455
- styleOverrides: {
1456
- root: ({
1457
- theme
1458
- }) => [{
1459
- textTransform: 'none',
1460
- fontWeight: theme.typography.fontWeightSemiBold,
1461
- color: theme.palette.grey[700],
1462
- borderColor: theme.palette.grey[200],
1463
- borderRadius: '8px',
1464
- '&.Mui-selected': {
1465
- color: (theme.vars || theme).palette.primary[500],
1466
- borderColor: `${(theme.vars || theme).palette.primary[500]} !important`,
1467
- backgroundColor: (theme.vars || theme).palette.primary[50],
1468
- '&:hover': {
1469
- backgroundColor: (theme.vars || theme).palette.primary[100]
1470
- }
1471
- }
1472
- }, theme.applyDarkStyles({
1473
- color: theme.palette.grey[200],
1474
- borderColor: theme.palette.primaryDark[700],
1475
- '&.Mui-selected': {
1476
- color: theme.palette.primary[100],
1477
- borderColor: `${(theme.vars || theme).palette.primary[700]} !important`,
1478
- backgroundColor: alpha(theme.palette.primary[900], 0.5),
1479
- '&:hover': {
1480
- backgroundColor: alpha(theme.palette.primary[900], 0.8)
1481
- }
1482
- }
1483
- })]
1484
- }
1485
- },
1486
- MuiCssBaseline: {
1487
- defaultProps: {
1488
- enableColorScheme: true
1489
- },
1490
- styleOverrides: {
1491
- html: {
1492
- overflowY: 'scroll'
1493
- // TODO add support for it,
1494
- // https://github.com/mui/material-ui/issues/40748
1495
- // scrollbarGutter: 'stable',
1496
- }
1497
- }
1498
- },
1499
- MuiCard: {
1500
- styleOverrides: {
1501
- root: ({
1502
- theme,
1503
- ownerState
1504
- }) => ({
1505
- ...(ownerState.variant === 'elevation' && {
1506
- border: '1px solid',
1507
- borderColor: (theme.vars || theme).palette.grey[100],
1508
- boxShadow: `${alpha(theme.palette.grey[200], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[300], 0.5)} 0 1px 8px 0`,
1509
- ...theme.applyDarkStyles({
1510
- borderColor: (theme.vars || theme).palette.primaryDark[700],
1511
- boxShadow: `${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 8px 0`
1512
- })
1513
- })
1514
- })
1515
- }
1516
- }
1517
- }
1518
- };
1519
- }
1520
- export const brandingDarkTheme = createTheme({
1521
- ...getDesignTokens('dark'),
1522
- ...getThemedComponents()
1523
- });
1524
- export const brandingLightTheme = createTheme({
1525
- ...getDesignTokens('light'),
1526
- ...getThemedComponents()
1527
- });