@@ -3,6 +3,7 @@ import IconCheck from '@iconify-icons/ph/check'
33import Fuse from ' fuse.js'
44import { type MaybeRef , computed , onMounted , ref , unref } from ' vue'
55import { type DropdownSectionFilterOption , type DropdownSectionFilterSelectedValue } from ' ../composables/Dropdown'
6+ import { useTrans } from ' ../composables/Lang'
67import { isArray } from ' ../support/Utils'
78import SDropdownSectionFilterItem from ' ./SDropdownSectionFilterItem.vue'
89import SIcon from ' ./SIcon.vue'
@@ -14,6 +15,17 @@ const props = defineProps<{
1415 onClick? (value : any ): void
1516}>()
1617
18+ const { t } = useTrans ({
19+ en: {
20+ i_ph: ' Filter options' ,
21+ not_found: ' No options found.'
22+ },
23+ ja: {
24+ i_ph: ' オプションを検索' ,
25+ not_found: ' オプションが見つかりません。'
26+ }
27+ })
28+
1729const input = ref <HTMLElement | null >(null )
1830const query = ref (' ' )
1931
@@ -60,7 +72,7 @@ function handleClick(option: DropdownSectionFilterOption, value: any) {
6072<template >
6173 <div class =" SDropdownSectionFilter" >
6274 <div v-if =" search" class =" search" >
63- <input class =" input" placeholder =" Filter options " ref =" input" v-model =" query" >
75+ <input class =" input" : placeholder =" t.i_ph " ref =" input" v-model =" query" >
6476 </div >
6577
6678 <ul v-if =" filteredOptions.length" class =" list" >
@@ -89,7 +101,7 @@ function handleClick(option: DropdownSectionFilterOption, value: any) {
89101 </ul >
90102
91103 <p v-else class =" empty" >
92- No options found.
104+ {{ t.not_found }}
93105 </p >
94106 </div >
95107</template >
@@ -105,6 +117,7 @@ function handleClick(option: DropdownSectionFilterOption, value: any) {
105117 z-index : 10 ;
106118 border-bottom : 1 px solid var (--c-gutter );
107119 padding : 8 px ;
120+ background-color : var (--c-bg-elv-3 );
108121}
109122
110123.input {
@@ -138,8 +151,7 @@ function handleClick(option: DropdownSectionFilterOption, value: any) {
138151 text-align : left;
139152 transition : color 0.25 s , background-color 0.25 s ;
140153
141- &:hover ,
142- &:focus {
154+ &:hover {
143155 background-color : var (--c-bg-mute-1 );
144156 }
145157}
0 commit comments