Merge branch 'prod'

pull/6674/head
Cagatay Civici 2024-10-28 15:06:41 +03:00
commit 53b0282bd0
21 changed files with 176 additions and 200 deletions

View File

@ -592,11 +592,6 @@
} }
] ]
}, },
{
"name": "Contribution",
"to": "/contribution",
"icon": "pi pi-users"
},
{ {
"name": "Discover", "name": "Discover",
"icon": "pi pi-search", "icon": "pi pi-search",
@ -617,6 +612,11 @@
"name": "Changelog", "name": "Changelog",
"href": "https://github.com/primefaces/primevue/blob/master/CHANGELOG.md" "href": "https://github.com/primefaces/primevue/blob/master/CHANGELOG.md"
}, },
{
"name": "Contribution",
"to": "/contribution",
"icon": "pi pi-users"
},
{ {
"name": "Store", "name": "Store",
"href": "https://www.primefaces.org/store/" "href": "https://www.primefaces.org/store/"

View File

@ -41,6 +41,7 @@
height: auto; height: auto;
width: auto; width: auto;
font-family: inherit; font-family: inherit;
box-shadow: none;
&:first-child { &:first-child {
font-size: 0.75rem; font-size: 0.75rem;

View File

@ -2,7 +2,7 @@
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p> <p>
PrimeVue is available for download on <a href="https://www.npmjs.com/package/primevue">npm Registry</a> along with the official PrimeVue is available for download on <a href="https://www.npmjs.com/package/primevue">npm Registry</a> along with the official
<a href="https://www.npmjs.com/package/@primevue/nuxt-module" target="_blank" rel="noopener noreferrer">nuxt-primevue</a> module. <a href="https://www.npmjs.com/package/@primevue/nuxt-module" target="_blank" rel="noopener noreferrer">@primevue/nuxt-module</a>.
</p> </p>
</DocSectionText> </DocSectionText>
<DocSectionCode :code="code" hideToggleCode hideStackBlitz /> <DocSectionCode :code="code" hideToggleCode hideStackBlitz />
@ -15,15 +15,15 @@ export default {
code: { code: {
basic: ` basic: `
# Using npm # Using npm
npm install primevue npm install primevue @primevue/themes
npm install --save-dev @primevue/nuxt-module npm install --save-dev @primevue/nuxt-module
# Using yarn # Using yarn
yarn add primevue yarn add primevue @primevue/themes
yarn add --dev @primevue/nuxt-module yarn add --dev @primevue/nuxt-module
# Using pnpm # Using pnpm
pnpm add primevue pnpm add primevue @primevue/themes
pnpm add -D @primevue/nuxt-module pnpm add -D @primevue/nuxt-module
` `
} }

View File

@ -0,0 +1,11 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Welcome to the Prime UI Ecosystem! Once you have PrimeVue up and running, we recommend exploring the following resources to gain a deeper understanding of the library.</p>
<ul class="leading-relaxed">
<li><NuxtLink to="/configuration" class="doc-link">Global configuration</NuxtLink></li>
<li><NuxtLink to="/theming/styled" class="doc-link">Customization of styles</NuxtLink></li>
<li><NuxtLink to="/passthrough" class="doc-link">Pass through attributes</NuxtLink></li>
<li><NuxtLink to="/support" class="doc-link">Getting support</NuxtLink></li>
</ul>
</DocSectionText>
</template>

View File

@ -1,29 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
Module is used to configure the PrimeVue options, register components, directives and composables. CSS configuration of the styled mode is not included at the moment due to the upcoming enhancements like moving theming to core with CSS
variables. In styled mode, the theme can be defined at Nuxt configuration with the <i>css</i> property. Note that this only applies to styled mode, in unstyled mode a theme file is not required as styling is done externally.
</p>
<DocSectionCode :code="code1" importCode hideToggleCode hideStackBlitz />
<p>
Until the new styled mode implementation is ready, dynamic theming at runtime is currently done by switching theme css files. Visit the <NuxtLink to="/theming/#switchthemes">Switch Themes</NuxtLink>
section at styled mode for an example.
</p>
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
basic: `
export default defineNuxtConfig({
css: ['primevue/resources/themes/aura-dark-green/theme.css']
})
`
}
};
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Configure the module to use a theme like Aura.</p>
<DocSectionCode :code="code" importCode hideToggleCode hideStackBlitz />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import Aura from '@primevue/themes/aura';
export default defineNuxtConfig({
modules: [
'@primevue/nuxt-module'
],
primevue: {
options: {
theme: {
preset: Aura
}
}
}
})
`
}
};
}
};
</script>

View File

@ -1,9 +1,9 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>The nuxt-primevue module registers the components automatically so you may start using them instantly.</p> <p>The nuxt-primevue module registers the components automatically with tree-shaking support so you may start using them instantly.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Button label="Check" icon="pi pi-check" /> <Button label="Verify" />
</div> </div>
<DocSectionCode :code="code" hideToggleCode hideStackBlitz /> <DocSectionCode :code="code" hideToggleCode hideStackBlitz />
</template> </template>
@ -14,7 +14,7 @@ export default {
return { return {
code: { code: {
basic: ` basic: `
<Button label="Check" icon="pi pi-check" /> <Button label="Verify" />
` `
} }
}; };

View File

@ -12,7 +12,7 @@ export default {
code: { code: {
basic: ` basic: `
primevue: { primevue: {
usePrimeVue: true usePrimeVue: true | false
} }
` `
} }

View File

@ -1,8 +1,7 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p> <p>
The <i>global</i> property has a <i>css</i> option to define custom css that belongs to a global <i>pt</i> configuration. Common use case of this feature is defining global styles and animations related to the pass through props The <i>global</i> property has a <i>css</i> option to define custom css that belongs to a global <i>pt</i> configuration. Common use case of this feature is defining global styles and animations related to the pass through configuration.
configuration.
</p> </p>
</DocSectionText> </DocSectionText>
@ -23,30 +22,13 @@ app.use(PrimeVue, {
pt: { pt: {
global: { global: {
css: \` css: \`
button { .my-button {
padding: 2rem; border-width: 2px;
}
.p-ink {
display: block;
position: absolute;
background: rgba(255, 255, 255, 0.5);
border-radius: 100%;
transform: scale(0);
pointer-events: none;
}
.p-ink-active {
animation: ripple 0.4s linear;
}
@keyframes ripple {
100% {
opacity: 0;
transform: scale(2.5);
}
} }
\` \`
},
button: {
root: 'my-button'
} }
} }
}); });

View File

@ -0,0 +1,17 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
In traditional 3rd party UI libraries, users are limited to the API provided by component author. This API commonly consists of props, events and slots. Whenever a requirement emerges for a new customization option in the API, the
component author needs to develop and publish it with a new release.
</p>
<p>
Vision of PrimeTek is <i>Your components, not ours</i>. The pass through feature is a key element to implement this vision by exposing the component internals in order to apply arbitrary attributes and listeners to the DOM elements. The
primary advantage of this approach is that it frees you from being restricted by the main component API. We recommend considering the pass-through feature whenever you need to tailor a component that lacks a built-in feature for your
specific requirement.
</p>
<p>Two videos are available at PrimeTV youtube channel, first one is an introduction and second one covers a unique case that is solved by the pass-through.</p>
</DocSectionText>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?si=gBh1ow-f0JfGWPrv&amp;list=PLC9bp-OHi-Wk9fMhxOM1u6Si82i6AxqUM" frameborder="0" allowfullscreen></iframe>
</div>
</template>

View File

@ -12,13 +12,13 @@ export default {
code: { code: {
basic: ` basic: `
# Using npm # Using npm
npm install primevue npm install primevue @primevue/themes
# Using yarn # Using yarn
yarn add primevue yarn add primevue @primevue/themes
# Using pnpm # Using pnpm
pnpm add primevue pnpm add primevue @primevue/themes
` `
} }
}; };

View File

@ -0,0 +1,12 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Welcome to the Prime UI Ecosystem! Once you have PrimeVue up and running, we recommend exploring the following resources to gain a deeper understanding of the library.</p>
<ul class="leading-relaxed">
<li><NuxtLink to="/configuration" class="doc-link">Global configuration</NuxtLink></li>
<li><NuxtLink to="/autoimport" class="doc-link">Auto imports with tree-shaking</NuxtLink></li>
<li><NuxtLink to="/theming/styled" class="doc-link">Customization of styles</NuxtLink></li>
<li><NuxtLink to="/passthrough" class="doc-link">Pass through attributes</NuxtLink></li>
<li><NuxtLink to="/support" class="doc-link">Getting support</NuxtLink></li>
</ul>
</DocSectionText>
</template>

View File

@ -1,9 +1,6 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p> <p>PrimeVue plugin is required to be installed as an application plugin to set up the default <NuxtLink to="/configuration">configuration</NuxtLink>. The plugin is lightweight, and only utilized for configuration purposes.</p>
PrimeVue plugin is required to be installed as an application plugin to set up the default <NuxtLink to="/configuration">configuration</NuxtLink>. The plugin is lightweight, only sets up the configuration object without affecting your
application.
</p>
</DocSectionText> </DocSectionText>
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz /> <DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
</template> </template>

View File

@ -1,44 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Styled mode provides pre-skinned components, default theme is Aura with emerald as the primary color. See the <NuxtLink to="/theming/styled">styled mode</NuxtLink> documentation for details.</p>
<p>Install the <i>@primevue/themes</i> add-on package as the themes are not included in PrimeVue by default.</p>
<DocSectionCode :code="code1" hideToggleCode hideStackBlitz />
<p>Configure PrimeVue to use a theme like Aura.</p>
<DocSectionCode :code="code2" importCode hideToggleCode hideStackBlitz />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
basic: `
# Using npm
npm install @primevue/themes
# Using yarn
yarn add @primevue/themes
# Using pnpm
pnpm add @primevue/themes
`
},
code2: {
basic: `
import { createApp } from 'vue';
import PrimeVue from 'primevue/config';
import Aura from '@primevue/themes/aura';
const app = createApp(App);
app.use(PrimeVue, {
theme: {
preset: Aura
}
});
`
}
};
}
};
</script>

View File

@ -0,0 +1,29 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Configure PrimeVue to use a theme like Aura.</p>
<DocSectionCode :code="code" importCode hideToggleCode hideStackBlitz />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import { createApp } from 'vue';
import PrimeVue from 'primevue/config';
import Aura from '@primevue/themes/aura';
const app = createApp(App);
app.use(PrimeVue, {
theme: {
preset: Aura
}
});
`
}
};
}
};
</script>

