import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonCardContext = { horizontal: import("svelte/store").Writable; clickable: import("svelte/store").Writable; media: import("svelte/store").Writable; claimTitle: () => string | undefined; releaseTitle: () => void; }; type $RestProps = SvelteHTMLElements["div"] & SvelteHTMLElements["a"]; type $Props = { /** * Set to `true` to make the whole card interactive. It renders as a * button, or as a link when `href` is set, and shows `icon` at the * bottom. Its accessible name is the `CardTitle`; set `aria-label` or * `aria-labelledby` to replace it. * @default false */ clickable?: boolean; /** * Set the `href` to render a clickable card as a link. * Only applies when `clickable` is `true`. */ href?: string | undefined; /** * Set to `true` to disable the card * @default false */ disabled?: boolean; /** * Specify the title type style: `"productive"` for product UI, or * `"expressive"` for a larger title. * @default "productive" */ density?: "productive" | "expressive"; /** * Set to `true` to render the `media` slot beside the content instead * of above it. * @default false */ horizontal?: boolean; /** * Place the `media` slot before or after the content. * Only applies when `horizontal` is `true`. * @default "start" */ mediaPosition?: "start" | "end"; /** * Specify the icon a clickable card shows in its bottom inline-end * corner (mirrored in right-to-left layouts), such as `Launch` for an * external link. The icon is decorative * and hidden from assistive technology. Named `icon` as on * `ClickableTile`; Carbon React calls it `renderFooterIcon`. * Only applies when `clickable` is `true`. * @default ArrowRight */ icon?: Icon; /** * Obtain a reference to the card element. * @default null */ ref?: null | HTMLDivElement | HTMLAnchorElement; /** An `AILabel` or other decorator, in the header's top inline-end corner. It sits below top media and clear of media at the end, and outside a clickable card's link or button. */ decorator?: (this: void) => void; /** A `CardMedia`. Renders above the content, or beside it when `horizontal` is `true`. */ media?: (this: void) => void; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type CardProps = Omit<$RestProps, keyof $Props> & $Props; export default class Card extends SvelteComponentTyped< CardProps, { blur: WindowEventMap["blur"]; click: WindowEventMap["click"]; focus: WindowEventMap["focus"]; keydown: WindowEventMap["keydown"]; keyup: WindowEventMap["keyup"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record; /** An `AILabel` or other decorator, in the header's top inline-end corner. It sits below top media and clear of media at the end, and outside a clickable card's link or button. */ decorator: Record; /** A `CardMedia`. Renders above the content, or beside it when `horizontal` is `true`. */ media: Record; } > {}