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
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
- 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
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
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
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
- 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
Allow icon button to be asymmetrically sized by moving height and width setting to host.
Also, fix focus shape mixin usage.
PiperOrigin-RevId: 516301842
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