import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonFormItemContext = { controlId: import("svelte/store").Writable; disabled: import("svelte/store").Writable; /** Registers a mounted part's id under its kind. */ part: (kind: "label" | "helper" | "invalid" | "warn") => import("../utils/form-parts.js").FormPart; }; type $RestProps = SvelteHTMLElements["div"]; type $Props = { /** * Set the id of the control in this form item. * Child `FormLabel`, `FormHelperText`, and `FormRequirement` * components derive their `for` and `id` attributes from it. * Apply it to the control with the `control` slot prop action. * @default uniqueId() */ controlId?: string; /** * Set to `true` to style child labels and helper text as disabled * @default false */ disabled?: boolean; children?: (this: void, ...args: [{ control: import("svelte/action").Action; controlId: string; labelId: string | undefined; describedBy: string | undefined; invalid: boolean; warn: boolean; size: "xs" | "sm" | "xl" | undefined; fluid: boolean; }]) => void; [key: `data-${string}`]: unknown; }; export type FormItemProps = Omit<$RestProps, keyof $Props> & $Props; export default class FormItem extends SvelteComponentTyped< FormItemProps, { click: WindowEventMap["click"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: { control: import("svelte/action").Action; controlId: string; labelId: string | undefined; describedBy: string | undefined; invalid: boolean; warn: boolean; size: "xs" | "sm" | "xl" | undefined; fluid: boolean; }; } > {}