{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "tabs", "type": "registry:ui", "title": "Tabs", "files": [ { "path": "ui/tabs.tsrx", "type": "registry:ui", "target": "components/ui/tabs.tsrx", "content": "// Base UI base tabs — TRANSCRIBED from upstream's `bases/base-ui/ui/tabs.tsx` (maintainer-supplied),\n// class strings verbatim. Runs on @octanejs/base-ui's `Tabs`, which was ported for this family:\n// Root / List / Tab / Panel.\n//\n// ONE DEPARTURE FROM THE SOURCE, FORCED BY A VERSION SKEW. Upstream writes its orientation variants\n// as `data-horizontal:` / `data-vertical:` — bare attributes. The pinned @octanejs/base-ui (v1.6.0)\n// converts the orientation state to `data-orientation=\"horizontal\" | \"vertical\"` instead, so those\n// utilities would match nothing: the root would never switch to a column, and every\n// `group-data-horizontal/tabs:` and `group-data-vertical/tabs:` selector on the trigger would be\n// dead. They are written as `data-[orientation=…]:` here.\n//\n// This is the SAME skew the slider hit, and it is not a porting mistake in either layer — shadcn's\n// Base UI sources target a newer Base UI than the pin this package binds. The primitive stays\n// faithful to its pin; the adaptation belongs here. When the binding moves to a release that emits\n// the bare attributes, these revert to upstream's spelling.\n//\n// `data-active` on the trigger needs no such treatment: the pin emits it exactly as upstream's\n// classes expect (verified by rendering).\n//\n// Octane adaptations: no `\"use client\"`.\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Tabs as TabsPrimitive } from '@octanejs/base-ui/tabs';\n\nimport { cn } from '@/lib/utils';\n\ntype Props = { className?: string } & Record;\n\nexport interface TabsProps extends Props {\n\torientation?: 'horizontal' | 'vertical';\n}\n\nexport function Tabs({ className, orientation = 'horizontal', ...props }: TabsProps) @{\n\t\n}\n\nexport const tabsListVariants = cva(\n\t'group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-muted',\n\t\t\t\tline: 'gap-1 bg-transparent',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\nexport interface TabsListProps extends Props {\n\tvariant?: VariantProps['variant'];\n}\n\nexport function TabsList({ className, variant = 'default', ...props }: TabsListProps) @{\n\t\n}\n\nexport function TabsTrigger({ className, ...props }: Props) @{\n\t\n}\n\nexport function TabsContent({ className, ...props }: Props) @{\n\t\n}\n" } ], "dependencies": [ "@octanejs/base-ui@0.1.36", "class-variance-authority" ], "registryDependencies": [ "@octane/utils" ] }