Skip to content

Commit 829b95c

Browse files
authored
Merge branch 'material-components:main' into main-community
2 parents 10d7953 + be01246 commit 829b95c

273 files changed

Lines changed: 12830 additions & 10121 deletions

File tree

Some content is hidden

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

.github/workflows/build-catalog.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build Catalog
22

33
on: [push]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build-catalog:
710
runs-on: ubuntu-latest
@@ -16,4 +19,4 @@ jobs:
1619
- run: npm ci
1720
- run: npm run build:catalog
1821
env:
19-
WIREIT_FAILURES: continue
22+
WIREIT_FAILURES: continue

.github/workflows/commitlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: commitlint
22

33
on: [pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
commitlint:
710
runs-on: ubuntu-latest

.github/workflows/firebase-hosting-merge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ name: Deploy to Firebase Hosting on release and manual
55
- published
66
workflow_dispatch:
77
# allows triggering from the gihub UI
8+
9+
permissions:
10+
contents: read
11+
812
jobs:
913
build_and_deploy:
1014
runs-on: ubuntu-latest

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ name: Deploy to Firebase Hosting on PR
55
on:
66
pull_request:
77
types: [ labeled ]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
813
jobs:
914
build_and_preview:
1015
if: github.event.label.name == 'preview-catalog' && github.event.pull_request.head.repo.full_name == github.repository

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
workflow_dispatch:
77
# allows triggering from the github UI
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
check_for_changes:
1114
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
publish:
1013
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Tests
22

33
on: [push]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: ubuntu-latest

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.4.0"
2+
".": "2.4.1"
33
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [2.4.1](https://github.com/material-components/material-web/compare/v2.4.0...v2.4.1) (2025-10-27)
4+
5+
6+
### Bug Fixes
7+
8+
* **radio:** also move sibling uncheck logic after root assignment ([6010e52](https://github.com/material-components/material-web/commit/6010e52c8fcd53577a8cf2cee53095033f329d2a))
9+
* **radio:** move root assignment to mirror hostDisconnected ([adb8d10](https://github.com/material-components/material-web/commit/adb8d104f2ebc29890b8c578e34a412e8c5c3fc2))
10+
* **tokens:** `@material/web/tokens/v*` moved to `@material/web/tokens/versions/v*` ([60c0cfa](https://github.com/material-components/material-web/commit/60c0cfa58ad135c189cb0fa95c5f2744499f0327))
11+
312
## [2.4.0](https://github.com/material-components/material-web/compare/v2.3.0...v2.4.0) (2025-08-21)
413

514

field/internal/field.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ export class Field extends LitElement {
276276
return;
277277
}
278278

279+
const keyframes = this.getLabelKeyframes();
280+
if (!keyframes.length) {
281+
return;
282+
}
283+
279284
this.isAnimating = true;
280285
this.labelAnimation?.cancel();
281286

@@ -291,10 +296,10 @@ export class Field extends LitElement {
291296
// Re-calculating the animation each time will prevent any visual glitches
292297
// from appearing.
293298
// TODO(b/241113345): use animation tokens
294-
this.labelAnimation = this.floatingLabelEl?.animate(
295-
this.getLabelKeyframes(),
296-
{duration: 150, easing: EASING.STANDARD},
297-
);
299+
this.labelAnimation = this.floatingLabelEl?.animate(keyframes, {
300+
duration: 150,
301+
easing: EASING.STANDARD,
302+
});
298303

299304
this.labelAnimation?.addEventListener('finish', () => {
300305
// At the end of the animation, update the visible label.
@@ -320,6 +325,10 @@ export class Field extends LitElement {
320325
} = restingLabelEl.getBoundingClientRect();
321326
const floatingScrollWidth = floatingLabelEl.scrollWidth;
322327
const restingScrollWidth = restingLabelEl.scrollWidth;
328+
// If either label has no dimensions (e.g., display: none), skip animation
329+
if (floatingScrollWidth === 0 || restingScrollWidth === 0) {
330+
return [];
331+
}
323332
// Scale by width ratio instead of font size since letter-spacing will scale
324333
// incorrectly. Using the width we can better approximate the adjusted
325334
// scale and compensate for tracking and overflow.

0 commit comments

Comments
 (0)