Skip to content

Commit 6409cf7

Browse files
committed
Merge branch 'next' into fix-broken-links
2 parents 33d82be + 9f4b846 commit 6409cf7

File tree

855 files changed

+37971
-21085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

855 files changed

+37971
-21085
lines changed

.browserslistrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ node 14
99
# `npx browserslist --mobile-to-desktop "> 0.5%, last 2 versions, Firefox ESR, not dead, safari >= 15.4, iOS >= 15.4"` when the last major is released.
1010
# Explicit safari versions are here based on the agreed terms in: https://github.com/mui/material-ui/issues/40958#issuecomment-1953215043
1111
#
12-
# After you update the version, you might need to run `npx update-browserslist-db@latest` to update caniuse-lite to gather latest browser versions.
12+
# After you update the version, you might need to run `npx update-browserslist-db@latest` to update caniuse-lite to gather latest browser versions.
1313
# Otherwise, running `pnpm build` might fail due to unknown browser versions.
1414
#
1515
# On update, sync references where "#stable-snapshot" is mentioned in the codebase.
@@ -75,20 +75,20 @@ samsung 22
7575
# snapshot of `npx browserslist "maintained node versions"`
7676
# On update check all #stable-snapshot markers
7777
[node]
78-
node 12.0
78+
node 14.0
7979

8080
# same as `node`
8181
[coverage]
82-
node 12.0
82+
node 14.0
8383

8484
# same as `node`
8585
[development]
86-
node 12.0
86+
node 14.0
8787

8888
# same as `node`
8989
[test]
90-
node 12.0
90+
node 14.0
9191

9292
# same as `node`
9393
[benchmark]
94-
node 12.0
94+
node 14.0

.circleci/config.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
aws-cli: circleci/aws-cli@4.1.3
3+
aws-cli: circleci/aws-cli@4.2.3
44
aws-s3: circleci/aws-s3@4.0
55

66
parameters:
@@ -299,6 +299,12 @@ jobs:
299299
command: |
300300
pnpm docs:link-check
301301
git add -A && git diff --exit-code --staged
302+
- run:
303+
name: Update the templates shared themes
304+
command: pnpm template:update-theme
305+
- run:
306+
name: '`pnpm template:update-theme` changes committed?'
307+
command: git add -A && git diff --exit-code --staged
302308
test_types:
303309
<<: *default-job
304310
resource_class: 'medium+'
@@ -322,6 +328,7 @@ jobs:
322328
pnpm --filter @mui/material typescript:module-augmentation
323329
pnpm --filter @mui/base typescript:module-augmentation
324330
pnpm --filter @mui/joy typescript:module-augmentation
331+
pnpm --filter @mui/system typescript:module-augmentation
325332
- run:
326333
name: Diff declaration files
327334
command: |
@@ -346,13 +353,13 @@ jobs:
346353
resource_class: 'medium+'
347354
steps:
348355
- checkout
356+
- install_js
349357
- run:
350358
name: Resolve typescript version
351359
command: |
352-
pnpm add typescript@next -d -w
360+
pnpm update -r typescript@next
353361
# log a patch for maintainers who want to check out this change
354362
git --no-pager diff HEAD
355-
- install_js
356363
- run:
357364
name: Tests TypeScript definitions
358365
command: |
@@ -392,7 +399,7 @@ jobs:
392399
<<: *default-job
393400
resource_class: 'medium+'
394401
docker:
395-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
402+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
396403
environment:
397404
NODE_ENV: development # Needed if playwright is in `devDependencies`
398405
steps:
@@ -422,7 +429,7 @@ jobs:
422429
test_e2e:
423430
<<: *default-job
424431
docker:
425-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
432+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
426433
environment:
427434
NODE_ENV: development # Needed if playwright is in `devDependencies`
428435
steps:
@@ -436,7 +443,7 @@ jobs:
436443
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
437444
<<: *default-job
438445
docker:
439-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
446+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
440447
environment:
441448
NODE_ENV: development # Needed if playwright is in `devDependencies`
442449
steps:
@@ -451,7 +458,7 @@ jobs:
451458
test_profile:
452459
<<: *default-job
453460
docker:
454-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
461+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
455462
environment:
456463
NODE_ENV: development # Needed if playwright is in `devDependencies`
457464
steps:
@@ -478,7 +485,7 @@ jobs:
478485
test_regressions:
479486
<<: *default-job
480487
docker:
481-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
488+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
482489
environment:
483490
NODE_ENV: development # Needed if playwright is in `devDependencies`
484491
steps:
@@ -532,7 +539,7 @@ jobs:
532539
<<: *default-job
533540
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
534541
docker:
535-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
542+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
536543
environment:
537544
NODE_ENV: development # Needed if playwright is in `devDependencies`
538545
steps:
@@ -556,7 +563,7 @@ jobs:
556563
<<: *default-job
557564
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
558565
docker:
559-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
566+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
560567
environment:
561568
NODE_ENV: development # Needed if playwright is in `devDependencies`
562569
steps:
@@ -580,7 +587,7 @@ jobs:
580587
<<: *default-job
581588
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
582589
docker:
583-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
590+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
584591
environment:
585592
NODE_ENV: development # Needed if playwright is in `devDependencies`
586593
steps:
@@ -604,7 +611,7 @@ jobs:
604611
<<: *default-job
605612
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
606613
docker:
607-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
614+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
608615
environment:
609616
NODE_ENV: development # Needed if playwright is in `devDependencies`
610617
steps:
@@ -628,7 +635,7 @@ jobs:
628635
<<: *default-job
629636
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
630637
docker:
631-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
638+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
632639
environment:
633640
NODE_ENV: development # Needed if playwright is in `devDependencies`
634641
steps:
@@ -652,7 +659,7 @@ jobs:
652659
<<: *default-job
653660
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
654661
docker:
655-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
662+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
656663
environment:
657664
NODE_ENV: development # Needed if playwright is in `devDependencies`
658665
steps:
@@ -680,7 +687,7 @@ jobs:
680687
<<: *default-job
681688
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
682689
docker:
683-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
690+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
684691
environment:
685692
NODE_ENV: development # Needed if playwright is in `devDependencies`
686693
steps:
@@ -781,7 +788,7 @@ jobs:
781788
test_benchmark:
782789
<<: *default-job
783790
docker:
784-
- image: mcr.microsoft.com/playwright:v1.45.3-focal
791+
- image: mcr.microsoft.com/playwright:v1.46.1-focal
785792
environment:
786793
NODE_ENV: development # Needed if playwright is in `devDependencies`
787794
steps:

