diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index 4f69dc39..7432c50a 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -254,6 +254,12 @@ export const docsConfig: DocsConfig = { href: '/docs/components/pagination', items: [], }, + { + title: 'Pin Input', + href: '/docs/components/pin-input', + label: 'New', + items: [], + }, { title: 'Popover', href: '/docs/components/popover', diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index eb11f890..3bee58c3 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -492,6 +492,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/PinInputDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/PinInputDemo.vue'], }, + PinInputFormDemo: { + name: 'PinInputFormDemo', + type: 'components:example', + registryDependencies: ['pin-input', 'button', 'form', 'toast'], + component: () => import('../src/lib/registry/default/example/PinInputFormDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/PinInputFormDemo.vue'], + }, PopoverDemo: { name: 'PopoverDemo', type: 'components:example', @@ -1404,6 +1411,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/PinInputDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/PinInputDemo.vue'], }, + PinInputFormDemo: { + name: 'PinInputFormDemo', + type: 'components:example', + registryDependencies: ['pin-input', 'button', 'form', 'toast'], + component: () => import('../src/lib/registry/new-york/example/PinInputFormDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/PinInputFormDemo.vue'], + }, PopoverDemo: { name: 'PopoverDemo', type: 'components:example', diff --git a/apps/www/src/content/docs/components/pin-input.md b/apps/www/src/content/docs/components/pin-input.md index b44e02c9..207e11c4 100644 --- a/apps/www/src/content/docs/components/pin-input.md +++ b/apps/www/src/content/docs/components/pin-input.md @@ -7,3 +7,15 @@ primitive: https://www.radix-vue.com/components/pin-input.html + +## Installation + +```bash +npx shadcn-vue@latest add pin-input +``` + +## Usage + +### Form + + diff --git a/apps/www/src/lib/registry/default/example/PinInputDemo.vue b/apps/www/src/lib/registry/default/example/PinInputDemo.vue index 1a581d26..fb5d5c93 100644 --- a/apps/www/src/lib/registry/default/example/PinInputDemo.vue +++ b/apps/www/src/lib/registry/default/example/PinInputDemo.vue @@ -25,6 +25,4 @@ const handleComplete = (e: string[]) => alert(e.join('')) /> - - {{ value }} diff --git a/apps/www/src/lib/registry/default/example/PinInputFormDemo.vue b/apps/www/src/lib/registry/default/example/PinInputFormDemo.vue new file mode 100644 index 00000000..09317d93 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/PinInputFormDemo.vue @@ -0,0 +1,78 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/pin-input/PinInput.vue b/apps/www/src/lib/registry/default/ui/pin-input/PinInput.vue index c985bb30..9a5edb97 100644 --- a/apps/www/src/lib/registry/default/ui/pin-input/PinInput.vue +++ b/apps/www/src/lib/registry/default/ui/pin-input/PinInput.vue @@ -11,7 +11,7 @@ const delegatedProps = computed(() => { return delegated }) -const forwarded = useForwardPropsEmits(delegatedProps.value, emits) +const forwarded = useForwardPropsEmits(delegatedProps, emits)