{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "combobox",
  "title": "Combobox",
  "description": "An input that filters a list as you type: one value, many as chips, or a button whose list has its own search. The list grows out of the field and moves to the height of what still matches, while one highlight glides between the rows.",
  "dependencies": [
    "@ui-sdk/react"
  ],
  "registryDependencies": [
    "https://kinoui.com/r/scroll.json",
    "https://kinoui.com/r/popup.json",
    "https://kinoui.com/r/list-rows.json",
    "https://kinoui.com/r/button.json",
    "https://kinoui.com/r/cut.json",
    "https://kinoui.com/r/input.json",
    "https://kinoui.com/r/label.json",
    "https://kinoui.com/r/filter-list.json",
    "https://kinoui.com/r/chip.json",
    "https://kinoui.com/r/flow.json",
    "https://kinoui.com/r/refs.json",
    "https://kinoui.com/r/field-control.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/combobox.tsx",
      "content": "'use client'\n\nimport { buttonVariants } from '@/registry/components/kino/button'\nimport {\n  fieldClearClassName,\n  focusControl,\n  InputInvalidIcon,\n  inputBoxClassName,\n} from '@/registry/components/kino/input'\nimport { labelClassName } from '@/registry/components/kino/label'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\nimport {\n  ChipRemoveIcon,\n  chipClassName,\n  chipLeavingClassName,\n  chipRemoveClassName,\n} from '@/registry/lib/chip'\nimport { CutTooltip } from '@/registry/lib/cut'\nimport { useFieldProps } from '@/registry/lib/field-control'\nimport {\n  FilterListBody,\n  FilterListChevron,\n  FilterListClearIcon,\n  FilterListInputGroup,\n  FilterListRows,\n  FilterListValue,\n  filterListButtonClassName,\n  filterListContentClassName,\n  filterListGroupLabelClassName,\n  filterListInputClassName,\n  filterListItemClassName,\n  filterListMatchClassName,\n  filterListNoticeClassName,\n  filterListScrollerClassName,\n  filterListSeparatorClassName,\n  filterListValueTriggerClassName,\n} from '@/registry/lib/filter-list'\nimport { useFlow } from '@/registry/lib/flow'\nimport {\n  listIndicatorClassName,\n  menuIndicatorSlot,\n  MenuTick,\n} from '@/registry/lib/list-rows'\nimport { POPUP_COLLISION_PADDING, usePopupPresentation } from '@/registry/lib/popup'\nimport { markMounted, mergeRefs } from '@/registry/lib/refs'\nimport { useEdgeFades } from '@/registry/lib/scroll'\nimport {\n  Combobox as ComboboxPrimitive,\n  ComboboxChip as ComboboxChipPrimitive,\n  ComboboxChipRemove as ComboboxChipRemovePrimitive,\n  ComboboxChips as ComboboxChipsPrimitive,\n  ComboboxClear as ComboboxClearPrimitive,\n  ComboboxContent as ComboboxContentPrimitive,\n  ComboboxCreate as ComboboxCreatePrimitive,\n  ComboboxEmpty as ComboboxEmptyPrimitive,\n  ComboboxGroup as ComboboxGroupPrimitive,\n  ComboboxGroupLabel as ComboboxGroupLabelPrimitive,\n  ComboboxInput as ComboboxInputPrimitive,\n  ComboboxItem as ComboboxItemPrimitive,\n  ComboboxItemIcon as ComboboxItemIconPrimitive,\n  ComboboxItemIndicator as ComboboxItemIndicatorPrimitive,\n  ComboboxItemText as ComboboxItemTextPrimitive,\n  ComboboxLabel as ComboboxLabelPrimitive,\n  ComboboxList as ComboboxListPrimitive,\n  type ComboboxProps,\n  ComboboxSeparator as ComboboxSeparatorPrimitive,\n  ComboboxStatus as ComboboxStatusPrimitive,\n  ComboboxTrigger as ComboboxTriggerPrimitive,\n  ComboboxValue as ComboboxValuePrimitive,\n  ComboboxValueIcon as ComboboxValueIconPrimitive,\n} from '@ui-sdk/react/combobox'\nimport { Field as FieldPrimitive } from '@ui-sdk/react/field'\nimport {\n  type ComponentProps,\n  createContext,\n  type ReactNode,\n  use,\n  useEffect,\n  useId,\n  useMemo,\n  useRef,\n  useState,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * ui-sdk's Combobox, with the look the lists with an input share\n * (`registry/lib/filter-list`). The box grows out of the field, and as you\n * type it moves to the height of what still matches, on `layout`. The rows\n * swap in place, and one highlight glides to the row ui-sdk highlights.\n */\n\ntype ComboboxContextValue = {\n  /** Where the motion preference is read, for `presentation='auto'`. */\n  setControl: (element: HTMLElement | null) => void\n  /** A trigger with the value inside, when the input sits in the popup. */\n  button: HTMLElement | null\n  setButton: (element: HTMLElement | null) => void\n  /** The field's box, which the list opens under and is as wide as. */\n  group: HTMLElement | null\n  setGroup: (element: HTMLElement | null) => void\n  /** Where focus goes back to as a list with its search inside closes: its trigger, or what it opens from. */\n  setReturnTo: (element: HTMLElement | null) => void\n  /** Whether the input sits in the popup, as the list's search. */\n  setSearchInPopup: (inPopup: boolean) => void\n}\n\nconst ComboboxContext = createContext<ComboboxContextValue | null>(null)\n\n/** Whether a part sits in the popup, where an input is the list's search. */\nconst InPopupContext = createContext(false)\n\n/**\n * The root. As you type, the first match is highlighted, so Enter picks it;\n * pass `autoHighlight={false}` to leave the highlight to the arrow keys.\n * With `presentation='auto'`, a small touch screen opens the list as a\n * sheet, unless motion is reduced (`popupPresentation`). With the value in\n * its trigger (`ComboboxTrigger` with children), the input sits at the top\n * of the list: it opens empty with focus in it, and focus goes back to the\n * trigger when the list has closed.\n */\nfunction Combobox<Value = string, Multiple extends boolean | undefined = false>(\n  props: ComboboxProps<Value, Multiple>,\n) {\n  const [shown, setControl] = usePopupPresentation(props.presentation ?? 'popover')\n  const [button, setButton] = useState<HTMLElement | null>(null)\n  const [group, setGroup] = useState<HTMLElement | null>(null)\n  const [searchInPopup, setSearchInPopup] = useState(false)\n  const returnTo = useRef<HTMLElement | null>(null)\n  const [setReturnTo] = useState(() => (element: HTMLElement | null) => {\n    returnTo.current = element\n  })\n  const [ownQuery, setOwnQuery] = useState(props.defaultQuery ?? '')\n  const context = useMemo(\n    () => ({\n      setControl,\n      button,\n      setButton,\n      group,\n      setGroup,\n      setReturnTo,\n      setSearchInPopup,\n    }),\n    [setControl, button, group, setReturnTo],\n  )\n  return (\n    <ComboboxContext value={context}>\n      <ComboboxPrimitive<Value, Multiple>\n        // With the value on a trigger, as a select, the picked row is highlighted as it opens.\n        autoHighlight={button ? 'selected' : true}\n        {...props}\n        presentation={shown}\n        // Held here, so a search in the popup starts from nothing each time it opens.\n        query={props.query ?? ownQuery}\n        defaultQuery={undefined}\n        onQueryChange={(next, details) => {\n          setOwnQuery(next)\n          props.onQueryChange?.(next, details)\n        }}\n        onOpenChange={(open, details) => {\n          props.onOpenChange?.(open, details)\n          if (details.canceled) return\n          if (open) {\n            if (searchInPopup) setOwnQuery('')\n            // ui-sdk hands focus back, as it closes, to what had it as it\n            // opened: the button it opens from, even when a press opened it.\n            button?.focus({ preventScroll: true })\n            return\n          }\n          if (!searchInPopup) return\n          // Back where it opened from as it closes, unless focus went on\n          // somewhere else, such as where the callback sent it. Once the\n          // pick has rendered, so the button reads the new value as focus lands.\n          queueMicrotask(() => {\n            const left = document.activeElement\n            if (left === document.body || left?.closest('[data-filter-list-content]'))\n              returnTo.current?.focus({ preventScroll: true })\n          })\n        }}\n      />\n    </ComboboxContext>\n  )\n}\n\nfunction ComboboxLabel({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxLabelPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return <ComboboxLabelPrimitive className={cn(labelClassName, className)} {...props} />\n}\n\n/**\n * The field: the input and the buttons beside it, in the box every text\n * control has. The list opens under it and is as wide as it.\n */\nfunction ComboboxInputGroup({\n  ref,\n  ...props\n}: ComponentProps<typeof FilterListInputGroup>) {\n  const context = use(ComboboxContext)\n  const refs = useMemo(() => mergeRefs(ref, context?.setGroup), [ref, context])\n  return <FilterListInputGroup ref={refs} data-combobox-input-group='' {...props} />\n}\n\n/**\n * The text you type. In a field or among chips it fills the room left; in\n * the list's box, with the value in the trigger, it is the box's search line,\n * named by its `aria-label`, since the trigger is the Field's control then.\n */\nfunction ComboboxInput({\n  className,\n  ref,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxInputPrimitive>, 'className'> & {\n  className?: string\n}) {\n  const context = use(ComboboxContext)\n  const inPopup = use(InPopupContext)\n  const refs = useMemo(() => mergeRefs(ref, context?.setControl), [ref, context])\n  const setSearchInPopup = context?.setSearchInPopup\n  useEffect(() => {\n    if (inPopup) setSearchInPopup?.(true)\n  }, [inPopup, setSearchInPopup])\n  const input = (\n    <ComboboxInputPrimitive\n      ref={refs}\n      className={cn(\n        filterListInputClassName,\n        // Among chips: a chip's height, beside the last chip, and never\n        // narrower than a short word; a longer placeholder ends in an ellipsis.\n        'in-data-[slot=combobox-chips]:h-(--control-height-xs) in-data-[slot=combobox-chips]:min-w-28 in-data-[slot=combobox-chips]:text-ellipsis in-data-[slot=combobox-chips]:px-1.5',\n        // Among chips it glides on `layout` to where a chip that came or went\n        // leaves it (`followFlow`), from where it was seen.\n        'in-data-[slot=combobox-chips]:[transition:translate_var(--motion-layout-duration)_var(--motion-layout-easing)] data-[flow=start]:transition-none motion-reduce:transition-none',\n        className,\n      )}\n      // In the popup, it takes focus as the popup opens, so what you type after a press lands in it.\n      // oxlint-disable-next-line jsx-a11y/no-autofocus -- it mounts only as its popup opens, never with the page.\n      autoFocus={inPopup || undefined}\n      {...props}\n    />\n  )\n  // In the popup it is the list's search, a field of its own: the Field\n  // around the combobox names its trigger.\n  if (context?.button)\n    return <FieldPrimitive className='contents'>{input}</FieldPrimitive>\n  return input\n}\n\n/** Empties the value; it shows only while there is one. */\nfunction ComboboxClear({\n  className,\n  children,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxClearPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxClearPrimitive\n      data-field-clear=''\n      aria-label='Clear'\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'icon-xs' }),\n        filterListButtonClassName,\n        fieldClearClassName,\n        className,\n      )}\n      {...props}\n    >\n      {children ?? <FilterListClearIcon />}\n    </ComboboxClearPrimitive>\n  )\n}\n\n/**\n * Opens the list. In a field it is the chevron at its end. On its own, with\n * the value inside (`ComboboxValue`), the list's search sits at the list's\n * top: it looks like a select and is the Field's control, or, with\n * `render`, it is that element with its children, such as a button inside\n * another control's box.\n */\nfunction ComboboxTrigger({\n  className,\n  children,\n  ref,\n  render,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxTriggerPrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  const context = use(ComboboxContext)\n  const withValue = children !== undefined\n  const refs = useMemo(\n    () => mergeRefs(ref, context?.setControl, withValue ? context?.setButton : undefined),\n    [ref, context, withValue],\n  )\n  if (!withValue) {\n    return (\n      <ComboboxTriggerPrimitive\n        ref={refs}\n        aria-label='Show options'\n        className={cn(\n          buttonVariants({ variant: 'ghost', size: 'icon-xs' }),\n          filterListButtonClassName,\n          className,\n        )}\n        render={render}\n        {...props}\n      >\n        <FilterListChevron />\n      </ComboboxTriggerPrimitive>\n    )\n  }\n  if (render) {\n    return (\n      <ComboboxTriggerPrimitive\n        ref={refs}\n        className={className}\n        render={render}\n        {...props}\n      >\n        {children}\n      </ComboboxTriggerPrimitive>\n    )\n  }\n  return (\n    <ComboboxValueTrigger ref={refs} className={className} {...props}>\n      {children}\n    </ComboboxValueTrigger>\n  )\n}\n\n/** A trigger with the value in it, as a select's: the Field's control, so its label names it and a press on the label opens it. */\nfunction ComboboxValueTrigger({\n  className,\n  children,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxTriggerPrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  const valueId = useId()\n  const { props: own } = useFieldProps(props)\n  const labelledBy = own['aria-labelledby']\n  return (\n    <CutTooltip\n      render={\n        <ComboboxTriggerPrimitive\n          className={cn(filterListValueTriggerClassName, className)}\n          {...own}\n          // Named by its label and the value it shows, as a select is.\n          aria-labelledby={labelledBy ? `${labelledBy} ${valueId}` : undefined}\n        >\n          <FilterListValue id={valueId}>{children}</FilterListValue>\n        </ComboboxTriggerPrimitive>\n      }\n    />\n  )\n}\n\n/**\n * The picked value, as a function of `{ value, label, labels }`, or the\n * labels joined. Inside a trigger, the placeholder shows while nothing is\n * picked: `{(state) => state.label || 'Pick a country'}`.\n */\nconst ComboboxValue = ComboboxValuePrimitive\n\n/** The picked row's icon, beside the value in a trigger. */\nfunction ComboboxValueIcon(props: ComponentProps<typeof ComboboxValueIconPrimitive>) {\n  return <ComboboxValueIconPrimitive {...props} />\n}\n\n/** What moves among the chips: the chips and the input after them. */\nconst flowItems = '[data-slot=combobox-chip], [data-slot=combobox-input]'\n\n/**\n * The picked values, as chips, with the input after the last one: the field\n * of a combobox that takes many. Render each value as a `ComboboxChip` in a\n * `ComboboxValue`. A chip that comes or goes moves the others to their new\n * places, across lines too, and the field grows or shrinks a line at a time,\n * on `layout`; a chip that goes fades where it was.\n */\nfunction ComboboxChips({\n  className,\n  children,\n  ref,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxChipsPrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  const refs = useMemo(() => mergeRefs(markMounted, ref), [ref])\n  return (\n    <ComboboxChipsPrimitive\n      ref={refs}\n      onPointerDown={focusControl}\n      className={cn(\n        inputBoxClassName,\n        // It wraps, so its corner is capped.\n        'group/chips min-h-(--control-height) cursor-text rounded-(--control-radius-capped)',\n        className,\n      )}\n      {...props}\n    >\n      <ChipsFlow>{children}</ChipsFlow>\n      <InputInvalidIcon className='pe-1' />\n    </ComboboxChipsPrimitive>\n  )\n}\n\n/*\n * The frame moves to the row's height as it wraps, and the row's chips flow.\n * A component of its own, so the effect has its elements on the first render.\n */\nfunction ChipsFlow({ children }: { children: ReactNode }) {\n  const { frame, row } = useFlow<HTMLDivElement, HTMLDivElement>(flowItems)\n  return (\n    <div\n      ref={frame}\n      className='min-w-0 flex-1 self-stretch overflow-clip transition-[height] duration-(--motion-layout-duration) ease-(--motion-layout-easing) motion-reduce:transition-none'\n    >\n      <div\n        ref={row}\n        data-combobox-chips-row=''\n        // A chip sits the same distance from every edge of the box as from\n        // the next chip, at every density.\n        className='relative isolate flex min-h-[calc(var(--control-height)-2px)] flex-wrap items-center gap-1 p-[calc((var(--control-height)-var(--control-height-xs)-2px)/2)]'\n      >\n        {children}\n      </div>\n    </div>\n  )\n}\n\n/**\n * A picked value, with its remove button, \"Remove\" and its label. Arrow keys\n * reach it from the input; Backspace or Delete removes it. It scales in when\n * picked. Without children, it shows the value's label.\n */\nfunction ComboboxChip<Value = string>({\n  className,\n  children,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxChipPrimitive<Value>>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  return (\n    <CutTooltip\n      render={\n        <ComboboxChipPrimitive<Value>\n          className={cn(\n            chipClassName,\n            // Above the input, whose caret and placeholder glide behind the chips.\n            'z-1 ps-2 data-disabled:pe-2 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-hidden forced-colors:focus-visible:outline-2 forced-colors:focus-visible:outline-solid',\n            // It scales in on `enter` once the field has painted, glides to a new\n            // place on `layout` (`followFlow`), and its copy fades and shrinks\n            // where it was on `exit`. A chip pointed out (`data-flash`), such as\n            // one typed again, inverts for a moment on `press`.\n            '[transition:opacity_var(--motion-enter-duration)_var(--motion-enter-easing),scale_var(--motion-enter-duration)_var(--motion-enter-easing),translate_var(--motion-layout-duration)_var(--motion-layout-easing),color_var(--motion-press-duration)_var(--motion-press-fade-easing),background-color_var(--motion-press-duration)_var(--motion-press-fade-easing),box-shadow_var(--motion-press-duration)_var(--motion-press-fade-easing)] group-data-mounted/chips:starting:opacity-0 motion-safe:group-data-mounted/chips:starting:scale-95',\n            'data-[flow=start]:[transition:opacity_var(--motion-enter-duration)_var(--motion-enter-easing),scale_var(--motion-enter-duration)_var(--motion-enter-easing),color_var(--motion-press-duration)_var(--motion-press-fade-easing),background-color_var(--motion-press-duration)_var(--motion-press-fade-easing),box-shadow_var(--motion-press-duration)_var(--motion-press-fade-easing)] motion-reduce:[transition:opacity_var(--motion-enter-duration)_var(--motion-enter-easing),color_var(--motion-press-duration)_var(--motion-press-fade-easing),background-color_var(--motion-press-duration)_var(--motion-press-fade-easing),box-shadow_var(--motion-press-duration)_var(--motion-press-fade-easing)]',\n            chipLeavingClassName,\n            'data-flash:bg-foreground data-flash:text-background forced-colors:data-flash:outline-2 forced-colors:data-flash:outline-offset-1',\n            className,\n          )}\n          {...props}\n        >\n          {(state) => (\n            <>\n              <span data-cut className='min-w-0 truncate'>\n                {children ?? state.label}\n              </span>\n              <ComboboxChipRemovePrimitive\n                aria-label={`Remove ${state.label}`}\n                className={cn(\n                  chipRemoveClassName,\n                  'in-data-flash:text-background data-disabled:hidden',\n                )}\n              >\n                <ChipRemoveIcon />\n              </ComboboxChipRemovePrimitive>\n            </>\n          )}\n        </ComboboxChipPrimitive>\n      }\n    />\n  )\n}\n\n/**\n * The rows, with the highlight that glides between them: rows and groups of\n * your own, or a function of `{ items }`, the items that still match, when\n * the combobox takes `items`. It scrolls once it is taller than the box allows.\n */\nfunction ComboboxList({\n  className,\n  children,\n  ref,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxListPrimitive>, 'className'> & {\n  className?: string\n}) {\n  const fades = useEdgeFades<HTMLDivElement>()\n  const refs = useMemo(() => mergeRefs(ref, fades), [ref, fades])\n  return (\n    <ComboboxListPrimitive ref={refs} className={filterListScrollerClassName} {...props}>\n      {(state) => (\n        <FilterListRows className={className}>\n          {typeof children === 'function' ? children(state) : children}\n        </FilterListRows>\n      )}\n    </ComboboxListPrimitive>\n  )\n}\n\n/**\n * A row: the menus' own, with the tick first, as on the Select. Its text is\n * what the input shows once picked, or `label` where it holds more than\n * text; put it in a `ComboboxItemText` to mark what matched.\n */\nfunction ComboboxItem<Value = string>({\n  className,\n  children,\n  indicator = true,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxItemPrimitive<Value>>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n  /** Whether the row keeps room for the tick of a picked value. Off for a list that never shows one. */\n  indicator?: boolean\n}) {\n  return (\n    <ComboboxItemPrimitive<Value>\n      data-menu-row=''\n      className={cn(filterListItemClassName, className)}\n      {...props}\n    >\n      {indicator ? (\n        <span data-menu-indicator='' className={menuIndicatorSlot}>\n          <ComboboxItemIndicatorPrimitive keepMounted className={listIndicatorClassName}>\n            <MenuTick />\n          </ComboboxItemIndicatorPrimitive>\n        </span>\n      ) : null}\n      {children}\n    </ComboboxItemPrimitive>\n  )\n}\n\n/** A row's text, with the part that matched what was typed in bold. */\nfunction ComboboxItemText({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxItemTextPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxItemTextPrimitive\n      className={cn(filterListMatchClassName, className)}\n      {...props}\n    />\n  )\n}\n\n/** A row's icon, before its text. */\nfunction ComboboxItemIcon({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxItemIconPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxItemIconPrimitive\n      className={cn(\n        \"flex shrink-0 items-center [&_svg:not([class*='text-'])]:text-muted-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\n/**\n * The row that adds what was typed, while no row's label matches it\n * exactly: \"Create\" and the text, or your own words. `onCreate` saves it;\n * picking it doesn't change the value by itself.\n */\nfunction ComboboxCreate({\n  className,\n  children,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxCreatePrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode | ((state: { query: string; pending: boolean }) => ReactNode)\n}) {\n  return (\n    <ComboboxCreatePrimitive\n      data-menu-row=''\n      className={cn(\n        filterListItemClassName,\n        'data-pending:text-muted-foreground',\n        className,\n      )}\n      {...props}\n    >\n      {(state) => (\n        <>\n          <span data-menu-indicator='' className={menuIndicatorSlot}>\n            <CreateRowIcon />\n          </span>\n          <span className='min-w-0'>\n            {typeof children === 'function'\n              ? children(state)\n              : (children ?? `Create “${state.query}”`)}\n          </span>\n        </>\n      )}\n    </ComboboxCreatePrimitive>\n  )\n}\n\nfunction CreateRowIcon() {\n  return (\n    <IconPlaceholder\n      lucide='PlusIcon'\n      tabler='IconPlus'\n      hugeicons='PlusSignIcon'\n      phosphor='PlusIcon'\n      remixicon='RiAddLine'\n      aria-hidden\n    />\n  )\n}\n\nfunction ComboboxGroup(props: ComponentProps<typeof ComboboxGroupPrimitive>) {\n  return <ComboboxGroupPrimitive {...props} />\n}\n\nfunction ComboboxGroupLabel({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxGroupLabelPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxGroupLabelPrimitive\n      className={cn(filterListGroupLabelClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction ComboboxSeparator({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxSeparatorPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxSeparatorPrimitive\n      className={cn(filterListSeparatorClassName, className)}\n      {...props}\n    />\n  )\n}\n\n/** What shows when nothing matches, announced as it appears: say what was looked for. */\nfunction ComboboxEmpty({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxEmptyPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxEmptyPrimitive\n      className={cn(filterListNoticeClassName, className)}\n      {...props}\n    />\n  )\n}\n\n/** Announces a search that is running, or how many results it found. */\nfunction ComboboxStatus({\n  className,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxStatusPrimitive>, 'className'> & {\n  className?: string\n}) {\n  return (\n    <ComboboxStatusPrimitive\n      className={cn(filterListNoticeClassName, className)}\n      {...props}\n    />\n  )\n}\n\n/**\n * The box, under the field, the chips or the trigger. `className` goes on\n * the box's content; every other prop goes to ui-sdk's content.\n */\nfunction ComboboxContent({\n  className,\n  children,\n  side = 'bottom',\n  align = 'start',\n  sideOffset = 6,\n  anchor,\n  ...props\n}: Omit<ComponentProps<typeof ComboboxContentPrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  const context = use(ComboboxContext)\n  const opener = anchor ?? context?.group ?? context?.button ?? null\n  useEffect(() => {\n    context?.setReturnTo(\n      context.button ?? (anchor instanceof HTMLElement ? anchor : null),\n    )\n  })\n  return (\n    <ComboboxContentPrimitive\n      data-filter-list-content=''\n      side={side}\n      align={align}\n      sideOffset={sideOffset}\n      collisionPadding={POPUP_COLLISION_PADDING}\n      arrowPadding={0}\n      anchor={opener ?? undefined}\n      className={filterListContentClassName}\n      {...props}\n    >\n      {({ presentation }) => (\n        <FilterListBody presentation={presentation} className={className}>\n          <InPopupContext value>{children}</InPopupContext>\n        </FilterListBody>\n      )}\n    </ComboboxContentPrimitive>\n  )\n}\n\nexport {\n  Combobox,\n  ComboboxChip,\n  ComboboxChips,\n  ComboboxClear,\n  ComboboxContent,\n  ComboboxCreate,\n  ComboboxEmpty,\n  ComboboxGroup,\n  ComboboxGroupLabel,\n  ComboboxInput,\n  ComboboxInputGroup,\n  ComboboxItem,\n  ComboboxItemIcon,\n  ComboboxItemText,\n  ComboboxLabel,\n  ComboboxList,\n  ComboboxSeparator,\n  ComboboxStatus,\n  ComboboxTrigger,\n  ComboboxValue,\n  ComboboxValueIcon,\n}\n",
      "type": "registry:component",
      "target": "@components/kino/combobox.tsx"
    }
  ],
  "type": "registry:component"
}