import type { Meta, StoryObj } from 'storybook-solidjs-vite'; import type { JSX } from 'solid-js'; import './card'; import { argTypesFor, specDescription } from '../stories/docs/element-controls'; declare module 'solid-js' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { 'kc-card': JSX.HTMLAttributes & { heading?: string; description?: string; 'error-message'?: string; dense?: boolean | string; }; } } } /** A bordered box the card sits inside (gives it a sensible width). */ function Frame(props: { children: JSX.Element }) { return
{props.children}
; } const CONTENT_SNIPPET = `

Your repository has 3 open pull requests and 12 passing checks.

`; const MEDIA_SNIPPET = ` Report preview

Your Q2 numbers are ready to review.

`; const ERROR_SNIPPET = ` `; const meta = { title: 'Generative UI/Cards/kc-card', tags: ['autodocs'], argTypes: argTypesFor('kc-card'), parameters: { layout: 'padded', docs: { description: specDescription('kc-card', [ '`` is the shared, presentational **card chrome** every native generative-UI card composes from: an optional **media** region (`slot="media"`), a **heading** + **description**, a **body** (default slot), an **actions** footer (`slot="actions"`), and one consistent inline **error** state (`error-message`).', '**Chrome only — it emits no events and reads no context.** Raw light-DOM content slotted into `kc-card` (such as plain `