import { WebAwesomeFormAssociatedElement } from '../../internal/webawesome-form-associated-element.js'; import '../icon/icon.js'; import '../spinner/spinner.js'; /** * @summary Buttons represent actions that are available to the user. * @documentation https://webawesome.com/docs/components/button * @status stable * @since 2.0 * * @dependency wa-icon * @dependency wa-spinner * * @event blur - Emitted when the button loses focus. * @event focus - Emitted when the button gains focus. * @event wa-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied. * * @slot - The button's label. * @slot start - An element, such as ``, placed before the label. * @slot end - An element, such as ``, placed after the label. * * @csspart base - The component's base wrapper. * @csspart start - The container that wraps the `start` slot. * @csspart label - The button's label. * @csspart end - The container that wraps the `end` slot. * @csspart caret - The button's caret icon, a `` element. * @csspart spinner - The spinner that shows when the button is in the loading state. */ export default class WaButton extends WebAwesomeFormAssociatedElement { static shadowRootOptions: { delegatesFocus: boolean; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; static css: string[]; static get validators(): import("../../internal/webawesome-form-associated-element.js").Validator[]; assumeInteractionOn: string[]; private readonly hasSlotController; private readonly localize; button: HTMLButtonElement | HTMLLinkElement; labelSlot: HTMLSlotElement; invalid: boolean; isIconButton: boolean; title: string; /** The button's theme variant. Defaults to `neutral` if not within another element with a variant. */ variant: 'neutral' | 'brand' | 'success' | 'warning' | 'danger'; /** The button's visual appearance. */ appearance: 'accent' | 'filled' | 'outlined' | 'filled-outlined' | 'plain'; /** The button's size. */ size: 'small' | 'medium' | 'large'; /** Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior. */ withCaret: boolean; /** Disables the button. Does not apply to link buttons. */ disabled: boolean; /** Draws the button in a loading state. */ loading: boolean; /** Draws a pill-style button with rounded edges. */ pill: boolean; /** * The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native * `