@@ -243,22 +243,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
243243 role =" radiogroup"
244244 :aria-label =" $t('filters.weekly_downloads')"
245245 >
246- <button
246+ <TagClickable
247247 v-for =" range in DOWNLOAD_RANGES"
248248 :key =" range.value"
249249 type =" button"
250250 role =" radio"
251251 :aria-checked =" filters.downloadRange === range.value"
252- class =" tag transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
253- :class ="
254- filters.downloadRange === range.value
255- ? 'bg-fg text-bg border-fg hover:text-bg/50'
256- : ''
257- "
252+ :status =" filters.downloadRange === range.value ? 'active' : 'default'"
258253 @click =" emit('update:downloadRange', range.value)"
259254 >
260255 {{ $t(getDownloadRangeLabelKey(range.value)) }}
261- </button >
256+ </TagClickable >
262257 </div >
263258 </fieldset >
264259
@@ -272,22 +267,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
272267 role =" radiogroup"
273268 :aria-label =" $t('filters.updated_within')"
274269 >
275- <button
270+ <TagClickable
276271 v-for =" option in UPDATED_WITHIN_OPTIONS"
277272 :key =" option.value"
278273 type =" button"
279274 role =" radio"
280275 :aria-checked =" filters.updatedWithin === option.value"
281- class =" tag transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
282- :class ="
283- filters.updatedWithin === option.value
284- ? 'bg-fg text-bg border-fg hover:text-bg/70'
285- : ''
286- "
276+ :status =" filters.updatedWithin === option.value ? 'active' : 'default'"
287277 @click =" emit('update:updatedWithin', option.value)"
288278 >
289279 {{ $t(getUpdatedWithinLabelKey(option.value)) }}
290- </button >
280+ </TagClickable >
291281 </div >
292282 </fieldset >
293283
@@ -300,20 +290,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
300290 </span >
301291 </legend >
302292 <div class =" flex flex-wrap gap-2" role =" radiogroup" :aria-label =" $t('filters.security')" >
303- <button
293+ <TagClickable
304294 v-for =" security in SECURITY_FILTER_VALUES"
305295 :key =" security"
306296 type =" button"
307297 role =" radio"
308298 disabled
309299 :aria-checked =" filters.security === security"
310- class =" tag transition-colors duration-200 opacity-50 cursor-not-allowed focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
311- :class ="
312- filters.security === security ? 'bg-fg text-bg border-fg hover:text-bg/70' : ''
313- "
300+ :status =" filters.security === security ? 'active' : 'default'"
314301 >
315302 {{ $t(getSecurityLabelKey(security)) }}
316- </button >
303+ </TagClickable >
317304 </div >
318305 </fieldset >
319306
@@ -323,19 +310,16 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
323310 {{ $t('filters.keywords') }}
324311 </legend >
325312 <div class =" flex flex-wrap gap-1.5" role =" group" :aria-label =" $t('filters.keywords')" >
326- <button
313+ <TagClickable
327314 v-for =" keyword in displayedKeywords"
328315 :key =" keyword"
329316 type =" button"
330317 :aria-pressed =" filters.keywords.includes(keyword)"
331- class =" tag text-xs transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
332- :class ="
333- filters.keywords.includes(keyword) ? 'bg-fg text-bg border-fg hover:text-bg/70' : ''
334- "
318+ :status =" filters.keywords.includes(keyword) ? 'active' : 'default'"
335319 @click =" emit('toggleKeyword', keyword)"
336320 >
337321 {{ keyword }}
338- </button >
322+ </TagClickable >
339323 <button
340324 v-if =" hasMoreKeywords"
341325 type =" button"
0 commit comments