Commit Graph

4860 Commits

Author SHA1 Message Date
release-please[bot]
79ef9f6f5d
chore: release 1.1.1 2023-12-13 22:22:57 +00:00
Liz Mitchell
ab042992ac fix: formAssociated disabled attribute not working 2023-12-13 14:21:57 -08:00
Elizabeth Mitchell
2234a1279f chore: fix formAssociated disabled attribute not working
There is out-of-sync state when lit's built-in accessor tries to reflect attributes alongside the getter and setter. Instead, the properties just read from attributes and requestUpdate is called when those attributes change.

PiperOrigin-RevId: 590710159
2023-12-13 14:17:48 -08:00
Copybara-Service
eaefb5040b Merge pull request #5094 from material-components:release-please--branches--main--components--web
PiperOrigin-RevId: 590708481
2023-12-13 14:12:10 -08:00
Liz Mitchell
5d8f453ba5 chore: remove trailing whitespace 2023-12-13 11:59:50 -08:00
Liz Mitchell
52d1ca59fc chore: add extra | to table row start for GitHub empty starting columns 2023-12-13 11:35:12 -08:00
Liz Mitchell
3749911d16 chore: add build dependecy to update-size 2023-12-13 11:27:32 -08:00
Liz Mitchell
381189da9b chore: add readme link to size and bot 2023-12-13 11:23:32 -08:00
Liz Mitchell
1d9a552dcf docs: add size tracking 2023-12-12 17:25:03 -08:00
Elizabeth Mitchell
79f7dd2470 chore(chips): move trailing icon aria-hidden
PiperOrigin-RevId: 590311910
2023-12-12 13:15:54 -08:00
Copybara-Service
8e75343bbd Merge pull request #5275 from material-components:stories-page
PiperOrigin-RevId: 590302109
2023-12-12 12:48:15 -08:00
release-please[bot]
40e63ec3ee
chore: release 1.1.0 2023-12-12 20:48:06 +00:00
Copybara-Service
27d3541910 Merge pull request #5263 from vdegenne:md-filter-chip-icons
PiperOrigin-RevId: 590301589
2023-12-12 12:46:32 -08:00
vdegenne
b44b90c826 feat(chip): trailing remove icon can now be customized 2023-12-12 09:46:50 +01:00
vdegenne
49a6be141b feat(chip): trailing remove icon can now be customized 2023-12-12 09:45:52 +01:00
Elliott Marquez
4f4792a19a add licenses 2023-12-11 18:51:20 -08:00
Elliott Marquez
8bdc6e79ee docs: make page for full stories 2023-12-11 18:48:22 -08:00
vdegenne
76883cd420 feat(chip): trailing remove icon can now be customized 2023-12-09 11:39:31 +01:00
Valentin Degenne
2a4db32ccf
Merge branch 'main' into md-filter-chip-icons 2023-12-09 11:24:46 +01:00
Elizabeth Mitchell
739cf339b1
chore: audit npm dependencies (#5273) 2023-12-08 15:09:43 -08:00
Elizabeth Mitchell
89b4c2e752 feat(chips): add filter chip selected-icon slot to customize checkmark
PiperOrigin-RevId: 589186323
2023-12-08 11:06:09 -08:00
Elliott Marquez
c4cbd3612c fix(menu): shift tab into anchor closes menu
PiperOrigin-RevId: 589173373
2023-12-08 10:25:43 -08:00
Elizabeth Mitchell
c9e8de0207 feat(chips): add tokens to customize padding
Added chip tokens for `leading-space`, `trailing-space`, `icon-label-space`, `with-leading-icon-leading-space`, and `with-trailing-icon-trailing-space`.

PiperOrigin-RevId: 588942324
2023-12-07 16:19:41 -08:00
Elizabeth Mitchell
6a0d1b8440 chore: add code of conduct
PiperOrigin-RevId: 588939327
2023-12-07 16:09:33 -08:00
Elizabeth Mitchell
9de82ba2ed chore: set up security policy
PiperOrigin-RevId: 588939087
2023-12-07 16:08:14 -08:00
Elizabeth Mitchell
9e3f0801aa fix(button): sometimes submits form even when click listener prevents default
Fixes #5032

PiperOrigin-RevId: 588925434
2023-12-07 15:18:05 -08:00
Elizabeth Mitchell
e78a52f1e4 fix(checkbox): checked and indeterminate not updated during input event
Fixes #5028

The input event is dispatched before the change event, so we need to update state there instead of on change.

PiperOrigin-RevId: 588497817
2023-12-06 11:50:41 -08:00
vdegenne
b30d09e75b add hasSlottedTrailingIcon 2023-12-06 18:27:54 +01:00
vdegenne
9ff29ac8fa chore(md-chip): filter chip trailing icon can now be customized 2023-12-06 17:12:05 +01:00
vdegenne
a4bfc96a0b chore(md-chip): filter chip trailing icon can now be customized 2023-12-06 16:57:51 +01:00
Elizabeth Mitchell
a6d984afb6 docs: add browser support go link
PiperOrigin-RevId: 588118753
2023-12-05 10:36:00 -08:00
Elizabeth Mitchell
1e8067bca7 test: add classes to shared template props
This makes it easier to add classes in a render method. Also updates the TemplateBuilder type to not require a Harness (ex: card does not need one)

PiperOrigin-RevId: 588110635
2023-12-05 10:11:56 -08:00
Elizabeth Mitchell
a0baa4dc10 chore(card): remove host padding and update demo
Cards often have content that extends to the bounds of the card. Instead of adding default padding that must be removed, cards' content should add their own padding as needed.

This makes adding full-width media and dividers easier.

Also moved background z-indices to -1 since the slot doesn't have a display and the z-index wasn't doing anything.

PiperOrigin-RevId: 587883362
2023-12-04 16:58:37 -08:00
Material Web Team
bd88880f78 fix(menu): escape not closing menus with submenus
Ensure pressing escape while on a closed submenu anchor, closes the parent menu

Previously we were not letting a user close a menu when they were focused on any item with keepOpen = true. This included submenu anchors.

This change adds an escape (hehe) hatch to ensure that even on items with keepOpen = true, escape closes the menu. This is what most users expect and is what is the standard on menus around the web.

PiperOrigin-RevId: 587874713
2023-12-04 16:22:47 -08:00
Elliott Marquez
aafea84115 docs(menu): set target to _blank in demos
PiperOrigin-RevId: 587866823
2023-12-04 15:52:45 -08:00
Elliott Marquez
af49b64ab4 feat(menu,select): allow menu and select typeahead to read default slot text content
PiperOrigin-RevId: 587864760
2023-12-04 15:45:18 -08:00
Elliott Marquez
a5a40b6dd3 feat(select): match menu width to select and introduce clamp-menu-width
fixes #5112
fixes #5133

upon opening the select, the menu with calculate the width of the select and set the min-width of the corresponding menu to match. If the user has an item with a really long headline, then clap-menu-width will clamp the max-width of the menu to that of the select.

PiperOrigin-RevId: 587862332
2023-12-04 15:36:27 -08:00
Elizabeth Mitchell
52e568ddc8 refactor(text-field): add validator and use validity mixins
PiperOrigin-RevId: 587086864
2023-12-01 12:32:30 -08:00
Copybara-Service
77fd17787f Merge pull request #5241 from mavyfaby:switch-icon-slots
PiperOrigin-RevId: 586825469
2023-11-30 16:41:39 -08:00
Elizabeth Mitchell
897d9775c2 fix(select): focus() delegates properly, focus on reporting validity
PiperOrigin-RevId: 586815117
2023-11-30 16:05:54 -08:00
Elizabeth Mitchell
c53a4194e9 fix(behaviors): validation not reporting when form tries to submit
We handle `form.reportValidity()` with hooks, but we weren't handling `form.submit()`.

PiperOrigin-RevId: 586813244
2023-11-30 15:59:32 -08:00
Maverick Fabroa
7bdf63e92d
refactor(switch): reduce code by using fill: currentColor 2023-12-01 06:45:10 +08:00
Maverick Fabroa
3ef4b3137c
refactor(switch): remove unwanted spaces 2023-12-01 06:38:20 +08:00
Elizabeth Mitchell
1a4388c4ce docs: update freshness
PiperOrigin-RevId: 586763867
2023-11-30 13:07:10 -08:00
Elizabeth Mitchell
6a5a245824 chore(behaviors): tabindex attribute not hydrating properly
On construction, setting `tabIndex = 0` should hydrate a tabindex attribute. This behavior was lost since we overrode `Element.prototype.tabIndex`. This change keeps the platform getter/setter behavior and calls requestUpdate another way.

PiperOrigin-RevId: 586738747
2023-11-30 11:33:41 -08:00
Elizabeth Mitchell
36aed9a2df chore(behaviors): update validity anchor on first render
This is needed specifically for text fields. There appears to be an odd Chrome/Safari issue where an element that `delegatesFocus: true` to an inner `<input>` MUST provide that input as the validity anchor. Otherwise, when a form submits or calls `form.reportValidity()`, an error will be thrown.

See https://lit.dev/playground/#gist=6c26e418e0010f7a5aac15005cde8bde for a reproduction.

Unfortunately I couldn't programmatically trigger this behavior in a jasmine test.

PiperOrigin-RevId: 586723140
2023-11-30 10:43:41 -08:00
mavyfaby
9255be1be5 feat(switch): add slot icons 2023-12-01 01:06:58 +08:00
Elizabeth Mitchell
636a68cfa1 chore(behaviors): don't spread validator state copies
PiperOrigin-RevId: 586487459
2023-11-29 16:36:17 -08:00
Elizabeth Mitchell
c319236cd1 refactor: remove Firefox ARIAMixin polyfills (v119+)
This is now fixed in the latest two versions of Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1785412

PiperOrigin-RevId: 586442947
2023-11-29 13:48:38 -08:00
Copybara-Service
4c479299b1 Merge pull request #5225 from vdegenne:chip-disabled
PiperOrigin-RevId: 586442636
2023-11-29 13:47:20 -08:00