compote-ui
Version:
An opinionated UI component library for Svelte, built on top of [Ark UI](https://ark-ui.com) with additional components and features not available in the core Ark UI library.
19 lines (18 loc) • 893 B
TypeScript
/**
* Which labelling parts a popover currently renders. Zag checks for a title/description only
* when its machine starts — before lazily mounted content exists — so it never sets
* `aria-labelledby` / `aria-describedby` on the content. Title and Description register here
* instead, and Content links them by the ids zag gives them.
*/
export declare class PopoverLabels {
#private;
get hasTitle(): boolean;
get hasDescription(): boolean;
/** Registers a rendered title; returns the unregister function. */
registerTitle(): () => void;
/** Registers a rendered description; returns the unregister function. */
registerDescription(): () => void;
}
export declare function setPopoverLabels(): PopoverLabels;
/** Undefined when the part is rendered outside compote's `Popover.Root`. */
export declare function getPopoverLabels(): PopoverLabels | undefined;