import React, { HTMLAttributes, ReactNode } from 'react';
export interface CardProps extends HTMLAttributes {
/**
* Surface treatment.
* @default 'default'
*/
variant?: 'default' | 'elevated' | 'filled';
/**
* Padding level.
* @default 'md'
*/
padding?: 'none' | 'sm' | 'md' | 'lg';
children?: ReactNode;
}
/**
* A card: a surface that groups related content.
*
* **Composed, not configured.** The parts follow shadcn/ui's Base UI flavour — `Card` ›
* `CardHeader` › `CardTitle` | `CardDescription` | `CardAction`, then `CardContent` and
* `CardFooter`.
*
* THIS REPLACED `heading`, `description` AND `actions` PROPS. They rendered a fixed `h3`, a fixed
* `p` and a right-aligned action row, in a fixed order, with fixed spacing — so a caller who
* needed a badge beside the title, a two-line description, an `h2` for document outline reasons,
* or actions on the left had no way to get there without abandoning the component. The heading
* level in particular was a correctness problem: `h3` is right only if the card sits under an
* `h2`, and the prop gave no way to say otherwise.
*
* `variant` and `padding` are kept. They are style props rather than composition — they describe
* the surface, and no arrangement of children expresses "elevated".
*
* **Padding lives on the root, which is a deliberate divergence from shadcn.** shadcn distributes
* `px-6` across `CardHeader`, `CardContent` and `CardFooter` and puts `py-6` on the root; Strix
* keeps the existing `padding` prop on the root and leaves the parts padding-free, because doing
* it shadcn's way would change the rendered geometry of every existing card. Structural
* conformance is the goal; a visual diff is not.
*
* **The root is a flex column, and `className="flex"` now resets that.** It did not use to:
* tailwind-merge groups `flex`/`block`/`grid` (display) and `flex-row`/`flex-col` (direction)
* separately, so a caller's `flex` replaced the `flex` already here and left `flex-col` standing —
* a consumer's tool cards all rendered with the chevron under the text rather than beside it, and
* the only utility that landed was `flex-row`. `cn()` declares display as overriding direction now,
* so either spelling works and `flex-col` is a default rather than part of the API.
*
* @example
*
*
* Usage
* Last 30 days
* } />
*
* {chart}
*
*
*/
export declare const Card: React.ForwardRefExoticComponent>;
export type CardHeaderProps = HTMLAttributes;
/**
* Title, description and an optional action.
*
* A grid rather than a flex row, and the reason is `CardAction`: the action occupies a second
* column spanning both rows, so a two-line title does not push it out of alignment. The column
* only appears when an action is present — `has-[[data-slot=card-action]]:` — so a header without
* one is a plain single column and reserves no space.
*/
export declare const CardHeader: React.ForwardRefExoticComponent>;
export interface CardTitleProps extends HTMLAttributes {
/**
* Heading level. **There is no default and this is not an accident** — a card's correct level
* depends on what encloses it, and the previous `heading` prop hardcoded `h3`, which is right
* only under an `h2`. `as="div"` is available for a card whose title is not a document heading.
*/
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
}
export declare const CardTitle: React.ForwardRefExoticComponent>;
export type CardDescriptionProps = HTMLAttributes;
export declare const CardDescription: React.ForwardRefExoticComponent>;
export type CardActionProps = HTMLAttributes;
/**
* An action in the header's second column — a menu trigger or an icon button, typically.
*
* `row-span-2` so it stays aligned with the title whether or not there is a description, and
* `self-start` so it does not stretch to the height of a wrapped title.
*/
export declare const CardAction: React.ForwardRefExoticComponent>;
export type CardContentProps = HTMLAttributes;
export declare const CardContent: React.ForwardRefExoticComponent>;
export type CardFooterProps = HTMLAttributes;
/**
* The action row.
*
* `justify-end` is the default because it is what the previous `actions` prop rendered and what
* every current call site expects — but it is a class, so `justify-start` overrides it, which the
* prop never allowed.
*/
export declare const CardFooter: React.ForwardRefExoticComponent>;
//# sourceMappingURL=card.d.ts.map