Skip to content

Commit 44cbba0

Browse files
committed
Revert "refactor: use radio button"
This reverts commit ef77ff4.
1 parent 17e1995 commit 44cbba0

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

app/components/Filter/Panel.vue

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,20 +217,26 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
217217
</label>
218218
<!-- Search scope toggle -->
219219
<div
220-
class="flex flex-wrap gap-2"
221-
role="radiogroup"
222-
:aria-label="$t('filters.weekly_downloads')"
220+
class="inline-flex rounded-md border border-border p-0.5 bg-bg"
221+
role="group"
222+
:aria-label="$t('filters.search_scope')"
223223
>
224-
<TagRadioButton
224+
<button
225225
v-for="scope in SEARCH_SCOPE_VALUES"
226226
:key="scope"
227-
:model-value="filters.searchScope"
228-
:value="scope"
229-
name="searchScope"
230-
@update:modelValue="emit('update:searchScope', scope)"
227+
type="button"
228+
class="px-2 py-0.5 text-xs font-mono rounded-sm transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
229+
:class="
230+
filters.searchScope === scope
231+
? 'bg-bg-muted text-fg'
232+
: 'text-fg-muted hover:text-fg'
233+
"
234+
:aria-pressed="filters.searchScope === scope"
235+
:title="getScopeDescriptionKey(scope)"
236+
@click="emit('update:searchScope', scope)"
231237
>
232238
{{ getScopeLabelKey(scope) }}
233-
</TagRadioButton>
239+
</button>
234240
</div>
235241
</div>
236242
<InputBase

0 commit comments

Comments
 (0)