2023-01-09 16:31:10 -08:00

29 lines
799 B
TypeScript

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {LitElement} from 'lit';
import {property} from 'lit/decorators.js';
/**
* @summary An accessible, themable ring designed to be shown on
* `:focus-visible`.
*
* @description
* An accessible, themable ring designed to be shown on focus-visible.
* Focus ring is designed to be controlled by the `strong-focus` module in the
* same package.
*
* In most cases, `visible` should be set to
* `shouldShowStrongFocus()` on `focus` and `pointerdown` (see `pointerPress()`
* documentation in the `strong-focus` module), and `false` on `blur`.
*/
export class FocusRing extends LitElement {
/**
* Makes the focus ring visible.
*/
@property({type: Boolean, reflect: true}) visible = false;
}