{ "name": "empty-state", "type": "registry:ui", "title": "Empty State", "description": "Placeholder shown when a list or search has no results.", "dependencies": [ "cn@^0.3.0" ], "registryDependencies": [ "https://raw.githubusercontent.com/wunder-ui/wunderui/main/r/styles.json" ], "files": [ { "path": "components/wunderui/stat-card.tsx", "type": "registry:component", "target": "components/wunderui/stat-card.tsx", "content": "\"use client\"\r\n\r\nimport { type ReactNode } from \"react\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst EMPTY_STATE_VARIANTS = {\r\n /** No frame and no line — centered content on the white card surface (Figma Style=default). */\r\n default: \"rounded-xl bg-card\",\r\n outline: \"rounded-xl border border-border bg-card\",\r\n dashed: \"rounded-xl border border-dashed border-border bg-card\",\r\n background: \"rounded-2xl bg-muted/60\",\r\n} as const\r\n\r\nfunction EmptyState({\r\n icon,\r\n title,\r\n description,\r\n action,\r\n variant = \"dashed\",\r\n className,\r\n}: {\r\n icon?: ReactNode\r\n title: string\r\n description?: string\r\n action?: ReactNode\r\n /** Frame style — mirrors the Figma Empty State \"Style\" variants. */\r\n variant?: keyof typeof EMPTY_STATE_VARIANTS\r\n className?: string\r\n}) {\r\n return (\r\n
\r\n {icon && (\r\n
\r\n {icon}\r\n
\r\n )}\r\n
\r\n

{title}

\r\n {description &&

{description}

}\r\n
\r\n {action}\r\n
\r\n )\r\n}\r\n\r\nexport { EmptyState }\n" }, { "path": "lib/utils.ts", "type": "registry:lib", "target": "lib/utils.ts", "content": "import type { CnFunction } from \"cn\"\nimport { createCn } from \"cn/config\"\n\n/**\n * clsx + tailwind-merge, taught WunderUI's own theme utilities so they merge\n * in the right group: `text-label-sm` is a font size (not a text colour, which\n * dropped it next to `text-text-tertiary`), `bg-gradient-*` a background image\n * (not a colour that `bg-card` would remove), and the motion utilities\n * `ease-entrance …` and `duration-fast …` replace each other.\n */\nexport const cn: CnFunction = createCn({\n extend: {\n classGroups: {\n \"font-size\": [{ text: [\"label-sm\"] }],\n \"bg-image\": [\n {\n bg: [\n \"gradient-primary\",\n \"gradient-indigo\",\n \"gradient-blue\",\n \"gradient-purple\",\n \"gradient-pink\",\n \"gradient-red\",\n \"gradient-orange\",\n \"gradient-yellow\",\n \"gradient-green\",\n \"gradient-alternative\",\n \"gradient-slate\",\n \"gradient-dark\",\n ],\n },\n ],\n ease: [{ ease: [\"entrance\", \"exit\", \"move\", \"overshoot\", \"spring\"] }],\n duration: [{ duration: [\"instant\", \"fast\", \"base\", \"slow\", \"deliberate\", \"ambient\"] }],\n },\n },\n})\n" } ], "docs": "https://wunderui.com/components/empty-state", "meta": { "group": "Core Elements", "exports": [ "EmptyState" ] } }