{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "type": "registry:ui",
  "title": "Card",
  "description": "Composable React card primitives for Tile UI.",
  "devDependencies": [
    "sass"
  ],
  "registryDependencies": [
    "@tile-ui/core",
    "@tile-ui/styles"
  ],
  "files": [
    {
      "path": "packages/react/src/components/card/card.tsx",
      "type": "registry:ui",
      "target": "components/ui/card/card.tsx",
      "content": "import React from 'react';\nimport { cardStyleKeys } from '../lib/core';\nimport type {\n\tCardBaseProps,\n\tCardHeaderBaseProps,\n\tCardTitleBaseProps,\n\tCardDescriptionBaseProps,\n\tCardActionBaseProps,\n\tCardContentBaseProps,\n\tCardFooterBaseProps,\n} from '../lib/core';\nimport styles from './card.module.scss';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({ className = '', as: Component = 'div', children, ...props }, ref) => {\n\treturn (\n\t\t<Component ref={ref} className={`${styles[cardStyleKeys.card]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</Component>\n\t);\n});\nCard.displayName = 'Card';\n\ninterface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement>, CardHeaderBaseProps {}\n\nconst CardHeader = React.forwardRef<HTMLDivElement, CardHeaderProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={`${styles[cardStyleKeys.header]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nCardHeader.displayName = 'CardHeader';\n\ninterface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement>, CardTitleBaseProps {}\n\nconst CardTitle = React.forwardRef<HTMLHeadingElement, CardTitleProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<h3 ref={ref} className={`${styles[cardStyleKeys.title]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</h3>\n\t);\n});\nCardTitle.displayName = 'CardTitle';\n\ninterface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement>, CardDescriptionBaseProps {}\n\nconst CardDescription = React.forwardRef<HTMLParagraphElement, CardDescriptionProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<p ref={ref} className={`${styles[cardStyleKeys.description]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</p>\n\t);\n});\nCardDescription.displayName = 'CardDescription';\n\ninterface CardActionProps extends React.HTMLAttributes<HTMLDivElement>, CardActionBaseProps {}\n\nconst CardAction = React.forwardRef<HTMLDivElement, CardActionProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={`${styles[cardStyleKeys.action]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nCardAction.displayName = 'CardAction';\n\ninterface CardContentProps extends React.HTMLAttributes<HTMLDivElement>, CardContentBaseProps {}\n\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={`${styles[cardStyleKeys.content]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nCardContent.displayName = 'CardContent';\n\ninterface CardFooterProps extends React.HTMLAttributes<HTMLDivElement>, CardFooterBaseProps {}\n\nconst CardFooter = React.forwardRef<HTMLDivElement, CardFooterProps>(({ className = '', children, ...props }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={`${styles[cardStyleKeys.footer]} ${className}`} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter };\nexport type { CardHeaderProps, CardTitleProps, CardDescriptionProps, CardActionProps, CardContentProps, CardFooterProps };\nexport default Card;\n"
    },
    {
      "path": "packages/styles/scss/components/card.module.scss",
      "type": "registry:file",
      "target": "components/ui/card/card.module.scss",
      "content": "@use '../../../styles/variables/colors' as *;\n\n.card {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--tile-card-gap, $spacing-4);\n\tborder-radius: var(--tile-card-radius, $radius-lg);\n\tborder: 1px solid var(--tile-card-border, $border);\n\tbackground-color: var(--tile-card-background, $background);\n\tcolor: $foreground;\n\tbox-shadow: var(--tile-card-shadow, $shadow);\n\toverflow: hidden;\n\ttransition: box-shadow $transition-normal;\n\n\t&:hover {\n\t\tbox-shadow: var(--tile-card-hover-shadow, $shadow-md);\n\t}\n}\n\n.cardHeader {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr;\n\tgrid-auto-rows: min-content;\n\talign-items: start;\n\tgap: $spacing-1;\n\tpadding: var(--tile-card-header-padding, $spacing-6 $spacing-6 0);\n\n\t// 存在操作区时启用右侧列\n\t&:has(.cardAction) {\n\t\tgrid-template-columns: 1fr auto;\n\t}\n}\n\n.cardTitle {\n\tfont-size: var(--tile-card-title-size, $text-xl);\n\tfont-weight: var(--tile-card-title-weight, $font-semibold);\n\tline-height: var(--tile-card-title-leading, $leading-tight);\n\tcolor: $foreground;\n\tmargin: 0;\n}\n\n.cardDescription {\n\tfont-size: $text-sm;\n\tcolor: var(--tile-card-description-color, $muted-foreground);\n\tline-height: $leading-normal;\n\tmargin: 0;\n}\n\n.cardAction {\n\tgrid-column-start: 2;\n\tgrid-row-start: 1;\n\tgrid-row-end: span 2;\n\talign-self: start;\n\tjustify-self: end;\n}\n\n.cardContent {\n\tpadding: var(--tile-card-content-padding, 0 $spacing-6);\n}\n\n.cardFooter {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: $spacing-4;\n\tpadding: var(--tile-card-footer-padding, 0 $spacing-6 $spacing-6);\n}\n"
    },
    {
      "path": "packages/react/src/components/card/index.ts",
      "type": "registry:ui",
      "target": "components/ui/card/index.ts",
      "content": "export {\n\tCard,\n\tCardHeader,\n\tCardTitle,\n\tCardDescription,\n\tCardAction,\n\tCardContent,\n\tCardFooter,\n\ttype CardProps,\n\ttype CardHeaderProps,\n\ttype CardTitleProps,\n\ttype CardDescriptionProps,\n\ttype CardActionProps,\n\ttype CardContentProps,\n\ttype CardFooterProps,\n} from './card';\n"
    }
  ]
}
