diff --git a/.circleci/config.yml b/.circleci/config.yml
index 663b0295a5979e..430c5abac8f574 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -391,7 +391,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -421,7 +421,7 @@ jobs:
test_e2e:
<<: *default-job
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -435,7 +435,7 @@ jobs:
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
<<: *default-job
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -450,7 +450,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -477,7 +477,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -531,7 +531,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -555,7 +555,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -579,7 +579,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -603,7 +603,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -627,7 +627,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -651,7 +651,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -679,7 +679,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -780,7 +780,7 @@ jobs:
test_benchmark:
<<: *default-job
docker:
- - image: mcr.microsoft.com/playwright:v1.44.0-focal
+ - image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json
index 57e18e57f08442..0b32ace09f7d99 100644
--- a/.codesandbox/ci.json
+++ b/.codesandbox/ci.json
@@ -22,7 +22,8 @@
"packages/mui-types",
"packages/mui-utils",
"packages-internal/docs-utils",
- "packages-internal/scripts"
+ "packages-internal/scripts",
+ "packages-internal/test-utils"
],
"publishDirectory": {
"@mui/base": "packages/mui-base/build",
@@ -30,6 +31,7 @@
"@mui/core-downloads-tracker": "packages/mui-core-downloads-tracker/build",
"@mui/docs": "packages/mui-docs/build",
"@mui/icons-material": "packages/mui-icons-material/build",
+ "@mui/internal-test-utils": "packages-internal/test-utils",
"@mui/internal-babel-macros": "packages/mui-babel-macros",
"@mui/internal-docs-utils": "packages-internal/docs-utils",
"@mui/internal-markdown": "packages/markdown",
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9dd14b3936da57..fd05c6b65817e6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,7 +30,7 @@ jobs:
# fetch all tags which are required for `pnpm release:changelog`
fetch-depth: 0
- name: Set up pnpm
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
+ uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Use Node.js 18.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 8d85f7020200a0..105a4f31780e58 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
+ uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
@@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
+ uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml
index 97ccb36abb0008..64b559405761d7 100644
--- a/.github/workflows/maintenance.yml
+++ b/.github/workflows/maintenance.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- run: echo "${{ github.actor }}"
- name: check if prs are dirty
- uses: eps1lon/actions-label-merge-conflict@fd1f295ee7443d13745804bc49fe158e240f6c6e # v2.1.0
+ uses: eps1lon/actions-label-merge-conflict@6d74047dcef155976a15e4a124dde2c7fe0c5522 # v3.0.1
with:
dirtyLabel: 'PR: out-of-date'
removeOnDirtyLabel: 'PR: ready to ship'
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 4f7a0759e797d3..b74dab17bfb014 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -43,6 +43,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
- uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
+ uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
sarif_file: results.sarif
diff --git a/.mocharc.js b/.mocharc.js
index d57adb8886a831..9425179503b39a 100644
--- a/.mocharc.js
+++ b/.mocharc.js
@@ -10,7 +10,7 @@ module.exports = {
recursive: true,
timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
- require: ['@mui-internal/test-utils/setupBabel', '@mui-internal/test-utils/setupJSDOM'],
+ require: ['@mui/internal-test-utils/setupBabel', '@mui/internal-test-utils/setupJSDOM'],
'watch-ignore': [
// default
'.git',
diff --git a/.stylelintrc.js b/.stylelintrc.js
deleted file mode 100644
index 3fbebcc38f0350..00000000000000
--- a/.stylelintrc.js
+++ /dev/null
@@ -1,27 +0,0 @@
-module.exports = {
- extends: 'stylelint-config-standard',
- ignoreFiles: [
- // TypeScript declaration files contain no styles.
- // Stylelint is also reporting parseError on `docs/types/react-docgen.d.ts`.
- '**/*.d.ts',
- ],
- rules: {
- 'alpha-value-notation': null,
- 'custom-property-pattern': null,
- 'declaration-colon-newline-after': null,
- 'function-parentheses-newline-inside': null, // not compatible with prettier
- 'media-feature-range-notation': null,
- 'no-empty-source': null,
- 'no-missing-end-of-source-newline': null,
- 'selector-class-pattern': null,
- 'string-no-newline': null, // not compatible with prettier
- 'value-keyword-case': null,
- 'value-list-comma-newline-after': null, // not compatible with prettier
- },
- overrides: [
- {
- files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.jsx', '**/*.ts', '**/*.tsx'],
- customSyntax: 'postcss-styled-syntax',
- },
- ],
-};
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d8ee0daf4c2ec..6ae58e2ff9ece2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,81 @@
# [Versions](https://mui.com/versions/)
+## v6.0.0-alpha.9
+
+
+
+_May 29, 2024_
+
+A big thanks to the 23 contributors who made this release possible. Here are some highlights â¨:
+
+- đ `CssVarsProvider` and `extendTheme` are now stable (#42246) @siriwatknp
+
+### `@mui/material@6.0.0-alpha.9`
+
+- [AlertTitle] Enable extending Typography props (#42269) @lucasgmelo
+- [AvatarGroup] deprecate `componentsProps` for v6 (#42122) @lhilgert9
+- [Grid] Deprecate `wrap` prop (#42363) @fedirjh
+- [ListItem] Document `*Component` and `*Props` props deprecations (#42263) @aarongarciah
+- [ListItem] Deprecate ListItem's components and componentsProps (#42219) @aarongarciah
+- [ListItemSecondaryAction] Deprecate component (#42251) @aarongarciah
+- Stabilize `CssVarsProvider` and `extendTheme` (#42246) @siriwatknp
+- [Popper] Deprecate components and componentProps props for v6 (#42111) @ChronicusUA
+- [responsiveFontSizes] Handled undefined variants (#42412) @brijeshb42
+- [Slider] Fix wrong CSS value (#42370) @mnajdova
+- [Tooltip] Deprecate components and componentProps props for v6 (#42107) @ChronicusUA
+
+### `@mui/system@6.0.0-alpha.9`
+
+- [createStyled] Intercept `ownerState` coming from `props` and `ownerState` (#42358) @DiegoAndai
+
+### `@mui/codemod@6.0.0-alpha.9`
+
+- Add `sx` prop for v6 migration (#42153) @siriwatknp
+- Add codemod for removing system props (#42282) @siriwatknp
+
+### Docs
+
+- Remove unused images (#42324) @danilo-leal
+- Add Pigment CSS and Base UI logos SVGs (#42322) @danilo-leal
+- [joy-ui] Fix template responsiveness (#42422) @j4marcos
+- [material-ui] Add the Pashto locale (#42244) @sayoubiaf
+- [material-ui] Remove duplicate Design Kits page (#42338) @danilo-leal
+- [material-ui] Document callback to access theme in GlobalStyles (#42257) @aarongarciah
+- [material-ui] Add minor modifications to the Vertical stepper demo (#42342) @mihilt
+- [material-ui][Tabs] Improve the Basic Tabs demo (#42374) @MatheusEli
+- [pigment-css] Polish redirection mention @oliviertassinari
+
+### Core
+
+- [blog] Add fixes and clean ups to the Blog page (#42311) @danilo-leal
+- [blog] Add the "Product" tag to the Pigment CSS post (#42365) @danilo-leal
+- [code-infra] Simplify .stylelintrc.js @oliviertassinari
+- [code-infra] Fix stylelint locally (#42411) @oliviertassinari
+- [code-infra] Run corepack enable on all CI jobs (#42331) @Janpot
+- [code-infra] Create examples eslint rule (#42170) @oliviertassinari
+- [core] Apply React 19 type changes that don't require upcoming `@types/` packages (#42346) @DiegoAndai
+- [core] Remove `react-swipeable-views-utils` package from docs (#42378) @ZeeshanTamboli
+- [core] Update `@testing-library/react` and `@testing-library/dom` packages (#42349) @ZeeshanTamboli
+- [core] Remove `@types/prettier` package (#42339) @ZeeshanTamboli
+- [core] Remove `WyW-in-JS` from Renovate config (#42335) @ZeeshanTamboli
+- [docs-infra] Split feedback channels per product (#42413) @alexfauquette
+- [docs-infra] Avoid cryptic errors when tests don't exist (#42356) @Janpot
+- [docs-infra] Make menu styles consistent (#42387) @danilo-leal
+- [docs-infra] Display deprecation messages in API pages (#42352) @aarongarciah
+- [docs-infra] Standardize API pages Alert styles (#42386) @danilo-leal
+- [docs-infra] Fix Toolpad Core API links (#42362) @apedroferreira
+- [docs-infra] Tigthen up the header design (#42180) @danilo-leal
+- [docs-infra] Add Toolpad to muiNpmOrgs for codesandbox demos (#42316) @Janpot
+- [docs-infra] Allow JSDoc tags (#42337) @aarongarciah
+- [test] Remove `userAgent` override in `jsdom` env (#42344) @cherniavskii
+- [utils] Fix GitHub-reported prototype pollution vulnerability in `deepmerge` (#41652) @tjcouch-sil
+- [website] Add Nikita to the about page (#42418) @nikitaa24
+- [website] Fix hero spacing changes applying at the wrong breakpoint (#42341) @KenanYusuf
+- [website] Adds Kenan Yusuf to about page (#42317) @KenanYusuf
+- [website] Improve about page @oliviertassinari
+
+All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @apedroferreira, @brijeshb42, @cherniavskii, @ChronicusUA, @danilo-leal, @DiegoAndai, @fedirjh, @j4marcos, @Janpot, @KenanYusuf, @lhilgert9, @lucasgmelo, @MatheusEli, @mihilt, @mnajdova, @nikitaa24, @oliviertassinari, @sayoubiaf, @siriwatknp, @tjcouch-sil, @ZeeshanTamboli
+
## v6.0.0-alpha.8
diff --git a/apps/local-ui-lib/index.d.ts b/apps/local-ui-lib/index.d.ts
index a24be41b8decc5..3f926bfe3bb446 100644
--- a/apps/local-ui-lib/index.d.ts
+++ b/apps/local-ui-lib/index.d.ts
@@ -1,6 +1,8 @@
+import * as React from 'react';
+
export const bounceAnim: string;
export const Button: React.ComponentType<
- JSX.IntrinsicElements['button'] & {
+ React.JSX.IntrinsicElements['button'] & {
isRed?: boolean;
sx?: unknown;
}
diff --git a/apps/pigment-css-next-app/next.config.js b/apps/pigment-css-next-app/next.config.js
index a2187d6190e6ba..4155177fb4ca45 100644
--- a/apps/pigment-css-next-app/next.config.js
+++ b/apps/pigment-css-next-app/next.config.js
@@ -1,7 +1,7 @@
/* eslint-env node */
// eslint-ignore-next-line import/no-unresolved
const { withPigment } = require('@pigment-css/nextjs-plugin');
-const { experimental_extendTheme: extendTheme } = require('@mui/material/styles');
+const { extendTheme } = require('@mui/material/styles');
/**
* @typedef {import('@pigment-css/nextjs-plugin').PigmentOptions} PigmentOptions
diff --git a/apps/pigment-css-vite-app/package.json b/apps/pigment-css-vite-app/package.json
index baf45d4960adc0..40352b6b781617 100644
--- a/apps/pigment-css-vite-app/package.json
+++ b/apps/pigment-css-vite-app/package.json
@@ -25,12 +25,12 @@
"react-router-dom": "^6.23.1"
},
"devDependencies": {
- "@babel/preset-react": "^7.24.1",
- "@babel/preset-typescript": "^7.24.1",
+ "@babel/preset-react": "^7.24.6",
+ "@babel/preset-typescript": "^7.24.6",
"@pigment-css/vite-plugin": "^0.0.9",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.3.0",
- "@vitejs/plugin-react": "^4.2.1",
+ "@vitejs/plugin-react": "^4.3.0",
"postcss": "^8.4.38",
"postcss-combine-media-query": "^1.0.1",
"vite": "5.2.11",
diff --git a/apps/pigment-css-vite-app/src/augment.ts b/apps/pigment-css-vite-app/src/augment.ts
index 1ce2a8f663e557..b1de2899db0e28 100644
--- a/apps/pigment-css-vite-app/src/augment.ts
+++ b/apps/pigment-css-vite-app/src/augment.ts
@@ -1,9 +1,9 @@
-import type { experimental_extendTheme } from '@mui/material/styles';
+import type { extendTheme } from '@mui/material/styles';
import '@pigment-css/react/theme';
declare module '@pigment-css/react/theme' {
export interface ThemeArgs {
- theme: ReturnType & {
+ theme: ReturnType & {
applyDarkStyles(obj: T): Record;
};
}
diff --git a/apps/pigment-css-vite-app/src/extend-zero.ts b/apps/pigment-css-vite-app/src/extend-zero.ts
index 0d111cdfda4d6b..ea1689cc1f65af 100644
--- a/apps/pigment-css-vite-app/src/extend-zero.ts
+++ b/apps/pigment-css-vite-app/src/extend-zero.ts
@@ -1,8 +1,8 @@
-import type { experimental_extendTheme } from '@mui/material/styles';
+import type { extendTheme } from '@mui/material/styles';
declare module '@pigment-css/react/theme' {
interface ThemeArgs {
- theme: ReturnType & {
+ theme: ReturnType & {
applyDarkStyles(obj: T): Record;
};
}
diff --git a/apps/pigment-css-vite-app/vite.config.ts b/apps/pigment-css-vite-app/vite.config.ts
index 031cd34a6f7571..c58f13101e834f 100644
--- a/apps/pigment-css-vite-app/vite.config.ts
+++ b/apps/pigment-css-vite-app/vite.config.ts
@@ -3,7 +3,7 @@ import { defineConfig, splitVendorChunkPlugin } from 'vite';
import reactPlugin from '@vitejs/plugin-react';
import Pages from 'vite-plugin-pages';
import { pigment } from '@pigment-css/vite-plugin';
-import { experimental_extendTheme as extendTheme } from '@mui/material/styles';
+import { extendTheme } from '@mui/material/styles';
const theme = extendTheme({
getSelector: function getSelector(colorScheme, css) {
diff --git a/benchmark/package.json b/benchmark/package.json
index b3e7511166f7cb..20989d5df25726 100644
--- a/benchmark/package.json
+++ b/benchmark/package.json
@@ -24,7 +24,7 @@
"express": "^4.19.2",
"fs-extra": "^11.2.0",
"jss": "^10.10.0",
- "playwright": "^1.44.0",
+ "playwright": "^1.44.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
diff --git a/docs/data/about/teamMembers.json b/docs/data/about/teamMembers.json
index 7227d10b9825e9..db48483baf1139 100644
--- a/docs/data/about/teamMembers.json
+++ b/docs/data/about/teamMembers.json
@@ -315,5 +315,13 @@
"about": "Amateur cook, DIYer, and film photographer",
"github": "KenanYusuf",
"twitter": "KebabYusuf"
+ },
+ {
+ "name": "Nikita Ossei",
+ "title": "Customer Support",
+ "location": "London, United Kingdom",
+ "locationCountry": "uk",
+ "about": "Astrology âď¸, learning đ and designing stuff đ¨",
+ "github": "nikitaa24"
}
]
diff --git a/docs/data/base/components/modal/SpringModal.tsx b/docs/data/base/components/modal/SpringModal.tsx
index e2411c77d73684..44c2f280a8b452 100644
--- a/docs/data/base/components/modal/SpringModal.tsx
+++ b/docs/data/base/components/modal/SpringModal.tsx
@@ -37,7 +37,7 @@ export default function SpringModal() {
const Backdrop = React.forwardRef<
HTMLDivElement,
- { children: React.ReactElement; open: boolean }
+ { children: React.ReactElement; open: boolean }
>((props, ref) => {
const { open, ...other } = props;
return ;
@@ -61,7 +61,7 @@ const StyledBackdrop = styled(Backdrop)`
`;
interface FadeProps {
- children: React.ReactElement;
+ children: React.ReactElement;
in?: boolean;
onClick?: any;
onEnter?: (node: HTMLElement, isAppearing: boolean) => void;
diff --git a/docs/data/base/components/modal/UseModal.tsx b/docs/data/base/components/modal/UseModal.tsx
index 8024572f55d57b..0462704cf259e6 100644
--- a/docs/data/base/components/modal/UseModal.tsx
+++ b/docs/data/base/components/modal/UseModal.tsx
@@ -39,7 +39,7 @@ export default function UseModal() {
}
interface ModalProps {
- children: React.ReactElement;
+ children: React.ReactElement;
closeAfterTransition?: boolean;
container?: Element | (() => Element | null) | null;
disableAutoFocus?: boolean;
diff --git a/docs/data/base/components/popper/PlacementPopper.tsx b/docs/data/base/components/popper/PlacementPopper.tsx
index ce9c2b6bb352ab..d6d036e8175761 100644
--- a/docs/data/base/components/popper/PlacementPopper.tsx
+++ b/docs/data/base/components/popper/PlacementPopper.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Popper, PopperPlacementType } from '@mui/base/Popper';
-function Radio({ value, ...props }: JSX.IntrinsicElements['input']) {
+function Radio({ value, ...props }: React.JSX.IntrinsicElements['input']) {
return (
;
}) as (
props: SelectProps & React.RefAttributes,
-) => JSX.Element;
+) => React.JSX.Element;
export default function UnstyledSelectBasic() {
return (
diff --git a/docs/data/base/components/select/UnstyledSelectForm.tsx b/docs/data/base/components/select/UnstyledSelectForm.tsx
index 114d64115e0a0c..9668cb831fcbdb 100644
--- a/docs/data/base/components/select/UnstyledSelectForm.tsx
+++ b/docs/data/base/components/select/UnstyledSelectForm.tsx
@@ -47,7 +47,7 @@ const Select = React.forwardRef(function CustomSelect<
return ;
}) as (
props: SelectProps & React.RefAttributes,
-) => JSX.Element;
+) => React.JSX.Element;
const blue = {
100: '#DAECFF',
diff --git a/docs/data/base/components/slider/DiscreteSlider.tsx b/docs/data/base/components/slider/DiscreteSlider.tsx
index deb51db7f93215..87216292aca7cd 100644
--- a/docs/data/base/components/slider/DiscreteSlider.tsx
+++ b/docs/data/base/components/slider/DiscreteSlider.tsx
@@ -21,7 +21,7 @@ export default function DiscreteSlider() {
}
interface SliderValueLabelProps {
- children: React.ReactElement;
+ children: React.ReactElement;
}
function SliderValueLabel({ children }: SliderValueLabelProps) {
diff --git a/docs/data/base/components/slider/LabeledValuesSlider.tsx b/docs/data/base/components/slider/LabeledValuesSlider.tsx
index e7f0357f3869b9..143073006c60bb 100644
--- a/docs/data/base/components/slider/LabeledValuesSlider.tsx
+++ b/docs/data/base/components/slider/LabeledValuesSlider.tsx
@@ -11,7 +11,7 @@ export default function LabeledValuesSlider() {
}
interface SliderValueLabelProps {
- children: React.ReactElement;
+ children: React.ReactElement;
}
function SliderValueLabel({ children }: SliderValueLabelProps) {
diff --git a/docs/data/base/components/transitions/ReactTransitionGroup.tsx b/docs/data/base/components/transitions/ReactTransitionGroup.tsx
index 1f3ef41aaf6dfc..cc72ef63550fbc 100644
--- a/docs/data/base/components/transitions/ReactTransitionGroup.tsx
+++ b/docs/data/base/components/transitions/ReactTransitionGroup.tsx
@@ -115,7 +115,7 @@ function PopupWithTrigger(props: PopupProps) {
);
}
-function MaterialUITransitionAdapter(props: { children: React.ReactElement }) {
+function MaterialUITransitionAdapter(props: { children: React.ReactElement }) {
const { requestedEnter, onExited } = useTransitionStateManager();
const { children } = props;
diff --git a/docs/data/base/getting-started/accessibility/KeyboardNavigation.tsx b/docs/data/base/getting-started/accessibility/KeyboardNavigation.tsx
index 917e340d1ea07d..90109120fee33e 100644
--- a/docs/data/base/getting-started/accessibility/KeyboardNavigation.tsx
+++ b/docs/data/base/getting-started/accessibility/KeyboardNavigation.tsx
@@ -54,7 +54,7 @@ const Select = React.forwardRef(function Select<
return ;
}) as (
props: SelectProps & React.RefAttributes,
-) => JSX.Element;
+) => React.JSX.Element;
const SelectButton = React.forwardRef(function SelectButton<
TValue extends {},
diff --git a/docs/data/joy/components/alert/AlertVariousStates.tsx b/docs/data/joy/components/alert/AlertVariousStates.tsx
index d5809cf4f57b3c..417632d2c3641c 100644
--- a/docs/data/joy/components/alert/AlertVariousStates.tsx
+++ b/docs/data/joy/components/alert/AlertVariousStates.tsx
@@ -14,7 +14,7 @@ export default function AlertVariousStates() {
const items: {
title: string;
color: ColorPaletteProp;
- icon: React.ReactElement;
+ icon: React.ReactElement;
}[] = [
{ title: 'Success', color: 'success', icon: },
{ title: 'Warning', color: 'warning', icon: },
diff --git a/docs/data/joy/components/autocomplete/AutocompleteHint.tsx b/docs/data/joy/components/autocomplete/AutocompleteHint.tsx
index 4b8ff21f8a4d04..4d7c518c49500f 100644
--- a/docs/data/joy/components/autocomplete/AutocompleteHint.tsx
+++ b/docs/data/joy/components/autocomplete/AutocompleteHint.tsx
@@ -12,7 +12,7 @@ const StyledDiv = styled('div')({
});
type WrapperProps = {
- children: JSX.Element;
+ children: React.JSX.Element;
hint: string;
};
diff --git a/docs/data/joy/components/autocomplete/Virtualize.tsx b/docs/data/joy/components/autocomplete/Virtualize.tsx
index 3484ab6a27358b..96737ce4ed76cd 100644
--- a/docs/data/joy/components/autocomplete/Virtualize.tsx
+++ b/docs/data/joy/components/autocomplete/Virtualize.tsx
@@ -66,7 +66,7 @@ const ListboxComponent = React.forwardRef<
const { children, anchorEl, open, modifiers, ...other } = props;
const itemData: Array = [];
(
- children as [Array<{ children: Array | undefined }>]
+ children as [Array<{ children: Array> | undefined }>]
)[0].forEach((item) => {
if (item) {
itemData.push(item);
diff --git a/docs/data/joy/components/input/FloatingLabelInput.tsx b/docs/data/joy/components/input/FloatingLabelInput.tsx
index 521eb66351af7c..562227ac60e82f 100644
--- a/docs/data/joy/components/input/FloatingLabelInput.tsx
+++ b/docs/data/joy/components/input/FloatingLabelInput.tsx
@@ -56,7 +56,7 @@ const StyledLabel = styled('label')(({ theme }) => ({
const InnerInput = React.forwardRef<
HTMLInputElement,
- JSX.IntrinsicElements['input']
+ React.JSX.IntrinsicElements['input']
>(function InnerInput(props, ref) {
const id = React.useId();
return (
diff --git a/docs/data/joy/components/menu/MenuIconSideNavExample.tsx b/docs/data/joy/components/menu/MenuIconSideNavExample.tsx
index 28d26843928d4e..de451cc1bd3989 100644
--- a/docs/data/joy/components/menu/MenuIconSideNavExample.tsx
+++ b/docs/data/joy/components/menu/MenuIconSideNavExample.tsx
@@ -15,7 +15,7 @@ import MenuButton from '@mui/joy/MenuButton';
// https://popper.js.org/docs/v2/modifiers/offset/
interface MenuButtonProps extends React.HTMLAttributes {
children: React.ReactNode;
- menu: React.ReactElement;
+ menu: React.ReactElement;
open: boolean;
onOpen: (
event?:
diff --git a/docs/data/joy/components/menu/MenuToolbarExample.tsx b/docs/data/joy/components/menu/MenuToolbarExample.tsx
index d2cead8ad4fa98..764a66b010ec98 100644
--- a/docs/data/joy/components/menu/MenuToolbarExample.tsx
+++ b/docs/data/joy/components/menu/MenuToolbarExample.tsx
@@ -13,7 +13,7 @@ import { Theme } from '@mui/joy';
type MenuBarButtonProps = Pick & {
onOpen: DropdownProps['onOpenChange'];
onKeyDown: React.KeyboardEventHandler;
- menu: JSX.Element;
+ menu: React.JSX.Element;
onMouseEnter: React.MouseEventHandler;
};
diff --git a/docs/data/joy/components/textarea/FloatingLabelTextarea.tsx b/docs/data/joy/components/textarea/FloatingLabelTextarea.tsx
index 0115794252e0a7..f361e06583d233 100644
--- a/docs/data/joy/components/textarea/FloatingLabelTextarea.tsx
+++ b/docs/data/joy/components/textarea/FloatingLabelTextarea.tsx
@@ -48,7 +48,7 @@ const StyledLabel = styled('label')(({ theme }) => ({
const InnerTextarea = React.forwardRef<
HTMLTextAreaElement,
- JSX.IntrinsicElements['textarea']
+ React.JSX.IntrinsicElements['textarea']
>(function InnerTextarea(props, ref) {
const id = React.useId();
return (
diff --git a/docs/data/joy/getting-started/templates/files/components/Menu.tsx b/docs/data/joy/getting-started/templates/files/components/Menu.tsx
index 9eb339005910d4..b5edc3477a58c0 100644
--- a/docs/data/joy/getting-started/templates/files/components/Menu.tsx
+++ b/docs/data/joy/getting-started/templates/files/components/Menu.tsx
@@ -4,7 +4,7 @@ import MenuItem from '@mui/joy/MenuItem';
import { ListActionTypes } from '@mui/base/useList';
export default function Menu(props: {
- control: React.ReactElement;
+ control: React.ReactElement;
id: string;
menus: Array<{ label: string } & { [k: string]: any }>;
}) {
diff --git a/docs/data/joy/getting-started/templates/messages/components/ChatsPane.tsx b/docs/data/joy/getting-started/templates/messages/components/ChatsPane.tsx
index adf0c5f3fa3258..85fbd4b4e4bb1c 100644
--- a/docs/data/joy/getting-started/templates/messages/components/ChatsPane.tsx
+++ b/docs/data/joy/getting-started/templates/messages/components/ChatsPane.tsx
@@ -24,7 +24,7 @@ export default function ChatsPane(props: ChatsPaneProps) {
sx={{
borderRight: '1px solid',
borderColor: 'divider',
- height: 'calc(100dvh - var(--Header-height))',
+ height: { sm: 'calc(100dvh - var(--Header-height))', md: '100dvh' },
overflowY: 'auto',
}}
>
diff --git a/docs/data/joy/getting-started/templates/messages/components/Header.tsx b/docs/data/joy/getting-started/templates/messages/components/Header.tsx
index 9cae700a7495f4..5cad9f1367cb84 100644
--- a/docs/data/joy/getting-started/templates/messages/components/Header.tsx
+++ b/docs/data/joy/getting-started/templates/messages/components/Header.tsx
@@ -9,7 +9,7 @@ export default function Header() {
return (
},
+) {
const { icon, sx, ...other } = props;
return (
;
fileName: string;
fileSize: string;
progress: number;
diff --git a/docs/data/joy/integrations/material-ui/material-ui.md b/docs/data/joy/integrations/material-ui/material-ui.md
index 3ee00b0839c8d2..e0377eec85086d 100644
--- a/docs/data/joy/integrations/material-ui/material-ui.md
+++ b/docs/data/joy/integrations/material-ui/material-ui.md
@@ -29,8 +29,8 @@ Render Joy UI's `CssVarsProvider` inside Material UI's provider and use `THEME
```js
import {
- experimental_extendTheme as materialExtendTheme,
- Experimental_CssVarsProvider as MaterialCssVarsProvider,
+ extendTheme as materialExtendTheme,
+ CssVarsProvider as MaterialCssVarsProvider,
THEME_ID as MATERIAL_THEME_ID,
} from '@mui/material/styles';
import { CssVarsProvider as JoyCssVarsProvider } from '@mui/joy/styles';
diff --git a/docs/data/material/components/app-bar/BackToTop.tsx b/docs/data/material/components/app-bar/BackToTop.tsx
index 87eca489bf5c9f..c2d9673bdfa8fe 100644
--- a/docs/data/material/components/app-bar/BackToTop.tsx
+++ b/docs/data/material/components/app-bar/BackToTop.tsx
@@ -16,7 +16,7 @@ interface Props {
* You won't need it on your project.
*/
window?: () => Window;
- children?: React.ReactElement;
+ children?: React.ReactElement;
}
function ScrollTop(props: Props) {
diff --git a/docs/data/material/components/app-bar/ElevateAppBar.tsx b/docs/data/material/components/app-bar/ElevateAppBar.tsx
index 195908dcaf13fe..df548678f153fd 100644
--- a/docs/data/material/components/app-bar/ElevateAppBar.tsx
+++ b/docs/data/material/components/app-bar/ElevateAppBar.tsx
@@ -13,7 +13,7 @@ interface Props {
* You won't need it on your project.
*/
window?: () => Window;
- children?: React.ReactElement;
+ children?: React.ReactElement;
}
function ElevationScroll(props: Props) {
diff --git a/docs/data/material/components/app-bar/HideAppBar.tsx b/docs/data/material/components/app-bar/HideAppBar.tsx
index 4bc84bfc663305..925410ed692eb9 100644
--- a/docs/data/material/components/app-bar/HideAppBar.tsx
+++ b/docs/data/material/components/app-bar/HideAppBar.tsx
@@ -14,7 +14,7 @@ interface Props {
* You won't need it on your project.
*/
window?: () => Window;
- children?: React.ReactElement;
+ children?: React.ReactElement;
}
function HideOnScroll(props: Props) {
diff --git a/docs/data/material/components/autocomplete/Virtualize.tsx b/docs/data/material/components/autocomplete/Virtualize.tsx
index 9cbc173d404c7f..7d7dab92ebd8c4 100644
--- a/docs/data/material/components/autocomplete/Virtualize.tsx
+++ b/docs/data/material/components/autocomplete/Virtualize.tsx
@@ -56,9 +56,9 @@ const ListboxComponent = React.forwardRef<
React.HTMLAttributes
>(function ListboxComponent(props, ref) {
const { children, ...other } = props;
- const itemData: React.ReactElement[] = [];
- (children as React.ReactElement[]).forEach(
- (item: React.ReactElement & { children?: React.ReactElement[] }) => {
+ const itemData: React.ReactElement[] = [];
+ (children as React.ReactElement[]).forEach(
+ (item: React.ReactElement & { children?: React.ReactElement[] }) => {
itemData.push(item);
itemData.push(...(item.children || []));
},
@@ -71,7 +71,7 @@ const ListboxComponent = React.forwardRef<
const itemCount = itemData.length;
const itemSize = smUp ? 36 : 48;
- const getChildSize = (child: React.ReactElement) => {
+ const getChildSize = (child: React.ReactElement) => {
if (child.hasOwnProperty('group')) {
return 48;
}
diff --git a/docs/data/material/components/dialogs/FullScreenDialog.tsx b/docs/data/material/components/dialogs/FullScreenDialog.tsx
index 1edd984e8388f5..5b0dc07b9cd042 100644
--- a/docs/data/material/components/dialogs/FullScreenDialog.tsx
+++ b/docs/data/material/components/dialogs/FullScreenDialog.tsx
@@ -15,7 +15,7 @@ import { TransitionProps } from '@mui/material/transitions';
const Transition = React.forwardRef(function Transition(
props: TransitionProps & {
- children: React.ReactElement;
+ children: React.ReactElement;
},
ref: React.Ref,
) {
diff --git a/docs/data/material/components/grid/AutoGridNoWrap.js b/docs/data/material/components/grid/AutoGridNoWrap.js
index 9dd12f5d3373f0..15ffadca4efc7e 100644
--- a/docs/data/material/components/grid/AutoGridNoWrap.js
+++ b/docs/data/material/components/grid/AutoGridNoWrap.js
@@ -27,7 +27,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
@@ -43,7 +43,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
@@ -59,7 +59,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
diff --git a/docs/data/material/components/grid/AutoGridNoWrap.tsx b/docs/data/material/components/grid/AutoGridNoWrap.tsx
index 9dd12f5d3373f0..15ffadca4efc7e 100644
--- a/docs/data/material/components/grid/AutoGridNoWrap.tsx
+++ b/docs/data/material/components/grid/AutoGridNoWrap.tsx
@@ -27,7 +27,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
@@ -43,7 +43,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
@@ -59,7 +59,7 @@ export default function AutoGridNoWrap() {
p: 2,
}}
>
-
+
W
diff --git a/docs/data/material/components/lists/InteractiveList.tsx b/docs/data/material/components/lists/InteractiveList.tsx
index ba8ed0cfabbd5d..661995d60917d4 100644
--- a/docs/data/material/components/lists/InteractiveList.tsx
+++ b/docs/data/material/components/lists/InteractiveList.tsx
@@ -16,7 +16,7 @@ import Typography from '@mui/material/Typography';
import FolderIcon from '@mui/icons-material/Folder';
import DeleteIcon from '@mui/icons-material/Delete';
-function generate(element: React.ReactElement) {
+function generate(element: React.ReactElement) {
return [0, 1, 2].map((value) =>
React.cloneElement(element, {
key: value,
diff --git a/docs/data/material/components/modal/SpringModal.tsx b/docs/data/material/components/modal/SpringModal.tsx
index b478ef1dc38fb2..31c07aadab1754 100644
--- a/docs/data/material/components/modal/SpringModal.tsx
+++ b/docs/data/material/components/modal/SpringModal.tsx
@@ -7,7 +7,7 @@ import Typography from '@mui/material/Typography';
import { useSpring, animated } from '@react-spring/web';
interface FadeProps {
- children: React.ReactElement;
+ children: React.ReactElement;
in?: boolean;
onClick?: any;
onEnter?: (node: HTMLElement, isAppearing: boolean) => void;
diff --git a/docs/data/material/components/popper/SpringPopper.tsx b/docs/data/material/components/popper/SpringPopper.tsx
index e7e5c98dee72f2..5526317503ff16 100644
--- a/docs/data/material/components/popper/SpringPopper.tsx
+++ b/docs/data/material/components/popper/SpringPopper.tsx
@@ -4,7 +4,7 @@ import Popper from '@mui/material/Popper';
import { useSpring, animated } from '@react-spring/web';
interface FadeProps {
- children?: React.ReactElement;
+ children?: React.ReactElement;
in?: boolean;
onEnter?: () => void;
onExited?: () => void;
diff --git a/docs/data/material/components/rating/RadioGroupRating.tsx b/docs/data/material/components/rating/RadioGroupRating.tsx
index 097970dd4bcd89..f42709d21c1359 100644
--- a/docs/data/material/components/rating/RadioGroupRating.tsx
+++ b/docs/data/material/components/rating/RadioGroupRating.tsx
@@ -15,7 +15,7 @@ const StyledRating = styled(Rating)(({ theme }) => ({
const customIcons: {
[index: string]: {
- icon: React.ReactElement;
+ icon: React.ReactElement;
label: string;
};
} = {
diff --git a/docs/data/material/components/skeleton/YouTube.js b/docs/data/material/components/skeleton/YouTube.js
index ad14816a766901..29f00ad7234114 100644
--- a/docs/data/material/components/skeleton/YouTube.js
+++ b/docs/data/material/components/skeleton/YouTube.js
@@ -33,7 +33,7 @@ function Media(props) {
const { loading = false } = props;
return (
-
+
{(loading ? Array.from(new Array(3)) : data).map((item, index) => (
{item ? (
diff --git a/docs/data/material/components/skeleton/YouTube.tsx b/docs/data/material/components/skeleton/YouTube.tsx
index b0ac646c1853fd..e9dc01bacf6800 100644
--- a/docs/data/material/components/skeleton/YouTube.tsx
+++ b/docs/data/material/components/skeleton/YouTube.tsx
@@ -36,7 +36,7 @@ function Media(props: MediaProps) {
const { loading = false } = props;
return (
-
+
{(loading ? Array.from(new Array(3)) : data).map((item, index) => (
{item ? (
diff --git a/docs/data/material/components/steppers/CustomizedSteppers.tsx b/docs/data/material/components/steppers/CustomizedSteppers.tsx
index 2fa6b486f6197f..3a4c2e7ddf879c 100644
--- a/docs/data/material/components/steppers/CustomizedSteppers.tsx
+++ b/docs/data/material/components/steppers/CustomizedSteppers.tsx
@@ -122,7 +122,7 @@ const ColorlibStepIconRoot = styled('div')<{
function ColorlibStepIcon(props: StepIconProps) {
const { active, completed, className } = props;
- const icons: { [index: string]: React.ReactElement } = {
+ const icons: { [index: string]: React.ReactElement } = {
1: ,
2: ,
3: ,
diff --git a/docs/data/material/components/steppers/VerticalLinearStepper.js b/docs/data/material/components/steppers/VerticalLinearStepper.js
index f124736cc19fb5..732ac6bbf4fb65 100644
--- a/docs/data/material/components/steppers/VerticalLinearStepper.js
+++ b/docs/data/material/components/steppers/VerticalLinearStepper.js
@@ -51,7 +51,7 @@ export default function VerticalLinearStepper() {
Last step
) : null
}
@@ -61,22 +61,20 @@ export default function VerticalLinearStepper() {
{step.description}
-
-
- {index === steps.length - 1 ? 'Finish' : 'Continue'}
-
-
- Back
-
-
+
+ {index === steps.length - 1 ? 'Finish' : 'Continue'}
+
+
+ Back
+
diff --git a/docs/data/material/components/steppers/VerticalLinearStepper.tsx b/docs/data/material/components/steppers/VerticalLinearStepper.tsx
index f124736cc19fb5..732ac6bbf4fb65 100644
--- a/docs/data/material/components/steppers/VerticalLinearStepper.tsx
+++ b/docs/data/material/components/steppers/VerticalLinearStepper.tsx
@@ -51,7 +51,7 @@ export default function VerticalLinearStepper() {
Last step
) : null
}
@@ -61,22 +61,20 @@ export default function VerticalLinearStepper() {
{step.description}
-
-
- {index === steps.length - 1 ? 'Finish' : 'Continue'}
-
-
- Back
-
-
+
+ {index === steps.length - 1 ? 'Finish' : 'Continue'}
+
+
+ Back
+
diff --git a/docs/data/material/components/tabs/BasicTabs.js b/docs/data/material/components/tabs/BasicTabs.js
index f641a7f4549c39..e8ba27f0025385 100644
--- a/docs/data/material/components/tabs/BasicTabs.js
+++ b/docs/data/material/components/tabs/BasicTabs.js
@@ -2,7 +2,6 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
-import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
function CustomTabPanel(props) {
@@ -16,11 +15,7 @@ function CustomTabPanel(props) {
aria-labelledby={`simple-tab-${index}`}
{...other}
>
- {value === index && (
-
- {children}
-
- )}
+ {value === index && {children} }
);
}
diff --git a/docs/data/material/components/tabs/BasicTabs.tsx b/docs/data/material/components/tabs/BasicTabs.tsx
index c47dcb1992eeb0..947ad4d993b354 100644
--- a/docs/data/material/components/tabs/BasicTabs.tsx
+++ b/docs/data/material/components/tabs/BasicTabs.tsx
@@ -1,7 +1,6 @@
import * as React from 'react';
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
-import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
interface TabPanelProps {
@@ -21,11 +20,7 @@ function CustomTabPanel(props: TabPanelProps) {
aria-labelledby={`simple-tab-${index}`}
{...other}
>
- {value === index && (
-
- {children}
-
- )}
+ {value === index && {children} }
);
}
diff --git a/docs/data/material/experimental-api/css-theme-variables/customization.md b/docs/data/material/customization/css-theme-variables/configuration.md
similarity index 91%
rename from docs/data/material/experimental-api/css-theme-variables/customization.md
rename to docs/data/material/customization/css-theme-variables/configuration.md
index 6c8776bf98005e..5dad4c5f7f4b44 100644
--- a/docs/data/material/experimental-api/css-theme-variables/customization.md
+++ b/docs/data/material/customization/css-theme-variables/configuration.md
@@ -1,16 +1,13 @@
-# CSS theme variables - Customization
+# CSS theme variables - Configuration
-A guide for customizing CSS theme variables in Material UI.
+A guide for configuring CSS theme variables in Material UI.
## Theming
-`experimental_extendTheme` is an API that extends the default theme. It returns a theme that can only be used by the `Experimental_CssVarsProvider`.
+`extendTheme` is an API that extends the default theme. It returns a theme that can only be used by the `CssVarsProvider`.
```js
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- experimental_extendTheme as extendTheme,
-} from '@mui/material/styles';
+import { CssVarsProvider, extendTheme } from '@mui/material/styles';
const theme = extendTheme();
// ...custom theme
@@ -181,7 +178,7 @@ Or use `var()` to refer to the CSS variable directly:
```
:::warning
-If you're using a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefixes), make sure to replace the default `--mui`.
+If you're using a [custom prefix](/material-ui/customization/css-theme-variables/configuration/#changing-variable-prefixes), make sure to replace the default `--mui`.
:::
### TypeScript
@@ -289,7 +286,7 @@ function App() {
}
```
-For a server-side application, provide the same value to [`getInitColorSchemeScript()`](/material-ui/experimental-api/css-theme-variables/usage/#server-side-rendering):
+For a server-side application, provide the same value to [`getInitColorSchemeScript()`](/material-ui/customization/css-theme-variables/usage/#server-side-rendering):
```js
getInitColorSchemeScript({
diff --git a/docs/data/material/experimental-api/css-theme-variables/overview.md b/docs/data/material/customization/css-theme-variables/overview.md
similarity index 81%
rename from docs/data/material/experimental-api/css-theme-variables/overview.md
rename to docs/data/material/customization/css-theme-variables/overview.md
index c80b73e94c5dd7..b706687d6cb99e 100644
--- a/docs/data/material/experimental-api/css-theme-variables/overview.md
+++ b/docs/data/material/customization/css-theme-variables/overview.md
@@ -11,8 +11,15 @@ If this is your first time encountering CSS variables, you should check out [the
## Introduction
-CSS theme variable support is a new feature in Material UI added in [`v5.6.0`](https://github.com/mui/material-ui/releases/tag/v5.6.0) (but not enabled by default). It tells Material UI components to use the generated CSS theme variables instead of raw values. This provides significant improvements in developer experience related to theming and customization.
-With these variables, you can inject a theme into your app's stylesheet _at build time_ to apply the user's selected settings before the whole app is rendered.
+CSS theme variables replace raw values in Material UI components for a better developer experience because, in the browser dev tool, you will see which theme token is used as a value.
+
+In addition with these variables, you can inject a theme into your app's stylesheet _at build time_ to apply the user's selected settings before the whole app is rendered.
+
+:::info
+The `CssVarsProvider` is built on top of the [`ThemeProvider`](/material-ui/customization/theming/#themeprovider) with extra features like CSS variable generation, storage synchronization, unlimited color schemes, and more.
+
+If you have an existing theme, you can migrate to CSS theme variables by following the [migration guide](/material-ui/migration/migration-css-theme-variables/).
+:::
## Advantages
@@ -60,7 +67,7 @@ const darkTheme = createTheme({
**CSS theme variables**: Light and dark colors are consolidated into a theme.
```js
-import { experimental_extendTheme as extendTheme } from '@mui/material/styles';
+import { extendTheme } from '@mui/material/styles';
// `extendTheme` is a new API
const theme = extendTheme({
@@ -117,6 +124,6 @@ extendTheme({
## What's next
-- To start a new project with CSS theme variables, check out the [basic usage guide](/material-ui/experimental-api/css-theme-variables/usage/).
-- For an existing Material UI project, check out the [migration guide](/material-ui/experimental-api/css-theme-variables/migration/).
-- For theming and customization, check out the [how-to guide](/material-ui/experimental-api/css-theme-variables/customization/).
+- To start a new project with CSS theme variables, check out the [basic usage guide](/material-ui/customization/css-theme-variables/usage/).
+- For an existing Material UI project, check out the [migration guide](/material-ui/migration/migration-css-theme-variables/).
+- For theming and customization, check out the [how-to guide](/material-ui/customization/css-theme-variables/configuration/).
diff --git a/docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.js b/docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.js
similarity index 69%
rename from docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.js
rename to docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.js
index cbbdc835b12d7c..db146ef6c72468 100644
--- a/docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.js
+++ b/docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.js
@@ -1,8 +1,5 @@
import * as React from 'react';
-import {
- experimental_extendTheme as extendTheme,
- Experimental_CssVarsProvider as CssVarsProvider,
-} from '@mui/material/styles';
+import { extendTheme, CssVarsProvider } from '@mui/material/styles';
import Button from '@mui/material/Button';
const theme = extendTheme({
diff --git a/docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx b/docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.tsx
similarity index 69%
rename from docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx
rename to docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.tsx
index cbbdc835b12d7c..db146ef6c72468 100644
--- a/docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx
+++ b/docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.tsx
@@ -1,8 +1,5 @@
import * as React from 'react';
-import {
- experimental_extendTheme as extendTheme,
- Experimental_CssVarsProvider as CssVarsProvider,
-} from '@mui/material/styles';
+import { extendTheme, CssVarsProvider } from '@mui/material/styles';
import Button from '@mui/material/Button';
const theme = extendTheme({
diff --git a/docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx.preview b/docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.tsx.preview
similarity index 100%
rename from docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx.preview
rename to docs/data/material/customization/css-theme-variables/usage/CssVarsBasic.tsx.preview
diff --git a/docs/data/material/experimental-api/css-theme-variables/usage/usage.md b/docs/data/material/customization/css-theme-variables/usage/usage.md
similarity index 86%
rename from docs/data/material/experimental-api/css-theme-variables/usage/usage.md
rename to docs/data/material/customization/css-theme-variables/usage/usage.md
index 08089eb2def2a3..2b42442d16138a 100644
--- a/docs/data/material/experimental-api/css-theme-variables/usage/usage.md
+++ b/docs/data/material/customization/css-theme-variables/usage/usage.md
@@ -1,11 +1,11 @@
# CSS theme variables - Usage
-Learn how to use the experimental APIs to adopt CSS theme variables.
+Learn how to adopt CSS theme variables.
## Getting started
-The CSS variables API relies on a new experimental provider for the theme called `Experimental_CssVarsProvider` to inject styles into Material UI components.
-In addition to providing the theme in the inner React context, this new provider also generates CSS variables out of all tokens in the theme that are not functions, and makes them available in the context as well.
+The CSS variables API relies on a provider called `CssVarsProvider` to inject styles into Material UI components.
+`CssVarsProvider` generates CSS variables out of all tokens in the theme that are serializable, and makes them available in the React context along with the theme itself via [`ThemeProvider`](/material-ui/customization/theming/#theme-provider).
Once the `App` renders on the screen, you will see the CSS theme variables in the HTML `:root` stylesheet.
The variables are flattened and prefixed with `--mui` by default:
@@ -27,6 +27,8 @@ The following demo uses `--md-demo` as a prefix for the variables:
:::info
The `CssVarsProvider` is built on top of the [`ThemeProvider`](/material-ui/customization/theming/#themeprovider) with extra features like CSS variable generation, storage synchronization, unlimited color schemes, and more.
+
+If you have an existing theme, you can migrate to CSS theme variables by following the [migration guide](/material-ui/migration/migration-css-theme-variables/).
:::
## Toggle between light and dark mode
@@ -34,10 +36,7 @@ The `CssVarsProvider` is built on top of the [`ThemeProvider`](/material-ui/cust
The `useColorScheme` hook lets you read and update the user-selected mode:
```jsx
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- useColorScheme,
-} from '@mui/material/styles';
+import { CssVarsProvider, useColorScheme } from '@mui/material/styles';
// ModeSwitcher is an example interface for toggling between modes.
// Material UI does not provide the toggle interfaceâyou have to build it yourself.
@@ -111,7 +110,7 @@ The structure of this object is nearly identical to the theme structure, the onl
```
:::warning
- If you have set up a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefixes), make sure to replace the default `--mui`.
+ If you have set up a [custom prefix](/material-ui/customization/css-theme-variables/configuration/#changing-variable-prefixes), make sure to replace the default `--mui`.
:::
## Server-side rendering
diff --git a/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.js b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.js
new file mode 100644
index 00000000000000..d0a3d09300bc39
--- /dev/null
+++ b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.js
@@ -0,0 +1,15 @@
+import * as React from 'react';
+import GlobalStyles from '@mui/material/GlobalStyles';
+
+export default function GlobalCssOverrideTheme() {
+ return (
+
+ ({
+ h1: { color: theme.palette.primary.main },
+ })}
+ />
+ Grey h1 element
+
+ );
+}
diff --git a/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx
new file mode 100644
index 00000000000000..d0a3d09300bc39
--- /dev/null
+++ b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx
@@ -0,0 +1,15 @@
+import * as React from 'react';
+import GlobalStyles from '@mui/material/GlobalStyles';
+
+export default function GlobalCssOverrideTheme() {
+ return (
+
+ ({
+ h1: { color: theme.palette.primary.main },
+ })}
+ />
+ Grey h1 element
+
+ );
+}
diff --git a/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx.preview b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx.preview
new file mode 100644
index 00000000000000..591f0b2d5b4c93
--- /dev/null
+++ b/docs/data/material/customization/how-to-customize/GlobalCssOverrideTheme.tsx.preview
@@ -0,0 +1,8 @@
+
+ ({
+ h1: { color: theme.palette.primary.main },
+ })}
+ />
+ Grey h1 element
+
\ No newline at end of file
diff --git a/docs/data/material/customization/how-to-customize/how-to-customize.md b/docs/data/material/customization/how-to-customize/how-to-customize.md
index 75ca321505d2d4..9dfed7035eb408 100644
--- a/docs/data/material/customization/how-to-customize/how-to-customize.md
+++ b/docs/data/material/customization/how-to-customize/how-to-customize.md
@@ -187,6 +187,10 @@ Here is an example of how you can override styles for the `h1` elements:
{{"demo": "GlobalCssOverride.js", "iframe": true, "height": 100}}
+The `styles` prop in the `GlobalStyles` component supports a callback in case you need to access the theme.
+
+{{"demo": "GlobalCssOverrideTheme.js", "iframe": true, "height": 100}}
+
If you are already using the [CssBaseline](/material-ui/react-css-baseline/) component for setting baseline styles, you can also add these global styles as overrides for this component. Here is how you can achieve the same by using this approach.
{{"demo": "OverrideCssBaseline.js", "iframe": true, "height": 100}}
diff --git a/docs/data/material/customization/theming/theming.md b/docs/data/material/customization/theming/theming.md
index e545c049b02135..408dfe093c60a2 100644
--- a/docs/data/material/customization/theming/theming.md
+++ b/docs/data/material/customization/theming/theming.md
@@ -10,7 +10,7 @@ To promote greater consistency between apps, light and dark theme types are avai
## Theme provider
-If you wish to customize the theme, you need to use the `ThemeProvider` component in order to inject a theme into your application.
+Use `ThemeProvider` or [`CssVarsProvider`](#css-variables-provider) to inject a custom theme into your application.
However, this is optional; Material UI components come with a default theme.
`ThemeProvider` relies on the [context feature of React](https://react.dev/learn/passing-data-deeply-with-context) to pass the theme down to the components, so you need to make sure that `ThemeProvider` is a parent of the components you are trying to customize.
@@ -45,7 +45,8 @@ const theme = createTheme({
```
:::warning
-`vars` is a private field for [CSS theme variables](/material-ui/experimental-api/css-theme-variables/overview/). It will throw an error if you try to pass a value to it:
+`vars` is an autogenerated field for [CSS theme variables](/material-ui/customization/css-theme-variables/overview/).
+It will throw an error if you try to pass a value to it:
```jsx
createTheme({
@@ -114,6 +115,13 @@ You can extend the outer theme by providing a function:
{{"demo": "ThemeNestingExtend.js"}}
+## CSS variables provider
+
+The `CssVarsProvider` is built on top of the `ThemeProvider` with extra features like theme CSS variables generation, built-in color scheme synchronization with the user's system preference, and more.
+The `CssVarsProvider` is built on top of the `ThemeProvider` with extra features like theme CSS variables generation, built-in color scheme synchronization, user's system preference, and more.
+
+To start using the `CssVarsProvider`, check out the [basic usage guide](/material-ui/customization/css-theme-variables/usage/). If you are using the `ThemeProvider`, read the [migration guide](/material-ui/migration/migration-css-theme-variables/).
+
## API
### `createTheme(options, ...args) => theme`
diff --git a/docs/data/material/design-resources/material-ui-sync/material-ui-sync.md b/docs/data/material/design-resources/material-ui-sync/material-ui-sync.md
index d3c75e66df3647..77d1ac95ea7d5d 100644
--- a/docs/data/material/design-resources/material-ui-sync/material-ui-sync.md
+++ b/docs/data/material/design-resources/material-ui-sync/material-ui-sync.md
@@ -237,16 +237,13 @@ You can also check out the Storybook preview to test the Material UI version of
## Using the generated theme
:::warning
-Themes generated by Sync must be used with Material UI's [`CssVarsProvider`](/material-ui/experimental-api/css-theme-variables/migration/)âthe default [`ThemeProvider`](/material-ui/customization/theming/#theme-provider) is not supported.
+Themes generated by Sync must be used with Material UI's [`CssVarsProvider`](/material-ui/migration/migration-css-theme-variables/)âthe [`ThemeProvider`](/material-ui/customization/theming/#theme-provider) is not supported.
:::
Here's an example of how to add a Sync-generated theme to your codebase:
```tsx title="_app.tsx"
-import {
- experimental_extendTheme as extendTheme,
- Experimental_CssVarsProvider as CssVarsProvider,
-} from '@mui/material/styles';
+import { extendTheme, CssVarsProvider } from '@mui/material/styles';
export default function MyApp({ Component, pageProps }) {
const theme = extendTheme({
diff --git a/docs/data/material/discover-more/design-kits/design-kits.md b/docs/data/material/discover-more/design-kits/design-kits.md
deleted file mode 100644
index b6f0212daceecb..00000000000000
--- a/docs/data/material/discover-more/design-kits/design-kits.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Design kits
-
-Boost consistency and facilitate communication when working with developers by using Material UI components in your favorite design tool.
-
-The Material UI design kits allow you to be more efficient by designing and developing with the same library.
-
-- **For designers:** Save time getting the Material UI components all set up, leveraging the latest features from your favorite design tool.
-- **For product managers:** Quickly put together ideas and high-fidelity mockups/prototypes using components from your actual product.
-- **For developers:** Effortlessly communicate with designers using the same language around the Material UI component props and variants.
-
-Find them in your design tool of choice:
-
-
-
-
diff --git a/docs/data/material/experimental-api/css-variables/CssVariablesCustomization.js b/docs/data/material/experimental-api/css-variables/CssVariablesCustomization.js
deleted file mode 100644
index 7d492392a9c6b1..00000000000000
--- a/docs/data/material/experimental-api/css-variables/CssVariablesCustomization.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as React from 'react';
-import Button from '@mui/material/Button';
-import { colorChannel } from '@mui/system';
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- styled,
-} from '@mui/material/styles';
-
-// Custom button using custom styles with CSS variables
-const CustomButton = styled(Button)(({ theme }) => ({
- backgroundColor: theme.vars.palette.success.dark,
- color: theme.vars.palette.common.white,
- '&:hover': {
- backgroundColor: `rgba(${theme.vars.palette.success.mainChannel} / 0.95)`,
- },
-}));
-
-// Custom button using CSS variables
-const CssVarsCustomButton = styled(Button)({
- '--mui-palette-primary-main': '#FF0000',
- '--mui-palette-primary-dark': '#8B0000',
- '--mui-palette-primary-mainChannel': colorChannel('#FF0000'), // necessary for calculating the alpha values
-});
-
-const useEnhancedEffect =
- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
-
-export default function CssVariablesCustomization() {
- // the `node` is used for attaching CSS variables to this demo, you might not need it in your application.
- const [node, setNode] = React.useState(null);
- useEnhancedEffect(() => {
- setNode(document.getElementById('css-vars-customization'));
- }, []);
- return (
-
-
- Custom styles
- CSS variables
-
-
- );
-}
diff --git a/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.js b/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.js
deleted file mode 100644
index 53a109d954f207..00000000000000
--- a/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.js
+++ /dev/null
@@ -1,134 +0,0 @@
-import * as React from 'react';
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- useColorScheme,
- experimental_extendTheme,
-} from '@mui/material/styles';
-import Moon from '@mui/icons-material/DarkMode';
-import Sun from '@mui/icons-material/LightMode';
-import Button from '@mui/material/Button';
-import Box from '@mui/material/Box';
-import { teal, deepOrange, orange, cyan } from '@mui/material/colors';
-
-function ColorSchemePicker() {
- const { mode, setMode } = useColorScheme();
- const [mounted, setMounted] = React.useState(false);
- React.useEffect(() => {
- setMounted(true);
- }, []);
- if (!mounted) {
- return null;
- }
-
- return (
- {
- if (mode === 'light') {
- setMode('dark');
- } else {
- setMode('light');
- }
- }}
- >
- {mode === 'light' ? : }
-
- );
-}
-
-const theme = experimental_extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: teal,
- secondary: deepOrange,
- },
- },
- dark: {
- palette: {
- primary: cyan,
- secondary: orange,
- },
- },
- },
-});
-
-const useEnhancedEffect =
- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
-
-export default function CssVarsCustomTheme() {
- // the `node` is used for attaching CSS variables to this demo, you might not need it in your application.
- const [node, setNode] = React.useState(null);
- useEnhancedEffect(() => {
- setNode(document.getElementById('css-vars-custom-theme'));
- }, []);
- return (
-
-
-
-
-
-
-
-
- Text
- Text
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
-
-
- );
-}
diff --git a/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.tsx b/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.tsx
deleted file mode 100644
index a0c0fa12fd97e7..00000000000000
--- a/docs/data/material/experimental-api/css-variables/CssVarsCustomTheme.tsx
+++ /dev/null
@@ -1,134 +0,0 @@
-import * as React from 'react';
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- useColorScheme,
- experimental_extendTheme,
-} from '@mui/material/styles';
-import Moon from '@mui/icons-material/DarkMode';
-import Sun from '@mui/icons-material/LightMode';
-import Button from '@mui/material/Button';
-import Box from '@mui/material/Box';
-import { teal, deepOrange, orange, cyan } from '@mui/material/colors';
-
-function ColorSchemePicker() {
- const { mode, setMode } = useColorScheme();
- const [mounted, setMounted] = React.useState(false);
- React.useEffect(() => {
- setMounted(true);
- }, []);
- if (!mounted) {
- return null;
- }
-
- return (
- {
- if (mode === 'light') {
- setMode('dark');
- } else {
- setMode('light');
- }
- }}
- >
- {mode === 'light' ? : }
-
- );
-}
-
-const theme = experimental_extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: teal,
- secondary: deepOrange,
- },
- },
- dark: {
- palette: {
- primary: cyan,
- secondary: orange,
- },
- },
- },
-});
-
-const useEnhancedEffect =
- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
-
-export default function CssVarsCustomTheme() {
- // the `node` is used for attaching CSS variables to this demo, you might not need it in your application.
- const [node, setNode] = React.useState(null);
- useEnhancedEffect(() => {
- setNode(document.getElementById('css-vars-custom-theme') as null | HTMLElement);
- }, []);
- return (
-
-
-
-
-
-
-
-
- Text
- Text
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
- Text
-
-
- Text
-
- Text
-
-
-
-
-
- );
-}
diff --git a/docs/data/material/experimental-api/css-variables/CssVarsProviderBasic.tsx.preview b/docs/data/material/experimental-api/css-variables/CssVarsProviderBasic.tsx.preview
deleted file mode 100644
index 7e68c29d7f5fc5..00000000000000
--- a/docs/data/material/experimental-api/css-variables/CssVarsProviderBasic.tsx.preview
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/data/material/getting-started/templates/dashboard/Chart.js b/docs/data/material/getting-started/templates/dashboard/Chart.js
deleted file mode 100644
index fbacebefa328ea..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Chart.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as React from 'react';
-import { useTheme } from '@mui/material/styles';
-import { LineChart, axisClasses } from '@mui/x-charts';
-
-import Title from './Title';
-
-// Generate Sales Data
-function createData(time, amount) {
- return { time, amount: amount ?? null };
-}
-
-const data = [
- createData('00:00', 0),
- createData('03:00', 300),
- createData('06:00', 600),
- createData('09:00', 800),
- createData('12:00', 1500),
- createData('15:00', 2000),
- createData('18:00', 2400),
- createData('21:00', 2400),
- createData('24:00'),
-];
-
-export default function Chart() {
- const theme = useTheme();
-
- return (
-
- Today
-
-
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Chart.tsx b/docs/data/material/getting-started/templates/dashboard/Chart.tsx
deleted file mode 100644
index 0897a67f0c1cb9..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Chart.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import * as React from 'react';
-import { useTheme } from '@mui/material/styles';
-import { LineChart, axisClasses } from '@mui/x-charts';
-import { ChartsTextStyle } from '@mui/x-charts/ChartsText';
-import Title from './Title';
-
-// Generate Sales Data
-function createData(
- time: string,
- amount?: number,
-): { time: string; amount: number | null } {
- return { time, amount: amount ?? null };
-}
-
-const data = [
- createData('00:00', 0),
- createData('03:00', 300),
- createData('06:00', 600),
- createData('09:00', 800),
- createData('12:00', 1500),
- createData('15:00', 2000),
- createData('18:00', 2400),
- createData('21:00', 2400),
- createData('24:00'),
-];
-
-export default function Chart() {
- const theme = useTheme();
-
- return (
-
- Today
-
-
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Dashboard.js b/docs/data/material/getting-started/templates/dashboard/Dashboard.js
index 0c8503667b3f30..c311599af0a6dd 100644
--- a/docs/data/material/getting-started/templates/dashboard/Dashboard.js
+++ b/docs/data/material/getting-started/templates/dashboard/Dashboard.js
@@ -1,204 +1,63 @@
import * as React from 'react';
-import { styled, createTheme, ThemeProvider } from '@mui/material/styles';
+
+import { createTheme, ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
-import MuiDrawer from '@mui/material/Drawer';
import Box from '@mui/material/Box';
-import MuiAppBar from '@mui/material/AppBar';
-import Toolbar from '@mui/material/Toolbar';
-import List from '@mui/material/List';
-import Typography from '@mui/material/Typography';
-import Divider from '@mui/material/Divider';
-import IconButton from '@mui/material/IconButton';
-import Badge from '@mui/material/Badge';
import Container from '@mui/material/Container';
-import Grid from '@mui/material/Grid';
-import Paper from '@mui/material/Paper';
-import Link from '@mui/material/Link';
-import MenuIcon from '@mui/icons-material/Menu';
-import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
-import NotificationsIcon from '@mui/icons-material/Notifications';
-import { mainListItems, secondaryListItems } from './listItems';
-import Chart from './Chart';
-import Deposits from './Deposits';
-import Orders from './Orders';
-
-function Copyright(props) {
- return (
-
- {'Copyright Š '}
-
- Your Website
- {' '}
- {new Date().getFullYear()}
- {'.'}
-
- );
-}
-
-const drawerWidth = 240;
+import getDashboardTheme from './getDashboardTheme';
+import ToggleCustomTheme from './internals/components/ToggleCustomTheme';
+import Copyright from './internals/components/Copyright';
+import Navbar from './components/Navbar';
+import Header from './components/Header';
+import MainGrid from './components/MainGrid';
-const AppBar = styled(MuiAppBar, {
- shouldForwardProp: (prop) => prop !== 'open',
-})(({ theme, open }) => ({
- zIndex: theme.zIndex.drawer + 1,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- ...(open && {
- marginLeft: drawerWidth,
- width: `calc(100% - ${drawerWidth}px)`,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- }),
-}));
-
-const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open' })(
- ({ theme, open }) => ({
- '& .MuiDrawer-paper': {
- position: 'relative',
- whiteSpace: 'nowrap',
- width: drawerWidth,
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- boxSizing: 'border-box',
- ...(!open && {
- overflowX: 'hidden',
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- width: theme.spacing(7),
- [theme.breakpoints.up('sm')]: {
- width: theme.spacing(9),
- },
- }),
- },
- }),
-);
+export default function Dashboard() {
+ const [mode, setMode] = React.useState('light');
+ const [showCustomTheme, setShowCustomTheme] = React.useState(true);
+ const dashboardTheme = createTheme(getDashboardTheme(mode));
+ const defaultTheme = createTheme({ palette: { mode } });
-// TODO remove, this demo shouldn't need to reset the theme.
-const defaultTheme = createTheme();
+ const toggleColorMode = () => {
+ setMode((prev) => (prev === 'dark' ? 'light' : 'dark'));
+ };
-export default function Dashboard() {
- const [open, setOpen] = React.useState(true);
- const toggleDrawer = () => {
- setOpen(!open);
+ const toggleCustomTheme = () => {
+ setShowCustomTheme((prev) => !prev);
};
return (
-
+
+
-
-
-
-
-
-
-
- Dashboard
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {mainListItems}
-
- {secondaryListItems}
-
-
+
- theme.palette.mode === 'light'
- ? theme.palette.grey[100]
- : theme.palette.grey[900],
+ backgroundColor: 'background.default',
flexGrow: 1,
height: '100vh',
overflow: 'auto',
}}
>
-
-
-
- {/* Chart */}
-
-
-
-
-
- {/* Recent Deposits */}
-
-
-
-
-
- {/* Recent Orders */}
-
-
-
-
-
-
-
+ {/* Main content */}
+
+
+
+
+
);
diff --git a/docs/data/material/getting-started/templates/dashboard/Dashboard.tsx b/docs/data/material/getting-started/templates/dashboard/Dashboard.tsx
index 1e9e9023891160..9285b6a8e2a421 100644
--- a/docs/data/material/getting-started/templates/dashboard/Dashboard.tsx
+++ b/docs/data/material/getting-started/templates/dashboard/Dashboard.tsx
@@ -1,208 +1,63 @@
import * as React from 'react';
-import { styled, createTheme, ThemeProvider } from '@mui/material/styles';
+import { PaletteMode } from '@mui/material';
+import { createTheme, ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
-import MuiDrawer from '@mui/material/Drawer';
import Box from '@mui/material/Box';
-import MuiAppBar, { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar';
-import Toolbar from '@mui/material/Toolbar';
-import List from '@mui/material/List';
-import Typography from '@mui/material/Typography';
-import Divider from '@mui/material/Divider';
-import IconButton from '@mui/material/IconButton';
-import Badge from '@mui/material/Badge';
import Container from '@mui/material/Container';
-import Grid from '@mui/material/Grid';
-import Paper from '@mui/material/Paper';
-import Link from '@mui/material/Link';
-import MenuIcon from '@mui/icons-material/Menu';
-import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
-import NotificationsIcon from '@mui/icons-material/Notifications';
-import { mainListItems, secondaryListItems } from './listItems';
-import Chart from './Chart';
-import Deposits from './Deposits';
-import Orders from './Orders';
+import getDashboardTheme from './getDashboardTheme';
+import ToggleCustomTheme from './internals/components/ToggleCustomTheme';
+import Copyright from './internals/components/Copyright';
+import Navbar from './components/Navbar';
+import Header from './components/Header';
+import MainGrid from './components/MainGrid';
-function Copyright(props: any) {
- return (
-
- {'Copyright Š '}
-
- Your Website
- {' '}
- {new Date().getFullYear()}
- {'.'}
-
- );
-}
-
-const drawerWidth: number = 240;
-
-interface AppBarProps extends MuiAppBarProps {
- open?: boolean;
-}
-
-const AppBar = styled(MuiAppBar, {
- shouldForwardProp: (prop) => prop !== 'open',
-})(({ theme, open }) => ({
- zIndex: theme.zIndex.drawer + 1,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- ...(open && {
- marginLeft: drawerWidth,
- width: `calc(100% - ${drawerWidth}px)`,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- }),
-}));
-
-const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open' })(
- ({ theme, open }) => ({
- '& .MuiDrawer-paper': {
- position: 'relative',
- whiteSpace: 'nowrap',
- width: drawerWidth,
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- boxSizing: 'border-box',
- ...(!open && {
- overflowX: 'hidden',
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- width: theme.spacing(7),
- [theme.breakpoints.up('sm')]: {
- width: theme.spacing(9),
- },
- }),
- },
- }),
-);
+export default function Dashboard() {
+ const [mode, setMode] = React.useState('light');
+ const [showCustomTheme, setShowCustomTheme] = React.useState(true);
+ const dashboardTheme = createTheme(getDashboardTheme(mode));
+ const defaultTheme = createTheme({ palette: { mode } });
-// TODO remove, this demo shouldn't need to reset the theme.
-const defaultTheme = createTheme();
+ const toggleColorMode = () => {
+ setMode((prev) => (prev === 'dark' ? 'light' : 'dark'));
+ };
-export default function Dashboard() {
- const [open, setOpen] = React.useState(true);
- const toggleDrawer = () => {
- setOpen(!open);
+ const toggleCustomTheme = () => {
+ setShowCustomTheme((prev) => !prev);
};
return (
-
+
+
-
-
-
-
-
-
-
- Dashboard
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {mainListItems}
-
- {secondaryListItems}
-
-
+
- theme.palette.mode === 'light'
- ? theme.palette.grey[100]
- : theme.palette.grey[900],
+ backgroundColor: 'background.default',
flexGrow: 1,
height: '100vh',
overflow: 'auto',
}}
>
-
-
-
- {/* Chart */}
-
-
-
-
-
- {/* Recent Deposits */}
-
-
-
-
-
- {/* Recent Orders */}
-
-
-
-
-
-
-
+ {/* Main content */}
+
+
+
+
+
);
diff --git a/docs/data/material/getting-started/templates/dashboard/Deposits.js b/docs/data/material/getting-started/templates/dashboard/Deposits.js
deleted file mode 100644
index d99bf6eb69d128..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Deposits.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from 'react';
-import Link from '@mui/material/Link';
-import Typography from '@mui/material/Typography';
-import Title from './Title';
-
-function preventDefault(event) {
- event.preventDefault();
-}
-
-export default function Deposits() {
- return (
-
- Recent Deposits
-
- $3,024.00
-
-
- on 15 March, 2019
-
-
-
- View balance
-
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Deposits.tsx b/docs/data/material/getting-started/templates/dashboard/Deposits.tsx
deleted file mode 100644
index 0622041c26040f..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Deposits.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from 'react';
-import Link from '@mui/material/Link';
-import Typography from '@mui/material/Typography';
-import Title from './Title';
-
-function preventDefault(event: React.MouseEvent) {
- event.preventDefault();
-}
-
-export default function Deposits() {
- return (
-
- Recent Deposits
-
- $3,024.00
-
-
- on 15 March, 2019
-
-
-
- View balance
-
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Deposits.tsx.preview b/docs/data/material/getting-started/templates/dashboard/Deposits.tsx.preview
deleted file mode 100644
index e7e01a7df11ec0..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Deposits.tsx.preview
+++ /dev/null
@@ -1,14 +0,0 @@
-
- Recent Deposits
-
- $3,024.00
-
-
- on 15 March, 2019
-
-
-
- View balance
-
-
-
\ No newline at end of file
diff --git a/docs/data/material/getting-started/templates/dashboard/Orders.js b/docs/data/material/getting-started/templates/dashboard/Orders.js
deleted file mode 100644
index ef98995932640b..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Orders.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import * as React from 'react';
-import Link from '@mui/material/Link';
-import Table from '@mui/material/Table';
-import TableBody from '@mui/material/TableBody';
-import TableCell from '@mui/material/TableCell';
-import TableHead from '@mui/material/TableHead';
-import TableRow from '@mui/material/TableRow';
-import Title from './Title';
-
-// Generate Order Data
-function createData(id, date, name, shipTo, paymentMethod, amount) {
- return { id, date, name, shipTo, paymentMethod, amount };
-}
-
-const rows = [
- createData(
- 0,
- '16 Mar, 2019',
- 'Elvis Presley',
- 'Tupelo, MS',
- 'VISA â â˘â˘â˘â˘ 3719',
- 312.44,
- ),
- createData(
- 1,
- '16 Mar, 2019',
- 'Paul McCartney',
- 'London, UK',
- 'VISA â â˘â˘â˘â˘ 2574',
- 866.99,
- ),
- createData(2, '16 Mar, 2019', 'Tom Scholz', 'Boston, MA', 'MC â â˘â˘â˘â˘ 1253', 100.81),
- createData(
- 3,
- '16 Mar, 2019',
- 'Michael Jackson',
- 'Gary, IN',
- 'AMEX â â˘â˘â˘â˘ 2000',
- 654.39,
- ),
- createData(
- 4,
- '15 Mar, 2019',
- 'Bruce Springsteen',
- 'Long Branch, NJ',
- 'VISA â â˘â˘â˘â˘ 5919',
- 212.79,
- ),
-];
-
-function preventDefault(event) {
- event.preventDefault();
-}
-
-export default function Orders() {
- return (
-
- Recent Orders
-
-
-
- Date
- Name
- Ship To
- Payment Method
- Sale Amount
-
-
-
- {rows.map((row) => (
-
- {row.date}
- {row.name}
- {row.shipTo}
- {row.paymentMethod}
- {`$${row.amount}`}
-
- ))}
-
-
-
- See more orders
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Orders.tsx b/docs/data/material/getting-started/templates/dashboard/Orders.tsx
deleted file mode 100644
index 77abe82a3490ef..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Orders.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import * as React from 'react';
-import Link from '@mui/material/Link';
-import Table from '@mui/material/Table';
-import TableBody from '@mui/material/TableBody';
-import TableCell from '@mui/material/TableCell';
-import TableHead from '@mui/material/TableHead';
-import TableRow from '@mui/material/TableRow';
-import Title from './Title';
-
-// Generate Order Data
-function createData(
- id: number,
- date: string,
- name: string,
- shipTo: string,
- paymentMethod: string,
- amount: number,
-) {
- return { id, date, name, shipTo, paymentMethod, amount };
-}
-
-const rows = [
- createData(
- 0,
- '16 Mar, 2019',
- 'Elvis Presley',
- 'Tupelo, MS',
- 'VISA â â˘â˘â˘â˘ 3719',
- 312.44,
- ),
- createData(
- 1,
- '16 Mar, 2019',
- 'Paul McCartney',
- 'London, UK',
- 'VISA â â˘â˘â˘â˘ 2574',
- 866.99,
- ),
- createData(2, '16 Mar, 2019', 'Tom Scholz', 'Boston, MA', 'MC â â˘â˘â˘â˘ 1253', 100.81),
- createData(
- 3,
- '16 Mar, 2019',
- 'Michael Jackson',
- 'Gary, IN',
- 'AMEX â â˘â˘â˘â˘ 2000',
- 654.39,
- ),
- createData(
- 4,
- '15 Mar, 2019',
- 'Bruce Springsteen',
- 'Long Branch, NJ',
- 'VISA â â˘â˘â˘â˘ 5919',
- 212.79,
- ),
-];
-
-function preventDefault(event: React.MouseEvent) {
- event.preventDefault();
-}
-
-export default function Orders() {
- return (
-
- Recent Orders
-
-
-
- Date
- Name
- Ship To
- Payment Method
- Sale Amount
-
-
-
- {rows.map((row) => (
-
- {row.date}
- {row.name}
- {row.shipTo}
- {row.paymentMethod}
- {`$${row.amount}`}
-
- ))}
-
-
-
- See more orders
-
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/Title.js b/docs/data/material/getting-started/templates/dashboard/Title.js
deleted file mode 100644
index d686a1ae8498da..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Title.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as React from 'react';
-import PropTypes from 'prop-types';
-import Typography from '@mui/material/Typography';
-
-function Title(props) {
- return (
-
- {props.children}
-
- );
-}
-
-Title.propTypes = {
- children: PropTypes.node,
-};
-
-export default Title;
diff --git a/docs/data/material/getting-started/templates/dashboard/Title.tsx b/docs/data/material/getting-started/templates/dashboard/Title.tsx
deleted file mode 100644
index c060b0906caf65..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/Title.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import * as React from 'react';
-import Typography from '@mui/material/Typography';
-
-interface TitleProps {
- children?: React.ReactNode;
-}
-
-export default function Title(props: TitleProps) {
- return (
-
- {props.children}
-
- );
-}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.js b/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.js
new file mode 100644
index 00000000000000..00446928c8b14b
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.js
@@ -0,0 +1,171 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import { PieChart } from '@mui/x-charts/PieChart';
+import { useDrawingArea } from '@mui/x-charts/hooks';
+import { styled } from '@mui/material/styles';
+import Typography from '@mui/material/Typography';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Box from '@mui/material/Box';
+import Stack from '@mui/material/Stack';
+import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
+
+import {
+ IndiaFlag,
+ UsaFlag,
+ BrazilFlag,
+ GlobeFlag,
+} from '../internals/components/CustomIcons';
+
+const data = [
+ { label: 'India', value: 50000 },
+ { label: 'USA', value: 35000 },
+ { label: 'Brazil', value: 10000 },
+ { label: 'Other', value: 5000 },
+];
+
+const countries = [
+ {
+ name: 'India',
+ value: 50,
+ flag: ,
+ color: 'hsl(220, 25%, 65%)',
+ },
+ {
+ name: 'USA',
+ value: 35,
+ flag: ,
+ color: 'hsl(220, 25%, 45%)',
+ },
+ {
+ name: 'Brazil',
+ value: 10,
+ flag: ,
+ color: 'hsl(220, 25%, 30%)',
+ },
+ {
+ name: 'Other',
+ value: 5,
+ flag: ,
+ color: 'hsl(220, 25%, 20%)',
+ },
+];
+
+const StyledText = styled('text', {
+ shouldForwardProp: (prop) => prop !== 'variant',
+})(({ theme, variant }) => ({
+ textAnchor: 'middle',
+ dominantBaseline: 'central',
+ fill: theme.palette.text.secondary,
+ fontSize:
+ variant === 'primary'
+ ? theme.typography.h5.fontSize
+ : theme.typography.body2.fontSize,
+ fontWeight:
+ variant === 'primary'
+ ? theme.typography.h5.fontWeight
+ : theme.typography.body2.fontWeight,
+}));
+
+function PieCenterLabel({ primaryText, secondaryText }) {
+ const { width, height, left, top } = useDrawingArea();
+ const primaryY = top + height / 2 - 10;
+ const secondaryY = primaryY + 24;
+
+ return (
+
+
+ {primaryText}
+
+
+ {secondaryText}
+
+
+ );
+}
+
+PieCenterLabel.propTypes = {
+ primaryText: PropTypes.string.isRequired,
+ secondaryText: PropTypes.string.isRequired,
+};
+
+const colors = [
+ 'hsl(220, 25%, 65%)',
+ 'hsl(220, 25%, 45%)',
+ 'hsl(220, 25%, 30%)',
+ 'hsl(220, 25%, 20%)',
+];
+
+export default function ChartUserByCountry() {
+ return (
+
+
+
+ Users by country
+
+
+
+
+
+
+ {countries.map((country, index) => (
+
+ {country.flag}
+
+
+
+ {country.name}
+
+
+ {country.value}%
+
+
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.tsx b/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.tsx
new file mode 100644
index 00000000000000..5048ba82ec7e62
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.tsx
@@ -0,0 +1,174 @@
+import * as React from 'react';
+import { PieChart } from '@mui/x-charts/PieChart';
+import { useDrawingArea } from '@mui/x-charts/hooks';
+import { styled } from '@mui/material/styles';
+import Typography from '@mui/material/Typography';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Box from '@mui/material/Box';
+import Stack from '@mui/material/Stack';
+import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
+
+import {
+ IndiaFlag,
+ UsaFlag,
+ BrazilFlag,
+ GlobeFlag,
+} from '../internals/components/CustomIcons';
+
+const data = [
+ { label: 'India', value: 50000 },
+ { label: 'USA', value: 35000 },
+ { label: 'Brazil', value: 10000 },
+ { label: 'Other', value: 5000 },
+];
+
+const countries = [
+ {
+ name: 'India',
+ value: 50,
+ flag: ,
+ color: 'hsl(220, 25%, 65%)',
+ },
+ {
+ name: 'USA',
+ value: 35,
+ flag: ,
+ color: 'hsl(220, 25%, 45%)',
+ },
+ {
+ name: 'Brazil',
+ value: 10,
+ flag: ,
+ color: 'hsl(220, 25%, 30%)',
+ },
+ {
+ name: 'Other',
+ value: 5,
+ flag: ,
+ color: 'hsl(220, 25%, 20%)',
+ },
+];
+
+interface StyledTextProps {
+ variant: 'primary' | 'secondary';
+}
+
+const StyledText = styled('text', {
+ shouldForwardProp: (prop) => prop !== 'variant',
+})(({ theme, variant }) => ({
+ textAnchor: 'middle',
+ dominantBaseline: 'central',
+ fill: theme.palette.text.secondary,
+ fontSize:
+ variant === 'primary'
+ ? theme.typography.h5.fontSize
+ : theme.typography.body2.fontSize,
+ fontWeight:
+ variant === 'primary'
+ ? theme.typography.h5.fontWeight
+ : theme.typography.body2.fontWeight,
+}));
+
+interface PieCenterLabelProps {
+ primaryText: string;
+ secondaryText: string;
+}
+
+function PieCenterLabel({ primaryText, secondaryText }: PieCenterLabelProps) {
+ const { width, height, left, top } = useDrawingArea();
+ const primaryY = top + height / 2 - 10;
+ const secondaryY = primaryY + 24;
+
+ return (
+
+
+ {primaryText}
+
+
+ {secondaryText}
+
+
+ );
+}
+
+const colors = [
+ 'hsl(220, 25%, 65%)',
+ 'hsl(220, 25%, 45%)',
+ 'hsl(220, 25%, 30%)',
+ 'hsl(220, 25%, 20%)',
+];
+
+export default function ChartUserByCountry() {
+ return (
+
+
+
+ Users by country
+
+
+
+
+
+
+ {countries.map((country, index) => (
+
+ {country.flag}
+
+
+
+ {country.name}
+
+
+ {country.value}%
+
+
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.js b/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.js
new file mode 100644
index 00000000000000..e64f0631283a99
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.js
@@ -0,0 +1,79 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import dayjs from 'dayjs';
+import Button from '@mui/material/Button';
+import CalendarTodayRoundedIcon from '@mui/icons-material/CalendarTodayRounded';
+import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
+
+import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
+import { DatePicker } from '@mui/x-date-pickers/DatePicker';
+
+function ButtonField(props) {
+ const {
+ setOpen,
+ label,
+ id,
+ disabled,
+ InputProps: { ref } = {},
+ inputProps: { 'aria-label': ariaLabel } = {},
+ } = props;
+
+ return (
+ setOpen?.((prev) => !prev)}
+ startIcon={ }
+ sx={{ minWidth: 'fit-content' }}
+ >
+ {label ? `${label}` : 'Pick a date'}
+
+ );
+}
+
+ButtonField.propTypes = {
+ /**
+ * If `true`, the component is disabled.
+ * @default false
+ */
+ disabled: PropTypes.bool,
+ id: PropTypes.string,
+ inputProps: PropTypes.shape({
+ 'aria-label': PropTypes.string,
+ }),
+ InputProps: PropTypes.shape({
+ endAdornment: PropTypes.node,
+ startAdornment: PropTypes.node,
+ }),
+ label: PropTypes.node,
+ setOpen: PropTypes.func,
+};
+
+export default function CustomDatePicker() {
+ const [value, setValue] = React.useState(dayjs('2023-04-17'));
+ const [open, setOpen] = React.useState(false);
+
+ return (
+
+ setValue(newValue)}
+ slots={{ field: ButtonField }}
+ slotProps={{
+ field: { setOpen },
+ nextIconButton: { size: 'small' },
+ previousIconButton: { size: 'small' },
+ }}
+ open={open}
+ onClose={() => setOpen(false)}
+ onOpen={() => setOpen(true)}
+ views={['day', 'month', 'year']}
+ />
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.tsx b/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.tsx
new file mode 100644
index 00000000000000..316f327a8e226c
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker.tsx
@@ -0,0 +1,77 @@
+import * as React from 'react';
+import dayjs, { Dayjs } from 'dayjs';
+import Button from '@mui/material/Button';
+import CalendarTodayRoundedIcon from '@mui/icons-material/CalendarTodayRounded';
+import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
+import { UseDateFieldProps } from '@mui/x-date-pickers/DateField';
+import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
+import { DatePicker } from '@mui/x-date-pickers/DatePicker';
+import {
+ BaseSingleInputFieldProps,
+ DateValidationError,
+ FieldSection,
+} from '@mui/x-date-pickers/models';
+
+interface ButtonFieldProps
+ extends UseDateFieldProps,
+ BaseSingleInputFieldProps<
+ Dayjs | null,
+ Dayjs,
+ FieldSection,
+ false,
+ DateValidationError
+ > {
+ setOpen?: React.Dispatch>;
+}
+
+function ButtonField(props: ButtonFieldProps) {
+ const {
+ setOpen,
+ label,
+ id,
+ disabled,
+ InputProps: { ref } = {},
+ inputProps: { 'aria-label': ariaLabel } = {},
+ } = props;
+
+ return (
+ setOpen?.((prev) => !prev)}
+ startIcon={ }
+ sx={{ minWidth: 'fit-content' }}
+ >
+ {label ? `${label}` : 'Pick a date'}
+
+ );
+}
+
+export default function CustomDatePicker() {
+ const [value, setValue] = React.useState(dayjs('2023-04-17'));
+ const [open, setOpen] = React.useState(false);
+
+ return (
+
+ setValue(newValue)}
+ slots={{ field: ButtonField }}
+ slotProps={{
+ field: { setOpen } as any,
+ nextIconButton: { size: 'small' },
+ previousIconButton: { size: 'small' },
+ }}
+ open={open}
+ onClose={() => setOpen(false)}
+ onOpen={() => setOpen(true)}
+ views={['day', 'month', 'year']}
+ />
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.js b/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.js
new file mode 100644
index 00000000000000..e2a10335890dd7
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.js
@@ -0,0 +1,21 @@
+import * as React from 'react';
+import { DataGrid } from '@mui/x-data-grid';
+import { columns, rows } from '../internals/data/gridData';
+
+export default function CustomizedDataGrid() {
+ return (
+
+ params.indexRelativeToCurrentPage % 2 === 0 ? 'even' : 'odd'
+ }
+ initialState={{
+ pagination: { paginationModel: { pageSize: 10 } },
+ }}
+ pageSizeOptions={[10, 25, 50]}
+ disableColumnResize
+ />
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.tsx b/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.tsx
new file mode 100644
index 00000000000000..e2a10335890dd7
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomizedDataGrid.tsx
@@ -0,0 +1,21 @@
+import * as React from 'react';
+import { DataGrid } from '@mui/x-data-grid';
+import { columns, rows } from '../internals/data/gridData';
+
+export default function CustomizedDataGrid() {
+ return (
+
+ params.indexRelativeToCurrentPage % 2 === 0 ? 'even' : 'odd'
+ }
+ initialState={{
+ pagination: { paginationModel: { pageSize: 10 } },
+ }}
+ pageSizeOptions={[10, 25, 50]}
+ disableColumnResize
+ />
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.js b/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.js
new file mode 100644
index 00000000000000..bedfba4e43698e
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.js
@@ -0,0 +1,228 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import clsx from 'clsx';
+import { animated, useSpring } from '@react-spring/web';
+
+import Box from '@mui/material/Box';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Collapse from '@mui/material/Collapse';
+import Typography from '@mui/material/Typography';
+import { RichTreeView } from '@mui/x-tree-view/RichTreeView';
+import { unstable_useTreeItem2 as useTreeItem2 } from '@mui/x-tree-view/useTreeItem2';
+import {
+ TreeItem2Content,
+ TreeItem2IconContainer,
+ TreeItem2Label,
+ TreeItem2Root,
+} from '@mui/x-tree-view/TreeItem2';
+import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon';
+import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider';
+
+import { useTheme } from '@mui/material/styles';
+
+const ITEMS = [
+ {
+ id: '1',
+ label: 'Website',
+ children: [
+ { id: '1.1', label: 'Home', color: 'green' },
+ { id: '1.2', label: 'Pricing', color: 'green' },
+ { id: '1.3', label: 'About us', color: 'green' },
+ {
+ id: '1.4',
+ label: 'Blog',
+ children: [
+ { id: '1.1.1', label: 'Announcements', color: 'blue' },
+ { id: '1.1.2', label: 'April lookahead', color: 'blue' },
+ { id: '1.1.3', label: "What's new", color: 'blue' },
+ { id: '1.1.4', label: 'Meet the team', color: 'blue' },
+ ],
+ },
+ ],
+ },
+ {
+ id: '2',
+ label: 'Store',
+ children: [
+ { id: '2.1', label: 'All products', color: 'green' },
+ {
+ id: '2.2',
+ label: 'Categories',
+ children: [
+ { id: '2.2.1', label: 'Gadgets', color: 'blue' },
+ { id: '2.2.2', label: 'Phones', color: 'blue' },
+ { id: '2.2.3', label: 'Wearables', color: 'blue' },
+ ],
+ },
+ { id: '2.3', label: 'Bestsellers', color: 'green' },
+ { id: '2.4', label: 'Sales', color: 'green' },
+ ],
+ },
+ { id: '4', label: 'Contact', color: 'blue' },
+ { id: '5', label: 'Help', color: 'blue' },
+];
+
+function DotIcon({ color }) {
+ return (
+
+
+
+
+
+ );
+}
+
+DotIcon.propTypes = {
+ color: PropTypes.string.isRequired,
+};
+
+const AnimatedCollapse = animated(Collapse);
+
+function TransitionComponent(props) {
+ const style = useSpring({
+ to: {
+ opacity: props.in ? 1 : 0,
+ transform: `translate3d(0,${props.in ? 0 : 20}px,0)`,
+ },
+ });
+
+ return ;
+}
+
+TransitionComponent.propTypes = {
+ /**
+ * Show the component; triggers the enter or exit states
+ */
+ in: PropTypes.bool,
+};
+
+function CustomLabel({ color, expandable, children, ...other }) {
+ const theme = useTheme();
+ const colors = {
+ blue: theme.palette.primary.main,
+ green: theme.palette.success.main,
+ };
+
+ const iconColor = color ? colors[color] : null;
+ return (
+
+ {iconColor && }
+
+
+ {children}
+
+
+ );
+}
+
+CustomLabel.propTypes = {
+ children: PropTypes.node,
+ color: PropTypes.oneOf(['blue', 'green']),
+ expandable: PropTypes.bool,
+};
+
+const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) {
+ const { id, itemId, label, disabled, children, ...other } = props;
+
+ const {
+ getRootProps,
+ getContentProps,
+ getIconContainerProps,
+ getLabelProps,
+ getGroupTransitionProps,
+ status,
+ publicAPI,
+ } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref });
+
+ const item = publicAPI.getItem(itemId);
+ const color = item?.color;
+ return (
+
+
+
+ {status.expandable && (
+
+
+
+ )}
+
+
+
+ {children && (
+
+ )}
+
+
+ );
+});
+
+CustomTreeItem.propTypes = {
+ /**
+ * The content of the component.
+ */
+ children: PropTypes.node,
+ /**
+ * If `true`, the item is disabled.
+ * @default false
+ */
+ disabled: PropTypes.bool,
+ /**
+ * The id attribute of the item. If not provided, it will be generated.
+ */
+ id: PropTypes.string,
+ /**
+ * The id of the item.
+ * Must be unique.
+ */
+ itemId: PropTypes.string.isRequired,
+ /**
+ * The label of the item.
+ */
+ label: PropTypes.node,
+};
+
+export default function CustomizedTreeView() {
+ return (
+
+
+ Product tree
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.tsx b/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.tsx
new file mode 100644
index 00000000000000..76406d4526faaa
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/CustomizedTreeView.tsx
@@ -0,0 +1,209 @@
+import * as React from 'react';
+import clsx from 'clsx';
+import { animated, useSpring } from '@react-spring/web';
+import { TransitionProps } from '@mui/material/transitions';
+import Box from '@mui/material/Box';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Collapse from '@mui/material/Collapse';
+import Typography from '@mui/material/Typography';
+import { RichTreeView } from '@mui/x-tree-view/RichTreeView';
+import {
+ unstable_useTreeItem2 as useTreeItem2,
+ UseTreeItem2Parameters,
+} from '@mui/x-tree-view/useTreeItem2';
+import {
+ TreeItem2Content,
+ TreeItem2IconContainer,
+ TreeItem2Label,
+ TreeItem2Root,
+} from '@mui/x-tree-view/TreeItem2';
+import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon';
+import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider';
+import { TreeViewBaseItem } from '@mui/x-tree-view/models';
+import { useTheme } from '@mui/material/styles';
+
+type Color = 'blue' | 'green';
+
+type ExtendedTreeItemProps = {
+ color?: Color;
+ id: string;
+ label: string;
+};
+
+const ITEMS: TreeViewBaseItem[] = [
+ {
+ id: '1',
+ label: 'Website',
+ children: [
+ { id: '1.1', label: 'Home', color: 'green' },
+ { id: '1.2', label: 'Pricing', color: 'green' },
+ { id: '1.3', label: 'About us', color: 'green' },
+ {
+ id: '1.4',
+ label: 'Blog',
+ children: [
+ { id: '1.1.1', label: 'Announcements', color: 'blue' },
+ { id: '1.1.2', label: 'April lookahead', color: 'blue' },
+ { id: '1.1.3', label: "What's new", color: 'blue' },
+ { id: '1.1.4', label: 'Meet the team', color: 'blue' },
+ ],
+ },
+ ],
+ },
+ {
+ id: '2',
+ label: 'Store',
+ children: [
+ { id: '2.1', label: 'All products', color: 'green' },
+ {
+ id: '2.2',
+ label: 'Categories',
+ children: [
+ { id: '2.2.1', label: 'Gadgets', color: 'blue' },
+ { id: '2.2.2', label: 'Phones', color: 'blue' },
+ { id: '2.2.3', label: 'Wearables', color: 'blue' },
+ ],
+ },
+ { id: '2.3', label: 'Bestsellers', color: 'green' },
+ { id: '2.4', label: 'Sales', color: 'green' },
+ ],
+ },
+ { id: '4', label: 'Contact', color: 'blue' },
+ { id: '5', label: 'Help', color: 'blue' },
+];
+
+function DotIcon({ color }: { color: string }) {
+ return (
+
+
+
+
+
+ );
+}
+
+const AnimatedCollapse = animated(Collapse);
+
+function TransitionComponent(props: TransitionProps) {
+ const style = useSpring({
+ to: {
+ opacity: props.in ? 1 : 0,
+ transform: `translate3d(0,${props.in ? 0 : 20}px,0)`,
+ },
+ });
+
+ return ;
+}
+
+interface CustomLabelProps {
+ children: React.ReactNode;
+ color?: Color;
+ expandable?: boolean;
+}
+
+function CustomLabel({ color, expandable, children, ...other }: CustomLabelProps) {
+ const theme = useTheme();
+ const colors = {
+ blue: theme.palette.primary.main,
+ green: theme.palette.success.main,
+ };
+
+ const iconColor = color ? colors[color] : null;
+ return (
+
+ {iconColor && }
+
+
+ {children}
+
+
+ );
+}
+
+interface CustomTreeItemProps
+ extends Omit,
+ Omit, 'onFocus'> {}
+
+const CustomTreeItem = React.forwardRef(function CustomTreeItem(
+ props: CustomTreeItemProps,
+ ref: React.Ref,
+) {
+ const { id, itemId, label, disabled, children, ...other } = props;
+
+ const {
+ getRootProps,
+ getContentProps,
+ getIconContainerProps,
+ getLabelProps,
+ getGroupTransitionProps,
+ status,
+ publicAPI,
+ } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref });
+
+ const item = publicAPI.getItem(itemId);
+ const color = item?.color;
+ return (
+
+
+
+ {status.expandable && (
+
+
+
+ )}
+
+
+
+ {children && (
+
+ )}
+
+
+ );
+});
+
+export default function CustomizedTreeView() {
+ return (
+
+
+ Product tree
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Header.js b/docs/data/material/getting-started/templates/dashboard/components/Header.js
new file mode 100644
index 00000000000000..baee88632126d1
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Header.js
@@ -0,0 +1,30 @@
+import * as React from 'react';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+import Search from './Search';
+import CustomDatePicker from './CustomDatePicker';
+
+export default function Header() {
+ return (
+
+
+
+ Dashboard
+
+
+ Real-time analytics to improve user engagement and guide strategy.
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Header.tsx b/docs/data/material/getting-started/templates/dashboard/components/Header.tsx
new file mode 100644
index 00000000000000..baee88632126d1
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Header.tsx
@@ -0,0 +1,30 @@
+import * as React from 'react';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+import Search from './Search';
+import CustomDatePicker from './CustomDatePicker';
+
+export default function Header() {
+ return (
+
+
+
+ Dashboard
+
+
+ Real-time analytics to improve user engagement and guide strategy.
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.js b/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.js
new file mode 100644
index 00000000000000..659baca1bdc683
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.js
@@ -0,0 +1,49 @@
+import * as React from 'react';
+import { styled } from '@mui/material/styles';
+import MuiCard from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Button from '@mui/material/Button';
+import Typography from '@mui/material/Typography';
+import ChevronRightRoundedIcon from '@mui/icons-material/ChevronRightRounded';
+import InsightsRoundedIcon from '@mui/icons-material/InsightsRounded';
+
+const Card = styled(MuiCard)(({ theme }) => ({
+ border: '1px solid',
+ borderColor:
+ theme.palette.mode === 'light'
+ ? theme.palette.primary.light
+ : theme.palette.primary.dark,
+ boxShadow: 'none',
+ background:
+ theme.palette.mode === 'light'
+ ? 'hsl(210, 100%, 98%)'
+ : 'hsla(210, 100%, 15%, 0.25)',
+ color:
+ theme.palette.mode === 'light'
+ ? theme.palette.grey[900]
+ : theme.palette.grey[200],
+}));
+
+export default function HighlightedCard() {
+ return (
+
+
+
+
+ Explore your data
+
+
+ Uncover performance and visitor insights with our data wizardry.
+
+ }
+ >
+ Get insights
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.tsx b/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.tsx
new file mode 100644
index 00000000000000..659baca1bdc683
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/HighlightedCard.tsx
@@ -0,0 +1,49 @@
+import * as React from 'react';
+import { styled } from '@mui/material/styles';
+import MuiCard from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Button from '@mui/material/Button';
+import Typography from '@mui/material/Typography';
+import ChevronRightRoundedIcon from '@mui/icons-material/ChevronRightRounded';
+import InsightsRoundedIcon from '@mui/icons-material/InsightsRounded';
+
+const Card = styled(MuiCard)(({ theme }) => ({
+ border: '1px solid',
+ borderColor:
+ theme.palette.mode === 'light'
+ ? theme.palette.primary.light
+ : theme.palette.primary.dark,
+ boxShadow: 'none',
+ background:
+ theme.palette.mode === 'light'
+ ? 'hsl(210, 100%, 98%)'
+ : 'hsla(210, 100%, 15%, 0.25)',
+ color:
+ theme.palette.mode === 'light'
+ ? theme.palette.grey[900]
+ : theme.palette.grey[200],
+}));
+
+export default function HighlightedCard() {
+ return (
+
+
+
+
+ Explore your data
+
+
+ Uncover performance and visitor insights with our data wizardry.
+
+ }
+ >
+ Get insights
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/MainGrid.js b/docs/data/material/getting-started/templates/dashboard/components/MainGrid.js
new file mode 100644
index 00000000000000..7790a233c9c72c
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/MainGrid.js
@@ -0,0 +1,81 @@
+import * as React from 'react';
+import Grid from '@mui/material/Unstable_Grid2';
+import Stack from '@mui/material/Stack';
+import ChartUserByCountry from './ChartUserByCountry';
+import CustomizedTreeView from './CustomizedTreeView';
+import CustomizedDataGrid from './CustomizedDataGrid';
+import HighlightedCard from './HighlightedCard';
+import PageViewsBarChart from './PageViewsBarChart';
+import PageViewsChart from './PageViewsChart';
+import StatCard from './StatCard';
+
+const data = [
+ {
+ title: 'Users',
+ value: '14k',
+ interval: 'Last 30 days',
+ trend: 'up',
+ data: [2, 4, 3, 5, 7, 6, 8, 10],
+ },
+ {
+ title: 'Conversions',
+ value: '325',
+ interval: 'Last 30 days',
+ trend: 'down',
+ data: [10, 7, 6, 8, 5, 4, 4, 2],
+ },
+ {
+ title: 'Event count',
+ value: '200k',
+ interval: 'Last 30 days',
+ trend: 'neutral',
+ data: [5, 4, 6, 3, 4, 3, 7, 6],
+ },
+ {
+ title: 'Engagements',
+ value: '30k',
+ interval: 'Last 30 days',
+ trend: 'up',
+ data: [2, 4, 3, 4, 5, 4, 7, 8],
+ },
+];
+
+export default function MainGrid() {
+ return (
+
+ {/* cards */}
+
+
+ {data.map((card, index) => (
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/MainGrid.tsx b/docs/data/material/getting-started/templates/dashboard/components/MainGrid.tsx
new file mode 100644
index 00000000000000..360b077c2a65ce
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/MainGrid.tsx
@@ -0,0 +1,81 @@
+import * as React from 'react';
+import Grid from '@mui/material/Unstable_Grid2';
+import Stack from '@mui/material/Stack';
+import ChartUserByCountry from './ChartUserByCountry';
+import CustomizedTreeView from './CustomizedTreeView';
+import CustomizedDataGrid from './CustomizedDataGrid';
+import HighlightedCard from './HighlightedCard';
+import PageViewsBarChart from './PageViewsBarChart';
+import PageViewsChart from './PageViewsChart';
+import StatCard, { StatCardProps } from './StatCard';
+
+const data: StatCardProps[] = [
+ {
+ title: 'Users',
+ value: '14k',
+ interval: 'Last 30 days',
+ trend: 'up',
+ data: [2, 4, 3, 5, 7, 6, 8, 10],
+ },
+ {
+ title: 'Conversions',
+ value: '325',
+ interval: 'Last 30 days',
+ trend: 'down',
+ data: [10, 7, 6, 8, 5, 4, 4, 2],
+ },
+ {
+ title: 'Event count',
+ value: '200k',
+ interval: 'Last 30 days',
+ trend: 'neutral',
+ data: [5, 4, 6, 3, 4, 3, 7, 6],
+ },
+ {
+ title: 'Engagements',
+ value: '30k',
+ interval: 'Last 30 days',
+ trend: 'up',
+ data: [2, 4, 3, 4, 5, 4, 7, 8],
+ },
+];
+
+export default function MainGrid() {
+ return (
+
+ {/* cards */}
+
+
+ {data.map((card, index) => (
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/MenuButton.js b/docs/data/material/getting-started/templates/dashboard/components/MenuButton.js
new file mode 100644
index 00000000000000..d324b3ba822816
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/MenuButton.js
@@ -0,0 +1,25 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import Badge from '@mui/material/Badge';
+import IconButton from '@mui/material/IconButton';
+
+function MenuButton({ showBadge = false, ...props }) {
+ return (
+
+
+
+ );
+}
+
+MenuButton.propTypes = {
+ showBadge: PropTypes.bool,
+};
+
+export default MenuButton;
diff --git a/docs/data/material/getting-started/templates/dashboard/components/MenuButton.tsx b/docs/data/material/getting-started/templates/dashboard/components/MenuButton.tsx
new file mode 100644
index 00000000000000..35453496a9181a
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/MenuButton.tsx
@@ -0,0 +1,25 @@
+import * as React from 'react';
+import Badge from '@mui/material/Badge';
+import IconButton, { IconButtonProps } from '@mui/material/IconButton';
+
+interface StyledMenuButtonProps extends IconButtonProps {
+ showBadge?: boolean;
+}
+
+export default function MenuButton({
+ showBadge = false,
+ ...props
+}: StyledMenuButtonProps) {
+ return (
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Navbar.js b/docs/data/material/getting-started/templates/dashboard/components/Navbar.js
new file mode 100644
index 00000000000000..23a7fae0c99cd5
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Navbar.js
@@ -0,0 +1,119 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import { styled } from '@mui/material/styles';
+
+import AppBar from '@mui/material/AppBar';
+import Stack from '@mui/material/Stack';
+import MuiToolbar from '@mui/material/Toolbar';
+import Tab from '@mui/material/Tab';
+import Tabs from '@mui/material/Tabs';
+import MenuRoundedIcon from '@mui/icons-material/MenuRounded';
+import NotificationsRoundedIcon from '@mui/icons-material/NotificationsRounded';
+import ToggleColorMode from './ToggleColorMode';
+import SideNav from './SideNav';
+import MenuButton from './MenuButton';
+import NavbarBreadcrumbs from './NavbarBreadcrumbs';
+import OptionsMenu from './OptionsMenu';
+
+const Toolbar = styled(MuiToolbar)({
+ maxWidth: 1538,
+ width: '100%',
+ padding: '16px 16px 0 16px',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'start',
+ justifyContent: 'center',
+ gap: '12px',
+ flexShrink: 0,
+ backdropFilter: 'blur(24px)',
+ '& .MuiTabs-flexContainer': {
+ gap: '8px',
+ p: '8px',
+ pb: 0,
+ },
+});
+
+function a11yProps(index) {
+ return {
+ id: `simple-tab-${index}`,
+ 'aria-controls': `simple-tabpanel-${index}`,
+ };
+}
+
+function Navbar({ mode, toggleColorMode }) {
+ const [open, setOpen] = React.useState(false);
+
+ const toggleDrawer = (newOpen) => () => {
+ setOpen(newOpen);
+ };
+
+ const [value, setValue] = React.useState(0);
+
+ const handleChange = (event, newValue) => {
+ setValue(newValue);
+ };
+
+ return (
+ ({
+ boxShadow: 0,
+ bgcolor: 'transparent',
+ backgroundImage: 'none',
+ alignItems: 'center',
+ borderBottom: '1px solid',
+ borderColor: theme.palette.divider,
+ })}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+Navbar.propTypes = {
+ mode: PropTypes.oneOf(['dark', 'light']).isRequired,
+ toggleColorMode: PropTypes.func.isRequired,
+};
+
+export default Navbar;
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Navbar.tsx b/docs/data/material/getting-started/templates/dashboard/components/Navbar.tsx
new file mode 100644
index 00000000000000..b04d10dd672164
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Navbar.tsx
@@ -0,0 +1,116 @@
+import * as React from 'react';
+import { styled } from '@mui/material/styles';
+import { PaletteMode } from '@mui/material';
+import AppBar from '@mui/material/AppBar';
+import Stack from '@mui/material/Stack';
+import MuiToolbar from '@mui/material/Toolbar';
+import Tab from '@mui/material/Tab';
+import Tabs from '@mui/material/Tabs';
+import MenuRoundedIcon from '@mui/icons-material/MenuRounded';
+import NotificationsRoundedIcon from '@mui/icons-material/NotificationsRounded';
+import ToggleColorMode from './ToggleColorMode';
+import SideNav from './SideNav';
+import MenuButton from './MenuButton';
+import NavbarBreadcrumbs from './NavbarBreadcrumbs';
+import OptionsMenu from './OptionsMenu';
+
+interface NavBarProps {
+ mode: PaletteMode;
+ toggleColorMode: () => void;
+}
+
+const Toolbar = styled(MuiToolbar)({
+ maxWidth: 1538,
+ width: '100%',
+ padding: '16px 16px 0 16px',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'start',
+ justifyContent: 'center',
+ gap: '12px',
+ flexShrink: 0,
+ backdropFilter: 'blur(24px)',
+ '& .MuiTabs-flexContainer': {
+ gap: '8px',
+ p: '8px',
+ pb: 0,
+ },
+});
+
+function a11yProps(index: number) {
+ return {
+ id: `simple-tab-${index}`,
+ 'aria-controls': `simple-tabpanel-${index}`,
+ };
+}
+
+export default function Navbar({ mode, toggleColorMode }: NavBarProps) {
+ const [open, setOpen] = React.useState(false);
+
+ const toggleDrawer = (newOpen: boolean) => () => {
+ setOpen(newOpen);
+ };
+
+ const [value, setValue] = React.useState(0);
+
+ const handleChange = (event: React.SyntheticEvent, newValue: number) => {
+ setValue(newValue);
+ };
+
+ return (
+ ({
+ boxShadow: 0,
+ bgcolor: 'transparent',
+ backgroundImage: 'none',
+ alignItems: 'center',
+ borderBottom: '1px solid',
+ borderColor: theme.palette.divider,
+ })}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.js b/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.js
new file mode 100644
index 00000000000000..a7ea114b17330b
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.js
@@ -0,0 +1,25 @@
+import * as React from 'react';
+import { styled } from '@mui/material/styles';
+import Typography from '@mui/material/Typography';
+import Breadcrumbs from '@mui/material/Breadcrumbs';
+import { SitemarkIcon } from '../internals/components/CustomIcons';
+
+const StyledBreadcrumbs = styled(Breadcrumbs)(({ theme }) => ({
+ '& .MuiBreadcrumbs-separator': {
+ color: theme.palette.action.disabled,
+ },
+ '& .MuiBreadcrumbs-ol': {
+ alignItems: 'normal',
+ },
+}));
+
+export default function NavbarBreadcrumbs() {
+ return (
+
+
+
+ Project (Production)
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.tsx b/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.tsx
new file mode 100644
index 00000000000000..a7ea114b17330b
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/NavbarBreadcrumbs.tsx
@@ -0,0 +1,25 @@
+import * as React from 'react';
+import { styled } from '@mui/material/styles';
+import Typography from '@mui/material/Typography';
+import Breadcrumbs from '@mui/material/Breadcrumbs';
+import { SitemarkIcon } from '../internals/components/CustomIcons';
+
+const StyledBreadcrumbs = styled(Breadcrumbs)(({ theme }) => ({
+ '& .MuiBreadcrumbs-separator': {
+ color: theme.palette.action.disabled,
+ },
+ '& .MuiBreadcrumbs-ol': {
+ alignItems: 'normal',
+ },
+}));
+
+export default function NavbarBreadcrumbs() {
+ return (
+
+
+
+ Project (Production)
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.js b/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.js
new file mode 100644
index 00000000000000..da6b2efeb22c58
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.js
@@ -0,0 +1,58 @@
+import * as React from 'react';
+import Avatar from '@mui/material/Avatar';
+import Divider from '@mui/material/Divider';
+import Menu from '@mui/material/Menu';
+import MenuItem from '@mui/material/MenuItem';
+import Typography from '@mui/material/Typography';
+import MoreVertRoundedIcon from '@mui/icons-material/MoreVertRounded';
+import MenuButton from './MenuButton';
+
+export default function OptionsMenu() {
+ const [anchorEl, setAnchorEl] = React.useState(null);
+ const open = Boolean(anchorEl);
+ const handleClick = (event) => {
+ setAnchorEl(event.currentTarget);
+ };
+ const handleClose = () => {
+ setAnchorEl(null);
+ };
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.tsx b/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.tsx
new file mode 100644
index 00000000000000..ad68a17337210d
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/OptionsMenu.tsx
@@ -0,0 +1,58 @@
+import * as React from 'react';
+import Avatar from '@mui/material/Avatar';
+import Divider from '@mui/material/Divider';
+import Menu from '@mui/material/Menu';
+import MenuItem from '@mui/material/MenuItem';
+import Typography from '@mui/material/Typography';
+import MoreVertRoundedIcon from '@mui/icons-material/MoreVertRounded';
+import MenuButton from './MenuButton';
+
+export default function OptionsMenu() {
+ const [anchorEl, setAnchorEl] = React.useState(null);
+ const open = Boolean(anchorEl);
+ const handleClick = (event: React.MouseEvent) => {
+ setAnchorEl(event.currentTarget);
+ };
+ const handleClose = () => {
+ setAnchorEl(null);
+ };
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.js b/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.js
new file mode 100644
index 00000000000000..b5b75c47922e57
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.js
@@ -0,0 +1,87 @@
+import * as React from 'react';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Typography from '@mui/material/Typography';
+import { BarChart } from '@mui/x-charts/BarChart';
+import { gray } from '../themePrimitives';
+
+const colorPaletteLight = [gray[700], gray[500], gray[300]];
+const colorPalette = (mode) =>
+ mode === 'dark' ? colorPaletteLight : colorPaletteLight;
+
+export default function PageViewsBarChart() {
+ return (
+
+
+
+ Page views and downloads
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.tsx b/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.tsx
new file mode 100644
index 00000000000000..5dab2c76f85a9f
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/PageViewsBarChart.tsx
@@ -0,0 +1,89 @@
+import * as React from 'react';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Typography from '@mui/material/Typography';
+import { BarChart } from '@mui/x-charts/BarChart';
+import { gray } from '../themePrimitives';
+
+const colorPaletteLight = [gray[700], gray[500], gray[300]];
+const colorPalette = (mode: 'light' | 'dark') =>
+ mode === 'dark' ? colorPaletteLight : colorPaletteLight;
+
+export default function PageViewsBarChart() {
+ return (
+
+
+
+ Page views and downloads
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.js b/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.js
new file mode 100644
index 00000000000000..93ef070b493fb5
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.js
@@ -0,0 +1,164 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import { useTheme } from '@mui/material/styles';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Typography from '@mui/material/Typography';
+import { LineChart } from '@mui/x-charts/LineChart';
+
+function AreaGradient({ color, id }) {
+ return (
+
+
+
+
+
+
+ );
+}
+
+AreaGradient.propTypes = {
+ color: PropTypes.string.isRequired,
+ id: PropTypes.string.isRequired,
+};
+
+function getDaysInMonth(month, year) {
+ const date = new Date(year, month, 0);
+ const monthName = date.toLocaleDateString('en-US', {
+ month: 'short',
+ });
+ const daysInMonth = date.getDate();
+ const days = [];
+ let i = 1;
+ while (days.length < daysInMonth) {
+ days.push(`${monthName} ${i}`);
+ i += 1;
+ }
+ return days;
+}
+
+export default function PageViewsChart() {
+ const theme = useTheme();
+ const mode = theme.palette.mode;
+ const data = getDaysInMonth(4, 2024);
+
+ const colorPaletteLight = [
+ theme.palette.grey[300],
+ theme.palette.grey[400],
+ theme.palette.grey[500],
+ ];
+
+ const colorPaletteDark = [
+ theme.palette.grey[400],
+ theme.palette.grey[500],
+ theme.palette.grey[700],
+ ];
+
+ const colorPalette = mode === 'dark' ? colorPaletteDark : colorPaletteLight;
+
+ return (
+
+
+
+ Sessions
+
+ (i + 1) % 5 === 0,
+ },
+ ]}
+ series={[
+ {
+ id: 'organic',
+ label: 'Organic',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ stackOrder: 'ascending',
+ data: [
+ 6234, 6087, 6421, 6312, 6190, 6400, 6357, 6029, 6173, 6482, 6215,
+ 6051, 6338, 6142, 6018, 6247, 6463, 6371, 6060, 6100, 6389, 6203,
+ 6497, 6036, 6156, 6470, 6269, 6091, 6445, 6121,
+ ],
+ area: true,
+ },
+ {
+ id: 'referral',
+ label: 'Referral',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ area: true,
+ stackOrder: 'ascending',
+ data: [
+ 4486, 4255, 4046, 4316, 4418, 4498, 4421, 4474, 4036, 4049, 4206,
+ 4458, 4259, 4353, 4496, 4178, 4265, 4424, 4186, 4003, 4204, 4467,
+ 4120, 4410, 4292, 4143, 4403, 4373, 4079, 4291,
+ ],
+ },
+ {
+ id: 'direct',
+ label: 'Direct',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ area: true,
+ stackOrder: 'ascending',
+ data: [
+ 2238, 2172, 2305, 2140, 2135, 2100, 2465, 2053, 2342, 2494, 2497,
+ 2277, 2356, 2012, 2309, 2301, 2029, 2028, 2129, 2324, 2152, 2235,
+ 2430, 2027, 2168, 2111, 2235, 2166, 2309, 2268,
+ ],
+ },
+ ]}
+ height={320}
+ margin={{ left: 50, right: 0, top: 60, bottom: 30 }}
+ grid={{ horizontal: true }}
+ sx={{
+ '& .MuiAreaElement-series-organic': {
+ fill: "url('#organic')",
+ },
+ '& .MuiAreaElement-series-referral': {
+ fill: "url('#referral')",
+ },
+ '& .MuiAreaElement-series-direct': {
+ fill: "url('#direct')",
+ },
+ }}
+ slotProps={{
+ legend: {
+ labelStyle: { fontSize: 14 },
+ itemMarkWidth: 10,
+ itemMarkHeight: 10,
+ itemGap: 24,
+ position: { vertical: 'top', horizontal: 'right' },
+ },
+ }}
+ >
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.tsx b/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.tsx
new file mode 100644
index 00000000000000..75ccda32685aef
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/PageViewsChart.tsx
@@ -0,0 +1,156 @@
+import * as React from 'react';
+import { useTheme } from '@mui/material/styles';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Typography from '@mui/material/Typography';
+import { LineChart } from '@mui/x-charts/LineChart';
+
+function AreaGradient({ color, id }: { color: string; id: string }) {
+ return (
+
+
+
+
+
+
+ );
+}
+
+function getDaysInMonth(month: number, year: number) {
+ const date = new Date(year, month, 0);
+ const monthName = date.toLocaleDateString('en-US', {
+ month: 'short',
+ });
+ const daysInMonth = date.getDate();
+ const days = [];
+ let i = 1;
+ while (days.length < daysInMonth) {
+ days.push(`${monthName} ${i}`);
+ i += 1;
+ }
+ return days;
+}
+
+export default function PageViewsChart() {
+ const theme = useTheme();
+ const mode = theme.palette.mode;
+ const data = getDaysInMonth(4, 2024);
+
+ const colorPaletteLight = [
+ theme.palette.grey[300],
+ theme.palette.grey[400],
+ theme.palette.grey[500],
+ ];
+ const colorPaletteDark = [
+ theme.palette.grey[400],
+ theme.palette.grey[500],
+ theme.palette.grey[700],
+ ];
+ const colorPalette = mode === 'dark' ? colorPaletteDark : colorPaletteLight;
+
+ return (
+
+
+
+ Sessions
+
+ (i + 1) % 5 === 0,
+ },
+ ]}
+ series={[
+ {
+ id: 'organic',
+ label: 'Organic',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ stackOrder: 'ascending',
+ data: [
+ 6234, 6087, 6421, 6312, 6190, 6400, 6357, 6029, 6173, 6482, 6215,
+ 6051, 6338, 6142, 6018, 6247, 6463, 6371, 6060, 6100, 6389, 6203,
+ 6497, 6036, 6156, 6470, 6269, 6091, 6445, 6121,
+ ],
+ area: true,
+ },
+ {
+ id: 'referral',
+ label: 'Referral',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ area: true,
+ stackOrder: 'ascending',
+ data: [
+ 4486, 4255, 4046, 4316, 4418, 4498, 4421, 4474, 4036, 4049, 4206,
+ 4458, 4259, 4353, 4496, 4178, 4265, 4424, 4186, 4003, 4204, 4467,
+ 4120, 4410, 4292, 4143, 4403, 4373, 4079, 4291,
+ ],
+ },
+ {
+ id: 'direct',
+ label: 'Direct',
+ showMark: false,
+ curve: 'linear',
+ stack: 'total',
+ area: true,
+ stackOrder: 'ascending',
+ data: [
+ 2238, 2172, 2305, 2140, 2135, 2100, 2465, 2053, 2342, 2494, 2497,
+ 2277, 2356, 2012, 2309, 2301, 2029, 2028, 2129, 2324, 2152, 2235,
+ 2430, 2027, 2168, 2111, 2235, 2166, 2309, 2268,
+ ],
+ },
+ ]}
+ height={320}
+ margin={{ left: 50, right: 0, top: 60, bottom: 30 }}
+ grid={{ horizontal: true }}
+ sx={{
+ '& .MuiAreaElement-series-organic': {
+ fill: "url('#organic')",
+ },
+ '& .MuiAreaElement-series-referral': {
+ fill: "url('#referral')",
+ },
+ '& .MuiAreaElement-series-direct': {
+ fill: "url('#direct')",
+ },
+ }}
+ slotProps={{
+ legend: {
+ labelStyle: { fontSize: 14 },
+ itemMarkWidth: 10,
+ itemMarkHeight: 10,
+ itemGap: 24,
+ position: { vertical: 'top', horizontal: 'right' },
+ },
+ }}
+ >
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Search.js b/docs/data/material/getting-started/templates/dashboard/components/Search.js
new file mode 100644
index 00000000000000..58408e82350bae
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Search.js
@@ -0,0 +1,26 @@
+import * as React from 'react';
+import FormControl from '@mui/material/FormControl';
+import InputAdornment from '@mui/material/InputAdornment';
+import OutlinedInput from '@mui/material/OutlinedInput';
+import SearchRoundedIcon from '@mui/icons-material/SearchRounded';
+
+export default function Search() {
+ return (
+
+
+
+
+ }
+ inputProps={{
+ 'aria-label': 'search',
+ }}
+ />
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/Search.tsx b/docs/data/material/getting-started/templates/dashboard/components/Search.tsx
new file mode 100644
index 00000000000000..58408e82350bae
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/Search.tsx
@@ -0,0 +1,26 @@
+import * as React from 'react';
+import FormControl from '@mui/material/FormControl';
+import InputAdornment from '@mui/material/InputAdornment';
+import OutlinedInput from '@mui/material/OutlinedInput';
+import SearchRoundedIcon from '@mui/icons-material/SearchRounded';
+
+export default function Search() {
+ return (
+
+
+
+
+ }
+ inputProps={{
+ 'aria-label': 'search',
+ }}
+ />
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/SideNav.js b/docs/data/material/getting-started/templates/dashboard/components/SideNav.js
new file mode 100644
index 00000000000000..da44888b9966e0
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/SideNav.js
@@ -0,0 +1,107 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+
+import Avatar from '@mui/material/Avatar';
+import Button from '@mui/material/Button';
+import Divider from '@mui/material/Divider';
+import Drawer from '@mui/material/Drawer';
+import List from '@mui/material/List';
+import ListItem from '@mui/material/ListItem';
+import ListItemButton from '@mui/material/ListItemButton';
+import ListItemIcon from '@mui/material/ListItemIcon';
+import ListItemText from '@mui/material/ListItemText';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+
+import AddRoundedIcon from '@mui/icons-material/AddRounded';
+import AccountCircleRoundedIcon from '@mui/icons-material/AccountCircleRounded';
+import ContactPageRoundedIcon from '@mui/icons-material/ContactPageRounded';
+import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded';
+import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded';
+import NotificationsRoundedIcon from '@mui/icons-material/NotificationsRounded';
+
+import MenuButton from './MenuButton';
+import ToggleColorMode from './ToggleColorMode';
+
+const accountsList = [
+ { label: 'Profile', icon: },
+ { label: 'My account', icon: },
+];
+
+const settingsList = [
+ { label: 'Add account', icon: },
+ { label: 'Settings', icon: },
+];
+
+function SideNav({ open, toggleDrawer, mode, toggleColorMode }) {
+ return (
+
+
+
+
+
+
+ Riley Carter
+
+
+
+
+
+
+
+
+
+
+ {accountsList.map((item, index) => (
+
+
+ {item.icon}
+
+
+
+ ))}
+
+ {settingsList.map((item, index) => (
+
+
+ {item.icon}
+
+
+
+ ))}
+
+
+
+ }>
+ Logout
+
+
+
+
+ );
+}
+
+SideNav.propTypes = {
+ mode: PropTypes.oneOf(['dark', 'light']).isRequired,
+ open: PropTypes.bool,
+ toggleColorMode: PropTypes.func.isRequired,
+ toggleDrawer: PropTypes.func.isRequired,
+};
+
+export default SideNav;
diff --git a/docs/data/material/getting-started/templates/dashboard/components/SideNav.tsx b/docs/data/material/getting-started/templates/dashboard/components/SideNav.tsx
new file mode 100644
index 00000000000000..6a9edc72f87048
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/SideNav.tsx
@@ -0,0 +1,109 @@
+import * as React from 'react';
+import { PaletteMode } from '@mui/material';
+import Avatar from '@mui/material/Avatar';
+import Button from '@mui/material/Button';
+import Divider from '@mui/material/Divider';
+import Drawer from '@mui/material/Drawer';
+import List from '@mui/material/List';
+import ListItem from '@mui/material/ListItem';
+import ListItemButton from '@mui/material/ListItemButton';
+import ListItemIcon from '@mui/material/ListItemIcon';
+import ListItemText from '@mui/material/ListItemText';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+
+import AddRoundedIcon from '@mui/icons-material/AddRounded';
+import AccountCircleRoundedIcon from '@mui/icons-material/AccountCircleRounded';
+import ContactPageRoundedIcon from '@mui/icons-material/ContactPageRounded';
+import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded';
+import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded';
+import NotificationsRoundedIcon from '@mui/icons-material/NotificationsRounded';
+
+import MenuButton from './MenuButton';
+import ToggleColorMode from './ToggleColorMode';
+
+interface SideNavProps {
+ open: boolean | undefined;
+ toggleDrawer: (newOpen: boolean) => () => void;
+ mode: PaletteMode;
+ toggleColorMode: () => void;
+}
+
+const accountsList = [
+ { label: 'Profile', icon: },
+ { label: 'My account', icon: },
+];
+
+const settingsList = [
+ { label: 'Add account', icon: },
+ { label: 'Settings', icon: },
+];
+
+export default function SideNav({
+ open,
+ toggleDrawer,
+ mode,
+ toggleColorMode,
+}: SideNavProps) {
+ return (
+
+
+
+
+
+
+ Riley Carter
+
+
+
+
+
+
+
+
+
+
+ {accountsList.map((item, index) => (
+
+
+ {item.icon}
+
+
+
+ ))}
+
+ {settingsList.map((item, index) => (
+
+
+ {item.icon}
+
+
+
+ ))}
+
+
+
+ }>
+ Logout
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/StatCard.js b/docs/data/material/getting-started/templates/dashboard/components/StatCard.js
new file mode 100644
index 00000000000000..8b1830d4b9a53b
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/StatCard.js
@@ -0,0 +1,112 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import { useTheme } from '@mui/material/styles';
+import Box from '@mui/material/Box';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Chip from '@mui/material/Chip';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+import { SparkLineChart } from '@mui/x-charts/SparkLineChart';
+import { areaElementClasses } from '@mui/x-charts/LineChart';
+
+function AreaGradient({ color, id }) {
+ return (
+
+
+
+
+
+
+ );
+}
+
+AreaGradient.propTypes = {
+ color: PropTypes.string.isRequired,
+ id: PropTypes.string.isRequired,
+};
+
+function StatCard({ title, value, interval, trend, data }) {
+ const theme = useTheme();
+
+ const trendColors = {
+ up:
+ theme.palette.mode === 'light'
+ ? theme.palette.success.main
+ : theme.palette.success.dark,
+ down:
+ theme.palette.mode === 'light'
+ ? theme.palette.error.main
+ : theme.palette.error.dark,
+ neutral:
+ theme.palette.mode === 'light'
+ ? theme.palette.grey[400]
+ : theme.palette.grey[700],
+ };
+
+ const labelColors = {
+ up: 'success',
+ down: 'error',
+ neutral: 'default',
+ };
+
+ const color = labelColors[trend];
+ const chartColor = trendColors[trend];
+ const trendValues = { up: '+25%', down: '-25%', neutral: '+5%' };
+
+ return (
+
+
+
+ {title}
+
+
+
+
+
+ {value}
+
+
+
+
+ {interval}
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+StatCard.propTypes = {
+ data: PropTypes.arrayOf(PropTypes.number).isRequired,
+ interval: PropTypes.string.isRequired,
+ title: PropTypes.string.isRequired,
+ trend: PropTypes.oneOf(['down', 'neutral', 'up']).isRequired,
+ value: PropTypes.string.isRequired,
+};
+
+export default StatCard;
diff --git a/docs/data/material/getting-started/templates/dashboard/components/StatCard.tsx b/docs/data/material/getting-started/templates/dashboard/components/StatCard.tsx
new file mode 100644
index 00000000000000..67776b8e0d09c0
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/StatCard.tsx
@@ -0,0 +1,110 @@
+import * as React from 'react';
+import { useTheme } from '@mui/material/styles';
+import Box from '@mui/material/Box';
+import Card from '@mui/material/Card';
+import CardContent from '@mui/material/CardContent';
+import Chip from '@mui/material/Chip';
+import Stack from '@mui/material/Stack';
+import Typography from '@mui/material/Typography';
+import { SparkLineChart } from '@mui/x-charts/SparkLineChart';
+import { areaElementClasses } from '@mui/x-charts/LineChart';
+
+export type StatCardProps = {
+ title: string;
+ value: string;
+ interval: string;
+ trend: 'up' | 'down' | 'neutral';
+ data: number[];
+};
+
+function AreaGradient({ color, id }: { color: string; id: string }) {
+ return (
+
+
+
+
+
+
+ );
+}
+
+export default function StatCard({
+ title,
+ value,
+ interval,
+ trend,
+ data,
+}: StatCardProps) {
+ const theme = useTheme();
+
+ const trendColors = {
+ up:
+ theme.palette.mode === 'light'
+ ? theme.palette.success.main
+ : theme.palette.success.dark,
+ down:
+ theme.palette.mode === 'light'
+ ? theme.palette.error.main
+ : theme.palette.error.dark,
+ neutral:
+ theme.palette.mode === 'light'
+ ? theme.palette.grey[400]
+ : theme.palette.grey[700],
+ };
+
+ const labelColors = {
+ up: 'success' as const,
+ down: 'error' as const,
+ neutral: 'default' as const,
+ };
+
+ const color = labelColors[trend];
+ const chartColor = trendColors[trend];
+ const trendValues = { up: '+25%', down: '-25%', neutral: '+5%' };
+
+ return (
+
+
+
+ {title}
+
+
+
+
+
+ {value}
+
+
+
+
+ {interval}
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.js b/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.js
new file mode 100644
index 00000000000000..317b5b764c06c4
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.js
@@ -0,0 +1,29 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+
+import WbSunnyRoundedIcon from '@mui/icons-material/WbSunnyRounded';
+import ModeNightRoundedIcon from '@mui/icons-material/ModeNightRounded';
+import MenuButton from './MenuButton';
+
+function ToggleColorMode({ mode, toggleColorMode }) {
+ return (
+
+ {mode === 'dark' ? (
+
+ ) : (
+
+ )}
+
+ );
+}
+
+ToggleColorMode.propTypes = {
+ mode: PropTypes.oneOf(['dark', 'light']).isRequired,
+ toggleColorMode: PropTypes.func.isRequired,
+};
+
+export default ToggleColorMode;
diff --git a/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.tsx b/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.tsx
new file mode 100644
index 00000000000000..9642c2d2f21fcb
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/components/ToggleColorMode.tsx
@@ -0,0 +1,29 @@
+import * as React from 'react';
+import { PaletteMode } from '@mui/material';
+import WbSunnyRoundedIcon from '@mui/icons-material/WbSunnyRounded';
+import ModeNightRoundedIcon from '@mui/icons-material/ModeNightRounded';
+import MenuButton from './MenuButton';
+
+interface ToggleColorModeProps {
+ mode: PaletteMode;
+ toggleColorMode: () => void;
+}
+
+export default function ToggleColorMode({
+ mode,
+ toggleColorMode,
+}: ToggleColorModeProps) {
+ return (
+
+ {mode === 'dark' ? (
+
+ ) : (
+
+ )}
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.js b/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.js
new file mode 100644
index 00000000000000..faf6155e1fc22d
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.js
@@ -0,0 +1,1115 @@
+import * as React from 'react';
+
+import { alpha } from '@mui/material/styles';
+
+import CheckBoxOutlineBlankRoundedIcon from '@mui/icons-material/CheckBoxOutlineBlankRounded';
+import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
+import RemoveRoundedIcon from '@mui/icons-material/RemoveRounded';
+import { brand, getDesignTokens, gray, green, red } from './themePrimitives';
+
+export default function getDashboardTheme(mode) {
+ return {
+ ...getDesignTokens(mode),
+ components: {
+ MuiButtonBase: {
+ defaultProps: {
+ disableTouchRipple: true,
+ disableRipple: true,
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxSizing: 'border-box',
+ transition: 'all 100ms ease-in',
+ '&:focus-visible': {
+ outline: `3px solid ${alpha(theme.palette.primary.main, 0.5)}`,
+ outlineOffset: '2px',
+ },
+ }),
+ },
+ },
+ MuiButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxShadow: 'none',
+ borderRadius: theme.shape.borderRadius,
+ textTransform: 'none',
+ '& .MuiSvgIcon-root': { width: '1.125rem', height: '1.125rem' },
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ height: '2rem', // 32px
+ padding: '0 0.5rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ height: '2.5rem', // 40px
+ },
+ },
+ {
+ props: {
+ color: 'primary',
+ variant: 'contained',
+ },
+ style: {
+ color: 'white',
+ backgroundColor: gray[900],
+ backgroundImage: `linear-gradient(to bottom, ${gray[700]}, ${gray[800]})`,
+ boxShadow: `inset 0 2px 0 ${gray[600]}, inset 0 -2px 0 hsl(220, 0%, 0%)`,
+ border: `1px solid ${gray[700]}`,
+ '&:hover': {
+ backgroundImage: 'none',
+ backgroundColor: gray[700],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: gray[800],
+ },
+ ...theme.applyStyles('dark', {
+ color: 'black',
+ backgroundColor: gray[50],
+ backgroundImage: `linear-gradient(to bottom, ${gray[100]}, ${gray[50]})`,
+ boxShadow:
+ 'inset 0 2px 0 hsl(220, 0%, 100%), inset 0 -2px 0 hsl(220, 30%, 90%)',
+ border: `1px solid ${gray[100]}`,
+ '&:hover': {
+ backgroundImage: 'none',
+ backgroundColor: gray[300],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: gray[400],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'contained',
+ },
+ style: {
+ color: 'white',
+ backgroundColor: brand[300],
+ backgroundImage: `linear-gradient(to bottom, ${alpha(brand[400], 0.8)}, ${brand[500]})`,
+ boxShadow: `inset 0 2px 0 ${alpha(brand[200], 0.2)}, inset 0 -2px 0 ${alpha(brand[700], 0.4)}`,
+ border: `1px solid ${brand[500]}`,
+ '&:hover': {
+ backgroundColor: brand[700],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: brand[700],
+ backgroundImage: 'none',
+ },
+ },
+ },
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ color: theme.palette.text.primary,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundColor: gray[50],
+ '&:hover': {
+ backgroundColor: gray[100],
+ borderColor: gray[300],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ '&:hover': {
+ backgroundColor: gray[900],
+ borderColor: gray[600],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'outlined',
+ },
+ style: {
+ color: brand[700],
+ border: '1px solid',
+ borderColor: brand[200],
+ backgroundColor: brand[50],
+ '&:hover': {
+ backgroundColor: brand[100],
+ borderColor: brand[400],
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[200], 0.7),
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[50],
+ border: '1px solid',
+ borderColor: brand[900],
+ backgroundColor: alpha(brand[900], 0.3),
+ '&:hover': {
+ borderColor: brand[700],
+ backgroundColor: alpha(brand[900], 0.6),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[900], 0.5),
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ variant: 'text',
+ },
+ style: {
+ color: gray[600],
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[700],
+ },
+ '&:active': {
+ backgroundColor: alpha(gray[700], 0.7),
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'text',
+ },
+ style: {
+ color: brand[700],
+ '&:hover': {
+ backgroundColor: alpha(brand[100], 0.5),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[200], 0.7),
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[100],
+ '&:hover': {
+ backgroundColor: alpha(brand[900], 0.5),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[900], 0.3),
+ },
+ }),
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiCard: {
+ styleOverrides: {
+ root: ({ theme }) => {
+ return {
+ padding: 16,
+ transition: 'all 100ms ease',
+ backgroundColor: gray[50],
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${alpha(gray[200], 0.5)}`,
+ boxShadow: 'none',
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ border: `1px solid ${alpha(gray[700], 0.3)}`,
+ }),
+ variants: [
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ border: `1px solid ${gray[200]}`,
+ boxShadow: 'none',
+ background: `linear-gradient(to bottom, hsl(0, 0%, 100%), ${gray[50]})`,
+ },
+ },
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ ...theme.applyStyles('dark', {
+ border: `1px solid ${alpha(gray[700], 0.4)}`,
+ boxShadow: 'none',
+ background: `linear-gradient(to bottom, ${gray[900]}, ${alpha(
+ gray[800],
+ 0.5,
+ )})`,
+ }),
+ },
+ },
+ ],
+ };
+ },
+ },
+ },
+ MuiCheckbox: {
+ defaultProps: {
+ disableRipple: true,
+ icon: (
+
+ ),
+ checkedIcon: ,
+ indeterminateIcon: ,
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ margin: 10,
+ height: 16,
+ width: 16,
+ borderRadius: 5,
+ border: '1px solid ',
+ borderColor: alpha(gray[300], 0.8),
+ boxShadow: '0 0 0 1.5px hsla(210, 0%, 0%, 0.04) inset',
+ backgroundColor: alpha(gray[100], 0.4),
+ transition: 'border-color, background-color, 120ms ease-in',
+ '&:hover': {
+ borderColor: brand[300],
+ },
+ '&.Mui-focusVisible': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ borderColor: brand[400],
+ },
+ '&.Mui-checked': {
+ color: 'white',
+ backgroundColor: brand[500],
+ borderColor: brand[500],
+ boxShadow: `none`,
+ '&:hover': {
+ backgroundColor: brand[600],
+ },
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: alpha(gray[700], 0.5),
+ boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
+ backgroundColor: alpha(gray[900], 0.8),
+ '&:hover': {
+ borderColor: brand[300],
+ },
+ '&.Mui-focusVisible': {
+ borderColor: brand[400],
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ },
+ }),
+ }),
+ },
+ },
+ MuiCardContent: {
+ styleOverrides: {
+ root: {
+ padding: 0,
+ '&:last-child': { paddingBottom: 0 },
+ },
+ },
+ },
+ MuiChip: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ border: '1px solid',
+ borderRadius: '999px',
+ '& .MuiChip-label': {
+ padding: '0 4px',
+ fontWeight: 600,
+ },
+ variants: [
+ {
+ props: {
+ color: 'default',
+ },
+ style: {
+ borderColor: gray[200],
+ backgroundColor: gray[100],
+ '& .MuiChip-label': {
+ color: gray[500],
+ },
+ '& .MuiChip-icon': {
+ color: gray[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: gray[700],
+ backgroundColor: gray[800],
+ '& .MuiChip-label': {
+ color: gray[300],
+ },
+ '& .MuiChip-icon': {
+ color: gray[300],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'success',
+ },
+ style: {
+ borderColor: green[200],
+ backgroundColor: green[50],
+ '& .MuiChip-label': {
+ color: green[500],
+ },
+ '& .MuiChip-icon': {
+ color: green[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: green[800],
+ backgroundColor: green[900],
+ '& .MuiChip-label': {
+ color: green[300],
+ },
+ '& .MuiChip-icon': {
+ color: green[300],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'error',
+ },
+ style: {
+ borderColor: red[100],
+ backgroundColor: red[50],
+ '& .MuiChip-label': {
+ color: red[500],
+ },
+ '& .MuiChip-icon': {
+ color: red[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: red[800],
+ backgroundColor: red[900],
+ '& .MuiChip-label': {
+ color: red[200],
+ },
+ '& .MuiChip-icon': {
+ color: red[300],
+ },
+ }),
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiIconButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxShadow: 'none',
+ borderRadius: theme.shape.borderRadius,
+ textTransform: 'none',
+ fontWeight: theme.typography.fontWeightMedium,
+ letterSpacing: 0,
+ color: theme.palette.text.primary,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundColor: gray[50],
+ '&:hover': {
+ backgroundColor: gray[100],
+ borderColor: gray[300],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ '& .MuiSvgIcon-root': { width: '1.125rem', height: '1.125rem' },
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ '&:hover': {
+ backgroundColor: gray[900],
+ borderColor: gray[600],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ width: '2rem',
+ height: '2rem',
+ padding: '0.25rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ width: '2.5rem',
+ height: '2.5rem',
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiInputBase: {
+ styleOverrides: {
+ root: {
+ border: 'none',
+ },
+ },
+ },
+ MuiLinearProgress: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ height: 8,
+ borderRadius: 8,
+ backgroundColor: gray[200],
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ }),
+ }),
+ },
+ },
+ MuiLink: {
+ defaultProps: {
+ underline: 'none',
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: brand[600],
+ fontWeight: 500,
+ position: 'relative',
+ textDecoration: 'none',
+ '&::before': {
+ content: '""',
+ position: 'absolute',
+ width: 0,
+ height: '1px',
+ bottom: 0,
+ left: 0,
+ backgroundColor: brand[200],
+ opacity: 0.7,
+ transition: 'width 0.3s ease, opacity 0.3s ease',
+ },
+ '&:hover::before': {
+ width: '100%',
+ opacity: 1,
+ },
+ '&:focus-visible': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '4px',
+ borderRadius: '2px',
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[200],
+ }),
+ }),
+ },
+ },
+ MuiList: {
+ styleOverrides: {
+ root: {
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 8,
+ },
+ },
+ },
+ MuiListItem: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: 0,
+ '&.Mui-selected': { borderRadius: theme.shape.borderRadius },
+ }),
+ },
+ },
+ MuiListItemIcon: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ minWidth: 0,
+ marginRight: '8px',
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', { color: theme.palette.grey[100] }),
+ }),
+ },
+ },
+ MuiListItemText: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.grey[700],
+ ...theme.applyStyles('dark', { color: theme.palette.grey[50] }),
+ }),
+ primary: { fontWeight: 600 },
+ },
+ },
+ MuiListItemButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '4px 0',
+ borderRadius: theme.shape.borderRadius,
+ background: 'transparent',
+ }),
+ },
+ },
+ MuiMenu: {
+ styleOverrides: {
+ paper: ({ theme }) => ({
+ marginTop: '4px',
+ padding: '0 8px',
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': {
+ borderRadius: 6,
+ padding: '6px 8px',
+ },
+ '& .MuiMenu-list': {
+ '& .MuiDivider-root': { margin: '0 -8px' },
+ },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ },
+ },
+ MuiOutlinedInput: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.text.primary,
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ transition: 'border 120ms ease-in',
+ '&:hover': {
+ borderColor: gray[400],
+ },
+ '&.Mui-focused': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ borderColor: brand[400],
+ },
+ ...theme.applyStyles('dark', {
+ '&:hover': {
+ borderColor: gray[500],
+ },
+ }),
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ height: '2rem',
+ padding: '0 0.5rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ height: '2.5rem',
+ },
+ },
+ ],
+ }),
+ notchedOutline: {
+ border: 'none',
+ },
+ },
+ },
+ MuiPaper: {
+ defaultProps: {
+ elevation: 0,
+ },
+ },
+ MuiToggleButtonGroup: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ borderRadius: '10px',
+ boxShadow: `0 4px 16px ${alpha(gray[400], 0.2)}`,
+ '& .Mui-selected': {
+ color: brand[500],
+ },
+ ...theme.applyStyles('dark', {
+ '& .Mui-selected': {
+ color: '#fff',
+ },
+ boxShadow: `0 4px 16px ${alpha(brand[700], 0.5)}`,
+ }),
+ }),
+ },
+ },
+ MuiToggleButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '12px 16px',
+ textTransform: 'none',
+ borderRadius: '10px',
+ fontWeight: 500,
+ ...theme.applyStyles('dark', {
+ color: gray[400],
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.5)',
+ '&.Mui-selected': { color: brand[300] },
+ }),
+ }),
+ },
+ },
+ MuiTabs: {
+ styleOverrides: {
+ root: { minHeight: 'fit-content' },
+ indicator: ({ theme }) => ({
+ backgroundColor: theme.palette.grey[800],
+ ...theme.applyStyles('dark', {
+ backgroundColor: theme.palette.grey[200],
+ }),
+ }),
+ },
+ },
+ MuiTab: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '6px 8px',
+ marginBottom: '8px',
+ textTransform: 'none',
+ minWidth: 'fit-content',
+ minHeight: 'fit-content',
+ color: theme.palette.text.secondary,
+ borderRadius: theme.shape.borderRadius,
+ border: '1px solid',
+ borderColor: 'transparent',
+ ':hover': {
+ color: theme.palette.text.primary,
+ backgroundColor: gray[100],
+ borderColor: gray[200],
+ },
+ '&.Mui-selected': {
+ color: gray[900],
+ },
+ ...theme.applyStyles('dark', {
+ ':hover': {
+ color: theme.palette.text.primary,
+ backgroundColor: gray[800],
+ borderColor: gray[700],
+ },
+ '&.Mui-selected': {
+ color: '#fff',
+ },
+ }),
+ }),
+ },
+ },
+ MuiInputAdornment: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[400],
+ }),
+ }),
+ },
+ },
+ MuiPickersPopper: {
+ styleOverrides: {
+ paper: ({ theme }) => ({
+ marginTop: 4,
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': { borderRadius: 6, margin: '0 6px' },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ },
+ },
+ MuiPickersArrowSwitcher: {
+ styleOverrides: {
+ button: ({ theme }) => ({
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[400],
+ }),
+ }),
+ },
+ },
+ MuiPickersCalendarHeader: {
+ styleOverrides: {
+ switchViewButton: {
+ padding: 0,
+ border: 'none',
+ },
+ },
+ },
+ MuiPickersMonth: {
+ styleOverrides: {
+ monthButton: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiPickersYear: {
+ styleOverrides: {
+ yearButton: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ height: 'fit-content',
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiPickersDay: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiChartsAxis: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ '& .MuiChartsAxis-line': {
+ stroke: gray[300],
+ },
+ '& .MuiChartsAxis-tick': {
+ stroke: gray[300],
+ },
+ '& .MuiChartsAxis-tickLabel': {
+ fill: gray[400],
+ fontWeight: 500,
+ },
+ ...theme.applyStyles('dark', {
+ '& .MuiChartsAxis-line': {
+ stroke: gray[700],
+ },
+ '& .MuiChartsAxis-tick': {
+ stroke: gray[700],
+ },
+ '& .MuiChartsAxis-tickLabel': {
+ fill: gray[400],
+ fontWeight: 500,
+ },
+ }),
+ }),
+ },
+ },
+ MuiChartsLegend: {
+ styleOverrides: {
+ root: {
+ '& .MuiChartsLegend-mark': {
+ ry: 6,
+ },
+ },
+ },
+ },
+ MuiChartsGrid: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ '& .MuiChartsGrid-line': {
+ stroke: gray[200],
+ strokeDasharray: '4 2',
+ strokeWidth: 0.8,
+ },
+ ...theme.applyStyles('dark', {
+ '& .MuiChartsGrid-line': {
+ stroke: gray[700],
+ strokeDasharray: '4 2',
+ strokeWidth: 0.8,
+ },
+ }),
+ }),
+ },
+ },
+ MuiTreeItem2: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ position: 'relative',
+ boxSizing: 'border-box',
+ padding: theme.spacing(0, 1),
+ '& .groupTransition': {
+ marginLeft: theme.spacing(2),
+ padding: theme.spacing(0),
+ borderLeft: '1px solid',
+ borderColor: theme.palette.divider,
+ },
+ }),
+ content: ({ theme }) => ({
+ marginTop: theme.spacing(1),
+ padding: theme.spacing(0.5, 1),
+ overflow: 'clip',
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.2),
+ },
+ '&.focused': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.2),
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ },
+ },
+ '&.selected': {
+ backgroundColor: alpha(gray[300], 0.4),
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.6),
+ },
+ },
+ ...theme.applyStyles('dark', {
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.2),
+ },
+ '&:focus-visible': {
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.2),
+ },
+ },
+ '&.selected': {
+ backgroundColor: alpha(gray[500], 0.4),
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.6),
+ },
+ },
+ }),
+ }),
+ },
+ },
+ MuiTablePagination: {
+ styleOverrides: {
+ actions: {
+ display: 'flex',
+ gap: 8,
+ marginRight: 6,
+ '& .MuiIconButton-root': { minWidth: 0, width: 36, height: 36 },
+ },
+ },
+ },
+ MuiDataGrid: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ borderColor: theme.palette.divider,
+ }),
+ cell: ({ theme }) => ({ borderTopColor: theme.palette.divider }),
+ menu: ({ theme }) => ({
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': {
+ borderRadius: theme.shape.borderRadius,
+ margin: '0 6px',
+ },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ row: ({ theme }) => ({
+ // borderBottom: `1px solid ${theme.palette.divider}`,
+ '&:last-of-type': { borderBottom: `1px solid ${theme.palette.divider}` },
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[100],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ '&.even': {
+ background: alpha(theme.palette.grey[200], 0.3),
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[100],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ },
+ ...theme.applyStyles('dark', {
+ backgroundColor: theme.palette.grey[900],
+ '&.Mui-selected': {
+ background: theme.palette.grey[800],
+ },
+ '&.even': {
+ background: alpha(theme.palette.grey[800], 0.4),
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[800],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ },
+ }),
+ }),
+ iconButtonContainer: ({ theme }) => ({
+ '& .MuiIconButton-root': {
+ border: 'none',
+ backgroundColor: 'transparent',
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[800],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ },
+ }),
+ menuIconButton: ({ theme }) => ({
+ border: 'none',
+ backgroundColor: 'transparent',
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[800],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ }),
+ columnHeaderTitleContainer: {
+ flexGrow: 1,
+ justifyContent: 'space-between',
+ },
+ columnHeaderDraggableContainer: { paddingRight: 2 },
+ },
+ },
+ },
+ };
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.tsx b/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.tsx
new file mode 100644
index 00000000000000..b8922dd62fcb9b
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/getDashboardTheme.tsx
@@ -0,0 +1,1121 @@
+import * as React from 'react';
+import type {} from '@mui/material/themeCssVarsAugmentation';
+import { ThemeOptions, alpha, Theme } from '@mui/material/styles';
+import { PaletteMode } from '@mui/material';
+import type {} from '@mui/x-date-pickers/themeAugmentation';
+import type {} from '@mui/x-charts/themeAugmentation';
+import type {} from '@mui/x-data-grid/themeAugmentation';
+import type {} from '@mui/x-tree-view/themeAugmentation';
+import CheckBoxOutlineBlankRoundedIcon from '@mui/icons-material/CheckBoxOutlineBlankRounded';
+import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
+import RemoveRoundedIcon from '@mui/icons-material/RemoveRounded';
+import { brand, getDesignTokens, gray, green, red } from './themePrimitives';
+
+export default function getDashboardTheme(mode: PaletteMode): ThemeOptions {
+ return {
+ ...getDesignTokens(mode),
+ components: {
+ MuiButtonBase: {
+ defaultProps: {
+ disableTouchRipple: true,
+ disableRipple: true,
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxSizing: 'border-box',
+ transition: 'all 100ms ease-in',
+ '&:focus-visible': {
+ outline: `3px solid ${alpha(theme.palette.primary.main, 0.5)}`,
+ outlineOffset: '2px',
+ },
+ }),
+ },
+ },
+ MuiButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxShadow: 'none',
+ borderRadius: theme.shape.borderRadius,
+ textTransform: 'none',
+ '& .MuiSvgIcon-root': { width: '1.125rem', height: '1.125rem' },
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ height: '2rem', // 32px
+ padding: '0 0.5rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ height: '2.5rem', // 40px
+ },
+ },
+ {
+ props: {
+ color: 'primary',
+ variant: 'contained',
+ },
+ style: {
+ color: 'white',
+ backgroundColor: gray[900],
+ backgroundImage: `linear-gradient(to bottom, ${gray[700]}, ${gray[800]})`,
+ boxShadow: `inset 0 2px 0 ${gray[600]}, inset 0 -2px 0 hsl(220, 0%, 0%)`,
+ border: `1px solid ${gray[700]}`,
+ '&:hover': {
+ backgroundImage: 'none',
+ backgroundColor: gray[700],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: gray[800],
+ },
+ ...theme.applyStyles('dark', {
+ color: 'black',
+ backgroundColor: gray[50],
+ backgroundImage: `linear-gradient(to bottom, ${gray[100]}, ${gray[50]})`,
+ boxShadow:
+ 'inset 0 2px 0 hsl(220, 0%, 100%), inset 0 -2px 0 hsl(220, 30%, 90%)',
+ border: `1px solid ${gray[100]}`,
+ '&:hover': {
+ backgroundImage: 'none',
+ backgroundColor: gray[300],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: gray[400],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'contained',
+ },
+ style: {
+ color: 'white',
+ backgroundColor: brand[300],
+ backgroundImage: `linear-gradient(to bottom, ${alpha(brand[400], 0.8)}, ${brand[500]})`,
+ boxShadow: `inset 0 2px 0 ${alpha(brand[200], 0.2)}, inset 0 -2px 0 ${alpha(brand[700], 0.4)}`,
+ border: `1px solid ${brand[500]}`,
+ '&:hover': {
+ backgroundColor: brand[700],
+ boxShadow: 'none',
+ },
+ '&:active': {
+ backgroundColor: brand[700],
+ backgroundImage: 'none',
+ },
+ },
+ },
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ color: theme.palette.text.primary,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundColor: gray[50],
+ '&:hover': {
+ backgroundColor: gray[100],
+ borderColor: gray[300],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ '&:hover': {
+ backgroundColor: gray[900],
+ borderColor: gray[600],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'outlined',
+ },
+ style: {
+ color: brand[700],
+ border: '1px solid',
+ borderColor: brand[200],
+ backgroundColor: brand[50],
+ '&:hover': {
+ backgroundColor: brand[100],
+ borderColor: brand[400],
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[200], 0.7),
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[50],
+ border: '1px solid',
+ borderColor: brand[900],
+ backgroundColor: alpha(brand[900], 0.3),
+ '&:hover': {
+ borderColor: brand[700],
+ backgroundColor: alpha(brand[900], 0.6),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[900], 0.5),
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ variant: 'text',
+ },
+ style: {
+ color: gray[600],
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[700],
+ },
+ '&:active': {
+ backgroundColor: alpha(gray[700], 0.7),
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'secondary',
+ variant: 'text',
+ },
+ style: {
+ color: brand[700],
+ '&:hover': {
+ backgroundColor: alpha(brand[100], 0.5),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[200], 0.7),
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[100],
+ '&:hover': {
+ backgroundColor: alpha(brand[900], 0.5),
+ },
+ '&:active': {
+ backgroundColor: alpha(brand[900], 0.3),
+ },
+ }),
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiCard: {
+ styleOverrides: {
+ root: ({ theme }) => {
+ return {
+ padding: 16,
+ transition: 'all 100ms ease',
+ backgroundColor: gray[50],
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${alpha(gray[200], 0.5)}`,
+ boxShadow: 'none',
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ border: `1px solid ${alpha(gray[700], 0.3)}`,
+ }),
+ variants: [
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ border: `1px solid ${gray[200]}`,
+ boxShadow: 'none',
+ background: `linear-gradient(to bottom, hsl(0, 0%, 100%), ${gray[50]})`,
+ },
+ },
+ {
+ props: {
+ variant: 'outlined',
+ },
+ style: {
+ ...theme.applyStyles('dark', {
+ border: `1px solid ${alpha(gray[700], 0.4)}`,
+ boxShadow: 'none',
+ background: `linear-gradient(to bottom, ${gray[900]}, ${alpha(
+ gray[800],
+ 0.5,
+ )})`,
+ }),
+ },
+ },
+ ],
+ };
+ },
+ },
+ },
+ MuiCheckbox: {
+ defaultProps: {
+ disableRipple: true,
+ icon: (
+
+ ),
+ checkedIcon: ,
+ indeterminateIcon: ,
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ margin: 10,
+ height: 16,
+ width: 16,
+ borderRadius: 5,
+ border: '1px solid ',
+ borderColor: alpha(gray[300], 0.8),
+ boxShadow: '0 0 0 1.5px hsla(210, 0%, 0%, 0.04) inset',
+ backgroundColor: alpha(gray[100], 0.4),
+ transition: 'border-color, background-color, 120ms ease-in',
+ '&:hover': {
+ borderColor: brand[300],
+ },
+ '&.Mui-focusVisible': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ borderColor: brand[400],
+ },
+ '&.Mui-checked': {
+ color: 'white',
+ backgroundColor: brand[500],
+ borderColor: brand[500],
+ boxShadow: `none`,
+ '&:hover': {
+ backgroundColor: brand[600],
+ },
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: alpha(gray[700], 0.5),
+ boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
+ backgroundColor: alpha(gray[900], 0.8),
+ '&:hover': {
+ borderColor: brand[300],
+ },
+ '&.Mui-focusVisible': {
+ borderColor: brand[400],
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ },
+ }),
+ }),
+ },
+ },
+ MuiCardContent: {
+ styleOverrides: {
+ root: {
+ padding: 0,
+ '&:last-child': { paddingBottom: 0 },
+ },
+ },
+ },
+ MuiChip: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ border: '1px solid',
+ borderRadius: '999px',
+ '& .MuiChip-label': {
+ padding: '0 4px',
+ fontWeight: 600,
+ },
+ variants: [
+ {
+ props: {
+ color: 'default',
+ },
+ style: {
+ borderColor: gray[200],
+ backgroundColor: gray[100],
+ '& .MuiChip-label': {
+ color: gray[500],
+ },
+ '& .MuiChip-icon': {
+ color: gray[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: gray[700],
+ backgroundColor: gray[800],
+ '& .MuiChip-label': {
+ color: gray[300],
+ },
+ '& .MuiChip-icon': {
+ color: gray[300],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'success',
+ },
+ style: {
+ borderColor: green[200],
+ backgroundColor: green[50],
+ '& .MuiChip-label': {
+ color: green[500],
+ },
+ '& .MuiChip-icon': {
+ color: green[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: green[800],
+ backgroundColor: green[900],
+ '& .MuiChip-label': {
+ color: green[300],
+ },
+ '& .MuiChip-icon': {
+ color: green[300],
+ },
+ }),
+ },
+ },
+ {
+ props: {
+ color: 'error',
+ },
+ style: {
+ borderColor: red[100],
+ backgroundColor: red[50],
+ '& .MuiChip-label': {
+ color: red[500],
+ },
+ '& .MuiChip-icon': {
+ color: red[500],
+ },
+ ...theme.applyStyles('dark', {
+ borderColor: red[800],
+ backgroundColor: red[900],
+ '& .MuiChip-label': {
+ color: red[200],
+ },
+ '& .MuiChip-icon': {
+ color: red[300],
+ },
+ }),
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiIconButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ boxShadow: 'none',
+ borderRadius: theme.shape.borderRadius,
+ textTransform: 'none',
+ fontWeight: theme.typography.fontWeightMedium,
+ letterSpacing: 0,
+ color: theme.palette.text.primary,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundColor: gray[50],
+ '&:hover': {
+ backgroundColor: gray[100],
+ borderColor: gray[300],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ '& .MuiSvgIcon-root': { width: '1.125rem', height: '1.125rem' },
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ '&:hover': {
+ backgroundColor: gray[900],
+ borderColor: gray[600],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ width: '2rem',
+ height: '2rem',
+ padding: '0.25rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ width: '2.5rem',
+ height: '2.5rem',
+ },
+ },
+ ],
+ }),
+ },
+ },
+ MuiInputBase: {
+ styleOverrides: {
+ root: {
+ border: 'none',
+ },
+ },
+ },
+ MuiLinearProgress: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ height: 8,
+ borderRadius: 8,
+ backgroundColor: gray[200],
+ ...theme.applyStyles('dark', {
+ backgroundColor: gray[800],
+ }),
+ }),
+ },
+ },
+ MuiLink: {
+ defaultProps: {
+ underline: 'none',
+ },
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: brand[600],
+ fontWeight: 500,
+ position: 'relative',
+ textDecoration: 'none',
+ '&::before': {
+ content: '""',
+ position: 'absolute',
+ width: 0,
+ height: '1px',
+ bottom: 0,
+ left: 0,
+ backgroundColor: brand[200],
+ opacity: 0.7,
+ transition: 'width 0.3s ease, opacity 0.3s ease',
+ },
+ '&:hover::before': {
+ width: '100%',
+ opacity: 1,
+ },
+ '&:focus-visible': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '4px',
+ borderRadius: '2px',
+ },
+ ...theme.applyStyles('dark', {
+ color: brand[200],
+ }),
+ }),
+ },
+ },
+ MuiList: {
+ styleOverrides: {
+ root: {
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 8,
+ },
+ },
+ },
+ MuiListItem: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: 0,
+ '&.Mui-selected': { borderRadius: theme.shape.borderRadius },
+ }),
+ },
+ },
+ MuiListItemIcon: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ minWidth: 0,
+ marginRight: '8px',
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', { color: theme.palette.grey[100] }),
+ }),
+ },
+ },
+ MuiListItemText: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.grey[700],
+ ...theme.applyStyles('dark', { color: theme.palette.grey[50] }),
+ }),
+ primary: { fontWeight: 600 },
+ },
+ },
+ MuiListItemButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '4px 0',
+ borderRadius: theme.shape.borderRadius,
+ background: 'transparent',
+ }),
+ },
+ },
+ MuiMenu: {
+ styleOverrides: {
+ paper: ({ theme }) => ({
+ marginTop: '4px',
+ padding: '0 8px',
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': {
+ borderRadius: 6,
+ padding: '6px 8px',
+ },
+ '& .MuiMenu-list': {
+ '& .MuiDivider-root': { margin: '0 -8px' },
+ },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ },
+ },
+ MuiOutlinedInput: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.text.primary,
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ transition: 'border 120ms ease-in',
+ '&:hover': {
+ borderColor: gray[400],
+ },
+ '&.Mui-focused': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ borderColor: brand[400],
+ },
+ ...theme.applyStyles('dark', {
+ '&:hover': {
+ borderColor: gray[500],
+ },
+ }),
+ variants: [
+ {
+ props: {
+ size: 'small',
+ },
+ style: {
+ height: '2rem',
+ padding: '0 0.5rem',
+ },
+ },
+ {
+ props: {
+ size: 'medium',
+ },
+ style: {
+ height: '2.5rem',
+ },
+ },
+ ],
+ }),
+ notchedOutline: {
+ border: 'none',
+ },
+ },
+ },
+ MuiPaper: {
+ defaultProps: {
+ elevation: 0,
+ },
+ },
+ MuiToggleButtonGroup: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ borderRadius: '10px',
+ boxShadow: `0 4px 16px ${alpha(gray[400], 0.2)}`,
+ '& .Mui-selected': {
+ color: brand[500],
+ },
+ ...theme.applyStyles('dark', {
+ '& .Mui-selected': {
+ color: '#fff',
+ },
+ boxShadow: `0 4px 16px ${alpha(brand[700], 0.5)}`,
+ }),
+ }),
+ },
+ },
+ MuiToggleButton: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '12px 16px',
+ textTransform: 'none',
+ borderRadius: '10px',
+ fontWeight: 500,
+ ...theme.applyStyles('dark', {
+ color: gray[400],
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.5)',
+ '&.Mui-selected': { color: brand[300] },
+ }),
+ }),
+ },
+ },
+ MuiTabs: {
+ styleOverrides: {
+ root: { minHeight: 'fit-content' },
+ indicator: ({ theme }) => ({
+ backgroundColor: theme.palette.grey[800],
+ ...theme.applyStyles('dark', {
+ backgroundColor: theme.palette.grey[200],
+ }),
+ }),
+ },
+ },
+ MuiTab: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ padding: '6px 8px',
+ marginBottom: '8px',
+ textTransform: 'none',
+ minWidth: 'fit-content',
+ minHeight: 'fit-content',
+ color: theme.palette.text.secondary,
+ borderRadius: theme.shape.borderRadius,
+ border: '1px solid',
+ borderColor: 'transparent',
+ ':hover': {
+ color: theme.palette.text.primary,
+ backgroundColor: gray[100],
+ borderColor: gray[200],
+ },
+ '&.Mui-selected': {
+ color: gray[900],
+ },
+ ...theme.applyStyles('dark', {
+ ':hover': {
+ color: theme.palette.text.primary,
+ backgroundColor: gray[800],
+ borderColor: gray[700],
+ },
+ '&.Mui-selected': {
+ color: '#fff',
+ },
+ }),
+ }),
+ },
+ },
+ MuiInputAdornment: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[400],
+ }),
+ }),
+ },
+ },
+ MuiPickersPopper: {
+ styleOverrides: {
+ paper: ({ theme }) => ({
+ marginTop: 4,
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': { borderRadius: 6, margin: '0 6px' },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ },
+ },
+ MuiPickersArrowSwitcher: {
+ styleOverrides: {
+ button: ({ theme }) => ({
+ color: theme.palette.grey[500],
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[400],
+ }),
+ }),
+ },
+ },
+ MuiPickersCalendarHeader: {
+ styleOverrides: {
+ switchViewButton: {
+ padding: 0,
+ border: 'none',
+ },
+ },
+ },
+ MuiPickersMonth: {
+ styleOverrides: {
+ monthButton: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiPickersYear: {
+ styleOverrides: {
+ yearButton: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ height: 'fit-content',
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiPickersDay: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ fontSize: theme.typography.body1.fontSize,
+ color: theme.palette.grey[600],
+ padding: theme.spacing(0.5),
+ borderRadius: theme.shape.borderRadius,
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ backgroundColor: gray[700],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[700] },
+ },
+ ...theme.applyStyles('dark', {
+ color: theme.palette.grey[500],
+ '&:hover': {
+ backgroundColor: theme.palette.action.hover,
+ },
+ '&.Mui-selected': {
+ color: theme.palette.common.black,
+ backgroundColor: gray[300],
+ },
+ '&:focus': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ backgroundColor: 'transparent',
+ '&.Mui-selected': { backgroundColor: gray[300] },
+ },
+ }),
+ }),
+ },
+ },
+ MuiChartsAxis: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ '& .MuiChartsAxis-line': {
+ stroke: gray[300],
+ },
+ '& .MuiChartsAxis-tick': {
+ stroke: gray[300],
+ },
+ '& .MuiChartsAxis-tickLabel': {
+ fill: gray[400],
+ fontWeight: 500,
+ },
+ ...(theme as Omit).applyStyles('dark', {
+ '& .MuiChartsAxis-line': {
+ stroke: gray[700],
+ },
+ '& .MuiChartsAxis-tick': {
+ stroke: gray[700],
+ },
+ '& .MuiChartsAxis-tickLabel': {
+ fill: gray[400],
+ fontWeight: 500,
+ },
+ }),
+ }),
+ },
+ },
+ MuiChartsLegend: {
+ styleOverrides: {
+ root: {
+ '& .MuiChartsLegend-mark': {
+ ry: 6,
+ },
+ },
+ },
+ },
+ MuiChartsGrid: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ '& .MuiChartsGrid-line': {
+ stroke: gray[200],
+ strokeDasharray: '4 2',
+ strokeWidth: 0.8,
+ },
+ ...(theme as Omit).applyStyles('dark', {
+ '& .MuiChartsGrid-line': {
+ stroke: gray[700],
+ strokeDasharray: '4 2',
+ strokeWidth: 0.8,
+ },
+ }),
+ }),
+ },
+ },
+ MuiTreeItem2: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ position: 'relative',
+ boxSizing: 'border-box',
+ padding: theme.spacing(0, 1),
+ '& .groupTransition': {
+ marginLeft: theme.spacing(2),
+ padding: theme.spacing(0),
+ borderLeft: '1px solid',
+ borderColor: theme.palette.divider,
+ },
+ }),
+ content: ({ theme }) => ({
+ marginTop: theme.spacing(1),
+ padding: theme.spacing(0.5, 1),
+ overflow: 'clip',
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.2),
+ },
+ '&.focused': {
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.2),
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
+ outlineOffset: '2px',
+ },
+ },
+ '&.selected': {
+ backgroundColor: alpha(gray[300], 0.4),
+ '&:hover': {
+ backgroundColor: alpha(gray[300], 0.6),
+ },
+ },
+ ...theme.applyStyles('dark', {
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.2),
+ },
+ '&:focus-visible': {
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.2),
+ },
+ },
+ '&.selected': {
+ backgroundColor: alpha(gray[500], 0.4),
+ '&:hover': {
+ backgroundColor: alpha(gray[500], 0.6),
+ },
+ },
+ }),
+ }),
+ },
+ },
+ MuiTablePagination: {
+ styleOverrides: {
+ actions: {
+ display: 'flex',
+ gap: 8,
+ marginRight: 6,
+ '& .MuiIconButton-root': { minWidth: 0, width: 36, height: 36 },
+ },
+ },
+ },
+ MuiDataGrid: {
+ styleOverrides: {
+ root: ({ theme }) => ({
+ borderColor: theme.palette.divider,
+ }),
+
+ cell: ({ theme }) => ({ borderTopColor: theme.palette.divider }),
+ menu: ({ theme }) => ({
+ borderRadius: theme.shape.borderRadius,
+ border: `1px solid ${theme.palette.divider}`,
+ backgroundImage: 'none',
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px',
+ '& .MuiMenuItem-root': {
+ borderRadius: theme.shape.borderRadius,
+ margin: '0 6px',
+ },
+ ...theme.applyStyles('dark', {
+ boxShadow:
+ 'hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px',
+ }),
+ }),
+ row: ({ theme }) => ({
+ // borderBottom: `1px solid ${theme.palette.divider}`,
+ '&:last-of-type': { borderBottom: `1px solid ${theme.palette.divider}` },
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[100],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ '&.even': {
+ background: alpha(theme.palette.grey[200], 0.3),
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[100],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ },
+ ...theme.applyStyles('dark', {
+ backgroundColor: theme.palette.grey[900],
+ '&.Mui-selected': {
+ background: theme.palette.grey[800],
+ },
+ '&.even': {
+ background: alpha(theme.palette.grey[800], 0.4),
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.1),
+ },
+ '&.Mui-selected': {
+ background: theme.palette.grey[800],
+ '&:hover': {
+ background: alpha(theme.palette.primary.main, 0.2),
+ },
+ },
+ },
+ }),
+ }),
+ iconButtonContainer: ({ theme }) => ({
+ '& .MuiIconButton-root': {
+ border: 'none',
+ backgroundColor: 'transparent',
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[800],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ },
+ }),
+ menuIconButton: ({ theme }) => ({
+ border: 'none',
+ backgroundColor: 'transparent',
+ '&:hover': {
+ backgroundColor: gray[100],
+ },
+ '&:active': {
+ backgroundColor: gray[200],
+ },
+ ...theme.applyStyles('dark', {
+ color: gray[50],
+ '&:hover': {
+ backgroundColor: gray[800],
+ },
+ '&:active': {
+ backgroundColor: gray[900],
+ },
+ }),
+ }),
+
+ columnHeaderTitleContainer: {
+ flexGrow: 1,
+ justifyContent: 'space-between',
+ },
+ columnHeaderDraggableContainer: { paddingRight: 2 },
+ },
+ },
+ },
+ };
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.js b/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.js
new file mode 100644
index 00000000000000..c4310abda3e321
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.js
@@ -0,0 +1,16 @@
+import * as React from 'react';
+import Link from '@mui/material/Link';
+import Typography from '@mui/material/Typography';
+
+export default function Copyright(props) {
+ return (
+
+ {'Copyright Š '}
+
+ Sitemark
+ {' '}
+ {new Date().getFullYear()}
+ {'.'}
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.tsx b/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.tsx
new file mode 100644
index 00000000000000..52f72c48f2c05d
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/Copyright.tsx
@@ -0,0 +1,16 @@
+import * as React from 'react';
+import Link from '@mui/material/Link';
+import Typography from '@mui/material/Typography';
+
+export default function Copyright(props: any) {
+ return (
+
+ {'Copyright Š '}
+
+ Sitemark
+ {' '}
+ {new Date().getFullYear()}
+ {'.'}
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.js b/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.js
new file mode 100644
index 00000000000000..8cc34623cfa8b6
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.js
@@ -0,0 +1,326 @@
+import * as React from 'react';
+import SvgIcon from '@mui/material/SvgIcon';
+
+export function SitemarkIcon() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function IndiaFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function UsaFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+export function BrazilFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function GlobeFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.tsx b/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.tsx
new file mode 100644
index 00000000000000..8cc34623cfa8b6
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/CustomIcons.tsx
@@ -0,0 +1,326 @@
+import * as React from 'react';
+import SvgIcon from '@mui/material/SvgIcon';
+
+export function SitemarkIcon() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function IndiaFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function UsaFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+export function BrazilFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function GlobeFlag() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.js b/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.js
new file mode 100644
index 00000000000000..21a8f10f6e75b1
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.js
@@ -0,0 +1,50 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import Box from '@mui/material/Box';
+import ToggleButton from '@mui/material/ToggleButton';
+import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
+import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded';
+
+function ToggleCustomTheme({ showCustomTheme, toggleCustomTheme }) {
+ return (
+
+
+
+
+ Custom theme
+
+ Material Design 2
+
+
+ );
+}
+
+ToggleCustomTheme.propTypes = {
+ showCustomTheme: PropTypes.shape({
+ valueOf: PropTypes.func.isRequired,
+ }).isRequired,
+ toggleCustomTheme: PropTypes.func.isRequired,
+};
+
+export default ToggleCustomTheme;
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.tsx b/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.tsx
new file mode 100644
index 00000000000000..58df9e79a64226
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/components/ToggleCustomTheme.tsx
@@ -0,0 +1,48 @@
+import * as React from 'react';
+import Box from '@mui/material/Box';
+import ToggleButton from '@mui/material/ToggleButton';
+import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
+import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded';
+
+interface ToggleCustomThemeProps {
+ showCustomTheme: Boolean;
+ toggleCustomTheme: () => void;
+}
+
+export default function ToggleCustomTheme({
+ showCustomTheme,
+ toggleCustomTheme,
+}: ToggleCustomThemeProps) {
+ return (
+
+
+
+
+ Custom theme
+
+ Material Design 2
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.js b/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.js
new file mode 100644
index 00000000000000..a24b8589635fe2
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.js
@@ -0,0 +1,145 @@
+import * as React from 'react';
+import Avatar from '@mui/material/Avatar';
+import Chip from '@mui/material/Chip';
+
+export function renderStatus(params) {
+ const colors = {
+ new: 'info',
+ verified: 'success',
+ blocked: 'error',
+ uncertain: 'default',
+ };
+
+ return (
+
+ );
+}
+export function renderAvatar(params) {
+ if (params.value == null) {
+ return '';
+ }
+
+ return (
+
+ {params.value.name.toUpperCase().substring(0, 1)}
+
+ );
+}
+
+export const columns = [
+ { field: 'id', headerName: 'ID', width: 90 },
+ { field: 'pageTitle', headerName: 'Page Title', width: 200 },
+ { field: 'eventCount', headerName: 'Event Count', width: 130 },
+ { field: 'users', headerName: 'Users', width: 100 },
+ {
+ field: 'viewsPerUser',
+ headerName: 'Views per User',
+ width: 130,
+ },
+ { field: 'averageTime', headerName: 'Average Time', width: 130 },
+ { field: 'conversions', headerName: 'Conversions', width: 120 },
+];
+
+export const rows = [
+ {
+ id: 1,
+ pageTitle: 'Homepage Overview',
+ eventCount: 6345,
+ users: 192423,
+ viewsPerUser: 19.2,
+ averageTime: '2m 23s',
+ conversions: 400,
+ },
+ {
+ id: 2,
+ pageTitle: 'Product Details - Gadgets',
+ eventCount: 4653,
+ users: 152240,
+ viewsPerUser: 10.2,
+ averageTime: '2m 23s',
+ conversions: 321,
+ },
+ {
+ id: 3,
+ pageTitle: 'Checkout Process - Step 1',
+ eventCount: 2455,
+ users: 61240,
+ viewsPerUser: 16.4,
+ averageTime: '2m 23s',
+ conversions: 120,
+ },
+ {
+ id: 4,
+ pageTitle: 'User Profile Dashboard',
+ eventCount: 123543,
+ users: 102240,
+ viewsPerUser: 3.74,
+ averageTime: '2m 23s',
+ conversions: 40,
+ },
+ {
+ id: 5,
+ pageTitle: 'Article Listing - Tech News',
+ eventCount: 4653,
+ users: 132240,
+ viewsPerUser: 2.24,
+ averageTime: '2m 23s',
+ conversions: 49,
+ },
+ {
+ id: 6,
+ pageTitle: 'FAQs - Customer Support',
+ eventCount: 123543,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+ {
+ id: 7,
+ pageTitle: 'About Us - Company Info',
+ eventCount: 4653,
+ users: 19240,
+ viewsPerUser: 1.02,
+ averageTime: '2m 23s',
+ conversions: 2,
+ },
+ {
+ id: 8,
+ pageTitle: 'Contact Form Page',
+ eventCount: 123543,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+ {
+ id: 9,
+ pageTitle: 'Services Overview - Web Development',
+ eventCount: 6345,
+ users: 19240,
+ viewsPerUser: 1.02,
+ averageTime: '2m 23s',
+ conversions: 2,
+ },
+ {
+ id: 10,
+ pageTitle: 'Pricing Page - Subscription Plans',
+ eventCount: 2455,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+];
diff --git a/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.tsx b/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.tsx
new file mode 100644
index 00000000000000..62552af61e0f60
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/internals/data/gridData.tsx
@@ -0,0 +1,154 @@
+import * as React from 'react';
+import Avatar from '@mui/material/Avatar';
+import Chip from '@mui/material/Chip';
+import { GridCellParams, GridRowsProp, GridColDef } from '@mui/x-data-grid';
+
+export function renderStatus(
+ params: GridCellParams<
+ { status: 'verified' | 'new' | 'blocked' | 'uncertain' },
+ any,
+ any
+ >,
+) {
+ const colors: { [index: string]: 'error' | 'success' | 'info' | 'default' } = {
+ new: 'info',
+ verified: 'success',
+ blocked: 'error',
+ uncertain: 'default',
+ };
+
+ return (
+
+ );
+}
+export function renderAvatar(
+ params: GridCellParams<{ name: string; color: string }, any, any>,
+) {
+ if (params.value == null) {
+ return '';
+ }
+
+ return (
+
+ {params.value.name.toUpperCase().substring(0, 1)}
+
+ );
+}
+
+export const columns: GridColDef[] = [
+ { field: 'id', headerName: 'ID', width: 90 },
+ { field: 'pageTitle', headerName: 'Page Title', width: 200 },
+ { field: 'eventCount', headerName: 'Event Count', width: 130 },
+ { field: 'users', headerName: 'Users', width: 100 },
+ {
+ field: 'viewsPerUser',
+ headerName: 'Views per User',
+ width: 130,
+ },
+ { field: 'averageTime', headerName: 'Average Time', width: 130 },
+ { field: 'conversions', headerName: 'Conversions', width: 120 },
+];
+
+export const rows: GridRowsProp = [
+ {
+ id: 1,
+ pageTitle: 'Homepage Overview',
+ eventCount: 6345,
+ users: 192423,
+ viewsPerUser: 19.2,
+ averageTime: '2m 23s',
+ conversions: 400,
+ },
+ {
+ id: 2,
+ pageTitle: 'Product Details - Gadgets',
+ eventCount: 4653,
+ users: 152240,
+ viewsPerUser: 10.2,
+ averageTime: '2m 23s',
+ conversions: 321,
+ },
+ {
+ id: 3,
+ pageTitle: 'Checkout Process - Step 1',
+ eventCount: 2455,
+ users: 61240,
+ viewsPerUser: 16.4,
+ averageTime: '2m 23s',
+ conversions: 120,
+ },
+ {
+ id: 4,
+ pageTitle: 'User Profile Dashboard',
+ eventCount: 123543,
+ users: 102240,
+ viewsPerUser: 3.74,
+ averageTime: '2m 23s',
+ conversions: 40,
+ },
+ {
+ id: 5,
+ pageTitle: 'Article Listing - Tech News',
+ eventCount: 4653,
+ users: 132240,
+ viewsPerUser: 2.24,
+ averageTime: '2m 23s',
+ conversions: 49,
+ },
+ {
+ id: 6,
+ pageTitle: 'FAQs - Customer Support',
+ eventCount: 123543,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+ {
+ id: 7,
+ pageTitle: 'About Us - Company Info',
+ eventCount: 4653,
+ users: 19240,
+ viewsPerUser: 1.02,
+ averageTime: '2m 23s',
+ conversions: 2,
+ },
+ {
+ id: 8,
+ pageTitle: 'Contact Form Page',
+ eventCount: 123543,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+ {
+ id: 9,
+ pageTitle: 'Services Overview - Web Development',
+ eventCount: 6345,
+ users: 19240,
+ viewsPerUser: 1.02,
+ averageTime: '2m 23s',
+ conversions: 2,
+ },
+ {
+ id: 10,
+ pageTitle: 'Pricing Page - Subscription Plans',
+ eventCount: 2455,
+ users: 12240,
+ viewsPerUser: 3.67,
+ averageTime: '2m 23s',
+ conversions: 80,
+ },
+];
diff --git a/docs/data/material/getting-started/templates/dashboard/listItems.js b/docs/data/material/getting-started/templates/dashboard/listItems.js
deleted file mode 100644
index 7d4090b3c738dd..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/listItems.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import * as React from 'react';
-import ListItemButton from '@mui/material/ListItemButton';
-import ListItemIcon from '@mui/material/ListItemIcon';
-import ListItemText from '@mui/material/ListItemText';
-import ListSubheader from '@mui/material/ListSubheader';
-import DashboardIcon from '@mui/icons-material/Dashboard';
-import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
-import PeopleIcon from '@mui/icons-material/People';
-import BarChartIcon from '@mui/icons-material/BarChart';
-import LayersIcon from '@mui/icons-material/Layers';
-import AssignmentIcon from '@mui/icons-material/Assignment';
-
-export const mainListItems = (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
-
-export const secondaryListItems = (
-
-
- Saved reports
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
diff --git a/docs/data/material/getting-started/templates/dashboard/listItems.tsx b/docs/data/material/getting-started/templates/dashboard/listItems.tsx
deleted file mode 100644
index 7d4090b3c738dd..00000000000000
--- a/docs/data/material/getting-started/templates/dashboard/listItems.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import * as React from 'react';
-import ListItemButton from '@mui/material/ListItemButton';
-import ListItemIcon from '@mui/material/ListItemIcon';
-import ListItemText from '@mui/material/ListItemText';
-import ListSubheader from '@mui/material/ListSubheader';
-import DashboardIcon from '@mui/icons-material/Dashboard';
-import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
-import PeopleIcon from '@mui/icons-material/People';
-import BarChartIcon from '@mui/icons-material/BarChart';
-import LayersIcon from '@mui/icons-material/Layers';
-import AssignmentIcon from '@mui/icons-material/Assignment';
-
-export const mainListItems = (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
-
-export const secondaryListItems = (
-
-
- Saved reports
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
diff --git a/docs/data/material/getting-started/templates/dashboard/themePrimitives.js b/docs/data/material/getting-started/templates/dashboard/themePrimitives.js
new file mode 100644
index 00000000000000..1b98cf9e83a5e6
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/themePrimitives.js
@@ -0,0 +1,203 @@
+import { createTheme, alpha } from '@mui/material/styles';
+
+const customTheme = createTheme();
+
+export const brand = {
+ 50: 'hsl(210, 100%, 95%)',
+ 100: 'hsl(210, 100%, 92%)',
+ 200: 'hsl(210, 100%, 80%)',
+ 300: 'hsl(210, 100%, 65%)',
+ 400: 'hsl(210, 98%, 48%)',
+ 500: 'hsl(210, 98%, 42%)',
+ 600: 'hsl(210, 98%, 55%)',
+ 700: 'hsl(210, 100%, 35%)',
+ 800: 'hsl(210, 100%, 16%)',
+ 900: 'hsl(210, 100%, 21%)',
+};
+
+export const gray = {
+ 50: 'hsl(220, 60%, 97%)',
+ 100: 'hsl(220, 35%, 94%)',
+ 200: 'hsl(220, 35%, 88%)',
+ 300: 'hsl(220, 25%, 80%)',
+ 400: 'hsl(220, 20%, 65%)',
+ 500: 'hsl(220, 20%, 42%)',
+ 600: 'hsl(220, 25%, 35%)',
+ 700: 'hsl(220, 25%, 25%)',
+ 800: 'hsl(220, 25%, 10%)',
+ 900: 'hsl(220, 30%, 5%)',
+};
+
+export const green = {
+ 50: 'hsl(120, 80%, 98%)',
+ 100: 'hsl(120, 75%, 94%)',
+ 200: 'hsl(120, 75%, 87%)',
+ 300: 'hsl(120, 61%, 77%)',
+ 400: 'hsl(120, 44%, 53%)',
+ 500: 'hsl(120, 59%, 30%)',
+ 600: 'hsl(120, 70%, 25%)',
+ 700: 'hsl(120, 75%, 16%)',
+ 800: 'hsl(120, 84%, 10%)',
+ 900: 'hsl(120, 87%, 6%)',
+};
+
+export const orange = {
+ 50: 'hsl(45, 100%, 97%)',
+ 100: 'hsl(45, 92%, 90%)',
+ 200: 'hsl(45, 94%, 80%)',
+ 300: 'hsl(45, 90%, 65%)',
+ 400: 'hsl(45, 90%, 40%)',
+ 500: 'hsl(45, 90%, 35%)',
+ 600: 'hsl(45, 91%, 25%)',
+ 700: 'hsl(45, 94%, 20%)',
+ 800: 'hsl(45, 95%, 16%)',
+ 900: 'hsl(45, 93%, 12%)',
+};
+
+export const red = {
+ 50: 'hsl(0, 100%, 97%)',
+ 100: 'hsl(0, 92%, 90%)',
+ 200: 'hsl(0, 94%, 80%)',
+ 300: 'hsl(0, 90%, 65%)',
+ 400: 'hsl(0, 90%, 40%)',
+ 500: 'hsl(0, 90%, 30%)',
+ 600: 'hsl(0, 91%, 25%)',
+ 700: 'hsl(0, 94%, 18%)',
+ 800: 'hsl(0, 95%, 12%)',
+ 900: 'hsl(0, 93%, 6%)',
+};
+
+export const getDesignTokens = (mode) => ({
+ palette: {
+ mode,
+ primary: {
+ light: brand[200],
+ main: brand[500],
+ dark: brand[800],
+ contrastText: brand[50],
+ ...(mode === 'dark' && {
+ contrastText: brand[50],
+ light: brand[300],
+ main: brand[400],
+ dark: brand[800],
+ }),
+ },
+ info: {
+ light: brand[100],
+ main: brand[300],
+ dark: brand[600],
+ contrastText: gray[50],
+ ...(mode === 'dark' && {
+ contrastText: brand[300],
+ light: brand[500],
+ main: brand[700],
+ dark: brand[900],
+ }),
+ },
+ warning: {
+ light: orange[300],
+ main: orange[400],
+ dark: orange[800],
+ ...(mode === 'dark' && {
+ light: orange[400],
+ main: orange[500],
+ dark: orange[700],
+ }),
+ },
+ error: {
+ light: red[300],
+ main: red[400],
+ dark: red[800],
+ ...(mode === 'dark' && {
+ light: red[400],
+ main: red[500],
+ dark: red[700],
+ }),
+ },
+ success: {
+ light: green[300],
+ main: green[400],
+ dark: green[800],
+ ...(mode === 'dark' && {
+ light: green[400],
+ main: green[500],
+ dark: green[700],
+ }),
+ },
+ grey: {
+ ...gray,
+ },
+ divider: mode === 'dark' ? alpha(gray[600], 0.3) : alpha(gray[300], 0.5),
+ background: {
+ default: gray[50],
+ paper: gray[100],
+ ...(mode === 'dark' && { default: gray[900], paper: gray[800] }),
+ },
+ text: {
+ primary: gray[800],
+ secondary: gray[600],
+ warning: orange[400],
+ ...(mode === 'dark' && { primary: 'hsl(0, 0%, 100%)', secondary: gray[400] }),
+ },
+ action: {
+ hover: alpha(gray[300], 0.2),
+ selected: `${alpha(brand[200], 0.2)}`,
+ ...(mode === 'dark' && {
+ hover: alpha(gray[500], 0.2),
+ selected: alpha(brand[800], 0.2),
+ }),
+ },
+ },
+ typography: {
+ fontFamily: ['"Inter", "sans-serif"'].join(','),
+ h1: {
+ fontSize: customTheme.typography.pxToRem(48),
+ fontWeight: 600,
+ lineHeight: 1.2,
+ letterSpacing: -0.5,
+ },
+ h2: {
+ fontSize: customTheme.typography.pxToRem(36),
+ fontWeight: 600,
+ lineHeight: 1.2,
+ },
+ h3: {
+ fontSize: customTheme.typography.pxToRem(30),
+ lineHeight: 1.2,
+ },
+ h4: {
+ fontSize: customTheme.typography.pxToRem(24),
+ fontWeight: 600,
+ lineHeight: 1.5,
+ },
+ h5: {
+ fontSize: customTheme.typography.pxToRem(20),
+ fontWeight: 600,
+ },
+ h6: {
+ fontSize: customTheme.typography.pxToRem(18),
+ fontWeight: 600,
+ },
+ subtitle1: {
+ fontSize: customTheme.typography.pxToRem(18),
+ },
+ subtitle2: {
+ fontSize: customTheme.typography.pxToRem(14),
+ fontWeight: 500,
+ },
+ body1: {
+ fontSize: customTheme.typography.pxToRem(14),
+ },
+ body2: {
+ fontSize: customTheme.typography.pxToRem(14),
+ fontWeight: 400,
+ },
+ caption: {
+ fontSize: customTheme.typography.pxToRem(12),
+ fontWeight: 400,
+ },
+ },
+ shape: {
+ borderRadius: 10,
+ },
+});
diff --git a/docs/data/material/getting-started/templates/dashboard/themePrimitives.ts b/docs/data/material/getting-started/templates/dashboard/themePrimitives.ts
new file mode 100644
index 00000000000000..c4b4887c7b62e5
--- /dev/null
+++ b/docs/data/material/getting-started/templates/dashboard/themePrimitives.ts
@@ -0,0 +1,226 @@
+import { PaletteMode } from '@mui/material';
+import { createTheme, alpha } from '@mui/material/styles';
+
+declare module '@mui/material/Paper' {
+ interface PaperPropsVariantOverrides {
+ highlighted: true;
+ }
+}
+declare module '@mui/material/styles/createPalette' {
+ interface ColorRange {
+ 50: string;
+ 100: string;
+ 200: string;
+ 300: string;
+ 400: string;
+ 500: string;
+ 600: string;
+ 700: string;
+ 800: string;
+ 900: string;
+ }
+
+ interface PaletteColor extends ColorRange {}
+}
+
+const customTheme = createTheme();
+
+export const brand = {
+ 50: 'hsl(210, 100%, 95%)',
+ 100: 'hsl(210, 100%, 92%)',
+ 200: 'hsl(210, 100%, 80%)',
+ 300: 'hsl(210, 100%, 65%)',
+ 400: 'hsl(210, 98%, 48%)',
+ 500: 'hsl(210, 98%, 42%)',
+ 600: 'hsl(210, 98%, 55%)',
+ 700: 'hsl(210, 100%, 35%)',
+ 800: 'hsl(210, 100%, 16%)',
+ 900: 'hsl(210, 100%, 21%)',
+};
+
+export const gray = {
+ 50: 'hsl(220, 60%, 97%)',
+ 100: 'hsl(220, 35%, 94%)',
+ 200: 'hsl(220, 35%, 88%)',
+ 300: 'hsl(220, 25%, 80%)',
+ 400: 'hsl(220, 20%, 65%)',
+ 500: 'hsl(220, 20%, 42%)',
+ 600: 'hsl(220, 25%, 35%)',
+ 700: 'hsl(220, 25%, 25%)',
+ 800: 'hsl(220, 25%, 10%)',
+ 900: 'hsl(220, 30%, 5%)',
+};
+
+export const green = {
+ 50: 'hsl(120, 80%, 98%)',
+ 100: 'hsl(120, 75%, 94%)',
+ 200: 'hsl(120, 75%, 87%)',
+ 300: 'hsl(120, 61%, 77%)',
+ 400: 'hsl(120, 44%, 53%)',
+ 500: 'hsl(120, 59%, 30%)',
+ 600: 'hsl(120, 70%, 25%)',
+ 700: 'hsl(120, 75%, 16%)',
+ 800: 'hsl(120, 84%, 10%)',
+ 900: 'hsl(120, 87%, 6%)',
+};
+
+export const orange = {
+ 50: 'hsl(45, 100%, 97%)',
+ 100: 'hsl(45, 92%, 90%)',
+ 200: 'hsl(45, 94%, 80%)',
+ 300: 'hsl(45, 90%, 65%)',
+ 400: 'hsl(45, 90%, 40%)',
+ 500: 'hsl(45, 90%, 35%)',
+ 600: 'hsl(45, 91%, 25%)',
+ 700: 'hsl(45, 94%, 20%)',
+ 800: 'hsl(45, 95%, 16%)',
+ 900: 'hsl(45, 93%, 12%)',
+};
+
+export const red = {
+ 50: 'hsl(0, 100%, 97%)',
+ 100: 'hsl(0, 92%, 90%)',
+ 200: 'hsl(0, 94%, 80%)',
+ 300: 'hsl(0, 90%, 65%)',
+ 400: 'hsl(0, 90%, 40%)',
+ 500: 'hsl(0, 90%, 30%)',
+ 600: 'hsl(0, 91%, 25%)',
+ 700: 'hsl(0, 94%, 18%)',
+ 800: 'hsl(0, 95%, 12%)',
+ 900: 'hsl(0, 93%, 6%)',
+};
+
+export const getDesignTokens = (mode: PaletteMode) => ({
+ palette: {
+ mode,
+ primary: {
+ light: brand[200],
+ main: brand[500],
+ dark: brand[800],
+ contrastText: brand[50],
+ ...(mode === 'dark' && {
+ contrastText: brand[50],
+ light: brand[300],
+ main: brand[400],
+ dark: brand[800],
+ }),
+ },
+ info: {
+ light: brand[100],
+ main: brand[300],
+ dark: brand[600],
+ contrastText: gray[50],
+ ...(mode === 'dark' && {
+ contrastText: brand[300],
+ light: brand[500],
+ main: brand[700],
+ dark: brand[900],
+ }),
+ },
+ warning: {
+ light: orange[300],
+ main: orange[400],
+ dark: orange[800],
+ ...(mode === 'dark' && {
+ light: orange[400],
+ main: orange[500],
+ dark: orange[700],
+ }),
+ },
+ error: {
+ light: red[300],
+ main: red[400],
+ dark: red[800],
+ ...(mode === 'dark' && {
+ light: red[400],
+ main: red[500],
+ dark: red[700],
+ }),
+ },
+ success: {
+ light: green[300],
+ main: green[400],
+ dark: green[800],
+ ...(mode === 'dark' && {
+ light: green[400],
+ main: green[500],
+ dark: green[700],
+ }),
+ },
+ grey: {
+ ...gray,
+ },
+ divider: mode === 'dark' ? alpha(gray[600], 0.3) : alpha(gray[300], 0.5),
+ background: {
+ default: gray[50],
+ paper: gray[100],
+ ...(mode === 'dark' && { default: gray[900], paper: gray[800] }),
+ },
+ text: {
+ primary: gray[800],
+ secondary: gray[600],
+ warning: orange[400],
+ ...(mode === 'dark' && { primary: 'hsl(0, 0%, 100%)', secondary: gray[400] }),
+ },
+ action: {
+ hover: alpha(gray[300], 0.2),
+ selected: `${alpha(brand[200], 0.2)}`,
+ ...(mode === 'dark' && {
+ hover: alpha(gray[500], 0.2),
+ selected: alpha(brand[800], 0.2),
+ }),
+ },
+ },
+ typography: {
+ fontFamily: ['"Inter", "sans-serif"'].join(','),
+ h1: {
+ fontSize: customTheme.typography.pxToRem(48),
+ fontWeight: 600,
+ lineHeight: 1.2,
+ letterSpacing: -0.5,
+ },
+ h2: {
+ fontSize: customTheme.typography.pxToRem(36),
+ fontWeight: 600,
+ lineHeight: 1.2,
+ },
+ h3: {
+ fontSize: customTheme.typography.pxToRem(30),
+ lineHeight: 1.2,
+ },
+ h4: {
+ fontSize: customTheme.typography.pxToRem(24),
+ fontWeight: 600,
+ lineHeight: 1.5,
+ },
+ h5: {
+ fontSize: customTheme.typography.pxToRem(20),
+ fontWeight: 600,
+ },
+ h6: {
+ fontSize: customTheme.typography.pxToRem(18),
+ fontWeight: 600,
+ },
+ subtitle1: {
+ fontSize: customTheme.typography.pxToRem(18),
+ },
+ subtitle2: {
+ fontSize: customTheme.typography.pxToRem(14),
+ fontWeight: 500,
+ },
+ body1: {
+ fontSize: customTheme.typography.pxToRem(14),
+ },
+ body2: {
+ fontSize: customTheme.typography.pxToRem(14),
+ fontWeight: 400,
+ },
+ caption: {
+ fontSize: customTheme.typography.pxToRem(12),
+ fontWeight: 400,
+ },
+ },
+ shape: {
+ borderRadius: 10,
+ },
+});
diff --git a/docs/data/material/guides/localization/localization.md b/docs/data/material/guides/localization/localization.md
index 9f047bfea14351..2e69ae6826197d 100644
--- a/docs/data/material/guides/localization/localization.md
+++ b/docs/data/material/guides/localization/localization.md
@@ -77,6 +77,7 @@ The [Data Grid and Data Grid Pro](/x/react-data-grid/) components have their own
| Nepali | ne-NP | `neNP` |
| Norwegian (bokmĂĽl) | nb-NO | `nbNO` |
| Norwegian (nynorsk) | nn-NO | `nnNO` |
+| Pashto (Afghanistan) | ps-AF | `psAF` |
| Persian | fa-IR | `faIR` |
| Polish | pl-PL | `plPL` |
| Portuguese | pt-PT | `ptPT` |
diff --git a/docs/data/material/integrations/nextjs/nextjs.md b/docs/data/material/integrations/nextjs/nextjs.md
index 5829d5d971a20c..75bcafea957d70 100644
--- a/docs/data/material/integrations/nextjs/nextjs.md
+++ b/docs/data/material/integrations/nextjs/nextjs.md
@@ -124,7 +124,7 @@ To learn more about theming, check out the [theming guide](/material-ui/customiz
#### CSS theme variables
-If you want to use [CSS theme variables](/material-ui/experimental-api/css-theme-variables/overview/), use the `extendTheme` and `CssVarsProvider` utilities instead:
+If you want to use [CSS theme variables](/material-ui/customization/css-theme-variables/overview/), use the `extendTheme` and `CssVarsProvider` utilities instead:
```diff title="src/theme.ts"
'use client';
@@ -136,7 +136,7 @@ If you want to use [CSS theme variables](/material-ui/experimental-api/css-theme
+import { CssVarsProvider } from '@mui/material/styles';
```
-Learn more about [the advantages of CSS theme variables](/material-ui/experimental-api/css-theme-variables/overview/#advantages).
+Learn more about [the advantages of CSS theme variables](/material-ui/customization/css-theme-variables/overview/#advantages).
### Using other styling solutions
@@ -367,11 +367,11 @@ To learn more about theming, check out the [Theming guide](/material-ui/customiz
#### CSS theme variables
-If you want to use [CSS theme variables](/material-ui/experimental-api/css-theme-variables/overview/), use the `extendTheme` and `CssVarsProvider` instead:
+If you want to use [CSS theme variables](/material-ui/customization/css-theme-variables/overview/), use the `extendTheme` and `CssVarsProvider` instead:
```diff title="pages/_app.tsx"
-import { ThemeProvider, createTheme } from '@mui/material/styles';
+import { CssVarsProvider, extendTheme } from '@mui/material/styles';
```
-Learn more about [the advantages of CSS theme variables](/material-ui/experimental-api/css-theme-variables/overview/#advantages).
+Learn more about [the advantages of CSS theme variables](/material-ui/customization/css-theme-variables/overview/#advantages).
diff --git a/docs/data/material/integrations/routing/ListRouter.tsx b/docs/data/material/integrations/routing/ListRouter.tsx
index 1900b67cf2d582..be912a6f8c9eff 100644
--- a/docs/data/material/integrations/routing/ListRouter.tsx
+++ b/docs/data/material/integrations/routing/ListRouter.tsx
@@ -33,7 +33,7 @@ function Router(props: { children?: React.ReactNode }) {
}
interface ListItemLinkProps {
- icon?: React.ReactElement;
+ icon?: React.ReactElement;
primary: string;
to: string;
}
diff --git a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
index 1347af809feaa0..814f1a07349ab2 100644
--- a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
+++ b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
@@ -313,6 +313,64 @@ The Avatar's `imgProps` prop was deprecated in favor of `slotProps.img`:
/>;
```
+## AvatarGroup
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#avatar-group-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/avatar-group-props
+```
+
+### slotProps.additionalAvatar
+
+The AvatarGroup's `slotProps.additionalAvatar` was deprecated in favor of `slotProps.surplus`:
+
+```diff
+ ;
+```
+
+```diff
+ MuiAvatarGroup: {
+ defaultProps: {
+ slotProps: {
+- additionalAvatar: {color: "red"}
++ surplus: {color: "red"}
+ },
+ },
+ },
+```
+
+### componentsProps
+
+The AvatarGroup's `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+ ;
+```
+
+```diff
+ MuiAvatarGroup: {
+ defaultProps: {
+- componentsProps: {
+- additionalAvatar: {color: "red"}
++ slotProps: {
++ surplus: {color: "red"}
+ },
+ },
+ },
+```
+
## Backdrop
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#backdrop-props) below to migrate the code as described in the following sections:
@@ -972,6 +1030,36 @@ The Divider's `light` prop was deprecated, Use `sx={{ opacity : "0.6" }}` (or an
/>
```
+## FilledInput
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#filled-input-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/filled-input-props
+```
+
+### components
+
+The FilledInput's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The FilledInput's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
## FormControlLabel
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#form-control-label-props) below to migrate the code as described in the following sections:
@@ -991,12 +1079,183 @@ The FormControlLabel's `componentsProps` prop was deprecated in favor of `slotPr
/>
```
+## Input
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#input-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/input-props
+```
+
+### components
+
+The Input's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The Input's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
+## InputBase
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#input-base-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/input-base-props
+```
+
+### components
+
+The InputBase's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The InputBase's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
+## ListItem
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#list-item-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/list-item-props
+```
+
+### components
+
+The ListItem's `components` prop was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The ListItem's `componentsProps` prop was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
+### ContainerComponent
+
+The ListItem's `ContainerComponent` prop was deprecated in favor of `slots.root` or `component` instead.
+
+### ContainerProps
+
+The ListItem's `ContainerProps` prop was deprecated in favor of `slotProps.root` instead.
+
+## ListItemSecondaryAction
+
+### Deprecated component
+
+The ListItemSecondaryAction component was deprecated in favor of the `secondaryAction` prop in the ListItem component.
+
+```diff
+
++
++
++ }
+ disablePadding
+ >
+
+-
+-
+-
+-
+-
+
+```
+
+## Grid
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#grid-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/grid-props
+```
+
+### wrap prop
+
+The Grid's `wrap` prop was deprecated in favor of `flexWrap` MUIÂ System prop:
+
+```diff
+ ;
+```
+
+## OutlinedInput
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#outlined-input-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/outlined-input-props
+```
+
+### components
+
+The OutlinedInput's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The OutlinedInput's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
## PaginationItem
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#pagination-item-classes) below to migrate the code as described in the following sections:
```bash
-npx @mui/codemod@latest deprecations/pagination-item-classes
+npx @mui/codemod@next deprecations/pagination-item-classes
```
### Composed CSS classes
@@ -1054,6 +1313,36 @@ The PaginationItems's `components` prop was deprecated in favor of `slots`:
/>
```
+## Popper
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#popper-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/popper-props
+```
+
+### components
+
+The Popper's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The Popper's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
## Slider
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#slider-props) below to migrate the code as described in the following sections:
@@ -1153,6 +1442,36 @@ All of the TextField's slot props (`*Props`) props were deprecated in favor of e
/>
```
+## Tooltip
+
+Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#tooltip-props) below to migrate the code as described in the following sections:
+
+```bash
+npx @mui/codemod@next deprecations/tooltip-props
+```
+
+### components
+
+The Tooltip's prop `components` was deprecated in favor of `slots`:
+
+```diff
+
+```
+
+### componentsProps
+
+The Tooltip's prop `componentsProps` was deprecated in favor of `slotProps`:
+
+```diff
+
+```
+
## StepLabel
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#step-label-props) below to migrate the code as described in the following sections:
diff --git a/docs/data/material/experimental-api/css-theme-variables/migration.md b/docs/data/material/migration/migration-v5/migration-css-theme-variables.md
similarity index 89%
rename from docs/data/material/experimental-api/css-theme-variables/migration.md
rename to docs/data/material/migration/migration-v5/migration-css-theme-variables.md
index 02cf6c5a4bddc2..c1b74433614de7 100644
--- a/docs/data/material/experimental-api/css-theme-variables/migration.md
+++ b/docs/data/material/migration/migration-v5/migration-css-theme-variables.md
@@ -12,7 +12,7 @@ This migration offers a solution to a longstanding issue in which a user who pre
If you aren't using [`ThemeProvider`](/material-ui/customization/theming/#theme-provider), then all you need to do is wrap your application with the `CssVarsProvider`:
```js
-import { Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
+import { CssVarsProvider } from '@mui/material/styles';
function App() {
return ...your existing application ;
@@ -30,7 +30,7 @@ Other properties can be copied and pasted.
```diff
-import { createTheme } from '@mui/material/styles';
-+import { experimental_extendTheme as extendTheme} from '@mui/material/styles';
++import { extendTheme } from '@mui/material/styles';
-const lightTheme = createTheme({
- palette: {
@@ -79,7 +79,7 @@ Then, replace the `ThemeProvider` with the `CssVarsProvider`:
```diff
-import { ThemeProvider } from '@mui/material/styles';
-+import { Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
++import { CssVarsProvider } from '@mui/material/styles';
const theme = extendTheme(...);
@@ -141,11 +141,7 @@ function App() {
**After**:
```js
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- experimental_extendTheme as extendTheme,
- useColorScheme,
-} from '@mui/material/styles';
+import { CssVarsProvider, extendTheme, useColorScheme } from '@mui/material/styles';
function ModeToggle() {
const { mode, setMode } = useColorScheme();
@@ -249,7 +245,7 @@ const Button = styled('button')(({ theme }) => ({
This is because the `theme.palette.mode` is always `light` on the server.
-To fix this problem, replace conditional expressions with the attribute selector instead:
+To fix this problem, replace conditional expressions with `theme.applyStyles()` instead:
```js
// theming example
@@ -259,9 +255,9 @@ extendTheme({
styleOverrides: {
root: ({ theme }) => ({
backgroundColor: 'rgba(0 0 0 / 0.2)',
- [theme.getColorSchemeSelector('dark')]: {
+ ...theme.applyStyles('dark', {
backgroundColor: 'rgba(255 255 255 / 0.2)',
- },
+ }),
}),
},
},
@@ -271,16 +267,14 @@ extendTheme({
// or a custom component example
const Button = styled('button')(({ theme }) => ({
backgroundColor: 'rgba(0 0 0 / 0.2)',
- [theme.getColorSchemeSelector('dark')]: {
+ ...theme.applyStyles('dark', {
backgroundColor: 'rgba(255 255 255 / 0.2)',
- },
+ }),
}));
```
-:::warning
-The `theme.getColorSchemeSelector()` is a utility function that returns an attribute selector `'[data-mui-color-scheme="dark"] &'`.
-
-Note that the attribute selector creates higher CSS specificity which could be cumbersome for theming.
+:::info
+The `theme.applyStyles()` is a new utility function available in Material UI v6 that applies the provided styles to the specified mode.
:::
## 5. Test dark-mode flickering
diff --git a/docs/data/material/migration/migration-v5/migration-v5.md b/docs/data/material/migration/migration-v5/migration-v5.md
index 7ab3909a8671a0..c6febcdb642a63 100644
--- a/docs/data/material/migration/migration-v5/migration-v5.md
+++ b/docs/data/material/migration/migration-v5/migration-v5.md
@@ -48,6 +48,8 @@ Expect updates as new breaking changes are introduced.
### UMD bundle was removed
-
+To align with React 19's removal of UMD builds, Material UI has also removed its UMD bundle.
+This results in a reduction of the `@mui/material` package size by 2.5MB or 25% of the total package size.
-The UMD bundle is no longer provided. This was replaced in favor of [ESM CDNs](https://esm.sh/). Please refer to the [CDN docs](https://next.mui.com/material-ui/getting-started/installation/#cdn) for alternatives.
+Instead, using ESM-based CDNs such as [esm.sh](https://esm.sh/) is recommended.
+For alternative installation methods, refer to the [CDN documentation](/material-ui/getting-started/installation/#cdn).
diff --git a/docs/data/material/pages.ts b/docs/data/material/pages.ts
index 9d3f176a50bacd..8d64d4110a5ac9 100644
--- a/docs/data/material/pages.ts
+++ b/docs/data/material/pages.ts
@@ -189,6 +189,17 @@ const pages: MuiPage[] = [
{ pathname: '/material-ui/customization/transitions' },
],
},
+ {
+ pathname: '/material-ui/customization/css-variables',
+ subheader: '/material-ui/customization/css-variables',
+ children: [
+ { pathname: '/material-ui/customization/css-theme-variables/overview' },
+ { pathname: '/material-ui/customization/css-theme-variables/usage' },
+ {
+ pathname: '/material-ui/customization/css-theme-variables/configuration',
+ },
+ ],
+ },
],
},
{
@@ -238,19 +249,6 @@ const pages: MuiPage[] = [
pathname: '/material-ui/experimental-api/classname-generator',
title: 'ClassName generator',
},
- {
- pathname: '/material-ui/experimental-api/css-theme-variables',
- subheader: 'CSS theme variables',
- children: [
- { pathname: '/material-ui/experimental-api/css-theme-variables/overview' },
- { pathname: '/material-ui/experimental-api/css-theme-variables/usage' },
- { pathname: '/material-ui/experimental-api/css-theme-variables/customization' },
- {
- pathname: '/material-ui/experimental-api/css-theme-variables/migration',
- title: 'Migrating to CSS variables',
- },
- ],
- },
],
},
{
@@ -277,6 +275,10 @@ const pages: MuiPage[] = [
pathname: '/material-ui/migration/migration-v5',
title: 'Migrating to v6',
},
+ {
+ pathname: '/material-ui/migration/migration-css-theme-variables',
+ title: 'Migrating to CSS theme variables',
+ },
],
},
{
@@ -320,7 +322,6 @@ const pages: MuiPage[] = [
children: [
{ pathname: '/material-ui/discover-more/showcase' },
{ pathname: '/material-ui/discover-more/related-projects' },
- { pathname: '/material-ui/discover-more/design-kits' },
{ pathname: '/material-ui/discover-more/roadmap' },
{ pathname: '/material-ui/discover-more/backers', title: 'Sponsors and Backers' },
{ pathname: '/material-ui/discover-more/vision' },
diff --git a/docs/data/system/experimental-api/css-theme-variables/css-theme-variables.md b/docs/data/system/experimental-api/css-theme-variables/css-theme-variables.md
index 7f95416dee8ecf..9b834cccf0687e 100644
--- a/docs/data/system/experimental-api/css-theme-variables/css-theme-variables.md
+++ b/docs/data/system/experimental-api/css-theme-variables/css-theme-variables.md
@@ -12,7 +12,7 @@ If this is your first time encountering CSS variables, you should check out [the
CSS theme variable support is a new feature in MUI System added in [`v5.0.5`](https://github.com/mui/material-ui/releases/tag/v5.0.5) as an experimental export. It tells the underlying Material UI, Joy UI or even custom UI library components to use the generated CSS theme variables instead of raw values. This provides significant improvements in developer experience related to theming and customization.
With these variables, you can inject a theme into your app's stylesheet _at build time_ to apply the user's selected settings before the whole app is rendered.
-You can checkout the [advantages](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/#advantages) and [trade-offs](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/#trade-offs) of using CSS theme variables before using them.
+Learn more about the [advantages](https://mui.com/material-ui/customization/css-theme-variables/overview/#advantages) and [trade-offs](https://mui.com/material-ui/customization/css-theme-variables/overview/#trade-offs) of using CSS theme variables.
### Advantages
@@ -39,7 +39,8 @@ The comparison described in the table above may not be applicable to large and c
## Usage
-The CSS variables API usage is exposed as a higher order function called `unstable_createCssVarsProvider` which can be called to create a theme provider and other utilities to share the theme config throughout your app. This is a very low-level function and has a lot of moving parts. If you are already using [Material UI](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/) or [Joy UI](https://mui.com/joy-ui/customization/using-css-variables/), they already expose their own `CssVarsProvider` component that you can use directly without needing to configure your theme. Now that's out of the way, we can continue with how this util can be used.
+The CSS variables API usage is exposed as a higher order function called `unstable_createCssVarsProvider` which can be called to create a theme provider and other utilities to share the theme config throughout your app. This is a very low-level function and has a lot of moving parts.
+If you're using [Material UI](https://mui.com/material-ui/customization/css-theme-variables/overview/) or [Joy UI](https://mui.com/joy-ui/customization/using-css-variables/), they expose their own `CssVarsProvider` component that you can use directly without configuring your theme.
We'll first define a minimal theme palette for light and dark modes.
@@ -184,8 +185,8 @@ Now, the Button's `backgroundColor`, `borderColor` and text `color` values will
### Demo
{{"demo": "CreateCssVarsProvider.js"}}
-
-For framework or language specific setup, see [this](https://mui.com/material-ui/experimental-api/css-theme-variables/usage/#server-side-rendering)
+For framework- or language-specific setup instructions, see [CSS theme variablesâUsageâServer-side rendering](https://mui.com/material-ui/customization/css-theme-variables/usage/#server-side-rendering).
+For framework or language specific setup, see [this](https://mui.com/material-ui/customization/css-theme-variables/usage/#server-side-rendering)
See the complete usage of `createCssVarsProvider` in [Material UI](https://github.com/mui/material-ui/blob/master/packages/mui-material/src/styles/CssVarsProvider.tsx) and [Joy UI](https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/styles/CssVarsProvider.tsx).
diff --git a/docs/lib/sourcing.ts b/docs/lib/sourcing.ts
index 62eda396a074a4..b75f8f2c300eca 100644
--- a/docs/lib/sourcing.ts
+++ b/docs/lib/sourcing.ts
@@ -43,7 +43,6 @@ const ALLOWED_TAGS = [
'Pigment CSS',
'Joy UI',
'MUI X',
- 'MUI System',
'Toolpad',
];
diff --git a/docs/package.json b/docs/package.json
index f51e1ae46c104a..37003237da676c 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -19,9 +19,9 @@
"link-check": "node ./scripts/reportBrokenLinks.js"
},
"dependencies": {
- "@babel/core": "^7.24.5",
- "@babel/runtime": "^7.24.5",
- "@babel/runtime-corejs2": "^7.24.5",
+ "@babel/core": "^7.24.6",
+ "@babel/runtime": "^7.24.6",
+ "@babel/runtime-corejs2": "^7.24.6",
"@docsearch/react": "^3.6.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
@@ -29,13 +29,13 @@
"@emotion/styled": "^11.11.5",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
- "@fortawesome/react-fontawesome": "^0.2.1",
+ "@fortawesome/react-fontawesome": "^0.2.2",
"@mui/base": "workspace:*",
"@mui/docs": "workspace:^",
"@mui/icons-material": "workspace:^",
+ "@mui/internal-markdown": "workspace:^",
"@mui/joy": "workspace:*",
"@mui/lab": "workspace:*",
- "@mui/internal-markdown": "workspace:^",
"@mui/material": "workspace:^",
"@mui/styled-engine": "workspace:^",
"@mui/styled-engine-sc": "workspace:^",
@@ -43,15 +43,15 @@
"@mui/system": "workspace:^",
"@mui/types": "workspace:^",
"@mui/utils": "workspace:^",
- "@mui/x-charts": "7.4.0",
- "@mui/x-data-grid": "7.4.0",
- "@mui/x-data-grid-generator": "7.4.0",
- "@mui/x-data-grid-premium": "7.4.0",
- "@mui/x-data-grid-pro": "7.4.0",
- "@mui/x-date-pickers": "7.4.0",
- "@mui/x-date-pickers-pro": "7.4.0",
- "@mui/x-license": "7.2.0",
- "@mui/x-tree-view": "7.4.0",
+ "@mui/x-charts": "7.5.1",
+ "@mui/x-data-grid": "7.5.1",
+ "@mui/x-data-grid-generator": "7.5.1",
+ "@mui/x-data-grid-premium": "7.5.1",
+ "@mui/x-data-grid-pro": "7.5.1",
+ "@mui/x-date-pickers": "7.5.1",
+ "@mui/x-date-pickers-pro": "7.5.1",
+ "@mui/x-license": "7.2.1",
+ "@mui/x-tree-view": "7.5.1",
"@popperjs/core": "^2.11.8",
"@react-spring/web": "^9.7.3",
"autoprefixer": "^10.4.19",
@@ -68,6 +68,7 @@
"css-mediaquery": "^0.1.2",
"date-fns": "^2.30.0",
"date-fns-jalali": "^2.21.3-1",
+ "dayjs": "^1.11.10",
"feed": "^4.2.2",
"fg-loadcss": "^3.1.0",
"final-form": "^4.20.10",
@@ -80,7 +81,7 @@
"lodash": "^4.17.21",
"lz-string": "^1.5.0",
"markdown-to-jsx": "^7.4.7",
- "material-ui-popup-state": "^5.1.1",
+ "material-ui-popup-state": "^5.1.2",
"next": "^13.5.1",
"notistack": "3.0.1",
"nprogress": "^0.2.0",
@@ -91,7 +92,7 @@
"react-dom": "^18.2.0",
"react-draggable": "^4.4.6",
"react-final-form": "^6.5.9",
- "react-imask": "^7.6.0",
+ "react-imask": "^7.6.1",
"react-intersection-observer": "^9.10.2",
"react-is": "^18.2.0",
"react-number-format": "^5.3.4",
@@ -100,9 +101,8 @@
"react-simple-code-editor": "^0.13.1",
"react-spring": "^9.7.3",
"react-swipeable-views": "^0.14.0",
- "react-swipeable-views-utils": "^0.14.0",
"react-transition-group": "^4.4.5",
- "react-virtuoso": "^4.7.10",
+ "react-virtuoso": "^4.7.11",
"react-window": "^1.8.10",
"rimraf": "^5.0.7",
"styled-components": "^6.1.11",
@@ -112,11 +112,11 @@
"webpack-bundle-analyzer": "^4.10.2"
},
"devDependencies": {
- "@babel/plugin-transform-react-constant-elements": "^7.24.1",
- "@babel/preset-typescript": "^7.24.1",
+ "@babel/plugin-transform-react-constant-elements": "^7.24.6",
+ "@babel/preset-typescript": "^7.24.6",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-scripts": "workspace:^",
- "@mui-internal/test-utils": "workspace:^",
+ "@mui/internal-test-utils": "workspace:^",
"@types/autosuggest-highlight": "^3.2.3",
"@types/chai": "^4.3.16",
"@types/css-mediaquery": "^0.1.4",
@@ -126,7 +126,6 @@
"@types/react": "^18.2.55",
"@types/react-dom": "^18.3.0",
"@types/react-swipeable-views": "^0.13.5",
- "@types/react-swipeable-views-utils": "^0.13.7",
"@types/react-transition-group": "^4.4.10",
"@types/react-window": "^1.8.8",
"@types/stylis": "^4.2.0",
@@ -134,7 +133,7 @@
"cross-fetch": "^4.0.0",
"gm": "^1.25.0",
"marked": "^5.1.2",
- "playwright": "^1.44.0",
+ "playwright": "^1.44.1",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3",
"yargs": "^17.7.2"
diff --git a/docs/pages/_app.js b/docs/pages/_app.js
index b17a4b54351526..a9b1066aac2118 100644
--- a/docs/pages/_app.js
+++ b/docs/pages/_app.js
@@ -163,7 +163,7 @@ function AppWrapper(props) {
if (productId === 'material-ui') {
return {
- metadata: 'MUIÂ Core',
+ metadata: '',
name: 'Material UI',
versions: [
{ text: `v${materialPkgJson.version}`, current: true },
@@ -182,7 +182,7 @@ function AppWrapper(props) {
if (productId === 'joy-ui') {
return {
- metadata: 'MUIÂ Core',
+ metadata: '',
name: 'Joy UI',
versions: [{ text: `v${joyPkgJson.version}`, current: true }],
};
@@ -190,7 +190,7 @@ function AppWrapper(props) {
if (productId === 'system') {
return {
- metadata: 'MUIÂ Core',
+ metadata: '',
name: 'MUIÂ System',
versions: [
{ text: `v${systemPkgJson.version}`, current: true },
@@ -206,7 +206,7 @@ function AppWrapper(props) {
if (productId === 'base-ui') {
return {
- metadata: 'MUIÂ Core',
+ metadata: '',
name: 'Base UI',
versions: [{ text: `v${basePkgJson.version}`, current: true }],
};
diff --git a/docs/pages/base-ui/api/use-modal.json b/docs/pages/base-ui/api/use-modal.json
index 494620611cab21..81e8315c9273b4 100644
--- a/docs/pages/base-ui/api/use-modal.json
+++ b/docs/pages/base-ui/api/use-modal.json
@@ -2,8 +2,8 @@
"parameters": {
"children": {
"type": {
- "name": "React.ReactElement | undefined | null",
- "description": "React.ReactElement | undefined | null"
+ "name": "React.ReactElement<any> | undefined | null",
+ "description": "React.ReactElement<any> | undefined | null"
},
"required": true
},
diff --git a/docs/pages/blog.tsx b/docs/pages/blog.tsx
index fc98fa100f8f9a..94add9d096b780 100644
--- a/docs/pages/blog.tsx
+++ b/docs/pages/blog.tsx
@@ -82,28 +82,28 @@ function PostPreview(props: BlogPost) {
{props.authors && (
({
- mt: 2,
- mb: 1,
- alignSelf: 'flex-start',
+ sx={(theme) => ({
+ mt: 2,
+ mb: 1,
+ alignSelf: 'flex-start',
+ '& .MuiAvatar-circular': {
+ width: 28,
+ height: 28,
+ fontSize: theme.typography.pxToRem(13),
+ fontWeight: theme.typography.fontWeightSemiBold,
+ color: (theme.vars || theme).palette.text.primary,
+ border: `1px solid ${(theme.vars || theme).palette.divider}`,
+ outline: '3px solid',
+ outlineColor: '#FFF',
+ backgroundColor: (theme.vars || theme).palette.grey[100],
+ },
+ ...theme.applyDarkStyles({
'& .MuiAvatar-circular': {
- width: 28,
- height: 28,
- border: `1px solid ${(theme.vars || theme).palette.divider}`,
- outline: '3px solid',
- outlineColor: '#FFF',
- backgroundColor: (theme.vars || theme).palette.grey[100],
+ outlineColor: (theme.vars || theme).palette.primaryDark[900],
+ backgroundColor: (theme.vars || theme).palette.primaryDark[700],
},
}),
- (theme) =>
- theme.applyDarkStyles({
- '& .MuiAvatar-circular': {
- outlineColor: (theme.vars || theme).palette.primaryDark[900],
- backgroundColor: (theme.vars || theme).palette.primaryDark[700],
- },
- }),
- ]}
+ })}
>
{(props.authors as Array).map((author) => (
);
})}
@@ -397,6 +395,7 @@ export default function Blog(props: InferGetStaticPropsType
({
+ sx={{
py: 2.5,
display: 'flex',
flexDirection: 'column',
@@ -446,7 +445,7 @@ export default function Blog(props: InferGetStaticPropsType
@@ -461,7 +460,7 @@ export default function Blog(props: InferGetStaticPropsType
diff --git a/docs/pages/blog/introducing-pigment-css.md b/docs/pages/blog/introducing-pigment-css.md
index 44099faacc9eba..b3856429416277 100644
--- a/docs/pages/blog/introducing-pigment-css.md
+++ b/docs/pages/blog/introducing-pigment-css.md
@@ -11,7 +11,7 @@ authors:
'danilo-leal',
'oliviertassinari',
]
-tags: ['Pigment CSS']
+tags: ['Pigment CSS', 'Product']
manualCard: true
---
diff --git a/docs/pages/experiments/website/branding-theme-test.tsx b/docs/pages/experiments/website/branding-theme-test.tsx
index 82e5393540bdbf..67140e15e00d5b 100644
--- a/docs/pages/experiments/website/branding-theme-test.tsx
+++ b/docs/pages/experiments/website/branding-theme-test.tsx
@@ -43,7 +43,7 @@ export default function BrandingThemeTest() {
Outlined secondary
-
+
This button
diff --git a/docs/pages/experiments/website/dashboard-template-theme.tsx b/docs/pages/experiments/website/dashboard-template-theme.tsx
new file mode 100644
index 00000000000000..d89cf524819b30
--- /dev/null
+++ b/docs/pages/experiments/website/dashboard-template-theme.tsx
@@ -0,0 +1,286 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import Box from '@mui/material/Box';
+import Button from '@mui/material/Button';
+import Card from '@mui/material/Card';
+import CardActions from '@mui/material/CardActions';
+import CardContent from '@mui/material/CardContent';
+import Container from '@mui/material/Container';
+import CssBaseline from '@mui/material/CssBaseline';
+import Divider from '@mui/material/Divider';
+import IconButton from '@mui/material/IconButton';
+import LinearProgress from '@mui/material/LinearProgress';
+import Link from '@mui/material/Link';
+import Menu from '@mui/material/Menu';
+import MenuItem from '@mui/material/MenuItem';
+import OutlinedInput from '@mui/material/OutlinedInput';
+import Stack from '@mui/material/Stack';
+import Tab from '@mui/material/Tab';
+import Tabs from '@mui/material/Tabs';
+import Typography from '@mui/material/Typography';
+
+import MoreVertIcon from '@mui/icons-material/MoreVert';
+import NotificationsRoundedIcon from '@mui/icons-material/NotificationsRounded';
+import WbSunnyRoundedIcon from '@mui/icons-material/WbSunnyRounded';
+import ModeNightRoundedIcon from '@mui/icons-material/ModeNightRounded';
+
+import { createTheme, ThemeProvider } from '@mui/material/styles';
+import { PaletteMode } from '@mui/material';
+
+import Head from 'docs/src/modules/components/Head';
+import getDashboardTheme from 'docs/data/material/getting-started/templates/dashboard/getDashboardTheme';
+import CustomDatePicker from 'docs/data/material/getting-started/templates/dashboard/components/CustomDatePicker';
+
+interface ToggleColorModeProps {
+ mode: PaletteMode;
+ toggleColorMode: () => void;
+}
+
+export function ToggleColorMode({ mode, toggleColorMode }: ToggleColorModeProps) {
+ return (
+
+
+ {mode === 'dark' ? (
+
+ ) : (
+
+ )}
+
+
+ );
+}
+
+function CustomTabPanel(props: { [x: string]: any; children: any; value: any; index: any }) {
+ const { children, value, index, ...other } = props;
+
+ return (
+
+ {value === index && (
+
+ {children}
+
+ )}
+
+ );
+}
+
+CustomTabPanel.propTypes = {
+ children: PropTypes.node,
+ index: PropTypes.number.isRequired,
+ value: PropTypes.number.isRequired,
+};
+
+function a11yProps(index: number) {
+ return {
+ id: `simple-tab-${index}`,
+ 'aria-controls': `simple-tabpanel-${index}`,
+ };
+}
+
+export default function DashboardTemplateTheme() {
+ const [mode, setMode] = React.useState('light');
+ const dashboardTheme = createTheme(getDashboardTheme(mode));
+ const toggleColorMode = () => {
+ setMode((prev) => (prev === 'dark' ? 'light' : 'dark'));
+ };
+ const [anchorEl, setAnchorEl] = React.useState(null);
+ const open = Boolean(anchorEl);
+ const handleClick = (event: React.MouseEvent) => {
+ setAnchorEl(event.currentTarget);
+ };
+ const handleClose = () => {
+ setAnchorEl(null);
+ };
+ const [value, setValue] = React.useState(0);
+ const handleChange = (_event: any, newValue: React.SetStateAction) => {
+ setValue(newValue);
+ };
+
+ return (
+
+
+
+
+
+
+ Dashboard template theme
+
+
+
+
+
+
+ Contained
+ Outlined
+ Text
+
+ Contained
+
+
+ Outlined
+
+
+ Text
+
+
+
+
+ Contained
+
+
+ Outlined
+
+
+ Text
+
+
+ Contained
+
+
+ Outlined
+
+
+ Text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Word of the Day
+
+
+ beâ˘nevâ˘oâ˘lent
+
+
+ adjective
+
+
+ well meaning and kindly.
+
+ {'"a benevolent smile"'}
+
+
+
+ Learn More
+
+
+
+
+
+ Word of the Day
+
+
+ beâ˘nevâ˘oâ˘lent
+
+
+ adjective
+
+
+ well meaning and kindly.
+
+ {'"a benevolent smile"'}
+
+
+
+ Learn More
+
+
+
+
+
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Item One
+
+
+ Item Two
+
+
+ Item Three
+
+
+
+
+ );
+}
diff --git a/docs/pages/material-ui/api/avatar-group.json b/docs/pages/material-ui/api/avatar-group.json
index d25bd7c131ab78..5170bcb64cecc6 100644
--- a/docs/pages/material-ui/api/avatar-group.json
+++ b/docs/pages/material-ui/api/avatar-group.json
@@ -5,7 +5,8 @@
"component": { "type": { "name": "elementType" } },
"componentsProps": {
"type": { "name": "shape", "description": "{ additionalAvatar?: object }" },
- "default": "{}"
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"max": { "type": { "name": "custom", "description": "number" }, "default": "5" },
"renderSurplus": {
@@ -17,7 +18,14 @@
}
},
"slotProps": {
- "type": { "name": "shape", "description": "{ additionalAvatar?: object }" },
+ "type": {
+ "name": "shape",
+ "description": "{ additionalAvatar?: object, surplus?: func | object }"
+ },
+ "default": "{}"
+ },
+ "slots": {
+ "type": { "name": "shape", "description": "{ surplus?: elementType }" },
"default": "{}"
},
"spacing": {
@@ -48,6 +56,7 @@
"import AvatarGroup from '@mui/material/AvatarGroup';",
"import { AvatarGroup } from '@mui/material';"
],
+ "slots": [{ "name": "surplus", "description": "", "class": null }],
"classes": [
{
"key": "avatar",
@@ -65,7 +74,6 @@
"spread": true,
"themeDefaultProps": true,
"muiName": "MuiAvatarGroup",
- "forwardsRefTo": "HTMLDivElement",
"filename": "/packages/mui-material/src/AvatarGroup/AvatarGroup.js",
"inheritance": null,
"demos": "",
diff --git a/docs/pages/material-ui/api/filled-input.json b/docs/pages/material-ui/api/filled-input.json
index 0422d195c86877..fefcc0459a78d3 100644
--- a/docs/pages/material-ui/api/filled-input.json
+++ b/docs/pages/material-ui/api/filled-input.json
@@ -11,11 +11,15 @@
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
diff --git a/docs/pages/material-ui/api/grid.json b/docs/pages/material-ui/api/grid.json
index 8dbd29b88f0e47..eacdac14949355 100644
--- a/docs/pages/material-ui/api/grid.json
+++ b/docs/pages/material-ui/api/grid.json
@@ -71,7 +71,9 @@
"name": "enum",
"description": "'nowrap' | 'wrap-reverse' | 'wrap'"
},
- "default": "'wrap'"
+ "default": "'wrap'",
+ "deprecated": true,
+ "deprecationInfo": "Use flexWrap
instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"xl": {
"type": {
diff --git a/docs/pages/material-ui/api/hidden.json b/docs/pages/material-ui/api/hidden.json
index 2e4e13ea697f0e..9c0112eb0ff82b 100644
--- a/docs/pages/material-ui/api/hidden.json
+++ b/docs/pages/material-ui/api/hidden.json
@@ -40,5 +40,6 @@
"filename": "/packages/mui-material/src/Hidden/Hidden.js",
"inheritance": null,
"demos": "",
- "cssComponent": false
+ "cssComponent": false,
+ "deprecated": true
}
diff --git a/docs/pages/material-ui/api/input-base.json b/docs/pages/material-ui/api/input-base.json
index fee9a4248d84a8..692496c28ce8d0 100644
--- a/docs/pages/material-ui/api/input-base.json
+++ b/docs/pages/material-ui/api/input-base.json
@@ -11,11 +11,15 @@
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
diff --git a/docs/pages/material-ui/api/input.json b/docs/pages/material-ui/api/input.json
index 79a1bcd9305cb5..8d1dfb0c94ff05 100644
--- a/docs/pages/material-ui/api/input.json
+++ b/docs/pages/material-ui/api/input.json
@@ -11,11 +11,15 @@
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
diff --git a/docs/pages/material-ui/api/list-item-secondary-action.json b/docs/pages/material-ui/api/list-item-secondary-action.json
index 9179bdd88d9224..e46ec7a4249ddc 100644
--- a/docs/pages/material-ui/api/list-item-secondary-action.json
+++ b/docs/pages/material-ui/api/list-item-secondary-action.json
@@ -36,5 +36,6 @@
"filename": "/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.js",
"inheritance": null,
"demos": "",
- "cssComponent": false
+ "cssComponent": false,
+ "deprecated": true
}
diff --git a/docs/pages/material-ui/api/list-item.json b/docs/pages/material-ui/api/list-item.json
index d9de1313fd03c9..f9f795a1e09b04 100644
--- a/docs/pages/material-ui/api/list-item.json
+++ b/docs/pages/material-ui/api/list-item.json
@@ -21,18 +21,28 @@
"component": { "type": { "name": "elementType" } },
"components": {
"type": { "name": "shape", "description": "{ Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "Use the slots
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ root?: object }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "Use the slotProps
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"ContainerComponent": {
"type": { "name": "custom", "description": "element type" },
"default": "'li'",
- "deprecated": true
+ "deprecated": true,
+ "deprecationInfo": "Use the component
or slots.root
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
+ },
+ "ContainerProps": {
+ "type": { "name": "object" },
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "Use the slotProps.root
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
- "ContainerProps": { "type": { "name": "object" }, "default": "{}", "deprecated": true },
"dense": { "type": { "name": "bool" }, "default": "false" },
"disabled": {
"type": { "name": "bool" },
diff --git a/docs/pages/material-ui/api/outlined-input.json b/docs/pages/material-ui/api/outlined-input.json
index 0861c24ab65b0f..73efeefa0d9e74 100644
--- a/docs/pages/material-ui/api/outlined-input.json
+++ b/docs/pages/material-ui/api/outlined-input.json
@@ -11,7 +11,9 @@
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
diff --git a/docs/pages/material-ui/api/popper.json b/docs/pages/material-ui/api/popper.json
index 06f2880cdc5b9e..94c41b76c2bb8f 100644
--- a/docs/pages/material-ui/api/popper.json
+++ b/docs/pages/material-ui/api/popper.json
@@ -11,11 +11,15 @@
"component": { "type": { "name": "elementType" } },
"components": {
"type": { "name": "shape", "description": "{ Root?: elementType }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. How to migrate ."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ root?: func | object }" },
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. How to migrate ."
},
"container": { "type": { "name": "union", "description": "HTML element | func" } },
"disablePortal": { "type": { "name": "bool" }, "default": "false" },
diff --git a/docs/pages/material-ui/api/tooltip.json b/docs/pages/material-ui/api/tooltip.json
index bf857d230f1b75..da38990cf9ce1d 100644
--- a/docs/pages/material-ui/api/tooltip.json
+++ b/docs/pages/material-ui/api/tooltip.json
@@ -8,14 +8,18 @@
"name": "shape",
"description": "{ Arrow?: elementType, Popper?: elementType, Tooltip?: elementType, Transition?: elementType }"
},
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slots
prop instead. This prop will be removed in v7. How to migrate ."
},
"componentsProps": {
"type": {
"name": "shape",
"description": "{ arrow?: object, popper?: object, tooltip?: object, transition?: object }"
},
- "default": "{}"
+ "default": "{}",
+ "deprecated": true,
+ "deprecationInfo": "use the slotProps
prop instead. This prop will be removed in v7. How to migrate ."
},
"describeChild": { "type": { "name": "bool" }, "default": "false" },
"disableFocusListener": { "type": { "name": "bool" }, "default": "false" },
diff --git a/docs/pages/material-ui/experimental-api/css-theme-variables/usage.js b/docs/pages/material-ui/customization/css-theme-variables/configuration.js
similarity index 74%
rename from docs/pages/material-ui/experimental-api/css-theme-variables/usage.js
rename to docs/pages/material-ui/customization/css-theme-variables/configuration.js
index 497c44f45569f2..e4641afb30117a 100644
--- a/docs/pages/material-ui/experimental-api/css-theme-variables/usage.js
+++ b/docs/pages/material-ui/customization/css-theme-variables/configuration.js
@@ -4,7 +4,7 @@ import {
demos,
docs,
demoComponents,
-} from 'docs/data/material/experimental-api/css-theme-variables/usage/usage.md?muiMarkdown';
+} from 'docs/data/material/customization/css-theme-variables/configuration.md?muiMarkdown';
export default function Page() {
return ;
diff --git a/docs/pages/material-ui/experimental-api/css-theme-variables/overview.js b/docs/pages/material-ui/customization/css-theme-variables/overview.js
similarity index 74%
rename from docs/pages/material-ui/experimental-api/css-theme-variables/overview.js
rename to docs/pages/material-ui/customization/css-theme-variables/overview.js
index 4eeebce4de29b6..0c73e3264aa8a0 100644
--- a/docs/pages/material-ui/experimental-api/css-theme-variables/overview.js
+++ b/docs/pages/material-ui/customization/css-theme-variables/overview.js
@@ -4,7 +4,7 @@ import {
demos,
docs,
demoComponents,
-} from 'docs/data/material/experimental-api/css-theme-variables/overview.md?muiMarkdown';
+} from 'docs/data/material/customization/css-theme-variables/overview.md?muiMarkdown';
export default function Page() {
return ;
diff --git a/docs/pages/material-ui/experimental-api/css-theme-variables/migration.js b/docs/pages/material-ui/customization/css-theme-variables/usage.js
similarity index 74%
rename from docs/pages/material-ui/experimental-api/css-theme-variables/migration.js
rename to docs/pages/material-ui/customization/css-theme-variables/usage.js
index a196acdc43008c..8b2ce0b00358ef 100644
--- a/docs/pages/material-ui/experimental-api/css-theme-variables/migration.js
+++ b/docs/pages/material-ui/customization/css-theme-variables/usage.js
@@ -4,7 +4,7 @@ import {
demos,
docs,
demoComponents,
-} from 'docs/data/material/experimental-api/css-theme-variables/migration.md?muiMarkdown';
+} from 'docs/data/material/customization/css-theme-variables/usage/usage.md?muiMarkdown';
export default function Page() {
return ;
diff --git a/docs/pages/material-ui/discover-more/design-kits.js b/docs/pages/material-ui/discover-more/design-kits.js
deleted file mode 100644
index 61f8faebcc7007..00000000000000
--- a/docs/pages/material-ui/discover-more/design-kits.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import * as React from 'react';
-import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
-import * as pageProps from 'docs/data/material/discover-more/design-kits/design-kits.md?muiMarkdown';
-
-export default function Page() {
- return ;
-}
diff --git a/docs/pages/material-ui/experimental-api/css-theme-variables/customization.js b/docs/pages/material-ui/migration/migration-css-theme-variables.js
similarity index 73%
rename from docs/pages/material-ui/experimental-api/css-theme-variables/customization.js
rename to docs/pages/material-ui/migration/migration-css-theme-variables.js
index 53d9eec8396886..83ceb99d825d1e 100644
--- a/docs/pages/material-ui/experimental-api/css-theme-variables/customization.js
+++ b/docs/pages/material-ui/migration/migration-css-theme-variables.js
@@ -4,7 +4,7 @@ import {
demos,
docs,
demoComponents,
-} from 'docs/data/material/experimental-api/css-theme-variables/customization.md?muiMarkdown';
+} from 'docs/data/material/migration/migration-v5/migration-css-theme-variables.md?muiMarkdown';
export default function Page() {
return ;
diff --git a/docs/public/_redirects b/docs/public/_redirects
index fe5b414f634110..0238ec6ee87a7d 100644
--- a/docs/public/_redirects
+++ b/docs/public/_redirects
@@ -508,6 +508,10 @@ https://v4.material-ui.com/* https://v4.mui.com/:splat 301!
/material-ui/guides/right-to-left/ /material-ui/customization/right-to-left/ 301
/material-ui/guides/pickers-migration/ /material-ui/migration/pickers-migration/ 301
/material-ui/guides/styled-components/ /material-ui/integrations/styled-components/ 301
+/material-ui/experimental-api/css-theme-variables/migration/ /material-ui/migration/migration-css-theme-variables/ 301
+/material-ui/experimental-api/css-theme-variables/overview/ /material-ui/customization/css-theme-variables/overview/ 301
+/material-ui/experimental-api/css-theme-variables/usage/ /material-ui/customization/css-theme-variables/usage/ 301
+/material-ui/experimental-api/css-theme-variables/customization/ /material-ui/customization/css-theme-variables/configuration/ 301
# Proxies
diff --git a/docs/public/static/branding/about/nikita-ossei.png b/docs/public/static/branding/about/nikita-ossei.png
new file mode 100644
index 00000000000000..efc26faffa1ecc
Binary files /dev/null and b/docs/public/static/branding/about/nikita-ossei.png differ
diff --git a/docs/public/static/branding/mui-x/Mocktable-dark.png b/docs/public/static/branding/mui-x/Mocktable-dark.png
deleted file mode 100644
index c694b7fe68f7b0..00000000000000
Binary files a/docs/public/static/branding/mui-x/Mocktable-dark.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/Mocktable-light.png b/docs/public/static/branding/mui-x/Mocktable-light.png
deleted file mode 100644
index 486b70d8b7b86c..00000000000000
Binary files a/docs/public/static/branding/mui-x/Mocktable-light.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/card.png b/docs/public/static/branding/mui-x/card.png
deleted file mode 100644
index 3f2f963681c61e..00000000000000
Binary files a/docs/public/static/branding/mui-x/card.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-dark1.png b/docs/public/static/branding/mui-x/chart-dark1.png
deleted file mode 100644
index 20546632336f4e..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-dark1.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-dark2.png b/docs/public/static/branding/mui-x/chart-dark2.png
deleted file mode 100644
index 86a71206c342d1..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-dark2.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-dark3.png b/docs/public/static/branding/mui-x/chart-dark3.png
deleted file mode 100644
index 59e2f0f41bd1f0..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-dark3.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-dark4.png b/docs/public/static/branding/mui-x/chart-dark4.png
deleted file mode 100644
index cfa52eefa07c7e..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-dark4.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-light1.png b/docs/public/static/branding/mui-x/chart-light1.png
deleted file mode 100644
index 4ba600e7960d35..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-light1.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-light2.png b/docs/public/static/branding/mui-x/chart-light2.png
deleted file mode 100644
index 5e6046d56e6171..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-light2.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-light3.png b/docs/public/static/branding/mui-x/chart-light3.png
deleted file mode 100644
index 3ffb622496cdf4..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-light3.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/chart-light4.png b/docs/public/static/branding/mui-x/chart-light4.png
deleted file mode 100644
index ee0074033faed7..00000000000000
Binary files a/docs/public/static/branding/mui-x/chart-light4.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/sparkline-dark1.png b/docs/public/static/branding/mui-x/sparkline-dark1.png
deleted file mode 100644
index d1dce2120aefd8..00000000000000
Binary files a/docs/public/static/branding/mui-x/sparkline-dark1.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/sparkline-dark2.png b/docs/public/static/branding/mui-x/sparkline-dark2.png
deleted file mode 100644
index 02032bde731dd6..00000000000000
Binary files a/docs/public/static/branding/mui-x/sparkline-dark2.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/sparkline-light1.png b/docs/public/static/branding/mui-x/sparkline-light1.png
deleted file mode 100644
index 19bb11632260c3..00000000000000
Binary files a/docs/public/static/branding/mui-x/sparkline-light1.png and /dev/null differ
diff --git a/docs/public/static/branding/mui-x/sparkline-light2.png b/docs/public/static/branding/mui-x/sparkline-light2.png
deleted file mode 100644
index 381fc8fa041a68..00000000000000
Binary files a/docs/public/static/branding/mui-x/sparkline-light2.png and /dev/null differ
diff --git a/docs/public/static/images/avatar/1-sm.jpeg b/docs/public/static/images/avatar/1-sm.jpeg
deleted file mode 100644
index 93e9670dd12104..00000000000000
Binary files a/docs/public/static/images/avatar/1-sm.jpeg and /dev/null differ
diff --git a/docs/public/static/images/avatar/3-sm.jpeg b/docs/public/static/images/avatar/3-sm.jpeg
deleted file mode 100644
index 708f9e7c340ecc..00000000000000
Binary files a/docs/public/static/images/avatar/3-sm.jpeg and /dev/null differ
diff --git a/docs/public/static/images/download-adobe-xd.svg b/docs/public/static/images/download-adobe-xd.svg
deleted file mode 100644
index 4b4f1892a23ec1..00000000000000
--- a/docs/public/static/images/download-adobe-xd.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/docs/public/static/images/download-figma.svg b/docs/public/static/images/download-figma.svg
deleted file mode 100644
index 02948cca319cd0..00000000000000
--- a/docs/public/static/images/download-figma.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/docs/public/static/images/download-sketch.svg b/docs/public/static/images/download-sketch.svg
deleted file mode 100644
index bf9aefdfb9c95f..00000000000000
--- a/docs/public/static/images/download-sketch.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/docs/public/static/images/packages/mui-packages.png b/docs/public/static/images/packages/mui-packages.png
deleted file mode 100644
index 86e549189acccd..00000000000000
Binary files a/docs/public/static/images/packages/mui-packages.png and /dev/null differ
diff --git a/docs/public/static/images/packages/mui-system.png b/docs/public/static/images/packages/mui-system.png
deleted file mode 100644
index d27e7bf2445946..00000000000000
Binary files a/docs/public/static/images/packages/mui-system.png and /dev/null differ
diff --git a/docs/public/static/images/survey/table-contents-banner.png b/docs/public/static/images/survey/table-contents-banner.png
deleted file mode 100644
index f9bb6c1fe36e8f..00000000000000
Binary files a/docs/public/static/images/survey/table-contents-banner.png and /dev/null differ
diff --git a/docs/public/static/images/templates/dashboard-dark.png b/docs/public/static/images/templates/dashboard-dark.png
index 42984725db85dc..5caee83f9c31a3 100644
Binary files a/docs/public/static/images/templates/dashboard-dark.png and b/docs/public/static/images/templates/dashboard-dark.png differ
diff --git a/docs/public/static/images/templates/dashboard-light.png b/docs/public/static/images/templates/dashboard-light.png
index e93b5e52c57954..721390ed90afe6 100644
Binary files a/docs/public/static/images/templates/dashboard-light.png and b/docs/public/static/images/templates/dashboard-light.png differ
diff --git a/docs/public/static/images/themes-dark.jpg b/docs/public/static/images/themes-dark.jpg
deleted file mode 100644
index d68d2ae9a0c481..00000000000000
Binary files a/docs/public/static/images/themes-dark.jpg and /dev/null differ
diff --git a/docs/public/static/images/themes-light.jpg b/docs/public/static/images/themes-light.jpg
deleted file mode 100644
index 5361d25cc7223d..00000000000000
Binary files a/docs/public/static/images/themes-light.jpg and /dev/null differ
diff --git a/docs/public/static/themes/onepirate.jpg b/docs/public/static/themes/onepirate.jpg
deleted file mode 100644
index 3886affc8c9e1f..00000000000000
Binary files a/docs/public/static/themes/onepirate.jpg and /dev/null differ
diff --git a/docs/public/static/themes/paperbase.png b/docs/public/static/themes/paperbase.png
deleted file mode 100644
index 0544363a22ab8e..00000000000000
Binary files a/docs/public/static/themes/paperbase.png and /dev/null differ
diff --git a/docs/src/BrandingCssVarsProvider.tsx b/docs/src/BrandingCssVarsProvider.tsx
index 6cd467f1c10f9d..06b7a6197a67fc 100644
--- a/docs/src/BrandingCssVarsProvider.tsx
+++ b/docs/src/BrandingCssVarsProvider.tsx
@@ -1,10 +1,6 @@
import * as React from 'react';
import { deepmerge } from '@mui/utils';
-import {
- Experimental_CssVarsProvider as CssVarsProvider,
- experimental_extendTheme as extendTheme,
- PaletteColorOptions,
-} from '@mui/material/styles';
+import { CssVarsProvider, extendTheme, PaletteColorOptions } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { NextNProgressBar } from 'docs/src/modules/components/AppFrame';
import { getDesignTokens, getThemedComponents } from '@mui/docs/branding';
diff --git a/docs/src/components/about/HowToSupport.tsx b/docs/src/components/about/HowToSupport.tsx
index 128763cae41126..880347d3782e78 100644
--- a/docs/src/components/about/HowToSupport.tsx
+++ b/docs/src/components/about/HowToSupport.tsx
@@ -21,7 +21,7 @@ function Widget({
}: {
children: React.ReactNode;
title: string;
- icon: React.ReactElement;
+ icon: React.ReactElement;
}) {
return (
`;
+
+const logoWordmarkSvg = ` `;
+
+interface MuiLogoMenuProps {
+ marginLeft?: boolean;
+ smallerMargin?: boolean;
+}
+
+export default function MuiLogoMenu({ smallerMargin, marginLeft }: MuiLogoMenuProps) {
+ const [contextMenu, setContextMenu] = React.useState<{
+ mouseX: number;
+ mouseY: number;
+ } | null>(null);
+
+ const handleContextMenu = (event: React.MouseEvent) => {
+ event.preventDefault();
+ setContextMenu(
+ contextMenu === null
+ ? {
+ mouseX: event.clientX + 8,
+ mouseY: event.clientY - 8,
+ }
+ : null,
+ );
+ };
+
+ const handleClose = () => {
+ setContextMenu(null);
+ };
+
+ const [copied, setCopied] = React.useState(false);
+ const handleCopy = (svgSnippet: string) => {
+ setCopied(true);
+ copy(svgSnippet).then(() => {
+ setTimeout(() => setCopied(false), 3500);
+ handleClose();
+ });
+ };
+
+ return (
+
+ svg': { m: '0 !important' }, // override the 2px margin-left coming from the Link component
+ mr: smallerMargin ? 1 : 1.5,
+ ml: marginLeft ? 1.5 : undefined,
+ cursor: 'default',
+ }}
+ >
+
+
+ ({
+ '& .MuiMenuItem-root': {
+ '& * path, .MuiSvgIcon-root': {
+ fill: (theme.vars || theme).palette.text.tertiary,
+ color: (theme.vars || theme).palette.text.tertiary,
+ },
+ '&:hover, &:focus-visible': {
+ '& * path, .MuiSvgIcon-root': {
+ fill: (theme.vars || theme).palette.text.primary,
+ color: (theme.vars || theme).palette.text.primary,
+ },
+ },
+ },
+ })}
+ >
+ handleCopy(logoSvg)}>
+
+ Copy logo as SVG
+
+ handleCopy(logoWordmarkSvg)}>
+
+ Copy wordmark as SVG
+
+
+ document.body}>
+
+
+ Logo SVG copied to clipboard!
+
+ }
+ />
+
+
+ );
+}
diff --git a/docs/src/components/action/StylingInfo.tsx b/docs/src/components/action/StylingInfo.tsx
index 8e9eea208c0573..840ee3330149d0 100644
--- a/docs/src/components/action/StylingInfo.tsx
+++ b/docs/src/components/action/StylingInfo.tsx
@@ -12,7 +12,7 @@ export default function StylingInfo({
appeared,
stylingContent,
...props
-}: { appeared: boolean; stylingContent?: React.ReactElement } & BoxProps) {
+}: { appeared: boolean; stylingContent?: React.ReactElement } & BoxProps) {
const [hidden, setHidden] = React.useState(false);
const defaultContent = (
diff --git a/docs/src/components/header/HeaderNavBar.tsx b/docs/src/components/header/HeaderNavBar.tsx
index a2c3f3fadff065..f135aa52fb9138 100644
--- a/docs/src/components/header/HeaderNavBar.tsx
+++ b/docs/src/components/header/HeaderNavBar.tsx
@@ -75,12 +75,12 @@ const PRODUCT_IDS = [
];
type ProductSubMenuProps = {
- icon: React.ReactElement;
+ icon: React.ReactElement;
name: React.ReactNode;
description: React.ReactNode;
chip?: React.ReactNode;
href: string;
-} & Omit;
+} & Omit;
const ProductSubMenu = React.forwardRef(
function ProductSubMenu({ icon, name, description, chip, href, ...props }, ref) {
diff --git a/docs/src/components/header/ThemeModeToggle.tsx b/docs/src/components/header/ThemeModeToggle.tsx
index fda2d61676d99d..05bfa95bb8ea14 100644
--- a/docs/src/components/header/ThemeModeToggle.tsx
+++ b/docs/src/components/header/ThemeModeToggle.tsx
@@ -14,6 +14,7 @@ function CssVarsModeToggle(props: { onChange: (newMode: string) => void }) {
{
@@ -51,6 +52,7 @@ export default function ThemeModeToggle() {
{
setMode(calculatedMode === 'dark' ? 'light' : 'dark');
diff --git a/docs/src/components/home/MaterialDesignComponents.tsx b/docs/src/components/home/MaterialDesignComponents.tsx
index c83c844faec8c4..890441d426fe9d 100644
--- a/docs/src/components/home/MaterialDesignComponents.tsx
+++ b/docs/src/components/home/MaterialDesignComponents.tsx
@@ -4,8 +4,8 @@ import {
Theme,
ThemeOptions,
alpha,
- experimental_extendTheme as extendTheme,
- Experimental_CssVarsProvider as CssVarsProvider,
+ extendTheme,
+ CssVarsProvider,
} from '@mui/material/styles';
import { capitalize } from '@mui/material/utils';
import Alert from '@mui/material/Alert';
@@ -125,7 +125,7 @@ function Demo({
}: {
name: string;
theme: Theme | undefined;
- children: React.ReactElement;
+ children: React.ReactElement;
control?: { prop: string; values: Array; defaultValue?: string };
}) {
const [propValue, setPropValue] = React.useState(
diff --git a/docs/src/components/home/StoreTemplatesBanner.tsx b/docs/src/components/home/StoreTemplatesBanner.tsx
index b71858367e3545..3c074746c06428 100644
--- a/docs/src/components/home/StoreTemplatesBanner.tsx
+++ b/docs/src/components/home/StoreTemplatesBanner.tsx
@@ -100,7 +100,7 @@ const StoreTemplateLink = React.forwardRef<
const StoreTemplateImage = React.forwardRef<
HTMLImageElement,
- { brand: TemplateBrand } & Omit
+ { brand: TemplateBrand } & Omit
>(function StoreTemplateImage({ brand, ...props }, ref) {
return (
;
};
}) {
return (
diff --git a/docs/src/components/icon/IconImage.tsx b/docs/src/components/icon/IconImage.tsx
index 0e6c75d91ed790..1b6809d16d98cf 100644
--- a/docs/src/components/icon/IconImage.tsx
+++ b/docs/src/components/icon/IconImage.tsx
@@ -40,7 +40,7 @@ export type IconImageProps = {
mode?: '' | 'light' | 'dark';
sx?: SxProps;
width?: number;
-} & Omit;
+} & Omit;
const Img = styled('img')({ display: 'inline-block', verticalAlign: 'bottom' });
diff --git a/docs/src/components/pricing/PricingTable.tsx b/docs/src/components/pricing/PricingTable.tsx
index c342fed6910a1e..bfb7cbff5b33ea 100644
--- a/docs/src/components/pricing/PricingTable.tsx
+++ b/docs/src/components/pricing/PricingTable.tsx
@@ -382,7 +382,11 @@ function Cell({ highlighted = false, ...props }: BoxProps & { highlighted?: bool
);
}
-function RowHead({ children, startIcon, ...props }: BoxProps & { startIcon?: React.ReactElement }) {
+function RowHead({
+ children,
+ startIcon,
+ ...props
+}: BoxProps & { startIcon?: React.ReactElement }) {
return (
(
- function StyledFloatingLabelInput(props, ref) {
- const id = unstable_useId(props.id);
- return (
-
-
- Floating label
-
- );
- },
-);
+const StyledFloatingLabelInput = React.forwardRef<
+ HTMLInputElement,
+ React.JSX.IntrinsicElements['input']
+>(function StyledFloatingLabelInput(props, ref) {
+ const id = unstable_useId(props.id);
+ return (
+
+
+ Floating label
+
+ );
+});
-const FloatingLabelInput = React.forwardRef(
+const FloatingLabelInput = React.forwardRef(
function FloatingLabelInput(props, ref) {
const id = unstable_useId(props.id);
return (
@@ -121,7 +122,7 @@ const FloatingLabelInput = React.forwardRef(function TailwindFloatingLabelInput({ ownerState, ...props }, ref) {
const id = unstable_useId(props.id);
@@ -192,7 +193,7 @@ const Field = styled('div')\`${fieldStyles}\`;
const StyledInput = styled('input')\`${inputStyles}/\`;
const FloatingLabelInput = React.forwardRef<
- HTMLInputElement, JSX.IntrinsicElements['input']
+ HTMLInputElement, React.JSX.IntrinsicElements['input']
>(
function FloatingLabelInput(props, ref) {
const id = unstable_useId(props.id);
@@ -219,7 +220,7 @@ const FloatingLabelInput = React.forwardRef<
import './styles.css';
const FloatingLabelInput = React.forwardRef<
- HTMLInputElement, JSX.IntrinsicElements['input']
+ HTMLInputElement, React.JSX.IntrinsicElements['input']
>(
function FloatingLabelInput(props, ref) {
const id = unstable_useId(props.id);
diff --git a/docs/src/components/productMaterial/MaterialComponents.tsx b/docs/src/components/productMaterial/MaterialComponents.tsx
index 08dd1449262faf..ec9be48156e150 100644
--- a/docs/src/components/productMaterial/MaterialComponents.tsx
+++ b/docs/src/components/productMaterial/MaterialComponents.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Experimental_CssVarsProvider as CssVarsProvider, alpha } from '@mui/material/styles';
+import { CssVarsProvider, alpha } from '@mui/material/styles';
import Box from '@mui/material/Box';
import Alert from '@mui/material/Alert';
import Button, { buttonClasses } from '@mui/material/Button';
diff --git a/docs/src/components/productMaterial/MaterialHero.tsx b/docs/src/components/productMaterial/MaterialHero.tsx
index dd37121529358d..803fa87c9b345f 100644
--- a/docs/src/components/productMaterial/MaterialHero.tsx
+++ b/docs/src/components/productMaterial/MaterialHero.tsx
@@ -1,8 +1,5 @@
import * as React from 'react';
-import {
- experimental_extendTheme as extendTheme,
- Experimental_CssVarsProvider as CssVarsProvider,
-} from '@mui/material/styles';
+import { extendTheme, CssVarsProvider } from '@mui/material/styles';
import Alert from '@mui/material/Alert';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
diff --git a/docs/src/components/productMaterial/MaterialTheming.tsx b/docs/src/components/productMaterial/MaterialTheming.tsx
index a0c3560bbaebf1..abab393a9a15d9 100644
--- a/docs/src/components/productMaterial/MaterialTheming.tsx
+++ b/docs/src/components/productMaterial/MaterialTheming.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
+import { CssVarsProvider } from '@mui/material/styles';
import Grid from '@mui/material/Unstable_Grid2';
import Typography from '@mui/material/Typography';
import AutoAwesomeRounded from '@mui/icons-material/AutoAwesomeRounded';
diff --git a/docs/src/components/productX/XRoadmap.tsx b/docs/src/components/productX/XRoadmap.tsx
index fc3803d400f5aa..a396a0f934fc1e 100644
--- a/docs/src/components/productX/XRoadmap.tsx
+++ b/docs/src/components/productX/XRoadmap.tsx
@@ -41,7 +41,7 @@ function RoadmapStatusDot({ color }: RoadmapStatusDotProps) {
}
export default function XRoadmap() {
- function renderList(content: React.ReactElement, nested?: boolean) {
+ function renderList(content: React.ReactElement, nested?: boolean) {
return (
shouldForwardProp(prop) && prop !== 'src' && prop !== 'ratio',
-})<{ ratio: number; src: string }>(({ src, ratio, theme }) => ({
- height: 0,
- backgroundImage: `url(${src})`,
- backgroundRepeat: 'no-repeat',
- backgroundSize: 'contain',
- paddingBottom: `${(1 / ratio) * 100}%`,
- margin: 'auto',
- ...theme.applyDarkStyles({
- backgroundImage: `url(${src.replace('-light', '-dark')})`,
- }),
-}));
-
-export default function XSparklineDemo() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Coming soon!
-
-
-
-
- Subscribe to our newsletter to get first-hand info about the development and release of
- new components.
-
-
-
-
-
- );
-}
diff --git a/docs/src/components/productX/XTheming.tsx b/docs/src/components/productX/XTheming.tsx
index 62f34c9db157a3..bd9562419fa549 100644
--- a/docs/src/components/productX/XTheming.tsx
+++ b/docs/src/components/productX/XTheming.tsx
@@ -6,7 +6,7 @@ import {
GridRenderEditCellParams,
} from '@mui/x-data-grid-pro';
import { useDemoData } from '@mui/x-data-grid-generator';
-import { Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
+import { CssVarsProvider } from '@mui/material/styles';
import { red } from '@mui/material/colors';
import Grid from '@mui/material/Unstable_Grid2';
import Typography from '@mui/material/Typography';
diff --git a/docs/src/components/showcase/NotificationCard.tsx b/docs/src/components/showcase/NotificationCard.tsx
index ab0f3097c1b409..ca926101b20191 100644
--- a/docs/src/components/showcase/NotificationCard.tsx
+++ b/docs/src/components/showcase/NotificationCard.tsx
@@ -42,7 +42,7 @@ export default function NotificationCard() {
>
diff --git a/docs/src/components/showcase/ViewToggleButton.tsx b/docs/src/components/showcase/ViewToggleButton.tsx
index 17175c58b79d75..e4c155cbd9c987 100644
--- a/docs/src/components/showcase/ViewToggleButton.tsx
+++ b/docs/src/components/showcase/ViewToggleButton.tsx
@@ -11,7 +11,7 @@ const views = ['quilt', 'module', 'agenda', 'week', 'sidebar'] as const;
type View = (typeof views)[number];
-const viewIcons: Record = {
+const viewIcons: Record> = {
quilt: ,
module: ,
agenda: ,
diff --git a/docs/src/components/typography/SectionHeadline.tsx b/docs/src/components/typography/SectionHeadline.tsx
index b2b587eee4595b..b1e30e3eb76611 100644
--- a/docs/src/components/typography/SectionHeadline.tsx
+++ b/docs/src/components/typography/SectionHeadline.tsx
@@ -11,7 +11,7 @@ interface SectionHeadlineProps {
*/
inverted?: boolean;
overline?: React.ReactNode;
- title: string | React.ReactElement;
+ title: string | React.ReactElement;
}
export default function SectionHeadline(props: SectionHeadlineProps) {
diff --git a/docs/src/icons/SvgHamburgerMenu.tsx b/docs/src/icons/SvgHamburgerMenu.tsx
index e47c00f841f79b..834d16372b7b6a 100644
--- a/docs/src/icons/SvgHamburgerMenu.tsx
+++ b/docs/src/icons/SvgHamburgerMenu.tsx
@@ -5,8 +5,8 @@ export default function SvgHamburgerMenu(props: RootSvgProps) {
return (
diff --git a/docs/src/layouts/AppHeader.tsx b/docs/src/layouts/AppHeader.tsx
index 7c8d9de1f13614..058366525e0f5a 100644
--- a/docs/src/layouts/AppHeader.tsx
+++ b/docs/src/layouts/AppHeader.tsx
@@ -7,11 +7,10 @@ import Container from '@mui/material/Container';
import Tooltip from '@mui/material/Tooltip';
import IconButton from '@mui/material/IconButton';
import GitHubIcon from '@mui/icons-material/GitHub';
-import SvgMuiLogomark from 'docs/src/icons/SvgMuiLogomark';
+import MuiLogoMenu from 'docs/src/components/action/MuiLogoMenu';
import HeaderNavBar from 'docs/src/components/header/HeaderNavBar';
import HeaderNavDropdown from 'docs/src/components/header/HeaderNavDropdown';
import ThemeModeToggle from 'docs/src/components/header/ThemeModeToggle';
-import { Link } from '@mui/docs/Link';
import { DeferredAppSearch } from 'docs/src/modules/components/AppFrame';
import { useTranslate } from '@mui/docs/i18n';
@@ -51,9 +50,7 @@ export default function AppHeader(props: AppHeaderProps) {
}}
/>
-
-
-
+
@@ -64,6 +61,7 @@ export default function AppHeader(props: AppHeaderProps) {
;
linearGradient?: boolean;
- right: React.ReactElement;
+ right: React.ReactElement;
rightSx?: BoxProps['sx'];
}
@@ -138,14 +138,14 @@ export default function HeroContainer(props: HeroContainerProps) {
-
+
{left}
diff --git a/docs/src/modules/components/ApiPage.js b/docs/src/modules/components/ApiPage.js
index 6561be4775cd11..d2189cf882ce16 100644
--- a/docs/src/modules/components/ApiPage.js
+++ b/docs/src/modules/components/ApiPage.js
@@ -3,17 +3,17 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { exactProp } from '@mui/utils';
import Typography from '@mui/material/Typography';
-import AdGuest from 'docs/src/modules/components/AdGuest';
import Alert from '@mui/material/Alert';
+import AdGuest from 'docs/src/modules/components/AdGuest';
import VerifiedRoundedIcon from '@mui/icons-material/VerifiedRounded';
-import { alpha } from '@mui/material/styles';
+import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
import { useTranslate, useUserLanguage } from '@mui/docs/i18n';
import { HighlightedCode } from '@mui/docs/HighlightedCode';
+import { BrandingProvider } from '@mui/docs/branding';
+import { SectionTitle } from '@mui/docs/SectionTitle';
import MarkdownElement from 'docs/src/modules/components/MarkdownElement';
import AppLayoutDocs from 'docs/src/modules/components/AppLayoutDocs';
import Ad from 'docs/src/modules/components/Ad';
-import { BrandingProvider } from '@mui/docs/branding';
-import { SectionTitle } from '@mui/docs/SectionTitle';
import PropertiesSection, {
getPropsToC,
} from 'docs/src/modules/components/ApiPage/sections/PropertiesSection';
@@ -72,6 +72,7 @@ export default function ApiPage(props) {
const {
cssComponent,
demos,
+ deprecated,
filename,
forwardsRefTo,
inheritance,
@@ -104,6 +105,7 @@ export default function ApiPage(props) {
componentDescription,
componentDescriptionToc = [],
classDescriptions,
+ deprecationInfo,
propDescriptions,
slotDescriptions,
} = descriptions[userLanguage];
@@ -180,6 +182,19 @@ export default function ApiPage(props) {
>
{pageContent.name} API
+ {deprecated ? (
+ }
+ sx={{ mt: 1.5, mb: 3 }}
+ >
+
+
+ ) : null}
{description}
{disableAd ? null : (
@@ -191,46 +206,7 @@ export default function ApiPage(props) {
)}
- }
- sx={[
- (theme) => ({
- mt: 1.5,
- pt: 1,
- px: 2,
- pb: 0,
- fontSize: theme.typography.pxToRem(16),
- backgroundColor: (theme.vars || theme).palette.success[50],
- borderColor: (theme.vars || theme).palette.success[100],
- '& .MuiAlert-message': {
- '& * p': {
- color: (theme.vars || theme).palette.text.primary,
- mb: 1,
- },
- '& * a': {
- fontWeight: theme.typography.fontWeightMedium,
- color: (theme.vars || theme).palette.success[900],
- textDecorationColor: alpha(theme.palette.success[600], 0.3),
- },
- },
- ...theme.applyDarkStyles({
- backgroundColor: alpha(theme.palette.success[700], 0.12),
- borderColor: alpha(theme.palette.success[400], 0.1),
- '& .MuiAlert-message': {
- ul: {
- pl: 3,
- },
- '& * a': {
- color: (theme.vars || theme).palette.success[100],
- textDecorationColor: alpha(theme.palette.success[100], 0.3),
- },
- },
- }),
- }),
- ]}
- >
+ }>
For examples and details on the usage of this React component, visit the component demo pages:
diff --git a/docs/src/modules/components/ApiPage/ApiWarning.tsx b/docs/src/modules/components/ApiPage/ApiWarning.tsx
deleted file mode 100644
index be5457e4e48a48..00000000000000
--- a/docs/src/modules/components/ApiPage/ApiWarning.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import * as React from 'react';
-import { alpha } from '@mui/system';
-import { styled } from '@mui/material/styles';
-import Alert from '@mui/material/Alert';
-import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
-import {
- brandingDarkTheme as darkTheme,
- brandingLightTheme as lightTheme,
-} from '@mui/docs/branding';
-
-const StyledAlert = styled(Alert)(
- ({ theme }) => ({
- '&.MuiAlert-standardWarning': {
- alignItems: 'center',
- padding: '2px 12px',
- fontWeight: theme.typography.fontWeightRegular,
- color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
- backgroundColor: alpha(lightTheme.palette.warning[50], 0.5),
- borderColor: `var(--muidocs-palette-warning-200, ${lightTheme.palette.warning[200]})`,
- '& .MuiAlert-icon': {
- height: 'fit-content',
- padding: 0,
- },
- '& code': { all: 'unset' },
- '& strong': {
- color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`,
- },
- '& svg': {
- fill: `var(--muidocs-palette-warning-600, ${lightTheme.palette.warning[600]})`,
- },
- '& a': {
- color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`,
- textDecorationColor: alpha(lightTheme.palette.warning.main, 0.4),
- '&:hover': {
- textDecorationColor: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`,
- },
- },
- },
- }),
- ({ theme }) => ({
- [`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
- '&.MuiAlert-standardWarning': {
- color: `var(--muidocs-palette-warning-50, ${darkTheme.palette.warning[50]})`,
- backgroundColor: alpha(darkTheme.palette.warning[700], 0.15),
- borderColor: alpha(darkTheme.palette.warning[600], 0.3),
- '& strong': {
- color: `var(--muidocs-palette-warning-200, ${darkTheme.palette.warning[200]})`,
- },
- '& svg': {
- fill: `var(--muidocs-palette-warning-400, ${darkTheme.palette.warning[400]})`,
- },
- '& a': {
- color: `var(--muidocs-palette-warning-200, ${darkTheme.palette.warning[200]})`,
- textDecorationColor: alpha(darkTheme.palette.warning.main, 0.4),
- '&:hover': {
- textDecorationColor: `var(--muidocs-palette-warning-200, ${darkTheme.palette.warning[200]})`,
- },
- },
- },
- },
- }),
-);
-
-interface DeprecationAlertProps {
- children?: React.ReactNode;
- className?: string;
-}
-
-export default function ApiWarning({ children, className }: DeprecationAlertProps) {
- return (
- }
- >
- {children}
-
- );
-}
diff --git a/docs/src/modules/components/ApiPage/ApiWarningAlert.tsx b/docs/src/modules/components/ApiPage/ApiWarningAlert.tsx
new file mode 100644
index 00000000000000..bfec92a352174b
--- /dev/null
+++ b/docs/src/modules/components/ApiPage/ApiWarningAlert.tsx
@@ -0,0 +1,21 @@
+import * as React from 'react';
+import Alert from '@mui/material/Alert';
+import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
+
+interface ApiWarningAlertProps {
+ children?: React.ReactNode;
+ className?: string;
+}
+
+export default function ApiWarningAlert({ children, className }: ApiWarningAlertProps) {
+ return (
+ }
+ sx={{ fontSize: '0.875rem', mt: '12px' }}
+ >
+ {children}
+
+ );
+}
diff --git a/docs/src/modules/components/ApiPage/list/ClassesList.tsx b/docs/src/modules/components/ApiPage/list/ClassesList.tsx
index 5a31850fce8a07..4e20b6e72eab4a 100644
--- a/docs/src/modules/components/ApiPage/list/ClassesList.tsx
+++ b/docs/src/modules/components/ApiPage/list/ClassesList.tsx
@@ -11,7 +11,7 @@ import {
brandingLightTheme as lightTheme,
brandingDarkTheme as darkTheme,
} from '@mui/docs/branding';
-import ApiWarning from 'docs/src/modules/components/ApiPage/ApiWarning';
+import ApiWarningAlert from 'docs/src/modules/components/ApiPage/ApiWarningAlert';
const StyledApiItem = styled(ExpandableApiItem)(
({ theme }) => ({
@@ -34,10 +34,6 @@ const StyledApiItem = styled(ExpandableApiItem)(
color: `var(--muidocs-palette-warning-700, ${lightTheme.palette.warning[700]})`,
},
},
- '& .classes-list-alert': {
- marginTop: 12,
- marginBottom: 16,
- },
}),
({ theme }) => ({
[`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
@@ -101,7 +97,7 @@ export default function ClassesList(props: ClassesListProps) {
)}
{isDeprecated && (
-
+
{t('api-docs.deprecated')}
{deprecationInfo && (
@@ -113,7 +109,7 @@ export default function ClassesList(props: ClassesListProps) {
/>
)}
-
+
)}
);
diff --git a/docs/src/modules/components/ApiPage/list/PropertiesList.tsx b/docs/src/modules/components/ApiPage/list/PropertiesList.tsx
index 63a7f49c933ea5..9bd1ed3d69e756 100644
--- a/docs/src/modules/components/ApiPage/list/PropertiesList.tsx
+++ b/docs/src/modules/components/ApiPage/list/PropertiesList.tsx
@@ -10,7 +10,7 @@ import {
import ExpandableApiItem, {
ApiItemContaier,
} from 'docs/src/modules/components/ApiPage/list/ExpandableApiItem';
-import ApiWarning from 'docs/src/modules/components/ApiPage/ApiWarning';
+import ApiWarningAlert from 'docs/src/modules/components/ApiPage/ApiWarningAlert';
const StyledApiItem = styled(ExpandableApiItem)(
({ theme }) => ({
@@ -42,8 +42,10 @@ const StyledApiItem = styled(ExpandableApiItem)(
},
},
'& .prop-list-alert': {
- marginTop: 12,
marginBottom: 16,
+ '& .MuiAlert-icon': {
+ margin: 0,
+ },
},
'& .prop-list-default-props': {
...theme.typography.body2,
@@ -218,13 +220,13 @@ export default function PropertiesList(props: PropertiesListProps) {
{description && }
{seeMoreDescription &&
}
{requiresRef && (
-
+
-
+
)}
{additionalInfo.map((key) => (
{isDeprecated && (
-
+
{t('api-docs.deprecated')}
{deprecationInfo && (
@@ -303,7 +305,7 @@ export default function PropertiesList(props: PropertiesListProps) {
/>
)}
-
+
)}
);
diff --git a/docs/src/modules/components/ApiPage/sections/ToggleDisplayOption.tsx b/docs/src/modules/components/ApiPage/sections/ToggleDisplayOption.tsx
index 6c379397e6a41c..9bc9fc506d8b8e 100644
--- a/docs/src/modules/components/ApiPage/sections/ToggleDisplayOption.tsx
+++ b/docs/src/modules/components/ApiPage/sections/ToggleDisplayOption.tsx
@@ -135,10 +135,10 @@ export default function ToggleDisplayOption(props: ToggleDisplayOptionProps) {
data-ga-event-action={sectionType}
data-ga-event-label="table"
>
+ Table
- Table
+ Expanded list
- Expanded list
+ Collapsed list
- Collapsed list
diff --git a/docs/src/modules/components/ApiPage/table/ClassesTable.tsx b/docs/src/modules/components/ApiPage/table/ClassesTable.tsx
index 1a33afb9ca4bb0..3eb163ec72727c 100644
--- a/docs/src/modules/components/ApiPage/table/ClassesTable.tsx
+++ b/docs/src/modules/components/ApiPage/table/ClassesTable.tsx
@@ -1,6 +1,7 @@
/* eslint-disable react/no-danger */
import * as React from 'react';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
+import { useTranslate } from '@mui/docs/i18n';
import { styled, alpha } from '@mui/material/styles';
import {
brandingDarkTheme as darkTheme,
@@ -8,8 +9,7 @@ import {
} from '@mui/docs/branding';
import { getHash } from 'docs/src/modules/components/ApiPage/list/ClassesList';
import StyledTableContainer from 'docs/src/modules/components/ApiPage/table/StyledTableContainer';
-import { useTranslate } from '@mui/docs/i18n';
-import ApiWarning from 'docs/src/modules/components/ApiPage/ApiWarning';
+import ApiWarningAlert from 'docs/src/modules/components/ApiPage/ApiWarningAlert';
const StyledTable = styled('table')(
({ theme }) => ({
@@ -37,9 +37,6 @@ const StyledTable = styled('table')(
borderColor: alpha(darkTheme.palette.primary[100], 0.8),
backgroundColor: `var(--muidocs-palette-primary-50, ${lightTheme.palette.primary[50]})`,
},
- '& .classes-table-alert': {
- marginTop: 12,
- },
}),
({ theme }) => ({
[`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
@@ -94,7 +91,7 @@ export default function ClassesTable(props: ClassesTableProps) {
}}
/>
{isDeprecated && (
-
+
{t('api-docs.deprecated')}
{deprecationInfo && (
@@ -106,7 +103,7 @@ export default function ClassesTable(props: ClassesTableProps) {
/>
)}
-
+
)}
diff --git a/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx b/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx
index b30d981b6ed8a8..a0dede795e2271 100644
--- a/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx
+++ b/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx
@@ -8,7 +8,7 @@ import {
} from '@mui/docs/branding';
import { Properties, getHash } from 'docs/src/modules/components/ApiPage/list/PropertiesList';
import StyledTableContainer from 'docs/src/modules/components/ApiPage/table/StyledTableContainer';
-import ApiWarning from 'docs/src/modules/components/ApiPage/ApiWarning';
+import ApiWarningAlert from 'docs/src/modules/components/ApiPage/ApiWarningAlert';
const StyledTable = styled('table')(
({ theme }) => ({
@@ -63,7 +63,9 @@ const StyledTable = styled('table')(
marginBottom: 0,
},
'& .prop-table-alert': {
- marginTop: 12,
+ '& .MuiAlert-icon': {
+ margin: 0,
+ },
},
},
'& .prop-table-signature': {
@@ -208,15 +210,6 @@ export default function PropertiesTable(props: PropertiesTableProps) {
className="prop-table-additional-description"
/>
)}
- {requiresRef && (
-
-
-
- )}
{additionalInfo.map((key) => (
))}
+ {requiresRef && (
+
+
+
+ )}
{isDeprecated && (
-
+
{t('api-docs.deprecated')}
{deprecationInfo && (
@@ -239,7 +241,7 @@ export default function PropertiesTable(props: PropertiesTableProps) {
/>
)}
-
+
)}
{signature && (
diff --git a/docs/src/modules/components/AppFrame.js b/docs/src/modules/components/AppFrame.js
index 08d1eb2c232786..e10728f8c6db54 100644
--- a/docs/src/modules/components/AppFrame.js
+++ b/docs/src/modules/components/AppFrame.js
@@ -7,7 +7,6 @@ import NProgress from 'nprogress';
import CssBaseline from '@mui/material/CssBaseline';
import AppBar from '@mui/material/AppBar';
import Stack from '@mui/material/Stack';
-import Toolbar from '@mui/material/Toolbar';
import IconButton from '@mui/material/IconButton';
import Tooltip from '@mui/material/Tooltip';
import Box from '@mui/material/Box';
@@ -15,7 +14,6 @@ import SettingsIcon from '@mui/icons-material/SettingsOutlined';
import GitHubIcon from '@mui/icons-material/GitHub';
import NProgressBar from '@mui/docs/NProgressBar';
import { debounce } from '@mui/material/utils';
-import NextLink from 'next/link';
import SvgHamburgerMenu from 'docs/src/icons/SvgHamburgerMenu';
import AppNavDrawer from 'docs/src/modules/components/AppNavDrawer';
import AppSettingsDrawer from 'docs/src/modules/components/AppSettingsDrawer';
@@ -24,7 +22,7 @@ import MarkdownLinks from 'docs/src/modules/components/MarkdownLinks';
import SkipLink from 'docs/src/modules/components/SkipLink';
import PageContext from 'docs/src/modules/components/PageContext';
import { useTranslate } from '@mui/docs/i18n';
-import SvgMuiLogomark from 'docs/src/icons/SvgMuiLogomark';
+import MuiLogoMenu from 'docs/src/components/action/MuiLogoMenu';
import AppFrameBanner from 'docs/src/components/banner/AppFrameBanner';
const nProgressStart = debounce(() => {
@@ -102,7 +100,7 @@ const StyledAppBar = styled(AppBar, {
shouldForwardProp: (prop) => prop !== 'disablePermanent',
})(({ disablePermanent, theme }) => {
return {
- padding: theme.spacing(1, 2),
+ padding: theme.spacing(1.5),
transition: theme.transitions.create('width'),
...(disablePermanent && {
boxShadow: 'none',
@@ -112,25 +110,19 @@ const StyledAppBar = styled(AppBar, {
width: 'calc(100% - var(--MuiDocs-navDrawer-width))',
},
}),
+ justifyContent: 'center',
boxShadow: 'none',
backdropFilter: 'blur(8px)',
- borderStyle: 'solid',
- borderColor: (theme.vars || theme).palette.divider,
- borderWidth: 0,
- borderBottomWidth: 'thin',
- backgroundColor: 'rgba(255,255,255,0.8)',
+ borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
+ backgroundColor: 'hsla(0, 0%, 100%, 0.6)',
color: (theme.vars || theme).palette.grey[800],
...theme.applyDarkStyles({
- backgroundColor: alpha(theme.palette.primaryDark[900], 0.8),
+ backgroundColor: alpha(theme.palette.primaryDark[900], 0.6),
color: (theme.vars || theme).palette.grey[500],
}),
};
});
-const GrowingDiv = styled('div')({
- flex: '1 1 auto',
-});
-
const NavIconButton = styled(IconButton, {
shouldForwardProp: (prop) => prop !== 'disablePermanent',
})(({ disablePermanent, theme }) => {
@@ -156,7 +148,7 @@ const StyledAppNavDrawer = styled(AppNavDrawer)(({ disablePermanent, theme }) =>
};
});
-export const HEIGHT = 64;
+export const HEIGHT = 57;
export default function AppFrame(props) {
const { children, disableDrawer = false, className, BannerComponent = AppFrameBanner } = props;
@@ -178,7 +170,10 @@ export default function AppFrame(props) {
-
+
-
+
setMobileOpen(true)}
@@ -197,23 +193,17 @@ export default function AppFrame(props) {
>
-
-
-
-
-
-
-
+
+
+
+
- setSettingsOpen(true)} sx={{ px: '8px' }}>
+ setSettingsOpen(true)}>
-
+
({
+ pl: 1,
+ pr: '6px',
+ height: 26,
+ fontSize: theme.typography.pxToRem(13),
+ fontWeight: theme.typography.fontWeightMedium,
+ letterSpacing: '0.01rem',
+});
+
function ProductDrawerButton(props) {
const [anchorEl, setAnchorEl] = React.useState(null);
@@ -67,26 +75,14 @@ function ProductDrawerButton(props) {
return (
}
- sx={(theme) => ({
- minWidth: 0,
- p: '1px 8px',
- fontSize: theme.typography.pxToRem(13),
- fontWeight: theme.typography.fontWeightMedium,
- color: (theme.vars || theme).palette.primary[600],
- '& svg': {
- width: 18,
- height: 18,
- },
- ...theme.applyDarkStyles({
- color: (theme.vars || theme).palette.primary[300],
- }),
- })}
+ sx={customButtonStyles}
>
{props.productName}
@@ -121,8 +117,8 @@ function ProductIdentifier(props) {
({
- ml: 1,
- fontSize: theme.typography.pxToRem(11),
+ ml: '6px',
+ fontSize: theme.typography.pxToRem(10),
fontWeight: theme.typography.fontWeightBold,
textTransform: 'uppercase',
letterSpacing: '.1rem',
@@ -184,7 +180,7 @@ PersistScroll.propTypes = {
};
const ToolbarDiv = styled('div')(({ theme }) => ({
- padding: theme.spacing(1.6, 2),
+ padding: theme.spacing(1.5),
paddingRight: 0,
flexShrink: 0,
height: 'var(--MuiDocs-header-height)',
@@ -193,6 +189,8 @@ const ToolbarDiv = styled('div')(({ theme }) => ({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
+ borderBottom: '1px solid',
+ borderColor: (theme.vars || theme).palette.divider,
}));
const StyledDrawer = styled(Drawer)(({ theme }) => ({
@@ -323,7 +321,7 @@ export default function AppNavDrawer(props) {
const drawer = React.useMemo(() => {
const navItems = renderNavItems({ onClose, pages, activePageParents, depth: 0, t });
- const renderVersionSelector = (versions, sx) => {
+ const renderVersionSelector = (versions) => {
if (!versions?.length) {
return null;
}
@@ -332,6 +330,9 @@ export default function AppNavDrawer(props) {
return (
{
setAnchorEl(event.currentTarget);
@@ -341,24 +342,7 @@ export default function AppNavDrawer(props) {
) : null
}
- sx={[
- (theme) => ({
- py: 0.1,
- minWidth: 0,
- fontSize: theme.typography.pxToRem(13),
- fontWeight: 500,
- color: (theme.vars || theme).palette.primary[600],
- '& svg': {
- ml: -0.6,
- width: 18,
- height: 18,
- },
- ...theme.applyDarkStyles({
- color: (theme.vars || theme).palette.primary[300],
- }),
- }),
- ...(Array.isArray(sx) ? sx : [sx]),
- ]}
+ sx={customButtonStyles}
>
{currentVersion.text}
@@ -392,7 +376,7 @@ export default function AppNavDrawer(props) {
onClick: onClose,
})}
>
- {item.text} {item.current && }
+ {item.text} {item.current && }
);
})}
@@ -404,28 +388,13 @@ export default function AppNavDrawer(props) {
return (
-
-
-
-
-
+
-
[
{
- minHeight: 34,
- minWidth: 34,
+ minHeight: 32,
+ minWidth: 32,
+ margin: 0,
+ paddingLeft: theme.spacing(1),
display: 'flex',
alignItems: 'center',
- margin: 0,
- paddingLeft: theme.spacing(0.6),
+ gap: '6px',
[theme.breakpoints.only('xs')]: {
backgroundColor: 'transparent',
padding: 0,
@@ -44,20 +45,21 @@ const SearchButton = styled('button')(({ theme }) => [
display: 'none',
},
},
- fontFamily: theme.typography.fontFamily,
position: 'relative',
- backgroundColor: (theme.vars || theme).palette.grey[50],
- color: (theme.vars || theme).palette.text.secondary,
+ backgroundColor: alpha(theme.palette.grey[50], 0.6),
+ fontFamily: theme.typography.fontFamily,
fontSize: theme.typography.pxToRem(14),
+ color: (theme.vars || theme).palette.text.secondary,
border: `1px solid ${(theme.vars || theme).palette.grey[200]}`,
borderRadius: (theme.vars || theme).shape.borderRadius,
cursor: 'pointer',
transitionProperty: 'all',
transitionDuration: '150ms',
- boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
+ boxShadow: `hsl(200, 0%, 100%) 0 1px 0 inset, ${alpha(theme.palette.grey[100], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`,
'&:hover': {
- background: (theme.vars || theme).palette.grey[100],
+ background: alpha(theme.palette.grey[100], 0.5),
borderColor: (theme.vars || theme).palette.grey[300],
+ boxShadow: 'none',
},
'&:focus-visible': {
outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`,
@@ -66,25 +68,29 @@ const SearchButton = styled('button')(({ theme }) => [
},
theme.applyDarkStyles({
backgroundColor: alpha(theme.palette.primaryDark[700], 0.4),
- borderColor: (theme.vars || theme).palette.primaryDark[700],
- boxShadow: `${alpha(theme.palette.primaryDark[600], 0.1)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
+ borderColor: alpha(theme.palette.primaryDark[600], 0.4),
+ boxShadow: `${alpha(theme.palette.primaryDark[600], 0.1)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`,
'&:hover': {
background: (theme.vars || theme).palette.primaryDark[700],
borderColor: (theme.vars || theme).palette.primaryDark[600],
+ boxShadow: 'none',
},
}),
]);
const SearchLabel = styled('span')(({ theme }) => ({
- marginLeft: theme.spacing(1),
marginRight: 'auto',
+ marginBottom: '1px', // optical alignment
+ color: (theme.vars || theme).palette.text.tertiary,
+ lineHeight: 1,
}));
-const Shortcut = styled('div')(({ theme }) => {
+const Shortcut = styled('kbd')(({ theme }) => {
return {
+ all: 'unset',
fontSize: theme.typography.pxToRem(12),
fontWeight: 'bold',
- lineHeight: '20px',
+ lineHeight: '19px',
marginLeft: theme.spacing(0.5),
border: `1px solid ${(theme.vars || theme).palette.grey[200]}`,
backgroundColor: '#FFF',
@@ -427,15 +433,7 @@ export default function AppSearch(props) {
aria-labelledby="app-search-label"
{...props}
>
- ({
- color: 'primary.500',
- ...theme.applyDarkStyles({
- color: 'primary.300',
- }),
- })}
- />
+
{t('searchButton')}
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
diff --git a/docs/src/modules/components/ComponentPageTabs.js b/docs/src/modules/components/ComponentPageTabs.js
index 98ae5157e10a34..422eb252bf0a52 100644
--- a/docs/src/modules/components/ComponentPageTabs.js
+++ b/docs/src/modules/components/ComponentPageTabs.js
@@ -100,9 +100,9 @@ export default function ComponentPageTabs(props) {
className="component-tabs"
sx={{
position: 'sticky',
- top: 65, // to be positioned below the app bar
- width: '100%',
+ top: 57, // to be positioned below the app bar
mt: 2,
+ mx: { xs: -2, sm: -1 },
backgroundColor: 'background.default',
borderBottom: 1,
borderColor: 'divider',
diff --git a/docs/src/modules/components/HighlightedCode.test.js b/docs/src/modules/components/HighlightedCode.test.js
index 60ccf9b7c04ff4..f05b5cf2cefb9e 100644
--- a/docs/src/modules/components/HighlightedCode.test.js
+++ b/docs/src/modules/components/HighlightedCode.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from '@mui-internal/test-utils';
+import { createRenderer } from '@mui/internal-test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import { getDesignTokens } from '@mui/docs/branding';
import { HighlightedCode } from '@mui/docs/HighlightedCode';
diff --git a/docs/src/modules/components/JoyThemeBuilder.tsx b/docs/src/modules/components/JoyThemeBuilder.tsx
index 7cceb465dcba4b..849e4ab7297e94 100644
--- a/docs/src/modules/components/JoyThemeBuilder.tsx
+++ b/docs/src/modules/components/JoyThemeBuilder.tsx
@@ -1037,7 +1037,6 @@ function GlobalVariantForm({
Pick the specific primitive color, now in CSS variables form already, to correspond to a
semantic global variant token.
-
; data: any }) {
const [open, setOpen] = React.useState(false);
const { map: templateMap } = sourceJoyTemplates();
const renderItem = (name: string, item: TemplateData) => {
diff --git a/docs/src/modules/components/JoyUsageDemo.tsx b/docs/src/modules/components/JoyUsageDemo.tsx
index 787c5c22800aa4..afc7d5a4d6e19f 100644
--- a/docs/src/modules/components/JoyUsageDemo.tsx
+++ b/docs/src/modules/components/JoyUsageDemo.tsx
@@ -165,7 +165,7 @@ interface JoyUsageDemoProps {
* A function to override the code block result.
*/
getCodeBlock?: (code: string, props: ComponentProps) => string;
- renderDemo: (props: ComponentProps) => React.ReactElement;
+ renderDemo: (props: ComponentProps) => React.ReactElement;
}
export default function JoyUsageDemo({
diff --git a/docs/src/modules/components/JoyVariablesDemo.tsx b/docs/src/modules/components/JoyVariablesDemo.tsx
index fe4fb76e37d8ef..79d1ebd4dd03f5 100644
--- a/docs/src/modules/components/JoyVariablesDemo.tsx
+++ b/docs/src/modules/components/JoyVariablesDemo.tsx
@@ -33,7 +33,7 @@ function formatSx(sx: { [k: string]: string | number }) {
interface SlotVariablesProps {
slot: string;
data: Array;
- renderField: (item: DataItem) => React.ReactElement;
+ renderField: (item: DataItem) => React.ReactElement;
defaultOpen?: boolean;
}
@@ -88,7 +88,7 @@ export default function JoyVariablesDemo(props: {
componentName: string;
childrenAccepted?: boolean;
data: Array, { defaultOpen?: boolean } | undefined]>;
- renderDemo: (sx: { [k: string]: string | number }) => React.ReactElement;
+ renderDemo: (sx: { [k: string]: string | number }) => React.ReactElement;
renderCode?: (formattedSx: string) => string;
}) {
const { componentName, data = [], childrenAccepted = false, renderCode } = props;
diff --git a/docs/src/modules/components/MaterialUIExampleCollection.js b/docs/src/modules/components/MaterialUIExampleCollection.js
index 2c213f6d8074be..b3fce3970e5cc2 100644
--- a/docs/src/modules/components/MaterialUIExampleCollection.js
+++ b/docs/src/modules/components/MaterialUIExampleCollection.js
@@ -8,6 +8,7 @@ import Link from '@mui/material/Link';
import ChevronRightRoundedIcon from '@mui/icons-material/ChevronRightRounded';
import CloudRoundedIcon from '@mui/icons-material/CloudRounded';
+// #default-branch-switch
const examples = [
{
name: 'Next.js App Router',
diff --git a/docs/src/modules/components/Notifications.js b/docs/src/modules/components/Notifications.js
index 265312ae688114..d4b4ff1628b9f8 100644
--- a/docs/src/modules/components/Notifications.js
+++ b/docs/src/modules/components/Notifications.js
@@ -167,6 +167,7 @@ export default function Notifications() {
>
(
+export default function withRoot(
Component: React.ComponentType
,
) {
function WithRoot(props: P) {
diff --git a/docs/translations/api-docs/avatar-group/avatar-group.json b/docs/translations/api-docs/avatar-group/avatar-group.json
index 245ca5d121acaa..80f2d199412170 100644
--- a/docs/translations/api-docs/avatar-group/avatar-group.json
+++ b/docs/translations/api-docs/avatar-group/avatar-group.json
@@ -7,7 +7,7 @@
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop."
},
"max": { "description": "Max avatars to show before +x." },
"renderSurplus": {
@@ -17,9 +17,8 @@
"React.ReactNode": "custom element to display"
}
},
- "slotProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the componentsProps
prop, which will be deprecated in the future."
- },
+ "slotProps": { "description": "The props used for each slot inside." },
+ "slots": { "description": "The components used for each slot inside." },
"spacing": { "description": "Spacing between avatars." },
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
@@ -35,5 +34,6 @@
"nodeName": "the avatar elements"
},
"root": { "description": "Styles applied to the root element." }
- }
+ },
+ "slotDescriptions": { "surplus": "" }
}
diff --git a/docs/translations/api-docs/filled-input/filled-input.json b/docs/translations/api-docs/filled-input/filled-input.json
index 03a2c44eede3b9..663c798f1ef76a 100644
--- a/docs/translations/api-docs/filled-input/filled-input.json
+++ b/docs/translations/api-docs/filled-input/filled-input.json
@@ -11,11 +11,9 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide . The prop defaults to the value ('primary'
) inherited from the parent FormControl component."
},
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
diff --git a/docs/translations/api-docs/hidden/hidden.json b/docs/translations/api-docs/hidden/hidden.json
index b4ac8adc37b812..761e9fd71256f4 100644
--- a/docs/translations/api-docs/hidden/hidden.json
+++ b/docs/translations/api-docs/hidden/hidden.json
@@ -1,5 +1,6 @@
{
"componentDescription": "Responsively hides children based on the selected implementation.",
+ "deprecationInfo": "The Hidden component was deprecated in Material UI v5. To learn more, see the Hidden section of the migration docs.",
"propDescriptions": {
"children": { "description": "The content of the component." },
"implementation": {
diff --git a/docs/translations/api-docs/input-base/input-base.json b/docs/translations/api-docs/input-base/input-base.json
index 5589a24fe3d3f8..6b5be2851a4fcc 100644
--- a/docs/translations/api-docs/input-base/input-base.json
+++ b/docs/translations/api-docs/input-base/input-base.json
@@ -11,11 +11,9 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide . The prop defaults to the value ('primary'
) inherited from the parent FormControl component."
},
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
diff --git a/docs/translations/api-docs/input/input.json b/docs/translations/api-docs/input/input.json
index dc63984b34e5ce..5c6263f5bb03dd 100644
--- a/docs/translations/api-docs/input/input.json
+++ b/docs/translations/api-docs/input/input.json
@@ -11,11 +11,9 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide . The prop defaults to the value ('primary'
) inherited from the parent FormControl component."
},
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
diff --git a/docs/translations/api-docs/list-item-secondary-action/list-item-secondary-action.json b/docs/translations/api-docs/list-item-secondary-action/list-item-secondary-action.json
index 76c97232c297fd..3a537b274a4187 100644
--- a/docs/translations/api-docs/list-item-secondary-action/list-item-secondary-action.json
+++ b/docs/translations/api-docs/list-item-secondary-action/list-item-secondary-action.json
@@ -1,5 +1,6 @@
{
"componentDescription": "Must be used as the last child of ListItem to function properly.",
+ "deprecationInfo": "Use the secondaryAction
prop in the ListItem
component instead. This component will be removed in v7. See Migrating from deprecated APIs for more details.",
"propDescriptions": {
"children": {
"description": "The content of the component, normally an IconButton
or selection control."
diff --git a/docs/translations/api-docs/list-item/list-item.json b/docs/translations/api-docs/list-item/list-item.json
index e2e49cb15c36ab..802cdbb8fca4b9 100644
--- a/docs/translations/api-docs/list-item/list-item.json
+++ b/docs/translations/api-docs/list-item/list-item.json
@@ -15,11 +15,9 @@
"component": {
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"ContainerComponent": {
"description": "The container component used when a ListItemSecondaryAction
is the last child.",
@@ -40,11 +38,9 @@
"secondaryAction": { "description": "The element to display at the end of ListItem." },
"selected": { "description": "Use to apply selected styling." },
"slotProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the componentsProps
prop, which will be deprecated in the future."
- },
- "slots": {
- "description": "The components used for each slot inside. This prop is an alias for the components
prop, which will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
+ "slots": { "description": "The components used for each slot inside." },
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
}
diff --git a/docs/translations/api-docs/outlined-input/outlined-input.json b/docs/translations/api-docs/outlined-input/outlined-input.json
index 4c0a98ac1e7c09..7f6636f2615879 100644
--- a/docs/translations/api-docs/outlined-input/outlined-input.json
+++ b/docs/translations/api-docs/outlined-input/outlined-input.json
@@ -11,9 +11,7 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide . The prop defaults to the value ('primary'
) inherited from the parent FormControl component."
},
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
},
diff --git a/docs/translations/api-docs/tooltip/tooltip.json b/docs/translations/api-docs/tooltip/tooltip.json
index dbebeb920dcfd5..dc93836d7841a0 100644
--- a/docs/translations/api-docs/tooltip/tooltip.json
+++ b/docs/translations/api-docs/tooltip/tooltip.json
@@ -4,11 +4,9 @@
"arrow": { "description": "If true
, adds an arrow to the tooltip." },
"children": { "description": "Tooltip reference element.", "requiresRef": true },
"classes": { "description": "Override or extend the styles applied to the component." },
- "components": {
- "description": "The components used for each slot inside. This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead."
- },
+ "components": { "description": "The components used for each slot inside." },
"componentsProps": {
- "description": "The extra props for the slot components. You can override the existing props or add new ones. This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future."
+ "description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"describeChild": {
"description": "Set to true
if the title
acts as an accessible description. By default the title
acts as an accessible label for the child."
diff --git a/docs/translations/api-docs/use-menu-item-context-stabilizer/use-menu-item-context-stabilizer.json b/docs/translations/api-docs/use-menu-item-context-stabilizer/use-menu-item-context-stabilizer.json
index d3762313773adb..e9fb6768d1a77f 100644
--- a/docs/translations/api-docs/use-menu-item-context-stabilizer/use-menu-item-context-stabilizer.json
+++ b/docs/translations/api-docs/use-menu-item-context-stabilizer/use-menu-item-context-stabilizer.json
@@ -1,5 +1,5 @@
{
- "hookDescription": "Stabilizes the ListContext value for the MenuItem component, so it doesn't change when sibling items update.\n\n@param id The id of the MenuItem. If undefined, it will be generated with useId.\n@returns The stable ListContext value and the id of the MenuItem.",
+ "hookDescription": "Stabilizes the ListContext value for the MenuItem component, so it doesn't change when sibling items update.",
"parametersDescriptions": {},
"returnValueDescriptions": {}
}
diff --git a/docs/translations/api-docs/use-option-context-stabilizer/use-option-context-stabilizer.json b/docs/translations/api-docs/use-option-context-stabilizer/use-option-context-stabilizer.json
index 6c507c07107d7b..9a29af89977418 100644
--- a/docs/translations/api-docs/use-option-context-stabilizer/use-option-context-stabilizer.json
+++ b/docs/translations/api-docs/use-option-context-stabilizer/use-option-context-stabilizer.json
@@ -1,5 +1,5 @@
{
- "hookDescription": "Stabilizes the ListContext value for the Option component, so it doesn't change when sibling Options update.\n\n@param value The value of the Option.\n@returns The stable ListContext value.",
+ "hookDescription": "Stabilizes the ListContext value for the Option component, so it doesn't change when sibling Options update.",
"parametersDescriptions": {},
"returnValueDescriptions": {}
}
diff --git a/docs/translations/translations.json b/docs/translations/translations.json
index 110ffd7366beeb..316ae96000b33e 100644
--- a/docs/translations/translations.json
+++ b/docs/translations/translations.json
@@ -236,6 +236,10 @@
"/material-ui/customization/density": "Density",
"/material-ui/customization/z-index": "z-index",
"/material-ui/customization/transitions": "Transitions",
+ "/material-ui/customization/css-variables": "Css variables",
+ "/material-ui/customization/css-theme-variables/overview": "Overview",
+ "/material-ui/customization/css-theme-variables/usage": "Usage",
+ "/material-ui/customization/css-theme-variables/configuration": "Configuration",
"/material-ui/guides": "How-to guides",
"/material-ui/guides/minimizing-bundle-size": "Minimizing bundle size",
"/material-ui/guides/server-rendering": "Server rendering",
@@ -253,17 +257,13 @@
"/material-ui/integrations/theme-scoping": "Theme scoping",
"/material-ui/experimental-api": "Experimental APIs",
"/material-ui/experimental-api/classname-generator": "ClassName generator",
- "CSS theme variables": "CSS theme variables",
- "/material-ui/experimental-api/css-theme-variables/overview": "Overview",
- "/material-ui/experimental-api/css-theme-variables/usage": "Usage",
- "/material-ui/experimental-api/css-theme-variables/customization": "Customization",
- "/material-ui/experimental-api/css-theme-variables/migration": "Migrating to CSS variables",
"/material-ui/migration": "Migration",
"/material-ui/migration/migrating-from-deprecated-apis": "Migrating from deprecated APIs",
"/material-ui/migration/migration-grid-v2": "Migrating to Grid v2",
"/material-ui/migration/pickers-migration": "Migration from @material-ui/pickers",
"Upgrade to v6": "Upgrade to v6",
"/material-ui/migration/migration-v5": "Migrating to v6",
+ "/material-ui/migration/migration-css-theme-variables": "Migrating to CSS theme variables",
"Upgrade to v5": "Upgrade to v5",
"/material-ui/migration/migration-v4": "Migrating to v5: getting started",
"/material-ui/migration/v5-style-changes": "Breaking changes: style and theme",
@@ -276,7 +276,6 @@
"/material-ui/discover-more": "Discover more",
"/material-ui/discover-more/showcase": "Showcase",
"/material-ui/discover-more/related-projects": "Related projects",
- "/material-ui/discover-more/design-kits": "Design kits",
"/material-ui/discover-more/roadmap": "Roadmap",
"/material-ui/discover-more/backers": "Sponsors and Backers",
"/material-ui/discover-more/vision": "Vision",
diff --git a/docs/types/docs.d.ts b/docs/types/docs.d.ts
index ccfe104621b766..fc96dea50c386a 100644
--- a/docs/types/docs.d.ts
+++ b/docs/types/docs.d.ts
@@ -10,7 +10,7 @@ declare module 'docs/src/modules/components/HighlightedCode' {
*/
code: string;
copyButtonHidden?: boolean;
- copyButtonProps?: JSX.IntrinsicElements['button'];
+ copyButtonProps?: React.JSX.IntrinsicElements['button'];
/**
* short identifier of the code language
* see @mui/internal-markdown/prism for possible languages
@@ -23,7 +23,7 @@ declare module 'docs/src/modules/components/HighlightedCode' {
component?: React.ElementType;
sx?: object;
}
- export default function HighlightedCode(props: Props): React.ReactElement;
+ export default function HighlightedCode(props: Props): React.ReactElement;
}
declare module 'react-imask';
diff --git a/examples/material-ui-via-cdn/index.html b/examples/material-ui-via-cdn/index.html
index 253082f973bc5b..35d028fb989b3a 100644
--- a/examples/material-ui-via-cdn/index.html
+++ b/examples/material-ui-via-cdn/index.html
@@ -16,10 +16,10 @@
@@ -32,13 +32,87 @@