import { JSXInterface } from '../jsx'; import { ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; import '../icon/index.js'; /** * Use button for actions in forms, dialogs, * and more with support for different states and styles. * @attr {boolean} disabled - Set disabled state * @prop {boolean} [disabled=false] - Set disabled state * @fires active-changed - Fired when `active` property changed by user taps on toggled button. It will not be triggered if `active` state is changed programmatically. */ export declare class Button extends ControlElement { /** * Element version number * @returns version number */ static get version(): string; protected readonly defaultRole = "button"; /** * Customises text alignment when specified alongside `icon` property */ textpos: 'before' | 'after'; /** * Removes background when specified alongside `icon` property */ transparent: boolean; /** * Specify icon to display in button. Value can be icon name */ icon: string | null; /** * Specify icon to display when hovering. Value can be icon name */ hoverIcon: string | null; /** * Set call-to-action state */ cta: boolean; /** * Enable or disable ability to be toggled */ toggles: boolean; /** * An active or inactive state, can only be used with toggles property/attribute */ active: boolean; /** * Use by theme to detect when no content inside button */ private empty; /** * Get native label element from shadow roots */ private labelElement; /** * Called before update() to compute values needed during the update. * @param changedProperties Properties that has changed * @returns {void} */ protected willUpdate(changedProperties: PropertyValues): void; /** * the lifecycle method called when properties changed first time * @param changedProperties properties it's the Map object which has the updated properties * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Handle the slotchange event of default slot * @returns {void} */ private onDefaultSlotChangeHandler; /** * Handle active property, when toggles is true * @returns {void} */ private toggleActive; /** * Set pressed attribute * @returns {void} */ private setPressed; /** * Remove pressed attribute * @returns {void} */ private unsetPressed; /** * Compute empty property based on textContent * @returns {void} */ private emptyComputed; /** * Set or remove attribute "empty" based on slot present * @returns {void} */ private switchEmptyAttribute; /** * Returns icon template if exists * @return {TemplateResult | null} Render template */ private get iconTemplate(); /** * Returns hover icon template if exists * @return {TemplateResult | null} Render template */ private get hoverIconTemplate(); /** * A `TemplateResult` that will be used * to render the updated internal template. * @return {TemplateResult} Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-button': Button; } } declare global { interface HTMLElementTagNameMap { 'ef-button': Button; } namespace JSX { interface IntrinsicElements { 'ef-button': Partial