mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-15 20:48:12 +01:00
Compare commits
101 Commits
v3.0.0-alp
...
feat/detec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb523f0171 | ||
|
|
37276dda5e | ||
|
|
6c7bacd0ba | ||
|
|
d23ae6d8a5 | ||
|
|
b6d771d427 | ||
|
|
cbaf9ec776 | ||
|
|
7641d89552 | ||
|
|
f55e869637 | ||
|
|
0275076c1b | ||
|
|
e25f2f0b05 | ||
|
|
f74953a4ad | ||
|
|
dbed234c73 | ||
|
|
3a3ae07d88 | ||
|
|
1d09a2aa35 | ||
|
|
f0553ebb49 | ||
|
|
fa92053116 | ||
|
|
76c527d8b9 | ||
|
|
6d9b9edc55 | ||
|
|
fabf42735e | ||
|
|
8ffe5ca69b | ||
|
|
05313dc0d4 | ||
|
|
847d4aa752 | ||
|
|
7a56903f47 | ||
|
|
c480e1d77f | ||
|
|
0a1c76c82e | ||
|
|
69d49a5214 | ||
|
|
5846c1e2ee | ||
|
|
ba3ed86ae1 | ||
|
|
d4bc9b3d0e | ||
|
|
83365da00e | ||
|
|
77697910be | ||
|
|
5775532689 | ||
|
|
df44779953 | ||
|
|
186c024fcb | ||
|
|
0c8a272d42 | ||
|
|
ff6658ea71 | ||
|
|
8097fff79d | ||
|
|
03a00b59e5 | ||
|
|
2b56c291ca | ||
|
|
4c417716c1 | ||
|
|
7de4b3bfda | ||
|
|
9cd8d3df40 | ||
|
|
115350d298 | ||
|
|
9d29e0b407 | ||
|
|
c00e1d72d9 | ||
|
|
e7e75858d7 | ||
|
|
80e6c1d264 | ||
|
|
39c0a60955 | ||
|
|
3413608168 | ||
|
|
0363bf7c66 | ||
|
|
bef3675a89 | ||
|
|
3eec33be53 | ||
|
|
e419dcbe61 | ||
|
|
2ee47e5c9e | ||
|
|
54e6841ad0 | ||
|
|
104852a55c | ||
|
|
8e7c52e1fb | ||
|
|
e779764465 | ||
|
|
71ed7ce6b0 | ||
|
|
443a0be017 | ||
|
|
4aa317944e | ||
|
|
c5bb540519 | ||
|
|
dfa48828ff | ||
|
|
089185fbe4 | ||
|
|
abd2be1aa6 | ||
|
|
d94b304d0c | ||
|
|
153f341a8c | ||
|
|
533e889589 | ||
|
|
2c192ac145 | ||
|
|
cd0a9d39d8 | ||
|
|
87234cb4da | ||
|
|
86ac79b6b4 | ||
|
|
e595314b2b | ||
|
|
ac08569a34 | ||
|
|
961711c7b7 | ||
|
|
10fb843f8f | ||
|
|
deddc7cf97 | ||
|
|
86e8ccd8e6 | ||
|
|
7b4f612cc9 | ||
|
|
618c1159f2 | ||
|
|
f21e923a64 | ||
|
|
69bc686efd | ||
|
|
0fb6753c9d | ||
|
|
e354d1b3a2 | ||
|
|
07e1b4f1f4 | ||
|
|
6c20f8a9ea | ||
|
|
ce3eaaa7b9 | ||
|
|
49dd0885a0 | ||
|
|
c1c9da4d38 | ||
|
|
0e46c3e8cf | ||
|
|
995e07d6ff | ||
|
|
d93ab0616e | ||
|
|
a3cfdb7c12 | ||
|
|
7299b0c603 | ||
|
|
b9000a7bf1 | ||
|
|
97f26c6777 | ||
|
|
4cbfcaf867 | ||
|
|
e2b78a78a4 | ||
|
|
527631d2d1 | ||
|
|
2703498fe5 | ||
|
|
e2d570bcf3 |
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
@@ -1,12 +1,6 @@
|
||||
name: docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3
|
||||
pull_request:
|
||||
branches:
|
||||
- v3
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
1
.npmrc
1
.npmrc
@@ -1,3 +1,4 @@
|
||||
shamefully-hoist=true
|
||||
auto-install-peers=true
|
||||
ignore-workspace-root-check=true
|
||||
shell-emulator=true
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[![License][license-src]][license-href]
|
||||
[![Nuxt][nuxt-src]][nuxt-href]
|
||||
|
||||
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS v4](https://tailwindcss.com/docs/v4-beta), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
|
||||
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS v4](https://tailwindcss.com/), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
|
||||
|
||||
> [!NOTE]
|
||||
> You are on the `v3` development branch, check out the [dev branch](https://github.com/nuxt/ui/tree/dev) for Nuxt UI v2.
|
||||
@@ -106,7 +106,7 @@ Learn more in the [installation guide](https://ui3.nuxt.dev/getting-started/inst
|
||||
- [nuxt/icon](https://github.com/nuxt/icon)
|
||||
- [nuxt/fonts](https://github.com/nuxt/fonts)
|
||||
- [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
|
||||
- [unovue/reka-ui](https://github.com/unovue/reka-ui)
|
||||
- [unovue/radix-vue](https://github.com/unovue/radix-vue)
|
||||
- [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
|
||||
- [vueuse/vueuse](https://github.com/vueuse/vueuse)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"dependencies": {
|
||||
"citty": "^0.1.6",
|
||||
"consola": "^3.4.0",
|
||||
"pathe": "^2.0.2",
|
||||
"pathe": "^2.0.3",
|
||||
"scule": "^1.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ links:${primitive
|
||||
: `
|
||||
- label: ${upperName}
|
||||
icon: i-custom-reka-ui
|
||||
to: https://www.reka-ui.com/components/${kebabName}.html`}
|
||||
to: https://reka-ui.com/docs/components/${kebabName}`}
|
||||
- label: GitHub
|
||||
icon: i-simple-icons-github
|
||||
to: https://github.com/nuxt/${pro ? 'ui-pro' : 'ui'}/tree/v3/src/runtime/components/${upperName}.vue
|
||||
|
||||
@@ -89,9 +89,9 @@ const isDark = computed({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UApp class="flex justify-center items-center h-screen w-full relative font-sans">
|
||||
<UApp>
|
||||
<div v-if="status === 'pending' || error || !component || !components?.length">
|
||||
<div v-if="error" class="flex flex-col justify-center items-center h-screen w-screen text-center text-[var(--ui-color-error-500)]">
|
||||
<div v-if="error" class="flex flex-col justify-center items-center h-screen w-screen text-center text-(--ui-error)">
|
||||
<UILogo class="h-8" />
|
||||
<UIcon name="i-lucide-circle-alert" size="20" class="mt-2" />
|
||||
<p>
|
||||
@@ -100,9 +100,7 @@ const isDark = computed({
|
||||
</div>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div
|
||||
class="top-0 h-[49px] border-b border-[var(--ui-border)] flex justify-center"
|
||||
>
|
||||
<div class="top-0 h-[49px] border-b border-(--ui-border) flex justify-center">
|
||||
<span />
|
||||
|
||||
<UInputMenu
|
||||
@@ -114,8 +112,8 @@ const isDark = computed({
|
||||
icon="i-lucide-search"
|
||||
/>
|
||||
|
||||
<div class="absolute top-[49px] bottom-0 inset-x-0 grid xl:grid-cols-8 grid-cols-4 bg-[var(--ui-bg)]">
|
||||
<div class="col-span-1 border-r border-[var(--ui-border)] hidden xl:block overflow-y-auto">
|
||||
<div class="absolute top-[49px] bottom-0 inset-x-0 grid xl:grid-cols-8 grid-cols-4 bg-(--ui-bg)">
|
||||
<div class="col-span-1 border-r border-(--ui-border) hidden xl:block overflow-y-auto">
|
||||
<UNavigationMenu
|
||||
:items="components.map((c) => ({ ...c, active: c.slug === component?.slug, onSelect: () => component = c }))"
|
||||
orientation="vertical"
|
||||
@@ -144,10 +142,10 @@ const isDark = computed({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-l border-[var(--ui-border)] flex flex-col col-span-2 overflow-y-auto">
|
||||
<UTabs color="neutral" variant="link" :items="tabs" class="relative" :ui="{ list: 'sticky top-0 bg-[var(--ui-bg)] z-50' }">
|
||||
<div class="border-l border-(--ui-border) flex flex-col col-span-2 overflow-y-auto">
|
||||
<UTabs color="neutral" variant="link" :items="tabs" class="relative" :ui="{ list: 'sticky top-0 bg-(--ui-bg) z-50' }">
|
||||
<template #props>
|
||||
<div v-for="prop in componentPropsMeta" :key="'prop-' + prop.name" class="px-3 py-5 border-b border-[var(--ui-border)]">
|
||||
<div v-for="prop in componentPropsMeta" :key="'prop-' + prop.name" class="px-3 py-5 border-b border-(--ui-border)">
|
||||
<ComponentPropInput
|
||||
v-model="componentProps[prop.name]"
|
||||
:meta="prop"
|
||||
@@ -170,39 +168,17 @@ const isDark = computed({
|
||||
@theme {
|
||||
--font-sans: 'DM Sans', sans-serif;
|
||||
|
||||
--color-primary-50: var(--ui-color-primary-50);
|
||||
--color-primary-100: var(--ui-color-primary-100);
|
||||
--color-primary-200: var(--ui-color-primary-200);
|
||||
--color-primary-300: var(--ui-color-primary-300);
|
||||
--color-primary-400: var(--ui-color-primary-400);
|
||||
--color-primary-500: var(--ui-color-primary-500);
|
||||
--color-primary-600: var(--ui-color-primary-600);
|
||||
--color-primary-700: var(--ui-color-primary-700);
|
||||
--color-primary-800: var(--ui-color-primary-800);
|
||||
--color-primary-900: var(--ui-color-primary-900);
|
||||
--color-primary-950: var(--ui-color-primary-950);
|
||||
|
||||
--color-neutral-50: var(--ui-color-neutral-50);
|
||||
--color-neutral-100: var(--ui-color-neutral-100);
|
||||
--color-neutral-200: var(--ui-color-neutral-200);
|
||||
--color-neutral-300: var(--ui-color-neutral-300);
|
||||
--color-neutral-400: var(--ui-color-neutral-400);
|
||||
--color-neutral-500: var(--ui-color-neutral-500);
|
||||
--color-neutral-600: var(--ui-color-neutral-600);
|
||||
--color-neutral-700: var(--ui-color-neutral-700);
|
||||
--color-neutral-800: var(--ui-color-neutral-800);
|
||||
--color-neutral-900: var(--ui-color-neutral-900);
|
||||
--color-neutral-950: var(--ui-color-neutral-950);
|
||||
}
|
||||
|
||||
:root {
|
||||
--ui-border: var(--ui-color-neutral-200);
|
||||
--ui-bg: white;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--ui-border: var(--ui-color-neutral-800);
|
||||
--ui-bg: var(--ui-color-neutral-900);
|
||||
--color-green-50: #EFFDF5;
|
||||
--color-green-100: #D9FBE8;
|
||||
--color-green-200: #B3F5D1;
|
||||
--color-green-300: #75EDAE;
|
||||
--color-green-400: #00DC82;
|
||||
--color-green-500: #00C16A;
|
||||
--color-green-600: #00A155;
|
||||
--color-green-700: #007F45;
|
||||
--color-green-800: #016538;
|
||||
--color-green-900: #0A5331;
|
||||
--color-green-950: #052E16;
|
||||
}
|
||||
|
||||
.shiki
|
||||
|
||||
@@ -18,7 +18,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="border rounded-[var(--ui-radius)] border-[var(--ui-border)]">
|
||||
<div class="border rounded-(--ui-radius) border-(--ui-border)">
|
||||
<div
|
||||
ref="wrapper"
|
||||
:class="['overflow-hidden', collapsed && overflow ? 'max-h-48' : 'max-h-none']"
|
||||
@@ -29,7 +29,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<UButton
|
||||
v-if="overflow"
|
||||
class="bg-[var(--ui-bg)] group w-full flex justify-center my-1 border-t border-[var(--ui-border)] rounded-t-none"
|
||||
class="bg-(--ui-bg) group w-full flex justify-center my-1 border-t border-(--ui-border) rounded-t-none"
|
||||
variant="link"
|
||||
color="neutral"
|
||||
trailing-icon="i-lucide-chevron-down"
|
||||
|
||||
@@ -126,7 +126,7 @@ const previewUrl = computed(() => {
|
||||
</div>
|
||||
<div v-if="highlightedCode && formattedCode" v-show="rendererReady" class="relative w-full p-3">
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-[calc(var(--ui-radius)*1.5)] border border-[var(--ui-border)] bg-neutral-50 dark:bg-neutral-800" v-html="highlightedCode" />
|
||||
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-[calc(var(--ui-radius)*1.5)] border border-(--ui-border) bg-(--ui-bg-muted)" v-html="highlightedCode" />
|
||||
<UButton
|
||||
color="neutral"
|
||||
variant="link"
|
||||
|
||||
@@ -17,21 +17,21 @@ watchEffect(() => {
|
||||
})
|
||||
|
||||
const description = computed(() => {
|
||||
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-[var(--ui-bg-elevated)] px-1 py-0.5 rounded-[var(--ui-radius)]">$1</code>')
|
||||
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-(--ui-bg-elevated) px-1 py-0.5 rounded-(--ui-radius)">$1</code>')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UFormField :name="meta?.name" class="" :ui="{ wrapper: 'mb-2' }" :class="{ 'opacity-70 cursor-not-allowed': !matchedInput || ignore }">
|
||||
<template #label>
|
||||
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-[var(--ui-border-accented)] border-dashed rounded-[var(--ui-radius)] bg-[var(--ui-bg-elevated)]">
|
||||
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-(--ui-border-accented) border-dashed rounded-(--ui-radius) bg-(--ui-bg-elevated)">
|
||||
{{ meta?.name }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #description>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<p v-if="meta.description" class="text-neutral-600 dark:text-neutral-400 mt-1" v-html="description" />
|
||||
<p v-if="meta.description" class="mt-1" v-html="description" />
|
||||
</template>
|
||||
|
||||
<component :is="matchedInput.component" v-if="!ignore && matchedInput" v-model="modelValue" :schema="parsedSchema" />
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
viewBox="0 0 1020 200"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="w-auto h-6 shrink-0 text-[var(--ui-text)]"
|
||||
><path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" /><path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" /><path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" /><path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" /><path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-color-primary-500)" /><path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="var(--ui-color-primary-500)" /><path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="var(--ui-color-primary-500)" /></svg>
|
||||
class="w-auto h-6 shrink-0 text-(--ui-text)"
|
||||
><path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" /><path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" /><path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" /><path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" /><path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-primary)" /><path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="var(--ui-primary)" /><path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="var(--ui-primary)" /></svg>
|
||||
</template>
|
||||
|
||||
@@ -26,7 +26,7 @@ const attributesSchemas = computed(() => {
|
||||
<ComponentPropInput
|
||||
v-for="attributeSchema in attributesSchemas"
|
||||
:key="attributeSchema.name"
|
||||
class="border-b last:border-b-0 border-[var(--ui-border)] p-4"
|
||||
class="border-b last:border-b-0 border-(--ui-border) p-4"
|
||||
:model-value="modelValue?.[attributeSchema.name]"
|
||||
:meta="attributeSchema"
|
||||
@update:model-value="(value: any) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createHighlighterCore } from 'shiki/core'
|
||||
import type { BuiltinLanguage, HighlighterCore } from 'shiki'
|
||||
import loadWasm from 'shiki/wasm'
|
||||
import MaterialThemeLighter from 'shiki/themes/material-theme-lighter.mjs'
|
||||
import MaterialThemePalenight from 'shiki/themes/material-theme-palenight.mjs'
|
||||
import VueLang from 'shiki/langs/vue.mjs'
|
||||
import MarkdownLang from 'shiki/langs/markdown.mjs'
|
||||
import { createOnigurumaEngine } from 'shiki/engine/oniguruma'
|
||||
|
||||
export const highlighter = shallowRef<HighlighterCore>()
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useShiki() {
|
||||
highlighter.value = await createHighlighterCore({
|
||||
themes: [MaterialThemeLighter, MaterialThemePalenight],
|
||||
langs: [VueLang, MarkdownLang],
|
||||
loadWasm
|
||||
engine: createOnigurumaEngine(import('shiki/wasm'))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ function handleMessage(message) {
|
||||
async function handleFormatMessage(message) {
|
||||
if (!globalThis.prettier) {
|
||||
await Promise.all([
|
||||
import('https://unpkg.com/prettier@3.3.3/standalone.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/html.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/postcss.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/babel.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/estree.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/typescript.js')
|
||||
import('https://unpkg.com/prettier@3.5.0/standalone.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/html.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/postcss.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/babel.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/estree.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/typescript.js')
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"dependencies": {
|
||||
"@nuxt/ui": "latest",
|
||||
"knitwork": "^1.2.0",
|
||||
"nuxt": "^3.15.3",
|
||||
"prettier": "^3.4.2",
|
||||
"zod": "^3.24.1"
|
||||
"nuxt": "^3.15.4",
|
||||
"prettier": "^3.5.1",
|
||||
"zod": "^3.24.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ export default defineAppConfig({
|
||||
duration: 5000
|
||||
},
|
||||
theme: {
|
||||
radius: 0.25
|
||||
radius: 0.25,
|
||||
blackAsPrimary: false
|
||||
},
|
||||
ui: {
|
||||
colors: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { withoutTrailingSlash } from 'ufo'
|
||||
// import { withoutTrailingSlash } from 'ufo'
|
||||
import colors from 'tailwindcss/colors'
|
||||
// import { debounce } from 'perfect-debounce'
|
||||
|
||||
@@ -22,34 +22,10 @@ const searchTerm = ref('')
|
||||
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
|
||||
// }, 500))
|
||||
|
||||
const links = computed(() => [{
|
||||
label: 'Docs',
|
||||
icon: 'i-lucide-square-play',
|
||||
to: '/getting-started',
|
||||
active: route.path.startsWith('/getting-started')
|
||||
}, {
|
||||
label: 'Components',
|
||||
icon: 'i-lucide-square-code',
|
||||
to: '/components',
|
||||
active: route.path.startsWith('/components')
|
||||
}, {
|
||||
label: 'Roadmap',
|
||||
icon: 'i-lucide-map',
|
||||
to: '/roadmap'
|
||||
}, {
|
||||
label: 'Figma',
|
||||
icon: 'i-lucide-figma',
|
||||
to: 'https://www.figma.com/community/file/1288455405058138934',
|
||||
target: '_blank'
|
||||
}, {
|
||||
label: 'Releases',
|
||||
icon: 'i-lucide-rocket',
|
||||
to: 'https://github.com/nuxt/ui/releases',
|
||||
target: '_blank'
|
||||
}].filter(Boolean))
|
||||
|
||||
const links = useLinks()
|
||||
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
|
||||
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
|
||||
const blackAsPrimary = computed(() => appConfig.theme.blackAsPrimary ? `:root { --ui-primary: black; } .dark { --ui-primary: white; }` : ':root {}')
|
||||
|
||||
useHead({
|
||||
meta: [
|
||||
@@ -57,11 +33,12 @@ useHead({
|
||||
{ key: 'theme-color', name: 'theme-color', content: color }
|
||||
],
|
||||
link: [
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
|
||||
{ rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
|
||||
// { rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
|
||||
],
|
||||
style: [
|
||||
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 }
|
||||
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 },
|
||||
{ innerHTML: blackAsPrimary, id: 'nuxt-ui-black-as-primary', tagPriority: -2 }
|
||||
],
|
||||
htmlAttrs: {
|
||||
lang: 'en'
|
||||
@@ -81,7 +58,7 @@ provide('navigation', mappedNavigation)
|
||||
|
||||
<template>
|
||||
<UApp :toaster="appConfig.toaster">
|
||||
<NuxtLoadingIndicator color="#FFF" />
|
||||
<NuxtLoadingIndicator color="var(--ui-primary)" :height="2" />
|
||||
|
||||
<template v-if="!route.path.startsWith('/examples')">
|
||||
<!-- <Banner /> -->
|
||||
@@ -94,7 +71,7 @@ provide('navigation', mappedNavigation)
|
||||
</NuxtLayout>
|
||||
|
||||
<template v-if="!route.path.startsWith('/examples')">
|
||||
<!-- <Footer /> -->
|
||||
<Footer />
|
||||
|
||||
<ClientOnly>
|
||||
<LazyUContentSearch
|
||||
@@ -152,5 +129,5 @@ html[data-module="ui"] .ui-pro-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Safelist (do not remove): [&>div]:*:my-0 [&>div]:*:w-full h-64 */
|
||||
/* Safelist (do not remove): [&>div]:*:my-0 [&>div]:*:w-full h-64 !px-0 !py-0 !pt-0 !pb-0 !p-0 !justify-start !min-h-96 h-136 */
|
||||
</style>
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
|
||||
// const items = [{
|
||||
// label: 'Figma Kit',
|
||||
// to: 'https://www.figma.com/community/file/1288455405058138934',
|
||||
// target: '_blank'
|
||||
// }, {
|
||||
// label: 'Playground',
|
||||
// to: 'https://stackblitz.com/edit/nuxt-ui',
|
||||
// target: '_blank'
|
||||
// }, {
|
||||
// label: 'Roadmap',
|
||||
// to: '/roadmap'
|
||||
// }, {
|
||||
// label: 'Releases',
|
||||
// to: '/releases'
|
||||
// }]
|
||||
const links = [{
|
||||
label: 'Figma',
|
||||
to: '/figma'
|
||||
}, {
|
||||
label: 'Roadmap',
|
||||
to: '/roadmap'
|
||||
}, {
|
||||
label: 'Terms',
|
||||
to: '/pro/terms'
|
||||
}, {
|
||||
label: 'Releases',
|
||||
to: 'https://github.com/nuxt/ui/releases',
|
||||
target: '_blank'
|
||||
}]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -23,15 +20,12 @@ const route = useRoute()
|
||||
|
||||
<UFooter>
|
||||
<template #left>
|
||||
<NuxtLink v-if="route.path.startsWith('/pro')" to="https://ui.nuxt.com/pro/purchase" target="_blank" class="text-sm text-[var(--ui-text-muted)]">
|
||||
Purchase <span class="text-[var(--ui-text-highlighted)]">Nuxt UI Pro</span>
|
||||
</NuxtLink>
|
||||
<NuxtLink v-else to="https://github.com/nuxt/ui" target="_blank" class="text-sm text-[var(--ui-text-muted)]">
|
||||
Published under <span class="text-[var(--ui-text-highlighted)]">MIT License</span>
|
||||
<NuxtLink to="https://github.com/nuxt/ui" target="_blank" class="text-sm text-(--ui-text-muted)">
|
||||
Published under <span class="text-(--ui-text-highlighted)">MIT License</span>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<!-- <UNavigationMenu :items="items" variant="link" color="neutral" /> -->
|
||||
<UNavigationMenu :items="links" variant="link" color="neutral" />
|
||||
|
||||
<template #right>
|
||||
<UButton
|
||||
@@ -41,6 +35,7 @@ const route = useRoute()
|
||||
target="_blank"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
/>
|
||||
<UButton
|
||||
aria-label="Nuxt UI on Discord"
|
||||
@@ -49,6 +44,7 @@ const route = useRoute()
|
||||
target="_blank"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
/>
|
||||
<UButton
|
||||
aria-label="Nuxt on X"
|
||||
@@ -57,6 +53,16 @@ const route = useRoute()
|
||||
target="_blank"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
/>
|
||||
<UButton
|
||||
aria-label="Nuxt on BlueSky"
|
||||
icon="i-simple-icons-bluesky"
|
||||
to="https://bsky.app/profile/nuxt.com"
|
||||
target="_blank"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
/>
|
||||
<UButton
|
||||
aria-label="Nuxt UI on GitHub"
|
||||
@@ -65,6 +71,7 @@ const route = useRoute()
|
||||
target="_blank"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
/>
|
||||
</template>
|
||||
</UFooter>
|
||||
|
||||
@@ -19,10 +19,10 @@ watch(framework, () => {
|
||||
:content="false"
|
||||
color="neutral"
|
||||
:ui="{
|
||||
indicator: 'bg-[var(--ui-bg)]',
|
||||
trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]'
|
||||
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)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -27,7 +27,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
|
||||
<template>
|
||||
<UHeader :ui="{ left: 'min-w-0' }" mode="drawer" :menu="{ shouldScaleBackground: true }">
|
||||
<template #left>
|
||||
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-[var(--ui-text-highlighted)] min-w-0 focus-visible:outline-[var(--ui-primary)] shrink-0" aria-label="Nuxt UI">
|
||||
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-(--ui-text-highlighted) min-w-0 focus-visible:outline-(--ui-primary) shrink-0" aria-label="Nuxt UI">
|
||||
<LogoPro class="w-auto h-6 shrink-0 ui-pro-only" />
|
||||
<Logo class="w-auto h-6 shrink-0 ui-only" />
|
||||
</NuxtLink>
|
||||
@@ -45,7 +45,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
|
||||
trailing-icon="i-lucide-chevron-down"
|
||||
size="xs"
|
||||
class="-mb-[6px] font-semibold rounded-full truncate"
|
||||
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
|
||||
:class="[open && 'bg-(--ui-primary)/15 ']"
|
||||
:ui="{
|
||||
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
|
||||
}"
|
||||
@@ -74,7 +74,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
|
||||
</UTooltip>
|
||||
</template>
|
||||
|
||||
<template #content>
|
||||
<template #body>
|
||||
<UNavigationMenu orientation="vertical" :items="links" class="-mx-2.5" />
|
||||
|
||||
<USeparator type="dashed" class="mt-4 mb-6" />
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
collapsed?: boolean
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<svg width="1352" height="200" viewBox="0 0 1352 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" />
|
||||
<path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" />
|
||||
<path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" />
|
||||
<path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" />
|
||||
<svg :viewBox="collapsed? '0 0 320 200' : '0 0 1352 200'" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-primary)" />
|
||||
<path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="currentColor" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="currentColor" />
|
||||
<path d="M1060 200V60H1117C1126.67 60 1134.98 61.2896 1142 65C1149.16 68.7104 1155.29 74.3744 1159 81C1162.71 87.6256 1164 95.3867 1164 104C1164 112.481 1162.71 120.374 1159 127C1155.29 133.626 1149.16 138.157 1142 142C1134.98 145.71 1126.67 148 1117 148H1090V200H1060ZM1115 123C1121.63 123 1126.69 121.578 1130 118C1133.31 114.29 1135 109.433 1135 104C1135 98.567 1133.31 93.5778 1130 90C1126.69 86.2896 1121.63 85 1115 85H1090V123H1115Z" fill="var(--ui-primary)" />
|
||||
<path d="M1226 123C1219.37 123 1214.31 124.965 1211 130C1207.69 135.035 1206 142.122 1206 151V200H1178V100H1200C1203.31 100 1206 102.686 1206 106V116C1208.65 109.904 1211.16 106.518 1215 104C1218.98 101.482 1224.77 100 1231 100H1242V123H1226Z" fill="var(--ui-primary)" />
|
||||
<path d="M1299 200C1288.93 200 1280.08 197.373 1272 193C1263.92 188.495 1257.51 182.818 1253 175C1248.49 167.049 1246 157.806 1246 148C1246 138.194 1248.49 129.818 1253 122C1257.51 114.049 1263.92 107.373 1272 103C1280.08 98.4946 1288.93 97 1299 97C1309.07 97 1318.92 98.4946 1327 103C1335.08 107.373 1340.49 114.049 1345 122C1349.51 129.818 1352 138.194 1352 148C1352 157.806 1349.51 167.049 1345 175C1340.49 182.818 1335.08 188.495 1327 193C1318.92 197.373 1309.07 200 1299 200ZM1299 176C1306.42 176 1312.36 173.168 1317 168C1321.64 162.832 1324 156.216 1324 148C1324 139.652 1321.64 133.168 1317 128C1312.36 122.832 1306.42 120 1299 120C1291.58 120 1285.64 122.832 1281 128C1276.36 133.168 1274 139.652 1274 148C1274 156.216 1276.36 162.832 1281 168C1285.64 173.168 1291.58 176 1299 176Z" fill="var(--ui-primary)" />
|
||||
<g v-if="!collapsed">
|
||||
<path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" />
|
||||
<path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" />
|
||||
<path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" />
|
||||
<path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" />
|
||||
<path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="currentColor" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="currentColor" />
|
||||
<path d="M1060 200V60H1117C1126.67 60 1134.98 61.2896 1142 65C1149.16 68.7104 1155.29 74.3744 1159 81C1162.71 87.6256 1164 95.3867 1164 104C1164 112.481 1162.71 120.374 1159 127C1155.29 133.626 1149.16 138.157 1142 142C1134.98 145.71 1126.67 148 1117 148H1090V200H1060ZM1115 123C1121.63 123 1126.69 121.578 1130 118C1133.31 114.29 1135 109.433 1135 104C1135 98.567 1133.31 93.5778 1130 90C1126.69 86.2896 1121.63 85 1115 85H1090V123H1115Z" fill="var(--ui-primary)" />
|
||||
<path d="M1226 123C1219.37 123 1214.31 124.965 1211 130C1207.69 135.035 1206 142.122 1206 151V200H1178V100H1200C1203.31 100 1206 102.686 1206 106V116C1208.65 109.904 1211.16 106.518 1215 104C1218.98 101.482 1224.77 100 1231 100H1242V123H1226Z" fill="var(--ui-primary)" />
|
||||
<path d="M1299 200C1288.93 200 1280.08 197.373 1272 193C1263.92 188.495 1257.51 182.818 1253 175C1248.49 167.049 1246 157.806 1246 148C1246 138.194 1248.49 129.818 1253 122C1257.51 114.049 1263.92 107.373 1272 103C1280.08 98.4946 1288.93 97 1299 97C1309.07 97 1318.92 98.4946 1327 103C1335.08 107.373 1340.49 114.049 1345 122C1349.51 129.818 1352 138.194 1352 148C1352 157.806 1349.51 167.049 1345 175C1340.49 182.818 1335.08 188.495 1327 193C1318.92 197.373 1309.07 200 1299 200ZM1299 176C1306.42 176 1312.36 173.168 1317 168C1321.64 162.832 1324 156.216 1324 148C1324 139.652 1321.64 133.168 1317 128C1312.36 122.832 1306.42 120 1299 120C1291.58 120 1285.64 122.832 1281 128C1276.36 133.168 1274 139.652 1274 148C1274 156.216 1276.36 162.832 1281 168C1285.64 173.168 1291.58 176 1299 176Z" fill="var(--ui-primary)" />
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
@@ -19,10 +19,10 @@ watch(module, () => {
|
||||
:content="false"
|
||||
color="neutral"
|
||||
:ui="{
|
||||
indicator: 'bg-[var(--ui-bg)]',
|
||||
trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]'
|
||||
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)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
28
docs/app/components/PromotionalVideo.vue
Normal file
28
docs/app/components/PromotionalVideo.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="relative">
|
||||
<UPageCard
|
||||
variant="subtle"
|
||||
class="rounded-[calc(var(--ui-radius)*6)]"
|
||||
>
|
||||
<video
|
||||
class="rounded-[calc(var(--ui-radius)*2)]"
|
||||
preload="none"
|
||||
poster="https://res.cloudinary.com/nuxt/video/upload/so_3.3/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.jpg"
|
||||
:controls="true"
|
||||
>
|
||||
<source
|
||||
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.webm"
|
||||
type="video/webm"
|
||||
>
|
||||
<source
|
||||
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.mp4"
|
||||
type="video/mp4"
|
||||
>
|
||||
<source
|
||||
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.ogg"
|
||||
type="video/ogg"
|
||||
>
|
||||
</video>
|
||||
</UPageCard>
|
||||
</div>
|
||||
</template>
|
||||
52
docs/app/components/StarsBg.vue
Normal file
52
docs/app/components/StarsBg.vue
Normal file
File diff suppressed because one or more lines are too long
@@ -211,7 +211,7 @@ ${props.slots?.default}
|
||||
`
|
||||
for (const key of props.external) {
|
||||
const cast = props.cast?.[key]
|
||||
const value = cast ? castMap[cast]!.template(componentProps[key]) : json5.stringify(componentProps[key], null, 2).replace(/,([ |\t\n]+[}|\]])/g, '$1')
|
||||
const value = cast ? castMap[cast]!.template(componentProps[key]) : json5.stringify(componentProps[key], null, 2)?.replace(/,([ |\t\n]+[}|\]])/g, '$1')
|
||||
|
||||
code += `const ${key === 'modelValue' ? 'value' : key} = ref(${value})
|
||||
`
|
||||
@@ -316,15 +316,15 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
|
||||
<template>
|
||||
<div class="my-5">
|
||||
<div>
|
||||
<div v-if="options.length" class="flex items-center gap-2.5 border border-[var(--ui-border-muted)] border-b-0 relative rounded-t-[calc(var(--ui-radius)*1.5)] px-4 py-2.5 overflow-x-auto">
|
||||
<div v-if="options.length" class="flex items-center gap-2.5 border border-(--ui-border-muted) border-b-0 relative rounded-t-[calc(var(--ui-radius)*1.5)] px-4 py-2.5 overflow-x-auto">
|
||||
<template v-for="option in options" :key="option.name">
|
||||
<UFormField
|
||||
:label="option.label"
|
||||
size="sm"
|
||||
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
|
||||
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
|
||||
:ui="{
|
||||
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
|
||||
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
|
||||
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
|
||||
label: 'text-(--ui-text-muted) px-2 py-1.5',
|
||||
container: 'mt-0'
|
||||
}"
|
||||
>
|
||||
@@ -335,7 +335,7 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
|
||||
value-key="value"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
|
||||
class="rounded-(--ui-radius) rounded-l-none min-w-12"
|
||||
:class="[option.name.toLowerCase().endsWith('color') && 'pl-6']"
|
||||
:ui="{ itemLeadingChip: 'size-2' }"
|
||||
@update:model-value="setComponentProp(option.name, $event)"
|
||||
@@ -357,14 +357,14 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
|
||||
:model-value="getComponentProp(option.name)"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
|
||||
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
|
||||
@update:model-value="setComponentProp(option.name, $event)"
|
||||
/>
|
||||
</UFormField>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div v-if="component" class="flex justify-center border border-b-0 border-[var(--ui-border-muted)] relative p-4 z-[1]" :class="[!options.length && 'rounded-t-[calc(var(--ui-radius)*1.5)]', props.class, { 'overflow-hidden': props.overflowHidden }]">
|
||||
<div v-if="component" class="flex justify-center border border-b-0 border-(--ui-border-muted) relative p-4 z-[1]" :class="[!options.length && 'rounded-t-[calc(var(--ui-radius)*1.5)]', props.class, { 'overflow-hidden': props.overflowHidden }]">
|
||||
<component :is="component" v-bind="{ ...componentProps, ...componentEvents }">
|
||||
<template v-for="slot in Object.keys(slots || {})" :key="slot" #[slot]>
|
||||
<slot :name="slot" mdc-unwrap="p">
|
||||
|
||||
@@ -149,8 +149,8 @@ const urlSearchParams = computed(() => {
|
||||
<template>
|
||||
<div ref="el" class="my-5">
|
||||
<template v-if="preview">
|
||||
<div class="border border-[var(--ui-border-muted)] relative z-[1]" :class="[{ 'border-b-0 rounded-t-[calc(var(--ui-radius)*1.5)]': props.source, 'rounded-[calc(var(--ui-radius)*1.5)]': !props.source, 'overflow-hidden': props.overflowHidden }]">
|
||||
<div v-if="props.options?.length || !!slots.options" class="flex gap-4 p-4 border-b border-[var(--ui-border-muted)]">
|
||||
<div class="border border-(--ui-border-muted) relative z-[1]" :class="[{ 'border-b-0 rounded-t-[calc(var(--ui-radius)*1.5)]': props.source, 'rounded-[calc(var(--ui-radius)*1.5)]': !props.source, 'overflow-hidden': props.overflowHidden }]">
|
||||
<div v-if="props.options?.length || !!slots.options" class="flex gap-4 p-4 border-b border-(--ui-border-muted)">
|
||||
<slot name="options" />
|
||||
|
||||
<UFormField
|
||||
@@ -159,10 +159,10 @@ const urlSearchParams = computed(() => {
|
||||
:label="option.label"
|
||||
:name="option.name"
|
||||
size="sm"
|
||||
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
|
||||
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
|
||||
:ui="{
|
||||
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
|
||||
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
|
||||
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
|
||||
label: 'text-(--ui-text-muted) px-2 py-1.5',
|
||||
container: 'mt-0'
|
||||
}"
|
||||
>
|
||||
@@ -174,7 +174,7 @@ const urlSearchParams = computed(() => {
|
||||
:value-key="option.name.toLowerCase().endsWith('color') ? 'value' : undefined"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
|
||||
class="rounded-(--ui-radius) rounded-l-none min-w-12"
|
||||
:multiple="option.multiple"
|
||||
:class="[option.name.toLowerCase().endsWith('color') && 'pl-6']"
|
||||
:ui="{ itemLeadingChip: 'size-2' }"
|
||||
@@ -195,7 +195,7 @@ const urlSearchParams = computed(() => {
|
||||
:model-value="get(optionsValues, option.name)"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
|
||||
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
|
||||
@update:model-value="set(optionsValues, option.name, $event)"
|
||||
/>
|
||||
</UFormField>
|
||||
|
||||
@@ -112,7 +112,7 @@ const metaProps: ComputedRef<ComponentMeta['props']> = computed(() => {
|
||||
<ProseTd>
|
||||
<HighlightInlineType v-if="prop.type" :type="prop.type" />
|
||||
|
||||
<MDC v-if="prop.description" :value="prop.description" class="text-[var(--ui-text-toned)] mt-1" />
|
||||
<MDC v-if="prop.description" :value="prop.description" class="text-(--ui-text-toned) mt-1" />
|
||||
|
||||
<ComponentPropsLinks v-if="prop.tags?.length" :prop="prop" />
|
||||
<ComponentPropsSchema v-if="prop.schema" :prop="prop" :ignore="ignore" />
|
||||
|
||||
@@ -40,7 +40,7 @@ const schemaProps = computed(() => {
|
||||
<ProseLi v-for="schemaProp in schemaProps" :key="schemaProp.name">
|
||||
<HighlightInlineType :type="`${schemaProp.name}${schemaProp.required === false ? '?' : ''}: ${schemaProp.type}`" />
|
||||
|
||||
<MDC v-if="schemaProp.description" :value="schemaProp.description" class="text-[var(--ui-text-muted)] my-1" />
|
||||
<MDC v-if="schemaProp.description" :value="schemaProp.description" class="text-(--ui-text-muted) my-1" />
|
||||
</ProseLi>
|
||||
</ProseUl>
|
||||
</ProseCollapsible>
|
||||
|
||||
@@ -36,7 +36,7 @@ const meta = await fetchComponentMeta(name as any)
|
||||
<ProseTd>
|
||||
<HighlightInlineType v-if="slot.type" :type="slot.type" />
|
||||
|
||||
<MDC v-if="slot.description" :value="slot.description" class="text-[var(--ui-text-toned)] mt-1" />
|
||||
<MDC v-if="slot.description" :value="slot.description" class="text-(--ui-text-toned) mt-1" />
|
||||
</ProseTd>
|
||||
</ProseTr>
|
||||
</ProseTbody>
|
||||
|
||||
@@ -15,7 +15,8 @@ const props = defineProps<{
|
||||
const route = useRoute()
|
||||
const { framework } = useSharedData()
|
||||
|
||||
const name = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
|
||||
const name = props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? ''
|
||||
const camelName = camelCase(name)
|
||||
|
||||
const strippedCompoundVariants = ref(false)
|
||||
|
||||
@@ -23,7 +24,7 @@ const computedTheme = computed(() => props.pro ? props.prose ? themePro.prose :
|
||||
|
||||
const strippedTheme = computed(() => {
|
||||
const strippedTheme = {
|
||||
...(computedTheme.value as any)[name]
|
||||
...(computedTheme.value as any)[camelName]
|
||||
}
|
||||
|
||||
if (strippedTheme?.compoundVariants) {
|
||||
@@ -63,8 +64,8 @@ const component = computed(() => {
|
||||
const baseKey = props.pro ? 'uiPro' : 'ui'
|
||||
|
||||
const content = props.prose
|
||||
? { prose: { [name]: strippedTheme.value } }
|
||||
: { [name]: strippedTheme.value }
|
||||
? { prose: { [camelName]: strippedTheme.value } }
|
||||
: { [camelName]: strippedTheme.value }
|
||||
|
||||
if (props.extra?.length) {
|
||||
props.extra.forEach((extra) => {
|
||||
@@ -78,9 +79,18 @@ const component = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const { data: ast } = await useAsyncData(`component-theme-${name}-${hash({ props })}`, async () => {
|
||||
const themeLink = computed(() => {
|
||||
const repo = props.pro ? 'ui-pro' : 'ui'
|
||||
const slug = name.startsWith('content') ? `content/${name}` : name
|
||||
|
||||
return `https://github.com/nuxt/${repo}/blob/v3/src/theme/${slug}.ts`
|
||||
})
|
||||
|
||||
const themeHash = route.hash === '#theme'
|
||||
|
||||
const { data: ast } = await useAsyncData(`component-theme-${camelName}-${hash({ props, themeHash })}`, async () => {
|
||||
const md = `
|
||||
::code-collapse{class="nuxt-only"}
|
||||
::code-collapse{class="nuxt-only" ${themeHash ? 'open' : null} }
|
||||
|
||||
\`\`\`ts [app.config.ts]
|
||||
export default defineAppConfig(${json5.stringify(component.value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')})
|
||||
@@ -88,7 +98,7 @@ export default defineAppConfig(${json5.stringify(component.value, null, 2).repla
|
||||
|
||||
::
|
||||
|
||||
::code-collapse{class="vue-only"}
|
||||
::code-collapse{class="vue-only" ${themeHash ? 'open' : null} }
|
||||
|
||||
\`\`\`ts [vite.config.ts]
|
||||
import { defineConfig } from 'vite'
|
||||
@@ -110,7 +120,7 @@ export default defineConfig({
|
||||
|
||||
${strippedCompoundVariants.value
|
||||
? `
|
||||
::callout{icon="i-simple-icons-github" to="https://github.com/nuxt/ui/blob/v3/src/theme/${name}.ts"}
|
||||
::callout{icon="i-simple-icons-github" to="${themeLink.value}" title="Compound variants"}
|
||||
Some colors in \`compoundVariants\` are omitted for readability. Check out the source code on GitHub.
|
||||
::`
|
||||
: ''}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="relative overflow-hidden rounded-[var(--ui-radius)] border border-dashed border-[var(--ui-border-accented)] opacity-75 px-4 flex items-center justify-center">
|
||||
<svg class="absolute inset-0 h-full w-full stroke-[var(--ui-border-inverted)]/10" fill="none">
|
||||
<div class="relative overflow-hidden rounded-(--ui-radius) border border-dashed border-(--ui-border-accented) opacity-75 px-4 flex items-center justify-center">
|
||||
<svg class="absolute inset-0 h-full w-full stroke-(--ui-border-inverted)/10" fill="none">
|
||||
<defs>
|
||||
<pattern
|
||||
id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
|
||||
|
||||
@@ -10,6 +10,7 @@ const props = withDefaults(defineProps<{
|
||||
function getEmojiFlag(locale: string): string {
|
||||
const languageToCountry: Record<string, string> = {
|
||||
ar: 'sa',
|
||||
bn: 'bd',
|
||||
cs: 'cz',
|
||||
da: 'dk',
|
||||
el: 'gr',
|
||||
@@ -17,7 +18,7 @@ function getEmojiFlag(locale: string): string {
|
||||
en: 'gb',
|
||||
hi: 'in',
|
||||
ja: 'jp',
|
||||
kh: 'km',
|
||||
km: 'kh',
|
||||
ko: 'kr',
|
||||
nb: 'no',
|
||||
sv: 'se',
|
||||
|
||||
@@ -18,7 +18,7 @@ const items = [
|
||||
<template>
|
||||
<UAccordion :items="items">
|
||||
<template #content="{ item }">
|
||||
<p class="pb-3.5 text-sm text-[var(--ui-text-muted)]">
|
||||
<p class="pb-3.5 text-sm text-(--ui-text-muted)">
|
||||
This is the {{ item.label }} panel.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
@@ -22,7 +22,7 @@ const items = [
|
||||
<template>
|
||||
<UAccordion :items="items">
|
||||
<template #colors="{ item }">
|
||||
<p class="text-sm pb-3.5 text-[var(--ui-primary)]">
|
||||
<p class="text-sm pb-3.5 text-(--ui-primary)">
|
||||
{{ item.content }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<ULink
|
||||
to="https://github.com/benjamincanac"
|
||||
target="_blank"
|
||||
class="hover:ring-[var(--ui-primary)] transition"
|
||||
class="hover:ring-(--ui-primary) transition"
|
||||
raw
|
||||
>
|
||||
<UAvatar
|
||||
@@ -15,7 +15,7 @@
|
||||
<ULink
|
||||
to="https://github.com/romhml"
|
||||
target="_blank"
|
||||
class="hover:ring-[var(--ui-primary)] transition"
|
||||
class="hover:ring-(--ui-primary) transition"
|
||||
raw
|
||||
>
|
||||
<UAvatar
|
||||
@@ -27,7 +27,7 @@
|
||||
<ULink
|
||||
to="https://github.com/noook"
|
||||
target="_blank"
|
||||
class="hover:ring-[var(--ui-primary)] transition"
|
||||
class="hover:ring-(--ui-primary) transition"
|
||||
raw
|
||||
>
|
||||
<UAvatar
|
||||
|
||||
@@ -14,7 +14,7 @@ const items = [{
|
||||
<template>
|
||||
<UBreadcrumb :items="items">
|
||||
<template #separator>
|
||||
<span class="mx-2 text-[var(--ui-text-muted)]">/</span>
|
||||
<span class="mx-2 text-(--ui-text-muted)">/</span>
|
||||
</template>
|
||||
</UBreadcrumb>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<UButtonGroup>
|
||||
<UBadge color="neutral" variant="outline" size="lg" label="https://" />
|
||||
|
||||
<UInput color="neutral" variant="outline" placeholder="www.example.com" />
|
||||
</UButtonGroup>
|
||||
</template>
|
||||
@@ -11,7 +11,7 @@ const modelValue = shallowRef(new CalendarDate(2022, 1, 10))
|
||||
<template>
|
||||
<UPopover>
|
||||
<UButton color="neutral" variant="subtle" icon="i-lucide-calendar">
|
||||
{{ df.format(modelValue.toDate(getLocalTimeZone())) }}
|
||||
{{ modelValue ? df.format(modelValue.toDate(getLocalTimeZone())) : 'Select a date' }}
|
||||
</UButton>
|
||||
|
||||
<template #content>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import type { DateValue } from '@internationalized/date'
|
||||
import { CalendarDate } from '@internationalized/date'
|
||||
import type { Matcher } from 'reka-ui/date'
|
||||
|
||||
const modelValue = shallowRef({
|
||||
start: new CalendarDate(2022, 1, 1),
|
||||
end: new CalendarDate(2022, 1, 9)
|
||||
})
|
||||
|
||||
const isDateDisabled: Matcher = (date) => {
|
||||
const isDateDisabled = (date: DateValue) => {
|
||||
return date.day >= 10 && date.day <= 16
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import type { DateValue } from '@internationalized/date'
|
||||
import { CalendarDate } from '@internationalized/date'
|
||||
import type { Matcher } from 'reka-ui/date'
|
||||
|
||||
const modelValue = shallowRef({
|
||||
start: new CalendarDate(2022, 1, 1),
|
||||
end: new CalendarDate(2022, 1, 9)
|
||||
})
|
||||
|
||||
const isDateUnavailable: Matcher = (date) => {
|
||||
const isDateUnavailable = (date: DateValue) => {
|
||||
return date.day >= 10 && date.day <= 16
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -29,31 +29,45 @@ const groups = [{
|
||||
items: [
|
||||
{
|
||||
label: 'Benjamin Canac',
|
||||
suffix: 'benjamincanac'
|
||||
suffix: 'benjamincanac',
|
||||
to: 'https://github.com/benjamincanac',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Sylvain Marroufin',
|
||||
suffix: 'smarroufin'
|
||||
suffix: 'smarroufin',
|
||||
to: 'https://github.com/smarroufin',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Sébastien Chopin',
|
||||
suffix: 'atinux'
|
||||
suffix: 'atinux',
|
||||
to: 'https://github.com/atinux',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Romain Hamel',
|
||||
suffix: 'romhml'
|
||||
suffix: 'romhml',
|
||||
to: 'https://github.com/romhml',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Haytham A. Salama',
|
||||
suffix: 'Haythamasalama'
|
||||
suffix: 'Haythamasalama',
|
||||
to: 'https://github.com/Haythamasalama',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Daniel Roe',
|
||||
suffix: 'danielroe'
|
||||
suffix: 'danielroe',
|
||||
to: 'https://github.com/danielroe',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Neil Richter',
|
||||
suffix: 'noook'
|
||||
suffix: 'noook',
|
||||
to: 'https://github.com/noook',
|
||||
target: '_blank'
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
||||
@@ -5,6 +5,8 @@ const users = [
|
||||
{
|
||||
label: 'Benjamin Canac',
|
||||
suffix: 'benjamincanac',
|
||||
to: 'https://github.com/benjamincanac',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/benjamincanac.png'
|
||||
}
|
||||
@@ -12,6 +14,8 @@ const users = [
|
||||
{
|
||||
label: 'Sylvain Marroufin',
|
||||
suffix: 'smarroufin',
|
||||
to: 'https://github.com/smarroufin',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/smarroufin.png'
|
||||
}
|
||||
@@ -19,6 +23,8 @@ const users = [
|
||||
{
|
||||
label: 'Sébastien Chopin',
|
||||
suffix: 'atinux',
|
||||
to: 'https://github.com/atinux',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/atinux.png'
|
||||
}
|
||||
@@ -26,6 +32,8 @@ const users = [
|
||||
{
|
||||
label: 'Romain Hamel',
|
||||
suffix: 'romhml',
|
||||
to: 'https://github.com/romhml',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/romhml.png'
|
||||
}
|
||||
@@ -33,6 +41,8 @@ const users = [
|
||||
{
|
||||
label: 'Haytham A. Salama',
|
||||
suffix: 'Haythamasalama',
|
||||
to: 'https://github.com/Haythamasalama',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/Haythamasalama.png'
|
||||
}
|
||||
@@ -40,6 +50,8 @@ const users = [
|
||||
{
|
||||
label: 'Daniel Roe',
|
||||
suffix: 'danielroe',
|
||||
to: 'https://github.com/danielroe',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/danielroe.png'
|
||||
}
|
||||
@@ -47,6 +59,8 @@ const users = [
|
||||
{
|
||||
label: 'Neil Richter',
|
||||
suffix: 'noook',
|
||||
to: 'https://github.com/noook',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/noook.png'
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ const users = [
|
||||
to: 'https://github.com/benjamincanac',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/benjamincanac.png',
|
||||
alt: 'benjamincanac'
|
||||
src: 'https://github.com/benjamincanac.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -16,8 +15,7 @@ const users = [
|
||||
to: 'https://github.com/smarroufin',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/smarroufin.png',
|
||||
alt: 'smarroufin'
|
||||
src: 'https://github.com/smarroufin.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -26,8 +24,7 @@ const users = [
|
||||
to: 'https://github.com/atinux',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/atinux.png',
|
||||
alt: 'atinux'
|
||||
src: 'https://github.com/atinux.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -36,8 +33,7 @@ const users = [
|
||||
to: 'https://github.com/romhml',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/romhml.png',
|
||||
alt: 'romhml'
|
||||
src: 'https://github.com/romhml.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -46,8 +42,7 @@ const users = [
|
||||
to: 'https://github.com/Haythamasalama',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/Haythamasalama.png',
|
||||
alt: 'Haythamasalama'
|
||||
src: 'https://github.com/Haythamasalama.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -56,8 +51,7 @@ const users = [
|
||||
to: 'https://github.com/danielroe',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/danielroe.png',
|
||||
alt: 'danielroe'
|
||||
src: 'https://github.com/danielroe.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -66,8 +60,7 @@ const users = [
|
||||
to: 'https://github.com/noook',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/noook.png',
|
||||
alt: 'noook'
|
||||
src: 'https://github.com/noook.png'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
const router = useRouter()
|
||||
const toast = useToast()
|
||||
|
||||
const groups = ref([
|
||||
{
|
||||
@@ -12,8 +12,7 @@ const groups = ref([
|
||||
to: 'https://github.com/benjamincanac',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/benjamincanac.png',
|
||||
alt: 'benjamincanac'
|
||||
src: 'https://github.com/benjamincanac.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -22,8 +21,7 @@ const groups = ref([
|
||||
to: 'https://github.com/smarroufin',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/smarroufin.png',
|
||||
alt: 'smarroufin'
|
||||
src: 'https://github.com/smarroufin.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,8 +30,7 @@ const groups = ref([
|
||||
to: 'https://github.com/atinux',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/atinux.png',
|
||||
alt: 'atinux'
|
||||
src: 'https://github.com/atinux.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -42,8 +39,7 @@ const groups = ref([
|
||||
to: 'https://github.com/romhml',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/romhml.png',
|
||||
alt: 'romhml'
|
||||
src: 'https://github.com/romhml.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -52,8 +48,7 @@ const groups = ref([
|
||||
to: 'https://github.com/Haythamasalama',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/Haythamasalama.png',
|
||||
alt: 'Haythamasalama'
|
||||
src: 'https://github.com/Haythamasalama.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -62,8 +57,7 @@ const groups = ref([
|
||||
to: 'https://github.com/danielroe',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/danielroe.png',
|
||||
alt: 'danielroe'
|
||||
src: 'https://github.com/danielroe.png'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -72,8 +66,7 @@ const groups = ref([
|
||||
to: 'https://github.com/noook',
|
||||
target: '_blank',
|
||||
avatar: {
|
||||
src: 'https://github.com/noook.png',
|
||||
alt: 'noook'
|
||||
src: 'https://github.com/noook.png'
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -90,7 +83,7 @@ const groups = ref([
|
||||
'N'
|
||||
],
|
||||
onSelect() {
|
||||
console.log('Add new file')
|
||||
toast.add({ title: 'Add new file' })
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -102,7 +95,7 @@ const groups = ref([
|
||||
'F'
|
||||
],
|
||||
onSelect() {
|
||||
console.log('Add new folder')
|
||||
toast.add({ title: 'Add new folder' })
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -114,7 +107,7 @@ const groups = ref([
|
||||
'H'
|
||||
],
|
||||
onSelect() {
|
||||
console.log('Add hashtag')
|
||||
toast.add({ title: 'Add hashtag' })
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -126,7 +119,7 @@ const groups = ref([
|
||||
'L'
|
||||
],
|
||||
onSelect() {
|
||||
console.log('Add label')
|
||||
toast.add({ title: 'Add label' })
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -134,15 +127,7 @@ const groups = ref([
|
||||
])
|
||||
|
||||
function onSelect(item: any) {
|
||||
if (item.onSelect) {
|
||||
item.onSelect()
|
||||
} else if (item.to) {
|
||||
if (typeof item.to === 'string' && (item.target === '_blank' || item.to.startsWith('http'))) {
|
||||
window.open(item.to, item.target || '_blank')
|
||||
} else {
|
||||
router.push(item.to)
|
||||
}
|
||||
}
|
||||
console.log(item)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const items = computed(() => [{
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
</UContextMenu>
|
||||
|
||||
@@ -26,7 +26,7 @@ const items = [
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
</UContextMenu>
|
||||
|
||||
@@ -13,7 +13,7 @@ const items = [{
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ const items = [{
|
||||
</template>
|
||||
|
||||
<template #refresh-trailing>
|
||||
<UIcon v-if="loading" name="i-lucide-refresh-cw" class="shrink-0 size-5 text-[var(--ui-primary)] animate-spin" />
|
||||
<UIcon v-if="loading" name="i-lucide-refresh-cw" class="shrink-0 size-5 text-(--ui-primary) animate-spin" />
|
||||
</template>
|
||||
</UContextMenu>
|
||||
</template>
|
||||
|
||||
@@ -7,7 +7,7 @@ const open = ref(false)
|
||||
<UButton label="Open" color="neutral" variant="subtle" trailing-icon="i-lucide-chevron-up" />
|
||||
|
||||
<template #header>
|
||||
<h2 class="text-[var(--ui-text-highlighted)] font-semibold">
|
||||
<h2 class="text-(--ui-text-highlighted) font-semibold">
|
||||
Drawer non-dismissible
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const items = [
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #profile-trailing>
|
||||
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-[var(--ui-primary)]" />
|
||||
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-(--ui-primary)" />
|
||||
</template>
|
||||
</UDropdownMenu>
|
||||
</template>
|
||||
|
||||
@@ -17,7 +17,7 @@ const items = [{
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #profile-trailing>
|
||||
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-[var(--ui-primary)]" />
|
||||
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-(--ui-primary)" />
|
||||
</template>
|
||||
</UDropdownMenu>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { FormError, FormSubmitEvent } from '#ui/types'
|
||||
import type { FormError, FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const state = reactive({
|
||||
email: undefined,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import Joi from 'joi'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const schema = Joi.object({
|
||||
email: Joi.string().required(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { FormError, FormErrorEvent, FormSubmitEvent } from '#ui/types'
|
||||
import type { FormError, FormErrorEvent, FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const state = reactive({
|
||||
email: undefined,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { object, string, nonempty, refine, type Infer } from 'superstruct'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const schema = object({
|
||||
email: nonempty(string()),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import * as v from 'valibot'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const schema = v.object({
|
||||
email: v.pipe(v.string(), v.email('Invalid email')),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { object, string, type InferType } from 'yup'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const schema = object({
|
||||
email: string().email('Invalid email').required('Required'),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import * as z from 'zod'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const schema = z.object({
|
||||
email: z.string().email('Invalid email'),
|
||||
|
||||
@@ -33,7 +33,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
|
||||
<template #item-label="{ item }">
|
||||
{{ item.label }}
|
||||
|
||||
<span class="text-[var(--ui-text-muted)]">
|
||||
<span class="text-(--ui-text-muted)">
|
||||
{{ item.email }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@ const domain = ref(domains[0])
|
||||
}"
|
||||
>
|
||||
<template #leading>
|
||||
<p class="text-sm text-[var(--ui-text-muted)]">
|
||||
<p class="text-sm text-(--ui-text-muted)">
|
||||
https://
|
||||
</p>
|
||||
</template>
|
||||
|
||||
@@ -13,7 +13,7 @@ const maxLength = 15
|
||||
<template #trailing>
|
||||
<div
|
||||
id="character-count"
|
||||
class="text-xs text-[var(--ui-text-muted)] tabular-nums"
|
||||
class="text-xs text-(--ui-text-muted) tabular-nums"
|
||||
aria-live="polite"
|
||||
role="status"
|
||||
>
|
||||
|
||||
@@ -4,8 +4,8 @@ const value = ref('')
|
||||
|
||||
<template>
|
||||
<UInput v-model="value" placeholder="" :ui="{ base: 'peer' }">
|
||||
<label class="pointer-events-none absolute left-0 -top-2.5 text-[var(--ui-text-highlighted)] text-xs font-medium px-1.5 transition-all peer-focus:-top-2.5 peer-focus:text-[var(--ui-text-highlighted)] peer-focus:text-xs peer-focus:font-medium peer-placeholder-shown:text-sm peer-placeholder-shown:text-[var(--ui-text-dimmed)] peer-placeholder-shown:top-1.5 peer-placeholder-shown:font-normal">
|
||||
<span class="inline-flex bg-[var(--ui-bg)] px-1">Email address</span>
|
||||
<label class="pointer-events-none absolute left-0 -top-2.5 text-(--ui-text-highlighted) text-xs font-medium px-1.5 transition-all peer-focus:-top-2.5 peer-focus:text-(--ui-text-highlighted) peer-focus:text-xs peer-focus:font-medium peer-placeholder-shown:text-sm peer-placeholder-shown:text-(--ui-text-dimmed) peer-placeholder-shown:top-1.5 peer-placeholder-shown:font-normal">
|
||||
<span class="inline-flex bg-(--ui-bg) px-1">Email address</span>
|
||||
</label>
|
||||
</UInput>
|
||||
</template>
|
||||
|
||||
@@ -77,7 +77,7 @@ const text = computed(() => {
|
||||
v-for="(req, index) in strength"
|
||||
:key="index"
|
||||
class="flex items-center gap-0.5"
|
||||
:class="req.met ? 'text-[var(--ui-success)]' : 'text-[var(--ui-text-muted)]'"
|
||||
:class="req.met ? 'text-(--ui-success)' : 'text-(--ui-text-muted)'"
|
||||
>
|
||||
<UIcon :name="req.met ? 'i-lucide-circle-check' : 'i-lucide-circle-x'" class="size-4 shrink-0" />
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
const show = ref(false)
|
||||
const password = ref('password')
|
||||
const password = ref('')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -62,7 +62,7 @@ const items = [
|
||||
:items="items"
|
||||
class="w-full justify-center"
|
||||
:ui="{
|
||||
viewport: 'sm:w-[var(--reka-navigation-menu-viewport-width)]',
|
||||
viewport: 'sm:w-(--reka-navigation-menu-viewport-width)',
|
||||
childList: 'sm:w-96',
|
||||
childLinkDescription: 'text-balance line-clamp-2'
|
||||
}"
|
||||
@@ -74,11 +74,11 @@ const items = [
|
||||
</li>
|
||||
|
||||
<li v-for="child in item.children" :key="child.label">
|
||||
<ULink class="text-sm text-left rounded-md p-3 transition-colors hover:bg-[var(--ui-bg-elevated)]/50">
|
||||
<p class="font-medium text-[var(--ui-text-highlighted)]">
|
||||
<ULink class="text-sm text-left rounded-md p-3 transition-colors hover:bg-(--ui-bg-elevated)/50">
|
||||
<p class="font-medium text-(--ui-text-highlighted)">
|
||||
{{ child.label }}
|
||||
</p>
|
||||
<p class="text-[var(--ui-text-muted)] line-clamp-2">
|
||||
<p class="text-(--ui-text-muted) line-clamp-2">
|
||||
{{ child.description }}
|
||||
</p>
|
||||
</ULink>
|
||||
|
||||
@@ -8,7 +8,7 @@ const open = ref(false)
|
||||
|
||||
<template #content>
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<h2 class="text-[var(--ui-text-highlighted)] font-semibold">
|
||||
<h2 class="text-(--ui-text-highlighted) font-semibold">
|
||||
Popover non-dismissible
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
|
||||
<template #item-label="{ item }">
|
||||
{{ item.label }}
|
||||
|
||||
<span class="text-[var(--ui-text-muted)]">
|
||||
<span class="text-(--ui-text-muted)">
|
||||
{{ item.email }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -100,7 +100,7 @@ const columnFilters = ref([{
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col flex-1 w-full">
|
||||
<div class="flex px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
|
||||
<div class="flex px-4 py-3.5 border-b border-(--ui-border-accented)">
|
||||
<UInput
|
||||
:model-value="(table?.tableApi?.getColumn('email')?.getFilterValue() as string)"
|
||||
class="max-w-sm"
|
||||
|
||||
@@ -130,7 +130,7 @@ function getHeader(column: Column<Payment>, label: string) {
|
||||
variant: 'ghost',
|
||||
label,
|
||||
icon: isSorted ? (isSorted === 'asc' ? 'i-lucide-arrow-up-narrow-wide' : 'i-lucide-arrow-down-wide-narrow') : 'i-lucide-arrow-up-down',
|
||||
class: '-mx-2.5 data-[state=open]:bg-[var(--ui-bg-elevated)]'
|
||||
class: '-mx-2.5 data-[state=open]:bg-(--ui-bg-elevated)'
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ const columnVisibility = ref({
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col flex-1 w-full">
|
||||
<div class="flex justify-end px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
|
||||
<div class="flex justify-end px-4 py-3.5 border-b border-(--ui-border-accented)">
|
||||
<UDropdownMenu
|
||||
:items="table?.tableApi?.getAllColumns().filter(column => column.getCanHide()).map(column => ({
|
||||
label: upperFirst(column.id),
|
||||
|
||||
@@ -263,7 +263,7 @@ function randomize() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-1 divide-y divide-[var(--ui-border-accented)] w-full">
|
||||
<div class="flex-1 divide-y divide-(--ui-border-accented) w-full">
|
||||
<div class="flex items-center gap-2 px-4 py-3.5 overflow-x-auto">
|
||||
<UInput
|
||||
:model-value="(table?.tableApi?.getColumn('email')?.getFilterValue() as string)"
|
||||
@@ -310,7 +310,7 @@ function randomize() {
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
<div class="px-4 py-3.5 text-sm text-[var(--ui-text-muted)]">
|
||||
<div class="px-4 py-3.5 text-sm text-(--ui-text-muted)">
|
||||
{{ table?.tableApi?.getFilteredSelectedRowModel().rows.length || 0 }} of
|
||||
{{ table?.tableApi?.getFilteredRowModel().rows.length || 0 }} row(s) selected.
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ const columns: TableColumn<User>[] = [{
|
||||
size: 'lg'
|
||||
}),
|
||||
h('div', undefined, [
|
||||
h('p', { class: 'font-medium text-[var(--ui-text-highlighted)]' }, row.original.name),
|
||||
h('p', { class: 'font-medium text-(--ui-text-highlighted)' }, row.original.name),
|
||||
h('p', { class: '' }, `@${row.original.username}`)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -90,14 +90,12 @@ const columns: TableColumn<Payment>[] = [{
|
||||
}
|
||||
}]
|
||||
|
||||
const table = useTemplateRef('table')
|
||||
|
||||
const globalFilter = ref('45')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col flex-1 w-full">
|
||||
<div class="flex px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
|
||||
<div class="flex px-4 py-3.5 border-b border-(--ui-border-accented)">
|
||||
<UInput
|
||||
v-model="globalFilter"
|
||||
class="max-w-sm"
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
<script setup lang="ts">
|
||||
import { getPaginationRowModel } from '@tanstack/vue-table'
|
||||
import type { TableColumn } from '@nuxt/ui'
|
||||
|
||||
const table = useTemplateRef('table')
|
||||
|
||||
type Payment = {
|
||||
id: string
|
||||
date: string
|
||||
email: string
|
||||
amount: number
|
||||
}
|
||||
const data = ref<Payment[]>([{
|
||||
id: '4600',
|
||||
date: '2024-03-11T15:30:00',
|
||||
email: 'james.anderson@example.com',
|
||||
amount: 594
|
||||
}, {
|
||||
id: '4599',
|
||||
date: '2024-03-11T10:10:00',
|
||||
email: 'mia.white@example.com',
|
||||
amount: 276
|
||||
}, {
|
||||
id: '4598',
|
||||
date: '2024-03-11T08:50:00',
|
||||
email: 'william.brown@example.com',
|
||||
amount: 315
|
||||
}, {
|
||||
id: '4597',
|
||||
date: '2024-03-10T19:45:00',
|
||||
email: 'emma.davis@example.com',
|
||||
amount: 529
|
||||
}, {
|
||||
id: '4596',
|
||||
date: '2024-03-10T15:55:00',
|
||||
email: 'ethan.harris@example.com',
|
||||
amount: 639
|
||||
}, {
|
||||
id: '4595',
|
||||
date: '2024-03-10T13:20:00',
|
||||
email: 'sophia.miller@example.com',
|
||||
amount: 428
|
||||
}, {
|
||||
id: '4594',
|
||||
date: '2024-03-10T11:05:00',
|
||||
email: 'noah.wilson@example.com',
|
||||
amount: 673
|
||||
}, {
|
||||
id: '4593',
|
||||
date: '2024-03-09T22:15:00',
|
||||
email: 'olivia.jones@example.com',
|
||||
amount: 382
|
||||
}, {
|
||||
id: '4592',
|
||||
date: '2024-03-09T20:30:00',
|
||||
email: 'liam.taylor@example.com',
|
||||
amount: 547
|
||||
}, {
|
||||
id: '4591',
|
||||
date: '2024-03-09T18:45:00',
|
||||
email: 'ava.thomas@example.com',
|
||||
amount: 291
|
||||
}, {
|
||||
id: '4590',
|
||||
date: '2024-03-09T16:20:00',
|
||||
email: 'lucas.martin@example.com',
|
||||
amount: 624
|
||||
}, {
|
||||
id: '4589',
|
||||
date: '2024-03-09T14:10:00',
|
||||
email: 'isabella.clark@example.com',
|
||||
amount: 438
|
||||
}, {
|
||||
id: '4588',
|
||||
date: '2024-03-09T12:05:00',
|
||||
email: 'mason.rodriguez@example.com',
|
||||
amount: 583
|
||||
}, {
|
||||
id: '4587',
|
||||
date: '2024-03-09T10:30:00',
|
||||
email: 'sophia.lee@example.com',
|
||||
amount: 347
|
||||
}, {
|
||||
id: '4586',
|
||||
date: '2024-03-09T08:15:00',
|
||||
email: 'ethan.walker@example.com',
|
||||
amount: 692
|
||||
}, {
|
||||
id: '4585',
|
||||
date: '2024-03-08T23:40:00',
|
||||
email: 'amelia.hall@example.com',
|
||||
amount: 419
|
||||
}, {
|
||||
id: '4584',
|
||||
date: '2024-03-08T21:25:00',
|
||||
email: 'oliver.young@example.com',
|
||||
amount: 563
|
||||
}, {
|
||||
id: '4583',
|
||||
date: '2024-03-08T19:50:00',
|
||||
email: 'aria.king@example.com',
|
||||
amount: 328
|
||||
}, {
|
||||
id: '4582',
|
||||
date: '2024-03-08T17:35:00',
|
||||
email: 'henry.wright@example.com',
|
||||
amount: 647
|
||||
}, {
|
||||
id: '4581',
|
||||
date: '2024-03-08T15:20:00',
|
||||
email: 'luna.lopez@example.com',
|
||||
amount: 482
|
||||
}])
|
||||
const columns: TableColumn<Payment>[] = [{
|
||||
accessorKey: 'id',
|
||||
header: '#',
|
||||
cell: ({ row }) => `#${row.getValue('id')}`
|
||||
}, {
|
||||
accessorKey: 'date',
|
||||
header: 'Date',
|
||||
cell: ({ row }) => {
|
||||
return new Date(row.getValue('date')).toLocaleString('en-US', {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: false
|
||||
})
|
||||
}
|
||||
}, {
|
||||
accessorKey: 'email',
|
||||
header: 'Email'
|
||||
}, {
|
||||
accessorKey: 'amount',
|
||||
header: () => h('div', { class: 'text-right' }, 'Amount'),
|
||||
cell: ({ row }) => {
|
||||
const amount = Number.parseFloat(row.getValue('amount'))
|
||||
const formatted = new Intl.NumberFormat('en-US', {
|
||||
style: 'currency',
|
||||
currency: 'EUR'
|
||||
}).format(amount)
|
||||
return h('div', { class: 'text-right font-medium' }, formatted)
|
||||
}
|
||||
}]
|
||||
|
||||
const pagination = ref({
|
||||
pageIndex: 0,
|
||||
pageSize: 5
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full space-y-4 pb-4">
|
||||
<UTable
|
||||
ref="table"
|
||||
v-model:pagination="pagination"
|
||||
:data="data"
|
||||
:columns="columns"
|
||||
:pagination-options="{
|
||||
getPaginationRowModel: getPaginationRowModel()
|
||||
}"
|
||||
class="flex-1"
|
||||
/>
|
||||
|
||||
<div class="flex justify-center border-t border-(--ui-border) pt-4">
|
||||
<UPagination
|
||||
:default-page="(table?.tableApi?.getState().pagination.pageIndex || 0) + 1"
|
||||
:items-per-page="table?.tableApi?.getState().pagination.pageSize"
|
||||
:total="table?.tableApi?.getFilteredRowModel().rows.length"
|
||||
@update:page="(p) => table?.tableApi?.setPageIndex(p - 1)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -111,7 +111,7 @@ const expanded = ref({ 1: true })
|
||||
v-model:expanded="expanded"
|
||||
:data="data"
|
||||
:columns="columns"
|
||||
:ui="{ tr: 'data-[expanded=true]:bg-[var(--ui-bg-elevated)]/50' }"
|
||||
:ui="{ tr: 'data-[expanded=true]:bg-(--ui-bg-elevated)/50' }"
|
||||
class="flex-1"
|
||||
>
|
||||
<template #expanded="{ row }">
|
||||
|
||||
@@ -113,7 +113,7 @@ const rowSelection = ref({ 1: true })
|
||||
:columns="columns"
|
||||
/>
|
||||
|
||||
<div class="px-4 py-3.5 border-t border-[var(--ui-border-accented)] text-sm text-[var(--ui-text-muted)]">
|
||||
<div class="px-4 py-3.5 border-t border-(--ui-border-accented) text-sm text-(--ui-text-muted)">
|
||||
{{ table?.tableApi?.getFilteredSelectedRowModel().rows.length || 0 }} of
|
||||
{{ table?.tableApi?.getFilteredRowModel().rows.length || 0 }} row(s) selected.
|
||||
</div>
|
||||
|
||||
@@ -97,7 +97,7 @@ function getDropdownActions(user: User): DropdownMenuItem[][] {
|
||||
<div class="flex items-center gap-3">
|
||||
<UAvatar :src="`https://i.pravatar.cc/120?img=${row.original.id}`" size="lg" />
|
||||
<div>
|
||||
<p class="font-medium text-[var(--ui-text-highlighted)]">
|
||||
<p class="font-medium text-(--ui-text-highlighted)">
|
||||
{{ row.original.name }}
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -26,7 +26,7 @@ const state = reactive({
|
||||
<template>
|
||||
<UTabs :items="items" variant="link" class="gap-4 w-full" :ui="{ trigger: 'flex-1' }">
|
||||
<template #account="{ item }">
|
||||
<p class="text-[var(--ui-text-muted)] mb-4">
|
||||
<p class="text-(--ui-text-muted) mb-4">
|
||||
{{ item.description }}
|
||||
</p>
|
||||
|
||||
@@ -43,7 +43,7 @@ const state = reactive({
|
||||
</template>
|
||||
|
||||
<template #password="{ item }">
|
||||
<p class="text-[var(--ui-text-muted)] mb-4">
|
||||
<p class="text-(--ui-text-muted) mb-4">
|
||||
{{ item.description }}
|
||||
</p>
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
const toast = useToast()
|
||||
|
||||
const props = defineProps<{
|
||||
orientation: 'horizontal' | 'vertical'
|
||||
}>()
|
||||
|
||||
function showToast() {
|
||||
toast.add({
|
||||
title: 'Uh oh! Something went wrong.',
|
||||
orientation: props.orientation,
|
||||
actions: [{
|
||||
icon: 'i-lucide-refresh-cw',
|
||||
label: 'Retry',
|
||||
color: 'neutral',
|
||||
variant: 'outline',
|
||||
onClick: (e) => {
|
||||
e?.stopPropagation()
|
||||
}
|
||||
}]
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UButton label="Show toast" color="neutral" variant="outline" @click="showToast" />
|
||||
</template>
|
||||
@@ -7,10 +7,10 @@ const appConfig = useAppConfig()
|
||||
<UFormField
|
||||
label="toaster.duration"
|
||||
size="sm"
|
||||
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
|
||||
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
|
||||
:ui="{
|
||||
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
|
||||
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
|
||||
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
|
||||
label: 'text-(--ui-text-muted) px-2 py-1.5',
|
||||
container: 'mt-0'
|
||||
}"
|
||||
>
|
||||
@@ -18,7 +18,7 @@ const appConfig = useAppConfig()
|
||||
v-model="appConfig.toaster.duration"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
|
||||
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
|
||||
/>
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,10 @@ const appConfig = useAppConfig()
|
||||
<UFormField
|
||||
label="toaster.expand"
|
||||
size="sm"
|
||||
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
|
||||
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
|
||||
:ui="{
|
||||
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
|
||||
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
|
||||
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
|
||||
label: 'text-(--ui-text-muted) px-2 py-1.5',
|
||||
container: 'mt-0'
|
||||
}"
|
||||
>
|
||||
@@ -19,7 +19,7 @@ const appConfig = useAppConfig()
|
||||
:items="[true, false]"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
|
||||
class="rounded-(--ui-radius) rounded-l-none min-w-12"
|
||||
:search-input="false"
|
||||
/>
|
||||
</UFormField>
|
||||
|
||||
@@ -10,10 +10,10 @@ const appConfig = useAppConfig()
|
||||
<UFormField
|
||||
label="toaster.position"
|
||||
size="sm"
|
||||
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
|
||||
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
|
||||
:ui="{
|
||||
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
|
||||
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
|
||||
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
|
||||
label: 'text-(--ui-text-muted) px-2 py-1.5',
|
||||
container: 'mt-0'
|
||||
}"
|
||||
>
|
||||
@@ -22,7 +22,7 @@ const appConfig = useAppConfig()
|
||||
:items="positions"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
|
||||
class="rounded-(--ui-radius) rounded-l-none min-w-12"
|
||||
:search-input="false"
|
||||
/>
|
||||
</UFormField>
|
||||
|
||||
@@ -1,3 +1,65 @@
|
||||
<script setup lang="ts">
|
||||
import colors from 'tailwindcss/colors'
|
||||
import { omit } from '#ui/utils'
|
||||
|
||||
const appConfig = useAppConfig()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
const neutralColors = ['slate', 'gray', 'zinc', 'neutral', 'stone']
|
||||
const neutral = computed({
|
||||
get() {
|
||||
return appConfig.ui.colors.neutral
|
||||
},
|
||||
set(option) {
|
||||
appConfig.ui.colors.neutral = option
|
||||
window.localStorage.setItem('nuxt-ui-neutral', appConfig.ui.colors.neutral)
|
||||
}
|
||||
})
|
||||
|
||||
const colorsToOmit = ['inherit', 'current', 'transparent', 'black', 'white', ...neutralColors]
|
||||
const primaryColors = Object.keys(omit(colors, colorsToOmit as any))
|
||||
const primary = computed({
|
||||
get() {
|
||||
return appConfig.ui.colors.primary
|
||||
},
|
||||
set(option) {
|
||||
appConfig.ui.colors.primary = option
|
||||
window.localStorage.setItem('nuxt-ui-primary', appConfig.ui.colors.primary)
|
||||
setBlackAsPrimary(false)
|
||||
}
|
||||
})
|
||||
|
||||
const radiuses = [0, 0.125, 0.25, 0.375, 0.5]
|
||||
const radius = computed({
|
||||
get() {
|
||||
return appConfig.theme.radius
|
||||
},
|
||||
set(option) {
|
||||
appConfig.theme.radius = option
|
||||
window.localStorage.setItem('nuxt-ui-radius', String(appConfig.theme.radius))
|
||||
}
|
||||
})
|
||||
|
||||
const modes = [
|
||||
{ label: 'light', icon: appConfig.ui.icons.light },
|
||||
{ label: 'dark', icon: appConfig.ui.icons.dark },
|
||||
{ label: 'system', icon: appConfig.ui.icons.system }
|
||||
]
|
||||
const mode = computed({
|
||||
get() {
|
||||
return colorMode.value
|
||||
},
|
||||
set(option) {
|
||||
colorMode.preference = option
|
||||
}
|
||||
})
|
||||
|
||||
function setBlackAsPrimary(value: boolean) {
|
||||
appConfig.theme.blackAsPrimary = value
|
||||
window.localStorage.setItem('nuxt-ui-black-as-primary', String(value))
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UPopover :ui="{ content: 'w-72 px-6 py-4 flex flex-col gap-4' }">
|
||||
<template #default="{ open }">
|
||||
@@ -7,7 +69,7 @@
|
||||
:variant="open ? 'soft' : 'ghost'"
|
||||
square
|
||||
aria-label="Color picker"
|
||||
:ui="{ leadingIcon: 'text-[var(--ui-primary)]' }"
|
||||
:ui="{ leadingIcon: 'text-(--ui-primary)' }"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -18,12 +80,22 @@
|
||||
</legend>
|
||||
|
||||
<div class="grid grid-cols-3 gap-1 -mx-2">
|
||||
<ThemePickerButton
|
||||
chip="primary"
|
||||
label="Black"
|
||||
:selected="appConfig.theme.blackAsPrimary"
|
||||
@click="setBlackAsPrimary(true)"
|
||||
>
|
||||
<template #leading>
|
||||
<span class="inline-block w-2 h-2 rounded-full bg-black dark:bg-white" />
|
||||
</template>
|
||||
</ThemePickerButton>
|
||||
<ThemePickerButton
|
||||
v-for="color in primaryColors"
|
||||
:key="color"
|
||||
:label="color"
|
||||
:chip="color"
|
||||
:selected="primary === color"
|
||||
:selected="!appConfig.theme.blackAsPrimary && primary === color"
|
||||
@click="primary = color"
|
||||
/>
|
||||
</div>
|
||||
@@ -68,12 +140,12 @@
|
||||
Theme
|
||||
</legend>
|
||||
|
||||
<div class="flex gap-1 -mx-2">
|
||||
<div class="grid grid-cols-3 gap-1 -mx-2">
|
||||
<ThemePickerButton
|
||||
v-for="m in modes"
|
||||
:key="m.label"
|
||||
v-bind="m"
|
||||
:selected="mode === m.label"
|
||||
:selected="colorMode.preference === m.label"
|
||||
@click="mode = m.label"
|
||||
/>
|
||||
</div>
|
||||
@@ -81,60 +153,3 @@
|
||||
</template>
|
||||
</UPopover>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import colors from 'tailwindcss/colors'
|
||||
import { omit } from '#ui/utils'
|
||||
|
||||
const appConfig = useAppConfig()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
// Computed
|
||||
|
||||
const neutralColors = ['slate', 'gray', 'zinc', 'neutral', 'stone']
|
||||
const neutral = computed({
|
||||
get() {
|
||||
return appConfig.ui.colors.neutral
|
||||
},
|
||||
set(option) {
|
||||
appConfig.ui.colors.neutral = option
|
||||
window.localStorage.setItem('nuxt-ui-neutral', appConfig.ui.colors.neutral)
|
||||
}
|
||||
})
|
||||
|
||||
const colorsToOmit = ['inherit', 'current', 'transparent', 'black', 'white', ...neutralColors]
|
||||
const primaryColors = Object.keys(omit(colors, colorsToOmit as any))
|
||||
const primary = computed({
|
||||
get() {
|
||||
return appConfig.ui.colors.primary
|
||||
},
|
||||
set(option) {
|
||||
appConfig.ui.colors.primary = option
|
||||
window.localStorage.setItem('nuxt-ui-primary', appConfig.ui.colors.primary)
|
||||
}
|
||||
})
|
||||
|
||||
const radiuses = [0, 0.125, 0.25, 0.375, 0.5]
|
||||
const radius = computed({
|
||||
get() {
|
||||
return appConfig.theme.radius
|
||||
},
|
||||
set(option) {
|
||||
appConfig.theme.radius = option
|
||||
window.localStorage.setItem('nuxt-ui-radius', String(appConfig.theme.radius))
|
||||
}
|
||||
})
|
||||
|
||||
const modes = [
|
||||
{ label: 'light', icon: appConfig.ui.icons.light },
|
||||
{ label: 'dark', icon: appConfig.ui.icons.dark }
|
||||
]
|
||||
const mode = computed({
|
||||
get() {
|
||||
return colorMode.value
|
||||
},
|
||||
set(option) {
|
||||
colorMode.preference = option
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,25 +1,3 @@
|
||||
<template>
|
||||
<UButton
|
||||
size="sm"
|
||||
color="neutral"
|
||||
:icon="icon"
|
||||
:label="label"
|
||||
:variant="selected ? 'soft' : 'outline'"
|
||||
class="capitalize ring-[var(--ui-border)] rounded-[var(--ui-radius)] text-[11px]"
|
||||
>
|
||||
<template v-if="chip" #leading>
|
||||
<span
|
||||
class="inline-block w-2 h-2 rounded-full"
|
||||
:class="`bg-[var(--color-light)] dark:bg-[var(--color-dark)]`"
|
||||
:style="{
|
||||
'--color-light': `var(--color-${chip}-500)`,
|
||||
'--color-dark': `var(--color-${chip}-400)`
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
</UButton>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
label: string
|
||||
@@ -28,3 +6,28 @@ defineProps<{
|
||||
selected?: boolean
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UButton
|
||||
size="sm"
|
||||
color="neutral"
|
||||
variant="outline"
|
||||
:icon="icon"
|
||||
:label="label"
|
||||
class="capitalize ring-(--ui-border) rounded-[calc(var(--ui-radius))] text-[11px]"
|
||||
:class="[selected ? 'bg-(--ui-bg-elevated)' : 'hover:bg-(--ui-bg-elevated)/50']"
|
||||
>
|
||||
<template v-if="chip" #leading>
|
||||
<slot name="leading">
|
||||
<span
|
||||
class="inline-block size-2 rounded-full"
|
||||
:class="`bg-(--color-light) dark:bg-(--color-dark)`"
|
||||
:style="{
|
||||
'--color-light': `var(--color-${chip}-500)`,
|
||||
'--color-dark': `var(--color-${chip}-400)`
|
||||
}"
|
||||
/>
|
||||
</slot>
|
||||
</template>
|
||||
</UButton>
|
||||
</template>
|
||||
|
||||
@@ -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<ContentNavigationItem[] | undefined>) => {
|
||||
const { framework, module } = useSharedData()
|
||||
|
||||
const mappedNavigation = computed(() => navigation.value?.map(item => processNavigationItem(item)))
|
||||
|
||||
const filteredNavigation = computed(() => mappedNavigation.value?.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
@@ -29,12 +44,15 @@ export const useContentNavigation = (navigation: Ref<ContentNavigationItem[] | u
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
})?.map(processNavigationItemIcon)
|
||||
}
|
||||
}))
|
||||
|
||||
return {
|
||||
mappedNavigation,
|
||||
mappedNavigation: computed(() => mappedNavigation.value?.map(item => ({
|
||||
...item,
|
||||
children: item.children?.map((child: any) => ({ ...child, icon: undefined }))
|
||||
}))),
|
||||
filteredNavigation
|
||||
}
|
||||
}
|
||||
|
||||
56
docs/app/composables/useLinks.ts
Normal file
56
docs/app/composables/useLinks.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
export function useLinks() {
|
||||
const route = useRoute()
|
||||
|
||||
return computed(() => [{
|
||||
label: 'Docs',
|
||||
icon: 'i-lucide-square-play',
|
||||
to: '/getting-started',
|
||||
active: route.path.startsWith('/getting-started')
|
||||
}, {
|
||||
label: 'Components',
|
||||
icon: 'i-lucide-square-code',
|
||||
to: '/components',
|
||||
active: route.path.startsWith('/components')
|
||||
}, {
|
||||
label: 'Pro',
|
||||
icon: 'i-lucide-panels-top-left',
|
||||
to: '/pro',
|
||||
active: route.path.startsWith('/pro'),
|
||||
orientation: 'vertical',
|
||||
children: [{
|
||||
icon: 'i-lucide-sparkles',
|
||||
label: 'Features',
|
||||
description: 'A collection of premium Vue components.',
|
||||
to: '/pro'
|
||||
}, {
|
||||
icon: 'i-lucide-credit-card',
|
||||
label: 'Pricing',
|
||||
description: 'Free in development, buy when ready to launch.',
|
||||
to: '/pro/pricing',
|
||||
active: route.path.startsWith('/pro/pricing')
|
||||
}, {
|
||||
icon: 'i-lucide-panels-top-left',
|
||||
label: 'Templates',
|
||||
description: 'Official templates made with Nuxt UI Pro.',
|
||||
to: '/pro/templates'
|
||||
}, {
|
||||
icon: 'i-lucide-circle-check',
|
||||
label: 'Activate',
|
||||
description: 'Enable Nuxt UI Pro in your production projects.',
|
||||
to: '/pro/activate'
|
||||
}]
|
||||
}, {
|
||||
label: 'Figma',
|
||||
icon: 'i-lucide-figma',
|
||||
to: '/figma'
|
||||
}, {
|
||||
label: 'Roadmap',
|
||||
icon: 'i-lucide-map',
|
||||
to: '/roadmap'
|
||||
}, {
|
||||
label: 'Releases',
|
||||
icon: 'i-lucide-rocket',
|
||||
to: 'https://github.com/nuxt/ui/releases',
|
||||
target: '_blank'
|
||||
}].filter(Boolean))
|
||||
}
|
||||
@@ -7,7 +7,6 @@ const props = defineProps<{
|
||||
error: NuxtError
|
||||
}>()
|
||||
|
||||
const route = useRoute()
|
||||
const appConfig = useAppConfig()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
@@ -26,34 +25,10 @@ const searchTerm = ref('')
|
||||
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
|
||||
// }, 500))
|
||||
|
||||
const links = computed(() => [{
|
||||
label: 'Docs',
|
||||
icon: 'i-lucide-square-play',
|
||||
to: '/getting-started',
|
||||
active: route.path.startsWith('/getting-started')
|
||||
}, {
|
||||
label: 'Components',
|
||||
icon: 'i-lucide-square-code',
|
||||
to: '/components',
|
||||
active: route.path.startsWith('/components')
|
||||
}, {
|
||||
label: 'Roadmap',
|
||||
icon: 'i-lucide-map',
|
||||
to: '/roadmap'
|
||||
}, {
|
||||
label: 'Figma',
|
||||
icon: 'i-lucide-figma',
|
||||
to: 'https://www.figma.com/community/file/1288455405058138934',
|
||||
target: '_blank'
|
||||
}, {
|
||||
label: 'Releases',
|
||||
icon: 'i-lucide-rocket',
|
||||
to: 'https://github.com/nuxt/ui/releases',
|
||||
target: '_blank'
|
||||
}].filter(Boolean))
|
||||
|
||||
const links = useLinks()
|
||||
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
|
||||
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
|
||||
const blackAsPrimary = computed(() => appConfig.theme.blackAsPrimary ? `:root { --ui-primary: black; } .dark { --ui-primary: white; }` : ':root {}')
|
||||
|
||||
useHead({
|
||||
meta: [
|
||||
@@ -64,7 +39,8 @@ useHead({
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
|
||||
],
|
||||
style: [
|
||||
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 }
|
||||
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 },
|
||||
{ innerHTML: blackAsPrimary, id: 'nuxt-ui-black-as-primary', tagPriority: -2 }
|
||||
],
|
||||
htmlAttrs: {
|
||||
lang: 'en'
|
||||
|
||||
292
docs/app/pages/figma/.figma.yml
Normal file
292
docs/app/pages/figma/.figma.yml
Normal file
@@ -0,0 +1,292 @@
|
||||
title: Nuxt UI Figma Design Kits
|
||||
description: Bridge the gap between designers and developers using professional-grade components. The official Nuxt UI & Nuxt UI Pro design kits for Figma mirrors the development library for perfect consistency.
|
||||
headline: Used and loved by 2,000 designers and teams.
|
||||
hero:
|
||||
title: From [Figma]{#figma} to [Nuxt]{#nuxt}, faster.
|
||||
description: From wireframe to production in no time with the official Nuxt UI & Nuxt UI Pro design kits for Figma. Start free with the Nuxt UI Kit, or upgrade to Nuxt UI Pro for premium components, layouts, and enhanced design-to-code efficiency.
|
||||
image: /figma/hero.png
|
||||
links:
|
||||
- label: Purchase Pro Kit
|
||||
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
|
||||
trailing-icon: i-lucide-arrow-right
|
||||
target: _blank
|
||||
- label: Free Figma Kit
|
||||
to: 'https://go.nuxt.com/figma'
|
||||
icon: i-logos-figma
|
||||
color: neutral
|
||||
variant: outline
|
||||
target: _blank
|
||||
features1:
|
||||
features:
|
||||
- title: Advanced Figma Features
|
||||
description: Components, Local Variables, Auto Layout, Variants and more.
|
||||
icon: i-logos-figma
|
||||
- title: Instant Theming
|
||||
description: Customize your design system instantly using local variables and tokens.
|
||||
icon: i-lucide-swatch-book
|
||||
- title: Two Powerful Design Kits
|
||||
description: Start with essential components, or unlock Pro for complete blocks and templates.
|
||||
icon: i-lucide-files
|
||||
cta1:
|
||||
title: Everything you need in a [single file]{class="text-(--ui-primary)"}.
|
||||
description: Design and development in perfect sync with our [Free](https://www.figma.com/community/file/1288455405058138934/nuxt-ui-v3-official-design-kit-free) and Pro files. Developers can implement designs faster, while designers work with production-ready components.
|
||||
section1:
|
||||
title: Customize in a few clicks to fit your needs
|
||||
description: Control your entire design system with Figma Variables. Update primitive tokens once and watch your changes spread across the entire system.
|
||||
reverse: true
|
||||
features:
|
||||
- title: Style with color variables powered by Tailwind CSS colors
|
||||
icon: i-simple-icons-tailwindcss
|
||||
- title: Apply over 500+ local variables across your entire file
|
||||
icon: i-lucide-layers-2
|
||||
- title: Build with unified tokens for consistency
|
||||
icon: i-lucide-bolt
|
||||
tabs:
|
||||
- label: Define your tokens
|
||||
src: /pro/figma/local-variables.png
|
||||
width: 656
|
||||
height: 342
|
||||
alt: Define local variables in the Nuxt UI Figma design kit
|
||||
- label: Use them in your design
|
||||
src: /pro/figma/local-variables-result.png
|
||||
width: 656
|
||||
height: 342
|
||||
alt: Use color variables in the Nuxt UI Figma design kit
|
||||
links:
|
||||
- label: Preview UI Pro Design Kit
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
target: _blank
|
||||
icon: i-logos-figma
|
||||
color: neutral
|
||||
variant: outline
|
||||
section2:
|
||||
title: One component, endless possibilities
|
||||
description: Create unlimited variations through nested components and swappable instances. Every element is fully themeable with props and slots, giving you complete control.
|
||||
features:
|
||||
- title: Choose between 17K+ components and variants
|
||||
icon: i-lucide-component
|
||||
- title: Customize designs with swap instance
|
||||
icon: i-lucide-square-dashed-mouse-pointer
|
||||
- title: Switch between light and dark modes in one click
|
||||
icon: i-lucide-moon
|
||||
image:
|
||||
src: /pro/figma/component.png
|
||||
width: 656
|
||||
height: 374
|
||||
alt: A component in the Nuxt UI Figma design kit
|
||||
links:
|
||||
- label: Preview UI Pro Design Kit
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
target: _blank
|
||||
icon: i-logos-figma
|
||||
color: neutral
|
||||
variant: outline
|
||||
section3:
|
||||
title: Perfect match with development
|
||||
description: Our Figma kit perfectly matches Nuxt UI Pro components, ensuring complete alignment between design and development.
|
||||
reverse: true
|
||||
features:
|
||||
- title: Match development standards using the same props and tokens
|
||||
icon: i-lucide-square-code
|
||||
- title: Access Nuxt UI components through direct links
|
||||
icon: i-lucide-link
|
||||
- title: Work together as design and dev teams share one component language
|
||||
icon: i-lucide-handshake
|
||||
image:
|
||||
src: /pro/figma/nuxt-ui-figma-to-code.png
|
||||
width: 656
|
||||
height: 370
|
||||
alt: A screenshot of Nuxt UI Code & Figma Kit
|
||||
links:
|
||||
- label: Preview UI Pro Design Kit
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
icon: i-logos-figma
|
||||
color: neutral
|
||||
variant: outline
|
||||
target: _blank
|
||||
features2:
|
||||
features:
|
||||
- title: Ready-to-use Templates
|
||||
description: Production-ready templates for marketing sites, documentation, and more included.
|
||||
icon: i-lucide-panels-top-left
|
||||
- title: Well-Documented System
|
||||
description: Complete guides for designers and developers to master your design system.
|
||||
icon: i-lucide-book-open-text
|
||||
- title: Icons Pack
|
||||
description: Complete Lucide icon library included - 1500+ ready components.
|
||||
icon: i-lucide-smile
|
||||
section4:
|
||||
title: Start designing now.
|
||||
description: '**From download to deployment in simple steps.** :br Get instant access to production-ready components and start creating.'
|
||||
links:
|
||||
- label: Get access now
|
||||
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
|
||||
trailing-icon: i-lucide-arrow-right
|
||||
- label: Preview UI Pro Design Kit
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
icon: i-logos-figma
|
||||
color: neutral
|
||||
variant: outline
|
||||
target: _blank
|
||||
steps:
|
||||
- title: Download & Import
|
||||
description: After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
|
||||
image:
|
||||
src: /pro/figma/step-1.png
|
||||
alt: Import the Nuxt UI Pro Figma design kit
|
||||
width: 314
|
||||
height: 230
|
||||
- title: Customize to your brand
|
||||
description: Set your colors, typography, and styles to match your brand identity in minutes.
|
||||
image:
|
||||
src: /pro/figma/step-2.png
|
||||
alt: Customize the Nuxt UI Pro Figma design kit
|
||||
width: 314
|
||||
height: 230
|
||||
- title: Design your website
|
||||
description: Design beautiful interfaces with production-ready components. Drag, drop, and customize.
|
||||
image:
|
||||
src: /pro/figma/step-3.png
|
||||
alt: Design your website with the Nuxt UI Pro Figma design kit
|
||||
width: 314
|
||||
height: 230
|
||||
- title: Share it with your developers
|
||||
description: Perfect development handoff with components that match Nuxt UI's structure exactly.
|
||||
image:
|
||||
src: /pro/figma/step-4.png
|
||||
alt: Share it with your developers with the Nuxt UI Pro Figma design kit
|
||||
width: 314
|
||||
height: 230
|
||||
pricing:
|
||||
title: Pricing plan that scale with you.
|
||||
description: Start for free with Nuxt UI components, or unlock the complete Nuxt UI Pro design kit with a one-time purchase.
|
||||
plans:
|
||||
- title: Free Design Kit
|
||||
description: Start with all Nuxt UI components and tokens.
|
||||
price: FREE
|
||||
features:
|
||||
- '**Nuxt UI only components**'
|
||||
- 40+ fully customizable components
|
||||
- Figma Local Variables for colors, typography, and effects
|
||||
- Light and Dark mode ready
|
||||
- Lucide icons (1500+ icons) integration
|
||||
- Regular updates
|
||||
button:
|
||||
label: Open in Figma
|
||||
icon: i-logos-figma
|
||||
to: https://go.nuxt.com/figma
|
||||
color: neutral
|
||||
terms: Used by 17,000+ designers.
|
||||
- title: Solo License
|
||||
description: Design faster with all Nuxt UI Pro components.
|
||||
price: $149
|
||||
billing_period: one-time payment
|
||||
billing_cycle: plus local taxes
|
||||
class: bg-(--ui-bg-elevated)/50
|
||||
features:
|
||||
- '**1 Designer**'
|
||||
- Nuxt UI & Nuxt UI Pro Components
|
||||
- 'Templates: Landing, Documentation, etc'
|
||||
- Quick Start with Step-by-step Guides
|
||||
- Use on Unlimited Projects
|
||||
- Lifetime Free Updates
|
||||
button:
|
||||
label: Buy now
|
||||
to: https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d
|
||||
extraButton:
|
||||
label: Preview in Figma
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
target: _blank
|
||||
icon: i-logos-figma
|
||||
- title: Team License
|
||||
description: Everything you need to deliver faster as a team.
|
||||
price: $349
|
||||
billing_period: one-time payment
|
||||
billing_cycle: plus local taxes
|
||||
class: bg-(--ui-bg-elevated)/50
|
||||
features:
|
||||
- '**Up to 20 Designers**'
|
||||
- Nuxt UI & Nuxt UI Pro Components
|
||||
- 'Templates: Landing, Documentation, etc'
|
||||
- Step-by-step guides to help you start
|
||||
- Use on unlimited projects
|
||||
- Lifetime free updates
|
||||
button:
|
||||
label: Buy now
|
||||
to: https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d
|
||||
extraButton:
|
||||
label: Preview in Figma
|
||||
to: 'https://go.nuxt.com/figma-pro'
|
||||
target: _blank
|
||||
icon: i-logos-figma
|
||||
customers:
|
||||
title: Used by 2,000+ developers & designers around the world.
|
||||
items:
|
||||
- src: /pro/logos/springfieldclinic.svg
|
||||
alt: Springfield Clinic
|
||||
- src: /pro/logos/churnkey.svg
|
||||
alt: Churnkey
|
||||
- src: /pro/logos/bosch.svg
|
||||
alt: BOSCH
|
||||
- src: /pro/logos/blizzard.svg
|
||||
alt: Blizzard
|
||||
- src: /pro/logos/bodet.svg
|
||||
alt: Bodet
|
||||
- src: /pro/logos/win.svg
|
||||
alt: WinReality
|
||||
- src: /pro/logos/tower.svg
|
||||
alt: Tower Research
|
||||
- src: /pro/logos/liegeairport.svg
|
||||
alt: Liege Airport
|
||||
- src: /pro/logos/wuniversity.svg
|
||||
alt: University of Washington
|
||||
- src: /pro/logos/funda.svg
|
||||
alt: Funda
|
||||
- src: /pro/logos/exxonmobil.svg
|
||||
alt: ExxonMobil
|
||||
- src: /pro/logos/mainpost.svg
|
||||
alt: Main Post
|
||||
- src: /pro/logos/insep.svg
|
||||
alt: INSEP
|
||||
- src: /pro/logos/applause.svg
|
||||
alt: Applause
|
||||
- src: /pro/logos/instadapp.svg
|
||||
alt: Instadapp
|
||||
faq:
|
||||
title: Frequently Asked Questions
|
||||
description: If you can't find what you're looking for, email our support team and if you're lucky someone will get back to you.
|
||||
items:
|
||||
- label: Can I use the UI kit on a free Figma account?
|
||||
content: Yes. You don't need Figma's paid plan to use our UI kits.
|
||||
defaultOpen: true
|
||||
- label: Do you have a free trial?
|
||||
content: We don't offer a free trial for the Pro Figma Kit, you can [preview it](https://go.nuxt.com/figma-pro).
|
||||
- label: How do I access the files after purchasing?
|
||||
content: After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
|
||||
- label: Can I upgrade my Solo license to the Team license?
|
||||
content: Yes! Email us at design@nuxt.com with your details and we'll send you a discount code.
|
||||
- label: Can I use the UI Kit license for commercial projects?
|
||||
content: Yes, the license allows you to sell your designs that utilize the UI Kit implementations.
|
||||
- label: Can I create multiple projects for multiple clients?
|
||||
content: Yes, you can create multiple projects for multiple clients with the same license, there is no limit to the number of projects you can create.
|
||||
- label: Can I include UI Kit in an open source project?
|
||||
content: No, the license does not allow you to include the UI Kit in an open source project where the design files are publicly accessible.
|
||||
- label: How do I contact you?
|
||||
content: Email us at design@nuxt.com with your details and we'll help you out.
|
||||
- label: What is your refund policy?
|
||||
content: As the Figma Pro Kit is a digital product packaged as a zip file, we cannot offer refunds once the purchase is made.
|
||||
- label: Do you have a Figma to Code plugin?
|
||||
content: >
|
||||
We recommend the open source [TeamPad Dev](https://github.com/ecomfe/tempad-dev) inspect panel with the [TeamPad Dev Nuxt UI Plugin](https://github.com/Justineo/tempad-dev-plugin-nuxt-ui):
|
||||
|
||||
1. Install the [TeamPad Dev Chrome Extension](https://chromewebstore.google.com/detail/tempad-dev/lgoeakbaikpkihoiphamaeopmliaimpc)
|
||||
|
||||
2. Open your Figma file with Nuxt UI components (reload the page if you don't see the TeamPad Dev panel)
|
||||
|
||||
3. Install the `@nuxt` in TeamPad Dev's plugins section
|
||||
|
||||
4. Select any Nuxt UI component and inspect the code it generates
|
||||
|
||||
{.w-full .rounded .mb-2 .max-w-[636px]}
|
||||
|
||||
*Right now, only Nuxt UI components are supported, but the code of the plugin is [open source](https://github.com/Justineo/tempad-dev-plugin-nuxt-ui) and anyone can contribute to it.*
|
||||
288
docs/app/pages/figma/index.vue
Normal file
288
docs/app/pages/figma/index.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-expect-error yaml is not typed
|
||||
import page from '.figma.yml'
|
||||
import { animate } from 'motion'
|
||||
import { joinURL } from 'ufo'
|
||||
|
||||
const { url } = useSiteConfig()
|
||||
useSeoMeta({
|
||||
title: page.title,
|
||||
description: page.description,
|
||||
ogTitle: page.title,
|
||||
ogDescription: page.description,
|
||||
ogImage: joinURL(url, '/pro/figma/og-image.png')
|
||||
})
|
||||
|
||||
const video = ref<HTMLVideoElement | null>(null)
|
||||
const played = ref(false)
|
||||
|
||||
onMounted(async () => {
|
||||
// Animate cursors
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
const figmaWordPosition = document.querySelector('#figma')?.getBoundingClientRect()
|
||||
const nuxtWordPosition = document.querySelector('#nuxt')?.getBoundingClientRect()
|
||||
const initialScrollX = window.scrollX
|
||||
const initialScrollY = window.scrollY
|
||||
if (figmaWordPosition && nuxtWordPosition) {
|
||||
animate('#cursor1', { left: Math.round(Math.random() * window.outerWidth), top: Math.round(Math.random() * window.outerHeight) }, { duration: 0.1 })
|
||||
.then(() => animate('#cursor1', { opacity: 1 }, { duration: 0.3 }))
|
||||
.then(() => {
|
||||
return animate('#cursor1', {
|
||||
left: Math.round(figmaWordPosition.left + initialScrollX + figmaWordPosition.width / 2),
|
||||
top: Math.round(figmaWordPosition.top + initialScrollY - figmaWordPosition.height / 4)
|
||||
}, { duration: 1.5, delay: 0.2, ease: 'easeInOut' })
|
||||
})
|
||||
.then(() => animate('#cursor1', { scale: 0.8 }, { duration: 0.1, ease: 'easeOut' }))
|
||||
.then(() => animate('#cursor1', { scale: 1 }, { duration: 0.1, ease: 'easeOut' }))
|
||||
.then(() => animate('#figma', { color: 'var(--ui-info)' }, { duration: 0.3, ease: 'easeOut' }))
|
||||
.then(() => animate('#cursor1', { left: Math.round(figmaWordPosition.left + initialScrollX + figmaWordPosition.width), top: Math.round(figmaWordPosition.top + initialScrollY) }, { duration: 0.6, ease: 'easeInOut' }))
|
||||
|
||||
animate('#cursor2', { left: Math.round(Math.random() * window.outerWidth), top: Math.round(Math.random() * window.outerHeight) }, { duration: 0.1, delay: 0.6 })
|
||||
.then(() => animate('#cursor2', { opacity: 1 }, { duration: 0.3 }))
|
||||
.then(() => {
|
||||
return animate('#cursor2', {
|
||||
left: Math.round(nuxtWordPosition.left + initialScrollX + nuxtWordPosition.width / 2),
|
||||
top: Math.round(nuxtWordPosition.top + initialScrollY - nuxtWordPosition.height / 4)
|
||||
}, { duration: 1.5, delay: 0.2, ease: 'easeInOut' })
|
||||
})
|
||||
.then(() => animate('#cursor2', { scale: 0.8 }, { duration: 0.1, ease: 'easeOut' }))
|
||||
.then(() => animate('#cursor2', { scale: 1 }, { duration: 0.1, ease: 'easeOut' }))
|
||||
.then(() => animate('#nuxt', { color: 'var(--ui-success)' }, { duration: 0.3, ease: 'easeOut' }))
|
||||
.then(() => animate('#cursor2', { left: Math.round(nuxtWordPosition.left + initialScrollX + nuxtWordPosition.width), top: Math.round(nuxtWordPosition.top + initialScrollY) }, { duration: 0.6, ease: 'easeInOut' }))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative">
|
||||
<div id="cursor1" class="absolute z-10 pointer-events-none" :style="{ opacity: 0 }">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24" class="absolute top-0 left-0 drop-shadow-[0_1px_2px_rgb(0,0,0,0.25)] text-white dark:text-(--ui-bg)">
|
||||
<path
|
||||
fill="var(--ui-info)"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="1.5"
|
||||
d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"
|
||||
/>
|
||||
</svg>
|
||||
<UBadge color="info" class="absolute top-[18px] left-[18px] py-1 px-1 rounded-sm font-semibold leading-none">
|
||||
Sarah
|
||||
</UBadge>
|
||||
</div>
|
||||
<div id="cursor2" class="absolute z-10 pointer-events-none" :style="{ opacity: 0 }">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24" class="absolute top-0 left-0 drop-shadow-[0_1px_2px_rgb(0,0,0,0.25)] text-white dark:text-(--ui-bg)">
|
||||
<path
|
||||
fill="var(--ui-success)"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="1.5"
|
||||
d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"
|
||||
/>
|
||||
</svg>
|
||||
<UBadge color="success" class="absolute top-[18px] left-[18px] py-1 px-1 rounded-sm font-semibold leading-none">
|
||||
Sebastien
|
||||
</UBadge>
|
||||
</div>
|
||||
<UPageHero
|
||||
:links="page.hero.links"
|
||||
class="relative"
|
||||
:ui="{
|
||||
container: 'relative !pb-0'
|
||||
}"
|
||||
>
|
||||
<template #title>
|
||||
<MDC :value="page.hero.title" unwrap="p" />
|
||||
</template>
|
||||
<template #description>
|
||||
<MDC :value="page.hero.description" unwrap="p" />
|
||||
</template>
|
||||
<!-- <img src="/pro/figma/nuxt-ui-figma.png" alt="Screnshot of the Nuxt UI Figma design kit" class="w-full h-auto border border-(--ui-border) border-b-0"> -->
|
||||
<div class="relative">
|
||||
<video
|
||||
ref="video"
|
||||
:controls="played"
|
||||
playsinline
|
||||
src="https://res.cloudinary.com/nuxt/video/upload/v1739267662/ui-pro/video4_aobki0.mp4"
|
||||
poster="https://res.cloudinary.com/nuxt/video/upload/so_0/v1739267662/ui-pro/video4_aobki0.jpg"
|
||||
:class="{ grayscale: !played }"
|
||||
/>
|
||||
<div v-if="!played" class="group cursor-pointer absolute inset-0 flex items-center justify-center backdrop-blur-xs" @click="video?.play(); played = true">
|
||||
<UButton
|
||||
icon="i-heroicons-play-20-solid"
|
||||
size="xl"
|
||||
color="neutral"
|
||||
variant="solid"
|
||||
class="group-hover:scale-105 transition-transform cursor-pointer drop-shadow-xl"
|
||||
aria-label="Play video"
|
||||
:ui="{
|
||||
base: 'p-4'
|
||||
}"
|
||||
>
|
||||
Watch 1 min demo
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
|
||||
</UPageHero>
|
||||
<UPageSection v-bind="page.features1" :ui="{ container: 'py-16 sm:py-16 lg:py-16', features: 'mt-0' }" class="border-y border-(--ui-border)" />
|
||||
<UPageCTA
|
||||
v-if="page.cta1"
|
||||
variant="naked"
|
||||
:ui="{
|
||||
container: 'lg:grid-cols-0 !gap-0 px-4 sm:px-6 lg:px-8',
|
||||
wrapper: 'grid grid-cols-1 lg:grid-cols-2',
|
||||
description: 'lg:mt-0' }"
|
||||
orientation="horizontal"
|
||||
class="rounded-none bg-gradient-to-b from-(--ui-bg-muted) to-(--ui-bg)"
|
||||
>
|
||||
<template #title>
|
||||
<MDC :value="page.cta1.title" unwrap="p" />
|
||||
</template>
|
||||
<template #description>
|
||||
<MDC :value="page.cta1.description" unwrap="p" />
|
||||
</template>
|
||||
</UPageCTA>
|
||||
<UPageSection v-bind="page.section1" orientation="horizontal" :ui="{ container: 'py-16 sm:py-16 lg:py-16' }">
|
||||
<UTabs :items="(page.section1.tabs as any[])" size="sm" color="neutral" :unmount-on-hide="false">
|
||||
<template #content="{ item }">
|
||||
<NuxtImg
|
||||
:width="item.width"
|
||||
:height="item.height"
|
||||
:src="item.src"
|
||||
:alt="item.alt"
|
||||
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
|
||||
lazy
|
||||
/>
|
||||
</template>
|
||||
</UTabs>
|
||||
</UPageSection>
|
||||
<UPageSection v-bind="page.section2" orientation="horizontal" :ui="{ container: 'py-16 sm:py-16 lg:py-16' }">
|
||||
<NuxtImg
|
||||
v-if="page.section2.image"
|
||||
v-bind="page.section2.image"
|
||||
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
|
||||
lazy
|
||||
/>
|
||||
</UPageSection>
|
||||
<UPageSection v-bind="page.section3" orientation="horizontal" :ui="{ container: 'py-16 sm:pt-16 lg:pt-16' }">
|
||||
<NuxtImg
|
||||
v-if="page.section3.image"
|
||||
v-bind="page.section3.image"
|
||||
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
|
||||
lazy
|
||||
/>
|
||||
</UPageSection>
|
||||
<USeparator />
|
||||
<UPageSection
|
||||
v-bind="page.section4"
|
||||
orientation="vertical"
|
||||
:ui="{
|
||||
title: 'sm:text-left',
|
||||
description: 'sm:text-left',
|
||||
links: 'sm:justify-start',
|
||||
container: 'relative !pb-0',
|
||||
wrapper: 'sm:pl-8'
|
||||
}"
|
||||
>
|
||||
<template #description>
|
||||
<MDC :value="page.section4.description" unwrap="p" />
|
||||
</template>
|
||||
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
|
||||
<ul class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 items-start justify-center border border-(--ui-border) border-b-0 sm:divide-x divide-y lg:divide-y-0 divide-(--ui-border)">
|
||||
<li v-for="(step, index) in page?.section4.steps" :key="step.title" class="flex flex-col gap-y-4 justify-start group h-full p-4">
|
||||
<NuxtImg
|
||||
v-if="step.image"
|
||||
v-bind="step.image"
|
||||
class="rounded-(--ui-radius)"
|
||||
lazy
|
||||
/>
|
||||
<div>
|
||||
<h2 class="font-semibold inline-flex items-center gap-x-1">
|
||||
<UBadge :label="index + 1" size="sm" color="neutral" variant="subtle" class="rounded-full tabular-nums" /> {{ step.title }}
|
||||
</h2>
|
||||
<p class="text-(--ui-text-muted) text-sm">
|
||||
{{ step.description }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</UPageSection>
|
||||
<UPageSection v-bind="page.features2" :ui="{ container: 'py-16 sm:py-16 lg:py-16', features: 'mt-0' }" class="border-y border-(--ui-border)" />
|
||||
<UPageSection
|
||||
v-if="page.pricing"
|
||||
:title="page.pricing.title"
|
||||
:description="page.pricing.description"
|
||||
orientation="vertical"
|
||||
:ui="{
|
||||
title: 'sm:text-left',
|
||||
description: 'sm:text-left',
|
||||
links: 'sm:justify-start',
|
||||
container: 'relative !pb-0',
|
||||
wrapper: 'sm:pl-8'
|
||||
}"
|
||||
>
|
||||
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
|
||||
<UPricingPlans compact class="-space-x-px">
|
||||
<UPricingPlan
|
||||
v-for="(plan, index) in page.pricing.plans"
|
||||
:key="index"
|
||||
:title="plan.title"
|
||||
:description="plan.description"
|
||||
:price="plan.price"
|
||||
:billing-period="plan.billing_period"
|
||||
:billing-cycle="plan.billing_cycle"
|
||||
:highlight="plan.highlight"
|
||||
:features="plan.features"
|
||||
:button="plan.button"
|
||||
:terms="plan.terms"
|
||||
class="rounded-none"
|
||||
:class="plan.class"
|
||||
>
|
||||
<template #features>
|
||||
<li v-for="(feature, i) in plan.features" :key="i" class="flex items-center gap-2 min-w-0">
|
||||
<UIcon name="i-lucide-circle-check" class="size-5 shrink-0 text-(--ui-primary)" />
|
||||
<MDC :value="feature" unwrap="p" tag="span" class="text-sm truncate text-(--ui-text-accented)" />
|
||||
</li>
|
||||
</template>
|
||||
<template #button>
|
||||
<div class="flex flex-col w-full items-center gap-2">
|
||||
<UButton v-bind="plan.button" block size="lg" />
|
||||
<UButton
|
||||
v-if="plan.extraButton"
|
||||
v-bind="plan.extraButton"
|
||||
block
|
||||
size="lg"
|
||||
variant="outline"
|
||||
color="neutral"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</UPricingPlan>
|
||||
</UPricingPlans>
|
||||
</UPageSection>
|
||||
<UPageCTA v-if="page.customers" :title="page.customers.title" :ui="{ title: '!text-base font-medium', container: 'sm:py-12 sm:gap-8' }" variant="outline" class="rounded-none">
|
||||
<UPageMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
|
||||
<img
|
||||
v-for="(logo, index) in page.customers.items"
|
||||
:key="index"
|
||||
v-bind="logo"
|
||||
class="h-6 shrink-0 max-w-[140px] filter invert dark:invert-0"
|
||||
>
|
||||
</UPageMarquee>
|
||||
</UPageCTA>
|
||||
<UPageSection v-bind="page.faq" :ui="{ container: 'relative' }">
|
||||
<div aria-hidden="true" class="hidden lg:block absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
|
||||
<UPageAccordion
|
||||
multiple
|
||||
:items="(page.faq.items as any[])"
|
||||
class="max-w-4xl mx-auto"
|
||||
>
|
||||
<template #body="{ item }">
|
||||
<MDC :value="item.content" unwrap="p" />
|
||||
</template>
|
||||
</UPageAccordion>
|
||||
</UPageSection>
|
||||
</div>
|
||||
</template>
|
||||
217
docs/app/pages/pro/.content/pricing.yml
Normal file
217
docs/app/pages/pro/.content/pricing.yml
Normal file
@@ -0,0 +1,217 @@
|
||||
title: Nuxt UI Pro Pricing
|
||||
description: Start for free in development mode, then upgrade to a paid plan to unlock the full features of Nuxt UI Pro when you are ready to launch.
|
||||
pricing:
|
||||
headline: Pricing
|
||||
title: Upgrade to Nuxt UI [Pro]{class="text-(--ui-primary)"}.
|
||||
description: On top of 40+ open source components from Nuxt UI, Pro gives you access to 50+ premium Vue components to create beautiful & responsive Nuxt applications in minutes. It includes all primitives to build landing pages, documentations, blogs, dashboards or entire SaaS products.
|
||||
freePlan:
|
||||
title: Free in development
|
||||
description: Try Nuxt UI Pro for free in development, no credit card required. Upgrade when ready to deploy.
|
||||
variant: soft
|
||||
orientation: horizontal
|
||||
button:
|
||||
label: Get started for Free
|
||||
to: '/getting-started/installation/pro/nuxt'
|
||||
color: 'neutral'
|
||||
variant: 'outline'
|
||||
figma:
|
||||
title: Figma Kit Pro
|
||||
description: Get all Nuxt UI Pro components in a Figma kit to design your next application before coding. Everything you need, from wire-framing to high-fidelity web integration.
|
||||
variant: soft
|
||||
orientation: horizontal
|
||||
price: $149 - $349
|
||||
terms: Solo & Team licenses available.
|
||||
features:
|
||||
- 1700+ components & variants from Nuxt UI & UI Pro
|
||||
- 'Variables: primary, neutral, fonts, rounded, shadows, etc.'
|
||||
- Light & dark mode support
|
||||
- 'Templates: Starter, Landing, Docs, SaaS and Dashboard'
|
||||
- Auto-layout & responsive ready
|
||||
- Tailwind CSS assets & icons included
|
||||
- Free [preview available](https://www.figma.com/design/mxXR9binOSLU3rYKZZRPXs/PREVIEW---NuxtUIPro-V3-BETA?m=auto&t=c4598Wr0rZwKPs5M-1)
|
||||
- Includes Nuxt UI [Figma Kit](https://www.figma.com/community/file/1288455405058138934)
|
||||
button:
|
||||
label: Explore Figma Kit Pricing
|
||||
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
|
||||
color: 'neutral'
|
||||
plans:
|
||||
- title: Solo
|
||||
description: Tailored for indie hackers, freelancers and solo founders.
|
||||
price: $249
|
||||
billing_period: one-time payment
|
||||
billing_cycle: plus local taxes
|
||||
features:
|
||||
- One developer
|
||||
- Unlimited projects
|
||||
- Access to the GitHub repository
|
||||
- Unlimited minor & patch updates
|
||||
- Lifetime access
|
||||
button:
|
||||
label: Buy now
|
||||
to: https://nuxt.lemonsqueezy.com/buy/057dacb2-87ba-4dc1-9256-59ee5b3bd394
|
||||
- title: Startup
|
||||
description: Best suited for small teams, startups and agencies.
|
||||
price: $499
|
||||
billing_period: one-time payment
|
||||
billing_cycle: plus local taxes
|
||||
features:
|
||||
- Up to 5 developers
|
||||
- Unlimited projects
|
||||
- Access to the GitHub repository
|
||||
- Unlimited minor & patch updates
|
||||
- Lifetime access
|
||||
button:
|
||||
label: Buy now
|
||||
to: https://nuxt.lemonsqueezy.com/buy/2e042a33-7e76-4dda-bd68-e353c182e571
|
||||
highlight: true
|
||||
- title: Organization
|
||||
description: Ideal for larger teams and organizations.
|
||||
price: $999
|
||||
billing_period: one-time payment
|
||||
billing_cycle: plus local taxes
|
||||
features:
|
||||
- Up to 20 developers
|
||||
- Unlimited projects
|
||||
- Everything in Startup
|
||||
- Prioritized feature requests
|
||||
- Unlimited minor & patch updates
|
||||
- Lifetime access
|
||||
button:
|
||||
label: Buy now
|
||||
to: https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d
|
||||
logos:
|
||||
- src: /pro/logos/springfieldclinic.svg
|
||||
alt: Springfield Clinic
|
||||
- src: /pro/logos/churnkey.svg
|
||||
alt: Churnkey
|
||||
- src: /pro/logos/bosch.svg
|
||||
alt: BOSCH
|
||||
- src: /pro/logos/blizzard.svg
|
||||
alt: Blizzard
|
||||
- src: /pro/logos/bodet.svg
|
||||
alt: Bodet
|
||||
- src: /pro/logos/win.svg
|
||||
alt: WinReality
|
||||
- src: /pro/logos/tower.svg
|
||||
alt: Tower Research
|
||||
- src: /pro/logos/liegeairport.svg
|
||||
alt: Liege Airport
|
||||
- src: /pro/logos/wuniversity.svg
|
||||
alt: University of Washington
|
||||
- src: /pro/logos/funda.svg
|
||||
alt: Funda
|
||||
- src: /pro/logos/exxonmobil.svg
|
||||
alt: ExxonMobil
|
||||
- src: /pro/logos/mainpost.svg
|
||||
alt: Main Post
|
||||
- src: /pro/logos/insep.svg
|
||||
alt: INSEP
|
||||
- src: /pro/logos/applause.svg
|
||||
alt: Applause
|
||||
- src: /pro/logos/instadapp.svg
|
||||
alt: Instadapp
|
||||
testimonials:
|
||||
title: What people are saying
|
||||
description: Nuxt UI Pro is already trusted by 2,000+ users and teams around the world.
|
||||
items:
|
||||
- quote: "We were using a SaaS service for the docs site, but were left unfulfilled. We put in the effort to do it in house, with UI Pro and not only did we get complimented by a prospect on our site, but they wanted to know our platform."
|
||||
user:
|
||||
name: 'Anthony Bettini'
|
||||
description: 'CEO and founder of VulnCheck'
|
||||
to: 'https://www.linkedin.com/in/anthonybettini/'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://media.licdn.com/dms/image/v2/C4E03AQEY3pmXsH8hDg/profile-displayphoto-shrink_200_200/profile-displayphoto-shrink_200_200/0/1519741249602?e=1743638400&v=beta&t=lw2K6vS0OOCZWGtHY1buJVkRItQCa4OQw0vzAhhpJk8'
|
||||
- quote: "Wow, Nuxt UI Pro is a total game-changer! I'm seriously impressed with the quality, attention to detail, and the insane variety of components you get. It's like hitting the jackpot for any developer. I've saved countless hours that I would've spent stressing over making my apps look good, with amazing accessible UX, and instead, I've been able to focus on the real deal – building the app itself. It's an instant buy for me, every single time. No second thoughts!"
|
||||
user:
|
||||
name: 'Yaz Jallad'
|
||||
description: 'Founder Ninjaparade Digital'
|
||||
to: 'https://twitter.com/ninjaparade/'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://pbs.twimg.com/profile_images/1824690890222485504/lQ7v1AGt_400x400.jpg'
|
||||
- quote: "Nuxt UI Pro saves 100s of hours of dev and design time while delivering a clean professional look on any device."
|
||||
user:
|
||||
name: 'Kevin Olson'
|
||||
description: 'Founder of Fume.app'
|
||||
to: 'https://github.com/acidjazz'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/acidjazz'
|
||||
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/acidjazz 2x'
|
||||
- quote: "I decided to replace my custom-built components with a component library and chose Nuxt UI Pro. It only took me a few hours, and the new UI looks more professional. Integrating the library is easy; the components are well-documented and highly customizable. I can only recommend it; this library is my new choice for new SaaS products."
|
||||
user:
|
||||
name: 'Michael Hoffmann'
|
||||
description: 'Senior Frontend Developer'
|
||||
to: 'https://mokkapps.de/'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/mokkapps'
|
||||
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/mokkapps 2x'
|
||||
- quote: "Nuxt UI Pro is my go to component library. Out-of-the-box it handles all of the UI demands I throw at it while looking great. The customisation is really worth thought out, allowing you to override components in a breeze. Always amazed at the improvements dropped in each update as well, the team is doing an amazing job."
|
||||
user:
|
||||
name: 'Harlan Wilton'
|
||||
description: 'Nuxt core team member'
|
||||
to: 'https://github.com/harlan-zw'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/harlan-zw'
|
||||
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/harlan-zw 2x'
|
||||
- quote: "I jumped at the chance to buy the Nuxt team's new UI kit as soon as I saw it. While I'm already a fan of Nuxt UI, the pro version takes it to a whole new level and lets me paste entire blocks into all my projects, saving me a ton of time."
|
||||
user:
|
||||
name: 'Thomas Sanlis'
|
||||
description: 'Freelance developer and designer'
|
||||
to: 'https://twitter.com/T_Zahil'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://pbs.twimg.com/profile_images/1374040164180299791/ACw4G3nZ_400x400.jpg'
|
||||
- quote: "Nuxt UI has allowed me to develop my SaaS without any prior mockups. The design quality of their components and the intelligence of the DX meant that I was able to try many different layouts for my application until I found the perfect UX for my users. Nuxt UI is the ui-kit I would have dreamed of building myself, and Nuxt UI Pro makes things even easier when you want to go further with your SaaS. Kudos to the team."
|
||||
user:
|
||||
name: 'Benjamin Code'
|
||||
description: 'YouTuber and SaaS builder'
|
||||
to: 'https://twitter.com/benjamincode'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://pbs.twimg.com/profile_images/1607353032420769793/I8qQSUfQ_400x400.jpg'
|
||||
- quote: "Nuxt UI Pro is my preferred choice for everything, from a POC to a web platform. It's ready to use out-of-the-box and assists me in crafting pixel-perfect UIs. It saves me a significant amount of time while remaining highly customizable. Give it a try, and you won't be let down."
|
||||
user:
|
||||
name: 'Estéban Soubiran'
|
||||
description: 'Web developer and UnJS member'
|
||||
to: 'https://twitter.com/soubiran_'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://pbs.twimg.com/profile_images/1801649350319218689/aS_X_iTm_400x400.jpg'
|
||||
- quote: "As someone who builds a lot of projects, Nuxt UI Pro has been a game-changer. It's not just about saving time – it's about having components that are thoughtfully designed and just work. The developer experience is exceptional, and I can focus on building features instead of tweaking UI components."
|
||||
user:
|
||||
name: 'Hugo Richard'
|
||||
description: 'Frontend Engineer at NuxtLabs'
|
||||
to: 'https://twitter.com/hugorcd__'
|
||||
target: _blank
|
||||
avatar:
|
||||
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/hugorcd'
|
||||
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/hugorcd 2x'
|
||||
faq:
|
||||
title: Frequently Asked Questions
|
||||
description: If you can't find what you're looking for, email our support team and if you're lucky someone will get back to you.
|
||||
items:
|
||||
- label: What is the difference between Nuxt UI Pro and Nuxt UI?
|
||||
content: Nuxt UI Pro is a collection of premium Vue components, composables and utils built on top of Nuxt UI. It includes advanced responsive components ([Header](/components/header), [PageHero](/components/page-hero), [PricingPlan](/components/pricing-plan), [BlogPost](/components/blog-post), etc.) designed ot help you build web applications faster.
|
||||
defaultOpen: true
|
||||
- label: Do you have a free trial?
|
||||
content: We have much better than a free trial, you can use Nuxt UI Pro for free in development mode. Once you are ready to deploy your application, you can purchase a license.
|
||||
- label: What do I get with my license?
|
||||
content: Once you purchase a license, you will receive a license key to [activate](/pro/activate) by inviting the team members to our private GitHub repository. On top of having access to the source code and private roadmap, the license key will allow you to [build your project to production](/getting-started/license#build) with the `nuxt build` command.
|
||||
- label: Can I use Nuxt UI Pro for Open Source projects?
|
||||
content: Yes, you can use Nuxt UI Pro for your open source projects as well as your commercial projects as long as you don't sell Nuxt UI Pro as a product and that you don't share your license key.
|
||||
- label: What does “Unlimited minor & patch updates” include?
|
||||
content: We add new components and improvements to Nuxt UI Pro as we get new ideas and feedback, you will receive these updates for the major version you purchased. :br **Your license key will work forever for the major version.** We may release a major version including more advanced components and features in the future, you will be able to upgrade to this version with a generous discount.
|
||||
- label: I purchased Nuxt UI Pro previous versions, do I need to purchase the version 3?
|
||||
content: '**The version 3 is a free upgrade**, so the license you bought on previous versions will be valid for v3.'
|
||||
- label: What does “lifetime access” means?
|
||||
content: Nuxt UI Pro is a one-time purchase, with no recurring subscription. You will have access to all assets of Nuxt UI Pro forever.
|
||||
- label: Do you have discounts for students or non-profits?
|
||||
content: Yes, we offer a 50% discount for students using Nuxt UI Pro purely for educational purposes. Contact us at ui-pro@nuxt.com with your details and we'll send you a discount code.
|
||||
- label: Do you offer technical support?
|
||||
content: Once you sign up you get access to our private GitHub repository, where you can ask questions, report bugs or feature requests and get help from other customers. If you require more specialised support or consultancy, contact us at ui-pro@nuxt.com.
|
||||
- label: What is your refund policy?
|
||||
content: If you are not satisfied with Nuxt UI Pro, let us know within 14 days of your purchase at ui-pro@nuxt.com and we'll refund your money.
|
||||
174
docs/app/pages/pro/.content/pro.yml
Normal file
174
docs/app/pages/pro/.content/pro.yml
Normal file
@@ -0,0 +1,174 @@
|
||||
title: Build faster with Nuxt UI Pro.
|
||||
description: A collection of premium Vue components, composables and utils built on top of Nuxt UI, oriented on structure and layout and designed to be used as building blocks for your application.
|
||||
hero:
|
||||
title: Build faster with Nuxt UI [Pro]{class="text-(--ui-primary)"}.
|
||||
description: A collection of premium Vue components, composables and utils built on top of Nuxt UI. :br Focused on structure and layout, these **responsive components** are designed to be the perfect **building blocks for your next idea**.
|
||||
links:
|
||||
- label: Get started
|
||||
icon: i-lucide-arrow-right
|
||||
trailing: true
|
||||
to: /getting-started/installation/pro/nuxt
|
||||
size: xl
|
||||
- label: Purchase a license
|
||||
size: xl
|
||||
color: neutral
|
||||
variant: outline
|
||||
to: /pro/pricing
|
||||
features:
|
||||
title: Create stunning Vue applications faster.
|
||||
description: Nuxt UI Pro comes packed with powerful features to help you build modern, performant, accessible and responsive Nuxt applications at record speed. From pre-built UI sections to Figma design kits, every detail is crafted to speed up your development and deliver a polished user experience.
|
||||
features:
|
||||
- title: 40+ Ready-to-use Sections
|
||||
description: Pre-built UI components for landing pages, documentation, blogs, dashboards, and more—ready to use out of the box.
|
||||
icon: i-lucide-layout-grid
|
||||
- title: Auto Dark Mode
|
||||
description: Seamlessly adapts to user preferences with a built-in dark mode switch—no extra configuration needed.
|
||||
icon: i-lucide-moon
|
||||
- title: Blazing-fast Performance
|
||||
description: Optimized for Nuxt 3 with minimal bundle size, lightning-fast rendering, and best practices in performance.
|
||||
icon: i-lucide-zap
|
||||
- title: SEO & Accessibility Ready
|
||||
description: Built with proper semantic HTML, structured data, and accessibility in mind for better rankings and usability.
|
||||
icon: i-lucide-search-check
|
||||
- title: Fully Customizable UI
|
||||
description: Modify colors, fonts, spacing, and layouts with Tailwind CSS and Nuxt UI’s design tokens to match your brand identity.
|
||||
icon: i-lucide-settings-2
|
||||
- title: Nuxt Content Support
|
||||
description: Write content with Markdown and MDC, making it easy to build documentation, blogs, and knowledge bases.
|
||||
icon: i-simple-icons-markdown
|
||||
- title: Vue-only mode
|
||||
description: Enjoy the benefits of Nuxt UI Pro without Nuxt. Integrate it seamlessly into your Vue 3 + Vite projects and build modern UIs with ease.
|
||||
icon: i-simple-icons-vuedotjs
|
||||
- title: Built-in Internationalization (i18n)
|
||||
description: Easily localize your site with built-in support for multiple languages and right-to-left (RTL) layouts.
|
||||
icon: i-lucide-globe
|
||||
- title: Figma Design Kits
|
||||
description: Match your development workflow with Nuxt UI & UI Pro Figma UI kits, ensuring a fast transition from design to code.
|
||||
icon: i-simple-icons-figma
|
||||
authorQuote:
|
||||
quote: Nuxt UI, born from a desire to improve Vue component development, is the go-to library for building modern web interfaces. We aim to provide you with a comprehensive set of tools to create and customize your next UI while maintaining the best developer experience.
|
||||
user:
|
||||
name: Benjamin Canac
|
||||
description: Author of Nuxt UI
|
||||
to: https://github.com/benjamincanac
|
||||
avatar:
|
||||
src: https://github.com/benjamincanac.png
|
||||
sections:
|
||||
- title: The freedom to build anything
|
||||
description: Nuxt UI Pro ships with an extensive set of advanced components that cover a wide range of use-cases. Carefully crafted to reduce boilerplate code without sacrificing flexibility.
|
||||
id: features
|
||||
features:
|
||||
- name: Fully customizable
|
||||
description: Like Nuxt UI, change the style of any component from your App Config or customize them specifically through the ui prop.
|
||||
icon: i-lucide-pencil-ruler
|
||||
- name: Slots for everything
|
||||
description: Each component leverages the power of Vue's slots to give you the flexibility to build anything.
|
||||
icon: i-lucide-code
|
||||
- name: Responsive by design
|
||||
description: Nuxt UI Pro components aims to structure your content, they are responsive by design and will adapt to any screen size.
|
||||
icon: i-lucide-layout
|
||||
links:
|
||||
- label: Explore components
|
||||
to: /components
|
||||
trailingIcon: i-lucide-arrow-right
|
||||
code: |
|
||||
```vue [app.vue]
|
||||
<script setup lang="ts">
|
||||
const links = [
|
||||
{ to: '/', label: 'Home' },
|
||||
{ to: '/about', label: 'About' },
|
||||
{ to: '/contact', label: 'Contact' }
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UApp>
|
||||
<UHeader :links="links" />
|
||||
|
||||
<UPageHero title="Hello World" />
|
||||
|
||||
<UPageSection title="Features">
|
||||
<UPageGrid>
|
||||
<UPageCard title="First Card" />
|
||||
<UPageCard title="Second Card" />
|
||||
<UPageCard title="Third Card" />
|
||||
</UPageGrid>
|
||||
</UPageSection>
|
||||
|
||||
<UFooter />
|
||||
</UApp>
|
||||
</template>
|
||||
```
|
||||
- title: The flexibility to control your data
|
||||
description: Although you can use any data source you want, Nuxt UI Pro is fully integrated with Nuxt Content and provides additional features when the module is detected.
|
||||
reverse: true
|
||||
features:
|
||||
- name: 'Write Markdown with ease'
|
||||
description: Nuxt UI Pro overrides Nuxt Content prose components to make them awesome but also adds new ones like Callout, CodeGroup, Field, etc.
|
||||
icon: i-simple-icons-markdown
|
||||
- name: Full-Text Search out of the box
|
||||
description: 'Nuxt UI Pro ships with a ready to use command palette component. No need to setup Algolia DocSearch anymore.'
|
||||
icon: i-lucide-search
|
||||
links:
|
||||
- label: Nuxt Content integration
|
||||
to: /getting-started/content
|
||||
icon: i-lucide-arrow-right
|
||||
trailing: true
|
||||
code: |
|
||||
```vue [pages/\[...slug\\].vue]
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
|
||||
const { data: page } = await useAsyncData(route.path, () => queryCollection('content').path(route.path).first())
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UPage>
|
||||
<UPageHeader :title="page.title" :description="page.description" :links="page.links" />
|
||||
|
||||
<UPageBody>
|
||||
<ContentRenderer v-if="page.body" :value="page" />
|
||||
</UPageBody>
|
||||
|
||||
<template #right>
|
||||
<UContentToc :links="page.body.toc.links" />
|
||||
</template>
|
||||
</UPage>
|
||||
</template>
|
||||
```
|
||||
templates:
|
||||
headline: Templates
|
||||
title: Kickstart with Nuxt UI Pro in seconds
|
||||
description: Choose from a variety of templates to get started with Nuxt UI Pro in seconds. Each template is designed to help you build beautiful and responsive Nuxt applications in minutes.
|
||||
items:
|
||||
- title: Landing
|
||||
description: A template for building a landing page with Nuxt UI Pro.
|
||||
icon: i-lucide-layout
|
||||
to: 'https://landing-template.nuxt.dev/'
|
||||
image: '/pro/templates/landing.png'
|
||||
- title: Saas
|
||||
description: A template for building a SaaS application with Nuxt UI Pro.
|
||||
icon: i-lucide-cloud
|
||||
to: 'https://saas-template.nuxt.dev/'
|
||||
image: '/pro/templates/saas.png'
|
||||
- title: Docs
|
||||
description: A template for building a documentation site with Nuxt UI Pro.
|
||||
icon: i-lucide-book
|
||||
to: 'https://docs-template.nuxt.dev/'
|
||||
image: '/pro/templates/docs.png'
|
||||
- title: Dashboard
|
||||
description: A template for building a dashboard with Nuxt UI Pro.
|
||||
icon: i-lucide-chart-bar
|
||||
to: 'https://dashboard-template.nuxt.dev/'
|
||||
image: '/pro/templates/dashboard.png'
|
||||
cta:
|
||||
title: Start with Nuxt UI Pro today!
|
||||
description: Nuxt UI Pro is free in development, but you need a license to use it in production.
|
||||
links:
|
||||
- label: Purchase a license
|
||||
to: '/pro/pricing'
|
||||
icon: i-lucide-shopping-cart
|
||||
- label: License
|
||||
to: '/getting-started/license'
|
||||
trailingIcon: i-lucide-circle-help
|
||||
variant: subtle
|
||||
111
docs/app/pages/pro/.content/templates.yml
Normal file
111
docs/app/pages/pro/.content/templates.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
title: Official Nuxt UI [Pro]{.text-(--ui-primary)} Templates
|
||||
description: 'Ready to use templates powered by our premium Vue components and Nuxt Content.<br class="hidden lg:block"> The templates are responsive, accessible and easy to customize so you can get started in no time.'
|
||||
head.title: Templates
|
||||
head.description: 'Ready to use templates powered by our premium Vue components and Nuxt Content. The templates are responsive, accessible and easy to customize so you can get started in no time.'
|
||||
navigation: false
|
||||
links:
|
||||
- label: Get started
|
||||
to: /getting-started/installation/pro/nuxt#use-an-official-template
|
||||
color: neutral
|
||||
size: xl
|
||||
trailingIcon: i-lucide-arrow-right
|
||||
- label: Purchase a license
|
||||
size: xl
|
||||
color: neutral
|
||||
variant: outline
|
||||
to: /pro/pricing
|
||||
templates:
|
||||
- title: 'Landing'
|
||||
description: "A landing page template you can use as a starting point for your next idea. You can change the content easily in [`content/index.yml`](https://github.com/nuxt-ui-pro/landing/blob/v3/content/index.yml)."
|
||||
thumbnail:
|
||||
dark: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=dark
|
||||
light: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=light
|
||||
features:
|
||||
- title: Full responsive
|
||||
icon: i-lucide-smartphone
|
||||
- title: Features, Pricing, Testimonials and FAQ sections
|
||||
icon: i-lucide-rows-3
|
||||
- title: Write content in YAML
|
||||
icon: i-simple-icons-yaml
|
||||
links:
|
||||
- label: Live preview
|
||||
to: https://landing-template.nuxt.dev
|
||||
target: _blank
|
||||
trailingIcon: i-lucide-arrow-up-right
|
||||
color: neutral
|
||||
- label: Use this template
|
||||
to: https://github.com/nuxt-ui-pro/landing/tree/v3
|
||||
target: _blank
|
||||
icon: i-simple-icons-github
|
||||
color: neutral
|
||||
variant: outline
|
||||
- title: 'Docs'
|
||||
description: "A ready-to-use documentation template integrated with [Nuxt Content](https://content.nuxt.com). You can start writing your docs right away inside the [`content/`](https://github.com/nuxt-ui-pro/docs/tree/v3/content) directory."
|
||||
thumbnail:
|
||||
dark: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=dark
|
||||
light: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=light
|
||||
features:
|
||||
- title: Write pages in Markdown
|
||||
icon: i-simple-icons-markdown
|
||||
- title: Generated navigation & table of contents
|
||||
icon: i-lucide-text
|
||||
- title: Full-text search out of the box
|
||||
icon: i-lucide-search
|
||||
links:
|
||||
- label: Live preview
|
||||
to: https://docs-template.nuxt.dev
|
||||
target: _blank
|
||||
trailingIcon: i-lucide-arrow-up-right
|
||||
color: neutral
|
||||
- label: Use this template
|
||||
to: https://github.com/nuxt-ui-pro/docs/tree/v3
|
||||
target: _blank
|
||||
variant: outline
|
||||
icon: i-simple-icons-github
|
||||
color: neutral
|
||||
- title: 'SaaS'
|
||||
description: "A fully built SaaS application to launch your next project. It includes a landing page, a pricing page, a documentation and a blog which can customized easily from the `content/` directory."
|
||||
features:
|
||||
- title: Includes Landing & Docs sections
|
||||
icon: i-lucide-grid-2x2-plus
|
||||
- title: Customizable command palette
|
||||
icon: i-lucide-command
|
||||
- title: Authentication pages (login, register)
|
||||
icon: i-lucide-user-round-check
|
||||
links:
|
||||
- label: Live preview (soon)
|
||||
to: https://saas-template.nuxt.dev
|
||||
target: _blank
|
||||
trailingIcon: i-lucide-arrow-up-right
|
||||
color: neutral
|
||||
disabled: true
|
||||
- label: Use this template (soon)
|
||||
to: https://github.com/nuxt-ui-pro/saas/tree/v3
|
||||
target: _blank
|
||||
variant: outline
|
||||
icon: i-simple-icons-github
|
||||
color: neutral
|
||||
disabled: true
|
||||
- title: 'Dashboard'
|
||||
description: "A template to illustrate how to build your own dashboard with the 15+ latest Nuxt UI Pro components, designed specifically to create a consistent look and feel."
|
||||
features:
|
||||
- title: Mix with SaaS template for a complete solution
|
||||
icon: i-lucide-puzzle
|
||||
- title: Includes custom components for charts, date pickers, etc.
|
||||
icon: i-lucide-bar-chart-big
|
||||
- title: Resizable multi-column layout
|
||||
icon: i-lucide-columns-3
|
||||
links:
|
||||
- label: Live preview (soon)
|
||||
to: https://dashboard-template.nuxt.dev
|
||||
target: _blank
|
||||
trailingIcon: i-lucide-arrow-up-right
|
||||
color: neutral
|
||||
disabled: true
|
||||
- label: Use this template (soon)
|
||||
to: https://github.com/nuxt-ui-pro/dashboard/tree/v3
|
||||
target: _blank
|
||||
icon: i-simple-icons-github
|
||||
color: neutral
|
||||
variant: outline
|
||||
disabled: true
|
||||
115
docs/app/pages/pro/activate.vue
Normal file
115
docs/app/pages/pro/activate.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<script setup lang="ts">
|
||||
import { z } from 'zod'
|
||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||
|
||||
const title = 'Activate your Nuxt UI Pro License'
|
||||
const description = 'Enable Nuxt UI Pro in your production projects by activating your license key received by email and get invited to the GitHub private repository.'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
useSeoMeta({
|
||||
title,
|
||||
description,
|
||||
ogTitle: `${title} - Nuxt UI Pro`,
|
||||
ogDescription: description
|
||||
})
|
||||
|
||||
defineOgImageComponent('Docs', {
|
||||
headline: 'Pro'
|
||||
})
|
||||
|
||||
const schema = z.object({
|
||||
license: z.string().length(36, 'Invalid license key'),
|
||||
username: z.string().min(1, 'Required')
|
||||
})
|
||||
|
||||
type Schema = z.output<typeof schema>
|
||||
|
||||
const state = reactive<Partial<Schema>>({
|
||||
license: '',
|
||||
username: ''
|
||||
})
|
||||
|
||||
const activating = ref(false)
|
||||
const successMessage = ref()
|
||||
const errorMessage = ref('')
|
||||
|
||||
async function submit(event: FormSubmitEvent<any>) {
|
||||
activating.value = true
|
||||
errorMessage.value = ''
|
||||
successMessage.value = ''
|
||||
|
||||
try {
|
||||
const res: { activationsLeft: number, activationsTotal: number } = await $fetch<{ activationsLeft: number, activationsTotal: number }>('https://api.nuxtlabs.com/ui-pro/activate', {
|
||||
method: 'POST',
|
||||
body: {
|
||||
key: event.data.license,
|
||||
username: event.data.username
|
||||
}
|
||||
})
|
||||
|
||||
successMessage.value = 'License activated!'
|
||||
if (res.activationsTotal > 1) {
|
||||
successMessage.value += ` ${res.activationsLeft} activation${res.activationsLeft > 1 ? 's' : ''} left.`
|
||||
}
|
||||
|
||||
state.username = ''
|
||||
} catch (err) {
|
||||
// @ts-expect-error this is not properly typed
|
||||
errorMessage.value = err.data?.message || err.message
|
||||
}
|
||||
|
||||
activating.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (route.query.license_key && !state.license) {
|
||||
state.license = route.query.license_key as string
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UPageHero headline="License Activation" :title="title" :description="description">
|
||||
<template #top>
|
||||
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||
<StarsBg />
|
||||
</template>
|
||||
<div>
|
||||
<UCard class="lg:w-1/2 m-auto backdrop-blur-sm">
|
||||
<UForm
|
||||
:schema="schema"
|
||||
:validate-on="['blur']"
|
||||
:state="state"
|
||||
class="space-y-4"
|
||||
@submit="submit"
|
||||
>
|
||||
<UFormField label="License Key" name="license">
|
||||
<UInput v-model="state.license" autocomplete="off" :ui="{ root: 'flex' }" />
|
||||
</UFormField>
|
||||
<UFormField label="GitHub Username" name="username">
|
||||
<UInput v-model="state.username" autocomplete="off" :ui="{ root: 'flex' }" />
|
||||
</UFormField>
|
||||
<UButton type="submit" :loading="activating" :disabled="state.license?.length !== 36 || !state.username">
|
||||
Activate the license
|
||||
</UButton>
|
||||
<UAlert v-if="successMessage" color="success" variant="subtle" :title="successMessage">
|
||||
<template #description>
|
||||
The GitHub invitation to <NuxtLink to="https://github.com/nuxt/ui-pro/invitations" external target="_blank" class="font-bold text-primary hover:underline">
|
||||
Nuxt UI Pro repository
|
||||
</NuxtLink> has been sent and
|
||||
you can now use your license key in your projects, checkout the
|
||||
<NuxtLink class="font-bold underline" to="/pro/getting-started/installation">
|
||||
installation guide
|
||||
</NuxtLink>
|
||||
</template>
|
||||
</UAlert>
|
||||
<UAlert v-else-if="errorMessage" color="error" variant="subtle" :title="errorMessage" />
|
||||
</UForm>
|
||||
</UCard>
|
||||
<p class="text-sm text-center text-neutral-500 dark:text-neutral-400 my-4">
|
||||
If you purchased a license with multiple seats, activate the license key for each of your team members.
|
||||
</p>
|
||||
</div>
|
||||
</UPageHero>
|
||||
</template>
|
||||
111
docs/app/pages/pro/index.vue
Normal file
111
docs/app/pages/pro/index.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-expect-error yaml is not typed
|
||||
import page from '.content/pro.yml'
|
||||
|
||||
useSeoMeta({
|
||||
title: page.title,
|
||||
ogTitle: page.title,
|
||||
description: page.description,
|
||||
ogDescription: page.description
|
||||
})
|
||||
defineOgImageComponent('Docs', {
|
||||
headline: 'Pro'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative">
|
||||
<UPageHero
|
||||
:links="page.hero.links"
|
||||
class="relative"
|
||||
orientation="horizontal"
|
||||
>
|
||||
<template #title>
|
||||
<MDC :value="page.hero.title" unwrap="p" />
|
||||
</template>
|
||||
<template #description>
|
||||
<MDC :value="page.hero.description" unwrap="p" />
|
||||
</template>
|
||||
<template #top>
|
||||
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||
<StarsBg />
|
||||
</template>
|
||||
|
||||
<PromotionalVideo />
|
||||
</UPageHero>
|
||||
|
||||
<UPageSection
|
||||
v-bind="page.features"
|
||||
:ui="{ title: 'text-left', description: 'text-left' }"
|
||||
/>
|
||||
|
||||
<UPageCTA
|
||||
:description="page.authorQuote.quote"
|
||||
variant="soft"
|
||||
class="rounded-none"
|
||||
:ui="{ container: 'sm:py-12 lg:py-12 sm:gap-8', description: 'before:content-[open-quote] after:content-[close-quote]' }"
|
||||
>
|
||||
<UUser
|
||||
v-bind="page.authorQuote.user"
|
||||
size="xl"
|
||||
class="justify-center"
|
||||
/>
|
||||
</UPageCTA>
|
||||
|
||||
<UPageSection
|
||||
v-for="(section, index) in page.sections"
|
||||
:key="index"
|
||||
v-bind="section"
|
||||
orientation="horizontal"
|
||||
>
|
||||
<MDC :value="section.code" />
|
||||
</UPageSection>
|
||||
|
||||
<UPageSection
|
||||
id="templates"
|
||||
v-bind="page.templates"
|
||||
class="overflow-hidden"
|
||||
>
|
||||
<UCarousel
|
||||
v-slot="{ item }"
|
||||
loop
|
||||
arrows
|
||||
dots
|
||||
:autoplay="{ delay: 3000 }"
|
||||
:items="(page.templates.items as any[])"
|
||||
:ui="{ item: 'basis-1/2', container: 'py-2' }"
|
||||
>
|
||||
<UPageCard
|
||||
:to="item.to"
|
||||
:description="item.description"
|
||||
class="group"
|
||||
:ui="{ container: 'p-4 sm:p-4', title: 'flex items-center gap-1' }"
|
||||
>
|
||||
<template #title>
|
||||
<UIcon :name="item.icon" />
|
||||
<span>
|
||||
{{ item.title }}
|
||||
</span>
|
||||
</template>
|
||||
<img
|
||||
:src="item.image"
|
||||
:alt="item.title"
|
||||
class="rounded-lg grayscale group-hover:grayscale-0 transition-all duration-200 ease-in-out"
|
||||
>
|
||||
</UPageCard>
|
||||
</UCarousel>
|
||||
</UPageSection>
|
||||
|
||||
<USeparator />
|
||||
|
||||
<UPageCTA
|
||||
v-bind="page.cta"
|
||||
variant="naked"
|
||||
class="overflow-hidden"
|
||||
>
|
||||
<div class="absolute rounded-full dark:bg-(--ui-primary) blur-[250px] size-40 sm:size-50 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||
|
||||
<StarsBg />
|
||||
</UPageCTA>
|
||||
</div>
|
||||
</template>
|
||||
114
docs/app/pages/pro/pricing.vue
Normal file
114
docs/app/pages/pro/pricing.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-expect-error yaml is not typed
|
||||
import page from '.content/pricing.yml'
|
||||
|
||||
useSeoMeta({
|
||||
title: page.title,
|
||||
ogTitle: page.title,
|
||||
description: page.description,
|
||||
ogDescription: page.description
|
||||
})
|
||||
defineOgImageComponent('Docs', {
|
||||
headline: 'Pro'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative">
|
||||
<UPageHero
|
||||
class="relative"
|
||||
:description="page.pricing.description"
|
||||
>
|
||||
<template #title>
|
||||
<MDC :value="page.pricing.title" unwrap="p" />
|
||||
</template>
|
||||
<template #top>
|
||||
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||
<StarsBg />
|
||||
</template>
|
||||
<UContainer>
|
||||
<UPricingPlan
|
||||
v-bind="page.pricing.freePlan"
|
||||
class="mb-16"
|
||||
/>
|
||||
<UPricingPlans
|
||||
class="mb-16"
|
||||
scale
|
||||
>
|
||||
<UPricingPlan
|
||||
v-for="(plan, index) in page.pricing.plans"
|
||||
:key="index"
|
||||
:title="plan.title"
|
||||
:description="plan.description"
|
||||
:price="plan.price"
|
||||
:billing-period="plan.billing_period"
|
||||
:billing-cycle="plan.billing_cycle"
|
||||
:highlight="plan.highlight"
|
||||
:scale="plan.highlight"
|
||||
variant="soft"
|
||||
:features="plan.features"
|
||||
:button="plan.button"
|
||||
/>
|
||||
</UPricingPlans>
|
||||
<UPricingPlan
|
||||
v-bind="page.pricing.figma"
|
||||
>
|
||||
<template #features>
|
||||
<li v-for="(feature, index) in page.pricing.figma.features" :key="index" class="flex items-center gap-2 min-w-0">
|
||||
<UIcon name="i-lucide-circle-check" class="size-5 text-(--ui-primary) shrink-0" />
|
||||
<MDC :value="feature" unwrap="p" class="text-sm truncate text-(--ui-text-toned)" />
|
||||
</li>
|
||||
</template>
|
||||
</UPricingPlan>
|
||||
</UContainer>
|
||||
</UPageHero>
|
||||
|
||||
<UPageSection
|
||||
id="testimonials"
|
||||
v-bind="page.testimonials"
|
||||
>
|
||||
<UPageMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
|
||||
<img
|
||||
v-for="(logo, index) in page.logos"
|
||||
:key="index"
|
||||
v-bind="logo"
|
||||
class="h-6 shrink-0 max-w-[140px] filter invert dark:invert-0"
|
||||
>
|
||||
</UPageMarquee>
|
||||
<UContainer>
|
||||
<UPageColumns class="xl:columns-4">
|
||||
<UPageCard
|
||||
v-for="(testimonial, index) in page.testimonials.items"
|
||||
:key="index"
|
||||
variant="subtle"
|
||||
:description="testimonial.quote"
|
||||
:ui="{ description: 'before:content-[open-quote] after:content-[close-quote]' }"
|
||||
>
|
||||
<template #footer>
|
||||
<UUser
|
||||
v-bind="testimonial.user"
|
||||
size="xl"
|
||||
/>
|
||||
</template>
|
||||
</UPageCard>
|
||||
</UPageColumns>
|
||||
</UContainer>
|
||||
</UPageSection>
|
||||
|
||||
<UPageSection
|
||||
id="faq"
|
||||
v-bind="page.faq"
|
||||
class="scroll-mt-(--ui-header-height)"
|
||||
>
|
||||
<UPageAccordion
|
||||
multiple
|
||||
:items="(page.faq.items as any[])"
|
||||
class="max-w-4xl mx-auto"
|
||||
>
|
||||
<template #body="{ item }">
|
||||
<MDC :value="item.content" unwrap="p" />
|
||||
</template>
|
||||
</UPageAccordion>
|
||||
</UPageSection>
|
||||
</div>
|
||||
</template>
|
||||
69
docs/app/pages/pro/templates.vue
Normal file
69
docs/app/pages/pro/templates.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-expect-error yaml is not typed
|
||||
import page from '.content/templates.yml'
|
||||
|
||||
const title = page.head?.title || page.title
|
||||
const description = page.head?.description || page.description
|
||||
useSeoMeta({
|
||||
title,
|
||||
description,
|
||||
ogTitle: `${title} - Nuxt UI Pro`,
|
||||
ogDescription: description
|
||||
})
|
||||
defineOgImageComponent('Docs', {
|
||||
headline: 'Pro'
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<template>
|
||||
<div class="relative">
|
||||
<UPageHero :links="page.links">
|
||||
<template #top>
|
||||
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||
<StarsBg />
|
||||
</template>
|
||||
|
||||
<template #title>
|
||||
<MDC :value="page.title" unwrap="p" />
|
||||
</template>
|
||||
|
||||
<template #description>
|
||||
<MDC :value="page.description" unwrap="p" />
|
||||
</template>
|
||||
</UPageHero>
|
||||
|
||||
<UPageSection
|
||||
v-for="(template, index) in page.templates"
|
||||
:key="index"
|
||||
:title="template.title"
|
||||
:links="template.links"
|
||||
:features="template.features"
|
||||
orientation="horizontal"
|
||||
reverse
|
||||
class="*:!pt-0"
|
||||
:ui="{ title: 'lg:text-4xl' }"
|
||||
>
|
||||
<template #description>
|
||||
<MDC :value="template.description" unwrap="p" />
|
||||
</template>
|
||||
|
||||
<UColorModeImage
|
||||
v-if="template.thumbnail"
|
||||
v-bind="template.thumbnail"
|
||||
class="w-full h-auto rounded-(--ui-radius) border border-(--ui-border)"
|
||||
width="656"
|
||||
height="369"
|
||||
/>
|
||||
<UCarousel
|
||||
v-else-if="template.images"
|
||||
v-slot="{ item }"
|
||||
:items="(template.images as any[])"
|
||||
dots
|
||||
>
|
||||
<NuxtImg v-bind="item" class="w-full h-full object-cover" width="576" height="360" />
|
||||
</UCarousel>
|
||||
<Placeholder v-else class="w-full h-full aspect-video" />
|
||||
</UPageSection>
|
||||
</div>
|
||||
</template>
|
||||
31
docs/app/pages/pro/terms.vue
Normal file
31
docs/app/pages/pro/terms.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
const { data: page } = await useAsyncData('terms', () => queryCollection('content').path('/pro/terms').first())
|
||||
if (!page.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
||||
}
|
||||
|
||||
const title = page.value.title
|
||||
const description = page.value.description
|
||||
useSeoMeta({
|
||||
title,
|
||||
description,
|
||||
ogTitle: `${title} - Nuxt UI Pro`,
|
||||
ogDescription: description
|
||||
})
|
||||
|
||||
defineOgImageComponent('Docs', {
|
||||
headline: 'Pro'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContainer>
|
||||
<UPage v-if="page">
|
||||
<UPageHeader :title="page.title" :description="page.description" />
|
||||
|
||||
<UPageBody prose>
|
||||
<ContentRenderer v-if="page.body" :value="page" />
|
||||
</UPageBody>
|
||||
</UPage>
|
||||
</UContainer>
|
||||
</template>
|
||||
@@ -18,9 +18,17 @@ export default defineNuxtPlugin({
|
||||
}
|
||||
}
|
||||
|
||||
function updateBlackAsPrimary() {
|
||||
const blackAsPrimary = localStorage.getItem('nuxt-ui-black-as-primary')
|
||||
if (blackAsPrimary) {
|
||||
appConfig.theme.blackAsPrimary = blackAsPrimary === 'true'
|
||||
}
|
||||
}
|
||||
|
||||
updateColor('primary')
|
||||
updateColor('neutral')
|
||||
updateRadius()
|
||||
updateBlackAsPrimary()
|
||||
}
|
||||
|
||||
if (import.meta.server) {
|
||||
@@ -31,16 +39,18 @@ export default defineNuxtPlugin({
|
||||
|
||||
if (localStorage.getItem('nuxt-ui-primary')) {
|
||||
const primaryColor = localStorage.getItem('nuxt-ui-primary');
|
||||
html = html.replace(
|
||||
/(--ui-color-primary-\\d{2,3}:\\s*var\\()--color-${appConfig.ui.colors.primary}-(\\d{2,3}\\))/g,
|
||||
\`$1--color-\${primaryColor}-$2\`
|
||||
);
|
||||
if (primaryColor !== 'black') {
|
||||
html = html.replace(
|
||||
/(--ui-color-primary-\\d{2,3}:\\s*var\\()--color-${appConfig.ui.colors.primary}-(\\d{2,3}\\))/g,
|
||||
\`$1--color-\${primaryColor}-$2\`
|
||||
);
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('nuxt-ui-neutral')) {
|
||||
const neutralColor = localStorage.getItem('nuxt-ui-neutral');
|
||||
let neutralColor = localStorage.getItem('nuxt-ui-neutral');
|
||||
html = html.replace(
|
||||
/(--ui-color-neutral-\\d{2,3}:\\s*var\\()--color-${appConfig.ui.colors.neutral}-(\\d{2,3}\\))/g,
|
||||
\`$1--color-\${neutralColor}-$2\`
|
||||
\`$1--color-\${neutralColor === 'neutral' ? 'old-neutral' : neutralColor}-$2\`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,6 +66,14 @@ export default defineNuxtPlugin({
|
||||
`.replace(/\s+/g, ' '),
|
||||
type: 'text/javascript',
|
||||
tagPriority: -1
|
||||
}, {
|
||||
innerHTML: `
|
||||
if (localStorage.getItem('nuxt-ui-black-as-primary') === 'true') {
|
||||
document.querySelector('style#nuxt-ui-black-as-primary').innerHTML = ':root { --ui-primary: black; } .dark { --ui-primary: white; }';
|
||||
} else {
|
||||
document.querySelector('style#nuxt-ui-black-as-primary').innerHTML = '';
|
||||
}
|
||||
`.replace(/\s+/g, ' ')
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ function handleMessage(message) {
|
||||
async function handleFormatMessage(message) {
|
||||
if (!globalThis.prettier) {
|
||||
await Promise.all([
|
||||
import('https://unpkg.com/prettier@3.3.3/standalone.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/babel.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/estree.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/html.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/markdown.js'),
|
||||
import('https://unpkg.com/prettier@3.3.3/plugins/typescript.js')
|
||||
import('https://unpkg.com/prettier@3.5.0/standalone.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/babel.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/estree.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/html.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/markdown.js'),
|
||||
import('https://unpkg.com/prettier@3.5.0/plugins/typescript.js')
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -23,15 +24,15 @@ This transition empowers Nuxt UI to become a more comprehensive and flexible UI
|
||||
|
||||
### Tailwind CSS v4
|
||||
|
||||
Nuxt UI v3 integrates the latest Tailwind CSS v4 beta (released Nov 21, 2024), bringing significant improvements:
|
||||
Nuxt UI v3 integrates the latest Tailwind CSS v4, bringing significant improvements:
|
||||
|
||||
- **Built for performance**: Full builds in the new engine are up to 5x faster, and incremental builds are over 100x faster — and measured in microseconds.
|
||||
- **Unified toolchain**: Built-in import handling, vendor prefixing, and syntax transforms, with no additional tooling required.
|
||||
- **CSS-first configuration**: A reimagined developer experience where you customize and extend the framework directly in CSS instead of a JavaScript configuration file.
|
||||
- **Designed for the modern web**: Built on native cascade layers, wide-gamut colors, and including first-class support for modern CSS features like container queries, @starting-style, popovers, and more.
|
||||
|
||||
::note{to="https://tailwindcss.com/docs/v4-beta" target="_blank" aria-label="Tailwind CSS v4 beta documentation"}
|
||||
For a comprehensive overview of Tailwind CSS v4 beta features, read the **prerelease documentation**.
|
||||
::note{to="https://tailwindcss.com/docs/upgrade-guide" target="_blank" aria-label="Tailwind CSS v4 upgrade guide"}
|
||||
Learn how to upgrade your project from Tailwind CSS v3 to v4.
|
||||
::
|
||||
|
||||
### Tailwind Variants
|
||||
@@ -112,7 +113,7 @@ Key points to consider:
|
||||
::
|
||||
|
||||
::accordion-item{label="What about Nuxt UI Pro?"}
|
||||
We've also rebuilt Nuxt UI Pro from scratch and released a `v3.0.0-alpha.x` package but it only contains the components to build this documentation yet. This will be a free update, so the license you buy now will be valid for v3. We're actively working to finish the rewrite of all Nuxt UI Pro components.
|
||||
We've also rebuilt Nuxt UI Pro from scratch and released a `v3.0.0-alpha.x` package with almost all components ready. This is a free update, so the license you buy now is valid for all UI Pro versions. We're actively working to finish the rewrite of all Nuxt UI Pro components.
|
||||
::
|
||||
|
||||
::accordion-item{label="Will Nuxt UI v3 work with other CSS frameworks like UnoCSS?"}
|
||||
|
||||
@@ -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"}
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user