모바일 필터 UI pill 스타일로 개선

- select를 둥근 칩(pill) 형태로 변경 (아이콘 + 드롭다운 화살표)
- 선택 시 브랜드 컬러 배경 + 링 하이라이트
- 장르/가격/지역 필터 모두 동일 스타일 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-03-12 20:08:42 +09:00
parent a766a74f20
commit 64d58cb553

View File

@@ -957,37 +957,49 @@ export default function Home() {
<div className="space-y-1.5"> <div className="space-y-1.5">
{/* Line 1: 음식 장르 + 가격 + 결과수 */} {/* Line 1: 음식 장르 + 가격 + 결과수 */}
<div className="flex items-center gap-1.5 text-xs"> <div className="flex items-center gap-1.5 text-xs">
<select <div className={`relative inline-flex items-center rounded-full px-3 py-1.5 ${
value={cuisineFilter} cuisineFilter ? "bg-brand-50 dark:bg-brand-900/30 ring-1 ring-brand-300 dark:ring-brand-700" : "bg-gray-100 dark:bg-gray-800"
onChange={(e) => { setCuisineFilter(e.target.value); if (e.target.value) setBoundsFilterOn(false); }} }`}>
className={`border dark:border-gray-700 rounded-lg px-2 py-1 bg-white dark:bg-gray-800 ${ <Icon name="restaurant" size={14} className={`mr-1 ${cuisineFilter ? "text-brand-500" : "text-gray-400"}`} />
cuisineFilter ? "text-brand-600 dark:text-brand-400 border-brand-300 dark:border-brand-700" : "text-gray-500 dark:text-gray-400" <select
}`} value={cuisineFilter}
> onChange={(e) => { setCuisineFilter(e.target.value); if (e.target.value) setBoundsFilterOn(false); }}
<option value="">🍽 </option> className={`bg-transparent border-none outline-none appearance-none pr-4 cursor-pointer ${
{CUISINE_TAXONOMY.map((g) => ( cuisineFilter ? "text-brand-600 dark:text-brand-400 font-medium" : "text-gray-500 dark:text-gray-400"
<optgroup key={g.category} label={`── ${g.category} ──`}> }`}
<option value={g.category}>{g.category} </option> >
{g.items.map((item) => ( <option value=""></option>
<option key={`${g.category}|${item}`} value={`${g.category}|${item}`}> {CUISINE_TAXONOMY.map((g) => (
&nbsp;&nbsp;{item} <optgroup key={g.category} label={`── ${g.category} ──`}>
</option> <option value={g.category}>{g.category} </option>
))} {g.items.map((item) => (
</optgroup> <option key={`${g.category}|${item}`} value={`${g.category}|${item}`}>
))} {item}
</select> </option>
<select ))}
value={priceFilter} </optgroup>
onChange={(e) => { setPriceFilter(e.target.value); if (e.target.value) setBoundsFilterOn(false); }} ))}
className={`border dark:border-gray-700 rounded-lg px-2 py-1 bg-white dark:bg-gray-800 ${ </select>
priceFilter ? "text-brand-600 dark:text-brand-400 border-brand-300 dark:border-brand-700" : "text-gray-500 dark:text-gray-400" <Icon name="expand_more" size={14} className="absolute right-2 text-gray-400 pointer-events-none" />
}`} </div>
> <div className={`relative inline-flex items-center rounded-full px-3 py-1.5 ${
<option value="">💰 </option> priceFilter ? "bg-brand-50 dark:bg-brand-900/30 ring-1 ring-brand-300 dark:ring-brand-700" : "bg-gray-100 dark:bg-gray-800"
{PRICE_GROUPS.map((g) => ( }`}>
<option key={g.label} value={g.label}>{g.label}</option> <Icon name="payments" size={14} className={`mr-1 ${priceFilter ? "text-brand-500" : "text-gray-400"}`} />
))} <select
</select> value={priceFilter}
onChange={(e) => { setPriceFilter(e.target.value); if (e.target.value) setBoundsFilterOn(false); }}
className={`bg-transparent border-none outline-none appearance-none pr-4 cursor-pointer ${
priceFilter ? "text-brand-600 dark:text-brand-400 font-medium" : "text-gray-500 dark:text-gray-400"
}`}
>
<option value=""></option>
{PRICE_GROUPS.map((g) => (
<option key={g.label} value={g.label}>{g.label}</option>
))}
</select>
<Icon name="expand_more" size={14} className="absolute right-2 text-gray-400 pointer-events-none" />
</div>
{(cuisineFilter || priceFilter) && ( {(cuisineFilter || priceFilter) && (
<button onClick={() => { setCuisineFilter(""); setPriceFilter(""); }} className="text-gray-400 hover:text-brand-500"> <button onClick={() => { setCuisineFilter(""); setPriceFilter(""); }} className="text-gray-400 hover:text-brand-500">
<Icon name="close" size={14} /> <Icon name="close" size={14} />
@@ -997,45 +1009,61 @@ export default function Home() {
</div> </div>
{/* Line 2: 나라 + 시 + 구 + 내위치 */} {/* Line 2: 나라 + 시 + 구 + 내위치 */}
<div className="flex items-center gap-1.5 text-xs"> <div className="flex items-center gap-1.5 text-xs">
<select <div className={`relative inline-flex items-center rounded-full px-3 py-1.5 ${
value={countryFilter} countryFilter ? "bg-brand-50 dark:bg-brand-900/30 ring-1 ring-brand-300 dark:ring-brand-700" : "bg-gray-100 dark:bg-gray-800"
onChange={(e) => handleCountryChange(e.target.value)} }`}>
className={`border dark:border-gray-700 rounded-lg px-2 py-1 bg-white dark:bg-gray-800 ${ <Icon name="public" size={14} className={`mr-1 ${countryFilter ? "text-brand-500" : "text-gray-400"}`} />
countryFilter ? "text-brand-600 dark:text-brand-400 border-brand-300 dark:border-brand-700" : "text-gray-500 dark:text-gray-400"
}`}
>
<option value="">🌍 </option>
{countries.map((c) => (
<option key={c} value={c}>{c}</option>
))}
</select>
{countryFilter && cities.length > 0 && (
<select <select
value={cityFilter} value={countryFilter}
onChange={(e) => handleCityChange(e.target.value)} onChange={(e) => handleCountryChange(e.target.value)}
className={`border dark:border-gray-700 rounded-lg px-2 py-1 bg-white dark:bg-gray-800 ${ className={`bg-transparent border-none outline-none appearance-none pr-4 cursor-pointer ${
cityFilter ? "text-brand-600 dark:text-brand-400 border-brand-300 dark:border-brand-700" : "text-gray-500 dark:text-gray-400" countryFilter ? "text-brand-600 dark:text-brand-400 font-medium" : "text-gray-500 dark:text-gray-400"
}`} }`}
> >
<option value="">/</option> <option value=""></option>
{cities.map((c) => ( {countries.map((c) => (
<option key={c} value={c}>{c}</option> <option key={c} value={c}>{c}</option>
))} ))}
</select> </select>
<Icon name="expand_more" size={14} className="absolute right-2 text-gray-400 pointer-events-none" />
</div>
{countryFilter && cities.length > 0 && (
<div className={`relative inline-flex items-center rounded-full px-3 py-1.5 ${
cityFilter ? "bg-brand-50 dark:bg-brand-900/30 ring-1 ring-brand-300 dark:ring-brand-700" : "bg-gray-100 dark:bg-gray-800"
}`}>
<select
value={cityFilter}
onChange={(e) => handleCityChange(e.target.value)}
className={`bg-transparent border-none outline-none appearance-none pr-4 cursor-pointer ${
cityFilter ? "text-brand-600 dark:text-brand-400 font-medium" : "text-gray-500 dark:text-gray-400"
}`}
>
<option value="">/</option>
{cities.map((c) => (
<option key={c} value={c}>{c}</option>
))}
</select>
<Icon name="expand_more" size={14} className="absolute right-2 text-gray-400 pointer-events-none" />
</div>
)} )}
{cityFilter && districts.length > 0 && ( {cityFilter && districts.length > 0 && (
<select <div className={`relative inline-flex items-center rounded-full px-3 py-1.5 ${
value={districtFilter} districtFilter ? "bg-brand-50 dark:bg-brand-900/30 ring-1 ring-brand-300 dark:ring-brand-700" : "bg-gray-100 dark:bg-gray-800"
onChange={(e) => handleDistrictChange(e.target.value)} }`}>
className={`border dark:border-gray-700 rounded-lg px-2 py-1 bg-white dark:bg-gray-800 ${ <select
districtFilter ? "text-brand-600 dark:text-brand-400 border-brand-300 dark:border-brand-700" : "text-gray-500 dark:text-gray-400" value={districtFilter}
}`} onChange={(e) => handleDistrictChange(e.target.value)}
> className={`bg-transparent border-none outline-none appearance-none pr-4 cursor-pointer ${
<option value="">/</option> districtFilter ? "text-brand-600 dark:text-brand-400 font-medium" : "text-gray-500 dark:text-gray-400"
{districts.map((d) => ( }`}
<option key={d} value={d}>{d}</option> >
))} <option value="">/</option>
</select> {districts.map((d) => (
<option key={d} value={d}>{d}</option>
))}
</select>
<Icon name="expand_more" size={14} className="absolute right-2 text-gray-400 pointer-events-none" />
</div>
)} )}
{countryFilter && ( {countryFilter && (
<button onClick={() => { setCountryFilter(""); setCityFilter(""); setDistrictFilter(""); setRegionFlyTo(null); }} className="text-gray-400 hover:text-brand-500"> <button onClick={() => { setCountryFilter(""); setCityFilter(""); setDistrictFilter(""); setRegionFlyTo(null); }} className="text-gray-400 hover:text-brand-500">