{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"emoji-picker","type":"registry:ui","title":"Emoji Picker","description":"A searchable emoji picker with categories and a preview of the emoji you're on.","dependencies":["@untitledui/icons@^0.0.23","frimousse@^0.4.0"],"files":[{"path":"components/ui/emoji-picker.tsx","type":"registry:ui","content":"\"use client\";\n\nimport { SearchMd } from \"@untitledui/icons\";\nimport {\n  EmojiPicker as EmojiPickerPrimitive,\n  type EmojiPickerListCategoryHeaderProps,\n  type EmojiPickerListEmojiProps,\n  type EmojiPickerListRowProps,\n} from \"frimousse\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nfunction EmojiPicker({ className, ...props }: React.ComponentProps<typeof EmojiPickerPrimitive.Root>) {\n  return (\n    <EmojiPickerPrimitive.Root\n      data-slot=\"emoji-picker\"\n      className={cn(\"isolate flex h-80 w-[19rem] flex-col overflow-hidden\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction EmojiPickerSearch({\n  className,\n  placeholder = \"Search emoji…\",\n  ...props\n}: React.ComponentProps<typeof EmojiPickerPrimitive.Search>) {\n  return (\n    <div data-slot=\"emoji-picker-search\" className={cn(\"flex items-center gap-2 border-b px-3\", className)}>\n      <SearchMd className=\"text-muted-foreground size-4 shrink-0\" />\n      <EmojiPickerPrimitive.Search\n        placeholder={placeholder}\n        className=\"placeholder:text-muted-foreground h-10 w-full bg-transparent text-sm outline-none\"\n        {...props}\n      />\n    </div>\n  );\n}\n\nfunction EmojiPickerRow({ children, ...props }: EmojiPickerListRowProps) {\n  return (\n    <div {...props} className=\"scroll-my-1.5 px-1.5\">\n      {children}\n    </div>\n  );\n}\n\nfunction EmojiPickerEmoji({ emoji, className, ...props }: EmojiPickerListEmojiProps) {\n  return (\n    <button\n      {...props}\n      className={cn(\n        \"flex size-8 items-center justify-center rounded-md text-lg outline-none data-active:bg-accent\",\n        className,\n      )}\n    >\n      {emoji.emoji}\n    </button>\n  );\n}\n\nfunction EmojiPickerCategoryHeader({ category, ...props }: EmojiPickerListCategoryHeaderProps) {\n  return (\n    <div {...props} className=\"frosted eyebrow text-muted-foreground px-3 pt-3 pb-1.5 text-xs\">\n      {category.label}\n    </div>\n  );\n}\n\nfunction EmojiPickerContent({\n  loadingLabel = \"Loading emoji…\",\n  emptyLabel = \"No emoji found.\",\n  className,\n  ...props\n}: React.ComponentProps<typeof EmojiPickerPrimitive.Viewport> & { loadingLabel?: string; emptyLabel?: string }) {\n  return (\n    <EmojiPickerPrimitive.Viewport\n      data-slot=\"emoji-picker-viewport\"\n      className={cn(\"relative flex-1 outline-none\", className)}\n      {...props}\n    >\n      <EmojiPickerPrimitive.Loading className=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm\">\n        {loadingLabel}\n      </EmojiPickerPrimitive.Loading>\n      <EmojiPickerPrimitive.Empty className=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm\">\n        {emptyLabel}\n      </EmojiPickerPrimitive.Empty>\n      <EmojiPickerPrimitive.List\n        className=\"pb-1.5 select-none\"\n        components={{ Row: EmojiPickerRow, Emoji: EmojiPickerEmoji, CategoryHeader: EmojiPickerCategoryHeader }}\n      />\n    </EmojiPickerPrimitive.Viewport>\n  );\n}\n\nfunction EmojiPickerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"emoji-picker-footer\"\n      className={cn(\"flex h-11 w-full min-w-0 items-center gap-2 border-t px-3\", className)}\n      {...props}\n    >\n      <EmojiPickerPrimitive.ActiveEmoji>\n        {({ emoji }) =>\n          emoji ? (\n            <>\n              <span className=\"text-xl\">{emoji.emoji}</span>\n              <span className=\"text-muted-foreground truncate text-xs\">{emoji.label}</span>\n            </>\n          ) : (\n            <span className=\"text-muted-foreground truncate text-xs\">Pick an emoji…</span>\n          )\n        }\n      </EmojiPickerPrimitive.ActiveEmoji>\n    </div>\n  );\n}\n\nexport { EmojiPicker, EmojiPickerContent, EmojiPickerFooter, EmojiPickerSearch };\n"}],"css":{"@utility eyebrow":{"font-size":"11px","font-weight":"600","letter-spacing":"0.05em","text-transform":"uppercase"},"@utility frosted":{"background-color":"color-mix(in oklab, var(--popover) 65%, transparent)","backdrop-filter":"blur(20px) saturate(1.6)"}}}