Commit Graph

3634 Commits

Author SHA1 Message Date
Material Web Team
3445b631fe fix(menu): close menu on focusout and make it configurable
PiperOrigin-RevId: 520502277
2023-03-29 18:52:12 -07:00
Material Web Team
6194541ab1 refactor(menu): turn typeahead tuple indices into an enum
PiperOrigin-RevId: 520501650
2023-03-29 18:47:58 -07:00
Material Web Team
712aab3efc feat(list,menu): implement forced colors
PiperOrigin-RevId: 520501176
2023-03-29 18:44:13 -07:00
Elizabeth Mitchell
2c1c80d3d6 fix(button): incorrect theme custom properties
Fixes #4095

PiperOrigin-RevId: 520370000
2023-03-29 10:12:53 -07:00
Elizabeth Mitchell
acfdbb4f92 fix(button)!: merge standard and link buttons
PiperOrigin-RevId: 520365410
2023-03-29 09:57:53 -07:00
Elizabeth Mitchell
123c1e01af chore(chips): prep filter and input chip tokens
PiperOrigin-RevId: 520106876
2023-03-28 12:48:55 -07:00
Material Web Team
bfa1bec320 fix(menu): properly implement selected state
Before, I set the focused, actively-keyboard-interacted, or pressed element as visual selected state. That doesn't seem to be how GMDC handles it and created problems down the line with md-select where we could not show the currently-selected item + keyboard navigation at the same time.

This CL brings the behavior in line with GMDC and fixes this problem down the line for select.

Also in this CL I add the selected state to sub-menu-item when it's open

PiperOrigin-RevId: 519166067
2023-03-24 09:40:29 -07:00
Elizabeth Mitchell
f0344617a6 chore(chips): add assist and suggestion token validation
PiperOrigin-RevId: 518965126
2023-03-23 14:32:31 -07:00
Copybara-Service
bf61232bb3 Merge pull request #4026 from steverep:buttons-aria-expanded
PiperOrigin-RevId: 518928271
2023-03-23 12:09:30 -07:00
Elizabeth Mitchell
e33422ac2a chore(tokens): add supported token lists for cleaner documentation
PiperOrigin-RevId: 518893012
2023-03-23 10:10:00 -07:00
Material Web Team
6398186d05 fix(list): fix strong focus first keyboard nav
fixes an issue where first keyboard navigation would not show strong focus because event listeners flush the event queue and the keyboard event doesn't reach window before focus is called

PiperOrigin-RevId: 518731054
2023-03-22 19:01:38 -07:00
Material Web Team
d7fdfda162 feat(focus): export the keydown handler
PiperOrigin-RevId: 518730680
2023-03-22 18:58:29 -07:00
Daniel Freedman
85232d5916 feat(focus): implement focus ring animation
PiperOrigin-RevId: 518709745
2023-03-22 16:56:09 -07:00
Elizabeth Mitchell
a2c1cd9eb1 test(chips): add token tests for assist and suggestion chips
PiperOrigin-RevId: 518652887
2023-03-22 13:10:35 -07:00
Elizabeth Mitchell
2b9daead7f feat(tokens): generate v0.170
- v0.163 remapping action components to use the new tone based surfaces
- v0.164 remapping selection components to use the new tone based surfaces
- v0.165 remapping text input components to use the new tone based surfaces
- v0.166 remapping navigation components to use the new tone based surfaces
- v0.167 remapping communication components to use the new tone based surfaces
- v0.168 remapping containment components to use the new tone based surfaces
- v0.169 Updated 3P baseline values for the neutral palette from chroma 4 to chroma 6
- v0.170 Remapped surface and background roles in alignment with the tonal surface update

PiperOrigin-RevId: 518651669
2023-03-22 13:06:07 -07:00
Liz Mitchell
a878783d8d chore: update next version
Release-As: 1.0.0-pre.6
2023-03-22 12:59:04 -07:00
Copybara-Service
ca9f5e625f Merge pull request #4031 from material-components:release-please--branches--master--components--web
PiperOrigin-RevId: 518648221
2023-03-22 12:53:44 -07:00
release-please[bot]
dab0449e14
chore: release 1.0.0-pre.5 2023-03-21 22:25:35 +00:00
Elizabeth Mitchell
7e02a15ad8 feat(chips): add icon support
PiperOrigin-RevId: 518397757
2023-03-21 15:24:29 -07:00
Elizabeth Mitchell
eed1abd8ea chore(button): remove resolvers
PiperOrigin-RevId: 518375891
2023-03-21 14:06:33 -07:00
Material Web Team
90b5b4f807 refactor(list): accept the container-color token in theme mixin
PiperOrigin-RevId: 518369910
2023-03-21 13:46:16 -07:00
Elizabeth Mitchell
050d774912 chore(chips): remove resolvers
PiperOrigin-RevId: 518340641
2023-03-21 12:02:14 -07:00
Elizabeth Mitchell
f90aab27b4 fix(button): enable separate color and opacity tokens
PiperOrigin-RevId: 518329426
2023-03-21 11:22:49 -07:00
Elizabeth Mitchell
324e8568c2 feat(chips): add disabled styles
PiperOrigin-RevId: 518055706
2023-03-20 13:13:41 -07:00
Elizabeth Mitchell
789d23bd61 chore(sass): remove typography resolvers
PiperOrigin-RevId: 518054505
2023-03-20 13:09:04 -07:00
Elizabeth Mitchell
715c5927a7 chore(sass): remove elevation resolvers
PiperOrigin-RevId: 518051579
2023-03-20 12:57:55 -07:00
Elizabeth Mitchell
2623c1dd4e fix(tokens): add override files for all tokens
PiperOrigin-RevId: 518049463
2023-03-20 12:50:02 -07:00
Elizabeth Mitchell
028e44e8c9 fix(dialog): incorrect elevation layering
PiperOrigin-RevId: 518039204
2023-03-20 12:11:00 -07:00
Elizabeth Mitchell
6700947806 fix(button): text button background not transparent
PiperOrigin-RevId: 518011560
2023-03-20 10:39:35 -07:00
Elizabeth Mitchell
427d33d979 fix(menu): incorrect elevation
PiperOrigin-RevId: 517485685
2023-03-17 12:58:24 -07:00
Elizabeth Mitchell
618a505f57 fix(testing): token tests not working in Safari Chrome
PiperOrigin-RevId: 517206640
2023-03-16 13:10:05 -07:00
Elizabeth Mitchell
878b9143e7 chore!: remove old menusurface, autocomplete, and tokens v0.160
PiperOrigin-RevId: 517165037
2023-03-16 10:45:26 -07:00
Elizabeth Mitchell
c368e7d633 fix(fab)!: remove disabled state
Fixes #4045

