added expand button part for tree item (#893); fixes #890

pull/901/head
Buni48 2022-09-05 19:52:41 +03:00 zatwierdzone przez GitHub
rodzic 7c0c0fa244
commit 6c716db037
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -15,6 +15,7 @@ This release removes the `<sl-responsive-media>` component. When this component
- 🚨 BREAKING: Removed `<sl-responsive-media>` (use the well-supported `aspect-ratio` CSS property instead)
- Added an expand/collapse animation to `<sl-tree-item>`
- Added `sl-lazy-change` event to `<sl-tree-item>`
- Added `expand-button` css part to `<sl-tree-item>` [#890](https://github.com/shoelace-style/shoelace/issues/890)
- Fixed a bug in `<sl-popup>` that didn't account for the arrow's diagonal size
- Fixed a bug in `<sl-popup>` that caused arrow placement to be incorrect with RTL
- Fixed a bug in `<sl-progress-ring>` that caused the indeterminate animation to stop working in Safari [#891](https://github.com/shoelace-style/shoelace/issues/891)

Wyświetl plik

@ -41,6 +41,7 @@ export function isTreeItem(element: Element) {
* @slot collapse-icon - The icon to show when the item is collapsed.
*
* @csspart base - The component's internal wrapper.
* @csspart expand-button - The item's expand button.
* @csspart item - The item main container.
* @csspart item--disabled - Applied when the item is disabled.
* @csspart item--expanded - Applied when the item is expanded.
@ -242,6 +243,7 @@ export default class SlTreeItem extends ShoelaceElement {
'tree-item__expand-button': true,
'tree-item__expand-button--visible': showExpandButton
})}
part="expand-button"
aria-hidden="true"
>
${when(this.loading, () => html` <sl-spinner></sl-spinner> `)}