import { ID } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { SelectionContext, SelectionTicketInput } from "../../composables/createSelection/index.mjs"; import { PopoverAdapter } from "../../composables/usePopover/adapters/adapter.mjs"; import { PopoverReturn } from "../../composables/usePopover/index.mjs"; import { VirtualFocusReturn } from "../../composables/useVirtualFocus/index.mjs"; import { MaybeRefOrGetter, Ref } from "vue"; //#region src/components/Select/SelectRoot.vue.d.ts interface SelectTicketInput extends SelectionTicketInput { /** Option text read on each typeahead key */ text: () => string; } interface SelectContext { /** Whether the dropdown is open */ isOpen: Ref; /** Whether the entire select is disabled */ disabled: MaybeRefOrGetter; /** Whether multiple selection is enabled */ multiple: boolean; /** Root identifier */ id: string; /** ID for the listbox element */ listboxId: string; /** ID for the activator element */ activatorId: string; /** Form field name */ name: string | undefined; /** Associated form ID */ form: string | undefined; /** Reference to the activator DOM element */ activatorEl: Ref; /** Selection context for managing selected items */ selection: SelectionContext; /** Virtual focus for keyboard navigation */ virtualFocus: VirtualFocusReturn; /** Popover for dropdown positioning */ popover: PopoverReturn; /** Open the dropdown */ open: () => void; /** Close the dropdown */ close: () => void; /** Toggle the dropdown */ toggle: () => void; /** Select an item by ID, closing dropdown in single-select mode */ select: (id: ID) => void; /** Handle one typed character */ onTypeahead: (char: string) => void; /** Raw model value for fallback display before items register. Carries ticket values (type-erased at the compound boundary) */ modelValue: Ref; } interface SelectRootProps 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 select */ 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 * - `force`: Automatically selects the first non-disabled item */ mandatory?: boolean | 'force'; /** Positioning engine. @default CSS anchor positioning (`V0PopoverAdapter`) */ adapter?: PopoverAdapter; } interface SelectRootSlotProps { /** Root identifier */ id: string; /** Whether the dropdown is open */ isOpen: boolean; /** Whether the select is disabled */ isDisabled: boolean; /** Open the dropdown */ open: () => void; /** Close the dropdown */ close: () => void; /** Toggle the dropdown */ toggle: () => void; } declare const useSelectContext: (key: string, defaultValue?: SelectContext | undefined) => SelectContext, provideSelectContext: (key: string, context: SelectContext, app?: import("vue").App) => SelectContext; 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<(SelectRootProps & { 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: SelectRootSlotProps) => 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 { SelectContext, SelectRootProps, SelectRootSlotProps, SelectTicketInput, _default as default, provideSelectContext, useSelectContext };