import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonFormSizeContext = import("svelte/store").Readable; export type CarbonInputGroupContext = { buttonSize: import("svelte/store").Readable<"xs" | "small" | "field" | undefined>; }; type $RestProps = SvelteHTMLElements["fieldset"]; type $Props = { /** * Specify the legend text that names a set of fields, such as an * amount and its currency. Leave it out for a single field beside a * button, and label the field itself. * @default "" */ legendText?: string; /** * Set to `true` to visually hide the legend text. * The legend remains available to screen readers. * @default false */ hideLegend?: boolean; /** * Specify the helper text, shown below the group * @default "" */ helperText?: string; /** * Set to `true` to indicate an invalid state. * Pass the `invalid` slot prop to the field it applies to. * @default false */ invalid?: boolean; /** * Specify the invalid state text, shown below the group * @default "" */ invalidText?: string; /** * Set to `true` to indicate a warning state * @default false */ warn?: boolean; /** * Specify the warning state text, shown below the group * @default "" */ warnText?: string; /** * Set to `true` to disable every field and button in the group * @default false */ disabled?: boolean; /** * Set the size of the fields in the group. Buttons in the group match * the field height. Defaults to the size of a parent `Form`. * Also accepts Carbon v11's `"md"` (the 40px default) and `"lg"` (`"xl"`). */ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined; /** * Set an id for the group's label and messages * @default uniqueId() */ id?: string; legendChildren?: (this: void) => void; children?: (this: void, ...args: [{ describedBy: string | undefined; invalid: boolean; warn: boolean; size: "xs" | "sm" | "md" | "xl" | undefined }]) => void; [key: `data-${string}`]: unknown; }; export type InputGroupProps = Omit<$RestProps, keyof $Props> & $Props; export default class InputGroup extends SvelteComponentTyped< InputGroupProps, Record, { default: { describedBy: string | undefined; invalid: boolean; warn: boolean; size: "xs" | "sm" | "md" | "xl" | undefined }; legendChildren: Record; } > {}