Skip to content

Commit f8bbb11

Browse files
committed
Merge branch 'master' into renovate/major-lerna-monorepo
2 parents 3cee280 + f191551 commit f8bbb11

16 files changed

Lines changed: 452 additions & 144 deletions

File tree

.circleci/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ default-job: &default-job
3333
working_directory: /tmp/material-ui
3434
executor:
3535
name: code-infra/mui-node
36-
node-version: '22.23.1'
36+
node-version: '22.23.2'
3737
resource_class: medium.gen2
3838

3939
default-context: &default-context
@@ -183,7 +183,7 @@ jobs:
183183
- run:
184184
name: Upgrade Node.js for pnpm 11
185185
command: |
186-
curl -fsSL https://nodejs.org/dist/v22.23.1/node-v22.23.1-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1
186+
curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1
187187
node --version
188188
- code-infra/install-pnpm
189189
- run:
@@ -212,7 +212,7 @@ jobs:
212212
resource_class: medium+.gen2
213213
executor:
214214
name: code-infra/mui-node-browser
215-
playwright-img-version: v1.61.1-noble
215+
playwright-img-version: v1.62.1-noble
216216
steps:
217217
- checkout
218218
- install-deps:
@@ -237,7 +237,7 @@ jobs:
237237
resource_class: medium
238238
executor:
239239
name: code-infra/mui-node-browser
240-
playwright-img-version: v1.61.1-noble
240+
playwright-img-version: v1.62.1-noble
241241
steps:
242242
- checkout
243243
- install-deps:
@@ -251,7 +251,7 @@ jobs:
251251
resource_class: medium
252252
executor:
253253
name: code-infra/mui-node-browser
254-
playwright-img-version: v1.61.1-noble
254+
playwright-img-version: v1.62.1-noble
255255
steps:
256256
- checkout
257257
- install-deps
@@ -265,7 +265,7 @@ jobs:
265265
resource_class: medium+
266266
executor:
267267
name: code-infra/mui-node-browser
268-
playwright-img-version: v1.61.1-noble
268+
playwright-img-version: v1.62.1-noble
269269
steps:
270270
- checkout
271271
- install-deps:
@@ -328,7 +328,7 @@ jobs:
328328
<<: *default-job
329329
executor:
330330
name: code-infra/mui-node-browser
331-
playwright-img-version: v1.61.1-noble
331+
playwright-img-version: v1.62.1-noble
332332
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
333333
steps:
334334
- checkout:
@@ -344,7 +344,7 @@ jobs:
344344
<<: *default-job
345345
executor:
346346
name: code-infra/mui-node-browser
347-
playwright-img-version: v1.61.1-noble
347+
playwright-img-version: v1.62.1-noble
348348
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
349349
steps:
350350
- checkout:
@@ -360,7 +360,7 @@ jobs:
360360
<<: *default-job
361361
executor:
362362
name: code-infra/mui-node-browser
363-
playwright-img-version: v1.61.1-noble
363+
playwright-img-version: v1.62.1-noble
364364
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
365365
steps:
366366
- checkout:
@@ -376,7 +376,7 @@ jobs:
376376
<<: *default-job
377377
executor:
378378
name: code-infra/mui-node-browser
379-
playwright-img-version: v1.61.1-noble
379+
playwright-img-version: v1.62.1-noble
380380
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
381381
steps:
382382
- checkout:
@@ -392,7 +392,7 @@ jobs:
392392
<<: *default-job
393393
executor:
394394
name: code-infra/mui-node-browser
395-
playwright-img-version: v1.61.1-noble
395+
playwright-img-version: v1.62.1-noble
396396
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
397397
steps:
398398
- checkout:
@@ -407,7 +407,7 @@ jobs:
407407
test_bundling_esbuild:
408408
<<: *default-job
409409
docker:
410-
- image: mcr.microsoft.com/playwright:v1.61.1-noble
410+
- image: mcr.microsoft.com/playwright:v1.62.1-noble
411411
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
412412
steps:
413413
- checkout:
@@ -423,7 +423,7 @@ jobs:
423423
<<: *default-job
424424
executor:
425425
name: code-infra/mui-node-browser
426-
playwright-img-version: v1.61.1-noble
426+
playwright-img-version: v1.62.1-noble
427427
environment:
428428
GATSBY_CPU_COUNT: '3'
429429
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Use Node.js
3838
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3939
with:
40-
node-version: '22.23.1'
40+
node-version: '22.23.2'
4141
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
4242
- run: pnpm install
4343
- name: Cache Next.js build
@@ -98,7 +98,7 @@ jobs:
9898
- name: Prepare for publishing
9999
uses: mui/mui-public/.github/actions/publish-prepare@3aff78882d5ed7d5d6a22d13ffa91a75f1374ab1 # master
100100
with:
101-
node-version: '22.23.1'
101+
node-version: '22.23.2'
102102
- name: Dry run npm publishing
103103
env:
104104
IS_PUBLISH_TEST: 'true'

