{
  "$schema": "https://pdfx.akashpise.dev/schema/registry-item.json",
  "name": "card",
  "type": "registry:ui",
  "title": "Card",
  "description": "Bordered container card with title, 3 variants and padding control",
  "files": [
    {
      "path": "components/pdfx/card/pdfx-card.tsx",
      "content": "import { Text as PDFText, StyleSheet, View } from '@react-pdf/renderer';\nimport type { Style } from '@react-pdf/types';\nimport type { ReactNode } from 'react';\nimport { usePdfxTheme, useSafeMemo } from '../lib/pdfx-theme-context';\ntype PdfxTheme = ReturnType<typeof usePdfxTheme>;\n\nexport type CardVariant = 'default' | 'bordered' | 'muted';\n\n/**\n * Bordered content card with optional title and padding presets.\n * Props - `title` | `children` | `variant` | `padding` | `wrap` | `style`\n * @see {@link PdfCardProps}\n */\nexport interface PdfCardProps {\n  /** Custom styles to merge with component defaults */\n  style?: Style;\n  title?: string;\n  children?: ReactNode;\n  /**\n   * @default 'default'\n   */\n  variant?: CardVariant;\n  /**\n   * @default 'md'\n   */\n  padding?: 'sm' | 'md' | 'lg';\n  /**\n   * When false, the card will not split across PDF pages.\n   * @default false\n   */\n  wrap?: boolean;\n}\n\nfunction createCardStyles(t: PdfxTheme) {\n  const { spacing, borderRadius, fontWeights } = t.primitives;\n  return StyleSheet.create({\n    card: {\n      borderWidth: 1,\n      borderColor: t.colors.border,\n      borderStyle: 'solid',\n      borderRadius: borderRadius.sm,\n      backgroundColor: t.colors.background,\n      marginBottom: t.spacing.componentGap,\n    },\n    cardBordered: { borderWidth: 2 },\n    cardMuted: { backgroundColor: t.colors.muted },\n    paddingSm: { padding: spacing[2] },\n    paddingMd: { padding: spacing[3] },\n    paddingLg: { padding: spacing[4] },\n    title: {\n      fontFamily: t.typography.heading.fontFamily,\n      fontSize: t.primitives.typography.base,\n      lineHeight: t.typography.heading.lineHeight,\n      color: t.colors.foreground,\n      fontWeight: fontWeights.semibold,\n      marginBottom: spacing[2],\n      paddingBottom: spacing[1] + 2,\n      borderBottomWidth: 1,\n      borderBottomColor: t.colors.border,\n      borderBottomStyle: 'solid',\n    },\n    body: {\n      fontFamily: t.typography.body.fontFamily,\n      fontSize: t.typography.body.fontSize,\n      lineHeight: t.typography.body.lineHeight,\n      color: t.colors.foreground,\n    },\n  });\n}\n\nexport function PdfCard({\n  title,\n  children,\n  variant = 'default',\n  padding = 'md',\n  wrap = false,\n  style,\n}: PdfCardProps) {\n  const theme = usePdfxTheme();\n  const styles = useSafeMemo(() => createCardStyles(theme), [theme]);\n  const paddingMap = { sm: styles.paddingSm, md: styles.paddingMd, lg: styles.paddingLg };\n  const cardStyles: Style[] = [styles.card];\n  if (variant === 'bordered') cardStyles.push(styles.cardBordered);\n  if (variant === 'muted') cardStyles.push(styles.cardMuted);\n  cardStyles.push(paddingMap[padding]);\n  if (style) cardStyles.push(style);\n  return (\n    <View wrap={wrap} style={cardStyles}>\n      {title ? <PDFText style={styles.title}>{title}</PDFText> : null}\n      {typeof children === 'string' ? <PDFText style={styles.body}>{children}</PDFText> : children}\n    </View>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "dependencies": [
    "@react-pdf/renderer"
  ],
  "registryDependencies": [
    "theme"
  ]
}