UNPKG

@spectrum-web-components/button

Version:

An `<sp-button>` represents an action a user can take. sp-buttons can be clicked or tapped to perform an action or to navigate to another page. sp-buttons in Spectrum have several variations for different uses and multiple levels of loudness for various a

39 lines (38 loc) 1.72 kB
import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base'; import { Focusable } from '@spectrum-web-components/shared/src/focusable.js'; declare const ButtonBase_base: typeof Focusable & { new (...args: any[]): import("@spectrum-web-components/shared/src/like-anchor.js").LikeAnchorInterface; prototype: import("@spectrum-web-components/shared/src/like-anchor.js").LikeAnchorInterface; } & { new (...args: any[]): import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface; prototype: import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface; }; /** * @slot - text content to be displayed in the Button element * @slot icon - icon element(s) to display at the start of the button */ export declare class ButtonBase extends ButtonBase_base { static get styles(): CSSResultArray; active: boolean; type: 'button' | 'submit' | 'reset'; private anchorElement; get focusElement(): HTMLElement; protected get hasLabel(): boolean; protected get buttonContent(): TemplateResult[]; constructor(); click(): void; private handleClickCapture; private proxyFocus; private shouldProxyClick; renderAnchor(): TemplateResult; protected renderButton(): TemplateResult; protected render(): TemplateResult; protected handleKeydown(event: KeyboardEvent): void; private handleKeypress; protected handleKeyup(event: KeyboardEvent): void; private manageAnchor; protected firstUpdated(changed: PropertyValues): void; protected updated(changed: PropertyValues): void; protected update(changes: PropertyValues): void; } export {};