import { MaybeArray } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { PopoverAdapter } from "../../composables/usePopover/adapters/adapter.mjs"; import "../../composables/usePopover/index.mjs"; import { ComboboxAdapter } from "../../composables/createCombobox/adapters/adapter.mjs"; import { ComboboxContext } from "../../composables/createCombobox/index.mjs"; import { ShallowRef } from "vue"; //#region src/components/Combobox/ComboboxRoot.vue.d.ts interface ComboboxRootContext extends ComboboxContext { /** Listbox element. Written by Content; Control uses it to skip blur-commit. */ listEl: ShallowRef; } interface ComboboxRootProps extends AtomProps { /** Namespace for dependency injection */ namespace?: string; /** Unique identifier (auto-generated if not provided) */ id?: string; /** Form field name — auto-renders hidden input when provided */ name?: string; /** Associate with a form by ID */ form?: string; /** Disables the entire combobox */ disabled?: boolean; /** Enable multi-selection mode */ multiple?: boolean; /** * Controls mandatory selection behavior: * - false (default): No mandatory selection enforcement * - true: Prevents deselecting the last selected item */ mandatory?: boolean; /** * Constrains accepted values to registered options. * - false (default): confirming (Enter/Tab) typed text with no match commits it as a new value * - true: unmatched text is discarded on confirm; only registered options can be selected */ strict?: boolean; /** Manual error state override — forces invalid regardless of error messages */ error?: boolean; /** Manual error messages */ errorMessages?: MaybeArray; /** Filtering/loading adapter (client-side or server-side) */ adapter?: ComboboxAdapter; /** Positioning engine for the dropdown. @default CSS anchor positioning (`V0PopoverAdapter`) */ positionAdapter?: PopoverAdapter; /** Maps selected value to input display text. Defaults to String(value). */ displayValue?: (value: unknown) => string; } interface ComboboxRootSlotProps { /** Root identifier */ id: string; /** Current query string */ query: string; /** Whether the dropdown is open */ isOpen: boolean; /** Whether filtered results are empty */ isEmpty: boolean; /** Whether async loading is in progress */ isLoading: boolean; /** Whether the combobox is disabled */ isDisabled: boolean; /** Validation error messages */ errors: string[]; /** Whether the combobox is valid (null = no opinion) */ isValid: boolean | null; /** Open the dropdown */ open: () => void; /** Close the dropdown */ close: () => void; /** Toggle the dropdown */ toggle: () => void; /** Clear query and selection */ clear: () => void; /** Commit typed text (exact match or mint when not strict) */ commit: () => void; } declare const useComboboxRoot: (key: string, defaultValue?: ComboboxRootContext | undefined) => ComboboxRootContext, provideComboboxRoot: (key: string, context: ComboboxRootContext, app?: import("vue").App) => ComboboxRootContext; declare const _default: typeof __VLS_export; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal<(ComboboxRootProps & { modelValue?: T | T[]; }) & { "onUpdate:modelValue"?: ((value: T | T[] | undefined) => any) | undefined; "onUpdate:model-value"?: ((value: T | T[]) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: { default: (props: ComboboxRootSlotProps) => any; }; emit: ((evt: "update:model-value", value: T | T[]) => void) & ((event: "update:modelValue", value: T | T[] | undefined) => void); }>) => import("vue").VNode & { __ctx?: NonNullable>; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {}; //#endregion export { ComboboxRootContext, ComboboxRootProps, ComboboxRootSlotProps, _default as default, provideComboboxRoot, useComboboxRoot };