{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tw-stack",
  "type": "registry:ui",
  "title": "react-tw/stack.tsx",
  "description": "Carbon `Stack` as a React + Tailwind component, the layout of `<ui-stack>`: its children in one Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [],
  "registryDependencies": [
    "@kanok-ui/core-stack",
    "@kanok-ui/tw-theme",
    "@kanok-ui/tw-utils"
  ],
  "files": [
    {
      "path": "src/react-tw/stack.tsx",
      "type": "registry:ui",
      "target": "components/ui/react-tw/stack.tsx",
      "content": "import type { ComponentProps, CSSProperties, ReactNode } from 'react';\nimport { stackGap } from '../core/stack.ts';\nimport { cn } from './lib/utils.ts';\n\nexport interface StackProps extends Omit<ComponentProps<'div'>, 'orientation' | 'gap' | 'className' | 'style' | 'children'> {\n    orientation?: 'vertical' | 'horizontal';\n    /** A Carbon spacing step 1–13 (e.g. `5` = 16px) or any CSS length (`'1.5rem'`). */\n    gap?: number | string;\n    className?: string;\n    style?: CSSProperties;\n    children?: ReactNode;\n}\n\n/**\n * Carbon `Stack` as a React + Tailwind component, the layout of `<ui-stack>`: its children in one\n * direction with one gap (`--ui-stack-gap`, which a zone can also set).\n */\nexport function Stack({ orientation = 'vertical', gap, className, style, children, ...rest }: Readonly<StackProps>) {\n    const value = stackGap(gap);\n    return (\n        <div {...rest}\n            style={value ? ({ '--ui-stack-gap': value, ...style } as CSSProperties) : style}\n            className={cn(orientation === 'horizontal' ? 'inline-grid grid-flow-col gap-x-[var(--ui-stack-gap,0)] gap-y-0' : 'grid grid-flow-row gap-y-[var(--ui-stack-gap,0)]', className)}\n        >\n            {children}\n        </div>\n    );\n}\n"
    }
  ]
}
