@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
57 lines (56 loc) • 2.07 kB
TypeScript
import { EventEmitter, VNode } from "../../stencil-public-runtime";
import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
import { LocalizedComponent } from "../../utils/locale";
import { T9nComponent } from "../../utils/t9n";
import { LogicalFlowPosition } from "../interfaces";
import { CardMessages } from "./assets/card/t9n";
/**
* Cards do not include a grid or bounding container
* - cards will expand to fit the width of their container
*/
/**
* @slot - A slot for adding subheader/description content.
* @slot thumbnail - A slot for adding a thumbnail to the component.
* @slot title - A slot for adding a title.
* @slot subtitle - A slot for adding a subtitle or short summary.
* @slot footer-start - A slot for adding a leading footer.
* @slot footer-end - A slot for adding a trailing footer.
*/
export declare class Card implements ConditionalSlotComponent, LocalizedComponent, T9nComponent {
el: HTMLCalciteCardElement;
/** When `true`, a busy indicator is displayed. */
loading: boolean;
/** When `true`, the component is selected. */
selected: boolean;
/** When `true`, the component is selectable. */
selectable: boolean;
/** Sets the placement of the thumbnail defined in the `thumbnail` slot. */
thumbnailPosition: LogicalFlowPosition;
/**
* Made into a prop for testing purposes only
*
* @internal
*/
messages: CardMessages;
/**
* Use this property to override individual strings used by the component.
*/
messageOverrides: Partial<CardMessages>;
onMessagesChange(): void;
/** Fires when `selectable` is `true` and the component is selected. */
calciteCardSelect: EventEmitter<void>;
connectedCallback(): void;
disonnectedCallback(): void;
componentWillLoad(): Promise<void>;
render(): VNode;
effectiveLocale: string;
effectiveLocaleChange(): void;
defaultMessages: CardMessages;
private cardSelectClick;
private cardSelectKeyDown;
private selectCard;
private renderThumbnail;
private renderCheckbox;
private renderHeader;
private renderFooter;
}