import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["div"]; type $Props = { /** * Specify the summary content of the trigger. * Alternatively, use the "summary" slot. * @example * ```svelte * *
Custom summary
*
* ``` * @default "" */ summary?: string; /** * Specify alignment of the chevron icon. * @default "end" */ align?: "start" | "end"; /** * Set to `true` to open the disclosure. * @default false */ open?: boolean; /** * Set an id for the top-level element. * The content id derives from it as `{id}-content`. * @default uniqueId() */ id?: string; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type DisclosureProps = Omit<$RestProps, keyof $Props> & $Props; export default class Disclosure extends SvelteComponentTyped< DisclosureProps, { animationend: WindowEventMap["animationend"]; blur: WindowEventMap["blur"]; click: WindowEventMap["click"]; focus: WindowEventMap["focus"]; keydown: WindowEventMap["keydown"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; /** Dispatched with the new open state. */ toggle: CustomEvent<{ open: boolean }>; }, { default: Record; /** Content for the always-visible trigger. */ summary: Record; } > {}