mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
add command palette
This commit is contained in:
27
resources/js/packages/ui/src/command/index.ts
Normal file
27
resources/js/packages/ui/src/command/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { Ref } from 'vue';
|
||||
import { createContext } from 'reka-ui';
|
||||
|
||||
export { default as Command } from './Command.vue';
|
||||
export { default as CommandGroup } from './CommandGroup.vue';
|
||||
export { default as CommandInput } from './CommandInput.vue';
|
||||
export { default as CommandItem } from './CommandItem.vue';
|
||||
export { default as CommandList } from './CommandList.vue';
|
||||
export { default as CommandSeparator } from './CommandSeparator.vue';
|
||||
export { default as CommandShortcut } from './CommandShortcut.vue';
|
||||
|
||||
export const [useCommand, provideCommandContext] = createContext<{
|
||||
allItems: Ref<Map<string, string>>;
|
||||
allGroups: Ref<Map<string, Set<string>>>;
|
||||
filterState: {
|
||||
search: string;
|
||||
filtered: {
|
||||
count: number;
|
||||
items: Map<string, number>;
|
||||
groups: Set<string>;
|
||||
};
|
||||
};
|
||||
}>('Command');
|
||||
|
||||
export const [useCommandGroup, provideCommandGroupContext] = createContext<{
|
||||
id?: string;
|
||||
}>('CommandGroup');
|
||||
Reference in New Issue
Block a user