Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.
Size before: 1293b / 532b gzip
Size after: 1171b (-9%) / 502b gzip (-0.2%)
PiperOrigin-RevId: 600917333
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.
Size before: 4597b / 1322b gzip
Size after: 4092b (-13%) / 1194b gzip (-10%)
PiperOrigin-RevId: 600905310
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.
Size before: 523b / 308b gzip
Size after: 469b (-10%) / 292b gzip (-5%)
PiperOrigin-RevId: 600904594
The naming is a bit backwards. The file is about validation and the function is for the token values, not a file just for token values.
PiperOrigin-RevId: 599207580
Why? To help clarify that this isn't intended to be a public API, and to better organize future internal-only token files.
PiperOrigin-RevId: 599203361
Previously all text fields would focus themselves when the form reports validity, meaning the last one got focus. In reality, reportValidity is supposed to focus the first invalid control.
I added a "call" method wrapper around the `onReportValidity` callback that handles focusing logic.
PiperOrigin-RevId: 597904790
The bug: given a form with two required text fields,
1. Try to submit the form, both fields show error.
2. Add a value to the first field.
3. Try to submit the form, the first field does not remove its error.
This is fixed by listening to form submits and clearing the error state if the control is valid.
I refactored `injectFormReportValidityHooks()` into `addFormReportValidListener()` to keep the `OnReportValidity` class cleaner and better identify the problem we're trying to solve.
PiperOrigin-RevId: 597664564
Fix is pretty simple, we weren't clearing out the first pointerdown event, and subsequent ones were ignored since the `pointerId` changes with each touch.
Fixes#5349
PiperOrigin-RevId: 596668539
Previously selectItem would work with cached references to select-option elements which could become stale causing the deactivation logic to fail. This cl just ensures that selectItem always re-fetches the nodes to avoid the issue.
PiperOrigin-RevId: 595524158
Fixes#5199
This bug appeared when calling prevent default as well as changing the state of the chip in the same listener. Now calling preventDefault will always revert to the previous value.
PiperOrigin-RevId: 595199149
Fixes#4998
This also fixes an error being thrown in text field's validator when minlength/maxlength change to out of bounds if they're not set in the correct order.
PiperOrigin-RevId: 594013553
Fixes#5145
Added some notes on Material dialog focusing. Normally the dialog should *not* be focused, so you may wonder why we care about delegating focus at all. It's because:
1. We don't have focus trapping yet
2. We need to handle what happens when there isn't a focusable child in the dialog, even though that's against spec.
PiperOrigin-RevId: 594013328
width: fit-content will resize the select to be the width of its text content + icons. We need to add a wrapper to the menu that is width: 0px so that the width of the menu does not affect the size of the host.
PiperOrigin-RevId: 592382035
Added jsdoc to properties on textfield itself. I don't think we can count the bug closed until the api docs bot is fixed so that we can see what is exposed or not via the new mixins.
PiperOrigin-RevId: 592071151