.codesandbox/ci.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"packages/mui-system",
2222
"packages/mui-types",
2323
"packages/mui-utils",
24+
"packages-internal/babel-plugin-resolve-imports",
2425
"packages-internal/docs-utils",
2526
"packages-internal/scripts",
2627
"packages-internal/test-utils"
@@ -36,6 +37,7 @@
3637
"@mui/internal-docs-utils": "packages-internal/docs-utils",
3738
"@mui/internal-markdown": "packages/markdown",
3839
"@mui/internal-scripts": "packages-internal/scripts",
40+
"@mui/internal-babel-plugin-resolve-imports": "packages-internal/babel-plugin-resolve-imports",
3941
"@mui/lab": "packages/mui-lab/build",
4042
"@mui/material-nextjs": "packages/mui-material-nextjs/build",
4143
"@mui/material": "packages/mui-material/build",

.eslintrc.js

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,32 @@ const forbidCreateStylesMessage =
1313

1414
const ENABLE_REACT_COMPILER_PLUGIN = false;
1515

16+
const NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES = [
17+
{
18+
name: '@mui/material',
19+
message: OneLevelImportMessage,
20+
},
21+
{
22+
name: '@mui/lab',
23+
message: OneLevelImportMessage,
24+
},
25+
];
26+
27+
const NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED = [
28+
{
29+
group: [
30+
'@mui/*/*/*',
31+
'@pigment-css/*/*/*',
32+
'@base_ui/*/*/*',
33+
// Allow any import depth with any internal packages
34+
'!@mui/internal-*/**',
35+
// TODO delete, @mui/docs should be @mui/internal-docs
36+
'!@mui/docs/**',
37+
],
38+
message: OneLevelImportMessage,
39+
},
40+
];
41+
1642
module.exports = {
1743
root: true, // So parent files don't get applied
1844
env: {
@@ -67,20 +93,7 @@ module.exports = {
6793
'no-restricted-imports': [
6894
'error',
6995
{
70-
patterns: [
71-
{
72-
group: [
73-
'@mui/*/*/*',
74-
'@pigment-css/*/*/*',
75-
'@base_ui/*/*/*',
76-
// Allow any import depth with any internal packages
77-
'!@mui/internal-*/**',
78-
// TODO delete, @mui/docs should be @mui/internal-docs
79-
'!@mui/docs/**',
80-
],
81-
message: OneLevelImportMessage,
82-
},
83-
],
96+
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
8497
},
8598
],
8699
'no-continue': 'off',
@@ -171,6 +184,7 @@ module.exports = {
171184
// This rule is great for raising people awareness of what a key is and how it works.
172185
'react/no-array-index-key': 'off',
173186
'react/no-danger': 'error',
187+
'react/no-unknown-property': ['error', { ignore: ['sx'] }],
174188
'react/no-direct-mutation-state': 'error',
175189
// Not always relevant
176190
'react/require-default-props': 'off',
@@ -417,23 +431,26 @@ module.exports = {
417431
'no-bitwise': 'off',
418432
},
419433
},
434+
{
435+
files: ['docs/**/*{.ts,.tsx,.js}'],
436+
rules: {
437+
'no-restricted-imports': [
438+
'error',
439+
{
440+
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
441+
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
442+
},
443+
],
444+
},
445+
},
420446
{
421447
files: ['packages/*/src/**/*{.ts,.tsx,.js}'],
422448
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx'],
423449
rules: {
424450
'no-restricted-imports': [
425451
'error',
426452
{
427-
paths: [
428-
{
429-
name: '@mui/material',
430-
message: OneLevelImportMessage,
431-
},
432-
{
433-
name: '@mui/lab',
434-
message: OneLevelImportMessage,
435-
},
436-
],
453+
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
437454
},
438455
],
439456
// TODO: Consider setting back to `ignoreExternal: true` when the expected behavior is fixed:

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
pull_request:
1010
paths-ignore:
1111
# should sync with ci-check.yml as a workaround to bypass github checks
12-
- 'docs/**'
1312
- 'examples/**'
1413

1514
permissions: {}

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2020
# Initializes the CodeQL tools for scanning.
2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
22+
uses: github/codeql-action/init@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
2323
with:
2424
languages: typescript
2525
config-file: ./.github/codeql/codeql-config.yml
@@ -30,4 +30,4 @@ jobs:
3030
# 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
3131
# queries: security-extended,security-and-quality
3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
33+
uses: github/codeql-action/analyze@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ jobs:
4343

4444
# Upload the results to GitHub's code scanning dashboard.
4545
- name: Upload to code-scanning
46-
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
46+
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
4747
with:
4848
sarif_file: results.sarif

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
enable-pre-post-scripts = true
2+
manage-package-manager-versions = true

0 commit comments

Comments
 (0)