import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["label"]; type $Props = { /** * Set to `true` to select the tile. * @default false */ selected?: boolean; /** * Set the size: `"sm"` for a compact tile, such as a row in a list of * choices, with less padding, no minimum height, and the checkbox * pulled in. Defaults to the size of a parent tile group. */ size?: "sm" | "md" | undefined; /** * Set to `true` to disable the tile * @default false */ disabled?: boolean; /** * Set to `true` to stretch the tile to fill the height of its container * @default false */ fullHeight?: boolean; /** * Set to `true` to round the tile's corners when it has a `decorator`, * such as an `AILabel`. Carbon reserves rounded tiles for AI content. * @default false */ rounded?: boolean; /** * Specify the title of the selectable tile. */ title?: string | undefined; /** * Specify the value of the selectable tile. * @default "value" */ value?: Value; /** * Specify the tabindex * @default "0" */ tabindex?: number | string | undefined; /** * Specify the title of the checkbox icon, shown as a tooltip on hover. * The icon is hidden from assistive technology. * @default "Tile checkmark" */ iconDescription?: string; /** * Set an id for the input element * @default uniqueId() */ id?: string; /** * Specify a name attribute for the input. * @default "" */ name?: string; /** * Specify the id of a form element outside the component to associate * the checkbox with. */ form?: string | undefined; /** * Obtain a reference to the input HTML element. * @default null */ ref?: null | HTMLInputElement; decorator?: (this: void) => void; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type SelectableTileProps = Omit<$RestProps, keyof $Props> & $Props; export default class SelectableTile extends SvelteComponentTyped< SelectableTileProps, { change: WindowEventMap["change"]; click: WindowEventMap["click"]; deselect: CustomEvent; keydown: WindowEventMap["keydown"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; select: CustomEvent; }, { default: Record; decorator: Record; } > {}