@@ -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,6 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
382383 const inactive = ! areSameMonth ( day , this . _activeDate ) ;
383384
384385 return {
385- date : true ,
386386 disabled : disabled || hidden ,
387387 first : this . isFirstInRange ( day ) ,
388388 last : this . isLastInRange ( day ) ,
@@ -403,13 +403,12 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
403403 const { changePreview, clearPreview } = this . getDayHandlers ( day ) ;
404404
405405 const props = this . getDayProperties ( day , today ) ;
406- const parts = partNameMap ( props ) ;
407406
408407 return html `
409- < span part =${ parts } >
408+ < span part =${ partMap ( { date : true , ... props } ) } >
410409 < span
411410 role ="gridcell "
412- part =${ parts . replace ( 'date' , 'date-inner' ) }
411+ part =${ partMap ( { 'date-inner' : true , ... props } ) }
413412 aria-label =${ ariaLabel }
414413 aria-disabled=${ props . disabled }
415414 aria-selected=${ props . selected }
@@ -438,8 +437,8 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
438437
439438 protected renderWeekNumber ( start : CalendarDay , last : boolean ) {
440439 return html `
441- < span role ="rowheader " part =${ partNameMap ( { 'week-number' : true , last } ) } >
442- < span part =${ partNameMap ( { 'week-number-inner' : true , last } ) } >
440+ < span role ="rowheader " part =${ partMap ( { 'week-number' : true , last } ) } >
441+ < span part =${ partMap ( { 'week-number-inner' : true , last } ) } >
443442 ${ start . week }
444443 </ span >
445444 </ span >
0 commit comments