Commit Graph

4889 Commits

Author SHA1 Message Date
Copybara-Service
3be7ca37be Merge pull request #5295 from material-components:release-please--branches--main--components--web
PiperOrigin-RevId: 601180916
2024-01-24 11:24:44 -08:00
Copybara-Service
f54e01d3a0 Merge pull request #5335 from material-components:auto-update-sizes
PiperOrigin-RevId: 601172158
2024-01-24 10:57:12 -08:00
lit-robot
42bf9a95da chore: update sizes 2024-01-24 18:46:18 +00:00
release-please[bot]
79c00f5fc9
chore: release 1.2.0 2024-01-24 18:45:44 +00:00
Elizabeth Mitchell
86bd6f8309 fix(menu): --md-menu-item-container-color not working
This change removes the leftover md-comp-menu-list-item token set, which doesn't have a corresponding component. If you're using it, the correct token set to use is md-comp-menu-item.

As a side effect of the merge, it also added the missing menu item container-color token.

PiperOrigin-RevId: 601168134
2024-01-24 10:44:44 -08:00
Elizabeth Mitchell
901a5cbd12 chore(elevation): move private custom properties off of host
Elevation doesn't have variant styles, but it still uses shorter private custom properties to reduce its CSS size. I added a comment explaining why and moved the custom properties into the inner shadow dom so they can't be set on the host.

No size changes.

PiperOrigin-RevId: 601128500
2024-01-24 08:27:45 -08:00
Elizabeth Mitchell
044ee51d13 refactor(radio): reduce CSS size
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.

Size before: 4568b / 1034b gzip
Size after: 3245b (-29%) / 907b gzip (-12%)

PiperOrigin-RevId: 600928780
2024-01-23 15:41:28 -08:00
Elizabeth Mitchell
a2721c39d4 refactor(switch): reduce CSS size
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.

Size before: 14,615b / 2,327b gzip
Size after: 10,802 (-26%) / 1,865b gzip (-20%)

PiperOrigin-RevId: 600918909
2024-01-23 15:06:24 -08:00
Elizabeth Mitchell
0eb0e94bdc refactor(ripple): reduce CSS size
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
2024-01-23 15:01:55 -08:00
Elizabeth Mitchell
93071d47bd refactor(dialog): reduce CSS size
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
2024-01-23 14:19:44 -08:00
Elizabeth Mitchell
7f6dda58b5 refactor(divider): reduce CSS size
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
2024-01-23 14:16:41 -08:00
Copybara-Service
a3b2be80fb Merge pull request #5399 from Christian24:master
PiperOrigin-RevId: 600556733
2024-01-22 13:39:31 -08:00
Elizabeth Mitchell
35913a6ea4 fix(dialog): buttons not reflecting value attribute when setting property
Fixes #5409

PiperOrigin-RevId: 600541901
2024-01-22 12:48:44 -08:00
Elizabeth Mitchell
fcdfa33a2e chore: add "testing" to commitlint types
PiperOrigin-RevId: 600529879
2024-01-22 12:09:08 -08:00
Christian24
ffcb8736e8
Merge branch 'main' into master 2024-01-20 00:02:46 +01:00
Christian Siebmanns
8dc6a76af9 fix (testing): add testing folder to npm package 2024-01-20 00:00:06 +01:00
Elizabeth Mitchell
c97362c1cc docs: update roadmap
PiperOrigin-RevId: 599920422
2024-01-19 13:21:08 -08:00
Jan Kuehle
4b4c373a6b chore: use import and export types
PiperOrigin-RevId: 599338980
2024-01-17 17:39:46 -08:00
Elizabeth Mitchell
042b4aadfd refactor(checkbox): reduce CSS size by removing private custom properties
`--_private` custom properties aren't needed since checkbox does not have multiple variants that share styles.

CSS size before:
8567b / 1668b gzip

CSS size after:
6277b / 1387b gzip
-27% / -17%

PiperOrigin-RevId: 599262324
2024-01-17 12:58:51 -08:00
Copybara-Service
041adf0ced Merge pull request #5390 from parlough:patch-1
PiperOrigin-RevId: 599261606
2024-01-17 12:55:52 -08:00
Elizabeth Mitchell
eb7c17e3dc fix(tabs): tabs.scrollToTab() not working
Fixes #5385

The thing that scrolls is an internal element, not the host element.

