docs: replace import of custom 'ListItem' component with inline html
This commit is contained in:
parent
0f1befad1f
commit
3723649d1b
|
|
@ -752,13 +752,6 @@ export const Index = {
|
||||||
component: () => import("../src/lib/registry/default/example/NavigationMenuDemo.vue").then((m) => m.default),
|
component: () => import("../src/lib/registry/default/example/NavigationMenuDemo.vue").then((m) => m.default),
|
||||||
files: ["../src/lib/registry/default/example/NavigationMenuDemo.vue"],
|
files: ["../src/lib/registry/default/example/NavigationMenuDemo.vue"],
|
||||||
},
|
},
|
||||||
"NavigationMenuDemoItem": {
|
|
||||||
name: "NavigationMenuDemoItem",
|
|
||||||
type: "components:example",
|
|
||||||
registryDependencies: ["utils","navigation-menu"],
|
|
||||||
component: () => import("../src/lib/registry/default/example/NavigationMenuDemoItem.vue").then((m) => m.default),
|
|
||||||
files: ["../src/lib/registry/default/example/NavigationMenuDemoItem.vue"],
|
|
||||||
},
|
|
||||||
"NumberFieldCurrency": {
|
"NumberFieldCurrency": {
|
||||||
name: "NumberFieldCurrency",
|
name: "NumberFieldCurrency",
|
||||||
type: "components:example",
|
type: "components:example",
|
||||||
|
|
@ -2202,13 +2195,6 @@ export const Index = {
|
||||||
component: () => import("../src/lib/registry/new-york/example/NavigationMenuDemo.vue").then((m) => m.default),
|
component: () => import("../src/lib/registry/new-york/example/NavigationMenuDemo.vue").then((m) => m.default),
|
||||||
files: ["../src/lib/registry/new-york/example/NavigationMenuDemo.vue"],
|
files: ["../src/lib/registry/new-york/example/NavigationMenuDemo.vue"],
|
||||||
},
|
},
|
||||||
"NavigationMenuDemoItem": {
|
|
||||||
name: "NavigationMenuDemoItem",
|
|
||||||
type: "components:example",
|
|
||||||
registryDependencies: ["utils","navigation-menu"],
|
|
||||||
component: () => import("../src/lib/registry/new-york/example/NavigationMenuDemoItem.vue").then((m) => m.default),
|
|
||||||
files: ["../src/lib/registry/new-york/example/NavigationMenuDemoItem.vue"],
|
|
||||||
},
|
|
||||||
"NumberFieldCurrency": {
|
"NumberFieldCurrency": {
|
||||||
name: "NumberFieldCurrency",
|
name: "NumberFieldCurrency",
|
||||||
type: "components:example",
|
type: "components:example",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ListItem from './NavigationMenuDemoItem.vue'
|
|
||||||
import {
|
import {
|
||||||
NavigationMenu,
|
NavigationMenu,
|
||||||
NavigationMenuContent,
|
NavigationMenuContent,
|
||||||
|
|
@ -73,15 +72,46 @@ const components: { title: string, href: string, description: string }[] = [
|
||||||
</a>
|
</a>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</li>
|
</li>
|
||||||
<ListItem href="/docs" title="Introduction">
|
|
||||||
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Introduction</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
Re-usable components built using Radix UI and Tailwind CSS.
|
Re-usable components built using Radix UI and Tailwind CSS.
|
||||||
</ListItem>
|
</p>
|
||||||
<ListItem href="/docs/installation" title="Installation">
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs/installation"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Installation</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
How to install dependencies and structure your app.
|
How to install dependencies and structure your app.
|
||||||
</ListItem>
|
</p>
|
||||||
<ListItem href="/docs/primitives/typography" title="Typography">
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs/primitives/typography"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Typography</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
Styles for headings, paragraphs, lists...etc
|
Styles for headings, paragraphs, lists...etc
|
||||||
</ListItem>
|
</p>
|
||||||
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</NavigationMenuContent>
|
</NavigationMenuContent>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
@ -89,14 +119,19 @@ const components: { title: string, href: string, description: string }[] = [
|
||||||
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<ul class="grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ">
|
<ul class="grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ">
|
||||||
<ListItem
|
<li v-for="component in components" :key="component.title">
|
||||||
v-for="component in components"
|
<NavigationMenuLink as-child>
|
||||||
:key="component.title"
|
<a
|
||||||
:title="component.title"
|
|
||||||
:href="component.href"
|
:href="component.href"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
>
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">{{ component.title }}</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
{{ component.description }}
|
{{ component.description }}
|
||||||
</ListItem>
|
</p>
|
||||||
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</NavigationMenuContent>
|
</NavigationMenuContent>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { cn } from '@/lib/utils'
|
|
||||||
import {
|
|
||||||
NavigationMenuLink,
|
|
||||||
} from '@/lib/registry/default/ui/navigation-menu'
|
|
||||||
|
|
||||||
defineProps<{ title?: string, href?: string }>()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<li>
|
|
||||||
<NavigationMenuLink as-child>
|
|
||||||
<a
|
|
||||||
:href="href"
|
|
||||||
:class="cn(
|
|
||||||
'block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground',
|
|
||||||
$attrs.class ?? '',
|
|
||||||
)"
|
|
||||||
>
|
|
||||||
<div class="text-sm font-medium leading-none">{{ title }}</div>
|
|
||||||
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
|
||||||
<slot />
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</NavigationMenuLink>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ListItem from './NavigationMenuDemoItem.vue'
|
|
||||||
import {
|
import {
|
||||||
NavigationMenu,
|
NavigationMenu,
|
||||||
NavigationMenuContent,
|
NavigationMenuContent,
|
||||||
|
|
@ -73,15 +72,45 @@ const components: { title: string, href: string, description: string }[] = [
|
||||||
</a>
|
</a>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</li>
|
</li>
|
||||||
<ListItem href="/docs" title="Introduction">
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Introduction</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
Re-usable components built using Radix UI and Tailwind CSS.
|
Re-usable components built using Radix UI and Tailwind CSS.
|
||||||
</ListItem>
|
</p>
|
||||||
<ListItem href="/docs/installation" title="Installation">
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs/installation"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Installation</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
How to install dependencies and structure your app.
|
How to install dependencies and structure your app.
|
||||||
</ListItem>
|
</p>
|
||||||
<ListItem href="/docs/primitives/typography" title="Typography">
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<NavigationMenuLink as-child>
|
||||||
|
<a
|
||||||
|
href="/docs/primitives/typography"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">Typography</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
Styles for headings, paragraphs, lists...etc
|
Styles for headings, paragraphs, lists...etc
|
||||||
</ListItem>
|
</p>
|
||||||
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</NavigationMenuContent>
|
</NavigationMenuContent>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
@ -89,14 +118,19 @@ const components: { title: string, href: string, description: string }[] = [
|
||||||
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<ul class="grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ">
|
<ul class="grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ">
|
||||||
<ListItem
|
<li v-for="component in components" :key="component.title">
|
||||||
v-for="component in components"
|
<NavigationMenuLink as-child>
|
||||||
:key="component.title"
|
<a
|
||||||
:title="component.title"
|
|
||||||
:href="component.href"
|
:href="component.href"
|
||||||
|
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
|
||||||
>
|
>
|
||||||
|
<div class="text-sm font-medium leading-none">{{ component.title }}</div>
|
||||||
|
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
||||||
{{ component.description }}
|
{{ component.description }}
|
||||||
</ListItem>
|
</p>
|
||||||
|
</a>
|
||||||
|
</NavigationMenuLink>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</NavigationMenuContent>
|
</NavigationMenuContent>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { cn } from '@/lib/utils'
|
|
||||||
import {
|
|
||||||
NavigationMenuLink,
|
|
||||||
} from '@/lib/registry/new-york/ui/navigation-menu'
|
|
||||||
|
|
||||||
defineProps<{ title?: string, href?: string }>()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<li>
|
|
||||||
<NavigationMenuLink as-child>
|
|
||||||
<a
|
|
||||||
:href="href"
|
|
||||||
:class="cn(
|
|
||||||
'block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground',
|
|
||||||
$attrs.class ?? '',
|
|
||||||
)"
|
|
||||||
>
|
|
||||||
<div class="text-sm font-medium leading-none">{{ title }}</div>
|
|
||||||
<p class="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
|
||||||
<slot />
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</NavigationMenuLink>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
Loading…
Reference in New Issue
Block a user