/** * DataCard type definitions. * * @module @mks2508/mks-ui/react/ui/DataCard */ import type { VariantProps } from 'class-variance-authority'; import type { SlotOverrides, IBaseConfig } from '../../../core/types'; import type { dataCardVariants, DataCardSlot } from './DataCard.styles'; export type { DataCardSlot } from './DataCard.styles'; /** Visual variant names */ export type DataCardVariant = 'default' | 'accent' | 'success' | 'warning' | 'destructive'; /** Size variant names */ export type DataCardSize = 'compact' | 'default' | 'spacious'; /** * Interaction state for state-based styling. */ export interface IDataCardState { /** Whether card is hovered */ hovered: boolean; /** Whether card is pressed */ pressed: boolean; /** Whether card is disabled */ disabled: boolean; } /** * Configuration for DataCard behavior and animation. * * @example * ```tsx * ... * ``` */ export interface IDataCardConfig extends IBaseConfig { /** Enable corner bracket hover animation (default: true) */ animateBrackets?: boolean; /** Spring stiffness for CountingNumber (default: 90) */ counterStiffness?: number; /** Spring damping for CountingNumber (default: 10) */ counterDamping?: number; } /** * Props for DataCard root component. * * @example * ```tsx * * * * * ``` */ export interface IDataCardProps extends VariantProps { /** Visual style variant */ variant?: DataCardVariant; /** Size variant affecting spacing */ size?: DataCardSize; /** Whether card is disabled */ disabled?: boolean; /** Override classes per slot */ slots?: SlotOverrides; /** Behavior/animation configuration */ config?: IDataCardConfig; /** CSS class or state-based class function */ className?: string | ((state: IDataCardState) => string | undefined); /** CSS styles or state-based styles function */ style?: React.CSSProperties | ((state: IDataCardState) => React.CSSProperties | undefined); /** Enable glassmorphism blur (default: true) */ glass?: boolean; /** Show corner brackets (default: true) */ showBrackets?: boolean; /** Child elements */ children?: React.ReactNode; } /** Props for DataCardValue */ export interface IDataCardValueProps { /** Target number to animate to */ number: number; /** Label displayed above number */ label?: string; /** Unit/suffix after number */ unit?: string; /** Decimal places (default: 0) */ decimalPlaces?: number; /** Pad number with leading zeros */ padStart?: boolean; } /** Props for DataCardLabel */ export interface IDataCardLabelProps extends React.ComponentProps<'div'> { /** Primary title text */ title?: string; /** Secondary description */ description?: string; } /** Props for DataCardToggle */ export interface IDataCardToggleProps { /** Whether toggle is checked */ checked?: boolean; /** Callback when toggle changes */ onCheckedChange?: (checked: boolean) => void; /** Label for the toggle */ label?: string; } /** Props for DataCardActions */ export interface IDataCardActionsProps extends React.ComponentProps<'div'> { /** Button alignment */ align?: 'start' | 'center' | 'end'; } /** Props for DataCardBracket */ export interface IDataCardBracketProps extends React.ComponentProps<'div'> { /** Corner position */ position: 'tl' | 'tr' | 'bl' | 'br'; /** Variant override */ variant?: 'default' | 'accent'; } //# sourceMappingURL=DataCard.types.d.ts.map