{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "paper", "type": "registry:ui", "title": "Paper", "description": "Elevated surface — flat/elevated/outlined variants.", "registryDependencies": [ "https://raw.githubusercontent.com/truongnat/rnui/main/registry/dist/nativewind/utils.json", "https://raw.githubusercontent.com/truongnat/rnui/main/registry/dist/nativewind/theme.json" ], "dependencies": [ "tailwind-variants" ], "files": [ { "path": "registry/shared/ui/paper.tsx", "type": "registry:ui", "target": "components/ui/paper.tsx", "content": "import type { ReactNode } from 'react';\nimport { StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native';\nimport { tv } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\n\nconst paperVariants = tv({\n base: 'rounded-2xl bg-card p-5',\n variants: {\n variant: {\n flat: 'bg-muted/50 border border-transparent',\n elevated: 'bg-card',\n outlined: 'border border-border bg-card',\n },\n square: {\n true: 'rounded-none',\n },\n },\n defaultVariants: {\n variant: 'elevated',\n },\n});\n\nexport type PaperVariant = 'flat' | 'elevated' | 'outlined';\nexport type PaperElevation = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface PaperProps extends ViewProps {\n variant?: PaperVariant;\n /** Shadow depth — only applies to the `elevated` variant. */\n elevation?: PaperElevation;\n /** Remove border radius. */\n square?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nconst elevationStyle: Record = {\n none: {},\n sm: {\n elevation: 1.5,\n shadowColor: '#000',\n shadowOpacity: 0.06,\n shadowRadius: 3,\n shadowOffset: { width: 0, height: 1 },\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: 'rgba(0,0,0,0.06)',\n },\n md: {\n elevation: 3.5,\n shadowColor: '#000',\n shadowOpacity: 0.08,\n shadowRadius: 8,\n shadowOffset: { width: 0, height: 2 },\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: 'rgba(0,0,0,0.06)',\n },\n lg: {\n elevation: 7,\n shadowColor: '#000',\n shadowOpacity: 0.12,\n shadowRadius: 14,\n shadowOffset: { width: 0, height: 4 },\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: 'rgba(0,0,0,0.06)',\n },\n};\n\n/**\n * Elevated surface — shadcn card-like container with flat/elevated/outlined\n * variants and refined soft shadows.\n */\nexport function Paper({\n variant = 'elevated',\n elevation = 'sm',\n square,\n className,\n children,\n style,\n ...props\n}: PaperProps) {\n return (\n \n {children}\n \n );\n}\n" } ] }