import { EventEmitter } from '../../stencil-public-runtime'; import { SIZE, BUTTON_COLOR, BUTTON_TYPE } from '../../common/interfaces/ui'; import { ICustomGoogleAnalyticsConfig } from '@progleasing/grit-universal-analytics'; export declare class GritButton { private control; host: HTMLGritWcButtonElement; /** * If there is no btnText, then we need to remove the classes * that add margin to the icons and re render the button. */ hasText: boolean; buttonText: string; _loading: boolean; _disabled: boolean; /** * It's the custom event to be passed into the `GoogleAnalytics.getInstance().pushCustomEvent()` function. */ analyticsCustomObj: ICustomGoogleAnalyticsConfig; /** * If it is set to false, no event will be pushed into Google Analytics. */ analyticsEnabled: boolean; /** * Sets buttons border-color, background-color, font color * and the color it will have depending on interactions (hover, focus, etc). */ color: BUTTON_COLOR; watchColor(newValue: BUTTON_COLOR): void; /** * Displays a button with no changes on hover/focus. */ disabled: boolean; watchDisabled(newValue: boolean): void; /** * Prompts the user to save the linked URL instead of navigating to it. */ download: string; /** * The form attribute takes in the ID of the form the button will submit or reset. */ form: string; /** * When `fullWidth` property is true, * the button's width is set to 100% it's parent. */ fullWidth: boolean; /** * If href is set, then the button will behave as an anchor. * It's the hyperlink used in the anchor. */ href: string; /** * If loading is set to true, a spinner will be rendered along the text. */ loading: boolean; watchLoading(newValue: boolean): void; /** * If it is set to true, no personally identifiable information will be pushed into Google Analytics. */ pii: boolean; /** * The relationship of the linked URL as space-separated link types. */ rel: string; /** * Changes the button height and paddings. */ size: SIZE | string; /** * Target used in case the href prop is set. * Possible values "_blank", "_self", "_parent", "_top". */ target: string; /** * Changes the type of the button so it can be `submit` or `button`. */ type: BUTTON_TYPE; /** * Click event fired whenever a button is clicked. * The events returns the event itself, and it case the button * is of type submit, dispatches a submitEvent to the closest * form. */ gritClick: EventEmitter; private onClick; /** Grit Blur fires on blur of the button */ gritBlur: EventEmitter; private onBlur; /** Grit Focus fires on focus of the button */ gritFocus: EventEmitter; private onFocus; componentWillLoad(): void; handleKeyDown(ev: KeyboardEvent): void; private submitForm; private getButtonText; private disabledClass; private renderSpinner; private renderButtonContent; render(): any; }