UNPKG

@carbon/ibm-products-web-components

Version:
79 lines 2.25 kB
/** * @license * * Copyright IBM Corp. 2025, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement } from 'lit'; import '@carbon/web-components/es/components/tooltip/index.js'; import '@carbon/web-components/es/components/button/button.js'; import '@carbon/web-components/es/components/link/index.js'; export declare const blockClass = "c4p--truncated-text"; declare const elementName = "c4p-truncated-text"; /** * TruncatedText. * * @element c4p-truncated-text */ export declare class CDSTruncatedText extends LitElement { /** * Specify how the tooltip should align with the content. */ align: string; /** * Specify whether a auto align functionality should be applied */ autoalign: boolean; /** * The label on the collapse button. */ collapseLabel: string; /** * The label on expand button. */ expandLabel: string; /** * Unique identifier for the element. */ id: string; /** * The maximum number of lines to display before truncation. */ lines: number; /** * The method to display the full text when truncated. Options are "tooltip" or "expand". if not passed, the text would just be truncated with ellipsis. */ type: 'tooltip' | 'expand'; /** * The string value to be truncated. */ value: string; private _isOverflowing; private _isExpanded; private _maxHeight; private _textElement; private _lineHeight; private _isLayered; private _resizeObserver?; static styles: any; connectedCallback(): void; disconnectedCallback(): void; protected firstUpdated(): void; protected updated(changed: Map<string, unknown>): void; private _updateMaxHeight; private _setupResizeObserver; private _updateOverflowStatus; private _handleKeydown; private _toggleExpansion; private _renderToggleButton; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { [elementName]: CDSTruncatedText; } } export default CDSTruncatedText; //# sourceMappingURL=truncated-text.d.ts.map