@@ -11,7 +11,8 @@ import { IgcCalendarResourceStringEN } from '../../common/i18n/calendar.resource
1111import { createDateTimeFormatters } from '../../common/localization/intl-formatters.js' ;
1212import type { Constructor } from '../../common/mixins/constructor.js' ;
1313import { EventEmitterMixin } from '../../common/mixins/event-emitter.js' ;
14- import { chunk , first , last , partNameMap , take } from '../../common/util.js' ;
14+ import { partMap } from '../../common/part-map.js' ;
15+ import { chunk , first , last , take } from '../../common/util.js' ;
1516import { IgcCalendarBaseComponent } from '../base.js' ;
1617import {
1718 areSameMonth ,
@@ -382,7 +383,7 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
382383 const inactive = ! areSameMonth ( day , this . _activeDate ) ;
383384
384385 return {
385- date : true ,
386+ // date: true,
386387 disabled : disabled || hidden ,
387388 first : this . isFirstInRange ( day ) ,
388389 last : this . isLastInRange ( day ) ,
@@ -403,13 +404,12 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
403404 const { changePreview, clearPreview } = this . getDayHandlers ( day ) ;
404405
405406 const props = this . getDayProperties ( day , today ) ;
406- const parts = partNameMap ( props ) ;
407407
408408 return html `
409- < span part =${ parts } >
409+ < span part =${ partMap ( { date : true , ... props } ) } >
410410 < span
411411 role ="gridcell "
412- part =${ parts . replace ( 'date' , 'date-inner' ) }
412+ part =${ partMap ( { 'date-inner' : true , ... props } ) }
413413 aria-label =${ ariaLabel }
414414 aria-disabled=${ props . disabled }
415415 aria-selected=${ props . selected }
@@ -438,8 +438,8 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
438438
439439 protected renderWeekNumber ( start : CalendarDay , last : boolean ) {
440440 return html `
441- < span role ="rowheader " part =${ partNameMap ( { 'week-number' : true , last } ) } >
442- < span part =${ partNameMap ( { 'week-number-inner' : true , last } ) } >
441+ < span role ="rowheader " part =${ partMap ( { 'week-number' : true , last } ) } >
442+ < span part =${ partMap ( { 'week-number-inner' : true , last } ) } >
443443 ${ start . week }
444444 </ span >
445445 </ span >
0 commit comments