{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "create-new-disclosure-base",
  "type": "registry:component",
  "title": "Create New Disclosure (base)",
  "description": "Theme-ready base variant of A stylish \"Create New\" disclosure component that expands from a pill-shaped button into a rich grid of actions..",
  "dependencies": [
    "@hugeicons/core-free-icons",
    "@hugeicons/react",
    "motion"
  ],
  "files": [
    {
      "path": "components/watermelon/create-new-disclosure.tsx",
      "type": "registry:component",
      "content": "'use client';\n\nimport { useState, type FC, type ReactNode } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n  Add01Icon,\n  Cancel01Icon,\n  Folder01Icon,\n  TaskEdit01Icon,\n  NoteIcon,\n  Award01Icon,\n  Flag02Icon,\n  Calendar04Icon,\n} from '@hugeicons/core-free-icons';\nimport { motion, AnimatePresence } from 'motion/react';\n\nexport interface DisclosureItem {\n  icon: ReactNode;\n  label: string;\n}\n\nexport interface CreateNewDisclosureProps {\n  items?: DisclosureItem[];\n  initialOpen?: boolean;\n}\n\ninterface GridItemProps {\n  icon: ReactNode;\n  label: string;\n}\n\nconst GridItem: FC<GridItemProps> = ({ icon, label }) => {\n  return (\n    <motion.button className=\"group flex flex-col items-center justify-center gap-1 sm:gap-2 rounded-xl px-1 py-3 sm:py-4 transition-all duration-200 hover:bg-accent/40\">\n      <div className=\"text-muted-foreground transition-colors group-hover:text-foreground [&>svg]:size-5 sm:[&>svg]:size-7\">\n        {icon}\n      </div>\n      <span className=\"text-[12px] sm:text-sm font-medium tracking-tight text-foreground\">\n        {label}\n      </span>\n    </motion.button>\n  );\n};\n\nexport const CreateNewDisclosure: FC<CreateNewDisclosureProps> = ({\n  items,\n  initialOpen = false,\n}) => {\n  const [open, setOpen] = useState<boolean>(initialOpen);\n\n  const defaultItems: DisclosureItem[] = [\n    {\n      icon: <HugeiconsIcon icon={Folder01Icon} strokeWidth={1.5} />,\n      label: 'Project',\n    },\n    {\n      icon: <HugeiconsIcon icon={TaskEdit01Icon} strokeWidth={1.5} />,\n      label: 'Task',\n    },\n    {\n      icon: <HugeiconsIcon icon={NoteIcon} strokeWidth={1.5} />,\n      label: 'Note',\n    },\n    {\n      icon: <HugeiconsIcon icon={Award01Icon} strokeWidth={1.5} />,\n      label: 'Goal',\n    },\n    {\n      icon: <HugeiconsIcon icon={Flag02Icon} strokeWidth={1.5} />,\n      label: 'Milestone',\n    },\n    {\n      icon: <HugeiconsIcon icon={Calendar04Icon} strokeWidth={1.5} />,\n      label: 'Reminder',\n    },\n  ];\n\n  const disclosureItems = items || defaultItems;\n\n  return (\n    <div\n      className=\"theme-injected bg-transparent text-foreground font-sans px-4 sm:px-0\"\n      style={{ fontFamily: 'var(--font-sans)' }}\n    >\n      <AnimatePresence mode=\"popLayout\" initial={false}>\n        {!open ? (\n          <motion.button\n            key=\"collapsed\"\n            layoutId=\"shared-container\"\n            onClick={() => setOpen(true)}\n            exit={{ opacity: 0, transition: { duration: 0.1 } }}\n            transition={{ type: 'spring', bounce: 0.1, duration: 0.4 }}\n            style={{\n              borderRadius:32,\n            }}\n            className=\"flex cursor-pointer items-center gap-2 border border-border bg-card px-6 py-3 sm:px-8 sm:py-4 text-base sm:text-lg font-medium whitespace-nowrap text-foreground shadow-sm\"\n          >\n            <motion.div layoutId=\"label\" className=\"flex items-center gap-2\">\n              <HugeiconsIcon\n                icon={Add01Icon}\n                size={24}\n                className=\"text-muted-foreground sm:size-[26px]\"\n                strokeWidth={1.5}\n              />\n              Create New\n            </motion.div>\n          </motion.button>\n        ) : (\n          <motion.div\n            key=\"expanded\"\n            layoutId=\"shared-container\"\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{\n              opacity: 0,\n              transition: { duration: 0.1 },\n            }}\n            style={{\n              borderRadius:32, \n            }}\n            transition={{ type: 'spring', bounce: 0.1, duration: 0.4 }}\n            className=\"h-full w-[calc(100vw-32px)] sm:w-96 rounded-2xl border border-border bg-muted/40 p-1\"\n          >\n            <div className=\"flex items-center justify-between px-4 py-3\">\n              <motion.p\n                layoutId=\"label\"\n                className=\"text-sm sm:text-base font-semibold text-foreground\"\n              >\n                Create New\n              </motion.p>\n              <motion.button\n                onClick={() => setOpen(false)}\n                whileTap={{ scale: 0.95 }}\n                className=\"flex h-6 w-6 cursor-pointer items-center justify-center rounded-full bg-secondary text-secondary-foreground\"\n              >\n                <HugeiconsIcon\n                  icon={Cancel01Icon}\n                  size={16}\n                  className=\"text-secondary-foreground\"\n                  strokeWidth={2.5}\n                />\n              </motion.button>\n            </div>\n\n            <div className=\"grid grid-cols-3 gap-1 rounded-4xl bg-card p-3 sm:p-4 shadow-sm\">\n              {disclosureItems.map((item, index) => (\n                <GridItem key={index} icon={item.icon} label={item.label} />\n              ))}\n            </div>\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </div>\n  );\n};\n"
    }
  ]
}
