UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

154 lines (153 loc) 4.7 kB
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent, type ComponentType } from 'react'; export interface TileProps extends HTMLAttributes<HTMLDivElement> { children?: ReactNode; className?: string; /** @deprecated */ light?: boolean; } export declare const Tile: React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLDivElement>>; export interface ClickableTileProps extends HTMLAttributes<HTMLAnchorElement> { children?: ReactNode; className?: string; /** @deprecated */ light?: boolean; /** * Boolean for whether a tile has been clicked. */ clicked?: boolean; /** * Specify whether the ClickableTile should be disabled */ disabled?: boolean; /** * The href for the link. */ href?: string; /** * Optional prop to allow overriding the icon rendering. */ renderIcon?: ComponentType<{ className?: string; }>; /** * Specify the function to run when the ClickableTile is clicked */ onClick?(event: MouseEvent): void; /** * Specify the function to run when the ClickableTile is interacted with via a keyboard */ onKeyDown?(event: KeyboardEvent): void; /** * The rel property for the link. */ rel?: string; } export declare const ClickableTile: React.ForwardRefExoticComponent<ClickableTileProps & React.RefAttributes<HTMLAnchorElement>>; export interface SelectableTileProps extends HTMLAttributes<HTMLDivElement> { children?: ReactNode; className?: string; /** @deprecated */ light?: boolean; /** * Specify whether the SelectableTile should be disabled */ disabled?: boolean; /** * The ID of the `<input>`. */ id?: string; /** * The `name` of the `<input>`. * @deprecated */ name?: string; /** * The empty handler of the `<input>`. */ onChange?(event: ChangeEvent<HTMLDivElement>): void; /** * Specify the function to run when the SelectableTile is clicked */ onClick?(event: MouseEvent<HTMLDivElement>): void; /** * Specify the function to run when the SelectableTile is interacted with via a keyboard */ onKeyDown?(event: KeyboardEvent<HTMLDivElement>): void; /** * `true` to select this tile. */ selected?: boolean; /** * Specify the tab index of the wrapper element */ tabIndex?: number; /** * The `title` of the `<input>`. */ title?: string; /** * The value of the `<input>`. * @deprecated */ value: string | number; } export declare const SelectableTile: React.ForwardRefExoticComponent<SelectableTileProps & React.RefAttributes<HTMLDivElement>>; export interface ExpandableTileProps extends HTMLAttributes<HTMLDivElement> { children?: ReactNode; className?: string; /** @deprecated */ light?: boolean; /** * `true` if the tile is expanded. */ expanded?: boolean; /** * An ID that can be provided to aria-labelledby */ id?: string; /** * Specify the function to run when the ExpandableTile is clicked */ onClick?(event: MouseEvent): void; /** * optional handler to trigger a function when a key is pressed */ onKeyUp?(event: KeyboardEvent): void; /** * The `tabindex` attribute. */ tabIndex?: number; /** * The description of the "collapsed" icon that can be read by screen readers. */ tileCollapsedIconText?: string; /** * When "collapsed", a label to appear next to the chevron (e.g., "View more"). */ tileCollapsedLabel?: string; /** * The description of the "expanded" icon that can be read by screen readers. */ tileExpandedIconText?: string; /** * When "expanded", a label to appear next to the chevron (e.g., "View less"). */ tileExpandedLabel?: string; tileMaxHeight?: number; tilePadding?: number; } export declare const ExpandableTile: React.ForwardRefExoticComponent<ExpandableTileProps & React.RefAttributes<HTMLElement>>; export interface TileAboveTheFoldContentProps { /** * The child nodes. */ children?: ReactNode; } export declare const TileAboveTheFoldContent: React.ForwardRefExoticComponent<TileAboveTheFoldContentProps & React.RefAttributes<HTMLSpanElement>>; export interface TileBelowTheFoldContentProps { /** * The child nodes. */ children?: ReactNode; } export declare const TileBelowTheFoldContent: React.ForwardRefExoticComponent<TileBelowTheFoldContentProps & React.RefAttributes<HTMLSpanElement>>;