From efd104a10ff0f8f75ff85987b26060553c858af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 11 Dec 2024 11:15:05 +0100 Subject: [PATCH] docs(app): improve aside navigation (#2875) Co-authored-by: Benjamin Canac --- docs/app/components/FrameworkSelect.vue | 1 + docs/app/components/Header.vue | 13 ++++++++++--- docs/app/components/ModuleSelect.vue | 6 +++++- docs/app/composables/useSharedData.ts | 6 +++--- docs/app/layouts/docs.vue | 15 ++++++++++----- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/docs/app/components/FrameworkSelect.vue b/docs/app/components/FrameworkSelect.vue index 45410632..193528a0 100644 --- a/docs/app/components/FrameworkSelect.vue +++ b/docs/app/components/FrameworkSelect.vue @@ -18,6 +18,7 @@ onMounted(() => { indicator: 'bg-[var(--ui-bg)]', trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]' }" + size="sm" @update:model-value="(framework = $event as string)" /> diff --git a/docs/app/components/Header.vue b/docs/app/components/Header.vue index 13cc0408..299d2e97 100644 --- a/docs/app/components/Header.vue +++ b/docs/app/components/Header.vue @@ -76,15 +76,22 @@ defineShortcuts({
- +
+ diff --git a/docs/app/components/ModuleSelect.vue b/docs/app/components/ModuleSelect.vue index 88361684..9312f8d0 100644 --- a/docs/app/components/ModuleSelect.vue +++ b/docs/app/components/ModuleSelect.vue @@ -14,7 +14,11 @@ onMounted(() => { :items="modules" :content="false" color="neutral" - :ui="{ indicator: 'bg-[var(--ui-bg)]', trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]' }" + :ui="{ + indicator: 'bg-[var(--ui-bg)]', + trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]' + }" + size="sm" @update:model-value="(module = $event as string)" /> diff --git a/docs/app/composables/useSharedData.ts b/docs/app/composables/useSharedData.ts index 848ec108..1a90670d 100644 --- a/docs/app/composables/useSharedData.ts +++ b/docs/app/composables/useSharedData.ts @@ -15,13 +15,13 @@ export function useSharedData() { const module = useCookie('nuxt-ui-module', { default: () => 'ui' }) const modules = computed(() => [{ - label: 'nuxt/ui', + label: 'UI', icon: 'i-lucide-box', value: 'ui', onSelect: () => module.value = 'ui' }, { - label: 'nuxt/ui-pro', - icon: 'i-lucide-codesandbox', + label: 'UI Pro', + icon: 'i-lucide-panels-top-left', value: 'ui-pro', disabled: framework.value === 'vue', onSelect: () => module.value = 'ui-pro' diff --git a/docs/app/layouts/docs.vue b/docs/app/layouts/docs.vue index 1429f285..36d77454 100644 --- a/docs/app/layouts/docs.vue +++ b/docs/app/layouts/docs.vue @@ -12,18 +12,23 @@ const navigation = inject>('navigation') +