From deae9eca84a6dbb3bcfec628e0b5d37ff631b935 Mon Sep 17 00:00:00 2001 From: HugoRCD Date: Wed, 25 Jun 2025 16:26:27 +0200 Subject: [PATCH 01/12] feat(CommandPalette): add `input-trailing-icon` prop and slot --- src/runtime/components/CommandPalette.vue | 16 +++++++++++++++- src/theme/command-palette.ts | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 0fa7476b69..1632dac7dc 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -116,6 +116,11 @@ export interface CommandPaletteProps = CommandP * @IconifyIcon */ backIcon?: string + /** + * Display a trailing icon in the input. + * @IconifyIcon + */ + inputTrailingIcon?: string groups?: G[] /** * Options for [useFuse](https://vueuse.org/integrations/useFuse). @@ -149,6 +154,7 @@ export type CommandPaletteSlots = CommandPalett 'empty'(props: { searchTerm?: string }): any 'back'(props: { ui: { [K in keyof Required]: (props?: Record) => string } }): any 'close'(props: { ui: { [K in keyof Required]: (props?: Record) => string } }): any + 'input-trailing'(props: { ui: { [K in keyof Required]: (props?: Record) => string } }): any 'item': SlotProps 'item-leading': SlotProps 'item-label': SlotProps @@ -353,7 +359,15 @@ function onSelect(e: Event, item: T) { -