diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index c8ca92f4..2dd3cbe4 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -618,6 +618,20 @@ export const Index = { component: () => import('../src/lib/registry/default/example/TabsDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/TabsDemo.vue'], }, + TagsInputComboDemo: { + name: 'TagsInputComboDemo', + type: 'components:example', + registryDependencies: ['utils', 'button', 'command', 'popover', 'tags-input'], + component: () => import('../src/lib/registry/default/example/TagsInputComboDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/TagsInputComboDemo.vue'], + }, + TagsInputDemo: { + name: 'TagsInputDemo', + type: 'components:example', + registryDependencies: ['tags-input'], + component: () => import('../src/lib/registry/default/example/TagsInputDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/TagsInputDemo.vue'], + }, TextareaDemo: { name: 'TextareaDemo', type: 'components:example', @@ -1523,6 +1537,20 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/TabsDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/TabsDemo.vue'], }, + TagsInputComboDemo: { + name: 'TagsInputComboDemo', + type: 'components:example', + registryDependencies: ['utils', 'button', 'command', 'popover', 'tags-input'], + component: () => import('../src/lib/registry/new-york/example/TagsInputComboDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/TagsInputComboDemo.vue'], + }, + TagsInputDemo: { + name: 'TagsInputDemo', + type: 'components:example', + registryDependencies: ['tags-input'], + component: () => import('../src/lib/registry/new-york/example/TagsInputDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/TagsInputDemo.vue'], + }, TextareaDemo: { name: 'TextareaDemo', type: 'components:example', diff --git a/apps/www/src/content/docs/components/tags-input.md b/apps/www/src/content/docs/components/tags-input.md new file mode 100644 index 00000000..6854b92a --- /dev/null +++ b/apps/www/src/content/docs/components/tags-input.md @@ -0,0 +1,21 @@ +--- +title: Tags Input +description: Tag inputs render tags inside an input, followed by an actual text input. +source: apps/www/src/lib/registry/default/ui/tags-input +primitive: https://www.radix-vue.com/components/tags-input.html +--- + + + +## Installation + +```bash +npx shadcn-vue@latest add tags-input +``` + + +## Usage + +### Multiple Combobox + + diff --git a/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue b/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue index 8261aefc..4ee0ff54 100644 --- a/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue +++ b/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue @@ -84,7 +84,8 @@ const selectedValues = computed(() => new Set(props.column?.getFilterValue() as v-for="option in options" :key="option.value" :value="option" - @select="() => { + @select="(e) => { + console.log(e.detail.value) const isSelected = selectedValues.has(option.value) if (isSelected) { selectedValues.delete(option.value) diff --git a/apps/www/src/lib/registry/default/example/TagsInputComboDemo.vue b/apps/www/src/lib/registry/default/example/TagsInputComboDemo.vue new file mode 100644 index 00000000..632a1dc0 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/TagsInputComboDemo.vue @@ -0,0 +1,74 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/TagsInputDemo.vue b/apps/www/src/lib/registry/default/example/TagsInputDemo.vue new file mode 100644 index 00000000..260005b6 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/TagsInputDemo.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue new file mode 100644 index 00000000..acf6bd3c --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue new file mode 100644 index 00000000..c55b2b65 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue new file mode 100644 index 00000000..e2aa1336 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue new file mode 100644 index 00000000..544eebc4 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue new file mode 100644 index 00000000..91ade8b6 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/tags-input/index.ts b/apps/www/src/lib/registry/default/ui/tags-input/index.ts new file mode 100644 index 00000000..31305f34 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/tags-input/index.ts @@ -0,0 +1,5 @@ +export { default as TagsInput } from './TagsInput.vue' +export { default as TagsInputInput } from './TagsInputInput.vue' +export { default as TagsInputItem } from './TagsInputItem.vue' +export { default as TagsInputItemDelete } from './TagsInputItemDelete.vue' +export { default as TagsInputItemText } from './TagsInputItemText.vue' diff --git a/apps/www/src/lib/registry/new-york/example/TagsInputComboDemo.vue b/apps/www/src/lib/registry/new-york/example/TagsInputComboDemo.vue new file mode 100644 index 00000000..b2a8bdfe --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/TagsInputComboDemo.vue @@ -0,0 +1,73 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue b/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue new file mode 100644 index 00000000..b744bc9a --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue new file mode 100644 index 00000000..5989dc20 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue new file mode 100644 index 00000000..c55b2b65 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue new file mode 100644 index 00000000..e2aa1336 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue new file mode 100644 index 00000000..c72ee631 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue new file mode 100644 index 00000000..8948bd07 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts b/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts new file mode 100644 index 00000000..31305f34 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts @@ -0,0 +1,5 @@ +export { default as TagsInput } from './TagsInput.vue' +export { default as TagsInputInput } from './TagsInputInput.vue' +export { default as TagsInputItem } from './TagsInputItem.vue' +export { default as TagsInputItemDelete } from './TagsInputItemDelete.vue' +export { default as TagsInputItemText } from './TagsInputItemText.vue' diff --git a/apps/www/src/public/registry/index.json b/apps/www/src/public/registry/index.json index 9589b3b6..ab400e20 100644 --- a/apps/www/src/public/registry/index.json +++ b/apps/www/src/public/registry/index.json @@ -580,6 +580,23 @@ ], "type": "components:ui" }, + { + "name": "tags-input", + "dependencies": [], + "registryDependencies": [ + "utils", + "button" + ], + "files": [ + "ui/tags-input/TagsInput.vue", + "ui/tags-input/TagsInputInput.vue", + "ui/tags-input/TagsInputItem.vue", + "ui/tags-input/TagsInputItemDelete.vue", + "ui/tags-input/TagsInputItemText.vue", + "ui/tags-input/index.ts" + ], + "type": "components:ui" + }, { "name": "textarea", "dependencies": [ diff --git a/apps/www/src/public/registry/styles/default/tags-input.json b/apps/www/src/public/registry/styles/default/tags-input.json new file mode 100644 index 00000000..f47f973d --- /dev/null +++ b/apps/www/src/public/registry/styles/default/tags-input.json @@ -0,0 +1,35 @@ +{ + "name": "tags-input", + "dependencies": [], + "registryDependencies": [ + "utils", + "button" + ], + "files": [ + { + "name": "TagsInput.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputInput.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItem.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItemDelete.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItemText.vue", + "content": "\n\n\n" + }, + { + "name": "index.ts", + "content": "export { default as TagsInput } from './TagsInput.vue'\nexport { default as TagsInputInput } from './TagsInputInput.vue'\nexport { default as TagsInputItem } from './TagsInputItem.vue'\nexport { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'\nexport { default as TagsInputItemText } from './TagsInputItemText.vue'\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/src/public/registry/styles/new-york/tags-input.json b/apps/www/src/public/registry/styles/new-york/tags-input.json new file mode 100644 index 00000000..6ba10e8f --- /dev/null +++ b/apps/www/src/public/registry/styles/new-york/tags-input.json @@ -0,0 +1,35 @@ +{ + "name": "tags-input", + "dependencies": [], + "registryDependencies": [ + "utils", + "button" + ], + "files": [ + { + "name": "TagsInput.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputInput.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItem.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItemDelete.vue", + "content": "\n\n\n" + }, + { + "name": "TagsInputItemText.vue", + "content": "\n\n\n" + }, + { + "name": "index.ts", + "content": "export { default as TagsInput } from './TagsInput.vue'\nexport { default as TagsInputInput } from './TagsInputInput.vue'\nexport { default as TagsInputItem } from './TagsInputItem.vue'\nexport { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'\nexport { default as TagsInputItemText } from './TagsInputItemText.vue'\n" + } + ], + "type": "components:ui" +} \ No newline at end of file