"use client" import { createContext, useContext, useId, type ComponentProps } from "react" import { Stepper as RegistryStepper, StepperNav as RegistryNav, StepperContent as RegistryContent, StepperTrigger as RegistryTrigger, useStepItem, type StepperProps, } from "@/components/reui/stepper" export { StepperItem, StepperIndicator, StepperSeparator, StepperTitle, StepperPanel } from "@/components/reui/stepper" // The registry Nav/Content do not forward HTML attributes. Keep its layout, // focus handling and styling; supply tab semantics in transparent wrappers. const Context = createContext<{ prefix: string; orientation: "horizontal" | "vertical" } | null>(null) function useScope() { const context = useContext(Context) if (!context) throw new Error("Шаги должны находиться внутри Stepper") return context } export function Stepper({ orientation = "horizontal", ...props }: StepperProps) { const prefix = useId() return } export function StepperNav({ children, className }: Pick, "children" | "className">) { const { orientation } = useScope() return
{children}
} export function StepperTrigger(props: ComponentProps) { const { prefix } = useScope() const { step } = useStepItem() return } export function StepperContent({ value, children, className }: Pick, "value" | "children" | "className">) { const { prefix } = useScope() return
{children}
}