{searchable && (
{ setQuery(e.target.value); setHover(0); }}
placeholder={searchPlaceholder}
style={{
width: "100%", boxSizing: "border-box",
height: 32, padding: "0 10px",
border: "1px solid var(--line-strong)",
borderRadius: "var(--r-sm)",
fontSize: 13, fontFamily: "inherit", color: "var(--ink)",
outline: "none",
}} />
)}
{filteredOptions.length === 0 && (
Ничего не найдено
)}
{filteredOptions.map((o, i) => {
const v = typeof o === "string" ? o : o.value;
const l = typeof o === "string" ? o : o.label;
const isSelected = isSelectedVal(v);
const isHover = hover === i;
return (
setHover(i)}
onClick={() => emit(v)}
style={{
display: "flex", alignItems: "center", gap: 8,
padding: "9px 10px 9px 10px",
borderRadius: "var(--r-sm)",
fontSize: 14, lineHeight: 1.25,
color: isSelected ? "var(--teal-deep)" : "var(--ink)",
background: isSelected
? "var(--teal-light)"
: (isHover ? "var(--base)" : "transparent"),
fontWeight: isSelected ? 600 : 500,
cursor: "pointer",
whiteSpace: "nowrap",
transition: "background .12s ease",
}}>
{multi ? (
{isSelected && }
) : (
)}
{l}
);
})}