.github/workflows/publish-canaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js
1818
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1919
with:
20-
node-version: '22.23.1'
20+
node-version: '22.23.2'
2121
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
2222
- run: pnpm install
2323
- run: pnpm canary:release --ignore @mui/icons-material --yes --skip-last-commit-comparison

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Prepare for publishing
5050
uses: mui/mui-public/.github/actions/publish-prepare@3aff78882d5ed7d5d6a22d13ffa91a75f1374ab1 # master
5151
with:
52-
node-version: '22.23.1'
52+
node-version: '22.23.2'
5353
- name: Publish packages
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -72,7 +72,7 @@ jobs:
7272
- name: Prepare for publishing
7373
uses: mui/mui-public/.github/actions/publish-prepare@3aff78882d5ed7d5d6a22d13ffa91a75f1374ab1 # master
7474
with:
75-
node-version: '22.23.1'
75+
node-version: '22.23.2'
7676
- name: Publish packages
7777
env:
7878
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-team-members.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Use Node.js
2828
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
2929
with:
30-
node-version: '22.23.1'
30+
node-version: '22.23.2'
3131
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
3232
- run: pnpm install
3333
- name: Sync team members

docs/data/material/components/pagination/UsePagination.js

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import * as React from 'react';
12
import usePagination from '@mui/material/usePagination';
23
import { styled } from '@mui/material/styles';
34

