{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty",
  "title": "Empty",
  "description": "What a list, search or page shows when it has nothing in it: an icon, a title that says what is empty, a sentence on what to do, and the action that does it.",
  "registryDependencies": [
    "@ouro/heading",
    "@ouro/lib-class-name-check",
    "@ouro/lib-cn",
    "@ouro/lib-env",
    "@ouro/lib-use-dev-messages",
    "@ouro/text"
  ],
  "files": [
    {
      "path": "registry/ouro/components/ouro/empty/empty.tsx",
      "content": "\"use client\";\n\nimport type { HTMLAttributes, JSX, ReactNode, Ref } from \"react\";\nimport { useAppearanceClassNameCheck } from \"@/registry/ouro/lib/ouro/class-name-check\";\nimport { cn } from \"@/registry/ouro/lib/ouro/cn\";\nimport { useDevWarnings } from \"@/registry/ouro/lib/ouro/use-dev-messages\";\nimport { Heading } from \"@/registry/ouro/components/ouro/text/heading\";\nimport { Text } from \"@/registry/ouro/components/ouro/text/text\";\n\n/** The props Empty adds to the HTML attributes it passes through. */\nexport interface EmptyOwnProps {\n  /**\n   * What is empty, as a short heading: \"No recipes yet\". Required, because it is what a screen reader finds.\n   *\n   * @claim \"What is empty, as a short\" registry/ouro/components/ouro/empty/empty.test.tsx verify:testExists(registry/ouro/components/ouro/empty/empty.test.tsx::Empty > renders the title as an <h3>, the description, the icon and the action)\n   */\n  title: string;\n  /** What the person can do about it, in a sentence: \"Start by creating your first recipe.\" */\n  description?: ReactNode;\n  /** A decorative icon above the title, in a muted circle. Hidden from screen readers. */\n  icon?: ReactNode;\n  /** The way out, usually one `Button`: `action={<Button href=\"/recipes/new\">Create recipe</Button>}`. */\n  action?: ReactNode;\n  /** Anything else under the description, such as a search field. */\n  children?: ReactNode;\n  /**\n   * The title's heading level. Pick the level below the section the Empty sits in.\n   * @default 3\n   */\n  headingLevel?: 2 | 3 | 4 | 5 | 6 | (number & { \"Use 2 to 6, one below the section's heading\": never }) | undefined;\n  /**\n   * `outline` draws a dashed border around the empty area; `plain` has none, for an Empty\n   * inside a `Card` or a list that already has an edge.\n   * @default \"outline\"\n   * @claim \"`outline` draws a dashed border around\" registry/ouro/components/ouro/empty/empty.test.tsx verify:testExists(registry/ouro/components/ouro/empty/empty.test.tsx::Empty > centers its content and draws a dashed outline by default)\n   * @claim \"`outline` draws a dashed border around\" registry/ouro/components/ouro/empty/empty.test.tsx verify:testExists(registry/ouro/components/ouro/empty/empty.test.tsx::Empty > has no outline with variant=plain, and aligns to the start with align=start)\n   */\n  variant?: \"outline\" | \"plain\" | (string & { 'Use \"outline\" or \"plain\"': never }) | undefined;\n  /**\n   * `center` centers everything, for a page or panel; `start` lines it up with the text\n   * around it.\n   * @default \"center\"\n   * @claim \"`center` centers everything, for a page\" registry/ouro/components/ouro/empty/empty.test.tsx verify:testExists(registry/ouro/components/ouro/empty/empty.test.tsx::Empty > centers its content and draws a dashed outline by default)\n   * @claim \"`center` centers everything, for a page\" registry/ouro/components/ouro/empty/empty.test.tsx verify:testExists(registry/ouro/components/ouro/empty/empty.test.tsx::Empty > has no outline with variant=plain, and aligns to the start with align=start)\n   */\n  align?: \"center\" | \"start\" | (string & { 'Use \"center\" or \"start\": left is \"start\"': never }) | undefined;\n  /** Layout only: margins, width, grid placement (`mt-6`). Appearance classes warn in development; use `variant`. */\n  className?: string | undefined;\n  ref?: Ref<HTMLDivElement> | undefined;\n\n  /** Not a prop. Ouro UI uses `title`: `<Empty title=\"No recipes yet\">`. */\n  heading?: { 'Use <Empty title=\"No recipes yet\">': never };\n  /** Not a prop. Ouro UI uses `description`: `<Empty description=\"Add one.\">`. */\n  message?: { 'Use <Empty description=\"Add one.\">': never };\n  /** Not a prop. Ouro UI uses `action`, one slot: `<Empty action={<Button>Add</Button>}>`. */\n  actions?: { \"Use <Empty action={<Button>Add</Button>}>\": never };\n  /** Not a prop. Ouro UI uses `icon`: `<Empty icon={<Icon />}>`. */\n  image?: { \"Use <Empty icon={<Icon />}>\": never };\n}\n\n/** Props for {@link Empty}: its own props and the div attributes it passes through. */\nexport type EmptyProps = Omit<HTMLAttributes<HTMLDivElement>, keyof EmptyOwnProps> & EmptyOwnProps;\n\nconst variants = { outline: \"border border-dashed border-border rounded-ouro-xl\", plain: \"\" } as const;\nconst aligns = { center: \"items-center text-center\", start: \"items-start text-start\" } as const;\nconst levels = [2, 3, 4, 5, 6] as const;\n\n/**\n * What a list, search or page shows when it has nothing in it: an icon, a title that says\n * what is empty, a sentence on what to do, and the action that does it.\n *\n * Use `Alert` instead for an error or a warning, `Skeleton` while the content is\n * still loading, and `Moment` for a state with art of its own, a first run, a success that\n * celebrates, or one the person can dismiss.\n *\n * @group Display\n * @see https://ui.ouroboros.bot/docs/empty\n *\n * @example\n * <Empty\n *   icon={<BookIcon />}\n *   title=\"No recipes yet\"\n *   description=\"Start by creating your first recipe.\"\n *   action={<Button href=\"/recipes/new\">Create recipe</Button>}\n * />\n */\nexport function Empty(props: EmptyProps): JSX.Element {\n  const {\n    title,\n    description,\n    icon,\n    action,\n    children,\n    headingLevel = 3,\n    variant: variantProp = \"outline\",\n    align: alignProp = \"center\",\n    className,\n    heading,\n    message,\n    actions,\n    image,\n    ...rest\n  } = props;\n  const level = (levels as readonly unknown[]).includes(headingLevel) ? (headingLevel as (typeof levels)[number]) : 3;\n  const variant = Object.hasOwn(variants, variantProp) ? (variantProp as keyof typeof variants) : \"outline\";\n  const align = Object.hasOwn(aligns, alignProp) ? (alignProp as keyof typeof aligns) : \"center\";\n  useAppearanceClassNameCheck(\n    \"Empty\",\n    className,\n    process.env.NODE_ENV !== \"production\" ? '<Empty variant=\"plain\"> inside a <Card>' : /* istanbul ignore next @preserve -- production only */ \"\",\n    process.env.NODE_ENV !== \"production\" ? '<Empty align=\"start\">' : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  useDevWarnings(\n    \"Empty\",\n    process.env.NODE_ENV !== \"production\"\n      ? () => [\n          !title && [\"title is required; it says what is empty\", '<Empty title=\"No recipes yet\">'],\n          level !== headingLevel && [`headingLevel must be 2, 3, 4, 5 or 6, got ${String(headingLevel)}`, \"<Empty headingLevel={2}>\"],\n          variant !== variantProp && [`variant=\"${String(variantProp)}\" is not a variant; use \"outline\", \"plain\"`, '<Empty variant=\"outline\">'],\n          align !== alignProp && [`align=\"${String(alignProp)}\" is not an alignment; use \"center\", \"start\"`, '<Empty align=\"start\">'],\n          heading !== undefined && [\"heading is not a prop\", `<Empty title=\"${String(heading)}\">`],\n          message !== undefined && [\"message is not a prop\", `<Empty description=\"${String(message)}\">`],\n          actions !== undefined && [\"actions is not a prop\", \"<Empty action={<Button>…</Button>}>\"],\n          image !== undefined && [\"image is not a prop\", \"<Empty icon={<Icon />}>\"],\n        ]\n      : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  return (\n    <div\n      {...rest}\n      data-ouro=\"empty\"\n      className={cn(\"flex min-w-0 flex-col gap-4 px-6 py-10 text-balance\", variants[variant], aligns[align], className)}\n    >\n      {icon && (\n        <div\n          aria-hidden=\"true\"\n          className=\"flex size-12 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground *:[svg]:size-6\"\n        >\n          {icon}\n        </div>\n      )}\n      <div className={cn(\"flex max-w-md flex-col gap-1.5\", aligns[align])}>\n        <Heading level={level} size=\"md\">\n          {title}\n        </Heading>\n        {description && (\n          <Text as=\"div\" size=\"sm\" tone=\"muted\">\n            {description}\n          </Text>\n        )}\n      </div>\n      {action && <div className=\"flex flex-wrap gap-2\">{action}</div>}\n      {children && <div className=\"w-full max-w-md\">{children}</div>}\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ouro/empty/empty.tsx"
    }
  ],
  "docs": "What a list, search or page shows when it has nothing in it: an icon, a title that says what is empty, a sentence on what to do, and the action that does it. Import: import { Empty } from \"@/components/ouro/empty/empty\", with @/components replaced by your components alias (aliases.components in components.json, such as ~/components). Also installed: heading, text, the helpers they import in lib/ouro. Needs ouro-base in your stylesheet: add that item once per app, from the same place as this one, if you have not. Docs: https://ui.ouroboros.bot/docs/empty.md Ouro UI v1.3.257.",
  "type": "registry:ui"
}