View File

@ -1,29 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
In unstyled mode, the components do not include any CSS so you'd need to style the components on your end, this is especially useful when building your own UI library on top of PrimeVue. Visit the
<NuxtLink to="/theming/unstyled">Unstyled mode</NuxtLink> documentation for more information and examples.
</p>
<DocSectionCode :code="code1" hideToggleCode importCode hideStackBlitz />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
basic: `
import { createApp } from "vue";
import PrimeVue from "primevue/config";
const app = createApp(App);
app.use(PrimeVue, {
unstyled: true
});
`
}
};
}
};
</script>

View File

@ -1,13 +1,12 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p> <p>
Each component can be imported and registered individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component. If you prefer importing components automatically with Verify your setup by adding a component such as <NuxtLink to="/button">Button</NuxtLink>. Each component can be imported and registered individually so that you only include what you use for bundle optimizization. Import path is available
tree-shaking support , view the in the documentation of the corresponding component.
<NuxtLink to="/autoimport">autoimport</NuxtLink> guide.
</p> </p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Button label="Check" icon="pi pi-check" /> <Button label="Verify" />
</div> </div>
<DocSectionCode :code="code" importCode /> <DocSectionCode :code="code" importCode />
</template> </template>
@ -26,7 +25,7 @@ app.component('Button', Button);
options: ` options: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Button label="Check" icon="pi pi-check" /> <Button label="Verify" />
</div> </div>
</template> </template>
@ -36,7 +35,7 @@ app.component('Button', Button);
composition: ` composition: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Button label="Check" icon="pi pi-check" /> <Button label="Verify" />
</div> </div>
</template> </template>

