` card with glass background and border\n *\n * @default false\n *\n * @example\n * ```tsx\n *
\n * Status: \n *
\n * ```\n */\n readonly inline?: boolean;\n\n /**\n * Click handler (makes the insight clickable).\n *\n * When provided, the insight becomes interactive with:\n * - Hover glow effect (variant-specific)\n * - Cursor pointer\n * - Keyboard support (Space/Enter)\n * - `role=\"button\"` and `tabIndex={0}`\n *\n * @example\n * ```tsx\n *
navigate('/details')}\n * showArrow\n * />\n * ```\n */\n readonly onClick?: () => void;\n\n /**\n * Show arrow indicator.\n *\n * Displays ChevronRight icon on the right side of the card. Useful for\n * indicating clickable insights that navigate to another view.\n *\n * @default false\n *\n * @example\n * ```tsx\n * \n * ```\n */\n readonly showArrow?: boolean;\n\n /**\n * Fade-in animation.\n *\n * Applies `animate-insight-fade-in` CSS animation for entrance effect.\n * Useful for insights that appear dynamically (e.g., after data load).\n *\n * @default false\n *\n * @example\n * ```tsx\n * \n * ```\n */\n readonly animated?: boolean;\n}\n\nexport const InsightCardGlass = forwardRef(\n (\n {\n emoji,\n text,\n detail,\n variant = 'default',\n inline = false,\n onClick,\n showArrow = false,\n animated = false,\n className,\n ...props\n },\n ref\n ) => {\n const config = insightVariantConfig[variant];\n const displayEmoji = emoji ?? config.defaultEmoji;\n const isClickable = !!onClick;\n\n const handleClick = () => onClick?.();\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (isClickable && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick?.();\n }\n };\n\n const borderStyle: CSSProperties = !inline\n ? {\n borderColor: `var(${config.borderVar})`,\n }\n : {};\n\n const glowStyle: CSSProperties =\n isClickable && config.glowVar\n ? ({\n '--hover-glow': `var(${config.glowVar})`,\n } as CSSProperties)\n : {};\n\n // Inline variant\n if (inline) {\n return (\n }\n className={cn(\n 'inline-flex items-center gap-1.5 text-sm text-[var(--text-secondary)]',\n className\n )}\n {...props}\n >\n {displayEmoji}\n {text}\n {detail && ({detail})}\n \n );\n }\n\n // Card variant\n return (\n \n
\n
\n {displayEmoji}\n \n
\n
{text}
\n {detail &&
{detail}
}\n
\n {showArrow && (\n
\n )}\n
\n
\n );\n }\n);\n\nInsightCardGlass.displayName = 'InsightCardGlass';\n"
}
],
"categories": [
"atomic"
]
}