import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type FormAction = import("svelte/action").Action; export type FormActionEntry = FormAction | readonly [FormAction, any]; export type CarbonFormSizeContext = import("svelte/store").Writable; type $RestProps = SvelteHTMLElements["form"]; type $Props = { /** * Obtain a reference to the form element. * @default null */ ref?: null | HTMLFormElement; /** * Apply Svelte actions to the underlying form element. * Each entry is an action or a `[action, parameter]` tuple. * Use this for SvelteKit's `enhance` and other form actions that * cannot target components with `use:`. * @default [] */ actions?: ReadonlyArray; /** * Set the size of every field in the form. * A field's own `size` takes precedence. * Also accepts Carbon v11's `"md"` (the 40px default) and `"lg"` (`"xl"`). */ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type FormProps = Omit<$RestProps, keyof $Props> & $Props; export default class Form extends SvelteComponentTyped< FormProps, { click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; reset: WindowEventMap["reset"]; submit: WindowEventMap["submit"]; }, { default: Record } > {}