11import { ContextProvider } from '@lit/context' ;
22import { LitElement , html } from 'lit' ;
3- import { property } from 'lit/decorators.js' ;
3+ import { property , state } from 'lit/decorators.js' ;
44import { type StyleInfo , styleMap } from 'lit/directives/style-map.js' ;
55import { themes } from '../../theming/theming-decorator.js' ;
66import { tileManagerContext } from '../common/context.js' ;
@@ -11,7 +11,11 @@ import {
1111import { registerComponent } from '../common/definitions/register.js' ;
1212import type { Constructor } from '../common/mixins/constructor.js' ;
1313import { EventEmitterMixin } from '../common/mixins/event-emitter.js' ;
14- import { asNumber , findElementFromEventPath } from '../common/util.js' ;
14+ import {
15+ asNumber ,
16+ findElementFromEventPath ,
17+ partNameMap ,
18+ } from '../common/util.js' ;
1519import { createTilesState , isSameTile , swapTiles } from './position.js' ;
1620import { createSerializer } from './serializer.js' ;
1721import { all } from './themes/container.js' ;
@@ -95,6 +99,9 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
9599 this . _tilesState . assignTiles ( ) ;
96100 }
97101
102+ @state ( )
103+ private _isAnyTileMaximized = false ;
104+
98105 /**
99106 * Determines whether the tiles slide or swap on drop.
100107 * @attr drag-mode
@@ -173,6 +180,11 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
173180 } ) ;
174181 }
175182
183+ public override connectedCallback ( ) {
184+ super . connectedCallback ( ) ;
185+ this . updateIsAnyTileMaximized ( ) ;
186+ }
187+
176188 protected override firstUpdated ( ) {
177189 this . _tilesState . assignPositions ( ) ;
178190 this . _tilesState . assignTiles ( ) ;
@@ -209,6 +221,11 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
209221 }
210222 }
211223
224+ /** @private @hidden @internal */
225+ public updateIsAnyTileMaximized ( ) {
226+ this . _isAnyTileMaximized = this . tiles . some ( ( tile ) => tile . maximized ) ;
227+ }
228+
212229 public saveLayout ( ) : string {
213230 return this . _serializer . saveAsJSON ( ) ;
214231 }
@@ -218,10 +235,15 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
218235 }
219236
220237 protected override render ( ) {
238+ const parts = partNameMap ( {
239+ base : true ,
240+ 'maximized-tile' : this . _isAnyTileMaximized ,
241+ } ) ;
242+
221243 return html `
222244 < div
223245 style =${ styleMap ( this . _internalStyles ) }
224- part ="base"
246+ part =${ parts }
225247 @tileDragStart=${ this . handleTileDragStart }
226248 @tileDragEnd=${ this . handleTileDragEnd }
227249 @dragover=${ this . handleDragOver }
0 commit comments