From f74953a4adcb9ca097d029702bade4b966c145f6 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sat, 15 Feb 2025 23:15:37 +0100 Subject: [PATCH 1/7] docs(app): improve command palette icons --- docs/app/composables/useContentNavigation.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/app/composables/useContentNavigation.ts b/docs/app/composables/useContentNavigation.ts index 59c0e921..35d2ee7f 100644 --- a/docs/app/composables/useContentNavigation.ts +++ b/docs/app/composables/useContentNavigation.ts @@ -14,10 +14,25 @@ function processNavigationItem(item: ContentNavigationItem, parent?: ContentNavi } } +function processNavigationItemIcon(item: ContentNavigationItem) { + let icon = item.icon + if (item.path.startsWith('/components')) { + icon = item.module === 'ui-pro' ? 'i-lucide-panels-top-left' : 'i-lucide-box' + } + if (item.path.startsWith('/composables')) { + icon = 'i-lucide-square-function' + } + return { + ...item, + icon + } +} + export const useContentNavigation = (navigation: Ref) => { const { framework, module } = useSharedData() const mappedNavigation = computed(() => navigation.value?.map(item => processNavigationItem(item))) + const filteredNavigation = computed(() => mappedNavigation.value?.map((item) => { return { ...item, @@ -29,7 +44,7 @@ export const useContentNavigation = (navigation: Ref Date: Sat, 15 Feb 2025 23:42:28 +0100 Subject: [PATCH 2/7] docs(app): reduce tabs size --- docs/app/components/FrameworkSelect.vue | 2 +- docs/app/components/ModuleSelect.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/app/components/FrameworkSelect.vue b/docs/app/components/FrameworkSelect.vue index e94df09a..6fba120b 100644 --- a/docs/app/components/FrameworkSelect.vue +++ b/docs/app/components/FrameworkSelect.vue @@ -22,7 +22,7 @@ watch(framework, () => { indicator: 'bg-(--ui-bg)', trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)' }" - size="sm" + size="xs" @update:model-value="(framework = $event as string)" /> diff --git a/docs/app/components/ModuleSelect.vue b/docs/app/components/ModuleSelect.vue index 04ef1373..39e2e68c 100644 --- a/docs/app/components/ModuleSelect.vue +++ b/docs/app/components/ModuleSelect.vue @@ -22,7 +22,7 @@ watch(module, () => { indicator: 'bg-(--ui-bg)', trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)' }" - size="sm" + size="xs" @update:model-value="(module = $event as string)" /> From 0275076c1b7525ad507d4e2aa1f124ea199dce49 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sat, 15 Feb 2025 23:42:53 +0100 Subject: [PATCH 3/7] docs(content): add icons --- docs/app/composables/useContentNavigation.ts | 5 ++++- docs/content/1.getting-started/1.index.md | 1 + docs/content/1.getting-started/2.installation/1.nuxt.md | 1 + docs/content/1.getting-started/2.installation/2.vue.md | 1 + docs/content/1.getting-started/3.theme.md | 1 + docs/content/1.getting-started/4.icons/1.nuxt.md | 1 + docs/content/1.getting-started/4.icons/2.vue.md | 1 + docs/content/1.getting-started/5.fonts.md | 1 + docs/content/1.getting-started/6.color-mode/1.nuxt.md | 1 + docs/content/1.getting-started/6.color-mode/2.vue.md | 1 + docs/content/1.getting-started/7.i18n/1.nuxt.md | 1 + docs/content/1.getting-started/7.i18n/2.vue.md | 1 + 12 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/app/composables/useContentNavigation.ts b/docs/app/composables/useContentNavigation.ts index 35d2ee7f..df0c0ebe 100644 --- a/docs/app/composables/useContentNavigation.ts +++ b/docs/app/composables/useContentNavigation.ts @@ -49,7 +49,10 @@ export const useContentNavigation = (navigation: Ref mappedNavigation.value?.map(item => ({ + ...item, + children: item.children?.map((child: any) => ({ ...child, icon: undefined })) + }))), filteredNavigation } } diff --git a/docs/content/1.getting-started/1.index.md b/docs/content/1.getting-started/1.index.md index 2b694db9..169eba27 100644 --- a/docs/content/1.getting-started/1.index.md +++ b/docs/content/1.getting-started/1.index.md @@ -2,6 +2,7 @@ navigation.title: Introduction title: Nuxt UI v3 description: 'A comprehensive, Nuxt-integrated UI library providing a rich set of fully-styled, accessible and highly customizable components for building modern web applications.' +navigation.icon: i-lucide-house --- We're thrilled to introduce this major update to our UI library, bringing significant improvements and powerful new features. Nuxt UI v3 represents a leap forward in creating robust, accessible, and highly customizable user interfaces for Nuxt applications. diff --git a/docs/content/1.getting-started/2.installation/1.nuxt.md b/docs/content/1.getting-started/2.installation/1.nuxt.md index 71e415c2..28dc9e59 100644 --- a/docs/content/1.getting-started/2.installation/1.nuxt.md +++ b/docs/content/1.getting-started/2.installation/1.nuxt.md @@ -7,6 +7,7 @@ links: - label: Playground to: https://codesandbox.io/p/devbox/nuxt-ui3-n3sxks icon: i-lucide-codesandbox +navigation.icon: i-lucide-square-play --- ::callout{to="/getting-started/installation/vue" icon="i-logos-vue" class="hidden"} diff --git a/docs/content/1.getting-started/2.installation/2.vue.md b/docs/content/1.getting-started/2.installation/2.vue.md index af743b6f..cd7481f5 100644 --- a/docs/content/1.getting-started/2.installation/2.vue.md +++ b/docs/content/1.getting-started/2.installation/2.vue.md @@ -7,6 +7,7 @@ links: - label: Playground to: https://codesandbox.io/p/devbox/nuxt-ui3-vue-4h5gqn icon: i-lucide-codesandbox +navigation.icon: i-lucide-square-play --- ::callout{to="/getting-started/installation/nuxt" icon="i-logos-nuxt-icon" class="hidden"} diff --git a/docs/content/1.getting-started/3.theme.md b/docs/content/1.getting-started/3.theme.md index 30bf491f..c6208fd7 100644 --- a/docs/content/1.getting-started/3.theme.md +++ b/docs/content/1.getting-started/3.theme.md @@ -1,6 +1,7 @@ --- title: Theme description: 'Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.' +navigation.icon: i-lucide-palette --- ## Tailwind CSS diff --git a/docs/content/1.getting-started/4.icons/1.nuxt.md b/docs/content/1.getting-started/4.icons/1.nuxt.md index bfc10539..a2157008 100644 --- a/docs/content/1.getting-started/4.icons/1.nuxt.md +++ b/docs/content/1.getting-started/4.icons/1.nuxt.md @@ -11,6 +11,7 @@ links: to: https://github.com/nuxt/icon target: _blank icon: i-simple-icons-github +navigation.icon: i-lucide-smile --- ::callout{to="/getting-started/icons/vue" icon="i-logos-vue" class="hidden"} diff --git a/docs/content/1.getting-started/4.icons/2.vue.md b/docs/content/1.getting-started/4.icons/2.vue.md index a23011b4..3c3071d6 100644 --- a/docs/content/1.getting-started/4.icons/2.vue.md +++ b/docs/content/1.getting-started/4.icons/2.vue.md @@ -7,6 +7,7 @@ links: to: https://iconify.design/ target: _blank icon: i-simple-icons-iconify +navigation.icon: i-lucide-smile --- ::callout{to="/getting-started/icons/nuxt" icon="i-logos-nuxt-icon" class="hidden"} diff --git a/docs/content/1.getting-started/5.fonts.md b/docs/content/1.getting-started/5.fonts.md index 43182d29..25f6ea57 100644 --- a/docs/content/1.getting-started/5.fonts.md +++ b/docs/content/1.getting-started/5.fonts.md @@ -7,6 +7,7 @@ links: to: https://github.com/nuxt/fonts target: _blank icon: i-simple-icons-github +navigation.icon: i-lucide-a-large-small --- ## Usage diff --git a/docs/content/1.getting-started/6.color-mode/1.nuxt.md b/docs/content/1.getting-started/6.color-mode/1.nuxt.md index 94d97fc1..b58bc52b 100644 --- a/docs/content/1.getting-started/6.color-mode/1.nuxt.md +++ b/docs/content/1.getting-started/6.color-mode/1.nuxt.md @@ -7,6 +7,7 @@ links: to: https://github.com/nuxt-modules/color-mode target: _blank icon: i-simple-icons-github +navigation.icon: i-lucide-sun-moon --- ::callout{to="/getting-started/color-mode/vue" icon="i-logos-vue" class="hidden"} diff --git a/docs/content/1.getting-started/6.color-mode/2.vue.md b/docs/content/1.getting-started/6.color-mode/2.vue.md index 6c7a96a1..6c0c1ca8 100644 --- a/docs/content/1.getting-started/6.color-mode/2.vue.md +++ b/docs/content/1.getting-started/6.color-mode/2.vue.md @@ -2,6 +2,7 @@ title: Color Mode description: 'Nuxt UI integrates with VueUse to allow for easy switching between light and dark themes.' framework: vue +navigation.icon: i-lucide-sun-moon --- ::callout{to="/getting-started/color-mode/nuxt" icon="i-logos-nuxt-icon" class="hidden"} diff --git a/docs/content/1.getting-started/7.i18n/1.nuxt.md b/docs/content/1.getting-started/7.i18n/1.nuxt.md index ace5b212..39b6f9b7 100644 --- a/docs/content/1.getting-started/7.i18n/1.nuxt.md +++ b/docs/content/1.getting-started/7.i18n/1.nuxt.md @@ -2,6 +2,7 @@ title: Internationalization (i18n) description: 'Learn how to internationalize your Nuxt app with multi-directional support (LTR/RTL).' framework: nuxt +navigation.icon: i-lucide-languages --- ::callout{to="/getting-started/i18n/vue" icon="i-logos-vue" class="hidden"} diff --git a/docs/content/1.getting-started/7.i18n/2.vue.md b/docs/content/1.getting-started/7.i18n/2.vue.md index e1440d6f..4b462033 100644 --- a/docs/content/1.getting-started/7.i18n/2.vue.md +++ b/docs/content/1.getting-started/7.i18n/2.vue.md @@ -2,6 +2,7 @@ title: Internationalization (i18n) description: 'Learn how to internationalize your Vue app with multi-directional support (LTR/RTL).' framework: vue +navigation.icon: i-lucide-languages --- ::callout{to="/getting-started/i18n/nuxt" icon="i-logos-nuxt-icon" class="hidden"} From f55e86963737238749a8d7e85bca1e724ae4c4c2 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sun, 16 Feb 2025 12:18:03 +0100 Subject: [PATCH 4/7] fix(Link): allow usage without `vue-router` in vue Resolves #3001 --- src/runtime/vue/components/Link.vue | 91 ++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 16 deletions(-) diff --git a/src/runtime/vue/components/Link.vue b/src/runtime/vue/components/Link.vue index ca3403e9..21181709 100644 --- a/src/runtime/vue/components/Link.vue +++ b/src/runtime/vue/components/Link.vue @@ -90,7 +90,7 @@ export interface LinkSlots { From 7641d89552df1ed42e70bbac90f5486b58bd9349 Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Sun, 16 Feb 2025 12:52:21 +0100 Subject: [PATCH 5/7] fix(Modal): always fullscreen on mobile (#2637) Co-authored-by: Benjamin Canac --- playground/app/pages/components/modal.vue | 2 +- playground/app/pages/components/slideover.vue | 2 +- src/theme/modal.ts | 4 +-- .../__snapshots__/Modal-vue.spec.ts.snap | 36 +++++++++---------- .../__snapshots__/Modal.spec.ts.snap | 36 +++++++++---------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/playground/app/pages/components/modal.vue b/playground/app/pages/components/modal.vue index 3ca517ce..a1195993 100644 --- a/playground/app/pages/components/modal.vue +++ b/playground/app/pages/components/modal.vue @@ -54,7 +54,7 @@ function openModal() { - + diff --git a/playground/app/pages/components/slideover.vue b/playground/app/pages/components/slideover.vue index 44c1a9aa..3fc79848 100644 --- a/playground/app/pages/components/slideover.vue +++ b/playground/app/pages/components/slideover.vue @@ -98,7 +98,7 @@ function openSlideover() { - + @@ -98,7 +98,7 @@ defineOgImageComponent('Docs', { From b6d771d427688a07804bda65baa19aff044ea3fb Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sun, 16 Feb 2025 12:28:02 +0100 Subject: [PATCH 7/7] playground-vue(app): add missing components --- playground-vue/src/app.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playground-vue/src/app.vue b/playground-vue/src/app.vue index 6a679efe..e43a65d2 100644 --- a/playground-vue/src/app.vue +++ b/playground-vue/src/app.vue @@ -28,10 +28,12 @@ const components = [ 'button', 'button-group', 'card', + 'calendar', 'carousel', 'checkbox', 'chip', 'collapsible', + 'color-picker', 'context-menu', 'command-palette', 'drawer', @@ -40,6 +42,7 @@ const components = [ 'form-field', 'input', 'input-menu', + 'input-number', 'kbd', 'link', 'modal', @@ -56,8 +59,10 @@ const components = [ 'skeleton', 'slideover', 'slider', + 'stepper', 'switch', 'tabs', + 'table', 'textarea', 'toast', 'tooltip'