import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type FormAction = import("svelte/action").Action; export type FormActionEntry = FormAction | readonly [FormAction, any]; /** * Context published under the key `"carbon:Form"` for descendant inputs. * Custom fluid-aware inputs can subscribe with: * `const ctx = getContext("carbon:Form");` * and read `ctx.isFluid` to adapt their rendering. */ export type CarbonFormContext = { isFluid: boolean; }; 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; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type FluidFormProps = Omit<$RestProps, keyof $Props> & $Props; export default class FluidForm extends SvelteComponentTyped< FluidFormProps, { click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; reset: WindowEventMap["reset"]; submit: WindowEventMap["submit"]; }, { default: Record } > {}