import { LitElement, PropertyValues } from "lit"; import "../link/link.js"; export type ButtonVariant = "primary" | "secondary" | "negative" | "negativeQuiet" | "utility" | "pill" | "link" | "quiet" | "utilityQuiet" | "overlay" | "overlayInverted" | "overlayQuiet" | "overlayInvertedQuiet"; export type ButtonType = "button" | "submit" | "reset"; declare const WarpButton_base: import("@open-wc/form-control").Constructor & typeof LitElement; /** * Performs an action or renders a link with button styling. * * Use button variants to match action priority, risk, and context. * * [Warp component reference](https://warp-ds.github.io/docs/components/button/frameworks/elements) */ declare class WarpButton extends WarpButton_base { #private; static styles: import("lit").CSSResult[]; /** * Shadow root configuration. * Delegates focus from the host to the internal control. */ static shadowRootOptions: { delegatesFocus: boolean; clonable?: boolean; customElementRegistry?: CustomElementRegistry | null; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; /** * Native button type. * Controls whether the internal button behaves as a regular button, submits a form, or resets a form. Defaults to `button`. */ type: ButtonType | undefined; /** * Focuses the button when it is first rendered. * Applies only when the component renders a native button. Link buttons with `href` do not autofocus through this component. */ autofocus: boolean; /** * Visual style of the button. * Defaults to `secondary`. Use the variant that matches the action priority, risk, and placement. */ variant: ButtonVariant | undefined; /** * Deprecated quiet visual treatment flag * Use `variant="quiet"` instead. * * @deprecated Use `variant="quiet"` instead */ quiet: boolean; /** * Marks the button as icon-only. * Use this when the button has no visible text. Include accessible text in the slotted content so the internal button has a name. */ iconOnly: boolean; /** * Renders the compact button size. * Use this in dense layouts where the default button size is too large. */ small: boolean; /** * Shows the loading state. * Use after the user has triggered an action and the action is in progress. */ loading: boolean; /** * URL for rendering the button as a link. * When set, the component renders `w-link` instead of a native `button`. */ href: string | undefined; /** * Link browsing context. * Passed to the rendered link when `href` is set. */ target: string | undefined; /** * Visually disables the button. * Disabled buttons are discouraged because they can hide the reason an action is unavailable. */ disabled: boolean; /** * Link relationship. * Passed to the rendered link when `href` is set. If `target="_blank"` is set and `rel` is omitted, `noopener` is used. */ rel: string | undefined; /** * Makes the button fill its parent width. * Useful in narrow layouts where the button should span the available inline space. */ fullWidth: boolean; /** * Deprecated class applied to the internal control * This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the button appearance. * * @deprecated This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the appearance of the button. */ buttonClass: string | undefined; /** * Form control name. * Used when the button participates in form handling. */ name: string | undefined; /** * Form control value. * Used with `name` when the button participates in form handling. Resets to its initial value when the form is reset. */ value: string | undefined; /** * The [commandfor HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands. */ commandfor: string | undefined; /** * The [command HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands. */ command: string | undefined; private buttonEl; private ariaValueTextLoading; updated(changedProperties: PropertyValues): void; constructor(); connectedCallback(): void; /** * Traverse up the shadow roots looking for the ID to support use inside other Lit components. */ private closestWithId; firstUpdated(): void; /** @internal */ _handleButtonClick(): void; resetFormControl(): void; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { "w-button": WarpButton; } } export { WarpButton };