{ "name": "action-search-bar", "type": "registry:component", "dependencies": [ "lucide-react", "motion" ], "registryDependencies": [ "input" ], "files": [ { "type": "registry:component", "content": "\"use client\";\n\n/**\n * @author: @kokonutui\n * @description: A modern search bar component with action buttons and suggestions\n * @version: 1.0.0\n * @date: 2025-06-26\n * @license: MIT\n * @website: https://kokonutui.com\n * @github: https://github.com/kokonut-labs/kokonutui\n */\n\nimport {\n AudioLines,\n BarChart2,\n LayoutGrid,\n PlaneTakeoff,\n Search,\n Send,\n Video,\n} from \"lucide-react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Input } from \"@/components/ui/input\";\nimport useDebounce from \"@/hooks/use-debounce\";\n\ninterface Action {\n id: string;\n label: string;\n icon: React.ReactNode;\n description?: string;\n short?: string;\n end?: string;\n}\n\ninterface SearchResult {\n actions: Action[];\n}\n\nconst ANIMATION_VARIANTS = {\n container: {\n hidden: { opacity: 0, height: 0 },\n show: {\n opacity: 1,\n height: \"auto\",\n transition: {\n height: { duration: 0.4 },\n staggerChildren: 0.1,\n },\n },\n exit: {\n opacity: 0,\n height: 0,\n transition: {\n height: { duration: 0.3 },\n opacity: { duration: 0.2 },\n },\n },\n },\n item: {\n hidden: { opacity: 0, y: 20 },\n show: {\n opacity: 1,\n y: 0,\n transition: { duration: 0.3 },\n },\n exit: {\n opacity: 0,\n y: -10,\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nconst allActionsSample = [\n {\n id: \"1\",\n label: \"Book tickets\",\n icon: ,\n description: \"Operator\",\n short: \"⌘K\",\n end: \"Agent\",\n },\n {\n id: \"2\",\n label: \"Summarize\",\n icon: ,\n description: \"gpt-5\",\n short: \"⌘cmd+p\",\n end: \"Command\",\n },\n {\n id: \"3\",\n label: \"Screen Studio\",\n icon: