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; group: boolean; }; type $RestProps = SvelteHTMLElements["fieldset"]; type $Props = { /** * Set to `true` for to remove the bottom margin * @default false */ noMargin?: boolean; /** * Set to `true` to indicate an invalid state. * With `message`, shows the message as an error with a warning icon. * @default false */ invalid?: boolean; /** * Set to `true` to disable the fieldset and every field inside it, * including their labels, helper text and disabled styles. * @default false */ disabled?: boolean; /** * Set to `true` to render a form requirement * @default false */ message?: boolean; /** * Specify the message text * @default "" */ messageText?: string; /** * Specify the legend text * @default "" */ legendText?: string; /** * Specify an id for the legend element * @default "" */ legendId?: string; /** * Set an id for the fieldset element. * The message id derives from it as `{id}-message`. `FormHelperText` * and `FormRequirement` placed directly in the group derive theirs as * `helper-{id}`, `error-{id}`, and `warn-{id}`. * @default uniqueId() */ id?: string; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type FormGroupProps = Omit<$RestProps, keyof $Props> & $Props; export default class FormGroup extends SvelteComponentTyped< FormGroupProps, { click: WindowEventMap["click"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record } > {}