5+
const count = 10;
6+
47
const List = styled('ul')({
58
listStyle: 'none',
69
padding: 0,
@@ -9,33 +12,68 @@ const List = styled('ul')({
912
});
1013

1114
export default function UsePagination() {
15+
const firstPageRef = React.useRef(null);
16+
const lastPageRef = React.useRef(null);
17+
1218
const { items } = usePagination({
13-
count: 10,
19+
count,
1420
});
1521

1622
return (
1723
<nav>
1824
<List>
19-
{items.map(({ page, type, selected, ...item }, index) => {
25+
{items.map(({ page, type, selected, onClick, ...item }, index) => {
2026
let children = null;
2127

2228
if (type === 'start-ellipsis' || type === 'end-ellipsis') {
2329
children = '…';
2430
} else if (type === 'page') {
31+
let pageRef;
32+
33+
if (page === 1) {
34+
pageRef = firstPageRef;
35+
} else if (page === count) {
36+
pageRef = lastPageRef;
37+
}
38+
2539
children = (
2640
<button
2741
type="button"
42+
ref={pageRef}
2843
style={{
2944
fontWeight: selected ? 'bold' : undefined,
3045
}}
3146
{...item}
47+
onClick={onClick}
3248
>
3349
{page}
3450
</button>
3551
);
3652
} else {
3753
children = (
38-
<button type="button" {...item}>
54+
<button
55+
type="button"
56+
{...item}
57+
onClick={(event) => {
58+
let focusTarget;
59+
60+
if (type === 'previous' && page === 1) {
61+
focusTarget = firstPageRef;
62+
} else if (type === 'next' && page === count) {
63+
focusTarget = lastPageRef;
64+
}
65+
66+
const shouldMoveFocus =
67+
event.currentTarget.ownerDocument.activeElement ===
68+
event.currentTarget;
69+
70+
onClick(event);
71+
72+
if (shouldMoveFocus) {
73+
focusTarget?.current?.focus();
74+
}
75+
}}
76+
>
3977
{type}
4078
</button>
4179
);

docs/data/material/components/pagination/UsePagination.tsx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import * as React from 'react';
12
import usePagination from '@mui/material/usePagination';
23
import { styled } from '@mui/material/styles';
34

5+
const count = 10;
6+
47
const List = styled('ul')({
58
listStyle: 'none',
69
padding: 0,
@@ -9,33 +12,68 @@ const List = styled('ul')({
912
});
1013

1114
export default function UsePagination() {
15+
const firstPageRef = React.useRef<HTMLButtonElement>(null);
16+
const lastPageRef = React.useRef<HTMLButtonElement>(null);
17+
1218
const { items } = usePagination({
13-
count: 10,
19+
count,
1420
});
1521

1622
return (
1723
<nav>
1824
<List>
19-
{items.map(({ page, type, selected, ...item }, index) => {
25+
{items.map(({ page, type, selected, onClick, ...item }, index) => {
2026
let children = null;
2127

2228
if (type === 'start-ellipsis' || type === 'end-ellipsis') {
2329
children = '…';
2430
} else if (type === 'page') {
31+
let pageRef;
32+
33+
if (page === 1) {
34+
pageRef = firstPageRef;
35+
} else if (page === count) {
36+
pageRef = lastPageRef;
37+
}
38+
2539
children = (
2640
<button
2741
type="button"
42+
ref={pageRef}
2843
style={{
2944
fontWeight: selected ? 'bold' : undefined,
3045
}}
3146
{...item}
47+
onClick={onClick}
3248
>
3349
{page}
3450
</button>
3551
);
3652
} else {
3753
children = (
38-
<button type="button" {...item}>
54+
<button
55+
type="button"
56+
{...item}
57+
onClick={(event) => {
58+
let focusTarget: typeof firstPageRef | undefined;
59+
60+
if (type === 'previous' && page === 1) {
61+
focusTarget = firstPageRef;
62+
} else if (type === 'next' && page === count) {
63+
focusTarget = lastPageRef;
64+
}
65+
66+
const shouldMoveFocus =
67+
event.currentTarget.ownerDocument.activeElement ===
68+
event.currentTarget;
69+
70+
onClick(event);
71+
72+
if (shouldMoveFocus) {
73+
focusTarget?.current?.focus();
74+
}
75+
}}
76+
>
3977
{type}
4078
</button>
4179
);

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"@mui/internal-api-docs-builder": "workspace:^",
106106
"@mui/internal-docs-utils": "workspace:^",
107107
"@mui/internal-scripts": "workspace:^",
108-
"@playwright/test": "1.61.1",
108+
"@playwright/test": "1.62.1",
109109
"@types/autosuggest-highlight": "3.2.3",
110110
"@types/chai": "5.2.3",
111111
"@types/chance": "1.1.8",

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
command = "pnpm docs:build"
77

88
[build.environment]
9-
NODE_VERSION = "22.23.1"
9+
NODE_VERSION = "22.23.2"
1010
PNPM_FLAGS = "--frozen-lockfile"
1111

1212
# [[plugins]]

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"@next/eslint-plugin-next": "16.2.12",
100100
"@octokit/rest": "22.0.1",
101101
"@pigment-css/react": "0.0.31",
102-
"@playwright/test": "1.61.1",
102+
"@playwright/test": "1.62.1",
103103
"@pnpm/find-workspace-dir": "1000.1.5",
104104
"@types/babel__core": "7.20.5",
105105
"@types/babel__register": "7.17.3",
@@ -129,7 +129,7 @@
129129
"minimatch": "10.2.6",
130130
"nx": "22.7.6",
131131
"pkg-pr-new": "0.0.86",
132-
"playwright": "1.61.1",
132+
"playwright": "1.62.1",
133133
"prettier": "3.9.6",
134134
"pretty-quick": "4.2.2",
135135
"process": "0.11.10",
@@ -152,6 +152,6 @@
152152
"packageManager": "pnpm@11.19.0",
153153
"engines": {
154154
"pnpm": "11.19.0",
155-
"node": ">=22.23.1"
155+
"node": ">=22.23.2"
156156
}
157157
}

0 commit comments

Comments
 (0)