@@ -2,8 +2,6 @@ import { html, nothing } from 'lit';
22import { property , query , queryAll , state } from 'lit/decorators.js' ;
33import { choose } from 'lit/directives/choose.js' ;
44import { createRef , type Ref , ref } from 'lit/directives/ref.js' ;
5- import { styleMap } from 'lit/directives/style-map.js' ;
6-
75import { addThemingController } from '../../theming/theming-controller.js' ;
86import {
97 addKeybindings ,
@@ -74,6 +72,7 @@ export const focusActiveDate = Symbol();
7472 * @csspart header-title - The header title element of the calendar.
7573 * @csspart header-date - The header date element of the calendar.
7674 * @csspart content - The content element which contains the views and navigation elements of the calendar.
75+ * @csspart content-vertical - The content element which contains the views and navigation elements of the calendar in vertical orientation.
7776 * @csspart navigation - The navigation container element of the calendar.
7877 * @csspart months-navigation - The months navigation button element of the calendar.
7978 * @csspart years-navigation - The years navigation button element of the calendar.
@@ -610,7 +609,7 @@ export default class IgcCalendarComponent extends EventEmitterMixin<
610609 @igcActiveDateChange =${ this . activeDateChanged }
611610 @igcRangePreviewDateChange=${ this . rangePreviewDateChanged }
612611 part="days-view"
613- exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, weekend, range, special, disabled, single, preview"
612+ exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, content-vertical, weekend, range, special, disabled, single, preview"
614613 .active=${ this . activeDaysViewIndex === idx }
615614 .activeDate=${ date . native }
616615 .disabledDates=${ this . disabledDates }
@@ -663,17 +662,14 @@ export default class IgcCalendarComponent extends EventEmitterMixin<
663662 }
664663
665664 protected override render ( ) {
666- const direction = this . _isDayView && this . orientation === 'horizontal' ;
667-
668- const styles = {
669- display : 'flex' ,
670- flexGrow : 1 ,
671- flexDirection : direction ? 'row' : 'column' ,
665+ const parts = {
666+ content : true ,
667+ 'content-vertical' : this . _isDayView && this . orientation === 'vertical' ,
672668 } ;
673669
674670 return html `
675671 ${ this . renderHeader ( ) }
676- < div ${ ref ( this . contentRef ) } part =" content " style = ${ styleMap ( styles ) } >
672+ < div ${ ref ( this . contentRef ) } part =${ partMap ( parts ) } >
677673 ${ choose ( this . activeView , [
678674 [ 'days' , ( ) => this . renderDaysView ( ) ] ,
679675 [ 'months' , ( ) => this . renderMonthView ( ) ] ,
0 commit comments