From 0e3fe72f8f69413085170291e1f4a50607e3b5ca Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Thu, 22 Jun 2023 12:07:35 -0700 Subject: [PATCH] fix(list)!: change compound attribute names to kebab-case BREAKING_CHANGE: Attributes `listtabindex`, `supportingtext`, `multilinesupportingtext`, `trailingsupportingtext`, and `itemtabindex` have been renamed to `list-tabindex`, `supporting-text`, `multi-line-supporting-text`, `trailing-supporting-text`, and `item-tabindex`. PiperOrigin-RevId: 542629274 --- list/lib/list.ts | 2 +- list/lib/listitem/list-item.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/list/lib/list.ts b/list/lib/list.ts index 7151d9dfd4..58953d44e2 100644 --- a/list/lib/list.ts +++ b/list/lib/list.ts @@ -51,7 +51,7 @@ export class List extends LitElement { /** * The tabindex of the underlying list. */ - @property({type: Number}) listTabIndex = 0; + @property({type: Number, attribute: 'list-tabindex'}) listTabIndex = 0; @query('.md3-list') listRoot!: HTMLElement|null; diff --git a/list/lib/listitem/list-item.ts b/list/lib/listitem/list-item.ts index 51f076c715..c0150fb5dd 100644 --- a/list/lib/listitem/list-item.ts +++ b/list/lib/listitem/list-item.ts @@ -46,18 +46,20 @@ export class ListItemEl extends LitElement implements ListItem { * `multiLineSupportingText` to `true` to support multiple lines in the * supporting text. */ - @property() supportingText = ''; + @property({attribute: 'supporting-text'}) supportingText = ''; /** * Modifies `supportingText` to support multiple lines. */ - @property({type: Boolean}) multiLineSupportingText = false; + @property({type: Boolean, attribute: 'multi-line-supporting-text'}) + multiLineSupportingText = false; /** * The supporting text placed at the end of the item. Overridden by elements * slotted into the `end` slot. */ - @property() trailingSupportingText = ''; + @property({attribute: 'trailing-supporting-text'}) + trailingSupportingText = ''; /** * Disables the item and makes it non-selectable and non-interactive. @@ -70,7 +72,7 @@ export class ListItemEl extends LitElement implements ListItem { * __NOTE:__ this is overridden by the keyboard behavior of `md-list` and by * setting `selected`. */ - @property({type: Number}) itemTabIndex = -1; + @property({type: Number, attribute: 'item-tabindex'}) itemTabIndex = -1; /** * Whether or not the element is actively being interacted with by md-list.