This commit is contained in:
Cory LaViska
2024-05-28 15:28:10 -04:00
parent 975115a923
commit c042c8fe34
4 changed files with 4 additions and 4 deletions

View File

@@ -488,7 +488,7 @@ export default class SlCarousel extends ShoelaceElement {
const currentPage = this.getCurrentPage();
const prevEnabled = this.canScrollPrev();
const nextEnabled = this.canScrollNext();
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
return html`
<div part="base" class="carousel">

View File

@@ -63,7 +63,7 @@ export default class SlImageComparer extends ShoelaceElement {
}
private handleKeyDown(event: KeyboardEvent) {
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {

View File

@@ -108,7 +108,7 @@ export default class SlRating extends ShoelaceElement {
}
private handleKeyDown(event: KeyboardEvent) {
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
const oldValue = this.value;

View File

@@ -225,7 +225,7 @@ export default class SlTree extends ShoelaceElement {
}
const items = this.getFocusableItems();
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
if (items.length > 0) {