import type { TooltipPlacement } from '../tooltip/tooltip.js'; import '../tooltip/tooltip.js'; import type { CopyDetail } from '../shared/events.js'; import { UiElement } from '../shared/element.js'; export declare const copyIcon: import("lit-html").TemplateResult<1>; /** Clipboard write with the `execCommand` fallback for insecure contexts; resolves to whether it worked. */ export declare function copyToClipboard(text: string): Promise; declare const UiCopyButton_base: (new (...args: any[]) => import("../shared/align.ts").AlignAlias) & typeof UiElement; /** * Carbon `CopyButton`: a 40px (`size="sm"`: 32px) layer-coloured icon button, named by an * icon tooltip, that copies `text` and shows `feedback` ("Copied!") in that tooltip for * `feedback-timeout` ms. Fires `ui-copy` (cancelable: `preventDefault()` to copy yourself). * * @fires ui-copy - detail: { text }; cancelable * @csspart button - The native button * @cssprop --ui-copy-button-background - Its fill at rest (default `--ui-surface-1`; Kanok: transparent); `--ui-copy-button-radius` its corners (default 0; Kanok: 6px) * @attr align - Carbon's name for `placement` (same values) * @cssprop --ui-focus-offset - `outline-offset` of its focus ring (default -2px: inside; Kanok: 2px outside) */ export declare class UiCopyButton extends UiCopyButton_base { /** `el.focus()` lands on the control inside. */ static readonly shadowRootOptions: ShadowRootInit; static readonly styles: import("lit").CSSResult[]; /** What gets copied. */ text: string; private readonly localize; /** Accessible name / tooltip at rest. */ label: string; /** Tooltip text after copying. */ feedback: string; feedbackTimeout: number; placement: TooltipPlacement; size: 'sm' | 'md'; disabled: boolean; /** True while the feedback is showing. */ copied: boolean; private readonly tooltip; private timer?; disconnectedCallback(): void; private onClick; /** Show the "Copied!" tooltip for `feedback-timeout` ms (Carbon `Copy` fade-in → fade-out). */ showFeedback(): void; render(): import("lit-html").TemplateResult<1>; } export interface UiCopyButtonEventMap extends HTMLElementEventMap { 'ui-copy': CustomEvent; } /** Typed listeners for UiCopyButton's events (declaration merging with the class). */ export interface UiCopyButton { addEventListener(type: K, listener: (this: UiCopyButton, event: UiCopyButtonEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: UiCopyButton, event: UiCopyButtonEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare global { interface HTMLElementTagNameMap { 'ui-copy-button': UiCopyButton; } } export {};