fix(CommandPalette/SelectMenu): missing translations (#3057)

This commit is contained in:
Malik-Jouda
2025-01-10 19:20:47 +02:00
committed by GitHub
parent a3dbf7c27d
commit d5dba0ebc9
31 changed files with 89 additions and 31 deletions

View File

@@ -145,7 +145,6 @@ import UInput from './Input.vue'
const props = withDefaults(defineProps<CommandPaletteProps<G, T>>(), {
modelValue: '',
placeholder: 'Type a command or search...',
labelKey: 'label',
autofocus: true
})
@@ -158,7 +157,7 @@ const { t } = useLocale()
const appConfig = useAppConfig()
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'disabled', 'multiple', 'modelValue', 'defaultValue', 'highlightOnHover'), emits)
const inputProps = useForwardProps(reactivePick(props, 'loading', 'loadingIcon', 'placeholder'))
const inputProps = useForwardProps(reactivePick(props, 'loading', 'loadingIcon'))
// eslint-disable-next-line vue/no-dupe-keys
const ui = commandPalette()
@@ -244,6 +243,7 @@ const groups = computed(() => {
<ListboxRoot v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })">
<ListboxFilter v-model="searchTerm" as-child>
<UInput
:placeholder="placeholder || t('commandPalette.placeholder')"
variant="none"
:autofocus="autofocus"
size="lg"

View File

@@ -165,7 +165,7 @@ const { contains } = useFilter({ sensitivity: 'base' })
const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }) as ComboboxContentProps)
const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: 'Search...', variant: 'none' }) as InputProps)
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: t('selectMenu.search'), variant: 'none' }) as InputProps)
const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled } = useFormField<InputProps>(props)
const { orientation, size: buttonGroupSize } = useButtonGroup<InputProps>(props)