import type { Expand } from "svelte-toolbelt"; import type { PortalProps } from "../utilities/portal/types.js"; import type { PopperLayerProps, PopperLayerStaticProps } from "../utilities/popper-layer/types.js"; import type { ArrowProps, ArrowPropsWithoutHTML } from "../utilities/arrow/types.js"; import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js"; import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js"; import type { FloatingContentSnippetProps, StaticContentSnippetProps } from "../../shared/types.js"; import type { HTMLInputAttributes } from "svelte/elements"; export type SelectBaseRootPropsWithoutHTML = WithChildren<{ /** * Whether the combobox is disabled. * * @defaultValue `false` */ disabled?: boolean; /** * Whether the combobox is required (for form submission). * * @defaultValue `false` */ required?: boolean; /** * The name to apply to the hidden input element for form submission. * If not provided, a hidden input will not be rendered and the combobox will not be part of a form. */ name?: string; /** * Whether the combobox popover is open. * * @defaultValue `false` * @bindable */ open?: boolean; /** * A callback function called when the open state changes. */ onOpenChange?: OnChangeFn; /** * A callback function called when the open state changes and the animation is complete. */ onOpenChangeComplete?: OnChangeFn; /** * Whether or not the combobox menu should loop through the items when navigating with the keyboard. * * @defaultValue `false` */ loop?: boolean; /** * How to scroll the combobox items into view when navigating with the keyboard. * * @defaultValue `"nearest"` */ scrollAlignment?: "nearest" | "center"; /** * Optionally provide an array of `value` and `label` pairs that will be used to match * and trigger selection when the trigger is focused and a key is pressed while the content * is closed. It's also used to handle form autofill. * * By providing this value, you enable selecting a value when the trigger is focused and a key * is pressed without the content being open, similar to how a native `