Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/v4/components/demo/InputFile.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup lang="ts">
import { Input } from '@/registry/new-york-v4/ui/input'
import { Label } from '@/registry/new-york-v4/ui/label'
</script>

<template>
<div class="grid w-full max-w-sm items-center gap-1.5">
<Label for="picture">Picture</Label>
<Input id="picture" type="file" />
</div>
</template>
49 changes: 49 additions & 0 deletions apps/v4/content/docs/components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,52 @@ import { Input } from '@/components/ui/input'
<Input />
</template>
```

## Examples

### Default

::component-preview
---
name: InputDemo
class: '[&_input]:max-w-xs'
description: A default input component.
---
::

### File

::component-preview
---
name: InputFile
description: An input with a file upload field.
---
::

### Disabled

::component-preview
---
name: InputDisabled
class: '[&_input]:max-w-xs'
description: A disabled input component.
---
::

### With Label

::component-preview
---
name: InputWithLabel
description: An input with a label.
---
::

### With Button

::component-preview
---
name: InputWithButton
description: An input with a button.
---
::
2 changes: 1 addition & 1 deletion apps/v4/public/r/styles/new-york-v4/navigation-menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"path": "registry/new-york-v4/ui/navigation-menu/NavigationMenuLink.vue",
"content": "<script setup lang=\"ts\">\nimport type { NavigationMenuLinkEmits, NavigationMenuLinkProps } from \"reka-ui\"\nimport type { HTMLAttributes } from \"vue\"\nimport { reactiveOmit } from \"@vueuse/core\"\nimport {\n NavigationMenuLink,\n useForwardPropsEmits,\n} from \"reka-ui\"\nimport { cn } from \"@/lib/utils\"\n\nconst props = defineProps<NavigationMenuLinkProps & { class?: HTMLAttributes[\"class\"] }>()\nconst emits = defineEmits<NavigationMenuLinkEmits>()\n\nconst delegatedProps = reactiveOmit(props, \"class\")\nconst forwarded = useForwardPropsEmits(delegatedProps, emits)\n</script>\n\n<template>\n <NavigationMenuLink\n data-slot=\"navigation-menu-link\"\n v-bind=\"forwarded\"\n :class=\"cn('data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 [&_svg:not([class*=\\'text-\\'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*=\\'size-\\'])]:size-4', props.class)\"\n >\n <slot />\n </NavigationMenuLink>\n</template>\n",
"content": "<script setup lang=\"ts\">\nimport type { NavigationMenuLinkEmits, NavigationMenuLinkProps } from \"reka-ui\"\nimport type { HTMLAttributes } from \"vue\"\nimport { reactiveOmit } from \"@vueuse/core\"\nimport {\n NavigationMenuLink,\n useForwardPropsEmits,\n} from \"reka-ui\"\nimport { cn } from \"@/lib/utils\"\n\nconst props = defineProps<NavigationMenuLinkProps & { class?: HTMLAttributes[\"class\"] }>()\nconst emits = defineEmits<NavigationMenuLinkEmits>()\n\nconst delegatedProps = reactiveOmit(props, \"class\")\nconst forwarded = useForwardPropsEmits(delegatedProps, emits)\n</script>\n\n<template>\n <NavigationMenuLink\n data-slot=\"navigation-menu-link\"\n v-bind=\"forwarded\"\n :class=\"cn('data-active:focus:bg-accent data-active:hover:bg-accent data-active:bg-accent/50 data-active:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 [&_svg:not([class*=\\'text-\\'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*=\\'size-\\'])]:size-4', props.class)\"\n >\n <slot />\n </NavigationMenuLink>\n</template>\n",
"type": "registry:ui"
},
{
Expand Down