import { IHoverDelegate } from '../hover/hoverDelegate.js'; import { Event as BaseEvent } from '../../../common/event.js'; import { IMarkdownString } from '../../../common/htmlContent.js'; import { Disposable, IDisposable } from '../../../common/lifecycle.js'; import { ThemeIcon } from '../../../common/themables.js'; import './button.css'; export interface IButtonOptions extends Partial { readonly title?: boolean | string; /** * Will fallback to `title` if not set. */ readonly ariaLabel?: string; readonly supportIcons?: boolean; readonly supportShortLabel?: boolean; readonly secondary?: boolean; readonly hoverDelegate?: IHoverDelegate; } export interface IButtonStyles { readonly buttonBackground: string | undefined; readonly buttonHoverBackground: string | undefined; readonly buttonForeground: string | undefined; readonly buttonSeparator: string | undefined; readonly buttonSecondaryBackground: string | undefined; readonly buttonSecondaryHoverBackground: string | undefined; readonly buttonSecondaryForeground: string | undefined; readonly buttonBorder: string | undefined; } export declare const unthemedButtonStyles: IButtonStyles; export interface IButton extends IDisposable { readonly element: HTMLElement; readonly onDidClick: BaseEvent; set label(value: string | IMarkdownString); set icon(value: ThemeIcon); set enabled(value: boolean); set checked(value: boolean); focus(): void; hasFocus(): boolean; } export declare class Button extends Disposable implements IButton { protected options: IButtonOptions; protected _element: HTMLElement; protected _label: string | IMarkdownString; protected _labelElement: HTMLElement | undefined; protected _labelShortElement: HTMLElement | undefined; private _hover; private _onDidClick; get onDidClick(): BaseEvent; private _onDidEscape; get onDidEscape(): BaseEvent; private focusTracker; constructor(container: HTMLElement, options: IButtonOptions); dispose(): void; private getContentElements; private updateBackground; get element(): HTMLElement; set label(value: string | IMarkdownString); get label(): string | IMarkdownString; set labelShort(value: string); private _setAriaLabel; set icon(icon: ThemeIcon); set enabled(value: boolean); get enabled(): boolean; set checked(value: boolean); get checked(): boolean; setTitle(title: string): void; focus(): void; hasFocus(): boolean; }