{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "type": "registry:ui",
  "title": "Card",
  "description": "Card is a general-purpose content container grouping related information with a clear visual boundary.",
  "author": "Skrewww",
  "dependencies": [],
  "registryDependencies": [
    "@skrewww/foundation"
  ],
  "docs": "Host requirements (assumed already present, not installed by this command): react, react-dom.",
  "files": [
    {
      "path": "components/ui/Card.tsx",
      "content": "/** @skrewww-component card */\nimport { createElement, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport styles from \"@/components/ui/card.module.css\";\n\nexport type CardElevation = \"flat\" | \"raised\";\nexport type CardElement = \"div\" | \"article\" | \"section\" | \"li\";\n\nexport type CardProps = HTMLAttributes<HTMLElement> & {\n  /** Semantic wrapper. Defaults to `div`. Use `article` only for independently meaningful content. */\n  as?: CardElement;\n  elevation?: CardElevation;\n  title?: string;\n  /** Heading level for the optional title. Defaults to `h3`. */\n  headingLevel?: \"h2\" | \"h3\" | \"h4\";\n  footer?: ReactNode;\n  bodyClassName?: string;\n};\n\nexport function Card({\n  as = \"div\",\n  elevation = \"flat\",\n  title,\n  headingLevel: Heading = \"h3\",\n  footer,\n  bodyClassName,\n  children,\n  className,\n  ...props\n}: CardProps) {\n  return createElement(\n    as,\n    {\n      className: cn(\n        styles.card,\n        elevation === \"raised\" ? styles.raised : styles.flat,\n        className,\n      ),\n      ...props,\n    },\n    title ? (\n      <header className={styles.header}>\n        <Heading className={styles.title}>{title}</Heading>\n      </header>\n    ) : null,\n    <div className={cn(styles.body, bodyClassName)}>{children}</div>,\n    footer ? <footer className={styles.footer}>{footer}</footer> : null,\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/Card.tsx"
    },
    {
      "path": "components/ui/card.module.css",
      "content": ".card {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  border-radius: var(--shape-radius-container);\n  background-color: var(--surface-fill-default);\n  background-image: var(--component-surface-gradient-overlay);\n  border: 1px solid var(--surface-border-default);\n  color: var(--semantic-text-primary);\n  /* `none` outside Glass mode, where --glass-backdrop-filter-md is\n     undefined — same enabling pattern as the squircle clip-path above. */\n  backdrop-filter: var(--glass-backdrop-filter-md, none);\n}\n\n.flat {\n  box-shadow: none;\n}\n\n.raised {\n  box-shadow: var(--surface-shadow-raised);\n  border-color: transparent;\n}\n\n/*\n * clip-path clips box-shadow exactly like it clips outline (same underlying\n * reason). Rather than lose .raised's elevation shadow entirely in Squircle\n * mode, the fill and border move to a ::before layer that gets the real\n * clip-path curve, while .card itself — which keeps box-shadow, unclipped —\n * still uses its own border-radius above so the shadow's silhouette stays a\n * close visual match to the squircle rather than a plain rectangle. This is\n * a real, deliberate trade-off, not a bug: a shadow's soft, blurred edge\n * makes the sub-pixel difference between \"traces the squircle exactly\" and\n * \"traces a similarly-sized rounded rect\" imperceptible in practice. Card's\n * own overflow: hidden (for child content) is left on the existing\n * border-radius for the same reason — this codebase's Card usage always\n * pads content well away from the corners, so the two boundaries never\n * visibly diverge.\n */\n[data-skrewww-shape=\"squircle\"] .card {\n  background: none;\n  border-color: transparent;\n}\n\n[data-skrewww-shape=\"squircle\"] .card::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  clip-path: var(--squircle-clip-path-container);\n  background-color: var(--surface-fill-default);\n  background-image: var(--component-surface-gradient-overlay);\n  /* Squircle moves the fill here, so Glass's blur has to move with it —\n     .card's own backdrop-filter above has nothing to blur once its\n     background is none. */\n  backdrop-filter: var(--glass-backdrop-filter-md, none);\n  border: 1px solid var(--surface-border-default);\n}\n\n[data-skrewww-shape=\"squircle\"] .card.raised::before {\n  border-color: transparent;\n}\n\n.header {\n  padding: 1rem 1.25rem 0;\n}\n\n.title {\n  margin: 0;\n  font-size: 1rem;\n  font-weight: 600;\n  line-height: 1.4;\n  color: var(--semantic-text-primary);\n}\n\n.body {\n  padding: 1rem 1.25rem;\n  font-size: 0.875rem;\n  line-height: 1.6;\n  color: var(--semantic-text-secondary);\n}\n\n.body:first-child {\n  padding-top: 1.25rem;\n}\n\n.footer {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: 0.75rem;\n  margin-top: auto;\n  padding: 0 1.25rem 1.25rem;\n}\n\n.header + .body {\n  padding-top: 0.5rem;\n}\n\n.body + .footer {\n  padding-top: 0;\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/card.module.css"
    },
    {
      "path": "lib/cn.ts",
      "content": "export function cn(...classes: Array<string | false | null | undefined>): string {\n  return classes.filter(Boolean).join(\" \");\n}\n",
      "type": "registry:lib",
      "target": "~/lib/cn.ts"
    }
  ]
}
