import { EventEmitter } from '../../stencil-public-runtime'; import { Breakpoint } from '../../utils/breakpoints'; /** * Buttons are used for interface actions. Primary style should be used only * once per view for main call-to-action. * * @part button - The native anchor or button element. * @part content - The textual content of the button. * @part prefix - The prefix icon. * @part suffix - The suffix icon. */ export declare class CatButton { private button; private mediaMatcher?; private mediaQueryList?; private mediaQueryListener?; hostElement: HTMLElement; _iconOnly: boolean; hasSlottedContent: boolean; /** * The rendering style of the button. */ variant: 'filled' | 'outlined' | 'text' | 'link'; /** * The color palette of the button. */ color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'; /** * Set the button into an active state. */ active: boolean; /** * The size of the button. */ size: 'xs' | 's' | 'm' | 'l' | 'xl'; /** * The name of the button, which gets paired with the button's value when * submitted as part of a form. Corresponds with the native HTML name * attribute. */ name?: string; /** * The value of the button, which gets paired with the button's name when * submitted as part of a form. Corresponds with the native HTML value * attribute. */ value?: string; /** * Specifies that the button should be disabled. A disabled button is unusable * and un-clickable. Corresponds with the native HTML disabled attribute. */ disabled: boolean; /** * Displays the button in a loading state with a spinner. Just like a disabled * button, an inactive button is unusable and un-clickable. However, it * retains the current focus state. */ loading: boolean; /** * Allows the button to submit a form. */ submit: boolean; /** * Disables ellipse overflowing button content. */ noEllipsis: boolean; /** * Use round button edges. */ round: boolean; /** * A destination to link to, rendered in the href attribute of a link. */ url?: string; /** * Specifies where to open the linked document. */ urlTarget?: '_blank' | '_self'; /** * The name of an icon to be displayed in the button. */ icon?: string; /** * Hide the actual button content and only display the icon. */ iconOnly: boolean | Breakpoint; /** * Display the icon on the right. */ iconRight: boolean; /** * Adds a unique identifier for the button. Please note that with this * particular component this ID is added inside the web component. If you need * an ID on the HTML element, use the regular `id` attribute instead. */ buttonId?: string; /** * Adds accessible label for the button that is only shown for screen * readers. Typically, this label text replaces the visible text on the * button for users who use assistive technology. */ a11yLabel?: string; /** * Sets the `aria-current` attribute on the button. */ a11yCurrent?: string; /** * Attributes that will be added to the native HTML button element */ nativeAttributes?: { [key: string]: string; }; /** * Attributes that will be added to the native HTML button content element */ nativeContentAttributes?: { [key: string]: string; }; /** * A unique identifier for the underlying native element that is used for * testing purposes. The attribute is added as `data-test` attribute and acts * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`. */ testId?: string; /** * The index of a button that is used inside a cat-button-group component */ buttonGroupPosition?: 'first' | 'last' | 'middle'; onIconOnlyChanged(value: boolean | Breakpoint): void; /** * Emitted when the button is clicked. */ catClick: EventEmitter; /** * Emitted when the button received focus. */ catFocus: EventEmitter; /** * Emitted when the button loses focus. */ catBlur: EventEmitter; componentWillLoad(): void; componentWillRender(): void; haltDisabledEvents(event: Event): void; /** * Programmatically move focus to the button. Use this method instead of * `button.focus()`. * * @param options An optional object providing options to control aspects of * the focusing process. */ doFocus(options?: FocusOptions): Promise; /** * Programmatically remove focus from the button. Use this method instead of * `button.blur()`. */ doBlur(): Promise; /** * Programmatically simulate a click on the button. */ doClick(): Promise; render(): any; private get iconSize(); private get spinnerSize(); private get isIconButton(); private get hasPrefixIcon(); private get hasSuffixIcon(); private get content(); private onClick; private onFocus; private onBlur; }