/**
* TyCopy Web Component
*
* Read-only field with copy-to-clipboard functionality
* Perfect for API keys, tokens, URLs, code snippets, etc.
*
* Features:
* - Read-only display (not an input)
* - Copy icon on the right
* - Icon animation on copy (copy → check → copy)
* - Same styling as ty-input for consistency
* - Label support
* - Size and flavor variants
*/
import type { Flavor, Size } from '../types/common.js';
/**
* TyCopy Element Interface
*/
export interface TyCopyElement extends HTMLElement {
value: string;
label: string;
size: Size;
flavor: Flavor;
format: 'text' | 'code';
disabled: boolean;
required: boolean;
}
/**
* Ty Copy Field Component
*
* @example
* ```html
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* ```
*/
export declare class TyCopy extends HTMLElement implements TyCopyElement {
private _value;
private _label;
private _size;
private _flavor;
private _format;
private _multiline;
private _disabled;
private _required;
private _copyTimeout;
constructor();
static get observedAttributes(): string[];
connectedCallback(): void;
disconnectedCallback(): void;
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
/**
* Validate flavor attribute
*/
private validateFlavor;
/**
* Build CSS class list
*/
private buildClassList;
/**
* Copy value to clipboard
*/
private copyToClipboard;
/**
* Show copy success animation
* Swaps copy icon → check icon → copy icon
*/
private showCopySuccess;
/**
* Setup event listeners
*/
private setupEventListeners;
/**
* Render the component
*/
private render;
get value(): string;
set value(val: string);
get label(): string;
set label(val: string);
get size(): Size;
set size(value: Size);
get flavor(): Flavor;
set flavor(value: Flavor);
get format(): 'text' | 'code';
set format(value: 'text' | 'code');
get disabled(): boolean;
set disabled(value: boolean);
get required(): boolean;
set required(value: boolean);
}
//# sourceMappingURL=copy.d.ts.map