View File

@ -21,10 +21,10 @@
import AutoImportDoc from '@/doc/nuxt/AutoImportDoc.vue'; import AutoImportDoc from '@/doc/nuxt/AutoImportDoc.vue';
import DownloadDoc from '@/doc/nuxt/DownloadDoc.vue'; import DownloadDoc from '@/doc/nuxt/DownloadDoc.vue';
import ExamplesDoc from '@/doc/nuxt/ExamplesDoc.vue'; import ExamplesDoc from '@/doc/nuxt/ExamplesDoc.vue';
import SetupDoc from '@/doc/nuxt/SetupDoc.vue'; import ModuleDoc from '@/doc/nuxt/ModuleDoc.vue';
import StyledModeDoc from '@/doc/nuxt/StyledModeDoc.vue'; import NextStepsDoc from '@/doc/nuxt/NextStepsDoc.vue';
import UnstyledModeDoc from '@/doc/nuxt/UnstyledModeDoc.vue'; import ThemeDoc from '@/doc/nuxt/ThemeDoc.vue';
import UsageDoc from '@/doc/nuxt/UsageDoc.vue'; import VerifyDoc from '@/doc/nuxt/VerifyDoc.vue';
import ComponentsDoc from '@/doc/nuxt/configuration/ComponentsDoc.vue'; import ComponentsDoc from '@/doc/nuxt/configuration/ComponentsDoc.vue';
import ComposablesDoc from '@/doc/nuxt/configuration/ComposablesDoc.vue'; import ComposablesDoc from '@/doc/nuxt/configuration/ComposablesDoc.vue';
import DirectivesDoc from '@/doc/nuxt/configuration/DirectivesDoc.vue'; import DirectivesDoc from '@/doc/nuxt/configuration/DirectivesDoc.vue';
@ -43,31 +43,19 @@ export default {
component: DownloadDoc component: DownloadDoc
}, },
{ {
id: 'setup', id: 'module',
label: 'Setup', label: 'Module',
component: SetupDoc component: ModuleDoc
}, },
{ {
id: 'theming', id: 'theme',
label: 'Theming', label: 'Theme',
description: 'PrimeVue has two styling modes; Styled and Unstyled. If you are just getting started, begin with the styled mode.', component: ThemeDoc
children: [
{
id: 'styled',
label: 'Styled Mode',
component: StyledModeDoc
}, },
{ {
id: 'unstyled', id: 'verify',
label: 'Unstyled Mode', label: 'Verify',
component: UnstyledModeDoc component: VerifyDoc
}
]
},
{
id: 'usage',
label: 'Usage',
component: UsageDoc
}, },
{ {
id: 'configuration', id: 'configuration',
@ -119,6 +107,11 @@ export default {
id: 'examples', id: 'examples',
label: 'Examples', label: 'Examples',
component: ExamplesDoc component: ExamplesDoc
},
{
id: 'nextsteps',
label: 'Next Steps',
component: NextStepsDoc
} }
] ]
}; };

