import { JSXInterface } from '../jsx'; import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; import '../header/index.js'; import '../icon/index.js'; import '../panel/index.js'; /** * Allows users to hide non-critical information * or areas of the screen, maximizing the amount of real estate * for their primary displays. * * @fires expanded-changed - Fired when the user expands or collapses the control. The event is not triggered if `expanded` property is changed programmatically. * * @slot header-left - Slot to add custom contents to the left side of header * @slot header-right - Slot to add custom contents to the right side of header */ export declare class Collapse extends BasicElement { /** * Element version number * @returns version number */ static get version(): string; /** * A `CSSResultGroup` that will be used * to style the host, slotted children * and the internal template of the element. * @return CSS template */ static get styles(): CSSResultGroup; /** * Observes attribute change for `attributeChangedCallback` */ static get observedAttributes(): string[]; /** * Set text on the header */ header: string; /** * Use level styling from theme */ level: '1' | '2' | '3'; /** * Set to expand the item */ expanded: boolean; /** * Set to apply padding from theme to content section */ spacing: boolean; /** * An ef-panel wrapper */ private panelHolderRef; /** * A panel used to display content */ private panelRef; /** * Used to control aria-level for heading */ private headingLevel; /** * Run when observed attributes change value * @param name attribute name * @param oldValue old attribute value * @param newValue new attribute value * @returns {void} */ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; /** * Called once after the component is first rendered * @param changedProperties map of changed properties with old values * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Invoked whenever the element is updated * @param changedProperties map of changed properties with old values * @return {void} */ protected updated(changedProperties: PropertyValues): void; /** * Toggle the item * @returns {void} */ private toggle; /** * Show or Hide the item depending on the expanded state * @returns {void} */ private showHide; /** * Set current content height at the target-height * @param height number or null value * @returns {void} */ private setAnimationTargetHeight; /** * Gets the height of the ef-panel element which contains the content * will pass height including optional spacing * @returns clientHeight of the panel so that the panel holder max-height can be set */ private getContentHeight; /** * Prevents expanding collapse when interactive element in slot is tapped * @param event Tap event * @returns {void} */ private handleSlotTap; /** * A `TemplateResult` that will be used * to render the updated internal template. * @return Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-collapse': Collapse; } } declare global { interface HTMLElementTagNameMap { 'ef-collapse': Collapse; } namespace JSX { interface IntrinsicElements { 'ef-collapse': Partial | JSXInterface.HTMLAttributes; } } } export {};