import * as solid_js from 'solid-js'; import { Accessor, JSX, ValidComponent, ComponentProps, Component } from 'solid-js'; import { a as DismissableLayerCommonProps, D as DismissableLayerRenderProps } from './dismissable-layer-0aef6de3.js'; import { ElementOf, PolymorphicProps } from './polymorphic/index.js'; import { PointerDownOutsideEvent, FocusOutsideEvent, InteractOutsideEvent } from './primitives/create-interact-outside/index.js'; import { F as FormControlDataSet } from './form-control-description-330657bc.js'; import { w as ListboxRootOptions, y as ListboxRootRenderProps } from './listbox-section-58338bda.js'; import { Portal } from 'solid-js/web'; import { ValidationState } from '@kobalte/utils'; import { g as PopperRootOptions } from './popper-root-14a88a55.js'; import { a as CollectionNode } from './types-f8ae18e5.js'; import { F as FocusStrategy, L as ListState, K as KeyboardDelegate, S as SelectionMode, a as SelectionBehavior } from './create-list-state-d9a0f1f2.js'; type ComboboxTriggerMode = "focus" | "input" | "manual"; interface ComboboxDataSet { "data-expanded": string | undefined; "data-closed": string | undefined; } interface ComboboxContextValue { dataset: Accessor; isOpen: Accessor; isDisabled: Accessor; isMultiple: Accessor; isVirtualized: Accessor; isModal: Accessor; preventScroll: Accessor; isInputFocused: Accessor; allowsEmptyCollection: Accessor; shouldFocusWrap: Accessor; removeOnBackspace: Accessor; selectedOptions: Accessor; contentPresent: Accessor; autoFocus: Accessor; activeDescendant: Accessor; inputValue: Accessor; triggerMode: Accessor; controlRef: Accessor; inputRef: Accessor; triggerRef: Accessor; contentRef: Accessor; listboxId: Accessor; triggerAriaLabel: Accessor; listboxAriaLabel: Accessor; listState: Accessor; keyboardDelegate: Accessor; resetInputValue: (selectedKeys: Set) => void; setIsInputFocused: (isFocused: boolean) => void; setInputValue: (value: string) => void; setControlRef: (el: HTMLElement) => void; setInputRef: (el: HTMLInputElement) => void; setTriggerRef: (el: HTMLElement) => void; setContentRef: (el: HTMLElement) => void; setListboxRef: (el: HTMLElement) => void; open: (focusStrategy: FocusStrategy | boolean, triggerMode?: ComboboxTriggerMode) => void; close: () => void; toggle: (focusStrategy: FocusStrategy | boolean, triggerMode?: ComboboxTriggerMode) => void; placeholder: Accessor; renderItem: (item: CollectionNode) => JSX.Element; renderSection: (section: CollectionNode) => JSX.Element; removeOptionFromSelection: (option: any) => void; onInputKeyDown: JSX.EventHandlerUnion; generateId: (part: string) => string; registerListboxId: (id: string) => () => void; } declare function useComboboxContext(): ComboboxContextValue; interface ComboboxContentOptions { /** * Event handler called when focus moves to the trigger after closing. * It can be prevented by calling `event.preventDefault`. */ onCloseAutoFocus?: (event: Event) => void; /** * Event handler called when a pointer event occurs outside the bounds of the component. * It can be prevented by calling `event.preventDefault`. */ onPointerDownOutside?: (event: PointerDownOutsideEvent) => void; /** * Event handler called when the focus moves outside the bounds of the component. * It can be prevented by calling `event.preventDefault`. */ onFocusOutside?: (event: FocusOutsideEvent) => void; /** * Event handler called when an interaction (pointer or focus event) happens outside the bounds of the component. * It can be prevented by calling `event.preventDefault`. */ onInteractOutside?: (event: InteractOutsideEvent) => void; } interface ComboboxContentCommonProps extends DismissableLayerCommonProps { style?: JSX.CSSProperties | string; } interface ComboboxContentRenderProps extends ComboboxContentCommonProps, DismissableLayerRenderProps, ComboboxDataSet { } type ComboboxContentProps = ComboboxContentOptions & Partial>>; /** * The component that pops out when the combobox is open. */ declare function ComboboxContent(props: PolymorphicProps>): JSX.Element; interface ComboboxInputOptions { } interface ComboboxInputCommonProps { id: string; ref: T | ((el: T) => void); onInput: JSX.EventHandlerUnion; onKeyDown: JSX.EventHandlerUnion; onClick: JSX.EventHandlerUnion; onFocus: JSX.EventHandlerUnion; onBlur: JSX.EventHandlerUnion; onTouchEnd: JSX.EventHandlerUnion; disabled: boolean | undefined; "aria-label": string | undefined; "aria-labelledby": string | undefined; "aria-describedby": string | undefined; } interface ComboboxInputRenderProps extends ComboboxInputCommonProps, FormControlDataSet { value: string | undefined; required: boolean | undefined; readonly: boolean | undefined; placeholder: JSX.Element; "aria-invalid": boolean | undefined; "aria-required": boolean | undefined; "aria-disabled": boolean | undefined; "aria-readonly": boolean | undefined; type: "text"; role: "combobox"; autoComplete: "off"; autoCorrect: "off"; spellCheck: "false"; "aria-haspopup": "listbox"; "aria-autocomplete": "list"; "aria-expanded": boolean; "aria-controls": string | undefined; "aria-activedescendant": string | undefined; } type ComboboxInputProps = ComboboxInputOptions & Partial>>; declare function ComboboxInput(props: PolymorphicProps>): JSX.Element; interface ComboboxListboxOptions extends Pick, "scrollRef" | "scrollToItem" | "children"> { } interface ComboboxListboxCommonProps { id: string; ref: T | ((el: T) => void); } interface ComboboxListboxRenderProps extends ComboboxListboxCommonProps, ListboxRootRenderProps { "aria-label": string | undefined; "aria-labelledby": string | undefined; } type ComboboxListboxProps = ComboboxListboxOptions & Partial>>; /** * Contains all the items of a `Combobox`. */ declare function ComboboxListbox