import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["label"]; type $Props = { /** * Set the id of the control this label is for. * Inside a `FormItem`, defaults to the item's `controlId`; elsewhere, * the label has no `for` until you set one. */ for?: string; /** * Set the id of the control this label is for. * @deprecated use `for` instead. Despite its name, this sets the * label's `for` attribute, not its `id`. */ id?: string | undefined; /** * Set to `true` to use disabled styles. * Inside a `FormItem`, defaults to the item's `disabled`. A disabled * fieldset around it applies either way. */ disabled?: boolean | undefined; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type FormLabelProps = Omit<$RestProps, keyof $Props> & $Props; export default class FormLabel extends SvelteComponentTyped< FormLabelProps, { click: WindowEventMap["click"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record } > {}