import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonTileGroupContext = { groupSize: import("svelte/store").Readable<"sm" | "md" | undefined>; selectedValue: import("svelte/store").Writable; groupName: import("svelte/store").Readable; groupForm: import("svelte/store").Readable; fallbackName: string; groupRequired: import("svelte/store").Readable; groupDisabled: import("svelte/store").Readable; add: (data: { checked: boolean; value: T }) => void; remove: (value: T) => void; update: (value: T) => void; }; type $RestProps = SvelteHTMLElements["fieldset"]; type $Props = { /** * Specify the selected tile value. * Follows the field after a reset — becomes the value of whichever tile * is checked in the DOM, or `undefined`. */ selected?: T | undefined; /** * Set to `true` to disable the tile group * @default false */ disabled?: boolean; /** * Set to `true` to require the selection of a radio button. */ required?: boolean | undefined; /** * Specify a name attribute for the radio button inputs. * Overrides each tile's own `name`. When neither is set, the tiles share * a generated id so they form one radio group; set a name explicitly when * form submission matters. */ name?: string | undefined; /** * Specify the id of a form element outside the component to associate * the fieldset and radio tile inputs with. Overrides each tile's own `form`. */ form?: string | undefined; /** * Specify the legend text. * Alternatively, use the named slot "legendChildren". * @example * ```svelte * * Custom Legend * * ``` * @default "" */ legendText?: string; /** * Set to `true` to visually hide the legend * @default false */ hideLegend?: boolean; /** * Set the size of every tile in the group: `"sm"` for compact tiles, * such as rows in a list of choices. */ size?: "sm" | "md" | undefined; legendChildren?: (this: void) => void; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type TileGroupProps = Omit<$RestProps, keyof $Props> & $Props; export default class TileGroup extends SvelteComponentTyped< TileGroupProps, { select: CustomEvent }, { default: Record; legendChildren: Record; } > {}