import { ReactNode } from 'react'; import { IconType, IconFontColor, AnyIconDefinition } from './types'; export type BadgeColor = 'accent' | 'gray' | 'success' | 'warning' | 'danger' | 'info'; export type BadgeTheme = 'solid' | 'soft'; export type BadgeSize = 'dot' | 'sm' | 'md' | 'lg'; export interface BadgeSharedProps { className?: string; } /** Color, tamaño, tema y borde. */ export interface BadgeAppearanceProps { color?: BadgeColor; theme?: BadgeTheme; size?: BadgeSize; customColor?: string; stroke?: boolean; } /** Icono Font Awesome / slot y duotone. */ export interface BadgeGlyphProps { icon?: IconType | AnyIconDefinition; /** Si se define, sustituye el render del icono Font Awesome (p. ej. LegacyIcon). */ iconSlot?: ReactNode; iconDuotonePrimary?: IconFontColor; iconDuotoneSecondary?: IconFontColor; iconDuotoneOpacityPrimary?: number; iconDuotoneOpacitySecondary?: number; } /** Texto y truncado. */ export interface BadgeTextProps { label?: string; truncateLabel?: boolean; /** Si es true y truncateLabel es true, muestra tooltip con el texto completo al hacer hover cuando está truncado. Por defecto false. */ truncateTooltip?: boolean; } /** Carga, disabled y puntero. */ export interface BadgeStateProps { /** Si es `false`, el badge no participa como objetivo de puntero (`pointer-events: none`): útil en chips donde el * remarcado lo define el padre (p. ej. tarjeta con `group-hover`) y no el hover sobre el propio badge. * Por defecto `true`. */ hover?: boolean; disabled?: boolean; /** Si es true, muestra un spinner de carga en lugar del contenido del badge */ loading?: boolean; } /** Bloques opcionales; cada clave gana sobre la prop plana homónima (fusión en el componente). */ export interface BadgeGroupedBlocks { appearance?: BadgeAppearanceProps; glyph?: BadgeGlyphProps; text?: BadgeTextProps; state?: BadgeStateProps; } /** * Props planas (compatibilidad). Preferir {@link BadgeGroupedBlocks}. * @deprecated Preferir `appearance`, `glyph`, `text`, `state`. */ export interface BadgeFlatDeprecated { label?: string; color?: BadgeColor; theme?: BadgeTheme; size?: BadgeSize; customColor?: string; stroke?: boolean; hover?: boolean; disabled?: boolean; icon?: IconType | AnyIconDefinition; iconSlot?: ReactNode; iconDuotonePrimary?: IconFontColor; iconDuotoneSecondary?: IconFontColor; iconDuotoneOpacityPrimary?: number; iconDuotoneOpacitySecondary?: number; loading?: boolean; truncateLabel?: boolean; truncateTooltip?: boolean; } /** * Props públicas de {@link Badge}: API preferida por bloques (`appearance`, `glyph`, `text`, `state`); * las props planas siguen admitidas (compatibilidad). */ export type BadgeProps = BadgeSharedProps & BadgeGroupedBlocks & BadgeFlatDeprecated; /** * Forma plana tras fusión (uso interno del componente). * @internal */ export interface BadgePropsFlat extends BadgeFlatDeprecated { className?: string; } /** @deprecated Usa BadgeProps en su lugar */ export type IBadgeProps = BadgeProps; //# sourceMappingURL=badge.d.ts.map