Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/violet-cooks-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solid-design-system/components': patch
---

Fixed the focus ring on the `sd-teaser-media` expandable toggle so it is clearly visible across all variants
11 changes: 5 additions & 6 deletions packages/components/src/components/datepicker/datepicker.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import '../../../dist/solid-components';
import { clickOnElement } from '../../internal/test.js';
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
import { sendKeys } from '@web/test-runner-commands';
import sinon from 'sinon';
Expand Down Expand Up @@ -176,9 +175,9 @@ describe('<sd-datepicker>', () => {
await el.updateComplete;

const dayButtons = el.shadowRoot!.querySelectorAll('button.day:not(.out-month):not(.disabled)');
await clickOnElement(dayButtons[5]);
(dayButtons[5] as HTMLButtonElement).click();
await el.updateComplete;
await clickOnElement(dayButtons[10]);
(dayButtons[10] as HTMLButtonElement).click();
await el.updateComplete;

expect(el.rangeStart).to.not.be.null;
Expand All @@ -195,7 +194,7 @@ describe('<sd-datepicker>', () => {
await el.updateComplete;

const dayButtons = el.shadowRoot!.querySelectorAll('button.day:not(.out-month):not(.disabled)');
await clickOnElement(dayButtons[5]);
(dayButtons[5] as HTMLButtonElement).click();
await el.updateComplete;

expect(rangeSelectHandler).to.have.been.calledOnce;
Expand All @@ -208,9 +207,9 @@ describe('<sd-datepicker>', () => {
await el.updateComplete;

const dayButtons = el.shadowRoot!.querySelectorAll('button.day:not(.out-month):not(.disabled)');
await clickOnElement(dayButtons[10]);
(dayButtons[10] as HTMLButtonElement).click();
await el.updateComplete;
await clickOnElement(dayButtons[5]);
(dayButtons[5] as HTMLButtonElement).click();
await el.updateComplete;

expect(el.rangeStart).to.not.be.null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ export default class SdTeaserMedia extends SolidElement {

[part='toggle'] {
@apply w-fit;
@apply outline-transparent;
}

:host([variant='primary']) [part='toggle']:focus-visible,
:host([variant='gradient-dark']) [part='toggle']:focus-visible {
outline-color: rgba(var(--sd-color-text-white));
}
`
];
Expand Down
Loading