{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "banner-tiers",
  "title": "Banner Tiers",
  "description": "A brutalist plan table whose featured column wears a blue banner on top.",
  "dependencies": [
    "lucide-react"
  ],
  "files": [
    {
      "path": "components/spectrumui/blocks/pricing/banner-tiers.tsx",
      "content": "'use client';\n\nimport { useState } from 'react';\nimport { Check } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { PriceFigure } from './price-figure';\nimport { REVEAL_KEYFRAMES, revealClass, revealDelay, useReveal } from './reveal';\nimport type { Plan } from './types';\n\nexport type BannerTiersVariant = 'Banner' | 'Badge';\n\nexport interface BannerTiersProps {\n  plans: Plan[];\n  eyebrow?: string;\n  heading: string;\n  variant?: BannerTiersVariant;\n  className?: string;\n}\n\nexport function BannerTiers({\n  plans,\n  eyebrow = 'Pricing',\n  heading,\n  variant = 'Banner',\n  className,\n}: BannerTiersProps) {\n  const [yearly, setYearly] = useState(true);\n  const { ref, shown } = useReveal<HTMLElement>();\n  const banner = variant === 'Banner';\n  const featuredIndex = Math.max(\n    0,\n    plans.findIndex((plan) => plan.featured),\n  );\n\n  return (\n    <section\n      ref={ref}\n      className={cn(\n        '@container w-full bg-white px-6 pb-10 pt-12 dark:bg-[#0c0c0e] sm:px-10',\n        className,\n      )}\n    >\n      <style dangerouslySetInnerHTML={{ __html: REVEAL_KEYFRAMES }} />\n\n      <div className={cn('flex flex-col items-center text-center', revealClass(shown))}>\n        <span className=\"flex items-center gap-2.5 border border-[#d4d4d8] px-3.5 py-2 dark:border-[#33333a]\">\n          <span aria-hidden className=\"size-2 bg-[#2337f0]\" />\n          <span className=\"font-mono text-[12px] font-medium uppercase tracking-[0.1em] text-[#18181b] dark:text-[#f4f4f5]\">\n            {eyebrow}\n          </span>\n        </span>\n        <h2 className=\"mt-7 max-w-[24ch] text-balance [font-family:var(--font-spectral,Georgia,serif)] text-[26px] font-normal leading-[1.08] tracking-[-0.6px] text-[#0a0a0a] dark:text-white @sm:text-[34px] @lg:text-[44px]\">\n          {heading}\n        </h2>\n\n        <div className=\"mt-8 flex items-center gap-3\">\n          <span\n            className={cn(\n              'text-[15px]',\n              yearly ? 'text-[#0a0a0a] dark:text-white' : 'text-[#71717a] dark:text-[#8f8f96]',\n            )}\n          >\n            Yearly\n          </span>\n          <button\n            type=\"button\"\n            role=\"switch\"\n            aria-checked={!yearly}\n            aria-label=\"Bill monthly\"\n            onClick={() => setYearly((value) => !value)}\n            className={cn(\n              'relative h-7 w-[74px] border border-[#c9c9cf] bg-white dark:border-[#3f3f46] dark:bg-[#1a1a1e]',\n              'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-[#2337f0] focus-visible:ring-offset-2',\n            )}\n          >\n            <span\n              aria-hidden\n              className={cn(\n                'absolute top-0.5 left-0.5 h-[22px] w-[33px] bg-[#2337f0]',\n                'transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none',\n                !yearly && 'translate-x-[35px]',\n              )}\n            />\n          </button>\n          <span\n            className={cn(\n              'text-[15px]',\n              !yearly ? 'text-[#0a0a0a] dark:text-white' : 'text-[#71717a] dark:text-[#8f8f96]',\n            )}\n          >\n            Monthly\n          </span>\n        </div>\n      </div>\n\n      <div className={cn('grid @3xl:grid-cols-3', banner ? 'mt-24' : 'mt-12')}>\n        {plans.map((plan, position) => {\n          const featured = plan.featured;\n          const amount = plan.price ? (yearly ? plan.price.annual : plan.price.monthly) : null;\n\n          return (\n            <div\n              key={plan.id}\n              style={revealDelay(shown, position)}\n              className={cn(\n                'relative flex flex-col border border-[#e4e4e7] dark:border-[#2b2b31]',\n                revealClass(shown),\n                'mt-14 first:mt-0 @3xl:mt-0',\n                position < featuredIndex && '@3xl:border-r-0',\n                position > featuredIndex && '@3xl:border-l-0',\n                featured && 'z-10 border-[#2337f0] dark:border-[#4356ff]',\n              )}\n            >\n              {featured && banner && (\n                <div className=\"absolute inset-x-[-1px] -top-12 flex h-12 items-center justify-center bg-[#2337f0] text-[19px] font-medium text-white dark:bg-[#4356ff]\">\n                  Most popular\n                </div>\n              )}\n\n              <div className=\"px-8 pb-8 pt-8\">\n                <div className=\"flex items-center justify-between gap-3\">\n                  <h3 className=\"text-[21px] font-semibold tracking-[-0.3px] text-[#0a0a0a] dark:text-white\">\n                    {plan.name}\n                  </h3>\n                  {featured && !banner && (\n                    <span className=\"bg-[#2337f0] px-2.5 py-1 font-mono text-[10.5px] font-medium uppercase tracking-[0.08em] text-white\">\n                      Most popular\n                    </span>\n                  )}\n                </div>\n                <p className=\"mt-2.5 min-h-[44px] text-pretty text-[14.5px] leading-[1.5] text-[#52525b] dark:text-[#a1a1a8]\">\n                  {plan.tagline}\n                </p>\n\n                <div className=\"mt-5 flex items-end gap-1.5\">\n                  {amount === null ? (\n                    <span className=\"text-[34px] font-semibold leading-none tracking-[-2px] text-[#0a0a0a] dark:text-white @sm:text-[42px] @lg:text-[48px]\">\n                      Custom\n                    </span>\n                  ) : (\n                    <>\n                      <PriceFigure\n                        value={amount}\n                        className=\"text-[34px] font-semibold tracking-[-2px] text-[#0a0a0a] dark:text-white @sm:text-[42px] @lg:text-[48px]\"\n                      />\n                      <span className=\"pb-1.5 text-[15px] text-[#71717a] dark:text-[#8f8f96]\">\n                        / mo\n                      </span>\n                    </>\n                  )}\n                </div>\n\n                <button\n                  type=\"button\"\n                  className={cn(\n                    'mt-6 h-[50px] w-full font-mono text-[14.5px]',\n                    'transition-[transform,background-color] duration-150 active:scale-[0.98]',\n                    'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-[#2337f0] focus-visible:ring-offset-2',\n                    featured\n                      ? 'bg-[#2337f0] text-white hover:bg-[#1b2cd1]'\n                      : 'bg-[#0a0a0a] text-white hover:bg-black dark:bg-[#f4f4f5] dark:text-[#0c0c0e] dark:hover:bg-white',\n                  )}\n                >\n                  {plan.cta}\n                </button>\n              </div>\n\n              <ul className=\"flex-1\">\n                {plan.features.map((feature) => (\n                  <li\n                    key={feature}\n                    className=\"flex items-center gap-3.5 border-t border-[#e4e4e7] px-8 py-[19px] dark:border-[#2b2b31]\"\n                  >\n                    <span\n                      aria-hidden\n                      className=\"grid size-[22px] shrink-0 place-items-center rounded-full border border-[#aeb6f8] dark:border-[#3c4494]\"\n                    >\n                      <Check\n                        className=\"size-3 text-[#2337f0] dark:text-[#93a0ff]\"\n                        strokeWidth={2.4}\n                      />\n                    </span>\n                    <span className=\"text-[15px] text-[#27272a] dark:text-[#d4d4da]\">\n                      {feature}\n                    </span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          );\n        })}\n      </div>\n    </section>\n  );\n}\n\nexport default BannerTiers;\n",
      "type": "registry:block",
      "target": "components/spectrumui/blocks/pricing/banner-tiers.tsx"
    },
    {
      "path": "components/spectrumui/blocks/pricing/price-figure.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/utils';\n\nconst DIGITS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n\nexport interface PriceFigureProps {\n  value: number;\n  currency?: string;\n  decimals?: number;\n  className?: string;\n}\n\nfunction Digit({ digit }: { digit: number }) {\n  return (\n    <span className=\"relative block h-[1em] w-[1ch] overflow-hidden\">\n      <span\n        className=\"absolute inset-x-0 top-0 flex flex-col transition-transform duration-[420ms] ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none\"\n        style={{ transform: `translateY(-${digit * 10}%)` }}\n      >\n        {DIGITS.map((d) => (\n          <span key={d} className=\"flex h-[1em] items-center justify-center leading-none\">\n            {d}\n          </span>\n        ))}\n      </span>\n    </span>\n  );\n}\n\nexport function PriceFigure({ value, currency = '$', decimals = 0, className }: PriceFigureProps) {\n  const negative = value < 0;\n  const body = Math.abs(value).toFixed(decimals);\n  const grouped = body.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n  const label = `${negative ? '−' : ''}${currency}${grouped}`;\n\n  return (\n    <span className={cn('inline-flex leading-none tabular-nums', className)}>\n      <span className=\"sr-only\">{label}</span>\n      <span aria-hidden className=\"inline-flex\">\n        {negative && <span className=\"flex h-[1em] items-center leading-none\">−</span>}\n        {currency && <span className=\"flex h-[1em] items-center leading-none\">{currency}</span>}\n        {grouped.split('').map((character, index) =>\n          /\\d/.test(character) ? (\n            <Digit key={`${index}-digit`} digit={Number(character)} />\n          ) : (\n            <span key={`${index}-${character}`} className=\"flex h-[1em] items-center leading-none\">\n              {character}\n            </span>\n          ),\n        )}\n      </span>\n    </span>\n  );\n}\n\nexport default PriceFigure;\n",
      "type": "registry:file",
      "target": "components/spectrumui/blocks/pricing/price-figure.tsx"
    },
    {
      "path": "components/spectrumui/blocks/pricing/types.ts",
      "content": "export type BillingPeriod = 'monthly' | 'annual';\n\nexport interface PlanPrice {\n  monthly: number;\n  annual: number;\n}\n\nexport interface Plan {\n  id: string;\n  name: string;\n  tagline: string;\n  price: PlanPrice | null;\n  unit?: string;\n  cta: string;\n  featured?: boolean;\n  badge?: string;\n  inherits?: string;\n  features: string[];\n  footnote?: string;\n}\n\nexport type FeatureValue = string | boolean;\n\nexport interface FeatureRow {\n  label: string;\n  hint?: string;\n  values: FeatureValue[];\n}\n\nexport interface FeatureGroup {\n  label: string;\n  rows: FeatureRow[];\n}\n\nexport interface RateTier {\n  from: number;\n  to?: number;\n  unitPrice: number;\n}\n\nexport interface MeteredProduct {\n  id: string;\n  name: string;\n  description?: string;\n  unit: string;\n  unitPlural: string;\n  included: number;\n  tiers: RateTier[];\n}\n\nexport interface CreditPack {\n  id: string;\n  name: string;\n  credits: number;\n  bonus: number;\n  price: number;\n  featured?: boolean;\n  note?: string;\n}\n\nexport interface CreditRate {\n  id: string;\n  label: string;\n  credits: number;\n  per: number;\n  unitLabel: string;\n}\n\nexport interface AddOn {\n  id: string;\n  name: string;\n  description: string;\n  price: number;\n  unit?: string;\n  perSeat?: boolean;\n  defaultOn?: boolean;\n}\n\nexport interface ModelRate {\n  id: string;\n  name: string;\n  context: string;\n  input: number;\n  output: number;\n  cacheWrite: number;\n  cacheRead: number;\n  badge?: string;\n}\n\nexport interface UsageDimension {\n  id: string;\n  label: string;\n  unit: string;\n  min: number;\n  max: number;\n  step: number;\n  defaultValue: number;\n}\n\nexport interface ComplianceItem {\n  id: string;\n  label: string;\n  detail: string;\n}\n\nexport interface RecommenderOption {\n  id: string;\n  label: string;\n  scores: Record<string, number>;\n  reason?: string;\n}\n\nexport interface RecommenderQuestion {\n  id: string;\n  label: string;\n  hint?: string;\n  options: RecommenderOption[];\n}\n\nexport interface PlanFamily {\n  id: string;\n  label: string;\n  description: string;\n  plans: Plan[];\n  footnote?: string;\n}\n",
      "type": "registry:file",
      "target": "components/spectrumui/blocks/pricing/types.ts"
    },
    {
      "path": "components/spectrumui/blocks/pricing/reveal.ts",
      "content": "'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nexport const REVEAL_KEYFRAMES = `\n@keyframes su-reveal { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }\n@keyframes su-draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }\n@keyframes su-sheen { 0%, 62% { transform: translateX(-110%) } 100% { transform: translateX(110%) } }\n`;\n\nexport function useReveal<T extends HTMLElement>() {\n  const ref = useRef<T>(null);\n  const [shown, setShown] = useState(false);\n\n  useEffect(() => {\n    const node = ref.current;\n    if (!node) return;\n    if (typeof IntersectionObserver === 'undefined') {\n      const frame = requestAnimationFrame(() => setShown(true));\n      return () => cancelAnimationFrame(frame);\n    }\n    const observer = new IntersectionObserver(\n      (entries) => {\n        if (entries.some((entry) => entry.isIntersecting)) {\n          setShown(true);\n          observer.disconnect();\n        }\n      },\n      { threshold: 0.18, rootMargin: '0px 0px -8% 0px' },\n    );\n    observer.observe(node);\n    return () => observer.disconnect();\n  }, []);\n\n  return { ref, shown };\n}\n\nexport function revealClass(shown: boolean) {\n  return shown\n    ? '[animation:su-reveal_480ms_cubic-bezier(0.23,1,0.32,1)_both] motion-reduce:animate-none'\n    : '';\n}\n\nexport function revealDelay(shown: boolean, index: number) {\n  return shown ? { animationDelay: `${index * 70}ms` } : undefined;\n}\n",
      "type": "registry:file",
      "target": "components/spectrumui/blocks/pricing/reveal.ts"
    }
  ],
  "type": "registry:block"
}
