{"version":3,"file":"card.types.mjs","names":[],"sources":["../../../../package/common/card/card.types.ts"],"sourcesContent":["import type React from 'react';\nimport type { ReactNode } from 'react';\nimport type { ButtonProps, ButtonStyleType } from '../button/button.types';\nimport type { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types';\nimport type { IconAction } from '../types/actions.types';\nimport type { ColorValue } from '../themeProvider/color.types';\nimport type { ImageProps } from '../image/image.types';\n\n/**\n * The card's surface. `Outlined` and `Light` mean what they do on Button, Badge and Chip; `Elevated`\n * is a card's own. There is no `Filled`: body text on a solid colour reads badly.\n */\nexport enum CardStyleType {\n  /** A raised surface with a shadow, always neutral. The default. */\n  Elevated = 'elevated',\n  /** A border in the colour, no fill. */\n  Outlined = 'outlined',\n  /** A flat tint of the colour, no border. */\n  Light = 'light',\n}\n\n// `tabIndex` is omitted only because this component's version also accepts `null`.\nexport type CardSlots = 'root' | 'content';\n\nexport interface CardProps extends Omit<HtmlProps, 'tabIndex'> {\n  className?: string | undefined;\n  children?: ReactNode;\n  styleType?: CardStyleType;\n  /**\n   * The border of an `Outlined` card and the tint of a `Light` one: a `ThemeColor` (default\n   * `Neutral`) or any CSS colour. An `Elevated` card stays neutral.\n   */\n  color?: ColorValue;\n  onClick?: () => void;\n  tabIndex?: number | null;\n  hoverEffect?: boolean;\n  style?: React.CSSProperties;\n  autoGap?: boolean;\n  clip?: boolean;\n  /** Ref to the root element. */\n  ref?: React.Ref<HTMLDivElement>;\n  /** Classes for the inner elements. See `CardSlots`. */\n  classNames?: SlotClassNames<CardSlots>;\n  /** Inline styles for the inner elements. See `CardSlots`. */\n  styles?: SlotStyles<CardSlots>;\n}\n\nexport type CardHeaderAction = IconAction;\n\nexport interface CardHeaderProps {\n  className?: string;\n  title?: ReactNode;\n  subTitle?: ReactNode;\n  /** URL string → rendered as background-image. Any other ReactNode → rendered inside the thumbnail div. */\n  thumbnail?: string | ReactNode;\n  actions?: CardHeaderAction[] | ReactNode;\n}\n\n/** An `Image`, bled to the card's edges: a skeleton while it loads, a fallback if it fails. */\nexport interface CardMediaProps extends Omit<ImageProps, 'src' | 'alt'> {\n  src?: string;\n  alt?: string;\n}\n\nexport interface CardContentProps {\n  children?: ReactNode;\n}\n\nexport interface CardAction {\n  id?: string;\n  label?: string;\n  styleType?: ButtonStyleType;\n  color?: ButtonProps['color'];\n  onClick?: () => void;\n}\n\nexport interface CardActionsProps {\n  className?: string;\n  /** Renders a Button for each action object. Pass `children` for custom content instead. */\n  actions?: CardAction[];\n  children?: ReactNode;\n}\n"],"mappings":"aAYA,IAAY,EAAL,SAAA,EAAA,OAEL,GAAA,SAAA,WAEA,EAAA,SAAA,WAEA,EAAA,MAAA,SACF,EAAA,CAAA,CAAA"}