File tree Expand file tree Collapse file tree 4 files changed +36
-7
lines changed
Expand file tree Collapse file tree 4 files changed +36
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## [ Unreleased]
8+ ### Added
9+ - #### List
10+ - The ` igc-list-item ` component exposes a new ` selected ` property. When set on a list item, the item will become visually highlighted.
11+
712## [ 5.2.4] - 2025-02-24
813### Changed
914- #### Carousel - ** Potential visual breaking change.**
Original file line number Diff line number Diff line change 11import { LitElement , html } from 'lit' ;
22
3+ import { property } from 'lit/decorators.js' ;
34import { themes } from '../../theming/theming-decorator.js' ;
45import { registerComponent } from '../common/definitions/register.js' ;
56import { styles } from './themes/item.base.css.js' ;
@@ -35,6 +36,13 @@ export default class IgcListItemComponent extends LitElement {
3536 registerComponent ( IgcListItemComponent ) ;
3637 }
3738
39+ /**
40+ * Defines if the list item is selected or not.
41+ * @attr
42+ */
43+ @property ( { type : Boolean , reflect : true } )
44+ public selected = false ;
45+
3846 private _internals : ElementInternals ;
3947
4048 constructor ( ) {
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ $theme: $material;
77 border-radius : var-get ($theme , ' item-border-radius' );
88 color : var-get ($theme , ' item-text-color' );
99 background : var-get ($theme , ' item-background' );
10- border-bottom : var-get ($theme , ' border-width' ) solid var-get ($theme , ' border-color' );
10+ border-bottom : var-get ($theme , ' border-width' ) solid
11+ var-get ($theme , ' border-color' );
1112}
1213
1314:host (:last-of-type ) {
@@ -30,6 +31,27 @@ $theme: $material;
3031 color : var-get ($theme , ' item-action-color' );
3132}
3233
34+ :host ([selected ]) {
35+ color : var-get ($theme , ' item-text-color-selected' );
36+ background : var-get ($theme , ' item-background-selected' );
37+
38+ [part = ' title' ] {
39+ color : var-get ($theme , ' item-title-color-selected' );
40+ }
41+
42+ [part = ' subtitle' ] {
43+ color : var-get ($theme , ' item-subtitle-color-selected' );
44+ }
45+
46+ [part = ' start' ] {
47+ color : var-get ($theme , ' item-thumbnail-color-selected' );
48+ }
49+
50+ [part = ' end' ] {
51+ color : var-get ($theme , ' item-action-color-selected' );
52+ }
53+ }
54+
3355:host (:hover ),
3456:host (:focus-within ) {
3557 background : var-get ($theme , ' item-background-hover' );
Original file line number Diff line number Diff line change 44 IgcAvatarComponent ,
55 IgcIconComponent ,
66 defineComponents ,
7- registerIcon ,
87} from 'igniteui-webcomponents' ;
98import { html } from 'lit' ;
109
@@ -63,11 +62,6 @@ interface IgcAvatarArgs {
6362}
6463type Story = StoryObj < IgcAvatarArgs > ;
6564
66- registerIcon (
67- 'home' ,
68- 'https://unpkg.com/[email protected] /action/svg/production/ic_home_24px.svg' 69- ) ;
70-
7165// endregion
7266
7367export const Image : Story = {
You can’t perform that action at this time.
0 commit comments