/** * Public API (stable, exported from `components/index.ts`): * Combobox, ComboboxInput, ComboboxBadgeTrigger, ComboboxContent, ComboboxList, ComboboxItem, * ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, * ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, * ComboboxAnchor, ComboboxClear, useComboboxAnchor — plus CoreCombobox* aliases. */ import * as React from "react"; import { Popover as PopoverPrimitive } from "radix-ui"; import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@/components/ui/command"; import { InputGroupButton, InputGroupInput } from "@/components/ui/input-group"; type ComboboxProps = Omit, "children"> & { value?: string | string[]; defaultValue?: string | string[]; onValueChange?: (value: string | string[]) => void; items?: readonly unknown[]; multiple?: boolean; disabled?: boolean; /** Placeholder for the filter field inside the dropdown (shadcn-style). */ searchPlaceholder?: string; children?: React.ReactNode; /** * When true, logs combobox state in dev only (`console.debug` when `import.meta.env.DEV`). * No effect in production builds. */ debug?: boolean; }; declare function Combobox({ value: valueProp, defaultValue, onValueChange, items, multiple, disabled, searchPlaceholder, open: openProp, defaultOpen, onOpenChange, modal, debug, children, ...popoverProps }: ComboboxProps): import("react/jsx-runtime").JSX.Element; /** * Wraps any custom control row (e.g. `ComboboxValue` + `ComboboxTrigger`) so `ComboboxContent` receives a * Radix popover anchor — same role as the inner wrapper of `ComboboxInput` / `ComboboxBadgeTrigger`. * Without this, `setOpen(true)` runs but the panel has no `--radix-popover-trigger-width` / position reference. * * Also forwards clicks on the anchor surface to `setOpen(true)` (bubble), so `flex gap-*` dead zones * between children still open the list — unlike `ComboboxBadgeTrigger`, custom rows often split value + button. */ declare const ComboboxAnchor: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; type ComboboxValueProps = React.ComponentProps<"span"> & { /** Shown when the combobox has no value (same role as `SelectValue` placeholder). */ placeholder?: string; }; declare function ComboboxValue({ className, placeholder, onClick, ...props }: ComboboxValueProps): import("react/jsx-runtime").JSX.Element; type ComboboxTriggerProps = React.ComponentProps<"button"> & { /** * When true in single-select mode, the trigger shows the resolved item label (or `fallbackLabel` when empty). * Prefer putting the label in `ComboboxValue` only; use this for compact layouts that hide the value. */ showSelectedLabel?: boolean; /** Label when `showSelectedLabel` and nothing is selected yet. */ fallbackLabel?: string; /** * Icon chevron beside `ComboboxInput` — the input carries `role="combobox"` and `aria-expanded`. * This control is decorative for assistive tech to avoid duplicate announcements. */ variant?: "default" | "icon-addon"; }; declare function ComboboxTrigger({ className, children, onClick, showSelectedLabel, fallbackLabel, variant, "aria-label": ariaLabelProp, ...props }: ComboboxTriggerProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxClear({ className, disabled: disabledProp, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, placeholder, onChange, onFocus, onKeyDown, ...props }: Omit, "value" | "readOnly"> & { showTrigger?: boolean; showClear?: boolean; }): import("react/jsx-runtime").JSX.Element; export type ComboboxContentProps = React.ComponentProps & { /** When true, the cmdk search field is visible in the panel (typical for multi-select badge trigger). */ showPanelSearch?: boolean; }; /** * Panel content mirrors `CommandPalette`’s inner tree: `Command` → `CommandInput` → list (`children`). * We use Popover + Anchor instead of CommandDialog so the field stays inline. The cmdk search input must * remain mounted and not `display:none` (see `sr-only` branch) so cmdk’s internal state matches palette behavior. */ declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, onOpenAutoFocus, showPanelSearch, children, onPointerDownCapture: userPointerDownCapture, ...props }: ComboboxContentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxBadgeTrigger({ className, placeholder, maxShownItems, id: idProp, ...props }: React.ComponentProps<"div"> & { placeholder?: string; maxShownItems?: number; }): import("react/jsx-runtime").JSX.Element; declare function ComboboxList({ className, children, renderItem, ...props }: Omit, "children"> & { children?: React.ReactNode; /** Render each entry from the parent `Combobox` `items` array (typed alternative to a function child). */ renderItem?: (item: unknown) => React.ReactNode; }): import("react/jsx-runtime").JSX.Element; declare function ComboboxItem({ className, children, value: itemValue, keywords: keywordsProp, onPointerDown: userPointerDown, onMouseDown: userMouseDown, onSelect: userOnSelect, ...props }: Omit, "value"> & { value: string; /** Extra strings for cmdk filtering when children include icons or non-text UI. */ keywords?: string[]; }): import("react/jsx-runtime").JSX.Element; declare function ComboboxGroup({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxLabel({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element; declare function ComboboxCollection({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxEmpty({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxSeparator({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; declare function ComboboxChips({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element; declare function ComboboxChip({ className, children, showRemove, value: chipValue, ...props }: React.ComponentProps<"div"> & { value: string; showRemove?: boolean; }): import("react/jsx-runtime").JSX.Element; declare function ComboboxChipsInput({ className, ...props }: Omit, "value" | "onValueChange">): import("react/jsx-runtime").JSX.Element; declare function useComboboxAnchor(): React.RefObject; export { Combobox, ComboboxInput, ComboboxBadgeTrigger, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, ComboboxAnchor, ComboboxClear, useComboboxAnchor, }; //# sourceMappingURL=combobox.d.ts.map