import PfMenu, { type MenuItemId } from '../Menu/Menu.vue'; import { type Placement } from '../../helpers/FloatingUi.vue'; import { type RendererElement, type VNode } from 'vue'; import { type OUIAProps } from '../../helpers/ouia'; import type { ComponentProps } from 'vue-component-type-helpers'; interface Props extends OUIAProps, Omit, 'ouiaId' | 'ouiaSafe' | 'selected' | 'onUpdate:selected'> { /** Single itemId for single select menus, or array of itemIds for multi select. You can also specify selected on the SelectOption. */ selected?: T | null; /** Determines the accessible role of the select. For a checkbox select pass in "menu". */ role?: string; /** Minimum width of the select menu */ minWidth?: string; /** z-index of the select menu */ zIndex?: number; /** Placement of the menu relative to the toggle */ placement?: 'top' | 'bottom' | Placement; /** Element or selector where to render the floating menu */ appendTo?: 'inline' | string | RendererElement | null | undefined; /** Flag indicating the toggle should be focused after a selection. */ shouldFocusToggleOnSelect?: boolean; /** Flag indicating that the select should close when an option is selected. */ closeOnSelect?: boolean; /** @beta Flag indicating the first menu item should be focused after opening the menu. */ shouldFocusFirstItemOnOpen?: boolean; /** Flag indicating that focusing the first menu item on open should scroll it into view. */ scrollOnItemFocus?: boolean; /** Time in ms to wait before focusing the first menu item on open. */ focusTimeoutDelay?: number; /** * Keys that close the menu, defaults to tab and escape. It is highly recommended to include Escape in the array, * while Tab may be omitted if the menu contains non-menu items that are focusable. */ openChangeKeys?: string[]; /** * Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, * pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key * and last item for the up arrow key. The typeahead variant keeps the focus on the toggle. */ onToggleKeydown?: (event: KeyboardEvent) => void; /** Indicates if the select menu should be scrollable. Defaults to true with menuHeight or maxMenuHeight. */ scrollable?: boolean; /** Height of the select menu */ menuHeight?: string; /** Maximum height of the select menu */ maxMenuHeight?: string; /** Flag indicating the toggle is disabled */ disabled?: boolean; /** Flag indicating the toggle is full height */ fullHeight?: boolean; /** Flag indicating the toggle takes up the full width of its parent */ fullWidth?: boolean; /** Variant styles of the menu toggle. With typeahead the toggle arrow keys don't move the focus to the menu. */ variant?: 'default' | 'plain' | 'primary' | 'plainText' | 'secondary' | 'typeahead'; /** Label for the menu toggle. Defaults to the `selectLabel` message. */ label?: string; } declare const _default: typeof __VLS_export; export default _default; 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<(Props & { /** Flag to indicate if select is open */ open?: boolean; }) & { onSelect?: ((event: Event, itemId?: MenuItemId | null | undefined) => any) | undefined; "onUpdate:open"?: ((value: boolean) => any) | undefined; "onUpdate:selected"?: ((value: T extends unknown[] ? T : T | null) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: { /** Options of the select */ default?: (props?: Record) => VNode[]; /** Custom toggle, replacing the default menu toggle. It receives the expanded state, click and keydown handlers. */ toggle?: (props?: Record) => VNode[]; /** Icon of the default menu toggle */ icon?: (props?: Record) => VNode[]; /** Label of the default menu toggle, replacing the label prop */ label?: (props?: Record) => VNode[]; }; emit: { (name: "select", event: Event, itemId?: MenuItemId | null | undefined): void; (name: "update:selected", value: T extends unknown[] ? T : T | null): void; } & ((event: "update:open", value: boolean) => 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]; }) & {}; //# sourceMappingURL=Select.vue.d.ts.map