import React, { type ReactElement } from "react"; import { Middleware, Placement } from "@floating-ui/react"; import { FilterSize, FilterVariant } from "../FilterInputAbstract/types"; type FilterTagInputProps = { values: string[]; options: (string | string[])[]; selectedIndex: number; selectOptions: { icon: ReactElement; label: string; }[]; onChange: (values: string[]) => void; onSelectChange: (index: number) => void; size?: FilterSize; variant?: FilterVariant; tagVariant?: FilterVariant; searchPlaceholder?: string; noResultsMessage?: string; /** * 検索語が入力されるまで候補リストを描画しない * 候補が大量にある場合に、開いた瞬間の全件描画を避けるためのオプション。 * @default false */ showOptionsOnlyWhenSearching?: boolean; /** * showOptionsOnlyWhenSearching=true かつ検索語が空のときに表示する案内文言 * @default "キーワードを入力してください" */ searchPromptMessage?: string; /** * 候補の絞り込みをコンポーネント内で行うか。 * false にすると getFilteredOptions をスキップし、親から渡された options を * そのまま描画する(サーバ検索など、親が options を供給するケース向け)。 * @default true */ filterLocally?: boolean; /** * 検索語が変わるたびに呼ばれる。サーバ検索する親側で debounce する想定。 * filterLocally=false と組み合わせて使う。 */ onSearchChange?: (searchTerm: string) => void; /** * 検索結果を取得中かどうか。true の間は候補の代わりにローディングを表示する。 * サーバ検索(filterLocally=false)と組み合わせて使う。 * @default false */ isLoading?: boolean; disabled?: boolean; applyButtonText?: string; cancelButtonText?: string; error?: boolean; /** * Floating UIのplacement(メニューの表示位置) * 詳細は https://floating-ui.com/docs/tutorial#placements を参照 */ placement?: Placement; /** * Floating UIのmiddleware配列(高度なメニュー位置制御用) * 詳細は https://floating-ui.com/docs/middleware を参照 */ middleware?: Middleware[]; }; export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, searchPlaceholder, noResultsMessage, showOptionsOnlyWhenSearching, searchPromptMessage, filterLocally, onSearchChange, isLoading, disabled, applyButtonText, cancelButtonText, error, placement, middleware, }: FilterTagInputProps) => React.JSX.Element; export {};