Skip to content

Commit

Permalink
Convert to PrimeVue monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jun 11, 2024
1 parent 970ba75 commit 61929ea
Show file tree
Hide file tree
Showing 4,430 changed files with 67,272 additions and 44,441 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist
.idea
.eslintcache
api-generator/typedoc.json
**/.DS_Store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
87 changes: 12 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,24 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)
[![Discord Chat](https://img.shields.io/discord/557940238991753223.svg?color=7289da&label=chat&logo=discord)](https://discord.gg/gzKFYnpmCY)
[![Prime Discussions](https://img.shields.io/github/discussions-search?query=org%3Aprimefaces&logo=github&label=Prime%20Discussions&link=https%3A%2F%2Fgithub.com%2Forgs%2Fprimefaces%2Fdiscussions)](https://github.com/orgs/primefaces/discussions)

[![PrimeVue Hero](https://www.primefaces.org/static/social/primevue-preview.jpg)](https://primevue.org/)

# PrimeVue
# PrimeVue MonoRepo

PrimeVue is a rich set of open source UI Components for Vue. See [PrimeVue homepage](https://primevue.org/) for live showcase and documentation.

## Download

PrimeVue is available at [npm](https://www.npmjs.com/package/primevue).

```
# Using npm
npm install primevue
# Using yarn
yarn add primevue
# Using pnpm
pnpm add primevue
```

## Plugin

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, we suggest to using the styled mode.

**Styled Mode**

Styled mode provides pre-skinned components, default theme is Aura with emerald as the primary color.

```javascript
import { createApp } from 'vue';
import PrimeVueStyled from 'primevue/config';
const app = createApp(App);

app.use(PrimeVueStyled);
```

**Unstyled Mode**

In unstyled mode, the components do not include any CSS so you'd need to style the components on your end. If you are using Tailwind CSS, visit the [Tailwind Presets](https://tailwind.primevue.org) project to get you started with styling the components with Tailwind utility classes.

```javascript
import { createApp } from 'vue';
import PrimeVueUnstyled from 'primevue/config';
const app = createApp(App);

app.use(PrimeVueUnstyled);
```

## Usage

Each component can be imported individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component.

```javascript
import Button from 'primevue/button';

const app = createApp(App);
app.component('Button', Button);
```

## Prop Cases

Component prop names are described as camel case throughout the documentation however kebab-case is also fully supported. Events on the other hand should always be kebab-case.

```vue
<Dialog :showHeader="false"></Dialog>
<!-- can be written as -->
<Dialog :show-header="false"></Dialog>
```

## Nuxt Integration

The [nuxt-primevue](https://www.npmjs.com/package/nuxt-primevue) package is the official module by PrimeTek. See the nuxt documentation for details. [information](https://primevue.org/nuxt)

## Example

We've created various samples for the popular options in the Vue ecosystem. Visit the [primevue-examples](https://github.com/primefaces/primevue-examples) repository for the samples.
## Packages

| Name | Version |
| --- | --- |
| [primevue](https://github.com/primefaces/primevue/tree/master/packages/primevue) | [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) |
| [@primevue/core](https://github.com/primefaces/primevue/tree/master/packages/core) | [![npm version](https://badge.fury.io/js/@primevue/core.svg)](https://badge.fury.io/js/@primevue/core) |
| [@primevue/icons](https://github.com/primefaces/primevue/tree/master/packages/icons) | [![npm version](https://badge.fury.io/js/@primevue/icons.svg)](https://badge.fury.io/js/@primevue/icons) |
| [@primevue/themes](https://github.com/primefaces/primevue/tree/master/packages/themes) | [![npm version](https://badge.fury.io/js/@primevue/themes.svg)](https://badge.fury.io/js/@primevue/themes) |
| [@primevue/nuxt-module](https://github.com/primefaces/primevue/tree/master/packages/nuxt-module) | [![npm version](https://badge.fury.io/js/@primevue/nuxt-module.svg)](https://badge.fury.io/js/@primevue/nuxt-module) |
| [@primevue/auto-import-resolver](https://github.com/primefaces/primevue/tree/master/packages/auto-import-resolver) | [![npm version](https://badge.fury.io/js/@primevue/auto-import-resolver.svg)](https://badge.fury.io/js/@primevue/auto-import-resolver) |
| [@primevue/metadata](https://github.com/primefaces/primevue/tree/master/packages/metadata) | [![npm version](https://badge.fury.io/js/@primevue/metadata.svg)](https://badge.fury.io/js/@primevue/metadata) |

## Contributors

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<template v-else-if="k === 'options'">
<template v-for="val in v" :key="val.name">
<div class="doc-option-type-options-container">
{{ val.name }}: <span class="doc-option-type-options doc-option-type">{{ val.type === 'T' || (val.type.includes('<T') && !val.type.includes('<Tr')) ? 'any' : val.type }}</span>
{{ val.name }}: <span class="doc-option-type-options doc-option-type">{{ val.type === 'T' || (val.type.includes('\<T') && !val.type.includes('\<Tr')) ? 'any' : val.type }}</span>
</div>
</template>
</template>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import { DomHandler, ObjectUtils } from 'primevue/utils';
import { DomHandler, ObjectUtils } from '@primevue/core/utils';
export default {
props: ['docs'],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ app.mount("#app");
<li class="relative">
<button v-styleclass="{
selector: '@next',
enterClass: 'hidden',
enterFromClass: 'hidden',
enterActiveClass: 'animate-scalein',
leaveToClass: 'hidden',
leaveActiveClass: 'animate-fadeout',
Expand Down Expand Up @@ -468,10 +468,10 @@ app.mount("#app");
</template>
<script>
import { $t, updatePreset, updateSurfacePalette } from 'primevue/themes';
import Aura from 'primevue/themes/aura';
import Lara from 'primevue/themes/lara';
import Nora from 'primevue/themes/nora';
import { $t, updatePreset, updateSurfacePalette } from '@primevue/themes';
import Aura from '@primevue/themes/aura';
import Lara from '@primevue/themes/lara';
import Nora from '@primevue/themes/nora';
const presets = {
Aura,
Expand Down Expand Up @@ -1074,8 +1074,8 @@ export default {
`
},
[`${path}presets/Noir.js`]: {
content: `import { definePreset } from 'primevue/themes';
import Aura from 'primevue/themes/aura';
content: `import { definePreset } from '@primevue/themes';
import Aura from '@primevue/themes/aura';
const Noir = definePreset(Aura, {
semantic: {
Expand Down
74 changes: 74 additions & 0 deletions apps/showcase/components/doc/helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import APIDocs from '@/doc/common/apidoc/index.json';
import { $dt } from '@primevue/themes';

export const getPTOptions = (name) => {
const { props } = APIDocs[name.toLowerCase()].interfaces.values[`${name}PassThroughOptions`] || APIDocs[name.toLowerCase()].interfaces.values[`${name}DirectivePassThroughOptions`];
const options = APIDocs[name.toLowerCase()].interfaces.values[`${name}PassThroughMethodOptions`];
let data = [];

for (const [i, prop] of props.entries()) {
if (options) {
let subCompName, subOptions;
let hasSubComp = prop.name !== 'hooks' && prop.type.indexOf('TransitionType') === -1 && prop.type.indexOf('<') > -1 && name.toLowerCase() !== prop.type.slice(0, prop.type.indexOf('<')).toLowerCase();

if (hasSubComp) {
subCompName = prop.type.slice(0, prop.type.indexOf('<')).replace('PassThroughOptions', '').replace('PassThroughOptionType', '');
subOptions = APIDocs[subCompName.toLowerCase()].interfaces.values[`${subCompName}PassThroughMethodOptions`];
const objToReplace = subOptions.props.find((opt) => opt.name === 'parent');

objToReplace.type = prop.type;
}

data.push({
value: i + 1,
label: prop.name,
options: hasSubComp ? subOptions?.props : options?.props,
description: prop.description
});
} else {
data.push({
value: i + 1,
label: prop.name,
description: prop.description
});
}
}

return data;
};

export const getStyleOptions = (name) => {
const { members = [] } = APIDocs[name.toLowerCase() + 'style']?.enumerations?.values?.[`${name}Classes`];
let data = [];

for (const member of members) {
const { value, description } = member;

data.push({
class: value.replaceAll('"', ''),
description
});
}

return data;
};

export const getTokenOptions = (name) => {
const values = APIDocs[`themes/${name.toLowerCase()}`]?.tokens?.values;
let data = [];

for (const [key, value] of Object.entries(values || {})) {
for (const tokens of value?.props) {
const { token, description } = tokens;
const designToken = $dt(token);

data.push({
token,
variable: designToken.name,
description: description
});
}
}

return data;
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<script>
import { CustomerService } from '@/service/CustomerService';
import { FilterMatchMode, FilterOperator } from 'primevue/api';
import { FilterMatchMode, FilterOperator } from '@primevue/core/api';
export default {
data() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DomHandler } from 'primevue/utils';
import { DomHandler } from '@primevue/core/utils';

const CodeHighlight = {
mounted(el, binding) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</template>

<script>
import { FilterMatchMode, FilterService } from 'primevue/api';
import { FilterMatchMode, FilterService } from '@primevue/core/api';
export default {
data() {
Expand Down Expand Up @@ -82,7 +82,7 @@ export default {
</template>
<script>
import { FilterMatchMode, FilterService } from 'primevue/api';
import { FilterMatchMode, FilterService } from '@primevue/core/api';
export default {
data() {
Expand Down Expand Up @@ -159,7 +159,7 @@ export default {
<script setup>
import { ref } from "vue";
import { FilterMatchMode, FilterService } from 'primevue/api';
import { FilterMatchMode, FilterService } from '@primevue/core/api';
const cities = ref();
const selectedCity = ref();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 61929ea

Please sign in to comment.