From e2b78a78a45c1b2339ba57e3ec1fcf2a1500b3af Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 28 Jan 2025 14:50:37 +0100 Subject: [PATCH] feat(CommandPalette): support link props in items Resolves #3190 --- .../CommandPaletteCustomSlotExample.vue | 28 +- .../CommandPaletteOpenExample.vue | 14 + .../CommandPaletteSearchTermExample.vue | 21 +- .../CommandPaletteSelectExample.vue | 41 +- docs/content/3.components/command-palette.md | 18 +- src/runtime/components/CommandPalette.vue | 81 +-- test/components/CommandPalette.spec.ts | 4 +- .../CommandPalette-vue.spec.ts.snap | 592 ++++++------------ .../__snapshots__/CommandPalette.spec.ts.snap | 592 ++++++------------ 9 files changed, 526 insertions(+), 865 deletions(-) diff --git a/docs/app/components/content/examples/command-palette/CommandPaletteCustomSlotExample.vue b/docs/app/components/content/examples/command-palette/CommandPaletteCustomSlotExample.vue index ffa4bb4b..36acd0a2 100644 --- a/docs/app/components/content/examples/command-palette/CommandPaletteCustomSlotExample.vue +++ b/docs/app/components/content/examples/command-palette/CommandPaletteCustomSlotExample.vue @@ -29,31 +29,45 @@ const groups = [{ items: [ { label: 'Benjamin Canac', - suffix: 'benjamincanac' + suffix: 'benjamincanac', + to: 'https://github.com/benjamincanac', + target: '_blank' }, { label: 'Sylvain Marroufin', - suffix: 'smarroufin' + suffix: 'smarroufin', + to: 'https://github.com/smarroufin', + target: '_blank' }, { label: 'Sébastien Chopin', - suffix: 'atinux' + suffix: 'atinux', + to: 'https://github.com/atinux', + target: '_blank' }, { label: 'Romain Hamel', - suffix: 'romhml' + suffix: 'romhml', + to: 'https://github.com/romhml', + target: '_blank' }, { label: 'Haytham A. Salama', - suffix: 'Haythamasalama' + suffix: 'Haythamasalama', + to: 'https://github.com/Haythamasalama', + target: '_blank' }, { label: 'Daniel Roe', - suffix: 'danielroe' + suffix: 'danielroe', + to: 'https://github.com/danielroe', + target: '_blank' }, { label: 'Neil Richter', - suffix: 'noook' + suffix: 'noook', + to: 'https://github.com/noook', + target: '_blank' } ] }] diff --git a/docs/app/components/content/examples/command-palette/CommandPaletteOpenExample.vue b/docs/app/components/content/examples/command-palette/CommandPaletteOpenExample.vue index 9d676815..07d01b80 100644 --- a/docs/app/components/content/examples/command-palette/CommandPaletteOpenExample.vue +++ b/docs/app/components/content/examples/command-palette/CommandPaletteOpenExample.vue @@ -5,6 +5,8 @@ const users = [ { label: 'Benjamin Canac', suffix: 'benjamincanac', + to: 'https://github.com/benjamincanac', + target: '_blank', avatar: { src: 'https://github.com/benjamincanac.png' } @@ -12,6 +14,8 @@ const users = [ { label: 'Sylvain Marroufin', suffix: 'smarroufin', + to: 'https://github.com/smarroufin', + target: '_blank', avatar: { src: 'https://github.com/smarroufin.png' } @@ -19,6 +23,8 @@ const users = [ { label: 'Sébastien Chopin', suffix: 'atinux', + to: 'https://github.com/atinux', + target: '_blank', avatar: { src: 'https://github.com/atinux.png' } @@ -26,6 +32,8 @@ const users = [ { label: 'Romain Hamel', suffix: 'romhml', + to: 'https://github.com/romhml', + target: '_blank', avatar: { src: 'https://github.com/romhml.png' } @@ -33,6 +41,8 @@ const users = [ { label: 'Haytham A. Salama', suffix: 'Haythamasalama', + to: 'https://github.com/Haythamasalama', + target: '_blank', avatar: { src: 'https://github.com/Haythamasalama.png' } @@ -40,6 +50,8 @@ const users = [ { label: 'Daniel Roe', suffix: 'danielroe', + to: 'https://github.com/danielroe', + target: '_blank', avatar: { src: 'https://github.com/danielroe.png' } @@ -47,6 +59,8 @@ const users = [ { label: 'Neil Richter', suffix: 'noook', + to: 'https://github.com/noook', + target: '_blank', avatar: { src: 'https://github.com/noook.png' } diff --git a/docs/app/components/content/examples/command-palette/CommandPaletteSearchTermExample.vue b/docs/app/components/content/examples/command-palette/CommandPaletteSearchTermExample.vue index 5926137a..52b929cf 100644 --- a/docs/app/components/content/examples/command-palette/CommandPaletteSearchTermExample.vue +++ b/docs/app/components/content/examples/command-palette/CommandPaletteSearchTermExample.vue @@ -6,8 +6,7 @@ const users = [ to: 'https://github.com/benjamincanac', target: '_blank', avatar: { - src: 'https://github.com/benjamincanac.png', - alt: 'benjamincanac' + src: 'https://github.com/benjamincanac.png' } }, { @@ -16,8 +15,7 @@ const users = [ to: 'https://github.com/smarroufin', target: '_blank', avatar: { - src: 'https://github.com/smarroufin.png', - alt: 'smarroufin' + src: 'https://github.com/smarroufin.png' } }, { @@ -26,8 +24,7 @@ const users = [ to: 'https://github.com/atinux', target: '_blank', avatar: { - src: 'https://github.com/atinux.png', - alt: 'atinux' + src: 'https://github.com/atinux.png' } }, { @@ -36,8 +33,7 @@ const users = [ to: 'https://github.com/romhml', target: '_blank', avatar: { - src: 'https://github.com/romhml.png', - alt: 'romhml' + src: 'https://github.com/romhml.png' } }, { @@ -46,8 +42,7 @@ const users = [ to: 'https://github.com/Haythamasalama', target: '_blank', avatar: { - src: 'https://github.com/Haythamasalama.png', - alt: 'Haythamasalama' + src: 'https://github.com/Haythamasalama.png' } }, { @@ -56,8 +51,7 @@ const users = [ to: 'https://github.com/danielroe', target: '_blank', avatar: { - src: 'https://github.com/danielroe.png', - alt: 'danielroe' + src: 'https://github.com/danielroe.png' } }, { @@ -66,8 +60,7 @@ const users = [ to: 'https://github.com/noook', target: '_blank', avatar: { - src: 'https://github.com/noook.png', - alt: 'noook' + src: 'https://github.com/noook.png' } } ] diff --git a/docs/app/components/content/examples/command-palette/CommandPaletteSelectExample.vue b/docs/app/components/content/examples/command-palette/CommandPaletteSelectExample.vue index 8296bd2f..de984a6b 100644 --- a/docs/app/components/content/examples/command-palette/CommandPaletteSelectExample.vue +++ b/docs/app/components/content/examples/command-palette/CommandPaletteSelectExample.vue @@ -1,5 +1,5 @@ diff --git a/docs/content/3.components/command-palette.md b/docs/content/3.components/command-palette.md index 8acaa6da..96d9acd3 100644 --- a/docs/content/3.components/command-palette.md +++ b/docs/content/3.components/command-palette.md @@ -34,7 +34,11 @@ The CommandPalette component filters groups and ranks matching commands by relev - [`postFilter?: (searchTerm: string, items: T[]) => T[]`{lang="ts-type"}](#with-post-filtered-items) - `highlightedIcon?: string`{lang="ts-type"} -Each group takes some `items` as an array of objects with the following properties: +::caution +You must provide an `id` for each group otherwise the group will be ignored. +:: + +Each group contains an `items` array of objects that define the commands. Each item can have the following properties: - `prefix?: string`{lang="ts-type"} - `label?: string`{lang="ts-type"} @@ -49,6 +53,8 @@ Each group takes some `items` as an array of objects with the following properti - [`slot?: string`{lang="ts-type"}](#with-custom-slot) - `onSelect?(e?: Event): void`{lang="ts-type"} +You can pass any property from the [Link](/components/link#props) component such as `to`, `target`, etc. + ::component-code --- collapse: true @@ -98,10 +104,6 @@ props: --- :: -::caution -You must provide an `id` for each group otherwise the group will be ignored. -:: - ### Multiple Use the `multiple` prop to allow multiple selections. @@ -437,7 +439,7 @@ You can customize this icon globally in your `vite.config.ts` under `ui.icons.cl ### Control selected item(s) -You can control the selected item by using the `default-value` prop or the `v-model` directive, by using the `select` field on each item or by using the `@update:model-value` event. +You can control the selected item(s) by using the `default-value` prop or the `v-model` directive, by using the `onSelect` field on each item or by using the `@update:model-value` event. ::component-example --- @@ -447,10 +449,6 @@ class: '!p-0' --- :: -::note -This example demonstrates how to use the `@update:model-value` event to handle different selection scenarios. -:: - ### Control search term Use the `v-model:search-term` directive to control the search term. diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 9cf06ca1..f6b743ad 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -8,14 +8,14 @@ import theme from '#build/ui/command-palette' import type { UseComponentIconsProps } from '../composables/useComponentIcons' import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta' import { tv } from '../utils/tv' -import type { AvatarProps, ButtonProps, ChipProps, KbdProps, InputProps } from '../types' +import type { AvatarProps, ButtonProps, ChipProps, KbdProps, InputProps, LinkProps } from '../types' import type { DynamicSlots, PartialString } from '../types/utils' const appConfigCommandPalette = _appConfig as AppConfig & { ui: { commandPalette: Partial } } const commandPalette = tv({ extend: tv(theme), ...(appConfigCommandPalette.ui?.commandPalette || {}) }) -export interface CommandPaletteItem { +export interface CommandPaletteItem extends Omit { prefix?: string label?: string suffix?: string @@ -136,12 +136,15 @@ import { useAppConfig } from '#imports' import { useLocale } from '../composables/useLocale' import { omit, get } from '../utils' import { highlight } from '../utils/fuse' +import { pickLinkProps } from '../utils/link' import UIcon from './Icon.vue' import UAvatar from './Avatar.vue' import UButton from './Button.vue' import UChip from './Chip.vue' -import UKbd from './Kbd.vue' +import ULinkBase from './LinkBase.vue' +import ULink from './Link.vue' import UInput from './Input.vue' +import UKbd from './Kbd.vue' const props = withDefaults(defineProps>(), { modelValue: '', @@ -281,47 +284,51 @@ const groups = computed(() => { :key="`group-${groupIndex}-${index}`" :value="omit(item, ['matches' as any, 'group' as any, 'onSelect', 'labelHtml', 'suffixHtml'])" :disabled="item.disabled" - :class="ui.item({ class: props.ui?.item, active: item.active })" + as-child @select="item.onSelect" > - - - - - - - + + + + + + + + + - - - {{ item.prefix }} + + + {{ item.prefix }} - + - - - - - - - - + + - - - - - - - + + + + + + + + + + + + + + + diff --git a/test/components/CommandPalette.spec.ts b/test/components/CommandPalette.spec.ts index 0f49a84b..44d4cf4b 100644 --- a/test/components/CommandPalette.spec.ts +++ b/test/components/CommandPalette.spec.ts @@ -55,7 +55,9 @@ describe('CommandPalette', () => { label: 'benjamincanac', avatar: { src: 'https://github.com/benjamincanac.png' - } + }, + to: 'https://github.com/benjamincanac', + target: '_blank' }] }] diff --git a/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap b/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap index 6a933fb6..bc16777b 100644 --- a/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap +++ b/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap @@ -8,35 +8,27 @@ exports[`CommandPalette > renders with as correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -52,35 +44,27 @@ exports[`CommandPalette > renders with class correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -94,35 +78,27 @@ exports[`CommandPalette > renders with close correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -136,35 +112,27 @@ exports[`CommandPalette > renders with close slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -178,35 +146,27 @@ exports[`CommandPalette > renders with closeIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -222,33 +182,25 @@ exports[`CommandPalette > renders with custom slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Custom slot
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -264,35 +216,27 @@ exports[`CommandPalette > renders with defaultValue correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -308,35 +252,27 @@ exports[`CommandPalette > renders with disabled correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -352,35 +288,27 @@ exports[`CommandPalette > renders with empty slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -396,35 +324,27 @@ exports[`CommandPalette > renders with groups correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -440,35 +360,27 @@ exports[`CommandPalette > renders with icon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -484,23 +396,15 @@ exports[`CommandPalette > renders with item slot correctly 1`] = `
- -
Item slot
-
Item slot
-
Item slot
-
Add labelAdd a label to the current item. +
+
-
Labels
-
Item slot
-
Item slot
-
Item slot
+
Labels
-
Users
-
Item slot
+
Users
Item slot
@@ -516,35 +420,27 @@ exports[`CommandPalette > renders with item-label slot correctly 1`] = `
- -
Item label slot +
-
Item label slot +
-
Item label slot +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 Item label slot
+
Users
 Item label slot
@@ -560,29 +456,21 @@ exports[`CommandPalette > renders with item-leading slot correctly 1`] = `
- -
Item leading slotAdd new fileCreate a new file in the current directory or workspace. +
-
Item leading slotAdd new folderCreate a new folder in the current directory or workspace. +
-
Item leading slotAdd hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
Item leading slotbug
-
Item leading slotfeature
-
Item leading slotenhancement
+
Labels
-
Users
-
Item leading slotbenjamincanac
+
Users
Item leading slotbenjamincanac
@@ -598,29 +486,21 @@ exports[`CommandPalette > renders with item-trailing slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace.Item trailing slot
-
Add new folderCreate a new folder in the current directory or workspace.Item trailing slot
-
Add hashtagAdd a hashtag to the current item.Item trailing slot
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanacItem trailing slot
+
Users
 benjamincanacItem trailing slot
@@ -636,40 +516,32 @@ exports[`CommandPalette > renders with labelKey correctly 1`] = `
- -
i-lucide-file-plusCreate a new file in the current directory or workspace. +
-
i-lucide-folder-plusCreate a new folder in the current directory or workspace. +
-
i-lucide-hashAdd a hashtag to the current item. +
-
i-lucide-tagAdd a label to the current item. +
+
- -
+
-
+
-
+
+
- -
  +   -
+
@@ -685,35 +557,27 @@ exports[`CommandPalette > renders with loading correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -729,35 +593,27 @@ exports[`CommandPalette > renders with loadingIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -773,35 +629,27 @@ exports[`CommandPalette > renders with modelValue correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -817,35 +665,27 @@ exports[`CommandPalette > renders with placeholder correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -861,35 +701,27 @@ exports[`CommandPalette > renders with selectedIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -905,35 +737,27 @@ exports[`CommandPalette > renders with ui correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
diff --git a/test/components/__snapshots__/CommandPalette.spec.ts.snap b/test/components/__snapshots__/CommandPalette.spec.ts.snap index 86436afa..c02e03b0 100644 --- a/test/components/__snapshots__/CommandPalette.spec.ts.snap +++ b/test/components/__snapshots__/CommandPalette.spec.ts.snap @@ -8,35 +8,27 @@ exports[`CommandPalette > renders with as correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -52,35 +44,27 @@ exports[`CommandPalette > renders with class correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -97,35 +81,27 @@ exports[`CommandPalette > renders with close correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -139,35 +115,27 @@ exports[`CommandPalette > renders with close slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -184,35 +152,27 @@ exports[`CommandPalette > renders with closeIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -228,33 +188,25 @@ exports[`CommandPalette > renders with custom slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Custom slot
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -270,35 +222,27 @@ exports[`CommandPalette > renders with defaultValue correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -314,35 +258,27 @@ exports[`CommandPalette > renders with disabled correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -358,35 +294,27 @@ exports[`CommandPalette > renders with empty slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -402,35 +330,27 @@ exports[`CommandPalette > renders with groups correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -446,35 +366,27 @@ exports[`CommandPalette > renders with icon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -490,23 +402,15 @@ exports[`CommandPalette > renders with item slot correctly 1`] = `
- -
Item slot
-
Item slot
-
Item slot
-
Add labelAdd a label to the current item. +
+
-
Labels
-
Item slot
-
Item slot
-
Item slot
+
Labels
-
Users
-
Item slot
+
Users
Item slot
@@ -522,35 +426,27 @@ exports[`CommandPalette > renders with item-label slot correctly 1`] = `
- -
Item label slot +
-
Item label slot +
-
Item label slot +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 Item label slot
+
Users
 Item label slot
@@ -566,29 +462,21 @@ exports[`CommandPalette > renders with item-leading slot correctly 1`] = `
- -
Item leading slotAdd new fileCreate a new file in the current directory or workspace. +
-
Item leading slotAdd new folderCreate a new folder in the current directory or workspace. +
-
Item leading slotAdd hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
Item leading slotbug
-
Item leading slotfeature
-
Item leading slotenhancement
+
Labels
-
Users
-
Item leading slotbenjamincanac
+
Users
Item leading slotbenjamincanac
@@ -604,29 +492,21 @@ exports[`CommandPalette > renders with item-trailing slot correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace.Item trailing slot
-
Add new folderCreate a new folder in the current directory or workspace.Item trailing slot
-
Add hashtagAdd a hashtag to the current item.Item trailing slot
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanacItem trailing slot
+
Users
 benjamincanacItem trailing slot
@@ -642,40 +522,32 @@ exports[`CommandPalette > renders with labelKey correctly 1`] = `
- -
i-lucide-file-plusCreate a new file in the current directory or workspace. +
-
i-lucide-folder-plusCreate a new folder in the current directory or workspace. +
-
i-lucide-hashAdd a hashtag to the current item. +
-
i-lucide-tagAdd a label to the current item. +
+
- -
+
-
+
-
+
+
- -
  +   -
+
@@ -691,35 +563,27 @@ exports[`CommandPalette > renders with loading correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -735,35 +599,27 @@ exports[`CommandPalette > renders with loadingIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -779,35 +635,27 @@ exports[`CommandPalette > renders with modelValue correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -823,35 +671,27 @@ exports[`CommandPalette > renders with placeholder correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -867,35 +707,27 @@ exports[`CommandPalette > renders with selectedIcon correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac
@@ -911,35 +743,27 @@ exports[`CommandPalette > renders with ui correctly 1`] = `
- -
Add new fileCreate a new file in the current directory or workspace. +
-
Add new folderCreate a new folder in the current directory or workspace. +
-
Add hashtagAdd a hashtag to the current item. +
-
Add labelAdd a label to the current item. +
+
-
Labels
-
+
Labels
-
+
-
+
+
-
Users
-
 benjamincanac
+
Users
 benjamincanac