import React from "react"; import * as DesignTokens from "@sage/design-tokens/js/base/common"; import { SpaceProps, WidthProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; import { TILE_HIGHLIGHT_VARIANTS, STATUS_KEYLINE_VARIANTS } from "./tile.config"; export type Roundness = "curved" | "moderate"; export type LegacyRoundness = "default" | "large" | "small"; type DesignTokensType = keyof typeof DesignTokens; type HighlightVariantType = (typeof TILE_HIGHLIGHT_VARIANTS)[number]; export type DeprecatedTileVariants = "tile" | "transparent" | "active" | "grey"; export type TileVariants = "standard" | "alt" | "positive" | "negative" | "unavailable"; export interface TileProps extends SpaceProps, WidthProps, TagProps { /** Sets the theme of the tile */ variant?: TileVariants | DeprecatedTileVariants; /** * The content to render within the tile. Each child will be wrapped with * a TileContent wrapper, which allows any individual child component to take a * percentage-based width prop, dictating the percentage of the tile width it will take up. * * Width will have no effect on a child component if the tile orientation is set to 'vertical'. */ children?: React.ReactNode; /** The orientation of the tile - set to either horizontal or vertical * @deprecated The `orientation` prop has been deprecated and will be removed in a future version. */ orientation?: "horizontal" | "vertical"; /** * Set a percentage-based width for the whole Tile component, relative to its parent. * If unset or zero, this will default to 100%. */ width?: string | number; /** Sets the border width by using these design tokens * @deprecated The `borderWidth` prop is depreacted and will be removed in a future version. */ borderWidth?: Extract; /** Sets the border variant that should be used * @deprecated The `borderVariant` prop has been deprecated and will be removed in a future version. Use the `outline` prop instead. */ borderVariant?: "default" | "selected" | "positive" | "negative" | "caution" | "info"; /** * Sets the level of roundness of the corners. Values can be `"curved"` or `"moderate"`. * * **Deprecated**: legacy values `"default"`, `"large"`, and `"small"` are deprecated and should not be used. */ roundness?: Roundness | LegacyRoundness; /** * Set a percentage-based height for the whole Tile component, relative to its parent. */ height?: string | number; /** Sets the highlight variant * @deprecated The `highlightVariant` prop has been deprecated and will be removed in a future version. Use the `statusKeyline` prop instead. */ highlightVariant?: HighlightVariantType; /** Adds an outline to the tile to increase its visual prominence */ hasOutline?: boolean; /** Inverts the tile colors for use on dark backgrounds for the 'standard' and 'alt' variants */ inverse?: boolean; /** Sets the status keyline to indicate the status of the content within the tile */ statusKeyline?: (typeof STATUS_KEYLINE_VARIANTS)[number]; } declare const Tile: ({ variant, p, children, width, roundness, height, highlightVariant, hasOutline, inverse, statusKeyline, ...rest }: TileProps) => React.JSX.Element; export default Tile;