"use client"; import * as React from "react"; import { Button } from "@/components/ui/button"; import { Tip } from "@/components/ui/tip"; import { DESIGN_SYSTEM_DOC_ARTICLE, DESIGN_SYSTEM_EXAMPLE_CANVAS, DESIGN_SYSTEM_EXAMPLE_INNER, DESIGN_SYSTEM_EXAMPLE_INNER_WIDE, designSystemPreviewIsWide, } from "@/lib/design-system/component-doc-shell"; import type { ComponentDocSpec } from "@/lib/design-system/component-doc-types"; import { DS_DOC_BODY, DS_DOC_CODE, DS_DOC_SECTION_TITLE, DS_DOC_SUBSECTION_TITLE, } from "@/lib/design-system/doc-typography"; import { cn } from "@/lib/utils"; export function DesignSystemDocArticle({ className, children, }: { className?: string; children: React.ReactNode; }) { return (
{children}
); } export function DesignSystemExampleCanvas({ children, wide = false, }: { children: React.ReactNode; /** Use full article width for HubTable / DataTable previews */ wide?: boolean; }) { return (
{children}
); } /** Live example blocks from a loaded `ComponentDocSpec` (no PREVIEW_SECTIONS registry). */ export function ComponentDocSpecSections({ spec, }: { spec: Pick; }) { const wideCanvas = designSystemPreviewIsWide(spec.slug); return (
{spec.sections.map((block) => (
{block.bare ? null : (

{block.title}

)} {block.description ? (

{block.description}

) : null} {block.children}
))}
); } function ImportPathRow({ label, path }: { label: string; path: string }) { const [copied, setCopied] = React.useState(false); const handleCopy = React.useCallback(async () => { try { await navigator.clipboard.writeText(path); setCopied(true); window.setTimeout(() => setCopied(false), 2000); } catch { setCopied(false); } }, [path]); return (
  • {label}
    {path}