PiperOrigin-RevId: 517165006
2023-03-16 10:43:47 -07:00
Elizabeth Mitchell
9582e006c0 feat(chips): add ripple
PiperOrigin-RevId: 517159107
2023-03-16 10:24:36 -07:00
Elizabeth Mitchell
9eb861fc83 feat(chips): add focus ring
PiperOrigin-RevId: 517156213
2023-03-16 10:14:46 -07:00
Daniel Freedman
567d3406b0 fix(iconbutton)!: properly size iconbutton to 40x40
PiperOrigin-RevId: 516948241
2023-03-15 15:37:15 -07:00
Material Web Team
ddac76e3bc fix(menu): flatten submenu slot query
PiperOrigin-RevId: 516879683
2023-03-15 11:22:17 -07:00
Elizabeth Mitchell
f3fe55ec2b feat(chips): add suggestion chips
PiperOrigin-RevId: 516878268
2023-03-15 11:17:10 -07:00
Elizabeth Mitchell
06bdb86803 feat(chips): add link chips
PiperOrigin-RevId: 516873837
2023-03-15 11:02:30 -07:00
Material Web Team
193b220a73 feat(menu): prepare menu to support md-select
Prepare menu to support md-select by doing the following:

- Export default values for typeahead configs
- Allow setting the role of the menu
- Support spaces in typeahead
  - Make the typeahead controller public so that one can bind it to another node
  - Listen to keydown events on capture rather than bubble
  - Allow disabling typeahead with events to prevent submenu typeahead clashes
- Fire opening and closing events synchronously on quick = true
- Fix focus restoration timing as it would fight with setting custom focus on items
- Fix bug with `onWindowClick` not cleaning up
- Add `focus()` as mart of the menuitem api
- Prevent typeahead from messing with focus and leave that to the menu/list

PiperOrigin-RevId: 516640007
2023-03-14 14:51:05 -07:00
Material Web Team
d005d7265e feat(list-item): expose / override host focus
In select, we need to open the menu and focus the last-selected item. `delegatesFocus: true` was causing some flakiness, so I overrode the focus method.

PiperOrigin-RevId: 516639115
2023-03-14 14:47:37 -07:00
Material Web Team
533ae6c999 feat(field,menu): create a surface client rect api for positioning
Expose the field container element to allow anchoring directly to it. This is necessary because if there is supporting text below the field, anchoring a menu to the md-field will cause the menu to anchor below the supporting text which would require some manual pixel-offsets to align correctly.

PiperOrigin-RevId: 516636675
2023-03-14 14:38:55 -07:00
Elizabeth Mitchell
27762d855c feat(chips): add basic assist chip
PiperOrigin-RevId: 516591846
2023-03-14 11:57:17 -07:00
Daniel Freedman
61ff27910e fix(focus)!: refactor focus ring to better match component shape
- Focus ring now adds offset and width to look spec correct
- Replace `offset-vertical` and `offset-horizontal` tokens with a single `offset` token.

PiperOrigin-RevId: 516361036
2023-03-13 16:55:26 -07:00
Daniel Freedman
8a37ce2e00 fix(iconbutton): allow icon button to be asymmetrically sized
Allow icon button to be asymmetrically sized by moving height and width setting to host.

Also, fix focus shape mixin usage.

PiperOrigin-RevId: 516301842
2023-03-13 13:16:17 -07:00
Elizabeth Mitchell
615527886b fix(elevation): disable pointer-events
PiperOrigin-RevId: 516274391
2023-03-13 11:43:18 -07:00
Elizabeth Mitchell
9872dad313 chore(chips): remove old implementation
PiperOrigin-RevId: 516267179
2023-03-13 11:21:00 -07:00
Material Web Team
35147b25b0 feat(list): add spacing tokens and inherit min-width
In this PR:
- Added spacing tokens to list-item
- Made list inherit min-width from host
- Propagated that min-width from menu to list
- Small fix to single-line list item pushing the icon out of the list item if the supporting text was too long

PiperOrigin-RevId: 515750933
2023-03-10 15:16:33 -08:00
Daniel Freedman
912d66ea30 feat(icon): add icon documentation
PiperOrigin-RevId: 515667704
2023-03-10 10:08:22 -08:00
Daniel Freedman
24298e696c feat(button): add label slot
PiperOrigin-RevId: 515467458
2023-03-09 16:03:11 -08:00