{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"empty-state","title":"Empty State","description":"Empty application-state explanation with media and actions.","dependencies":["class-variance-authority@0.7.1"],"registryDependencies":["@siteplane/base"],"files":[{"path":"packages/ui/src/components/empty-state/empty-state.tsx","content":"import { cva, type VariantProps } from \"class-variance-authority\";\nimport type React from \"react\";\n\nimport { cn } from \"../../system/utils/cn\";\nimport { slotClass } from \"../../system/utils/slot-class\";\n\nconst emptyMediaVariants = cva(\n  \"flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n  {\n    defaultVariants: { variant: \"default\" },\n    variants: {\n      variant: {\n        default: \"bg-transparent\",\n        icon: \"size-6 text-muted-foreground [&_svg:not([class*='size-'])]:size-6\",\n      },\n    },\n  },\n);\n\nexport function Empty({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        slotClass(\"empty\", props),\n        \"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-5 px-6 py-24 text-center\",\n        className,\n      )}\n      data-slot=\"empty\"\n      {...props}\n    />\n  );\n}\n\nexport function EmptyHeader({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        slotClass(\"empty-header\", props),\n        \"flex max-w-sm flex-col items-center gap-2 text-center\",\n        className,\n      )}\n      data-slot=\"empty-header\"\n      {...props}\n    />\n  );\n}\n\nexport function EmptyMedia({\n  className,\n  variant = \"default\",\n  ...props\n}: React.ComponentProps<\"div\"> &\n  VariantProps<typeof emptyMediaVariants>): React.ReactElement {\n  return (\n    // The header's 8 px gap spaces the text; the media is set apart from it by\n    // 20 px, so it adds the other 12 px while something follows it (rulebook\n    // S2): a header with only media adds no space below it.\n    <div\n      className={cn(\n        slotClass(\"empty-media\", props),\n        \"not-last:mb-3\",\n        emptyMediaVariants({ variant }),\n        className,\n      )}\n      data-slot=\"empty-media\"\n      data-variant={variant}\n      {...props}\n    />\n  );\n}\n\nexport function EmptyTitle({\n  className,\n  level,\n  ...props\n}: React.ComponentProps<\"div\"> & {\n  /**\n   * The heading level, 1 to 6, so the title takes its place in the page\n   * outline as `h1` to `h6`. Without it the title is a div. The look stays the\n   * same at every level.\n   */\n  level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;\n}): React.ReactElement {\n  // A heading takes the same attributes as the div; only the element type\n  // names a different interface, so the props are passed on as they are.\n  const Title = (level ? `h${level}` : \"div\") as \"div\";\n  return (\n    <Title\n      className={cn(\n        slotClass(\"empty-title\", props),\n        \"font-medium text-sm leading-[21px] wrap-anywhere [font-weight:480]\",\n        className,\n      )}\n      data-slot=\"empty-title\"\n      {...props}\n    />\n  );\n}\n\nexport function EmptyDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        slotClass(\"empty-description\", props),\n        \"text-muted-foreground text-sm leading-[21px] wrap-anywhere [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n        className,\n      )}\n      data-slot=\"empty-description\"\n      {...props}\n    />\n  );\n}\n\nexport function EmptyContent({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        slotClass(\"empty-content\", props),\n        \"flex w-full min-w-0 max-w-sm flex-col items-center gap-2 text-balance text-sm\",\n        className,\n      )}\n      data-slot=\"empty-content\"\n      {...props}\n    />\n  );\n}\n","type":"registry:ui","target":"~/src/siteplane/components/empty-state/empty-state.tsx"},{"path":"packages/ui/src/components/empty-state/index.ts","content":"export * from \"./empty-state\";\n","type":"registry:ui","target":"~/src/siteplane/components/empty-state/index.ts"}],"type":"registry:ui","docs":"https://ui.siteplane.io/docs-markdown/components/empty-state.md","categories":["Feedback"],"meta":{"avoidWhen":["Avoid while data is loading; use Skeleton or Spinner.","Avoid for an error on a page that still has content; use Alert."],"description":"Empty application-state explanation with media and actions.","knownLimitations":[],"providerNotes":[],"releaseStatus":"stable","searchTerms":["empty-state","empty state","empty","state"],"useWhen":["Use after loading has settled, to explain why a collection is empty and what to do next, with optional media and actions."]}}