{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "row",
  "title": "Row",
  "description": "Lays its children out side by side with an even gap, centered up and down.",
  "registryDependencies": [
    "@ouro/lib-class-name-check",
    "@ouro/lib-cn",
    "@ouro/lib-env",
    "@ouro/lib-use-dev-messages",
    "@ouro/stack"
  ],
  "files": [
    {
      "path": "registry/ouro/components/ouro/stack/row.tsx",
      "content": "\"use client\";\n\nimport { createElement, type HTMLAttributes, type JSX, type ReactNode, type 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 {\n  alignWords,\n  checkElement,\n  checkFlexClassName,\n  checkGap,\n  checkJustify,\n  elementReset,\n  gapClasses,\n  justifyClasses,\n  layoutAlignHint,\n  layoutHint,\n  type LayoutElement,\n  type LayoutGap,\n  type LayoutJustify,\n} from \"@/registry/ouro/components/ouro/stack/stack-styles\";\n\n/** Where a Row's children sit up and down it: `baseline` lines up their first lines of text. */\nexport type RowAlign = \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n\n/** The breakpoint below which a Row with `stackBelow` lays its children out top to bottom. */\nexport type RowBreakpoint = \"sm\" | \"md\";\n\n/** The props Row adds to the HTML attributes it passes through. */\nexport interface RowOwnProps {\n  /**\n   * Space between the children: `xs` 4px, `sm` 8px, `md` 16px, `lg` 24px, `xl` 32px.\n   * @default \"sm\"\n   * @claim \"Space between the children: `xs` 4px\" registry/ouro/components/ouro/stack/stack.test.tsx verify:fileLine(registry/ouro/components/ouro/stack/stack.test.tsx, /\\[\"xs\",\\s\"4px\"\\],/)\n   * @claim \"Space between the children: `xs` 4px\" registry/ouro/components/ouro/stack/stack.test.tsx verify:fileLine(registry/ouro/components/ouro/stack/stack.test.tsx, /\\[\"xl\",\\s\"32px\"\\],/)\n   * @claim \"Space between the children: `xs` 4px\" registry/ouro/components/ouro/stack/row.test.tsx verify:testExists(registry/ouro/components/ouro/stack/row.test.tsx::Row > renders a horizontal flex <div> with data-ouro, an 8px gap and centered children by default)\n   */\n  gap?: LayoutGap | (string & { 'Use \"none\", \"xs\", \"sm\", \"md\", \"lg\" or \"xl\"': never }) | (number & { 'Use a name: gap=\"sm\" is 8px': never }) | undefined;\n  /**\n   * Where the children sit up and down the Row. `baseline` lines up their text.\n   * @default \"center\"\n   */\n  align?: RowAlign | (string & { 'Use \"start\", \"center\", \"end\", \"stretch\" or \"baseline\": top is \"start\"': never }) | undefined;\n  /**\n   * Where the children sit along the Row. `between` puts the first at the start and the last\n   * at the end, as in a toolbar with a title and actions.\n   * @default \"start\"\n   */\n  justify?: LayoutJustify | (string & { 'Use \"start\", \"center\", \"end\" or \"between\": right is \"end\"': never }) | undefined;\n  /** Lets the children wrap onto more lines when they don't fit. */\n  wrap?: boolean | undefined;\n  /**\n   * Below this breakpoint the children stack top to bottom at full width, as a settings row\n   * whose actions drop under its text on a phone. `sm` is 640px, `md` 768px.\n   * @claim \"`sm` is 640px, `md` 768px\" registry/ouro/components/ouro/stack/row.test.tsx verify:testExists(registry/ouro/components/ouro/stack/row.test.tsx::Row > stacks below md with stackBelow=md)\n   * @claim \"`sm` is 640px, `md` 768px\" https://tailwindcss.com/docs/responsive-design verify:urlOk(https://tailwindcss.com/docs/responsive-design)\n   */\n  stackBelow?: RowBreakpoint | (string & { 'Use \"sm\" (640px) or \"md\" (768px)': never }) | undefined;\n  /**\n   * The element to render. A `ul` or `ol` loses its bullets and indent, a `fieldset` its border.\n   * @default \"div\"\n   */\n  as?: LayoutElement | (string & { 'Use div, section, ul, ol, nav, header, footer, main, aside, form or fieldset': never }) | undefined;\n  /**\n   * Layout only: margins, width, grid placement (`mt-4`). Appearance classes warn in\n   * development: a Row has no look; use `Card` for a surface. So do the flex classes the\n   * props own: use `gap`, `align`, `justify`, `wrap` and `stackBelow`, not `gap-*`,\n   * `items-*`, `justify-*`, `flex-wrap` or `max-sm:flex-col`.\n   * @claim \"Appearance classes warn in development: a\" registry/ouro/components/ouro/stack/row.test.tsx verify:testExists(registry/ouro/components/ouro/stack/row.test.tsx::Row development messages > checks the className with Row's own fixes)\n   */\n  className?: string | undefined;\n  /** The children, laid out side by side in writing direction. */\n  children?: ReactNode;\n  ref?: Ref<HTMLElement> | undefined;\n\n  /** Not a prop. Row is horizontal; for a vertical layout use `<Stack>`. */\n  direction?: { \"Use <Stack> for a vertical layout\": never };\n  /** Not a prop. Ouro UI uses `gap`: `<Row gap=\"sm\">`. */\n  spacing?: { 'Use <Row gap=\"sm\">': never };\n  /** Not a prop. Ouro UI uses `align`: `<Row align=\"start\">`. */\n  alignItems?: { 'Use <Row align=\"start\">': never };\n  /** Not a prop. Ouro UI uses `justify`: `<Row justify=\"between\">`. */\n  justifyContent?: { 'Use <Row justify=\"between\">': never };\n  /** Not a prop. Ouro UI uses `wrap`: `<Row wrap>`. */\n  flexWrap?: { \"Use <Row wrap>\": never };\n}\n\n/** Props for {@link Row}: its own props and the HTML attributes it passes through. */\nexport type RowProps = Omit<HTMLAttributes<HTMLElement>, keyof RowOwnProps> & RowOwnProps;\n\nconst alignClasses = {\n  start: \"items-start\",\n  center: \"items-center\",\n  end: \"items-end\",\n  stretch: \"items-stretch\",\n  baseline: \"items-baseline\",\n} as const;\n\nconst stackBelowClasses = {\n  sm: \"max-sm:flex-col max-sm:items-stretch\",\n  md: \"max-md:flex-col max-md:items-stretch\",\n} as const;\n\n/**\n * Lays its children out side by side with an even gap, centered up and down. It is\n * layout only: it replaces the `flex items-center gap-2` an agent would otherwise write\n * by hand. `stackBelow=\"sm\"` stacks the children on a phone.\n *\n * Use `Stack` instead for a vertical layout, and `Item` for a row with media, a title, a\n * description and actions.\n *\n * @group Layout\n * @see https://ui.ouroboros.bot/docs/row\n *\n * @example\n * <Row justify=\"between\">\n *   <Heading level={2}>Recipes</Heading>\n *   <Button href=\"/recipes/new\">New recipe</Button>\n * </Row>\n * <Row gap=\"xs\" wrap>{tags.map((tag) => <Badge key={tag}>{tag}</Badge>)}</Row>\n */\nexport function Row(props: RowProps): JSX.Element {\n  const {\n    gap: gapProp,\n    align: alignProp,\n    justify: justifyProp,\n    wrap,\n    stackBelow: stackBelowProp,\n    as: asProp,\n    className,\n    children,\n    direction,\n    spacing,\n    alignItems,\n    justifyContent,\n    flexWrap,\n    ...rest\n  } = props;\n  const [gap, gapWarning] = checkGap(\"Row\", gapProp, \"sm\");\n  const [justify, justifyWarning] = checkJustify(\"Row\", justifyProp);\n  const [element, elementWarning] = checkElement(\"Row\", asProp);\n  const align = alignProp !== undefined && Object.hasOwn(alignClasses, alignProp) ? (alignProp as RowAlign) : \"center\";\n  const stackBelow = stackBelowProp !== undefined && Object.hasOwn(stackBelowClasses, stackBelowProp) ? (stackBelowProp as RowBreakpoint) : undefined;\n  useAppearanceClassNameCheck(\n    \"Row\",\n    className,\n    process.env.NODE_ENV !== \"production\" ? layoutHint(\"Row\") : /* istanbul ignore next @preserve -- production only */ \"\",\n    process.env.NODE_ENV !== \"production\" ? layoutAlignHint(\"Row\", \"justify\") : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  useDevWarnings(\n    \"Row\",\n    process.env.NODE_ENV !== \"production\"\n      ? () => [\n          gapWarning,\n          justifyWarning,\n          elementWarning,\n          ...checkFlexClassName(\"Row\", className, Object.keys(alignClasses)),\n          alignProp !== undefined &&\n            align !== alignProp && [\n              `align=\"${String(alignProp)}\" is not an alignment; use \"start\", \"center\", \"end\", \"stretch\", \"baseline\"`,\n              `<Row align=\"${alignWords[String(alignProp)] ?? \"center\"}\">`,\n            ],\n          stackBelowProp !== undefined &&\n            stackBelow !== stackBelowProp && [`stackBelow=\"${String(stackBelowProp)}\" is not a breakpoint; use \"sm\", \"md\"`, '<Row stackBelow=\"sm\">'],\n          direction !== undefined && [\n            \"direction is not a prop; Row is always horizontal\",\n            String(direction).startsWith(\"column\") ? \"<Stack>\" : \"<Row>\",\n          ],\n          spacing !== undefined && [\"spacing is not a prop\", '<Row gap=\"sm\">'],\n          alignItems !== undefined && [\"alignItems is not a prop\", `<Row align=\"${alignWords[String(alignItems)] ?? String(alignItems)}\">`],\n          justifyContent !== undefined && [\n            \"justifyContent is not a prop\",\n            `<Row justify=\"${alignWords[String(justifyContent)] ?? String(justifyContent)}\">`,\n          ],\n          flexWrap !== undefined && [\"flexWrap is not a prop\", \"<Row wrap>\"],\n        ]\n      : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  return createElement(\n    element,\n    {\n      ...rest,\n      \"data-ouro\": \"row\",\n      className: cn(\n        \"flex flex-row\",\n        elementReset,\n        gapClasses[gap],\n        alignClasses[align],\n        justifyClasses[justify],\n        wrap && \"flex-wrap\",\n        stackBelow && stackBelowClasses[stackBelow],\n        className,\n      ),\n    },\n    children,\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ouro/stack/row.tsx"
    }
  ],
  "docs": "Lays its children out side by side with an even gap, centered up and down. Import: import { Row } from \"@/components/ouro/stack/row\", with @/components replaced by your components alias (aliases.components in components.json, such as ~/components). Also installed: stack, 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/row.md Ouro UI v1.3.257.",
  "type": "registry:ui"
}