@@ -105,10 +105,10 @@ class Popover extends Popup {
105
105
106
106
/**
107
107
* Determines on which side the component is placed at.
108
- * @default "Right "
108
+ * @default "End "
109
109
* @public
110
110
*/
111
- @property ( { type : PopoverPlacementType , defaultValue : PopoverPlacementType . Right } )
111
+ @property ( { type : PopoverPlacementType , defaultValue : PopoverPlacementType . End } )
112
112
placementType ! : `${PopoverPlacementType } `;
113
113
114
114
/**
@@ -199,7 +199,7 @@ class Popover extends Popup {
199
199
* Returns the calculated placement depending on the free space
200
200
* @private
201
201
*/
202
- @property ( { type : PopoverPlacementType , defaultValue : PopoverPlacementType . Right } )
202
+ @property ( { type : PopoverPlacementType , defaultValue : PopoverPlacementType . End } )
203
203
actualPlacementType ! : `${PopoverPlacementType } `;
204
204
205
205
@property ( { validator : Integer , noAttribute : true } )
@@ -313,8 +313,8 @@ class Popover extends Popup {
313
313
shouldCloseDueToOverflow ( placement : `${PopoverPlacementType } `, openerRect : DOMRect ) : boolean {
314
314
const threshold = 32 ;
315
315
const limits = {
316
- "Right " : openerRect . right ,
317
- "Left " : openerRect . left ,
316
+ "Start " : openerRect . right ,
317
+ "End " : openerRect . left ,
318
318
"Top" : openerRect . top ,
319
319
"Bottom" : openerRect . bottom ,
320
320
} ;
@@ -400,7 +400,7 @@ class Popover extends Popup {
400
400
document . documentElement . clientWidth - popoverSize . width - Popover . VIEWPORT_MARGIN ,
401
401
) ;
402
402
403
- if ( this . actualPlacementType === PopoverPlacementType . Right ) {
403
+ if ( this . actualPlacementType === PopoverPlacementType . End ) {
404
404
left = Math . max ( left , this . _left ! ) ;
405
405
}
406
406
@@ -533,15 +533,15 @@ class Popover extends Popup {
533
533
maxHeight = clientHeight - targetRect . bottom - arrowOffset ;
534
534
}
535
535
break ;
536
- case PopoverPlacementType . Left :
536
+ case PopoverPlacementType . Start :
537
537
left = Math . max ( targetRect . left - popoverSize . width - arrowOffset , 0 ) ;
538
538
top = this . getHorizontalTop ( targetRect , popoverSize ) ;
539
539
540
540
if ( ! allowTargetOverlap ) {
541
541
maxWidth = targetRect . left - arrowOffset ;
542
542
}
543
543
break ;
544
- case PopoverPlacementType . Right :
544
+ case PopoverPlacementType . End :
545
545
left = targetRect . left + targetRect . width + arrowOffset ;
546
546
top = this . getHorizontalTop ( targetRect , popoverSize ) ;
547
547
@@ -605,11 +605,11 @@ class Popover extends Popup {
605
605
const horizontalAlign = this . _actualHorizontalAlign ;
606
606
let arrowXCentered = horizontalAlign === PopoverHorizontalAlign . Center || horizontalAlign === PopoverHorizontalAlign . Stretch ;
607
607
608
- if ( horizontalAlign === PopoverHorizontalAlign . Right && left <= targetRect . left ) {
608
+ if ( horizontalAlign === PopoverHorizontalAlign . End && left <= targetRect . left ) {
609
609
arrowXCentered = true ;
610
610
}
611
611
612
- if ( horizontalAlign === PopoverHorizontalAlign . Left && left + popoverSize . width >= targetRect . left + targetRect . width ) {
612
+ if ( horizontalAlign === PopoverHorizontalAlign . Start && left + popoverSize . width >= targetRect . left + targetRect . width ) {
613
613
arrowXCentered = true ;
614
614
}
615
615
@@ -651,11 +651,11 @@ class Popover extends Popup {
651
651
*/
652
652
fallbackPlacement ( clientWidth : number , clientHeight : number , targetRect : DOMRect , popoverSize : PopoverSize ) : PopoverPlacementType | undefined {
653
653
if ( targetRect . left > popoverSize . width ) {
654
- return PopoverPlacementType . Left ;
654
+ return PopoverPlacementType . Start ;
655
655
}
656
656
657
657
if ( clientWidth - targetRect . right > targetRect . left ) {
658
- return PopoverPlacementType . Right ;
658
+ return PopoverPlacementType . End ;
659
659
}
660
660
661
661
if ( clientHeight - targetRect . bottom > popoverSize . height ) {
@@ -687,12 +687,12 @@ class Popover extends Popup {
687
687
actualPlacementType = PopoverPlacementType . Top ;
688
688
}
689
689
break ;
690
- case PopoverPlacementType . Left :
690
+ case PopoverPlacementType . Start :
691
691
if ( targetRect . left < popoverSize . width ) {
692
692
actualPlacementType = this . fallbackPlacement ( clientWidth , clientHeight , targetRect , popoverSize ) || placementType ;
693
693
}
694
694
break ;
695
- case PopoverPlacementType . Right :
695
+ case PopoverPlacementType . End :
696
696
if ( clientWidth - targetRect . right < popoverSize . width ) {
697
697
actualPlacementType = this . fallbackPlacement ( clientWidth , clientHeight , targetRect , popoverSize ) || placementType ;
698
698
}
@@ -711,10 +711,10 @@ class Popover extends Popup {
711
711
case PopoverHorizontalAlign . Stretch :
712
712
left = targetRect . left - ( popoverSize . width - targetRect . width ) / 2 ;
713
713
break ;
714
- case PopoverHorizontalAlign . Left :
714
+ case PopoverHorizontalAlign . Start :
715
715
left = targetRect . left ;
716
716
break ;
717
- case PopoverHorizontalAlign . Right :
717
+ case PopoverHorizontalAlign . End :
718
718
left = targetRect . right - popoverSize . width ;
719
719
break ;
720
720
}
@@ -793,12 +793,12 @@ class Popover extends Popup {
793
793
794
794
get _actualHorizontalAlign ( ) {
795
795
if ( this . effectiveDir === "rtl" ) {
796
- if ( this . horizontalAlign === PopoverHorizontalAlign . Left ) {
797
- return PopoverHorizontalAlign . Right ;
796
+ if ( this . horizontalAlign === PopoverHorizontalAlign . Start ) {
797
+ return PopoverHorizontalAlign . End ;
798
798
}
799
799
800
- if ( this . horizontalAlign === PopoverHorizontalAlign . Right ) {
801
- return PopoverHorizontalAlign . Left ;
800
+ if ( this . horizontalAlign === PopoverHorizontalAlign . End ) {
801
+ return PopoverHorizontalAlign . Start ;
802
802
}
803
803
}
804
804
0 commit comments