This card has a header. You can put all sorts of things in it!
- `
+ `,
);
await expect(el).to.be.accessible();
});
@@ -48,7 +48,7 @@ describe('', () => {
html`
Header Title
This card has a header. You can put all sorts of things in it!
- `
+ `,
);
expect(el.innerText).to.contain('This card has a header. You can put all sorts of things in it!');
});
@@ -58,7 +58,7 @@ describe('', () => {
html`
Header Title
This card has a header. You can put all sorts of things in it!
- `
+ `,
);
const header = el.querySelector('div[slot=header]')!;
expect(header.innerText).eq('Header Title');
@@ -69,7 +69,7 @@ describe('', () => {
html`
Header Title
This card has a header. You can put all sorts of things in it!
- `
+ `,
);
const slot = el.shadowRoot!.querySelector('slot[name=header]')!;
const childNodes = slot.assignedNodes({ flatten: true });
@@ -82,7 +82,7 @@ describe('', () => {
html`
Header Title
This card has a header. You can put all sorts of things in it!
- `
+ `,
);
const card = el.shadowRoot!.querySelector('.card')!;
expect(card.classList.value.trim()).to.eq('card card--has-header');
@@ -96,7 +96,7 @@ describe('', () => {
This card has a footer. You can put all sorts of things in it!
Footer Content
- `
+ `,
);
await expect(el).to.be.accessible();
});
@@ -107,7 +107,7 @@ describe('', () => {
This card has a footer. You can put all sorts of things in it!
Footer Content
- `
+ `,
);
expect(el.innerText).to.contain('This card has a footer. You can put all sorts of things in it!');
});
@@ -118,7 +118,7 @@ describe('', () => {
This card has a footer. You can put all sorts of things in it!
Footer Content
- `
+ `,
);
const footer = el.querySelector('div[slot=footer]')!;
expect(footer.innerText).eq('Footer Content');
@@ -130,7 +130,7 @@ describe('', () => {
This card has a footer. You can put all sorts of things in it!
Footer Content
- `
+ `,
);
const slot = el.shadowRoot!.querySelector('slot[name=footer]')!;
const childNodes = slot.assignedNodes({ flatten: true });
@@ -144,7 +144,7 @@ describe('', () => {
This card has a footer. You can put all sorts of things in it!
Footer Content
- `
+ `,
);
const card = el.shadowRoot!.querySelector('.card')!;
@@ -162,7 +162,7 @@ describe('', () => {
alt="A kitten walks towards camera on top of pallet."
/>
This is a kitten, but not just any kitten. This kitten likes walking along pallets.
- `
+ `,
);
await expect(el).to.be.accessible();
@@ -177,11 +177,11 @@ describe('', () => {
alt="A kitten walks towards camera on top of pallet."
/>
This is a kitten, but not just any kitten. This kitten likes walking along pallets.
- `
+ `,
);
expect(el.innerText).to.contain(
- 'This is a kitten, but not just any kitten. This kitten likes walking along pallets.'
+ 'This is a kitten, but not just any kitten. This kitten likes walking along pallets.',
);
});
@@ -194,7 +194,7 @@ describe('', () => {
alt="A kitten walks towards camera on top of pallet."
/>
This is a kitten, but not just any kitten. This kitten likes walking along pallets.
- `
+ `,
);
const slot = el.shadowRoot!.querySelector('slot[name=image]')!;
const childNodes = slot.assignedNodes({ flatten: true });
@@ -211,7 +211,7 @@ describe('', () => {
alt="A kitten walks towards camera on top of pallet."
/>
This is a kitten, but not just any kitten. This kitten likes walking along pallets.
- `
+ `,
);
const card = el.shadowRoot!.querySelector('.card')!;
diff --git a/src/components/card/card.ts b/src/components/card/card.ts
index 152a48036..289f2d32d 100644
--- a/src/components/card/card.ts
+++ b/src/components/card/card.ts
@@ -50,7 +50,7 @@ export default class WaCard extends WebAwesomeElement {
card: true,
'card--has-footer': this.withFooter,
'card--has-image': this.withImage,
- 'card--has-header': this.withHeader
+ 'card--has-header': this.withHeader,
})}
>
diff --git a/src/components/carousel/carousel.test.ts b/src/components/carousel/carousel.test.ts
index 30ebff69b..0ba85c379 100644
--- a/src/components/carousel/carousel.test.ts
+++ b/src/components/carousel/carousel.test.ts
@@ -63,7 +63,7 @@ describe('', () => {
beforeEach(() => {
clock = sandbox.useFakeTimers({
- now: new Date()
+ now: new Date(),
});
});
@@ -262,7 +262,7 @@ describe('', () => {
[10, 2, 2, false, 5],
[7, 2, 1, true, 7],
[5, 3, 3, true, 2],
- [10, 2, 2, true, 5]
+ [10, 2, 2, true, 5],
].forEach(
([slides, slidesPerPage, slidesPerMove, loop, expected]: [number, number, number, boolean, number]) => {
it(`should display ${expected} pages for ${slides} slides grouped by ${slidesPerPage} and scrolled by ${slidesPerMove}${
@@ -285,7 +285,7 @@ describe('', () => {
const paginationItems = el.shadowRoot!.querySelectorAll('.carousel__pagination-item');
expect(paginationItems.length).to.equal(expected);
});
- }
+ },
);
});
@@ -622,7 +622,7 @@ describe('', () => {
`);
const previousButton: HTMLElement = el.shadowRoot!.querySelector(
- '.carousel__navigation-button--previous'
+ '.carousel__navigation-button--previous',
)!;
sandbox.stub(el, 'previous');
await el.updateComplete;
@@ -648,7 +648,7 @@ describe('', () => {
`);
const previousButton: HTMLElement = el.shadowRoot!.querySelector(
- '.carousel__navigation-button--previous'
+ '.carousel__navigation-button--previous',
)!;
await el.updateComplete;
diff --git a/src/components/carousel/carousel.ts b/src/components/carousel/carousel.ts
index 9604882d2..7634f7b25 100644
--- a/src/components/carousel/carousel.ts
+++ b/src/components/carousel/carousel.ts
@@ -119,7 +119,7 @@ export default class WaCarousel extends WebAwesomeElement {
this.mutationObserver = new MutationObserver(this.handleSlotChange);
this.mutationObserver.observe(this, {
childList: true,
- subtree: true
+ subtree: true,
});
}
@@ -154,7 +154,7 @@ export default class WaCarousel extends WebAwesomeElement {
/** @internal Gets all carousel items. */
private getSlides({ excludeClones = true }: { excludeClones?: boolean } = {}) {
return [...this.children].filter(
- (el: HTMLElement) => this.isCarouselItem(el) && (!excludeClones || !el.hasAttribute('data-clone'))
+ (el: HTMLElement) => this.isCarouselItem(el) && (!excludeClones || !el.hasAttribute('data-clone')),
) as WaCarouselItem[];
}
@@ -203,7 +203,7 @@ export default class WaCarousel extends WebAwesomeElement {
if (isFocusInPagination) {
this.updateComplete.then(() => {
const activePaginationItem = this.shadowRoot?.querySelector(
- '[part~="pagination-item--active"]'
+ '[part~="pagination-item--active"]',
);
if (activePaginationItem) {
@@ -235,7 +235,7 @@ export default class WaCarousel extends WebAwesomeElement {
this.scrollContainer.scrollBy({
left: -event.movementX,
top: -event.movementY,
- behavior: 'instant'
+ behavior: 'instant',
});
};
@@ -269,7 +269,7 @@ export default class WaCarousel extends WebAwesomeElement {
scrollContainer.scrollTo({
left: finalLeft,
top: finalTop,
- behavior: prefersReducedMotion() ? 'auto' : 'smooth'
+ behavior: prefersReducedMotion() ? 'auto' : 'smooth',
});
await waitForEvent(scrollContainer, 'scrollend');
}
@@ -333,8 +333,8 @@ export default class WaCarousel extends WebAwesomeElement {
},
{
root: this.scrollContainer,
- threshold: 0.6
- }
+ threshold: 0.6,
+ },
);
this.getSlides({ excludeClones: false }).forEach(slide => {
@@ -359,8 +359,8 @@ export default class WaCarousel extends WebAwesomeElement {
private handleSlotChange = (mutations: MutationRecord[]) => {
const needsInitialization = mutations.some(mutation =>
[...mutation.addedNodes, ...mutation.removedNodes].some(
- (el: HTMLElement) => this.isCarouselItem(el) && !el.hasAttribute('data-clone')
- )
+ (el: HTMLElement) => this.isCarouselItem(el) && !el.hasAttribute('data-clone'),
+ ),
);
// Reinitialize the carousel if a carousel item has been added or removed
@@ -430,8 +430,8 @@ export default class WaCarousel extends WebAwesomeElement {
this.dispatchEvent(
new WaSlideChangeEvent({
index: this.activeSlide,
- slide: slides[this.activeSlide]
- })
+ slide: slides[this.activeSlide],
+ }),
);
}
}
@@ -508,7 +508,7 @@ export default class WaCarousel extends WebAwesomeElement {
const nextSlideIndex = clamp(
index + (loop ? slidesPerPage : 0) + (isRtl ? slidesPerPage - 1 : 0),
0,
- slidesWithClones.length - 1
+ slidesWithClones.length - 1,
);
const nextSlide = slidesWithClones[nextSlideIndex];
@@ -541,7 +541,7 @@ export default class WaCarousel extends WebAwesomeElement {
scrollContainer.scrollTo({
left: nextLeft + scrollContainer.scrollLeft,
top: nextTop + scrollContainer.scrollTop,
- behavior
+ behavior,
});
} else {
this.pendingSlideChange = false;
@@ -577,7 +577,7 @@ export default class WaCarousel extends WebAwesomeElement {
carousel__slides: true,
'carousel__slides--horizontal': this.orientation === 'horizontal',
'carousel__slides--vertical': this.orientation === 'vertical',
- 'carousel__slides--dragging': this.dragging
+ 'carousel__slides--dragging': this.dragging,
})}"
style="--slides-per-page: ${this.slidesPerPage};"
aria-busy="${scrolling ? 'true' : 'false'}"
@@ -600,7 +600,7 @@ export default class WaCarousel extends WebAwesomeElement {
class="${classMap({
'carousel__navigation-button': true,
'carousel__navigation-button--previous': true,
- 'carousel__navigation-button--disabled': !prevEnabled
+ 'carousel__navigation-button--disabled': !prevEnabled,
})}"
aria-label="${this.localize.term('previousSlide')}"
aria-controls="scroll-container"
@@ -617,7 +617,7 @@ export default class WaCarousel extends WebAwesomeElement {
class=${classMap({
'carousel__navigation-button': true,
'carousel__navigation-button--next': true,
- 'carousel__navigation-button--disabled': !nextEnabled
+ 'carousel__navigation-button--disabled': !nextEnabled,
})}
aria-label="${this.localize.term('nextSlide')}"
aria-controls="scroll-container"
@@ -641,7 +641,7 @@ export default class WaCarousel extends WebAwesomeElement {
part="pagination-item ${isActive ? 'pagination-item--active' : ''}"
class="${classMap({
'carousel__pagination-item': true,
- 'carousel__pagination-item--active': isActive
+ 'carousel__pagination-item--active': isActive,
})}"
role="tab"
aria-selected="${isActive ? 'true' : 'false'}"
diff --git a/src/components/carousel/scroll-controller.ts b/src/components/carousel/scroll-controller.ts
index 38718dad8..9ccf3bec7 100644
--- a/src/components/carousel/scroll-controller.ts
+++ b/src/components/carousel/scroll-controller.ts
@@ -104,7 +104,7 @@ export class ScrollController implements ReactiveControlle
handleDrag(event: PointerEvent) {
this.host.scrollContainer.scrollBy({
left: -event.movementX,
- top: -event.movementY
+ top: -event.movementY,
});
}
diff --git a/src/components/checkbox/checkbox.test.ts b/src/components/checkbox/checkbox.test.ts
index 12556db62..9dcb01e1a 100644
--- a/src/components/checkbox/checkbox.test.ts
+++ b/src/components/checkbox/checkbox.test.ts
@@ -122,7 +122,7 @@ describe('', () => {
it('Should keep its form value when going from checked -> unchecked -> checked', async () => {
const form = await fixture(
- html``
+ html``,
);
const checkbox = form.querySelector('wa-checkbox')!;
diff --git a/src/components/checkbox/checkbox.ts b/src/components/checkbox/checkbox.ts
index 6b3f8557a..312a76093 100644
--- a/src/components/checkbox/checkbox.ts
+++ b/src/components/checkbox/checkbox.ts
@@ -69,9 +69,9 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement {
// Use a checkbox so we get "free" translation strings.
validationElement: Object.assign(document.createElement('input'), {
type: 'checkbox',
- required: true
- })
- })
+ required: true,
+ }),
+ }),
];
return [...super.validators, ...validators];
}
@@ -223,7 +223,7 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement {