{
+ nav.onKeyDown(event);
+ onKeyDown?.(event);
+ }}
+ {...rest}
+ >
+
+
+
+ {open && (
+
+ {searchable && (
+
+
+ {
+ setSearch(event.target.value);
+ nav.resetActive();
+ }}
+ {...nav.comboboxProps}
+ className="h-10 w-full min-w-0 bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"
+ />
+ {search && (
+
+ )}
+
+ )}
+ {/* The listbox owns the options only — the search field above sits
+ outside it, per ARIA. It scrolls on its own: the page never does. */}
+
+ {filtered.map((option, index) => {
+ const isCurrent = option.region === region;
+ return (
+
+ );
+ })}
+ {filtered.length === 0 && (
+
+ {text.emptyMessage}
+
+ )}
+
+
+ )}
+
+
+ {showSummary && (
+
+
+
- {text.currency}
+ -
+ {preferences.currency ? (
+ <>
+
+ {preferences.currency}
+
+ {preferences.currencyPreview}
+ >
+ ) : (
+ —
+ )}
+
+
+
+
- {text.dateFormat}
+ - {preferences.datePreview}
+
+
+
- {text.numberFormat}
+ - {preferences.numberPreview}
+
+
+
- {text.weekStart}
+ - {preferences.firstWeekday}
+
+
+ )}
+
+