pull/6687/head
tugcekucukoglu 2024-10-30 10:36:16 +03:00
commit 8e3dd99f81
8 changed files with 55 additions and 63 deletions

View File

@ -510,23 +510,9 @@
}, },
{ {
"name": "Tailwind CSS", "name": "Tailwind CSS",
"icon": "pi pi-heart", "icon": "pi pi-star",
"children": [
{
"name": "Integration",
"to": "/tailwind" "to": "/tailwind"
}, },
{
"name": "Presets",
"href": "https://tailwind.primevue.org"
}
]
},
{
"name": "Figma UI Kit",
"icon": "pi pi-pencil",
"to": "/uikit"
},
{ {
"name": "Icons", "name": "Icons",
"icon": "pi pi-eye", "icon": "pi pi-eye",
@ -541,9 +527,14 @@
} }
] ]
}, },
{
"name": "Figma UI Kit",
"icon": "pi pi-pencil",
"to": "/uikit"
},
{ {
"name": "Templates", "name": "Templates",
"icon": "pi pi-star", "icon": "pi pi-heart",
"to": "/templates" "to": "/templates"
}, },
{ {

View File

@ -7,9 +7,13 @@
</p> </p>
<p> <p>
Tailwind is an outstanding CSS library, however it lacks a true comprehensive UI suite when combined with Vue.js, this is where PrimeVue comes in by providing a wide range of highly accessible and feature rich UI component library. The Tailwind is an outstanding CSS library, however it lacks a true comprehensive UI suite when combined with Vue.js, this is where PrimeVue comes in by providing a wide range of highly accessible and feature rich UI component library. The
core of PrimeVue does not depend on Tailwind CSS, instead we provide the necessary integration points such as the primeui tailwind plugin and the presets for the unstyled mode. core of PrimeVue does not depend on Tailwind CSS, instead we provide the necessary integration points such as the primeui tailwind plugin and the Tailwind version for the unstyled mode.
</p> </p>
</DocSectionText> </DocSectionText>
<div class="doc-notification">
Tailwind CSS and PrimeVue can be used together via two main approaches. Simple approach is using Tailwind CSS <b>around</b> PrimeVue components for layout purposes as demonstrated in the samples section below, the advanced approach takes the
integration a step further by allowing Tailwind CSS <b>within</b> the component internals to style the entire UI suite in <NuxtLink to="/theming/unstyled" class="doc-link">unstyled mode</NuxtLink>.
</div>
</template> </template>
<script></script> <script></script>

View File

@ -1,15 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
In unstyled mode of PrimeVue, default styling elements like design tokens and css classes are turned off so that you have full control over the component styling with pass-through properties. This feature is quite useful when you'd like
to build your own UI library based on a custom design by wrapping PrimeVue components or simply utilitze Tailwind CSS to style the PrimeVue components.
</p>
<p>
The unstyled mode also use the <i>preset</i> concept just like the styled mode to define a theme. In styled mode a preset is a set of design tokens implemented with CSS variables whereas in unstyled mode a preset is a Pass-Through
configuration object to inject Tailwind CSS classes into components. If you prefer to ignore the default styled mode theming api and use Tailwind CSS to style the PrimeVue UI components instead, learn more at the standalone
<a href="https://tailwind.primevue.org/" target="_blank" rel="noopener noreferrer">Tailwind CSS Presets</a> project website.
</p>
</DocSectionText>
</template>
<script></script>

View File

@ -0,0 +1,10 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
PrimeTek offers the Tailwind CSS version of the entire PrimeVue UI suite in <NuxtLink to="/theming/unstyled" class="doc-link">unstyled mode</NuxtLink> based on the <i>@apply</i> directive with IntelliSense support. Visit the
<a href="https://tailwind.primevue.org" target="_blank" rel="noopener noreferrer">Tailwind version of PrimeVue</a> for the documentation, demos and additional resources.
</p>
</DocSectionText>
</template>
<script></script>

View File

@ -23,6 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
<DocSectionCode :code="code" hideToggleCode hideStackBlitz />
</template> </template>
<script> <script>
@ -31,18 +32,15 @@ export default {
return { return {
shades: [0, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], shades: [0, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950],
colors: ['primary', 'surface'], colors: ['primary', 'surface'],
code1: { code: {
basic: ` basic: `
npm i tailwindcss-primeui <div class="flex flex-col gap-12">
` <div class="flex gap-6 flex-wrap">
}, <div class="rounded-border p-4 border border-transparent flex items-center justify-center bg-primary hover:bg-primary-emphasis text-primary-contrast font-medium flex-auto transition-colors">primary</div>
code2: { <div class="rounded-border p-4 border border-transparent flex items-center justify-center bg-highlight hover:bg-highlight-emphasis font-medium flex-auto transition-colors">highlight</div>
basic: ` <div class="rounded-border p-4 border border-surface flex items-center justify-center text-muted-color hover:text-color hover:bg-emphasis font-medium flex-auto transition-colors">box</div>
// tailwind.config.js </div>
module.exports = { </div>
// ...
plugins: [require('tailwindcss-primeui')]
};
` `
} }
}; };

View File

@ -30,8 +30,7 @@ export default {
unstyled unstyled
pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2" pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2"
pt:label="text-white font-bold text-lg" pt:label="text-white font-bold text-lg"
pt:icon=" pt:icon="text-white text-xl"
"
/> />
` `
} }

View File

@ -21,7 +21,7 @@ import ExtensionsDoc from '@/doc/tailwind/ExtensionsDoc.vue';
import OverrideDoc from '@/doc/tailwind/OverrideDoc.vue'; import OverrideDoc from '@/doc/tailwind/OverrideDoc.vue';
import OverviewDoc from '@/doc/tailwind/OverviewDoc.vue'; import OverviewDoc from '@/doc/tailwind/OverviewDoc.vue';
import PluginDoc from '@/doc/tailwind/PluginDoc.vue'; import PluginDoc from '@/doc/tailwind/PluginDoc.vue';
import PresetsDoc from '@/doc/tailwind/PresetsDoc.vue'; import TailwindThemeDoc from '@/doc/tailwind/TailwindThemeDoc.vue';
import ColorPaletteDoc from '@/doc/tailwind/samples/ColorPaletteDoc.vue'; import ColorPaletteDoc from '@/doc/tailwind/samples/ColorPaletteDoc.vue';
import FormDoc from '@/doc/tailwind/samples/FormDoc.vue'; import FormDoc from '@/doc/tailwind/samples/FormDoc.vue';
import HeadlessDoc from '@/doc/tailwind/samples/HeadlessDoc.vue'; import HeadlessDoc from '@/doc/tailwind/samples/HeadlessDoc.vue';
@ -36,9 +36,9 @@ export default {
component: OverviewDoc component: OverviewDoc
}, },
{ {
id: 'presets', id: 'tailwind-theme',
label: 'Presets', label: 'Tailwind Theme',
component: PresetsDoc component: TailwindThemeDoc
}, },
{ {
id: 'plugin', id: 'plugin',

View File

@ -234,7 +234,7 @@ importers:
devDependencies: devDependencies:
'@nuxt/devtools': '@nuxt/devtools':
specifier: ^0.8.5 specifier: ^0.8.5
version: 0.8.5(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2) version: 0.8.5(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))
'@nuxt/eslint-config': '@nuxt/eslint-config':
specifier: ^0.2.0 specifier: ^0.2.0
version: 0.2.0(eslint@8.57.1) version: 0.2.0(eslint@8.57.1)
@ -246,7 +246,7 @@ importers:
version: 3.13.2(rollup@4.24.2) version: 3.13.2(rollup@4.24.2)
'@nuxt/test-utils': '@nuxt/test-utils':
specifier: ^3.7.3 specifier: ^3.7.3
version: 3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)) version: 3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))
'@primevue/themes': '@primevue/themes':
specifier: workspace:* specifier: workspace:*
version: link:../themes version: link:../themes
@ -8315,12 +8315,13 @@ snapshots:
'@nuxt/devalue@2.0.2': {} '@nuxt/devalue@2.0.2': {}
'@nuxt/devtools-kit@0.8.5(magicast@0.3.5)(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)': '@nuxt/devtools-kit@0.8.5(magicast@0.3.5)(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))':
dependencies: dependencies:
'@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2)
'@nuxt/schema': 3.13.2(rollup@4.24.2) '@nuxt/schema': 3.13.2(rollup@4.24.2)
execa: 7.2.0 execa: 7.2.0
nuxt: 3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3) nuxt: 3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3)
vite: 5.4.10(@types/node@18.19.60)(terser@5.36.0)
transitivePeerDependencies: transitivePeerDependencies:
- magicast - magicast
- rollup - rollup
@ -8340,10 +8341,10 @@ snapshots:
rc9: 2.1.2 rc9: 2.1.2
semver: 7.6.3 semver: 7.6.3
'@nuxt/devtools@0.8.5(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)': '@nuxt/devtools@0.8.5(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))':
dependencies: dependencies:
'@antfu/utils': 0.7.10 '@antfu/utils': 0.7.10
'@nuxt/devtools-kit': 0.8.5(magicast@0.3.5)(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2) '@nuxt/devtools-kit': 0.8.5(magicast@0.3.5)(nuxt@3.3.2(@types/node@18.19.60)(encoding@0.1.13)(eslint@8.57.1)(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.24.2)(terser@5.36.0)(typescript@5.6.3))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))
'@nuxt/devtools-wizard': 0.8.5 '@nuxt/devtools-wizard': 0.8.5
'@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2)
birpc: 0.2.19 birpc: 0.2.19
@ -8374,8 +8375,9 @@ snapshots:
simple-git: 3.27.0 simple-git: 3.27.0
sirv: 2.0.4 sirv: 2.0.4
unimport: 3.13.1(rollup@4.24.2) unimport: 3.13.1(rollup@4.24.2)
vite-plugin-inspect: 0.7.42(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@4.24.2))(rollup@4.24.2) vite: 5.4.10(@types/node@18.19.60)(terser@5.36.0)
vite-plugin-vue-inspector: 3.7.2 vite-plugin-inspect: 0.7.42(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@4.24.2))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))
vite-plugin-vue-inspector: 3.7.2(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))
wait-on: 7.2.0 wait-on: 7.2.0
which: 3.0.1 which: 3.0.1
ws: 8.18.0 ws: 8.18.0
@ -8685,7 +8687,7 @@ snapshots:
- supports-color - supports-color
- webpack-sources - webpack-sources
'@nuxt/test-utils@3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))': '@nuxt/test-utils@3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))':
dependencies: dependencies:
'@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2)
'@nuxt/schema': 3.13.2(rollup@4.24.2) '@nuxt/schema': 3.13.2(rollup@4.24.2)
@ -8711,7 +8713,8 @@ snapshots:
ufo: 1.5.4 ufo: 1.5.4
unenv: 1.10.0 unenv: 1.10.0
unplugin: 1.15.0(webpack-sources@3.2.3) unplugin: 1.15.0(webpack-sources@3.2.3)
vitest-environment-nuxt: 1.0.1(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)) vite: 5.4.10(@types/node@18.19.60)(terser@5.36.0)
vitest-environment-nuxt: 1.0.1(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))
vue: 3.5.12(typescript@5.6.3) vue: 3.5.12(typescript@5.6.3)
vue-router: 4.4.5(vue@3.5.12(typescript@5.6.3)) vue-router: 4.4.5(vue@3.5.12(typescript@5.6.3))
optionalDependencies: optionalDependencies:
@ -14231,7 +14234,7 @@ snapshots:
optionator: 0.9.4 optionator: 0.9.4
typescript: 5.6.3 typescript: 5.6.3
vite-plugin-inspect@0.7.42(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@4.24.2))(rollup@4.24.2): vite-plugin-inspect@0.7.42(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@4.24.2))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0)):
dependencies: dependencies:
'@antfu/utils': 0.7.10 '@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.1.3(rollup@4.24.2) '@rollup/pluginutils': 5.1.3(rollup@4.24.2)
@ -14241,13 +14244,14 @@ snapshots:
open: 9.1.0 open: 9.1.0
picocolors: 1.1.1 picocolors: 1.1.1
sirv: 2.0.4 sirv: 2.0.4
vite: 5.4.10(@types/node@18.19.60)(terser@5.36.0)
optionalDependencies: optionalDependencies:
'@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.24.2)
transitivePeerDependencies: transitivePeerDependencies:
- rollup - rollup
- supports-color - supports-color
vite-plugin-vue-inspector@3.7.2: vite-plugin-vue-inspector@3.7.2(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0)):
dependencies: dependencies:
'@babel/core': 7.26.0 '@babel/core': 7.26.0
'@babel/plugin-proposal-decorators': 7.25.9(@babel/core@7.26.0) '@babel/plugin-proposal-decorators': 7.25.9(@babel/core@7.26.0)
@ -14258,6 +14262,7 @@ snapshots:
'@vue/compiler-dom': 3.5.12 '@vue/compiler-dom': 3.5.12
kolorist: 1.8.0 kolorist: 1.8.0
magic-string: 0.30.12 magic-string: 0.30.12
vite: 5.4.10(@types/node@18.19.60)(terser@5.36.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -14294,9 +14299,9 @@ snapshots:
fsevents: 2.3.3 fsevents: 2.3.3
terser: 5.36.0 terser: 5.36.0
vitest-environment-nuxt@1.0.1(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)): vitest-environment-nuxt@1.0.1(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)):
dependencies: dependencies:
'@nuxt/test-utils': 3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)) '@nuxt/test-utils': 3.14.4(@vue/test-utils@2.4.6)(h3@1.13.0)(magicast@0.3.5)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.5))(rollup@4.24.2)(vite@5.4.10(@types/node@18.19.60)(terser@5.36.0))(vitest@1.6.0(@types/node@18.19.60)(terser@5.36.0))(vue-router@4.4.5(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))
transitivePeerDependencies: transitivePeerDependencies:
- '@cucumber/cucumber' - '@cucumber/cucumber'
- '@jest/globals' - '@jest/globals'