{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "vertical-tabs",
  "title": "Tabs",
  "author": "AlgorizeTech",
  "description": "Ask the user to pick one of 8 vertical tabs variants: https://avaraui.com/view/vertical-tabs. This item holds 8 of them as looks of one component (default, soft, segmented, underline, minimal, bordered, elevated, glass). Skip the question if the user already named one. A tab panel whose rail runs across the top or down the side, with GSAP transitions between panels. Use it for settings and documentation sections with long content.",
  "dependencies": [],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "src/components/custom/blocks/VerticalTabs.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport React, {\n  useEffect,\n  useId,\n  useLayoutEffect,\n  useRef,\n  useState,\n} from \"react\";\nimport { getThemeStyles } from \"./vertical-tabs-theme\";\n\n// ==========================================\n// DYNAMIC THEME ENGINE\n// ==========================================\nexport type TabsColor =\n  | \"indigo\"\n  | \"rose\"\n  | \"emerald\"\n  | \"zinc\"\n  | \"purple\"\n  | string;\nexport type TabsVariant =\n  | \"default\"\n  | \"glass\"\n  | \"minimal\"\n  | \"bordered\"\n  | \"underline\"\n  | \"segmented\"\n  | \"soft\"\n  | \"elevated\";\n/** Which way the tab rail runs — above the content, or beside it. */\nexport type TabsOrientation = \"horizontal\" | \"vertical\";\n\n// ==========================================\n// COMPONENT INTERFACES\n// ==========================================\nexport interface TabItem {\n  id: string;\n  label: string;\n  icon?: React.ElementType;\n  content: React.ReactNode;\n}\n\nexport interface VerticalTabsProps {\n  tabs: TabItem[];\n  color?: TabsColor;\n  variant?: TabsVariant;\n  orientation?: TabsOrientation;\n  defaultActiveId?: string;\n  className?: string;\n}\n\n/** Layout reads must land before paint, but useLayoutEffect warns on the server. */\nconst useIsoLayoutEffect =\n  typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nconst prefersReducedMotion = () =>\n  typeof window !== \"undefined\" &&\n  window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n\n/** GSAP's power3.out, sampled into a CSS `linear()` curve. */\nconst EASE_POWER3_OUT =\n  \"linear(0, .0963, .1855, .2679, .3439, .4138, .478, .5367, .5904, .6392, .6836, .7237, .7599, .7924, .8215, .8474, .8704, .8907, .9085, .924, .9375, .9491, .959, .9674, .9744, .9802, .985, .9888, .9919, .9943, .9961, .9974, .9984, .9991, .9995, .9998, .9999, 1, 1, 1, 1)\";\n/** GSAP's power1.out, exact. */\nconst EASE_POWER1_OUT = \"cubic-bezier(0.3333, 0.6667, 0.6667, 1)\";\n\n/** Box of the active tab inside the rail, in the rail's own coordinates. */\ntype Rect = { x: number; y: number; w: number; h: number };\n\nexport function VerticalTabs({\n  tabs,\n  color = \"primary\",\n  variant = \"default\",\n  orientation = \"horizontal\",\n  defaultActiveId,\n  className,\n}: VerticalTabsProps) {\n  const [activeId, setActiveId] = useState<string>(\n    defaultActiveId || tabs[0]?.id || \"\",\n  );\n  const contentRef = useRef<HTMLDivElement>(null);\n  const railRef = useRef<HTMLDivElement>(null);\n  const indicatorRef = useRef<HTMLSpanElement>(null);\n  const tabRefs = useRef<Record<string, HTMLButtonElement | null>>({});\n  const baseId = useId();\n\n  const { theme, style } = getThemeStyles(color);\n  const isHorizontal = orientation === \"horizontal\";\n\n  const activeIndex = Math.max(\n    0,\n    tabs.findIndex((t) => t.id === activeId),\n  );\n  const activeTab = tabs[activeIndex] || tabs[0];\n\n  const tabId = (id: string) => `${baseId}-tab-${id}`;\n  const panelId = (id: string) => `${baseId}-panel-${id}`;\n\n  const getVariantStyles = () =>\n    ({\n      default: {\n        container: \"gap-6\",\n        menuBox:\n          \"bg-card rounded-2xl p-3 border border-border shadow-sm\",\n        contentBox:\n          \"bg-card rounded-2xl p-8 md:p-10 border border-border shadow-sm\",\n        activeTab: cn(theme.bg, theme.shadow),\n        inactiveTab: \"hover:bg-muted text-muted-foreground\",\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n      glass: {\n        container: \"gap-6\",\n        menuBox:\n          \"bg-card/70 backdrop-blur-xl rounded-2xl p-3 border border-white/40 dark:border-white/10 shadow-xl\",\n        contentBox:\n          \"bg-card/70 backdrop-blur-xl rounded-2xl p-6 md:p-10 border border-white/40 dark:border-white/10 shadow-xl\",\n        activeTab: cn(\"backdrop-blur-md\", theme.bg, theme.shadow),\n        inactiveTab: \"hover:bg-foreground/[0.06] text-foreground\",\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n      minimal: {\n        container: \"gap-8\",\n        menuBox: \"bg-transparent p-0 border-none\",\n        contentBox: \"bg-transparent p-0 border-none\",\n        activeTab: cn(\"rounded-xl\", theme.bg, theme.shadow),\n        inactiveTab: \"hover:bg-muted rounded-xl text-muted-foreground\",\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n      bordered: {\n        container:\n          \"gap-0 rounded-2xl border border-border overflow-hidden bg-card shadow-sm\",\n        // The divider follows the rail: it separates rail from pane, so it sits\n        // on the bottom edge when the rail runs across the top.\n        menuBox: cn(\n          \"bg-muted p-4 border-border rounded-none\",\n          isHorizontal ? \"border-b\" : \"border-r\",\n        ),\n        contentBox: \"p-8 md:p-10 bg-transparent rounded-none border-none\",\n        // No shadow here on purpose. This is the contained, quiet variant —\n        // the pill already sits inside a card, and depth on depth reads busy.\n        activeTab: cn(\"rounded-xl\", theme.bg),\n        inactiveTab: \"hover:bg-muted/50 text-muted-foreground rounded-xl\",\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n      // The classic browser-and-editor tab set. Nothing is filled in; a single\n      // bar travels between tabs, which is the whole identity of the variant.\n      underline: {\n        container: \"gap-0\",\n        menuBox: cn(\n          \"bg-transparent p-0 rounded-none border-border gap-0\",\n          isHorizontal ? \"border-b\" : \"md:w-60 lg:w-64\",\n        ),\n        contentBox: cn(\n          \"bg-transparent rounded-none border-none px-0\",\n          isHorizontal ? \"pt-8\" : \"pt-6 md:pt-1 md:pl-10\",\n        ),\n        activeTab: cn(\"bg-transparent rounded-none\", theme.text),\n        inactiveTab:\n          \"bg-transparent rounded-none text-muted-foreground hover:text-foreground\",\n        tabExtra: \"\",\n        indicator: cn(\"rounded-full\", theme.bar),\n        indicatorMode: \"bar\" as null | \"fill\" | \"bar\",\n      },\n      // iOS-style segmented control: one recessed track with a single raised\n      // surface sliding between segments. Its radius is the track's radius\n      // minus the track's padding (16px − 6px), so the two curves stay\n      // concentric instead of merely both being round.\n      segmented: {\n        container: \"gap-6\",\n        menuBox:\n          \"bg-muted rounded-2xl p-1.5 border border-border gap-1\",\n        contentBox: \"bg-transparent rounded-2xl p-6 md:p-8 border border-border\",\n        activeTab: cn(\"bg-transparent\", theme.text),\n        inactiveTab:\n          \"bg-transparent text-muted-foreground hover:text-foreground\",\n        tabExtra: isHorizontal ? \"grow\" : \"\",\n        indicator: cn(\n          \"rounded-[10px] bg-card shadow-sm ring-1\",\n          theme.ring,\n        ),\n        indicatorMode: \"fill\" as null | \"fill\" | \"bar\",\n      },\n      // The quietest way to say \"selected\": the accent tinted back to a wash,\n      // with the label kept in the accent rather than painted over it.\n      soft: {\n        container: \"gap-6\",\n        menuBox: \"bg-transparent p-0 border-none gap-2\",\n        contentBox:\n          \"bg-muted/40 rounded-3xl p-6 md:p-10 border border-border/60\",\n        activeTab: cn(\"rounded-full\", theme.soft),\n        inactiveTab:\n          \"rounded-full text-muted-foreground hover:bg-muted hover:text-foreground\",\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n      // Every tab is its own card, so the selection cannot be one travelling\n      // shape — the active card takes the accent where it stands. Hovering an\n      // inactive card tints its border toward the accent rather than floating\n      // it, which says \"reachable\" without making the whole rail bob.\n      elevated: {\n        container: \"gap-6\",\n        menuBox: \"bg-transparent p-0 border-none gap-2.5\",\n        contentBox:\n          \"bg-card rounded-2xl p-8 md:p-10 border border-border shadow-[0_18px_40px_-24px_rgba(0,0,0,0.45)]\",\n        activeTab: cn(\n          \"rounded-2xl border border-transparent\",\n          theme.bg,\n          theme.shadow,\n        ),\n        inactiveTab: cn(\n          \"rounded-2xl border border-border bg-card text-muted-foreground shadow-sm hover:text-foreground\",\n          theme.hoverBorder,\n        ),\n        tabExtra: \"\",\n        indicator: \"\",\n        indicatorMode: null as null | \"fill\" | \"bar\",\n      },\n    })[variant];\n\n  const styles = getVariantStyles();\n  const indicatorMode = styles.indicatorMode;\n\n  // ---- The travelling indicator -------------------------------------------\n  // Measured rather than animated per-button, so the shape moves between tabs\n  // instead of one fading out while another fades in. Until the first measure\n  // lands there is simply no indicator: both variants that use one keep their\n  // active label in the accent colour, so the selection is never invisible.\n  const [rect, setRect] = useState<Rect | null>(null);\n\n  const measure = () => {\n    if (!indicatorMode) return;\n    const el = tabRefs.current[activeId];\n    if (!el || !railRef.current) return;\n    setRect({\n      x: el.offsetLeft,\n      y: el.offsetTop,\n      w: el.offsetWidth,\n      h: el.offsetHeight,\n    });\n  };\n\n  useIsoLayoutEffect(() => {\n    measure();\n  }, [activeId, indicatorMode, orientation, variant, tabs.length]);\n\n  useEffect(() => {\n    if (!indicatorMode || !railRef.current) return;\n    const observer = new ResizeObserver(() => measure());\n    observer.observe(railRef.current);\n    for (const el of Object.values(tabRefs.current)) if (el) observer.observe(el);\n    return () => observer.disconnect();\n  }, [activeId, indicatorMode, orientation, variant]);\n\n  // Geometry per mode: the bar rides the edge facing the content pane, the\n  // fill matches the tab it belongs to.\n  const geometry = (r: Rect) => {\n    if (indicatorMode === \"bar\") {\n      return isHorizontal\n        ? { left: r.x + 12, top: r.y + r.h - 3, width: r.w - 24, height: 3 }\n        : { left: r.x, top: r.y + 6, width: 3, height: r.h - 12 };\n    }\n    return { left: r.x, top: r.y, width: r.w, height: r.h };\n  };\n\n  // The element last placed — a fresh indicator (the variant switched away\n  // and back) is placed, not animated, like the first one.\n  const placed = useRef<HTMLSpanElement | null>(null);\n  useIsoLayoutEffect(() => {\n    const el = indicatorRef.current;\n    if (!el || !rect) return;\n    const target = geometry(rect);\n    // The first placement is not a movement, so it is not animated — nothing\n    // in this block moves on load, only in answer to a click or a keypress.\n    const animate = placed.current === el && !prefersReducedMotion();\n    el.style.transition = animate\n      ? [\"left\", \"top\", \"width\", \"height\"]\n          .map((property) => `${property} 0.34s ${EASE_POWER3_OUT}`)\n          .join(\", \")\n      : \"none\";\n    el.style.left = `${target.left}px`;\n    el.style.top = `${target.top}px`;\n    el.style.width = `${target.width}px`;\n    el.style.height = `${target.height}px`;\n    el.style.opacity = \"1\";\n    placed.current = el;\n  }, [rect, isHorizontal, indicatorMode]);\n\n  // ---- The panel transition ------------------------------------------------\n  // Enters from the side you moved toward, so the animation reports the move\n  // rather than decorating it.\n  const prevIndex = useRef(activeIndex);\n  const mounted = useRef(false);\n  const panelAnimation = useRef<Animation | null>(null);\n  useEffect(() => {\n    const el = contentRef.current;\n    const direction = Math.sign(activeIndex - prevIndex.current) || 1;\n    prevIndex.current = activeIndex;\n    if (!el) return;\n    if (!mounted.current) {\n      mounted.current = true;\n      return;\n    }\n    panelAnimation.current?.cancel();\n    if (prefersReducedMotion()) {\n      panelAnimation.current = el.animate([{ opacity: 0 }, { opacity: 1 }], {\n        duration: 200,\n        easing: EASE_POWER1_OUT,\n      });\n      return;\n    }\n    const from = isHorizontal\n      ? { x: direction * 18, y: 0 }\n      : { x: 0, y: direction * 14 };\n    panelAnimation.current = el.animate(\n      [\n        { opacity: 0, transform: `translate(${from.x}px, ${from.y}px)` },\n        { opacity: 1, transform: \"translate(0px, 0px)\" },\n      ],\n      { duration: 340, easing: EASE_POWER3_OUT },\n    );\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [activeId]);\n\n  // ---- Keyboard ------------------------------------------------------------\n  // Arrow keys along the rail's own axis, Home/End to the ends. Selection\n  // follows focus, which is the expected behaviour when every panel is\n  // already rendered and switching costs nothing.\n  const onKeyDown = (event: React.KeyboardEvent) => {\n    const [next, previous] = isHorizontal\n      ? [\"ArrowRight\", \"ArrowLeft\"]\n      : [\"ArrowDown\", \"ArrowUp\"];\n    let index = -1;\n    if (event.key === next) index = (activeIndex + 1) % tabs.length;\n    else if (event.key === previous)\n      index = (activeIndex - 1 + tabs.length) % tabs.length;\n    else if (event.key === \"Home\") index = 0;\n    else if (event.key === \"End\") index = tabs.length - 1;\n    if (index < 0) return;\n    event.preventDefault();\n    setActiveId(tabs[index].id);\n    tabRefs.current[tabs[index].id]?.focus();\n  };\n\n  if (!tabs || tabs.length === 0) return null;\n\n  return (\n    <div\n      className={cn(\n        \"w-full flex\",\n        // Vertical only splits into two columns once there is room for both;\n        // horizontal is always stacked, rail over pane.\n        isHorizontal ? \"flex-col\" : \"flex-col md:flex-row\",\n        styles.container,\n        className,\n      )}\n      style={style}\n    >\n      {/* Tab Rail */}\n      <div\n        ref={railRef}\n        role=\"tablist\"\n        aria-orientation={orientation}\n        onKeyDown={onKeyDown}\n        className={cn(\n          // `relative` makes the rail the offset parent the indicator is\n          // measured against, and keeps it scrolling with the tabs.\n          \"relative w-full shrink-0 flex gap-1.5\",\n          isHorizontal\n            ? // Tabs keep their natural width and scroll sideways rather than\n              // squashing, so a long set stays readable. Scrollbar hidden\n              // inline so the block stays copy-paste standalone.\n              //\n              // The scroll is declared as an arbitrary property rather than\n              // the `overflow-x-auto` utility on purpose: docs sites (this one\n              // included) routinely style `.overflow-x-auto` globally as the\n              // markdown table wrapper — `display: block !important` — which\n              // silently collapses this flex row into a stack.\n              \"flex-row [overflow-x:auto] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\"\n            : \"md:w-64 lg:w-72 flex-col\",\n          styles.menuBox,\n        )}\n      >\n        {indicatorMode && rect && (\n          <span\n            aria-hidden\n            ref={indicatorRef}\n            className={cn(\n              \"absolute left-0 top-0 opacity-0 pointer-events-none\",\n              styles.indicator,\n            )}\n          />\n        )}\n\n        {tabs.map((tab) => {\n          const isActive = activeId === tab.id;\n          const Icon = tab.icon;\n\n          return (\n            <button\n              key={tab.id}\n              id={tabId(tab.id)}\n              role=\"tab\"\n              type=\"button\"\n              aria-selected={isActive}\n              aria-controls={panelId(tab.id)}\n              tabIndex={isActive ? 0 : -1}\n              ref={(node) => {\n                tabRefs.current[tab.id] = node;\n              }}\n              onClick={() => setActiveId(tab.id)}\n              className={cn(\n                \"relative flex items-center gap-3.5 px-4 py-3.5 rounded-xl text-sm transition-all duration-200 cursor-pointer active:scale-[0.98]\",\n                // Weight carries the state alongside colour, so the active tab\n                // still reads as active to anyone who cannot separate the two.\n                isActive ? \"font-semibold\" : \"font-medium\",\n                \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n                theme.focus,\n                isHorizontal\n                  ? \"shrink-0 justify-center\"\n                  : \"w-full justify-start\",\n                isActive ? styles.activeTab : styles.inactiveTab,\n                styles.tabExtra,\n              )}\n            >\n              {Icon && (\n                <Icon\n                  className={cn(\n                    \"w-5 h-5 shrink-0\",\n                    isActive ? \"opacity-100\" : \"opacity-70\",\n                  )}\n                  strokeWidth={isActive ? 2.5 : 2}\n                />\n              )}\n              <span className=\"text-base tracking-tight\">{tab.label}</span>\n            </button>\n          );\n        })}\n      </div>\n\n      {/* Content Area */}\n      <div\n        role=\"tabpanel\"\n        id={panelId(activeTab.id)}\n        aria-labelledby={tabId(activeTab.id)}\n        tabIndex={0}\n        className={cn(\n          \"flex-1 overflow-hidden min-h-[300px]\",\n          \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n          theme.focus,\n          styles.contentBox,\n        )}\n      >\n        <div ref={contentRef} className=\"w-full h-full flex flex-col\">\n          <div className=\"flex items-center gap-3 mb-6\">\n            {activeTab.icon && (\n              <activeTab.icon\n                className=\"w-7 h-7 text-foreground opacity-80\"\n                strokeWidth={2.5}\n              />\n            )}\n            <h2 className=\"text-2xl md:text-3xl font-semibold text-foreground tracking-tight\">\n              {activeTab.label}\n            </h2>\n          </div>\n\n          <div className=\"text-muted-foreground text-lg leading-relaxed flex-1\">\n            {activeTab.content}\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/custom/blocks/VerticalTabs.tsx"
    },
    {
      "path": "src/components/custom/blocks/vertical-tabs-theme.ts",
      "content": "\"use client\";\n\nimport React from \"react\";\n\nconst colorThemes: Record<string, Record<string, string>> = {\n  primary: {\n    bg: \"bg-primary text-primary-foreground\",\n    text: \"text-primary\",\n    border: \"border-primary/30\",\n    dot: \"bg-primary-foreground\",\n    soft: \"bg-primary/10 text-primary dark:bg-primary/20\",\n    bar: \"bg-primary\",\n    ring: \"ring-primary/25\",\n    shadow: \"shadow-lg shadow-primary/25\",\n    focus: \"focus-visible:outline-primary\",\n    hoverBorder: \"hover:border-primary/40\",\n  },\n  indigo: {\n    bg: \"bg-indigo-600 text-white\",\n    text: \"text-indigo-600 dark:text-indigo-400\",\n    border: \"border-indigo-600\",\n    dot: \"bg-white\",\n    soft: \"bg-indigo-600/10 text-indigo-700 dark:bg-indigo-400/15 dark:text-indigo-300\",\n    bar: \"bg-indigo-600 dark:bg-indigo-400\",\n    ring: \"ring-indigo-600/25 dark:ring-indigo-400/25\",\n    shadow: \"shadow-lg shadow-indigo-600/30\",\n    focus: \"focus-visible:outline-indigo-500\",\n    hoverBorder: \"hover:border-indigo-600/40 dark:hover:border-indigo-400/40\",\n  },\n  rose: {\n    bg: \"bg-rose-600 text-white\",\n    text: \"text-rose-600 dark:text-rose-400\",\n    border: \"border-rose-600\",\n    dot: \"bg-white\",\n    soft: \"bg-rose-600/10 text-rose-700 dark:bg-rose-400/15 dark:text-rose-300\",\n    bar: \"bg-rose-600 dark:bg-rose-400\",\n    ring: \"ring-rose-600/25 dark:ring-rose-400/25\",\n    shadow: \"shadow-lg shadow-rose-600/30\",\n    focus: \"focus-visible:outline-rose-500\",\n    hoverBorder: \"hover:border-rose-600/40 dark:hover:border-rose-400/40\",\n  },\n  emerald: {\n    bg: \"bg-emerald-600 text-white\",\n    text: \"text-emerald-600 dark:text-emerald-400\",\n    border: \"border-emerald-600\",\n    dot: \"bg-white\",\n    soft: \"bg-emerald-600/10 text-emerald-700 dark:bg-emerald-400/15 dark:text-emerald-300\",\n    bar: \"bg-emerald-600 dark:bg-emerald-400\",\n    ring: \"ring-emerald-600/25 dark:ring-emerald-400/25\",\n    shadow: \"shadow-lg shadow-emerald-600/30\",\n    focus: \"focus-visible:outline-emerald-500\",\n    hoverBorder: \"hover:border-emerald-600/40 dark:hover:border-emerald-400/40\",\n  },\n  purple: {\n    bg: \"bg-[#8B5CF6] text-white\",\n    text: \"text-[#8B5CF6] dark:text-[#A78BFA]\",\n    border: \"border-[#8B5CF6]\",\n    dot: \"bg-white\",\n    soft: \"bg-[#8B5CF6]/10 text-[#7C3AED] dark:bg-[#A78BFA]/15 dark:text-[#A78BFA]\",\n    bar: \"bg-[#8B5CF6] dark:bg-[#A78BFA]\",\n    ring: \"ring-[#8B5CF6]/25\",\n    shadow: \"shadow-lg shadow-[#8B5CF6]/30\",\n    focus: \"focus-visible:outline-[#8B5CF6]\",\n    hoverBorder: \"hover:border-[#8B5CF6]/40 dark:hover:border-[#A78BFA]/40\",\n  },\n  zinc: {\n    bg: \"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900\",\n    text: \"text-zinc-900 dark:text-zinc-100\",\n    border: \"border-zinc-900 dark:border-zinc-100\",\n    dot: \"bg-white dark:bg-zinc-900\",\n    soft: \"bg-zinc-900/10 text-zinc-900 dark:bg-zinc-100/15 dark:text-zinc-100\",\n    bar: \"bg-zinc-900 dark:bg-zinc-100\",\n    ring: \"ring-zinc-900/20 dark:ring-zinc-100/20\",\n    shadow: \"shadow-lg shadow-zinc-900/20 dark:shadow-black/50\",\n    focus: \"focus-visible:outline-zinc-900 dark:focus-visible:outline-zinc-100\",\n    hoverBorder: \"hover:border-zinc-900/40 dark:hover:border-zinc-100/40\",\n  },\n};\n\nconst hexToRgb = (hex: string) => {\n  let cleanHex = hex.replace(/^#/, \"\");\n  if (cleanHex.length === 3)\n    cleanHex = cleanHex\n      .split(\"\")\n      .map((x) => x + x)\n      .join(\"\");\n  const result = /^([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(cleanHex);\n  return result\n    ? `${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}`\n    : \"139, 92, 246\";\n};\n\nconst relLuminance = (rgb: string) => {\n  const [r, g, b] = rgb.split(\",\").map((n) => {\n    const v = Number(n.trim()) / 255;\n    return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n  });\n  return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nexport const getThemeStyles = (color: string) => {\n  if (color && color.startsWith(\"#\")) {\n    const rgb = hexToRgb(color);\n    return {\n      theme: {\n        bg: \"bg-[var(--theme-color)] text-[var(--theme-on-color)]\",\n        text: \"text-[var(--theme-color)]\",\n        border: \"border-[var(--theme-color)]\",\n        dot: \"bg-[var(--theme-on-color)]\",\n        // The soft roles blend the accent into whatever sits behind it, so one\n        // hex reads correctly on both the light and the dark canvas.\n        soft: \"bg-[rgba(var(--theme-color-rgb),0.14)] text-[var(--theme-color)]\",\n        bar: \"bg-[var(--theme-color)]\",\n        ring: \"ring-[rgba(var(--theme-color-rgb),0.28)]\",\n        shadow:\n          \"shadow-[0_10px_24px_-8px_rgba(var(--theme-color-rgb),0.55)]\",\n        focus: \"focus-visible:outline-[var(--theme-color)]\",\n        hoverBorder:\n          \"hover:border-[rgba(var(--theme-color-rgb),0.45)]\",\n      },\n      style: {\n        \"--theme-color\": color,\n        \"--theme-on-color\": relLuminance(rgb) > 0.45 ? \"#09090b\" : \"#ffffff\",\n        \"--theme-color-rgb\": rgb,\n      } as React.CSSProperties,\n    };\n  }\n  return { theme: colorThemes[color] || colorThemes.primary, style: {} };\n};\n",
      "type": "registry:component",
      "target": "components/custom/blocks/vertical-tabs-theme.ts"
    }
  ],
  "docs": "Named exports: VerticalTabs, getThemeStyles (from vertical-tabs-theme.ts, which installs alongside). `tabs` take { id, label, icon?, content }. `orientation` defaults to horizontal and switches to vertical without changing the API. Variants: default | glass | minimal | bordered | underline | segmented | soft | elevated — every one renders in both orientations. Ships full tablist semantics: arrow keys along the rail, Home/End, and a focus ring drawn in your accent. `underline` and `segmented` move a single measured indicator between tabs; motion is skipped under prefers-reduced-motion.",
  "categories": [
    "navigation",
    "layout"
  ],
  "type": "registry:component"
}
