-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): update components and dependencies (#448)
- Loading branch information
1 parent
737f63b
commit 194123a
Showing
14 changed files
with
976 additions
and
790 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup lang="ts"> | ||
import type { NavItem } from '@nuxt/content/dist/runtime/types' | ||
import type { Link } from '#ui-pro/types' | ||
defineProps<{ | ||
links?: Link[] | ||
}>() | ||
const navigation = inject<Ref<NavItem[]>>('navigation') | ||
const { metaSymbol } = useShortcuts() | ||
const mobileNav = computed(() => { | ||
const links = mapContentNavigation(navigation.value) | ||
// Show Migration and Bridge on mobile only when user is reading them | ||
const docsLink = links.find(link => link.to === '/primitives') | ||
if (docsLink) | ||
docsLink.children = docsLink.children.filter(link => !['/docs/bridge', '/docs/migration'].includes(link.to as string)) | ||
return links | ||
}) | ||
</script> | ||
|
||
<template> | ||
<UHeader :links="links"> | ||
<template #logo> | ||
<NuxtLink to="/" class="flex items-center gap-1.5 font-bold text-xl text-gray-900 dark:text-white" aria-label="Oku"> | ||
<PrimitivesLogo class="w-auto h-6" /> | ||
Primitives | ||
</NuxtLink> | ||
</template> | ||
|
||
<template #right> | ||
<UTooltip text="Search" :shortcuts="[metaSymbol, 'K']"> | ||
<UDocsSearchButton :label="null" /> | ||
</UTooltip> | ||
|
||
<UTooltip :text="$colorMode.preference === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'"> | ||
<UColorModeButton /> | ||
</UTooltip> | ||
|
||
<UTooltip text="GitHub Stars"> | ||
<UButton | ||
icon="i-simple-icons-github" to="https://github.com/oku-ui/primitives" target="_blank" | ||
label="700+" | ||
/> | ||
</UTooltip> | ||
</template> | ||
|
||
<template #panel> | ||
<UNavigationTree :links="mobileNav" default-open :multiple="false" /> | ||
</template> | ||
</UHeader> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
const dark = useColorMode() | ||
const isDark = ref('dark') | ||
watch(dark, () => { | ||
isDark.value = dark.value | ||
}) | ||
onMounted(() => { | ||
isDark.value = dark.value | ||
}) | ||
const logo = computed(() => { | ||
return isDark.value === 'dark' ? 'https://raw.githubusercontent.com/oku-ui/static/main/logo/icon-white.svg' : 'https://raw.githubusercontent.com/oku-ui/static/main/logo/icon-dark.svg' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<img width="120" :src="logo"> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { createSharedComposable } from '@vueuse/core' | ||
|
||
function _usePrimitivesNavigation() { | ||
const headerLinksPrimitive = computed(() => { | ||
const route = useRoute() | ||
|
||
return [ | ||
{ | ||
label: 'Primitives', | ||
icon: 'i-ph-book-bookmark-duotone', | ||
to: '/primitives', | ||
search: false, | ||
children: [ | ||
{ | ||
label: 'Get Started', | ||
description: 'Learn how to get started with Nuxt.', | ||
icon: 'i-ph-rocket-launch-duotone', | ||
to: '/primitives/getting-started', | ||
active: route.path.startsWith('/primitives/getting-started'), | ||
}, | ||
{ | ||
label: 'Components', | ||
description: 'Components', | ||
icon: 'i-ph-squares-four-bold', | ||
to: '/primitives/components', | ||
active: route.path.startsWith('/primitives/components'), | ||
}, | ||
{ | ||
label: 'Nuxt Modules', | ||
description: 'Primitives modules for Nuxt.', | ||
icon: 'i-simple-icons-nuxtdotjs', | ||
to: '/primitives/getting-started/nuxt', | ||
active: route.path.startsWith('/primitives/getting-started/nuxt'), | ||
}, | ||
{ | ||
label: 'Figma', | ||
description: 'Learn how to use the primitives CLI.', | ||
icon: 'i-simple-icons-figma', | ||
to: '/primitives/getting-started/figma', | ||
active: route.path.startsWith('/primitives/getting-started/figma'), | ||
}, | ||
{ | ||
label: 'Community', | ||
description: 'Find answers and support from the community.', | ||
icon: 'i-ph-chats-teardrop-duotone', | ||
to: '/primitives/community', | ||
active: route.path.startsWith('/primitives/community'), | ||
}, | ||
], | ||
}, | ||
{ | ||
label: 'Projects', | ||
icon: 'i-ph-folder-open-duotone', | ||
to: '/', | ||
search: false, | ||
}, | ||
] | ||
}) | ||
|
||
return { | ||
headerLinksPrimitive, | ||
|
||
} | ||
} | ||
|
||
export const usePrimitivesNavigation = createSharedComposable(_usePrimitivesNavigation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
title: Components | ||
icon: heroicons-outline:bookmark-alt | ||
hide: true | ||
icon: i-ph-activity |
Oops, something went wrong.