{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "banner-09",
  "title": "Feature launch banner",
  "description": "A title, a short pitch and a button to try the feature.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/status-orb.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/banner/banner-09.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { RocketIcon, XIcon } from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { StatusOrb } from '@/registry/ndeko/ui/status-orb';\n\nconst COLLAPSE_TRANSITION: Transition = { duration: 0.2, ease: [0.2, 0, 0, 1] };\nconst DISMISS_TRANSITION: Transition = {\n  duration: 0.15,\n  ease: [0.2, 0, 0, 1],\n};\n\nconst COLLAPSE_VARIANTS: Variants = {\n  shown: { height: 'auto', opacity: 1 },\n  hidden: { height: 0, opacity: 0, transition: DISMISS_TRANSITION },\n};\n\nconst FADE_VARIANTS: Variants = {\n  shown: { opacity: 1 },\n  hidden: { opacity: 0, transition: DISMISS_TRANSITION },\n};\n\nfunction collapseVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return COLLAPSE_VARIANTS;\n}\n\nexport default function Banner09() {\n  const [isVisible, setIsVisible] = useState(true);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const collapseVariants = collapseVariantsOf(shouldReduceMotion);\n\n  function dismiss() {\n    setIsVisible(false);\n  }\n\n  return (\n    <AnimatePresence initial={false}>\n      {isVisible && (\n        <motion.div\n          key='banner'\n          className='bg-primary/[0.06] hairline-ring ring-primary/15 dark:bg-primary/10 @container w-full overflow-hidden rounded-xl'\n          variants={collapseVariants}\n          initial='hidden'\n          animate='shown'\n          exit='hidden'\n          transition={COLLAPSE_TRANSITION}\n        >\n          <div className='flex gap-2 px-4 py-3 @xl:items-center'>\n            <div className='flex grow gap-3 @xl:items-center'>\n              <StatusOrb\n                tone='brand'\n                glyph={<RocketIcon strokeWidth={2.25} />}\n                className='m-1'\n              />\n              <div className='flex grow flex-col justify-between gap-3 @xl:flex-row @xl:items-center'>\n                <div className='flex flex-col gap-0.5 text-[13px]'>\n                  <p className='font-medium'>Automations are here</p>\n                  <p className='text-muted-foreground'>\n                    Move tasks, notify people and close stale work on a\n                    schedule. Try it and tell us what you think.\n                  </p>\n                </div>\n                <div className='flex flex-wrap gap-2'>\n                  <Button size='sm'>Try automations</Button>\n                </div>\n              </div>\n            </div>\n            <Button\n              variant='ghost'\n              size='icon-sm'\n              className='-me-2 @xl:-my-0.5'\n              aria-label='Dismiss banner'\n              onClick={dismiss}\n            >\n              <XIcon className='opacity-60' />\n            </Button>\n          </div>\n        </motion.div>\n      )}\n    </AnimatePresence>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "components",
    "banner"
  ],
  "type": "registry:component"
}