+
+
+ {
+ setQuery(e.target.value);
+ setActive(0);
+ }}
+ onKeyDown={onInputKeyDown}
+ className="w-full bg-transparent py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"
+ autoComplete="off"
+ spellCheck={false}
+ />
+
+
+ {results.map((lang, index) => (
+ - setActive(index)}
+ onMouseDown={(e) => e.preventDefault()}
+ onClick={() => pick(lang.value)}
className={cn(
- "w-full flex items-center gap-2 px-3 py-1.5 text-sm text-start cursor-pointer whitespace-nowrap transition-colors duration-100",
- lang.value === choice
- ? "bg-accent text-accent-foreground font-medium"
- : "text-foreground hover:bg-accent/50"
+ "flex items-center gap-2 px-3 py-1.5 text-sm cursor-pointer",
+ index === active ? "bg-accent text-accent-foreground" : "text-foreground"
)}
>
- {lang.label}
-
-
- ))}
-
+
{lang.label}
+ {lang.hint &&
{lang.hint}}
+ {lang.value === choice &&
}
+
+ ))}
+ {results.length === 0 && (
+
{t('sharing.no_match')}
+ )}
+
+
)}