From b4ae149334b03a7ad18852063d13a93b73dbee59 Mon Sep 17 00:00:00 2001 From: delangle Date: Thu, 21 Sep 2023 11:16:58 +0200 Subject: [PATCH 1/3] [core] Improve imports from the core monorepo --- babel.config.js | 15 +++++++---- .../x/api/data-grid/grid-actions-col-def.js | 2 +- .../data-grid/grid-aggregation-function.js | 2 +- docs/pages/x/api/data-grid/grid-api.js | 2 +- .../pages/x/api/data-grid/grid-cell-params.js | 2 +- docs/pages/x/api/data-grid/grid-col-def.js | 2 +- .../api/data-grid/grid-csv-export-options.js | 2 +- .../data-grid/grid-excel-export-options.js | 2 +- .../api/data-grid/grid-export-state-params.js | 2 +- .../pages/x/api/data-grid/grid-filter-item.js | 2 +- .../x/api/data-grid/grid-filter-model.js | 2 +- .../x/api/data-grid/grid-filter-operator.js | 2 +- .../data-grid/grid-print-export-options.js | 2 +- .../data-grid/grid-row-class-name-params.js | 2 +- docs/pages/x/api/data-grid/grid-row-params.js | 2 +- .../api/data-grid/grid-row-spacing-params.js | 2 +- .../data-grid/grid-single-select-col-def.js | 2 +- .../api/buildComponentsDocumentation.ts | 27 +++++++++---------- .../api/buildGridEventsDocumentation.ts | 2 +- .../api/buildInterfacesDocumentation.ts | 4 +-- docs/scripts/createXTypeScriptProjects.ts | 2 +- docs/scripts/generateProptypes.ts | 7 ++--- .../src/AdapterDayjs/AdapterDayjs.test.tsx | 2 +- tsconfig.json | 14 ++++++++++ 24 files changed, 59 insertions(+), 46 deletions(-) diff --git a/babel.config.js b/babel.config.js index 4e02caa2e3bde..71b20890c43a8 100644 --- a/babel.config.js +++ b/babel.config.js @@ -16,13 +16,18 @@ const defaultAlias = { '@mui/x-date-pickers-pro': resolveAliasPath('./packages/x-date-pickers-pro/src'), '@mui/x-charts': resolveAliasPath('./packages/x-charts/src'), '@mui/x-tree-view': resolveAliasPath('./packages/x-tree-view/src'), - '@mui/markdown': '@mui/monorepo/packages/markdown', - '@mui-internal/api-docs-builder': '@mui/monorepo/packages/api-docs-builder', - '@mui-internal/docs-utilities': '@mui/monorepo/packages/docs-utilities', - 'typescript-to-proptypes': '@mui/monorepo/packages/typescript-to-proptypes/src', + '@mui/markdown': resolveAliasPath('./node_modules/@mui/monorepo/packages/markdown'), + '@mui-internal/api-docs-builder': resolveAliasPath( + './node_modules/@mui/monorepo/packages/api-docs-builder', + ), + '@mui-internal/docs-utilities': resolveAliasPath( + './node_modules/@mui/monorepo/packages/docs-utilities', + ), + 'typescript-to-proptypes': resolveAliasPath( + './node_modules/@mui/monorepo/packages/typescript-to-proptypes', + ), docs: resolveAliasPath('./node_modules/@mui/monorepo/docs'), test: resolveAliasPath('./test'), - packages: resolveAliasPath('./packages'), }; const productionPlugins = [ diff --git a/docs/pages/x/api/data-grid/grid-actions-col-def.js b/docs/pages/x/api/data-grid/grid-actions-col-def.js index 6756e560aee69..9f2fc986bf9f8 100644 --- a/docs/pages/x/api/data-grid/grid-actions-col-def.js +++ b/docs/pages/x/api/data-grid/grid-actions-col-def.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-actions-col-def.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-aggregation-function.js b/docs/pages/x/api/data-grid/grid-aggregation-function.js index 87645327d96fd..c21c7f1dda6cd 100644 --- a/docs/pages/x/api/data-grid/grid-aggregation-function.js +++ b/docs/pages/x/api/data-grid/grid-aggregation-function.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-aggregation-function.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-api.js b/docs/pages/x/api/data-grid/grid-api.js index 96ffa85910a76..0e6ee77644c44 100644 --- a/docs/pages/x/api/data-grid/grid-api.js +++ b/docs/pages/x/api/data-grid/grid-api.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-api.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-cell-params.js b/docs/pages/x/api/data-grid/grid-cell-params.js index e87eb30e52422..18b701f17d8b9 100644 --- a/docs/pages/x/api/data-grid/grid-cell-params.js +++ b/docs/pages/x/api/data-grid/grid-cell-params.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-cell-params.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-col-def.js b/docs/pages/x/api/data-grid/grid-col-def.js index 7528cd203c416..75e35cd4fd8e2 100644 --- a/docs/pages/x/api/data-grid/grid-col-def.js +++ b/docs/pages/x/api/data-grid/grid-col-def.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-col-def.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-csv-export-options.js b/docs/pages/x/api/data-grid/grid-csv-export-options.js index 12edbd4d9cafe..f7fa73bef692c 100644 --- a/docs/pages/x/api/data-grid/grid-csv-export-options.js +++ b/docs/pages/x/api/data-grid/grid-csv-export-options.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-csv-export-options.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-excel-export-options.js b/docs/pages/x/api/data-grid/grid-excel-export-options.js index 8aa0941180c9b..7a702c8ad1191 100644 --- a/docs/pages/x/api/data-grid/grid-excel-export-options.js +++ b/docs/pages/x/api/data-grid/grid-excel-export-options.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-excel-export-options.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-export-state-params.js b/docs/pages/x/api/data-grid/grid-export-state-params.js index e9bf971a63e47..90bbb5533a510 100644 --- a/docs/pages/x/api/data-grid/grid-export-state-params.js +++ b/docs/pages/x/api/data-grid/grid-export-state-params.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-export-state-params.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-filter-item.js b/docs/pages/x/api/data-grid/grid-filter-item.js index 7a5c021d7bb40..232569a0fa45b 100644 --- a/docs/pages/x/api/data-grid/grid-filter-item.js +++ b/docs/pages/x/api/data-grid/grid-filter-item.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-filter-item.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-filter-model.js b/docs/pages/x/api/data-grid/grid-filter-model.js index 101f8899005cb..7f4f443bd95c8 100644 --- a/docs/pages/x/api/data-grid/grid-filter-model.js +++ b/docs/pages/x/api/data-grid/grid-filter-model.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-filter-model.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-filter-operator.js b/docs/pages/x/api/data-grid/grid-filter-operator.js index 777de2ebb0102..c5d04c86e1e82 100644 --- a/docs/pages/x/api/data-grid/grid-filter-operator.js +++ b/docs/pages/x/api/data-grid/grid-filter-operator.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-filter-operator.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-print-export-options.js b/docs/pages/x/api/data-grid/grid-print-export-options.js index 96b09b359c77c..4dbca1c927aa6 100644 --- a/docs/pages/x/api/data-grid/grid-print-export-options.js +++ b/docs/pages/x/api/data-grid/grid-print-export-options.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-print-export-options.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-row-class-name-params.js b/docs/pages/x/api/data-grid/grid-row-class-name-params.js index aedfbd3ad613b..23b662295dcfd 100644 --- a/docs/pages/x/api/data-grid/grid-row-class-name-params.js +++ b/docs/pages/x/api/data-grid/grid-row-class-name-params.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-row-class-name-params.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-row-params.js b/docs/pages/x/api/data-grid/grid-row-params.js index 7a145e372f375..6c02924476684 100644 --- a/docs/pages/x/api/data-grid/grid-row-params.js +++ b/docs/pages/x/api/data-grid/grid-row-params.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-row-params.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-row-spacing-params.js b/docs/pages/x/api/data-grid/grid-row-spacing-params.js index bad1db240627c..2b4b77b6a575d 100644 --- a/docs/pages/x/api/data-grid/grid-row-spacing-params.js +++ b/docs/pages/x/api/data-grid/grid-row-spacing-params.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-row-spacing-params.md?@mui/markdown'; export default function Page() { diff --git a/docs/pages/x/api/data-grid/grid-single-select-col-def.js b/docs/pages/x/api/data-grid/grid-single-select-col-def.js index 30a321aa92942..8a7a55e28c012 100644 --- a/docs/pages/x/api/data-grid/grid-single-select-col-def.js +++ b/docs/pages/x/api/data-grid/grid-single-select-col-def.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './grid-single-select-col-def.md?@mui/markdown'; export default function Page() { diff --git a/docs/scripts/api/buildComponentsDocumentation.ts b/docs/scripts/api/buildComponentsDocumentation.ts index 82a855aee980a..97cd3bc99b47a 100644 --- a/docs/scripts/api/buildComponentsDocumentation.ts +++ b/docs/scripts/api/buildComponentsDocumentation.ts @@ -1,31 +1,28 @@ -import { getPropTypesFromFile } from '@mui/monorepo/packages/typescript-to-proptypes'; -import { - UnionType, - InterfaceType, -} from '@mui/monorepo/packages/typescript-to-proptypes/src/models'; +import { getPropTypesFromFile } from 'typescript-to-proptypes'; +import { UnionType, InterfaceType } from 'typescript-to-proptypes/models'; import * as fse from 'fs-extra'; import fs from 'fs'; import path from 'path'; -import parseStyles from '@mui/monorepo/packages/api-docs-builder/utils/parseStyles'; +import parseStyles from '@mui-internal/api-docs-builder/utils/parseStyles'; import fromPairs from 'lodash/fromPairs'; import createDescribeableProp, { DescribeablePropDescriptor, -} from '@mui/monorepo/packages/api-docs-builder/utils/createDescribeableProp'; -import generatePropDescription from '@mui/monorepo/packages/api-docs-builder/utils/generatePropDescription'; +} from '@mui-internal/api-docs-builder/utils/createDescribeableProp'; +import generatePropDescription from '@mui-internal/api-docs-builder/utils/generatePropDescription'; import { parse as parseDoctrine } from 'doctrine'; import generatePropTypeDescription, { getChained, -} from '@mui/monorepo/packages/api-docs-builder/utils/generatePropTypeDescription'; -import parseTest from '@mui/monorepo/packages/api-docs-builder/utils/parseTest'; +} from '@mui-internal/api-docs-builder/utils/generatePropTypeDescription'; +import parseTest from '@mui-internal/api-docs-builder/utils/parseTest'; import kebabCase from 'lodash/kebabCase'; import camelCase from 'lodash/camelCase'; import { LANGUAGES } from 'docs/config'; -import findPagesMarkdownNew from '@mui/monorepo/packages/api-docs-builder/utils/findPagesMarkdown'; +import findPagesMarkdownNew from '@mui-internal/api-docs-builder/utils/findPagesMarkdown'; import { defaultHandlers, parse as docgenParse } from 'react-docgen'; -import { renderMarkdown, getHeaders, getTitle } from '@mui/monorepo/packages/markdown'; -import { getLineFeed } from '@mui/monorepo/packages/docs-utilities'; -import { unstable_generateUtilityClass as generateUtilityClass } from '@mui/utils'; -import type { ReactApi as CoreReactApi } from '@mui/monorepo/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder'; +import { renderMarkdown, getHeaders, getTitle } from '@mui/markdown'; +import { getLineFeed } from '@mui-internal/docs-utilities'; +import generateUtilityClass from '@mui/utils/generateUtilityClass'; +import type { ReactApi as CoreReactApi } from '@mui-internal/api-docs-builder/ApiBuilders/ComponentApiBuilder'; import { DocumentedInterfaces, getJsdocDefaultValue, linkify, writePrettifiedFile } from './utils'; import { XTypeScriptProject, XTypeScriptProjects } from '../createXTypeScriptProjects'; import saveApiDocPages, { ApiPageType, getPlan } from './saveApiDocPages'; diff --git a/docs/scripts/api/buildGridEventsDocumentation.ts b/docs/scripts/api/buildGridEventsDocumentation.ts index 332cf39f11087..134227bf89b5f 100644 --- a/docs/scripts/api/buildGridEventsDocumentation.ts +++ b/docs/scripts/api/buildGridEventsDocumentation.ts @@ -1,6 +1,6 @@ import * as ts from 'typescript'; import path from 'path'; -import { renderMarkdown } from '@mui/monorepo/packages/markdown'; +import { renderMarkdown } from '@mui/markdown'; import { DocumentedInterfaces, getSymbolDescription, diff --git a/docs/scripts/api/buildInterfacesDocumentation.ts b/docs/scripts/api/buildInterfacesDocumentation.ts index e9345308365e8..44b17ac4f9842 100644 --- a/docs/scripts/api/buildInterfacesDocumentation.ts +++ b/docs/scripts/api/buildInterfacesDocumentation.ts @@ -2,7 +2,7 @@ import * as ts from 'typescript'; import * as prettier from 'prettier'; import kebabCase from 'lodash/kebabCase'; import path from 'path'; -import { renderMarkdown } from '@mui/monorepo/packages/markdown'; +import { renderMarkdown } from '@mui/markdown'; import { escapeCell, getSymbolDescription, @@ -348,7 +348,7 @@ export default function buildInterfacesDocumentation(options: BuildInterfacesDoc writePrettifiedFile( path.resolve(apiPagesFolder, project.documentationFolderName, `${slug}.js`), `import * as React from 'react'; - import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; + import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import * as pageProps from './${slug}.md?@mui/markdown'; export default function Page() { diff --git a/docs/scripts/createXTypeScriptProjects.ts b/docs/scripts/createXTypeScriptProjects.ts index 88de3ba970729..c7ed4ceca2724 100644 --- a/docs/scripts/createXTypeScriptProjects.ts +++ b/docs/scripts/createXTypeScriptProjects.ts @@ -3,7 +3,7 @@ import { createTypeScriptProject, CreateTypeScriptProjectOptions, TypeScriptProject, -} from '@mui/monorepo/packages/api-docs-builder/utils/createTypeScriptProject'; +} from '@mui-internal/api-docs-builder/utils/createTypeScriptProject'; import { getComponentFilesInFolder } from './utils'; const workspaceRoot = path.resolve(__dirname, '../../'); diff --git a/docs/scripts/generateProptypes.ts b/docs/scripts/generateProptypes.ts index 4d279b9b7795a..e201fb3930807 100644 --- a/docs/scripts/generateProptypes.ts +++ b/docs/scripts/generateProptypes.ts @@ -2,11 +2,8 @@ import * as yargs from 'yargs'; import * as path from 'path'; import * as fse from 'fs-extra'; import * as prettier from 'prettier'; -import { - getPropTypesFromFile, - injectPropTypesInFile, -} from '@mui/monorepo/packages/typescript-to-proptypes'; -import { fixBabelGeneratorIssues, fixLineEndings } from '@mui/monorepo/packages/docs-utilities'; +import { getPropTypesFromFile, injectPropTypesInFile } from 'typescript-to-proptypes'; +import { fixBabelGeneratorIssues, fixLineEndings } from '@mui-internal/docs-utilities'; import { createXTypeScriptProjects, XTypeScriptProject } from './createXTypeScriptProjects'; const prettierConfig = prettier.resolveConfig.sync(process.cwd(), { diff --git a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx index bbf90e5120333..e8e158ef379cd 100644 --- a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx +++ b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx @@ -19,7 +19,7 @@ import { DateRangeCalendar } from '@mui/x-date-pickers-pro/DateRangeCalendar'; import { describeGregorianAdapter, TEST_DATE_ISO_STRING, -} from 'packages/x-date-pickers/src/tests/describeGregorianAdapter'; +} from '@mui/x-date-pickers/tests/describeGregorianAdapter'; import 'dayjs/locale/fr'; import 'dayjs/locale/de'; diff --git a/tsconfig.json b/tsconfig.json index 1473b721f37f6..86ff716be8543 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,6 +26,20 @@ "@mui/x-tree-view/*": ["./packages/x-tree-view/src/*"], "@mui/x-license-pro": ["./packages/x-license-pro/src"], "@mui/x-license-pro/*": ["./packages/x-license-pro/src/*"], + "@mui/markdown": ["./node_modules/@mui/monorepo/packages/markdown"], + "@mui/markdown/*": ["./node_modules/@mui/monorepo/packages/markdown/*"], + "@mui-internal/api-docs-builder": ["./node_modules/@mui/monorepo/packages/api-docs-builder"], + "@mui-internal/api-docs-builder/*": [ + "./node_modules/@mui/monorepo/packages/api-docs-builder/*" + ], + "@mui-internal/docs-utilities": ["./node_modules/@mui/monorepo/packages/docs-utilities"], + "@mui-internal/docs-utilities/*": ["./node_modules/@mui/monorepo/packages/docs-utilities/*"], + "typescript-to-proptypes": [ + "./node_modules/@mui/monorepo/packages/typescript-to-proptypes/src" + ], + "typescript-to-proptypes/*": [ + "./node_modules/@mui/monorepo/packages/typescript-to-proptypes/src/*" + ], "test/*": ["./test/*"], "docs/*": ["./node_modules/@mui/monorepo/docs"], "docsx/*": ["./docs/*"] From ed69e369f7e8da28a5809ef6ca991ae64f4b2cc5 Mon Sep 17 00:00:00 2001 From: delangle Date: Thu, 21 Sep 2023 11:40:32 +0200 Subject: [PATCH 2/3] Remove ttp dep from the doc --- docs/package.json | 3 +-- yarn.lock | 36 ++++++++---------------------------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/docs/package.json b/docs/package.json index 9676420990d59..6fed129a4d10c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -95,7 +95,6 @@ "@babel/preset-typescript": "^7.22.15", "@types/doctrine": "^0.0.6", "cpy-cli": "^5.0.0", - "gm": "^1.25.0", - "typescript-to-proptypes": "^2.2.1" + "gm": "^1.25.0" } } diff --git a/yarn.lock b/yarn.lock index 643db0b9e8dd4..f300cba29f265 100644 --- a/yarn.lock +++ b/yarn.lock @@ -188,7 +188,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.11.1", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.22.15", "@babel/core@^7.7.5": +"@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.22.15", "@babel/core@^7.7.5": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.15.tgz#15d4fd03f478a459015a4b94cfbb3bd42c48d2f4" integrity sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA== @@ -516,7 +516,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.10.4", "@babel/plugin-syntax-class-properties@^7.12.13": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -579,7 +579,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.10.4", "@babel/plugin-syntax-jsx@^7.22.5": +"@babel/plugin-syntax-jsx@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== @@ -1305,7 +1305,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.11.0", "@babel/types@^7.2.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.6.1": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.6.1": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.15.tgz#266cb21d2c5fd0b3931e7a91b6dd72d2f617d282" integrity sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA== @@ -1852,7 +1852,7 @@ react-transition-group "^4.4.5" "@mui/monorepo@https://github.com/mui/material-ui.git#master": - version "5.14.5" + version "5.14.9" resolved "https://github.com/mui/material-ui.git#93b3f9ccf16df63450dcdba127ef73e4c734abd4" "@mui/private-theming@^5.14.7", "@mui/private-theming@^5.14.8": @@ -9485,7 +9485,7 @@ lodash.upperfirst@4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= -lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -13529,7 +13529,7 @@ tsconfig-paths@^4.1.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -13672,26 +13672,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-to-proptypes@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/typescript-to-proptypes/-/typescript-to-proptypes-2.2.1.tgz#45fd201f6526bc45da3c5c0faa3b00cc23707613" - integrity sha512-FxVo0Rcf/c6dmHxA1DlAmpxct+1SuuDyX3Rl8MkfQt//yvZCMhWOuWZvJ3aP0/5eZTYIb+DpPt7htTL6A1xK9A== - dependencies: - "@babel/core" "^7.11.1" - "@babel/plugin-syntax-class-properties" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.10.4" - "@babel/types" "^7.11.0" - doctrine "^3.0.0" - lodash "^4.17.14" - tslib "^1.13.0" - typescript "3.8.3" - uuid "^8.1.0" - -typescript@3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== - "typescript@>=3 < 6", typescript@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -13921,7 +13901,7 @@ uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.1.0, uuid@^8.3.0: +uuid@^8.3.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== From 86db0bf332f5bff583bcf2a11f0272aa62653bd7 Mon Sep 17 00:00:00 2001 From: delangle Date: Fri, 10 Nov 2023 13:35:08 +0100 Subject: [PATCH 3/3] Fix --- docs/src/modules/components/CustomizationPlayground.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/modules/components/CustomizationPlayground.tsx b/docs/src/modules/components/CustomizationPlayground.tsx index e211ecc4a9ac6..56e95219233bc 100644 --- a/docs/src/modules/components/CustomizationPlayground.tsx +++ b/docs/src/modules/components/CustomizationPlayground.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; // @ts-ignore import HighlightedCode from 'docs/src/modules/components/HighlightedCode'; -// @ts-ignore import BrandingProvider from 'docs/src/BrandingProvider'; import { styled, Theme, alpha, useTheme } from '@mui/material/styles'; import useMediaQuery from '@mui/material/useMediaQuery'; @@ -272,6 +271,8 @@ const CustomizationPlayground = function CustomizationPlayground({ examples, componentName, }: UseCustomizationPlaygroundProps) { + const theme = useTheme(); + const { selectedDemo, customizationOptions, @@ -300,7 +301,7 @@ const CustomizationPlayground = function CustomizationPlayground({ return ( {selectedDemo && customizationOptions && selectedCustomizationOption && ( - + { @@ -333,7 +334,7 @@ const CustomizationPlayground = function CustomizationPlayground({ {shouldBeInteractive && ( - + Components