25 lines
1.4 KiB
JSON
25 lines
1.4 KiB
JSON
{
|
|
"name": "input",
|
|
"type": "registry:ui",
|
|
"dependencies": [
|
|
"@vueuse/core"
|
|
],
|
|
"registryDependencies": [
|
|
"utils"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "ui/input/Input.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\nimport { useVModel } from '@vueuse/core'\n\nconst props = defineProps<{\n defaultValue?: string | number\n modelValue?: string | number\n class?: HTMLAttributes['class']\n}>()\n\nconst emits = defineEmits<{\n (e: 'update:modelValue', payload: string | number): void\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n passive: true,\n defaultValue: props.defaultValue,\n})\n</script>\n\n<template>\n <input v-model=\"modelValue\" :class=\"cn('flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', props.class)\">\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "input/Input.vue"
|
|
},
|
|
{
|
|
"path": "ui/input/index.ts",
|
|
"content": "export { default as Input } from './Input.vue'\n",
|
|
"type": "registry:ui",
|
|
"target": "input/index.ts"
|
|
}
|
|
]
|
|
}
|