Releases: material-components/material-web
Releases · material-components/material-web
v1.5.0
v1.4.1
v1.4.0
1.4.0 (2024-03-21)
Features
- menu: add
no-navigation-wrap
to fix select accessibility (c6ffd70) - typography: add
@material/web/typography/md-typescale
classes (36dd77e)
Bug Fixes
- button,fab,chips,labs: text-transform inherits through shadow root (758e615)
- elevation: expose md-elevation
::part
in all components (b74e3dd) - elevation: limit elevation transition to box-shadow and opacity (34c0a67)
- publish
.css
files for[@import](https://github.com/import)
-ing (cde649c) - rename internal
<styles>.css.js
to<styles>.css
(c35bad0) - switch: reflect
selected
state in input event (8d201e0) - tabs: default
scroll-behavior: smooth
not working (274ce3e), closes #5497 - textfield: no longer inherits
text-align
from parents (668f0ee), closes #5509 - typography: rename md-typescale.js to md-typescale-styles.js (1e47fd7)
- use explicit
CSSResult[]
types for static styles (ce41b7b)
v1.3.0
1.3.0 (2024-02-22)
Features
- add
--md-sys-shape-*
tokens for all components (41bac9e) - tabs: expose activeTabIndex (4bce86d), closes #5297
- tokens: add component custom properties to Sass values (feff721)
Bug Fixes
- icon: fix uncentered icons when using WCAG text spacing overrides (b23e321)
- labs: hasConstructed and constructor deprecated, changing tabIndex update in connectedCallback (fb086bb)
- labs: removing hasConstructed and setting privateIsConstructed to handle setting tabIndex (ea518d0)
- labs: update tabIndex once the element is connected to the DOM (a6b8c09)
- menu: left arrow in submenu closes submenu in closure (2049323)
- remove
:host-context
rtl selectors (f2ff867)
v1.2.0
1.2.0 (2024-01-24)
Features
- select: add keyboard support for arrow end and home (8912019)
- select: add menuAlign to allow end-aligning the select menu (50a9ffa)
- select: support width fit-content (4bb9418)
- textfield: add
no-spinner
to remove number spin buttons (3c6e550)
Bug Fixes
- button: add missing sass imports (37fad06)
- chips: filter's
click.preventDefault()
not working when also updatingselected
(5dc870b) - dialog: buttons not reflecting value attribute when setting property (35913a6), closes #5409
- dialog: immediate escape key not firing cancel event in Chrome 120 (be3dc6f), closes #5313
- dialog: text is now selectable (4ae9db6)
- forms correctly focus the first invalid control instead of last (7dd7a68)
- labs: add card support for high contrast mode (53ec44b)
- labs: card content not clickable with outline fix (9c5cff8), closes #5312
- menu:
--md-menu-item-container-color
not working (86bd6f8) - progress: prevent unnecessary animation to run when not visible (4de5e74)
- rename and move
internal/controller/events
(eca1357) - ripple: multiple touches causing ripples to start from center (cef1b74), closes #5349
- select: allow aria-expanded to be set to false (73725be), closes #5360
- select: clicking select toggles the menu rather than just open (043bbad)
- select: ensure md-select selection logic uses fresh DOM references (8942715)
- select: expose SelectOption interface (edb3559)
- slider: move ripple and focus ring beneath handle (68b078b)
- slider: nested dir attributes do not break on chrome 120+ (57168f6)
- tabs:
--md-elevation-level
no longer leaks into tabs (ddf1fb0), closes #5137 - tabs:
tabs.scrollToTab()
not working (eb7c17e) - textfield: counter showing when max length is 0 or removed (9973b90)
- textfield: error styles not removing when an unrelated control is invalid (3151fd8)
- textfield: focus style lost after
reportValidity()
during change (6efc904) - textfield: remove Firefox high contrast mode background on linux (926edfb)
- tokens: moved '_values.scss' to 'internal/_values.scss' (b986b1e)
Performance Improvements
- ripple: don't process events in high contrast mode (839667d)
v1.1.1
v1.1.0
1.1.0 (2023-12-12)
Features
- chips: add filter chip
selected-icon
slot to customize checkmark (89b4c2e) - chips: add tokens to customize padding (c9e8de0)
- chip: trailing remove icon can now be customized (b44b90c)
- chip: trailing remove icon can now be customized (49a6be1)
- chip: trailing remove icon can now be customized (76883cd)
- menu,select: allow menu and select typeahead to read default slot text content (af49b64)
- menu: add document-level positioning (2b591ca), closes #5120
- menu: add popover functionality (7859b39), closes #2023 #5120
- radio: add required constraint validation (b5686ea), closes #4316
- select: match menu width to select and introduce clamp-menu-width (a5a40b6)
- switch: add slot icons (9255be1)
Bug Fixes
- 5182: dialog icon padding error (257e9c6)
- add
@material/web@nightly
publishes (91c1221) - behaviors: add focusable behavior to labs (d1ef1fe)
- behaviors: validation not reporting when form tries to submit (c53a419)
- button: allow overriding
cursor
using CSS (798f5ae) - button: allow overriding
min-width
anduser-select
(1852238) - button: allow overriding
padding
andgap
(5bb4a42) - button: don't show overflowing labels (8dcb3f6)
- button: height increases when label wraps (7cd657b)
- button: labels not truncating, add support for multiline with
text-wrap: wrap
(5d964ad) - button: sometimes submits form even when click listener prevents default (9e3f080), closes #5032
- checkbox:
checked
andindeterminate
not updated during input event (e78a52f) - chip: disabled attribute prevents click event. (2dba006)
- chip: disabled attribute prevents click event. (d501ddd)
- chip: make tap highlight transparent (c3bfbaa)
- Circular progress isn't circular in flex column display (075119c)
- docs: prepare docs generator for mixin version of lit analyzer (5e0000a)
- fab: make tap highlight transparent (4e8053d)
- filter-chip: reflect correct value on click event (0b4d4c2)
- list-item: hide headline overflow and fix width. (4697407)
- list-item: make tap highlight transparent (cca0789)
- menu: declare popover API types (bf8d3f6)
- menu: declare popover property type on HTMLElement (3d8c7ac)
- menu: escape not closing menus with submenus (bd88880)
- menu: shift tab into anchor closes menu (c4cbd36)
- progress: allow linear progress to fill flex containers (a450e42), closes #5042
- segmented-button: make tap highlight transparent (e4728bd)
- select,textfield: native form validation shows error state (6b5ab21)
- select: focus() delegates properly, focus on reporting validity (897d977)
- select: form failure no longer throws non-focusable error (a5a6974), closes #5078
- select: select menu render is over most stacking contexts with popover (a2b3204)
- tabs: allow changing tab padding (dd005df)
- tabs: fields intended to be accessed from templates must be exported (b7be1cb)
- text-field: wrap text in textarea (4fce487)
v1.0.1
1.0.1 (2023-10-18)
Bug Fixes
- catalog: align one liners to center (fbc1fa6)
- catalog: center items in blockquotes (5235b3e)
- checkbox: cursor should be pointer when not disabled (18fe451), closes #5079
- fab: cursor should be pointer (5280c6e), closes #5017
- list: list items will not escape their parent when parent width is restricted (4b00a95)
- list: show pointer cursor for button list items (16480d0), closes #5045
- md-item: exclude start slot from hidden overflow (5607059)
- md-item: exclude start slot from hidden overflow (e087141)
- menu,select: enter clicks href items (8ae8c02)
- menu: fix menu item fade in order animation (73eb15e), closes #5014
- menu: fix menu OOB from resizing window (863109e), closes #5063
- menu: fix menu tapping behaviors on iOS and do not close on anchor click (8bbb4b4)
- menu: fix submenu SSR left keyboard close navigation (d6f7220)
- radio: cursor should be pointer except when disabled (7779987)
- select: cursor on select options should be pointer (ff250dc), closes #5066
- slider: slider knob has size to drag on ios safari (6298cd2), closes #5016
- switch: cursor should be pointer except when disabled (9a3ff28), closes #5075
- tabs: revert
isTab
check so it is possible to create your own tab (db3c865) - tabs: revert
isTab
check so it is possible to create your own tab (e10186e) - tabs: use
md-tab
attribute to brand individual tab children (8ec0813) - textfield: calling focus on textfield with a leading icon focuses the input (8f999d4)
- textfield: forward the
multiple
field to the native input (03e5a7e), closes #5064 - textfield: missing focused left border for textarea in HCM (9194cc9)
- tabs: use
md-tab
attribute to brand individual tab children
Reverts
v1.0.0
1.0.0 (2023-09-26)
⚠ BREAKING CHANGES
- list: the new ListController behavior no longer waits for event.preventDefault asynchronously because it was causing keyboard navigations to scroll the page.
- list:
<md-list-item>
now uses slots instead of properties and has removed many prescriptive items (such as avatar, image, and video items). The default slot can be used for any custom content.html <md-list-item> <div slot="overline">OVERLINE</div> <div slot="headline">First line</div> <div slot="supporting-text">Second+ lines</div> <div slot="trailing-supporting-text">Trailing</div> <md-icon slot="start">star</md-icon> <md-icon slot="end">star</md-icon> </md-list-item>
Addtype="button"
ortype="link"
for interactive list items. - menu: Several enums in menu had their values changed from SCREAM_CASE to kebab-case to follow style guide. They are NAVIGABLE_KEYS -> NavigableKey, SELECTION_KEY -> SelectionKey, CLOSE_REASON -> CloseReason, KEYDOWN_CLOSE_KEY -> KeydownCloseKey
- menu,select: refactor
fixed
property topositioning="fixed"
in Menu andmenuFixed
tomenuPositioning="fixed"
- menu: This change refactors menu-item to no longer subclass or import from list-item. It also refactors it to use md-item directly which means that the API of menu item has moved from properties to slots.
start-*
andend-*
slots are now juststart
andend
, many tokens are now gone in favor of slotting.headline
property is now aslot="headline"
slot. Typeahead search text can now be set viatypeaheadText
which defaults to the slotted headlinetextContent
.select-option
now has thedisplayText
which is used to display text in themd-select
when the option is selected; defaults to the slotted headlinetextContent
. - menu: We have deleted
md-sub-menu-item
. Instead it is recommended to usemd-sub-menu
which can havemd-menu-item[slot=item]
andmd-menu[slot=menu]
slotted into it. This makessub-menu-item
accessible for screen readers using linear navigation - menu: Menu no longer uses md-list internally which means the list-related properties such as
list-tabindex
andtype
should now be on the host of md-menu. The new attributes should betabindex
androle
respectively. - iconbutton: Replace
container-size
tokens withcontainer-width
andcontainer-height
. - list: the
noninteractive
property has been replaced by theinteractive
property, and by default, a list-item will no longer show a ripple or focus ring. What to change:- To preserve prior default behavior, add the
interactive
attribute explicitly. - Any setting of a truthy
noninteractive
attribute or property can be removed as it's the new default behavior.
- To preserve prior default behavior, add the
- menu: rename corner and focus state values lowercase with dashes
- chips: chips now follow the aria toolbar pattern. Chip sets are toolbars and chips are buttons or links. Filter chips are toggle buttons. What to change:
- Remove
type
attribute from<md-chip-set>
(you can mix and match chip types!) - Remove
single-select
from<md-chip-set>
. Use JS to control filter chips if single selection is required. Radio filter chips will come in a future update. - Disabled chips CAN be focused with the keyboard if
always-focusable
is set. - Filter chips no longer dispatch a
"selected"
event. Listen to"click"
and useevent.target.selected
instead. - ArrowUp and ArrowDown no longer navigate between chips. These are reserved for chip actions, like dropdown menu chips.
- Remove
- list,menu,select: the data-variant=".." selectors in list-item and all variants have been removed in favor of their respective slots. e.g. a slotted icon of the form
md-icon[slot=end][data-variant=icon]
should now bemd-icon[slot=end-icon]
. - menu: menu selected container color changed to secondary-container
- list:
- list: Aria and roles on List have been moved to the host element. list-tabindex attribute should be migrated to tabindex attribute. type attribute should be migrated to role attribute.
- list,menu,select: removed
active
from list-item, menu-item, and select-option. Instead, List uses tabindex to track whether something is focusable. - select:
option.selected
no longer reflects. Set the attribute instead if relying on the attribute for styles/queries. - dialog: if overriding margin on a dialog's content, swap it to padding. If a dialog's slotted first or last child has built-in margin (such as
<h3>
or<p>
), remove the top/bottom margin as needed (since margin swapped to padding, there's no more margin collapsing). - tabs: Rename the
selected
index property on md-tabs toactiveTabIndex
(active-tab-index
attribute). Renameselect-on-focus
toauto-activate
- typography: composite
-type
tokens are no longer supported. Use discrete-font
,-size
,-line-height
, and-weight
tokens instead. - tabs: replace
label-text-type
tokens with-font
,-size
,-line-height
, and-weight
- tabs: rename
selected
toactive
for primary and secondary tabs. - textfield: replace slot names
leadingicon
andtrailingicon
withleading-icon
andtrailing-icon
- select: replace
leadingicon
andtrailingicon
slot names withleading-icon
andtrailing-icon
- navigationtab: change slot names activeIcon and inactiveIcon to active-icon and inactive-icon
Features
- chips: swap to toolbar a11y pattern (16bfac1)
- iconbutton: update tokens to v0.192 (e8b5b29)
- item: add
<md-item>
layout component (ffe4f79) - items: add
<md-item>
to@material/web/labs
(b35212a) - list,menu,select: add slots for specific slotted variants (ed68995)
- menu: create a Menu interface for easier md-menu wrapping (5fad4f0)
- menu: do not close menu if anchor is clicked (c7c276f)
- menu: implement md-sub-menu (54fbb2e)
- menu: menus will resize and flip corners to stay in viewport (235a203)
- menu: update tokens to v0.192 (94b5c81)
- select: add required and form association (4ad2336), closes #4903
- tabs: add
tabs
property to retrieve tab elements (bf48fc3) - typography: add typography Sass APIs (8e480de)
Bug Fixes
- aria polyfill overrides user values and user values override internals values (8aa4faf)
- catalog: remove TODO from home page (af27ff8)
- dialog: change content margin to padding (8613fe6)
- dialog: not delegating focus in closure (375b766)
- iconbutton: allow prevent default click for toggles (ed539c6), closes #4857
- iconbutton: fix HCM disabled opacity and outlined (1163315)
- linearprogress: linear progress buffer dots now visible in HCM (70bfea8)
- list,menu: clicking items in a list followed by keyboard nav functions as expected (af171df)
- list,menu: list items left right keyboard navigation (fad6104)
- list: list items are now noninteractive by default (3b5cbc4)
- list: text items are no longer tabbable, links cannot be disabled (54c4ddb)
- list: update tokens to 0.192 ([58539b1](58539b1...
v1.0.0-pre.17
1.0.0-pre.17 (2023-09-06)
⚠ BREAKING CHANGES
- slider: replace
label-text-type
tokens with-font
,-size
,-line-height
, and-weight
. Additionally, renamelabel-label-*
tokens to a singlelabel-*
- list: replace
*-type
font tokens with-font
,-size
,-line-height
, and-weight
- chips: replace
label-text-type
tokens withlabel-text-font
,-size
,-line-height
, and-weight
- text-field,select: replace
*-type
font tokens with-font
,-size
,-line-height
, and-weight
- fab: replace
label-text-type
tokens with-font
,-size
,-line-height
, and-weight
- dialogs: replace
headline-text-type
andsupporting-text-type
tokens with-font
,-size
,-line-height
, and-weight
- button: replace
label-text-type
tokens withlabel-text-font
,-size
,-line-height
, and-weight
- circularprogress: make default width 4px
- textfield: The field component must add the
resizable
attribute rather than using CSS. CSSresize
can still customize the direction (defaults to both). - list,menu,select: menu harnesses will not automatically open menus in quick mode anymore and interactions in menu and list harnesses will not automatically go to the first item but rather the menu roots.
- iconbutton: change
slot="selectedIcon"
toslot="selected"
for toggle icon buttons. - tabs: secondary tabs always have inline icons
- tabs: remove
variant
attributes and changemd-tab
tomd-primary-tab
, ormd-secondary-tab
if using `variant="secondary" - menu: allow anchoring with idref string and set element ref on anchorElement
- tokens: Change "radio-button" and "progress-indicator" Sass token APIs to "radio" and "progress". This matches the tag names of their components.
- tabs: Remove
--md-*tab-divider
tokens and usemd-tabs::part(divider)
and--md-divider-*
tokens - tabs: tabs cannot be disabled per spec. If disabled tabs are required, use
pointer-events: none
and CSS to style them. - iconbutton: change visibility of
willUpdate
to protected
Features
- color: add color folder for md-sys-color theming APIs (cdd9b26)
- color: add color folder for md-sys-color theming APIs (87af9aa)
- focus,ripple: allow setting
element.control = elementRef
(1e7aff5) - menu: allow anchoring with idref string and set element ref on anchorElement (5ba348d)
- select: dispatch select-(open|close)(ing|ed) events (1a1fb93), closes #4798
- switch: add required and form validity (9694191)
Bug Fixes
- add aria-hidden="true" to ripple, focus ring, and elevation (2295f12)
- badge: center align value text (cc195a9)
- button: remove font shorthand tokens (8894c20)
- button: update demos to fix a11y (4b61e8d)
- chips: apply cursor styling (9389e26)
- chips: linear navigation not working in VoiceOver (dfc87f3)
- chips: remove font shorthand tokens (87ad1da)
- circularprogress: make default width 4px (c864d3b)
- dialog, select: allow fixed selects to render correctly in dialogs (d6aa6b2)
- dialog: content not displaying on Safari (9b7647b), closes #4728
- dialog: not showing if opened before connected (d25c5e9), closes #4728
- dialogs: remove font shorthand tokens (81e11e0)
- fab: remove font shorthand tokens (f77ee36)
- iconbutton: change visibility of
willUpdate
to protected (dffff2d) - iconbutton: rename
selectedIcon
slot toselected
(9647f5e) - iconbutton: update demos to fix a11y (a9091fe)
- labs: remove font shorthand tokens (acd40a2)
- list,menu: restrict type to only supported aria roles (32a8c44)
- list: remove font shorthand tokens (ca2cd56)
- list: remove internal md3-* class prefix (641142d)
- menu,list,select: do not stopPropagation on native events when handled only prevent default (b85b57f)
- radio: make host radio role to fix a11y (0711f8c)
- ripple and focus ring not centered in Safari (0e8afc0)
- select, menu: allow item selection while animation is running in non-overflow contexts (b905807)
- select: announce typeahead selection when select is closed (2c892c4)
- slider: display tick marks when forced-colors is active (2f9cc20)
- slider: remove font shorthand tokens (6988a49)
- tabs: add nocollapse so isTab doesn't get minified (17ddcd3)
- tabs: incorrect layout and primary indicator width (0467c48)
- tabs: make indicator animation faster (b542d2a)
- tabs: remove disabled tabs (d18db2a)
- tabs: remove divider tokens in favor of md-divider (13690a3)
- tabs: secondary tabs always have inline icons (6b2955b)
- tabs: split md-tab into md-primary-tab and md-secondary-tab (5b13b5c)
- tabs: use instanceof to check for a Tab (58497f1)
- testing: harness not applying :active to parents (327eeaf)
- testing: remove font shorthand tokens (01a99a5)
- text-field,select: remove font shorthand tokens (0c5a2a2)
- textfield: don't transition colors when disabling (11cc472)
- textfield: line br...