File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
apps/www/src/lib/registry Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
+ import { useAttrs } from ' vue'
2
3
import { useVModel } from ' @vueuse/core'
3
4
import { cn } from ' @/lib/utils'
4
5
6
+ defineOptions ({
7
+ inheritAttrs: false ,
8
+ })
9
+
5
10
const props = defineProps <{
6
11
defaultValue? : string | number
7
12
modelValue? : string | number
@@ -11,12 +16,14 @@ const emits = defineEmits<{
11
16
(e : ' update:modelValue' , payload : string | number ): void
12
17
}>()
13
18
19
+ const { class : className, ... rest } = useAttrs ()
20
+
14
21
const modelValue = useVModel (props , ' modelValue' , emits , {
15
22
passive: true ,
16
23
defaultValue: props .defaultValue ,
17
24
})
18
25
</script >
19
26
20
27
<template >
21
- <input v-model =" modelValue" type = " text " :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', $attrs.class ?? '')" >
28
+ <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', className ?? '')" v-bind = " rest " >
22
29
</template >
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
+ import { useAttrs } from ' vue'
2
3
import { useVModel } from ' @vueuse/core'
3
4
import { cn } from ' @/lib/utils'
4
5
6
+ defineOptions ({
7
+ inheritAttrs: false ,
8
+ })
9
+
5
10
const props = defineProps <{
6
11
defaultValue? : string | number
7
12
modelValue? : string | number
@@ -11,12 +16,14 @@ const emits = defineEmits<{
11
16
(e : ' update:modelValue' , payload : string | number ): void
12
17
}>()
13
18
19
+ const { class : className, ... rest } = useAttrs ()
20
+
14
21
const modelValue = useVModel (props , ' modelValue' , emits , {
15
22
passive: true ,
16
23
defaultValue: props .defaultValue ,
17
24
})
18
25
</script >
19
26
20
27
<template >
21
- <input v-model =" modelValue" type = " text " :class =" cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', $attrs.class ?? '')" >
28
+ <input v-model =" modelValue" :class =" cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className ?? '')" v-bind = " rest " >
22
29
</template >
You can’t perform that action at this time.
0 commit comments