import { JSXInterface } from '../jsx'; import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; import '../icon/index.js'; import '../label/index.js'; /** * A building block for individual tab * @attr {boolean} disabled - Set disabled state * @prop {boolean} [disabled=false] - Set disabled state * * @attr {string} value - Tab's value * @prop {string} [value=""] - Tab's value * * @fires clear - Fired when the user clicks on clear button */ export declare class Tab extends ControlElement { /** * Element version number * @returns version number */ static get version(): string; protected readonly defaultRole = "tab"; /** * A `CSSResultGroup` that will be used * to style the host, slotted children * and the internal template of the element. * @returns CSS template */ static get styles(): CSSResultGroup; /** * Specify icon name to display in tab */ icon: string; /** * Specify tab's label text */ label: string; /** * Specify tab's sub-label text */ subLabel: string; /** * Specify tab's active status */ active: boolean; /** * Set tab to clearable */ clears: boolean; /** * Limit the number of lines before truncating */ lineClamp: number; /** * Set tab to clearable on hover */ clearsOnHover: boolean; /** * Use level styling from theme * @ignore */ level: '1' | '2' | '3'; /** * True, if there is slotted content */ private isSlotHasContent; /** * Called after the element’s DOM has been updated the first time. * @param changedProperties Properties that has changed * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Compute property values that depend on other properties * and are used in the rest of the update process. * @param changedProperties Properties that has changed * @returns {void} */ protected willUpdate(changedProperties: PropertyValues): void; /** * Run on default slot slotchange * @param event slotchange * @returns {void} */ private onSlotChange; /** * Omitted lineClamp if subLabel is provided * @returns line Clamp value */ private getLineClamp; /** * Handles key down event * @param event Key down event object * @returns {void} */ private onKeyDown; /** * @param event event from close button * @returns {void} */ private handleClickClear; /** * Show Close Button if allow clears * @returns close button template */ private get CloseTemplate(); /** * Create ef-label template when label is true * @returns Label template */ private get LabelTemplate(); /** * Create ef-label template when subLabel is true * @returns SubLabel template */ private get SubLabelTemplate(); /** * A `TemplateResult` that will be used * to render the updated internal template. * @return Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-tab': Tab; } } declare global { interface HTMLElementTagNameMap { 'ef-tab': Tab; } namespace JSX { interface IntrinsicElements { 'ef-tab': Partial | JSXInterface.ControlHTMLAttributes; } } } export {};