@mui/internal-core-docs 0.0.1 → 9.0.0-canary.1

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