PiperOrigin-RevId: 599221652
2024-01-17 10:42:14 -08:00
Elizabeth Mitchell
a3a05e4179 chore(tokens): rename tokens/internal/values tokens/internal/validate
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
2024-01-17 09:59:53 -08:00
Elizabeth Mitchell
b986b1eb7c fix(tokens): moved '_values.scss' to 'internal/_values.scss'
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
2024-01-17 09:45:26 -08:00
Parker Lougheed
2b33956603
Fix "Introduction" spelling on catalog 2024-01-17 09:10:50 -06:00
Elizabeth Mitchell
7dd7a68ae9 fix: forms correctly focus the first invalid control instead of last
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
2024-01-12 11:43:47 -08:00
Elizabeth Mitchell
3151fd8d90 fix(textfield): error styles not removing when an unrelated control is invalid
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
2024-01-11 15:06:22 -08:00
Elizabeth Mitchell
f2ebcdac79 chore(labs): fix onReportValidity called twice with form.reportValidity
PiperOrigin-RevId: 597661314
2024-01-11 14:53:43 -08:00
Elizabeth Mitchell
5c22b2baea test(labs): add more report validity tests
PiperOrigin-RevId: 597598077
2024-01-11 10:47:52 -08:00
Elizabeth Mitchell
e44f6a5a7f test(labs): re-organize report validity tests for unhandled use cases
PiperOrigin-RevId: 597596342
2024-01-11 10:42:11 -08:00
Material Web Team
73725be670 fix(select): allow aria-expanded to be set to false
fixes #5360

PiperOrigin-RevId: 597381616
2024-01-10 16:09:04 -08:00
Elizabeth Mitchell
6efc90403b fix(textfield): focus style lost after reportValidity() during change
PiperOrigin-RevId: 597047043
2024-01-09 14:34:16 -08:00
Elizabeth Mitchell
cef1b740ee fix(ripple): multiple touches causing ripples to start from center
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
2024-01-08 12:17:43 -08:00
Copybara-Service
ad52075135 Merge pull request #5363 from jason2506:fix-button-sass-imports
PiperOrigin-RevId: 595816152
2024-01-04 15:19:28 -08:00
Elizabeth Mitchell
3c6e55006b feat(textfield): add no-spinner to remove number spin buttons
PiperOrigin-RevId: 595788647
2024-01-04 13:28:18 -08:00
Elizabeth Mitchell
553aaa6695 docs: todo cleanup
PiperOrigin-RevId: 595708369
2024-01-04 08:10:56 -08:00
Elliott Marquez
043bbad6f3 fix(select): clicking select toggles the menu rather than just open
PiperOrigin-RevId: 595540752
2024-01-03 17:07:06 -08:00
Material Web Team
89427158b7 fix(select): ensure md-select selection logic uses fresh DOM references
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
2024-01-03 15:50:56 -08:00
Elizabeth Mitchell
68b078b4e1 fix(slider): move ripple and focus ring beneath handle
PiperOrigin-RevId: 595437166
2024-01-03 10:20:54 -08:00
Chi-En Wu
37fad0660d
fix(button): add missing sass imports 2024-01-03 20:08:12 +08:00
Elizabeth Mitchell
5dc870bfe1 fix(chips): filter's click.preventDefault() not working when also updating selected
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
2024-01-02 13:41:33 -08:00
Elizabeth Mitchell
035d155366 chore: remove todos for un-actionable spacing tokens bug
PiperOrigin-RevId: 594158700
2023-12-27 21:13:43 -08:00
Luke Vo
1e1048ace5
Merge branch 'main' into linear-progress-buffer 2023-12-27 20:35:18 -06:00
Luke Vo
e4b8ef521f Added null check for buffer (due to possibility of attribute removal) 2023-12-27 20:32:02 -06:00
Elizabeth Mitchell
363fc054d3 chore: remove un-actionable todos from labs
PiperOrigin-RevId: 594112463
2023-12-27 15:49:30 -08:00
Luke Vo
8fa444c986 fix(progress): progress buffer defaults to negative. 2023-12-27 16:26:06 -06:00
Elizabeth Mitchell
9973b90981 fix(textfield): counter showing when max length is 0 or removed
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
2023-12-27 08:13:58 -08:00
Elizabeth Mitchell
4ae9db6c67 fix(dialog): text is now selectable
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
2023-12-27 08:12:29 -08:00
Copybara-Service
689f9459c2 Merge pull request #5311 from christophe-g:cg-remove-unecessary-progress-animation
PiperOrigin-RevId: 594013260
2023-12-27 08:11:01 -08:00
Elizabeth Mitchell
c9360e2310 chore: remove commitlint.config.js from build files
PiperOrigin-RevId: 592670865
2023-12-20 15:20:00 -08:00
Elizabeth Mitchell
3dcfe65620 chore: don't add reviewers to size update PR and try new branch
PiperOrigin-RevId: 592656210
2023-12-20 14:18:29 -08:00