View File

@ -1,13 +1,13 @@
<template> <template>
<Head> <Head>
<Title>PrimeVue - Pass Through</Title> <Title>PrimeVue - Pass Through</Title>
<Meta name="description" content="The Pass Through props is an API to access the internal DOM Structure of the components." /> <Meta name="description" content="The Pass Through attributes is an API to access the internal DOM Structure of the components." />
</Head> </Head>
<div class="doc"> <div class="doc">
<div class="doc-main"> <div class="doc-main">
<div class="doc-intro"> <div class="doc-intro">
<h1>Pass Through</h1> <h1>Pass Through</h1>
<p>The Pass Through props is an API to access the internal DOM Structure of the components.</p> <p>The Pass Through attributes is an API to access the internal DOM Structure of the components.</p>
</div> </div>
<DocSections :docs="docs" /> <DocSections :docs="docs" />
</div> </div>
@ -20,6 +20,7 @@ import BasicDoc from '@/doc/passthrough/BasicDoc.vue';
import CustomCSSDoc from '@/doc/passthrough/CustomCSSDoc.vue'; import CustomCSSDoc from '@/doc/passthrough/CustomCSSDoc.vue';
import DeclarativeDoc from '@/doc/passthrough/DeclarativeDoc.vue'; import DeclarativeDoc from '@/doc/passthrough/DeclarativeDoc.vue';
import GlobalDoc from '@/doc/passthrough/GlobalDoc.vue'; import GlobalDoc from '@/doc/passthrough/GlobalDoc.vue';
import IntroductionDoc from '@/doc/passthrough/IntroductionDoc.vue';
import LifecycleDoc from '@/doc/passthrough/LifecycleDoc.vue'; import LifecycleDoc from '@/doc/passthrough/LifecycleDoc.vue';
import PCPrefixDoc from '@/doc/passthrough/PCPrefixDoc.vue'; import PCPrefixDoc from '@/doc/passthrough/PCPrefixDoc.vue';
import UsePassThroughDoc from '@/doc/passthrough/UsePassThroughDoc.vue'; import UsePassThroughDoc from '@/doc/passthrough/UsePassThroughDoc.vue';
@ -28,6 +29,11 @@ export default {
data() { data() {
return { return {
docs: [ docs: [
{
id: 'introduction',
label: 'Introduction',
component: IntroductionDoc
},
{ {
id: 'basic', id: 'basic',
label: 'Basic', label: 'Basic',

View File

@ -18,9 +18,10 @@
<script> <script>
import DownloadDoc from '@/doc/vite/DownloadDoc.vue'; import DownloadDoc from '@/doc/vite/DownloadDoc.vue';
import ExamplesDoc from '@/doc/vite/ExamplesDoc.vue'; import ExamplesDoc from '@/doc/vite/ExamplesDoc.vue';
import StyledModeDoc from '@/doc/vite/StyledModeDoc.vue'; import NextStepsDoc from '@/doc/vite/NextStepsDoc.vue';
import UnstyledModeDoc from '@/doc/vite/UnstyledModeDoc.vue'; import PluginDoc from '@/doc/vite/PluginDoc.vue';
import UsageDoc from '@/doc/vite/UsageDoc.vue'; import ThemeDoc from '@/doc/vite/ThemeDoc.vue';
import VerifyDoc from '@/doc/vite/VerifyDoc.vue';
import VideoDoc from '@/doc/vite/VideoDoc.vue'; import VideoDoc from '@/doc/vite/VideoDoc.vue';
export default { export default {
@ -33,27 +34,19 @@ export default {
component: DownloadDoc component: DownloadDoc
}, },
{ {
id: 'plugin', id: 'theme',
label: 'Plugin', label: 'Plugin',
description: component: PluginDoc
'PrimeVue plugin is required to be installed as an application plugin to set up the default configuration. The plugin is lightweight, only sets up the configuration object without affecting your application. PrimeVue has two styling modes; Styled and Unstyled. If you are just getting started, begin with the styled mode.',
children: [
{
id: 'styled',
label: 'Styled Mode',
component: StyledModeDoc
}, },
{ {
id: 'unstyled', id: 'theme',
label: 'Unstyled Mode', label: 'Theme',
component: UnstyledModeDoc component: ThemeDoc
}
]
}, },
{ {
id: 'usage', id: 'verify',
label: 'Usage', label: 'Verify',
component: UsageDoc component: VerifyDoc
}, },
{ {
id: 'examples', id: 'examples',
@ -64,6 +57,11 @@ export default {
id: 'video', id: 'video',
label: 'Video', label: 'Video',
component: VideoDoc component: VideoDoc
},
{
id: 'nextsteps',
label: 'Next Steps',
component: NextStepsDoc
} }
] ]
}; };